:root {
  --void: #11110f;
  --ink: #090907;
  --paper: #f1eee5;
  --paper-strong: #fffaf0;
  --paper-dim: #d8d3c6;
  --muted: #666157;
  --muted-on-dark: #b8b0a3;
  --accent: #f47a20;
  --accent-strong: #ff8a2a;
  --ok: #b8f25b;
  --danger: #ff5b4f;
  --line: #090907;
  --header-height: 4.25rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--void);
  scrollbar-gutter: stable;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: ui-monospace, "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
  color: var(--paper);
  background: var(--void);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(241, 238, 229, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(241, 238, 229, 0.05) 1px, transparent 1px);
  background-size: 2rem 2rem;
  opacity: 0.32;
}

a {
  color: inherit;
}

.page-ambient,
.page-grid {
  display: none;
}

.site-inner {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding-inline: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  border-bottom: 1px solid var(--paper);
  background: rgba(17, 17, 15, 0.94);
  backdrop-filter: blur(8px);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--paper);
  border-radius: 0;
  object-fit: cover;
  background: var(--ink);
}

.brand-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  color: var(--paper);
  font-size: 0.84rem;
  line-height: 1;
  text-decoration: none;
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.nav-cta {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.nav-cta:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.shell {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: 1rem;
}

.page,
.screen {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.page.hidden,
.screen.hidden,
.hidden {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid rgba(241, 238, 229, 0.45);
  background: var(--void);
}

.footer-simple {
  display: flex;
  align-items: center;
  min-height: 3rem;
}

.footer-simple p {
  margin: 0;
  color: var(--muted-on-dark);
  font-size: 0.78rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0.45rem 0.45rem 0 var(--ink);
}

.panel::before {
  content: none;
}

.section-kicker,
.eyebrow,
.listen-label,
.store-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.play-redesign {
  position: relative;
}

.play-canvas {
  position: relative;
  width: min(100%, 74rem);
  max-width: 74rem;
  margin: 0 auto;
  padding: 1rem 0 6rem;
}

.play-progress {
  margin-bottom: 1.1rem;
}

.play-progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
  color: #000;
  text-transform: uppercase;
}

.play-round {
  display: inline-block;
  width: 11ch;
  font-size: clamp(1.8rem, 4.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.play-accuracy {
  display: inline-block;
  min-width: 13ch;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.play-meter {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.95rem;
}

.play-meter span {
  display: block;
  min-height: 1.8rem;
  border: 2px solid #000;
  border-right-width: 0;
  background: #fff;
}

.play-meter span:last-child {
  border-right-width: 2px;
}

.play-meter .done {
  background: #000;
}

.play-meter .active {
  background: #ffff00;
}

.play-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem;
  align-items: start;
}

.play-left-stack {
  display: grid;
  gap: 1rem;
}

.play-right-stack {
  display: grid;
  gap: 1rem;
}

.play-card {
  border: 2px solid #000;
  background: #fff;
  color: #000;
  padding: 1rem;
  box-shadow: 4px 4px 0 0 #000;
}

.play-audio-card h2,
.play-answer-top h2,
.play-feedback-card h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid #000;
  display: inline-block;
  padding-bottom: 0.15rem;
}

.play-audio-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.play-prompt-text {
  margin: 0.75rem 0 0;
  min-height: 1.2em;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.play-audio-actions button {
  justify-content: space-between;
  min-height: 5rem;
  padding-inline: 0.9rem;
  border: 4px solid #000;
  background: #fff;
  color: #000;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: none;
}

.play-audio-actions #playStartBtn {
  background: #ffff00;
}

.play-audio-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.play-feedback-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.play-feedback-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 4px solid #000;
  background: #ffff00;
}

.play-feedback-icon .material-symbols-outlined {
  font-size: 2.15rem;
}

.play-feedback-title {
  margin: 0;
  min-height: 1em;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.play-feedback-subtitle {
  margin: 0.32rem 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  font-weight: 600;
}

.play-answer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.play-answer-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0.2rem 0.48rem;
  background: #000;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.play-degree-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.play-degree-tile {
  width: 100%;
  display: flex;
  flex-direction: column;
  place-items: center;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding-inline: 0.55rem;
  aspect-ratio: 1 / 1;
  border: 4px solid #000;
  background: #fff;
  color: #000;
  text-transform: uppercase;
  box-shadow: none;
}

.play-degree-tile strong {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1;
}

.play-degree-tile small {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.play-degree-tile.is-active {
  background: #000;
  color: #fff;
}

.play-degree-tile.correct {
  background: #b8f25b;
}

.play-degree-tile.wrong {
  background: #ffb1a9;
}

.play-degree-tile:disabled {
  opacity: 0.75;
}

.play-degree-idk {
  background: #d4d4d4;
}

.play-answer-card {
  background: #f4f4f5;
  box-shadow: none;
}

.play-session-card {
  padding: 0.8rem;
}

.play-session-card p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.play-session-rows {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.2rem;
}

.play-session-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.play-session-rows span {
  color: #555;
  font-weight: 700;
}

.play-session-rows strong {
  color: #000;
  font-weight: 900;
}

.play-session-config-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.6rem;
  padding-inline: 0.8rem;
  margin-top: 0.65rem;
  border: 3px solid #000;
  background: #ffff00;
  color: #000;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.play-session-config-btn:hover {
  background: #fff;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr);
  gap: 1rem;
  min-height: 29rem;
  padding: 1.25rem;
  background: var(--accent);
}

.hero-copy-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 19rem;
}

