:root {
  color-scheme: dark;
  --night: #08111c;
  --night-2: #0d1624;
  --night-3: #142236;
  --panel: rgba(12, 23, 38, 0.84);
  --panel-strong: rgba(16, 30, 48, 0.94);
  --panel-soft: rgba(255, 247, 232, 0.05);
  --line: rgba(255, 232, 194, 0.1);
  --line-strong: rgba(255, 213, 135, 0.2);
  --text: #f7efde;
  --text-soft: #d7c7a9;
  --muted: #a9997d;
  --gold: #d5a13c;
  --gold-soft: #f2d289;
  --terracotta: #f07d3a;
  --crimson: #d95b4e;
  --jade: #34a07d;
  --lagoon: #2a95b0;
  --indigo: #5f7bc3;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Aptos, "Segoe UI", "Franklin Gothic Book", sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(213, 161, 60, 0.14), transparent 0 28%),
    radial-gradient(circle at 82% 20%, rgba(52, 160, 125, 0.16), transparent 0 24%),
    radial-gradient(circle at 70% 78%, rgba(95, 123, 195, 0.14), transparent 0 22%),
    linear-gradient(180deg, #07111d 0%, #09131e 22%, #0b1827 58%, #09121d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(135deg, rgba(255, 240, 204, 0.02) 0 2px, transparent 2px 18px);
  opacity: 0.65;
}

a,
button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.6;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb-a {
  top: -80px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 244, 197, 0.8), rgba(213, 161, 60, 0.08) 50%, transparent 72%);
}

.orb-b {
  right: -80px;
  top: 24%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 42% 40%, rgba(112, 220, 192, 0.62), rgba(52, 160, 125, 0.08) 56%, transparent 76%);
  animation-duration: 22s;
}

.orb-c {
  left: 34%;
  bottom: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 40% 40%, rgba(119, 152, 235, 0.5), rgba(95, 123, 195, 0.08) 54%, transparent 76%);
  animation-duration: 25s;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 0 92%, rgba(255, 216, 150, 0.06) 92% 100%),
    repeating-linear-gradient(90deg, rgba(255, 229, 190, 0.03) 0 1px, transparent 1px 92px);
  mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65), transparent);
  opacity: 0.45;
}

.page-shell {
  position: relative;
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.panel,
.panel-soft {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.08), rgba(255, 253, 246, 0)),
    linear-gradient(135deg, rgba(20, 34, 54, 0.96), rgba(9, 18, 29, 0.92));
}

.panel-soft {
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.04);
  box-shadow: var(--shadow-soft);
}

.hero,
.chapter-stage,
.library-stage,
.game-stage,
.results-stage,
.archive-stage {
  padding: clamp(22px, 4vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.88fr);
  gap: 22px;
}

.hero::before,
.chapter-stage::before,
.library-stage::before,
.game-stage::before,
.results-stage::before,
.archive-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 0 26%),
    radial-gradient(circle at bottom left, rgba(213, 161, 60, 0.1), transparent 0 30%);
}

.hero-copy,
.hero-brief,
.section-head,
.game-topline,
.question-layout,
.results-hero,
.results-grid,
.archive-grid,
.setup-shell,
.browse-tabs,
.library-hero,
.library-grid {
  position: relative;
  z-index: 1;
}

.eyebrow,
.stat-label,
.mode-kicker,
.mode-chip,
.archive-kicker,
.feedback-anchor,
.progress-title span:last-child,
.setup-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero h1,
.hero h2,
.section-head h2,
.question-card h2,
.context-card h3,
.results-copy h2,
.archive-card h3,
.library-stage h3,
.prep-card h2,
.setup-shell h2,
.brief-heading h2,
.chapter-card h3 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 0.98;
  color: #fff9ec;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(1.95rem, 5.5vw, 5.6rem);
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.hero-lede,
.section-note,
.context-card p,
.archive-card p,
.mode-card p,
.results-copy p,
.feedback-card p,
.setup-shell p,
.library-stage p,
.prep-card p,
.chapter-card p,
.chapter-listen p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

.hero-lede {
  max-width: 64ch;
  margin-top: 18px;
  font-size: 1.04rem;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible,
.chapter-action:hover,
.chapter-action:focus-visible,
.choice-button:hover,
.choice-button:focus-visible,
.option-chip:hover,
.option-chip:focus-visible,
.tab-button:hover,
.tab-button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #130d06;
  background: linear-gradient(135deg, #f2d289, #d5a13c 60%, #f08a24);
  box-shadow: 0 16px 30px rgba(213, 161, 60, 0.2);
}

.button-secondary {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.03);
  border-color: var(--line);
}

