/*
  QUIZ NIGHT 100 — design system, v3

  v2 kept slipping into the same generic "AI app" grammar despite good
  colour/type choices: every unit of content (category, answer, breakdown
  row) was the same stamped-out atom — rounded card, 1px border, icon in a
  colour-tinted circle, drop shadow — repeated five times in a row, plus a
  glow blob behind big numbers and glossy gradient buttons. This pass kills
  that specific vocabulary:
    - No icon-in-a-circle badges anywhere.
    - No repeated card grids for lists — categories, answers, and the score
      breakdown are all set as a single continuous RULED LEDGER (numerals
      + rules, like a fight card or a theatre programme), not five
      identical boxes.
    - No radial "glow" behind big numbers — "100" and the score reveals are
      HOLLOW/outlined numerals instead, like stage signage.
    - No gradient buttons — flat fill, one flat colour, done.
    - A visible film-grain texture on the backdrop instead of relying on
      glow/blur for atmosphere.
    - border-radius and shadow are reserved for the few things that are
      genuinely elevated "stage" surfaces (the question panel, the score
      stage, the confirm dialog) — not stamped on every button and pill.
*/

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/quiznight100/assets/fonts/fraunces-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/quiznight100/assets/fonts/fraunces-italic-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/quiznight100/assets/fonts/schibstedgrotesk-variable.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Stage */
  --ink: #0b0906;
  --stage: #16120d;
  --stage-2: #201810;
  --stage-3: #2a2014;
  --parchment: #f5ecd8;
  --muted: rgba(245, 236, 216, 0.68);
  --faint: rgba(245, 236, 216, 0.42);
  --line: rgba(216, 164, 65, 0.24);
  --line-strong: rgba(216, 164, 65, 0.5);

  /* Brass */
  --brass: #d8a441;
  --brass-bright: #f0c368;
  --brass-dim: #9d793a;

  /* Feedback (never the only signal — always paired with an icon/label) */
  --correct: #5fb87a;
  --correct-bg: rgba(95, 184, 122, 0.14);
  --wrong: #e2604f;
  --wrong-bg: rgba(226, 96, 79, 0.14);

  /* Category identity */
  --cat-general: #3ddbc9;
  --cat-history: #c98a4b;
  --cat-potter: #b98bdb;
  --cat-biology: #a4cc4a;
  --cat-gaming: #5ba3e8;
  --accent: var(--brass);

  /* Type */
  --display: "Fraunces", Georgia, serif;
  --body: "Schibsted Grotesk", "Avenir Next", system-ui, sans-serif;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 10px;

  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.46);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.56);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --fast: 120ms;
  --base: 200ms;

  --focus: #f5ecd8;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--parchment);
  font-family: var(--body);
  background: var(--ink);
  overflow-x: hidden;
}

button {
  min-height: 44px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: -999px;
  z-index: 30;
  background: var(--parchment);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 12px;
}

[hidden] {
  display: none !important;
}

/* ---------- Stage backdrop: dark + grain, no glow ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--ink);
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.96 0 0 0 0 0.91 0 0 0 0 0.79 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scene-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(245, 236, 216, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 236, 216, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 78%);
}

/* ---------- Shell / topbar ---------- */