.hero-panel h1,
.info-panel h1,
.screen-header h1,
.game-header h1 {
  margin: 0.45rem 0 0;
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy,
.panel-text,
.muted,
.hint,
#feedbackText {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-copy {
  max-width: 24rem;
  margin-top: 0.85rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: min(100%, 24rem);
  margin-top: 1.25rem;
}

.hero-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.hero-list li {
  min-height: 2rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
}

.scale-poster {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.35rem;
  min-height: 20rem;
  padding: 0.8rem;
  border: 1px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) left 50% / 100% 1px no-repeat,
    var(--paper);
}

.scale-poster span {
  display: block;
  min-height: 2rem;
  height: calc(var(--step) * 1.15rem);
  border: 1px solid var(--ink);
  background: var(--ink);
}

.scale-poster span:nth-child(2n) {
  background: var(--paper-strong);
}

.seo-panel,
.info-panel,
.controls-panel,
.notes-panel,
.game-header,
.quiz-panel {
  padding: 1.1rem;
}

.info-panel {
  min-height: 22rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0.3rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.session-list,
.about-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

.session-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: steps;
}

.session-list li,
.about-list li {
  min-height: 5rem;
  padding: 0.75rem;
  border: 1px solid var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
}

.session-list li {
  counter-increment: steps;
}

.session-list li::before {
  content: "0" counter(steps);
  display: block;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.inline-link-row,
.feature-grid,
.session-grid,
.session-copy {
  display: none;
}

.screen-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6rem;
}

.setup-screen .screen-header {
  justify-content: flex-start;
}

.screen-header h1,
.game-header h1 {
  color: var(--paper);
  font-size: 3.25rem;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 1rem;
  align-items: start;
}

.setup-actions {
  grid-column: 1 / -1;
  justify-self: end;
  width: min(100%, 18rem);
}

.field-grid {
  display: grid;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span,
label {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

select,
button,
.link-button {
  width: 100%;
  border-radius: 0;
  font: inherit;
}

select {
  min-height: 3.1rem;
  padding: 0.75rem 2.4rem 0.75rem 0.75rem;
  border: 1px solid var(--ink);
  appearance: none;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 1.05rem) 50% / 0.38rem 0.38rem no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) calc(100% - 0.8rem) 50% / 0.38rem 0.38rem no-repeat,
    var(--paper-strong);
}

button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--ink);
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

button:hover:enabled,
.link-button:hover {
  transform: translate(-2px, -2px);
  background: var(--ink);
  color: var(--paper);
}

select:focus,
button:focus,
.link-button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.primary,
.link-button.primary {
  background: var(--ink);
  color: var(--paper);
}

button.primary:hover:enabled,
.link-button.primary:hover {
  background: var(--paper-strong);
  color: var(--ink);
}

.actions {
  display: grid;
  gap: 0.65rem;
}

.panel-chip,
.panel-chip-group {
  position: relative;
  z-index: 1;
}

.panel-chip-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--ink);
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.learn-notes-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.learn-note {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.6rem;
  padding: 0.5rem;
  border: 1px solid var(--ink);
  background: #fff;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.learn-note:hover {
  transform: translateY(-2px);
}

.learn-note input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.learn-note span {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.learn-note:has(input:checked) {
  background: rgb(255, 255, 0);
}

.learn-note.is-selected {
  background: rgb(255, 255, 0);
}

.game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.game-header-main {
  display: grid;
  gap: 0.75rem;
}

.back-button {
  width: auto;
  min-width: 7rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.listen-card,
.answer-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--ink);
  background: var(--paper-strong);
}