.setup-shell {
  margin-top: 24px;
  padding: 18px 20px;
  display: grid;
  gap: 18px;
}

.setup-copy h2 {
  margin-top: 8px;
  font-size: 1.8rem;
}

.setup-groups,
.hero-actions,
.hero-stats,
.mode-stack,
.section-head,
.results-actions,
.results-metrics,
.archive-grid,
.choice-grid,
.status-grid,
.prep-pills,
.results-grid,
.library-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.setup-groups {
  gap: 18px;
}

.setup-group {
  display: grid;
  gap: 10px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-chip,
.tab-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.03);
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.option-chip.is-active,
.tab-button.is-active {
  color: #160f06;
  border-color: rgba(255, 219, 153, 0.44);
  background: linear-gradient(135deg, #f2d289, #d5a13c 60%, #f08a24);
  box-shadow: 0 10px 24px rgba(213, 161, 60, 0.16);
}

.hero-actions {
  margin-top: 24px;
}

.hero-stats {
  margin-top: 28px;
}

.stat-card,
.mode-card,
.status-card,
.metric-card,
.archive-card,
.player-score-card,
.library-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.03);
}

.stat-card {
  min-width: 152px;
  padding: 14px 16px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 1.16rem;
  color: #fff6e3;
}

.hero-brief {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.brief-heading h2 {
  margin-top: 8px;
  font-size: 2rem;
}

.mode-stack {
  flex-direction: column;
}

.mode-card {
  padding: 16px 18px;
}

.mode-card h3,
.archive-card h3,
.library-card h3,
.library-hero h3 {
  margin: 8px 0 10px;
  font-size: 1.28rem;
  line-height: 1.2;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #fff4df;
}

.main-layout {
  margin-top: 22px;
  display: grid;
  gap: 22px;
}

.browse-tabs {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-head {
  justify-content: space-between;
  align-items: end;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-note {
  max-width: 58ch;
}

.chapter-grid,
.library-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chapter-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 246px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 0 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(6, 12, 19, 0.48);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  animation: rise 420ms ease both;
}

.chapter-card::after {
  content: "";
  position: absolute;
  right: -14px;
  top: -18px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 10px);
  opacity: 0.34;
  pointer-events: none;
}

.chapter-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
}