.shell {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(20px, 3.5vw, 44px);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--parchment);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--brass-dim);
  border-radius: 50%;
  color: var(--brass);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.status-rail span {
  min-width: 0;
  padding: 4px 14px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-rail span:first-child {
  border-left: 0;
  padding-left: 0;
}

.status-rail b {
  display: block;
  color: var(--parchment);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.reset-top {
  order: 2;
  flex: 0 0 auto;
  padding: 8px 2px;
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.reset-top:hover {
  color: var(--brass-bright);
  border-color: var(--brass-bright);
}

@media (min-width: 700px) {
  .status-rail {
    order: 2;
    flex: 0 1 auto;
    width: min(420px, 44vw);
  }

  .reset-top {
    order: 3;
  }
}

.stage {
  display: grid;
  align-items: center;
  min-height: 0;
}

.view {
  width: 100%;
  animation: view-in var(--base) var(--ease) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--brass);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

h1,
h2,
p {
  margin: 0;
}

em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 450;
}

/* ---------- Hero ---------- */

.hero-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}

.hero-copy {
  max-width: 720px;
  padding-top: clamp(8px, 4vh, 40px);
}

.hero-title {
  font-family: var(--display);
  line-height: 0.92;
}

.hero-title-word {
  display: block;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-title-number {
  position: relative;
  display: inline-block;
  margin-top: 6px;
  padding-bottom: 14px;
  font-size: clamp(4.8rem, 13vw, 9.5rem);
  font-weight: 700;
  color: rgba(240, 195, 104, 0.14);
  -webkit-text-stroke: 1.5px var(--brass-bright);
  border-bottom: 3px double var(--line-strong);
}

.lede {
  max-width: 620px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  line-height: 1.55;
}

.hero-stats {
  margin: 20px 0 30px;
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-stats i {
  margin: 0 10px;
  color: var(--brass);
  font-style: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ---------- Buttons: flat fill, no gradient, no glossy highlight ---------- */

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.primary-button {
  background: var(--brass);
  border-color: var(--brass);
  color: #170f04;
}

.secondary-button {
  background: transparent;
  color: var(--parchment);
  border-color: var(--line-strong);
}

.danger-button {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #1c0a08;
}

.primary-button:hover:not(:disabled) {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  transform: translateY(-1px);
}

.danger-button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--brass);
  color: var(--brass-bright);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  transition-duration: 70ms;
}

.primary-button:disabled {
  opacity: 0.4;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ---------- Lineup: the running order, a ruled ledger not a card grid ---------- */

.lineup {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.lineup-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.lineup-row:hover {
  padding-left: 10px;
  border-color: var(--line-strong);
}

.lineup-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 0.8;
  color: rgba(245, 236, 216, 0.06);
  -webkit-text-stroke: 1.4px var(--row-accent, var(--brass));
}

.lineup-body h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
}

.lineup-body h2 .mark {
  color: var(--row-accent, var(--brass));
  flex: 0 0 auto;
}

.lineup-body h2 .mark svg {
  display: block;
  width: 17px;
  height: 17px;
}

.lineup-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--row-accent, var(--brass));
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.lineup-body p {
  margin-top: 6px;
  max-width: 56ch;
  color: var(--muted);
  font-family: var(--display);
  font-style: italic;
  font-weight: 420;
  font-size: 0.96rem;
  line-height: 1.5;
}

[data-cat="showtime"] {
  --row-accent: var(--cat-general);
}

[data-cat="archive"] {
  --row-accent: var(--cat-history);
}

[data-cat="lantern"] {
  --row-accent: var(--cat-potter);
}

[data-cat="biology"] {
  --row-accent: var(--cat-biology);
}

[data-cat="arcade"] {
  --row-accent: var(--cat-gaming);
}

/* Question-view theme accent, driven the same way */
[data-theme="showtime"] {
  --accent: var(--cat-general);
}

[data-theme="archive"] {
  --accent: var(--cat-history);
}

[data-theme="lantern"] {
  --accent: var(--cat-potter);
}

[data-theme="biology"] {
  --accent: var(--cat-biology);
}

[data-theme="arcade"] {
  --accent: var(--cat-gaming);
}

/* ---------- Question screen ---------- */

.question-view {
  display: flex;
  justify-content: center;
}

.question-panel {
  position: relative;
  width: min(100%, 880px);
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--stage);
  box-shadow: var(--shadow-lg);
}

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

.round-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.round-chip svg {
  width: 15px;
  height: 15px;
}

.question-count {
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.round-ticks {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.round-ticks li {
  position: relative;
  height: 3px;
  background: rgba(245, 236, 216, 0.14);
}

.round-ticks li.is-current {
  background: var(--accent);
}

.round-ticks li.is-correct {
  background: var(--correct);
}

.round-ticks li.is-wrong {
  background: var(--wrong);
}

.round-ticks li.is-current::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.question-text {
  margin: clamp(22px, 4vw, 34px) 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.14;
  text-wrap: balance;
}

/* Answer ledger: ruled rows with an outline letterform, not badge-in-a-box */

.answer-grid {
  display: block;
  border-top: 1px solid var(--line);
}

.answer-card {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: transparent;
  padding: 14px 10px 14px 14px;
  text-align: left;
  color: var(--parchment);
  font-size: 1.02rem;
  font-weight: 600;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), padding-left var(--fast) var(--ease);
}

@media (hover: hover) {
  .answer-card:hover:not(:disabled) {
    background: rgba(245, 236, 216, 0.035);
    border-left-color: var(--accent);
    padding-left: 18px;
  }
}

.answer-card:active:not(:disabled) {
  background: rgba(245, 236, 216, 0.06);
}

.answer-card.is-selected {
  border-left-color: var(--accent);
  background: rgba(245, 236, 216, 0.045);
  padding-left: 18px;
}

.answer-letter {
  flex: 0 0 auto;
  width: 30px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--faint);
  transition: color var(--fast) var(--ease), -webkit-text-stroke-color var(--fast) var(--ease);
}

.answer-card.is-selected .answer-letter {
  -webkit-text-stroke-color: var(--accent);
}

.answer-text {
  flex: 1 1 auto;
}