.listen-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 20rem;
}

.listen-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      155deg,
      transparent 0,
      transparent 1.05rem,
      rgba(9, 9, 7, 0.14) 1.08rem,
      rgba(9, 9, 7, 0.14) 1.14rem
    );
}

.listen-lines span {
  display: none;
}

.listen-label,
#promptText,
.quiz-actions {
  position: relative;
  z-index: 1;
}

#promptText {
  margin: 0.75rem 0 auto;
  max-width: 12ch;
  color: var(--ink);
  font-size: 3.3rem;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0;
}

.quiz-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.5rem;
}

.answer-grid button {
  min-height: 5rem;
  font-size: 1.2rem;
  font-weight: 900;
}

.answer-grid button.correct {
  background: var(--ok);
  color: var(--ink);
}

.answer-grid button.wrong {
  background: var(--danger);
  color: var(--ink);
}

.quiz-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  margin-top: 0.85rem;
}

.quiz-footer #feedbackText {
  max-width: 42rem;
}

.quiz-footer #nextBtn {
  width: auto;
  min-width: 8rem;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.store-button {
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 5rem;
  text-align: left;
}

.store-logo,
.store-name,
.store-meta {
  display: block;
}

.store-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.8rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.store-name {
  font-size: 1rem;
  font-weight: 800;
}

.app-status {
  margin-top: 0.85rem;
}

.page-app {
  min-height: calc(100vh - 9.25rem);
  padding: 0;
  background: #f3f3f3;
  color: #000;
}

.app-coming-shell {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2rem;
}

.app-coming-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.25rem;
  align-items: center;
}