.chapter-label,
.chapter-badge,
.prep-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-label {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.chapter-badge,
.prep-pill {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chapter-card h3 {
  font-size: 1.8rem;
  line-height: 1.02;
  max-width: 12ch;
}

.chapter-listen {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.chapter-listen strong {
  display: block;
  margin-bottom: 6px;
  color: #fff2dc;
  font-size: 0.92rem;
}

.chapter-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.chapter-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.chapter-action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #08111c;
  background: var(--chapter-accent, var(--gold));
  font-weight: 800;
  box-shadow: 0 12px 24px var(--chapter-glow, rgba(213, 161, 60, 0.2));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.library-hero {
  margin-top: 20px;
  padding: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.library-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.library-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.is-hidden {
  display: none !important;
}

.game-topline,
.progress-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.game-topline {
  margin-bottom: 18px;
}

.mode-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.score-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.score-pill strong,
.timer-shell strong,
.score-orb strong,
.player-score-card strong,
.player-result-score {
  font-family: Bahnschrift, "Segoe UI", sans-serif;
}

.score-pill span:last-child {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}

.player-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.player-score-card {
  padding: 14px;
  display: grid;
  gap: 8px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.player-score-card span,
.player-score-card small {
  color: var(--text-soft);
}

.player-score-card strong {
  font-size: 1.48rem;
  color: #fff7e5;
}

.player-score-card.is-active {
  border-color: rgba(255, 218, 150, 0.34);
  box-shadow: 0 14px 26px rgba(213, 161, 60, 0.12);
}

.player-score-card.is-leading {
  background:
    linear-gradient(180deg, rgba(255, 226, 162, 0.14), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.04);
}

.progress-shell {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.progress-copy {
  display: grid;
  gap: 6px;
}

.progress-title {
  margin: 0;
  color: #fff3de;
  font-size: 1rem;
  font-weight: 700;
}

.timer-shell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-track {
  width: 180px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold), var(--terracotta), var(--crimson));
  transform-origin: left center;
}

.timer-shell.is-untimed .timer-track {
  opacity: 0.34;
}

.prep-card {
  padding: 22px;
  border-radius: 26px;
  display: grid;
  gap: 18px;
}

.prep-copy h2 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.prep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.question-card,
.context-card,
.results-panel {
  padding: 20px;
  border-radius: 26px;
  display: grid;
  gap: 16px;
}

.question-header h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.12;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.choice-button {
  position: relative;
  appearance: none;
  min-height: 110px;
  padding: 18px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.choice-button::before {
  content: attr(data-keycap);
  position: absolute;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.choice-button span {
  display: block;
  max-width: 24ch;
  font-size: 1rem;
  line-height: 1.45;
}

.choice-button.is-correct {
  border-color: rgba(79, 210, 157, 0.55);
  background:
    linear-gradient(180deg, rgba(68, 181, 166, 0.28), rgba(52, 160, 125, 0.14)),
    rgba(15, 54, 46, 0.78);
}

.choice-button.is-wrong {
  border-color: rgba(223, 91, 75, 0.5);
  background:
    linear-gradient(180deg, rgba(217, 91, 78, 0.2), rgba(123, 35, 32, 0.18)),
    rgba(44, 17, 19, 0.78);
}

.choice-button.is-disabled {
  cursor: default;
}

.feedback-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 244, 210, 0.08), rgba(255, 244, 210, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.feedback-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.feedback-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.feedback-score {
  color: var(--gold-soft);
  font-weight: 700;
}

.feedback-card h3 {
  margin: 0;
  font-size: 1.36rem;
  color: #fff7e7;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.feedback-anchor {
  font-size: 0.82rem;
}

.context-card {
  align-content: start;
}

.context-block {
  display: grid;
  gap: 10px;
}

.context-card h3 {
  font-size: 1.45rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-card,
.metric-card {
  padding: 14px;
  min-height: 102px;
}

.status-card span,
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-card strong,
.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.32rem;
  color: #fff6e4;
}

.results-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.5fr);
  gap: 20px;
  align-items: center;
}

.results-copy h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.results-actions {
  margin-top: 18px;
}

.score-orb {
  justify-self: end;
  width: min(300px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border: 1px solid rgba(255, 244, 210, 0.2);
  background:
    radial-gradient(circle at 40% 32%, rgba(255, 244, 210, 0.18), rgba(255, 244, 210, 0) 24%),
    repeating-radial-gradient(circle at center, rgba(255, 244, 210, 0.08) 0 3px, transparent 3px 14px),
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 237, 0.04), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.orb-label,
.orb-note {
  display: block;
}

.orb-label {
  color: var(--text-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.score-orb strong {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  color: #fff7e8;
}

.orb-note {
  color: var(--gold-soft);
  font-weight: 700;
}

.results-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.results-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-results,
.chapter-breakdown {
  display: grid;
  gap: 12px;
}

.player-result-row,
.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.player-result-row {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.08), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.03);
}

.player-result-row.is-winner {
  border-color: rgba(255, 218, 150, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 226, 162, 0.14), rgba(255, 249, 237, 0.02)),
    rgba(255, 249, 237, 0.04);
}

.player-result-copy,
.breakdown-copy {
  display: grid;
  gap: 6px;
}

.player-result-copy strong,
.breakdown-copy strong {
  color: #fff3df;
}

.player-result-copy span,
.breakdown-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.player-result-score,
.breakdown-score {
  color: #fff4df;
  font-weight: 700;
}

.breakdown-track {
  position: relative;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.breakdown-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--chapter-accent, var(--jade)));
}

.archive-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-card {
  padding: 20px;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 26px, 0) scale(1.08);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .hero,
  .question-layout,
  .results-hero,
  .archive-grid,
  .library-hero {
    grid-template-columns: 1fr;
  }

  .score-orb {
    justify-self: start;
  }
}

@media (max-width: 920px) {
  .chapter-grid,
  .library-grid,
  .choice-grid,
  .results-metrics,
  .status-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 16px, 1440px);
    padding-top: 14px;
  }

  .hero,
  .chapter-stage,
  .library-stage,
  .game-stage,
  .results-stage,
  .archive-stage {
    padding: 18px;
    border-radius: 26px;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 8.6vw, 2.8rem);
  }

  .hero-actions,
  .results-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .option-chip,
  .tab-button {
    min-height: 40px;
  }

  .player-strip {
    grid-template-columns: 1fr;
  }

  .timer-track {
    width: 132px;
  }

  .prep-meta {
    align-items: stretch;
  }
}