.answer-result {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.answer-result svg {
  width: 17px;
  height: 17px;
}

.answer-card.is-correct {
  border-left-color: var(--correct);
  background: var(--correct-bg);
}

.answer-card.is-correct .answer-letter {
  color: var(--correct);
  -webkit-text-stroke-color: var(--correct);
}

.answer-card.is-correct .answer-result {
  opacity: 1;
  transform: scale(1);
  color: var(--correct);
}

.answer-card.is-wrong {
  border-left-color: var(--wrong);
  background: var(--wrong-bg);
}

.answer-card.is-wrong .answer-letter {
  color: var(--wrong);
  -webkit-text-stroke-color: var(--wrong);
}

.answer-card.is-wrong .answer-result {
  opacity: 1;
  transform: scale(1);
  color: var(--wrong);
}

.answer-card:disabled {
  cursor: default;
}

.question-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(18px, 3vw, 26px);
}

.mini-score {
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.feedback {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  padding: 16px 4px 4px;
  border-top: 1px solid var(--line-strong);
  animation: view-in 220ms var(--ease) both;
}

.feedback-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--correct);
}

.feedback.wrong .feedback-icon {
  color: var(--wrong);
}

.feedback-icon svg {
  width: 100%;
  height: 100%;
}

.feedback strong {
  display: block;
  color: var(--correct);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.feedback.wrong strong {
  color: var(--wrong);
}

.feedback p {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--display);
  font-style: italic;
  font-weight: 420;
  line-height: 1.5;
  font-size: 0.98rem;
}

/* ---------- Score reveal (round-complete + final) ---------- */

.score-view,
.final-view {
  display: flex;
  justify-content: center;
}

.score-stage,
.final-stage {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(28px, 6vw, 56px) clamp(22px, 6vw, 56px);
  text-align: center;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent, var(--brass));
  border-radius: var(--radius-lg);
  background: var(--stage);
  box-shadow: var(--shadow-lg);
}

.score-stage .kicker,
.final-stage .kicker {
  justify-content: center;
}

.score-stage h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5.6vw, 3.4rem);
}

.final-stage h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: -0.01em;
}

.score-reveal,
.final-reveal {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin: clamp(20px, 4vw, 34px) 0 4px;
  padding-bottom: 16px;
  border-bottom: 3px double var(--line-strong);
}

.score-number {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.6rem, 15vw, 8.5rem);
  line-height: 0.85;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}

.final-number {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(5.2rem, 18vw, 10rem);
  line-height: 0.85;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}

.score-of,
.final-of {
  padding-bottom: 0.6em;
  color: var(--faint);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
}

.score-caption {
  margin-top: 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 30px;
  color: var(--muted);
  font-size: 0.92rem;
}

.total-row b {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.next-round {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.next-round .lineup-eyebrow {
  color: var(--faint);
}

.next-round .lineup-body h2 {
  font-size: 1.3rem;
}

.performance-title {
  margin-top: 4px;
  color: var(--brass-bright);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

/* Breakdown: same ruled-ledger language, tabular scores, thin underline bar */

.breakdown {
  margin: 30px 0;
  padding: 0;
  list-style: none;
  text-align: left;
  border-top: 1px solid var(--line);
}

.breakdown li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.breakdown-mark {
  width: 16px;
  height: 16px;
  color: var(--row-accent, var(--brass));
}

.breakdown-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.breakdown-name {
  font-weight: 700;
  font-size: 0.94rem;
}

.breakdown-bar {
  grid-column: 1 / -1;
  display: block;
  height: 2px;
  margin-top: 10px;
  background: rgba(245, 236, 216, 0.1);
}

.breakdown-bar span {
  display: block;
  height: 100%;
  background: var(--row-accent, var(--brass));
  transition: width 600ms var(--ease);
}

.breakdown-score {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--parchment);
}

.share-status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--brass-bright);
  font-size: 0.9rem;
}

/* ---------- Confirm dialog ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 5, 3, 0.78);
  animation: view-in 160ms var(--ease) both;
}

.confirm-card {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--stage);
  box-shadow: var(--shadow-lg);
}

.confirm-card h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
}

.confirm-card p {
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    gap: 18px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .brand span:last-child {
    display: none;
  }

  .status-rail span {
    padding: 4px 8px;
    font-size: 0.58rem;
  }

  .status-rail span:first-child {
    padding-left: 0;
  }

  .status-rail b {
    font-size: 1rem;
  }

  .question-panel {
    padding: 18px;
    border-radius: var(--radius-md);
  }

  .round-ticks {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
  }

  .answer-card {
    min-height: 60px;
    padding: 12px 6px 12px 10px;
    gap: 14px;
  }

  .answer-letter {
    width: 24px;
    font-size: 1.25rem;
  }

  .lineup-row {
    grid-template-columns: auto 1fr;
    column-gap: 14px;
  }

  .lineup-num {
    font-size: 2.1rem;
  }
}

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