.app-coming-copy h1 {
  margin: 0.8rem 0 0;
  color: #000;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.app-phase-label {
  display: inline-block;
  margin: 0;
  padding: 0.25rem 0.45rem;
  border: 2px solid #000;
  background: #ffff00;
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-coming-description {
  max-width: 37ch;
  margin: 1.05rem 0 0;
  color: #5c5c5c;
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.app-store-link {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 2px solid #000;
  background: #000;
  box-shadow: 4px 4px 0 #000;
}

.app-store-link img {
  display: block;
  width: auto;
  height: 3rem;
}

.app-store-link:hover:enabled {
  transform: translate(-2px, -2px);
}

.app-coming-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-stack {
  position: relative;
  width: min(100%, 21rem);
  aspect-ratio: 1 / 1;
}

.app-card-back,
.app-card-front {
  position: absolute;
  inset: 0;
  border: 2px solid #000;
}

.app-card-back {
  background: #ffff00;
  transform: rotate(4deg);
}

.app-card-front {
  display: grid;
  place-content: center;
  gap: 0.7rem;
  background: #efefef;
  transform: rotate(-3deg);
}

.app-card-front .material-symbols-outlined {
  justify-self: center;
  font-size: 4.8rem;
}

.app-card-lines {
  display: grid;
  gap: 0.3rem;
}

.app-card-lines span {
  display: block;
  height: 4px;
  background: #000;
}

.app-card-lines span:nth-child(1) {
  width: 5rem;
}

.app-card-lines span:nth-child(2) {
  width: 4rem;
}

.app-card-lines span:nth-child(3) {
  width: 4.7rem;
}

.app-coming-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.app-feature-card {
  position: relative;
  min-height: 8.6rem;
  border: 2px solid #000;
  background: #e7e7e7;
  padding: 1.1rem 1.1rem 1rem;
}

.app-feature-highlight {
  background: #ffff00;
}

.app-feature-index {
  position: absolute;
  top: -0.45rem;
  left: -0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.35rem;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.app-feature-card h2 {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.app-feature-card p {
  max-width: 42ch;
  margin: 0.7rem 0 0;
  color: #4d4d4d;
  font-size: 0.67rem;
  line-height: 1.45;
}

.app-status {
  margin: 0.65rem 0 0;
  color: #333;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  z-index: 20;
  width: max-content;
  max-width: 13rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.25rem);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: normal;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 58rem) {
  .site-header-row {
    min-height: auto;
    padding-block: 0.75rem;
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    flex: 1 1 auto;
  }

  .hero-panel,
  .setup-layout,
  .game-header,
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .play-main-grid {
    grid-template-columns: 1fr;
  }

  .play-degree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel h1,
  .info-panel h1,
  .screen-header h1,
  .game-header h1 {
    font-size: 3rem;
  }

  .hero-copy-block {
    min-height: 14rem;
  }

  .scale-poster {
    min-height: 12rem;
  }

  .session-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learn-notes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .screen-header,
  .game-header {
    align-items: flex-start;
  }

  .panel-chip-group {
    justify-content: flex-start;
  }

  .setup-actions {
    justify-self: stretch;
    width: 100%;
  }

  .play-round {
    font-size: clamp(1.7rem, 10vw, 2.35rem);
  }

  .play-session-card {
    width: 100%;
    box-shadow: none;
  }

  .app-coming-hero {
    grid-template-columns: 1fr;
  }

  .app-coming-visual {
    order: -1;
  }

  .app-card-stack {
    width: min(100%, 14rem);
  }

  .app-coming-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 36rem) {
  .site-inner,
  .shell {
    padding-inline: 0.7rem;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .site-nav a,
  .nav-cta {
    padding-inline: 0.45rem;
    font-size: 0.78rem;
  }

  .hero-panel,
  .seo-panel,
  .info-panel,
  .controls-panel,
  .notes-panel,
  .game-header,
  .quiz-panel {
    padding: 0.8rem;
  }

  .hero-panel h1,
  .info-panel h1,
  .screen-header h1,
  .game-header h1 {
    font-size: 2.35rem;
  }

  #promptText {
    font-size: 2.35rem;
  }

  .hero-actions,
  .quiz-actions,
  .quiz-footer,
  .store-grid,
  .session-list {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .quiz-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .play-meter {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .learn-notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .app-coming-shell {
    padding: 1.4rem 0.7rem 1rem;
  }

  .app-coming-copy h1 {
    font-size: clamp(2.15rem, 13vw, 3rem);
  }

  .app-store-link img {
    height: 2.7rem;
  }

  .quiz-footer #nextBtn,
  .back-button {
    width: 100%;
  }

  [data-tooltip]::after {
    display: none;
  }
}

/* Stitch alignment overrides */
body::before {
  display: none;
}

.shell {
  width: 100%;
  max-width: none;
  padding: 0 0 6rem;
}

.bottom-nav a.active {
  background: #facc15;
}

.bottom-nav a span:last-child {
  margin-top: 0.25rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bottom-nav .material-symbols-outlined {
  font-size: 1.6rem;
}

.learn-note:hover {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Config page fit tuning */
#configPage .setup-screen > div {
  max-width: min(100%, 72rem);
  padding-top: clamp(1rem, 2.2vh, 2rem);
  padding-bottom: calc(clamp(1.25rem, 3vh, 2.5rem) + 5.5rem + env(safe-area-inset-bottom));
}

#configPage .setup-screen h1.font-h1.text-h1 {
  font-size: clamp(3.2rem, 6vw, 5.1rem);
  line-height: 0.95;
}

#configPage .setup-screen .text-h3 {
  font-size: clamp(2rem, 2.8vw, 2.75rem);
  line-height: 1.06;
}

#configPage .setup-screen .p-lg {
  padding: clamp(0.95rem, 1.6vw, 1.7rem);
}

#configPage .setup-screen .p-md {
  padding: clamp(0.8rem, 1.1vw, 1.2rem);
}

#configPage .setup-screen .learn-note {
  min-height: clamp(3.3rem, 6.8vh, 4.35rem);
}

#configPage #startBtn {
  font-size: clamp(2rem, 2.9vw, 2.8rem);
  padding-top: clamp(0.65rem, 1.2vh, 1rem);
  padding-bottom: clamp(0.65rem, 1.2vh, 1rem);
}

#configPage .setup-screen > div > .grid.md\:grid-cols-12 {
  gap: clamp(0.95rem, 1.5vw, 1.85rem);
}

#configPage .setup-screen > div > .grid.md\:grid-cols-12 > .md\:col-span-8 {
  gap: clamp(0.85rem, 1.35vw, 1.5rem);
}

#configPage .setup-screen > div > .grid.md\:grid-cols-12 > .md\:col-span-4 {
  gap: clamp(0.85rem, 1.35vw, 1.5rem);
}

@media (max-height: 900px) and (min-width: 768px) {
  #configPage .setup-screen > div {
    max-width: min(100%, 68rem);
    padding-top: 0.8rem;
  }

  #configPage .setup-screen h1.font-h1.text-h1 {
    font-size: clamp(2.6rem, 5.1vw, 4.2rem);
    margin-bottom: 0.45rem;
  }

  #configPage .setup-screen .text-h3 {
    font-size: clamp(1.7rem, 2.35vw, 2.2rem);
    line-height: 1.04;
  }

  #configPage .setup-screen .font-body-mono.text-body-mono {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  #configPage .setup-screen .mb-lg {
    margin-bottom: 1rem;
  }

  #configPage .setup-screen .mt-lg {
    margin-top: 1rem;
  }

  #configPage .setup-screen .learn-note {
    min-height: 3rem;
  }
}

@media (max-height: 780px) and (min-width: 768px) {
  #configPage .setup-screen > div {
    max-width: min(100%, 64rem);
    padding-top: 0.6rem;
  }

  #configPage .setup-screen h1.font-h1.text-h1 {
    font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  }

  #configPage .setup-screen .text-h3 {
    font-size: clamp(1.4rem, 1.95vw, 1.8rem);
  }

  #configPage .setup-screen .p-lg {
    padding: 0.75rem;
  }

  #configPage .setup-screen .p-md {
    padding: 0.65rem;
  }

  #configPage #startBtn {
    font-size: clamp(1.65rem, 2.2vw, 2rem);
    min-height: 2.8rem;
  }
}

/* Play page fit tuning */
#playPage {
  min-height: calc(100dvh - var(--header-height) - 5rem);
}

#playPage .play-canvas {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--header-height) - 5rem);
  max-width: min(100%, 62rem);
  padding-top: clamp(0.4rem, 1.1vh, 0.8rem);
  padding-bottom: calc(clamp(0.75rem, 1.4vh, 1.2rem) + 5.25rem + env(safe-area-inset-bottom));
}

#playPage .play-progress {
  margin-bottom: clamp(0.45rem, 0.9vh, 0.7rem);
}

#playPage .play-progress-head {
  margin-bottom: 0.32rem;
}

#playPage .play-round {
  width: auto;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
}

#playPage .play-accuracy {
  min-width: auto;
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
}

#playPage .play-main-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr);
  gap: clamp(0.75rem, 1.2vw, 1rem);
}

#playPage .play-left-stack,
#playPage .play-right-stack {
  min-height: 0;
  gap: clamp(0.65rem, 1vw, 0.95rem);
}

#playPage .play-card {
  padding: clamp(0.58rem, 0.82vw, 0.82rem);
}

#playPage .play-audio-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.4rem, 0.65vw, 0.52rem);
  margin-top: 0.6rem;
}

#playPage .play-audio-actions #playStartBtn {
  grid-column: 1 / -1;
}

#playPage .play-audio-actions button {
  min-height: clamp(2.7rem, 4.8vh, 3.15rem);
  border-width: 3px;
  font-size: clamp(0.8rem, 0.98vw, 0.96rem);
  letter-spacing: 0.01em;
}

#playPage .play-degree-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.36rem, 0.62vw, 0.5rem);
  margin-top: 0.58rem;
}

#playPage .play-degree-tile {
  gap: 0.16rem;
  min-height: 4rem;
  aspect-ratio: 4 / 3;
  border-width: 3px;
}

#playPage .play-degree-tile strong {
  font-size: clamp(1.2rem, 1.65vw, 1.6rem);
}

#playPage .play-degree-tile small {
  font-size: clamp(0.56rem, 0.66vw, 0.64rem);
}

#playPage .play-feedback-content {
  margin-top: 0.58rem;
}

#playPage .play-feedback-title {
  font-size: clamp(0.96rem, 1.08vw, 1.16rem);
  min-height: auto;
}

#playPage .play-feedback-subtitle {
  font-size: clamp(0.62rem, 0.76vw, 0.72rem);
}

#playPage .play-feedback-icon {
  width: clamp(2.3rem, 2.8vw, 2.8rem);
  height: clamp(2.3rem, 2.8vw, 2.8rem);
  border-width: 3px;
}

#playPage .play-feedback-icon .material-symbols-outlined {
  font-size: clamp(1.25rem, 1.45vw, 1.5rem);
}

#playPage .play-meter span {
  min-height: clamp(0.95rem, 1.35vh, 1.15rem);
}

#playPage .play-answer-card {
  padding-bottom: clamp(0.5rem, 0.75vw, 0.72rem);
}

#playPage .play-session-rows div {
  font-size: clamp(0.64rem, 0.74vw, 0.69rem);
}

#playPage .play-session-config-btn {
  min-height: 2.2rem;
  margin-top: 0.52rem;
  font-size: 0.68rem;
}

@media (max-height: 1100px) and (min-width: 768px) {
  #playPage .play-canvas {
    max-width: min(100%, 61rem);
  }

  #playPage .play-round {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
  }

  #playPage .play-audio-actions button {
    min-height: 2.55rem;
    font-size: clamp(0.76rem, 0.92vw, 0.88rem);
  }

  #playPage .play-degree-tile strong {
    font-size: clamp(1.08rem, 1.35vw, 1.35rem);
  }

  #playPage .play-degree-tile small {
    font-size: 0.54rem;
  }
}

@media (max-height: 900px) and (min-width: 768px) {
  #playPage .play-canvas {
    max-width: min(100%, 60rem);
    padding-top: 0.3rem;
  }

  #playPage .play-progress {
    margin-bottom: 0.4rem;
  }

  #playPage .play-round {
    font-size: clamp(1rem, 1.7vw, 1.18rem);
  }

  #playPage .play-accuracy {
    font-size: 0.62rem;
  }

  #playPage .play-meter {
    margin-top: 0.4rem;
    gap: 0.16rem;
  }

  #playPage .play-meter span {
    min-height: 0.82rem;
  }

  #playPage .play-audio-actions {
    gap: 0.34rem;
    margin-top: 0.45rem;
  }

  #playPage .play-audio-actions button {
    min-height: 2.35rem;
    font-size: clamp(0.72rem, 0.95vw, 0.84rem);
  }

  #playPage .play-feedback-icon {
    width: 2.2rem;
    height: 2.2rem;
  }

  #playPage .play-feedback-icon .material-symbols-outlined {
    font-size: 1.1rem;
  }

  #playPage .play-feedback-title {
    font-size: 0.9rem;
  }

  #playPage .play-feedback-subtitle {
    font-size: 0.6rem;
  }

  #playPage .play-degree-tile small {
    font-size: 0.54rem;
  }

  #playPage .play-session-config-btn {
    min-height: 2rem;
    font-size: 0.64rem;
  }
}

@media (max-height: 780px) and (min-width: 768px) {
  #playPage .play-canvas {
    max-width: min(100%, 58rem);
    padding-top: 0.25rem;
  }

  #playPage .play-main-grid {
    gap: 0.45rem;
  }

  #playPage .play-left-stack,
  #playPage .play-right-stack {
    gap: 0.45rem;
  }

  #playPage .play-card {
    padding: 0.52rem;
    box-shadow: 2px 2px 0 0 #000;
  }

  #playPage .play-round {
    font-size: clamp(0.9rem, 1.4vw, 1.03rem);
  }

  #playPage .play-meter span {
    min-height: 0.74rem;
    border-width: 1px;
  }

  #playPage .play-audio-actions button {
    min-height: 2.2rem;
    padding-inline: 0.58rem;
    font-size: clamp(0.68rem, 0.82vw, 0.76rem);
  }

  #playPage .play-feedback-content {
    margin-top: 0.32rem;
  }

  #playPage .play-feedback-title {
    font-size: 0.82rem;
  }

  #playPage .play-feedback-subtitle {
    font-size: 0.55rem;
  }

  #playPage .play-answer-top span {
    min-height: 1.22rem;
    padding: 0.12rem 0.34rem;
    font-size: 0.56rem;
  }

  #playPage .play-degree-grid {
    margin-top: 0.42rem;
    gap: 0.3rem;
  }

  #playPage .play-degree-tile {
    gap: 0.12rem;
    min-height: 3.05rem;
    padding-inline: 0.26rem;
  }

  #playPage .play-degree-tile strong {
    font-size: clamp(0.9rem, 1.15vw, 1.1rem);
  }

  #playPage .play-degree-tile small {
    margin-top: 0;
    font-size: 0.48rem;
  }
}

@media (max-width: 58rem) {
  #playPage {
    min-height: auto;
  }

  #playPage .play-canvas {
    min-height: auto;
  }

  #playPage .play-main-grid {
    grid-template-columns: 1fr;
  }

  #playPage .play-degree-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  #playPage .play-audio-actions {
    grid-template-columns: 1fr;
  }

  #playPage .play-audio-actions #playStartBtn {
    grid-column: auto;
  }

  #playPage .play-audio-actions button {
    min-height: 2.8rem;
    font-size: 0.86rem;
  }

  #playPage .play-degree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #playPage .play-degree-tile {
    min-height: 3.6rem;
  }
}
