@font-face { font-family: "Bauhaus Desk Display"; src: url("/fonts/BauhausDeskDisplay-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

:root {
  --bg: #030B30;
  --ink: #0A1230;
  --text: #FFFFFF;
  --text-soft: #D9E8FF;
  --muted: #A9B8D6;
  --accent: #70CFFF;
  --mint: #9FF0E0;
  --heat-yellow: #FFD599;
  --heat-orange: #FF6F2E;
  --line: rgba(255, 255, 255, .14);
  --display: "Bauhaus Desk Display", "IBM Plex Sans", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

/* The stage keeps 16:9 and fits inside the viewport either way round. It is
   also the container everything on it is sized against (cqw, cqh), so the
   cards, the callout and the buttons scale with the game, in a window or in
   fullscreen. */
.stage {
  position: relative;
  width: min(100vw, calc(100svh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  container-type: size;
}
#game { display: block; width: 100%; height: 100%; outline: none; }

/* ---------- The start page ----------
   The Temp scanner's world, so the game opens in the same place the campaign
   does: the Stay Cool plate, a sheen on its bubble, lava breathing at the
   foot, embers rising. Three numbers drive it, where the scanner had one:
   --heat (0 cool to 1 hot) burns the blue sky through to ember, --lava (0 to
   1) is how far the melt has climbed, and --game (0 to 1) is how far the
   photograph has turned into the game's own world. The intro turns them. */
.start {
  --heat: 0; --lava: .42; --game: 0;
  position: fixed; inset: 0; z-index: 20; overflow: hidden; background: #0A1A5C;
  transition: opacity .45s ease;
}
.start.is-leaving { opacity: 0; pointer-events: none; transition-duration: .8s; }
.world { position: absolute; inset: 0; overflow: hidden; pointer-events: none; container-type: size; --plate-w: max(100cqw, 100cqh * 1100 / 1145); --plate-x: .62; }
.world-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 100%; filter: saturate(calc(1 - var(--heat) * .35)) brightness(calc(1 - var(--heat) * .25)); transition: filter 1.4s ease; }
/* A light sheen drifting over the glass bubble in the plate. It mirrors the plate's object-fit: cover
   maths (1100x1145 image, bubble centre 63.95% / 76.77%, diameter 28.6% of the image width). */
.world-sheen { position: absolute; width: calc(var(--plate-w) * .286); aspect-ratio: 1; border-radius: 50%; overflow: hidden; left: calc((100cqw - var(--plate-w)) * var(--plate-x) + var(--plate-w) * .6395); top: calc(100cqh - var(--plate-w) * .2418); translate: -50% -50%; opacity: calc(1 - var(--heat) * .6); transition: opacity 1.4s ease; }
.world-sheen::before, .world-sheen::after { content: ''; position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.world-sheen::before { inset: 0; background: radial-gradient(30% 9% at 50% 13%, rgba(255, 255, 255, .45), rgba(200, 235, 255, .18) 50%, transparent); filter: blur(3px); animation: sheen 9s ease-in-out infinite alternate; }
.world-sheen::after { inset: 58% 10% 10% 54%; background: radial-gradient(closest-side, rgba(190, 235, 255, .32), transparent); filter: blur(5px); animation: sheen-low 11s ease-in-out infinite alternate; }
@keyframes sheen { from { rotate: -60deg; opacity: .5; } 50% { opacity: 1; } to { rotate: 50deg; opacity: .5; } }
@keyframes sheen-low { from { translate: 18% 12%; opacity: .3; } to { translate: -22% -14%; opacity: 1; } }
/* The game's world, drawn by the game's own art code, over the photograph. */
.world-game { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: var(--game); transition: opacity 1.7s ease; }
/* The cool blue sky burns through to ember red and orange. */
.world-heat { position: absolute; inset: 0; background: linear-gradient(180deg, #1A0610 0%, #5C0F14 38%, #C2320F 72%, #FF6F2E 100%); mix-blend-mode: color; opacity: calc(var(--heat) * .95); transition: opacity 1.4s ease; }
.world-glow { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 110%, rgba(255, 96, 30, .85), rgba(255, 22, 41, .35) 45%, transparent 75%); mix-blend-mode: screen; opacity: calc(var(--heat) * var(--heat) * 1.1); transition: opacity 1.4s ease; }
.world-simmer { position: absolute; inset: 0; background: radial-gradient(90% 45% at 50% 105%, rgba(255, 96, 30, .7), rgba(255, 22, 41, .25) 45%, transparent 75%); mix-blend-mode: screen; animation: simmer 4.5s ease-in-out infinite alternate; }
.world-lava { position: absolute; left: -6%; right: -6%; bottom: -2%; height: 55svh; transform: translateY(calc((1 - var(--lava)) * 100%)); transition: transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.world-lava img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); animation: breathe 5s ease-in-out infinite alternate; }
.world-embers i { position: absolute; bottom: 2%; left: var(--x); width: 3px; height: 3px; border-radius: 50%; background: #FFB77C; box-shadow: 0 0 8px #FF662A; opacity: 0; animation: ember 6s linear var(--d) infinite; }
.world-embers i:nth-child(1) { --x: 6%; --d: 0s; } .world-embers i:nth-child(2) { --x: 14%; --d: -1.5s; }
.world-embers i:nth-child(3) { --x: 23%; --d: -3s; } .world-embers i:nth-child(4) { --x: 31%; --d: -4.5s; }
.world-embers i:nth-child(5) { --x: 40%; --d: -2s; } .world-embers i:nth-child(6) { --x: 48%; --d: -5s; }
.world-embers i:nth-child(7) { --x: 57%; --d: -.8s; } .world-embers i:nth-child(8) { --x: 65%; --d: -3.6s; }
.world-embers i:nth-child(9) { --x: 73%; --d: -2.7s; } .world-embers i:nth-child(10) { --x: 81%; --d: -4.1s; }
.world-embers i:nth-child(11) { --x: 89%; --d: -1.1s; } .world-embers i:nth-child(12) { --x: 96%; --d: -5.4s; }
/* A simmer on the start page: half the embers. The intro lights the rest. */
.start[data-screen="start"] .world-embers i:nth-child(odd) { visibility: hidden; }
@keyframes simmer { from { opacity: .45; } to { opacity: 1; } }
@keyframes breathe { from { translate: 0 0; } to { translate: 0 -6%; } }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(-30px, -70svh); opacity: 0; } }

.start-scroll { position: relative; z-index: 1; height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; transition: opacity .5s ease; }
.start[data-screen="intro"] .start-scroll { opacity: 0; pointer-events: none; }
.start-header { display: flex; align-items: center; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 16px 10px; }
.start-logo { display: block; width: 124px; height: auto; margin-right: auto; filter: brightness(0) invert(1); }
.start-tag { font: 700 13px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.start-header .fullscreen { position: static; flex: none; width: 40px; border-radius: 10px; }
.start-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 16px max(16px, env(safe-area-inset-bottom)); }
/* The panel is the same card as in the game, sized against the window (it is
   not on the stage): wide and landscape across the screen, and one column on
   a phone held upright. */
.card.card--start { grid-template-columns: minmax(0, 1fr); width: min(100%, 35em); max-height: none; overflow: visible; padding: 1.7em 1.5em 1.4em; font-size: clamp(14px, .45vw + 10px, 17px); }
.card--start .card-col + .card-col { margin: 1.2em 0 0; padding: 0; border-left: 0; }
.challenge { margin: .7em 0 0; font: 800 1.12em/1.15 var(--display); color: var(--accent); text-shadow: 0 0 1.2em rgba(112, 207, 255, .45); }
.card--start .legend { margin-top: 1.1em; }
.card--start .pick { margin-bottom: 1em; }
.card--start .pick-row button { aspect-ratio: 2 / 1; }
.card--start .panes > .legend, .card--start .panes > .prizes { align-self: start; }
.start-share { width: 100%; margin-top: .7em; min-height: 2.9em; font-size: .95em; }
/* The panes get room of their own, so the board shows more than three rows
   and the prize tiles are not squeezed. */
.card--start .panes { min-height: 12.5em; }

/* ---------- The intro ----------
   A line held, then a crawl, with Skip through to the countdown at any
   point. */
.intro { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: hidden; padding: 24px; text-align: center; text-shadow: 0 2px 24px rgba(3, 8, 30, .8), 0 0 3px rgba(3, 8, 30, .7); transition: opacity .35s ease; }
.intro.is-leaving { opacity: 0; pointer-events: none; }
/* The words have been read: they clear for what happens next. Skip stays. */
.intro .intro-hold, .intro .crawl { transition: opacity .45s ease; }
.intro.is-done .intro-hold, .intro.is-done .crawl { opacity: 0; }
.intro-hold { display: none; max-width: 16em; margin: 0; font: 800 clamp(30px, 5.4vw, 68px)/1.06 var(--display); letter-spacing: -.01em; }
.intro.is-holding .intro-hold { display: block; animation: hold 1.9s ease both; }
@keyframes hold { 0% { opacity: 0; transform: scale(.96); } 22% { opacity: 1; transform: none; } 84% { opacity: 1; } 100% { opacity: 0; } }
.crawl { position: absolute; inset: 0; display: none; -webkit-mask-image: linear-gradient(transparent 4%, #000 24%, #000 72%, transparent 96%); mask-image: linear-gradient(transparent 4%, #000 24%, #000 72%, transparent 96%); }
.intro.is-playing .crawl { display: block; }
.crawl-inner { position: absolute; left: 50%; top: 0; width: min(88vw, 22em); font: 800 clamp(22px, 3.4vw, 42px)/1.22 var(--display); transform: translate(-50%, 100svh); }
/* It stops with the last line resting in the middle of the screen. */
.intro.is-playing .crawl-inner { animation: crawl var(--crawl, 8s) linear forwards; }
@keyframes crawl { from { transform: translate(-50%, 100svh); } to { transform: translate(-50%, calc(56svh - 100%)); } }
.crawl-inner p { margin: 0 0 13svh; }
.crawl-inner .crawl-final { margin: 0; font-size: 1.4em; line-height: 1.04; color: #DDF3FF; text-shadow: 0 0 40px rgba(112, 207, 255, .9), 0 2px 24px rgba(3, 8, 30, .7); }
.intro-skip { position: absolute; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); min-height: 44px; padding: 10px 22px; font-size: 15px; text-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* Reduced motion: the lines stand still, one block, and are read there. */
.intro.is-still .crawl { display: grid; place-items: center; -webkit-mask-image: none; mask-image: none; }
.intro.is-still .crawl-inner { position: static; transform: none; animation: none; }
.intro.is-still .crawl-inner p { margin: 0 0 1.1em; }
.intro.is-still .crawl-inner .crawl-final { margin: 0; }

/* The practitioner in the photograph becomes the one in the game. It is
   drawn on a canvas laid exactly over the bubble in the plate (intro.js). At
   first it sits in the world, behind the lava, which creeps up over its foot
   as the change happens. Then it pops out: lifted in front of everything in
   the start page but the words, ready to fly into the zone. */
.morph { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.morph canvas { display: block; width: 100%; height: 100%; }
.morph.is-on { opacity: 1; transition: opacity .2s ease; }
.morph.is-out { position: fixed; z-index: 21; }
.morph.is-popping { animation: morph-pop .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes morph-pop { 0% { scale: 1; translate: 0 0; } 32% { scale: 1.16; translate: 0 -3.5%; } 66% { scale: .97; translate: 0 0; } 100% { scale: 1; translate: 0 0; } }
.morph.is-flying { transition: transform .9s cubic-bezier(.6, 0, .2, 1), opacity .2s ease .75s; opacity: 0; animation: none; }

@media (min-width: 900px) {
  .start-header { padding: 22px 40px; }
  .start-logo { width: 150px; }
  .start-main { padding: 0 40px 24px; }
  /* The plate is widened and pinned left, so its bubble sits to the right behind the glass. */
  .world-plate { inset: auto auto 0 0; width: 125%; object-position: left bottom; }
  .world { --plate-w: max(125cqw, 100cqh * 1100 / 1145); --plate-x: 0; }
  /* Landscape, in two columns, and given the screen: the game's own card,
     sized so it fills most of the window whichever way the window is tight. */
  .card.card--start { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; width: min(95vw, 70em); padding: 2.3em 2.6em; font-size: clamp(12px, min(1.5vw, 2.45svh), 30px); }
  /* Against the window's height: the card takes most of it, and the panes the rest of the column. */
  .card--start { min-height: min(calc(100svh - 150px), 46em); }
  .card--start > .card-col:first-child { display: flex; flex-direction: column; align-self: stretch; justify-content: center; }
  .card--start .panes { flex: 1; min-height: 11em; max-height: 17em; }
  .card--start .card-col + .card-col { margin: 0 0 0 2.2em; padding: 0 0 0 2.2em; border-left: 1px solid var(--line); }
  .card--start .pick-row button { aspect-ratio: 1; }
  .card--start h1 { font-size: 4em; }
}


/* ---------- The countdown ----------
   Over the zone, before it starts: its token, its name, how to get through
   it, then the count. */
.countdown { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; text-align: center; padding: 4cqw; pointer-events: none;
  background: radial-gradient(70% 70% at 50% 45%, rgba(5, 10, 30, .62), rgba(5, 10, 30, .3)); }
.countdown-zone { align-self: end; display: grid; justify-items: center; animation: card-in .45s cubic-bezier(.2, .8, .2, 1); }
.countdown .icon { width: 9cqw; height: 9cqw; }
.countdown-kicker { margin: .4cqw 0 0; font: 600 1.25cqw var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.countdown-name { margin: .3cqw 0 0; font: 800 4.2cqw/1.02 var(--display); text-transform: uppercase; text-shadow: 0 .2cqw 0 rgba(3, 11, 48, .8), 0 0 2cqw rgba(3, 11, 48, .9); }
.countdown-hint { margin: 1cqw 0 0; padding: .45cqw 1.4cqw; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(3, 12, 48, .72); font: 600 1.45cqw/1.3 var(--body); color: var(--text-soft); }
.countdown-num { grid-row: 2; margin: 1.4cqw 0 0; min-height: 10cqw; font: 800 10cqw/1 var(--display); color: #fff; text-shadow: 0 0 3cqw rgba(112, 207, 255, .9), 0 .3cqw 0 rgba(3, 11, 48, .8); }
.countdown-num.is-tick { animation: tick .62s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes tick { 0% { opacity: 0; transform: scale(1.7); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: .2; transform: scale(.92); } }

/* ---------- Overlay cards ----------
   The liquid glass of the Temp scanner's panel: mostly clear, so the world
   stays visible behind it, with blur and a slight dim to keep the copy
   readable. Landscape, in two columns, like the game itself. Every size
   inside a card is in em, and the card's own font size follows the stage. */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 2cqw;
  background: radial-gradient(90% 90% at 50% 50%, rgba(5, 10, 30, .18), rgba(5, 10, 30, .52));
}
.card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  width: min(92cqw, 64em);
  max-height: 92cqh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2.1em 2.4em;
  border-radius: 1.4em;
  font-size: clamp(10px, 1.32cqw, 20px);
  line-height: 1.5;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .05) 38%, rgba(8, 14, 40, .22) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(170%) brightness(.64);
  backdrop-filter: blur(26px) saturate(170%) brightness(.64);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(255, 255, 255, .05), inset 0 0 40px rgba(255, 255, 255, .06),
    0 24px 60px rgba(0, 0, 0, .3), 0 0 70px rgba(112, 207, 255, .16);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
  animation: card-in .45s cubic-bezier(.2, .8, .2, 1);
}
/* Specular sheen across the top of the glass. */
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 15% -10%, rgba(255, 255, 255, .22), transparent 55%), radial-gradient(80% 40% at 100% 110%, rgba(112, 207, 255, .25), transparent 70%);
}
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card-col { min-width: 0; }
.card-col + .card-col { margin-left: 2.2em; padding-left: 2.2em; border-left: 1px solid var(--line); }

.logo { display: block; width: 8.4em; height: auto; margin: 0 0 1.1em; filter: brightness(0) invert(1); }
.eyebrow {
  display: block; width: fit-content; margin: 0 0 1em; padding: .42em 1em;
  border: 1px solid rgba(96, 144, 255, .7); border-radius: 999px; background: rgba(32, 96, 248, .6);
  font-size: .75em; font-weight: 600; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase;
}
h1, h2 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.04; }
h1 { font-size: 3.5em; }
h2 { font-size: 2.5em; }
.lede { margin: .9em 0 0; font-size: 1.1em; color: var(--text-soft); }
.keys { margin: 1em 0 0; color: var(--muted); font-size: .85em; line-height: 2; text-align: center; }
/* The terms and privacy links, quiet, under the start button and the replay button. They open in a new tab, so a run or a score card is not lost. */
.legal-links { margin: .6em 0 0; color: var(--muted); font-size: .78em; text-align: center; }
.legal-links a { color: var(--text-soft); text-underline-offset: .2em; }
.legal-links a:hover { color: var(--accent); }
kbd { font: 600 .9em var(--body); padding: .1em .5em; border: 1px solid rgba(255, 255, 255, .3); border-radius: .4em; color: var(--text); background: rgba(255, 255, 255, .08); }

/* Icons are drawn by the game's own art code, so a card shows the thing the
   player will see in play. */
.icon { display: block; flex: none; width: 3em; height: 3em; }
.zone-head { display: flex; align-items: center; gap: 1.25em; }
.zone-head .icon { width: 7em; height: 7em; margin: -1em; }
.zone-name { margin: .35em 0 0; font: 600 .95em var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.zone-head--small { gap: .7em; margin-bottom: .9em; }
.zone-head--small .icon { width: 3.8em; height: 3.8em; margin: -.6em; }
.zone-head--small .eyebrow { margin: 0; }

/* A pair of pill tabs over panes that share one space (PLAN.md, interface
   standards): the first pane sets the size and stays laid out while hidden,
   so the card never changes shape when the tab does. */
.tabs { display: flex; gap: .3em; width: fit-content; max-width: 100%; margin: 1.1em 0 0; padding: .3em; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.tabs [role="tab"] {
  padding: .45em 1.15em; border-radius: 999px; border: 0; background: none;
  color: var(--muted); font-size: .86em; font-weight: 600; letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.tabs [role="tab"]:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
/* The chosen tab: white, with the accent ring, as the scanner's glass buttons. */
.tabs [role="tab"][aria-selected="true"] { background: #fff; color: var(--ink); text-shadow: none; box-shadow: 0 0 0 2px var(--accent), 0 0 1.2em rgba(112, 207, 255, .45); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.panes { display: grid; }
.panes > .pane { grid-area: 1 / 1; }
.panes > .pane:not(.is-active) { visibility: hidden; }
.tabs + .panes > .legend { margin-top: .8em; }
/* Prizes and How to play share the space: whichever is taller sets it, so
   the card does not change shape between them. The board fits inside. */
.prizes { margin-top: .8em; }
/* The prizes, as four tiles that lead with the money. First place glows hot,
   the draw glows cool, and the small print sits in the last tile. */
.prize-list { display: grid; grid-template-columns: 1fr 1fr; gap: .55em; margin: 0; padding: 0; list-style: none; }
.prize-tile {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65em; min-width: 0; padding: .55em .8em; border-radius: .8em;
  background: linear-gradient(135deg, rgba(112, 207, 255, .22), rgba(255, 255, 255, .05) 60%); border: 1px solid rgba(112, 207, 255, .38);
  font-size: .82em; line-height: 1.25; color: var(--text-soft);
}
.prize-tile::after { content: ''; position: absolute; right: -1.6em; top: -1.6em; width: 4.6em; height: 4.6em; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); pointer-events: none; }
.prize-amount { font: 800 1.7em/1 var(--display); color: #fff; letter-spacing: -.01em; white-space: nowrap; text-shadow: 0 0 .6em rgba(112, 207, 255, .7); }
.prize-tile--top { background: linear-gradient(135deg, rgba(255, 111, 46, .55), rgba(255, 213, 153, .16) 55%, rgba(255, 255, 255, .04)); border-color: rgba(255, 213, 153, .75); box-shadow: 0 0 1.4em rgba(255, 111, 46, .4), inset 0 1px 0 rgba(255, 255, 255, .25); }
.prize-tile--top .prize-amount { color: #FFF4E0; text-shadow: 0 0 .5em rgba(255, 111, 46, .95), 0 0 1.2em rgba(255, 213, 153, .6); }
.prize-tile--draw { background: linear-gradient(135deg, rgba(159, 240, 224, .34), rgba(112, 207, 255, .1) 60%); border-color: rgba(159, 240, 224, .62); box-shadow: 0 0 1.2em rgba(159, 240, 224, .25); }
.prize-tile--draw .prize-amount { text-shadow: 0 0 .6em rgba(159, 240, 224, .85); }
.prize-tile--info { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.prize-tile--info .prize-amount { font-size: 1.2em; text-shadow: none; }
@media (max-width: 600px) {
  .prize-tile { grid-template-columns: minmax(0, 1fr); gap: .25em; align-content: center; }
}
.prize-list a { color: var(--accent); }

.legend { display: grid; grid-template-columns: 1fr 1fr; gap: .55em; margin: 1.3em 0 0; padding: 0; list-style: none; }
.legend li {
  display: flex; align-items: center; gap: .6em; min-width: 0; padding: .45em .7em .45em .45em; border-radius: .8em;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  font-size: .82em; line-height: 1.3; color: var(--text-soft);
}
.legend b { display: block; color: var(--text); font-weight: 600; }
.legend .icon { width: 3.4em; height: 3.4em; margin: -.35em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 3.2em; padding: .8em 1.4em;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08);
  font-size: 1.05em; font-weight: 600; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  /* A link styled as a button reads as one. */
  color: inherit; text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, .14); }
.btn:active { transform: scale(.98); }
.btn--primary { width: 100%; border: 0; background: #fff; color: var(--ink); text-shadow: none; }
.btn--primary:hover { background: #E6EEFF; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 .3em rgba(112, 207, 255, .45); }

/* A line of status, with a light that pulses while something is pending. */
.status { display: flex; align-items: center; gap: .6em; margin: 1em 0 0; font-size: .82em; color: var(--muted); }
.status::before { content: ''; flex: none; width: .6em; height: .6em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(122, 219, 254, .6); animation: pulse 1.4s infinite; }
.status[data-state="done"]::before { background: var(--mint); animation: none; }
.status[data-state="off"]::before { background: var(--muted); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .55em rgba(122, 219, 254, 0); } 100% { box-shadow: 0 0 0 0 rgba(122, 219, 254, 0); } }

/* ---------- Character select ---------- */
.pick { border: 0; margin: 0 0 1.2em; padding: 0; min-width: 0; }
.pick legend { margin: 0 0 .8em; padding: 0; color: var(--muted); font-size: .72em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9em; }
.pick-row button {
  padding: 0; aspect-ratio: 16 / 9; min-width: 0; overflow: hidden; cursor: pointer; border-radius: 1em;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: border-color .15s ease, background .2s ease, transform .15s ease, box-shadow .15s ease;
}
.pick-row button canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-row button:hover { border-color: rgba(255, 255, 255, .45); }
.pick-row button[aria-checked="true"] {
  border-color: var(--accent); background: linear-gradient(160deg, rgba(122, 219, 254, .3), rgba(122, 219, 254, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 .22em rgba(112, 207, 255, .25), 0 0 2em rgba(112, 207, 255, .3);
  transform: translateY(-.15em);
}
.pick-row button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- The zone question ---------- */
.qtext { font-size: 2em; line-height: 1.12; }
.prize { display: flex; align-items: center; gap: .7em; margin: 1.1em 0 0; font-size: .9em; line-height: 1.35; color: var(--text-soft); }
.prize b { color: var(--text); font-weight: 600; }
.prize .icon { width: 3.8em; height: 3.8em; margin: -.5em; }
.qopts { display: grid; gap: .65em; margin: 0; padding: 0; list-style: none; }
.qopt {
  width: 100%; display: flex; align-items: center; gap: .85em; min-height: 3.5em; padding: .65em 1.2em .65em .7em; text-align: left; cursor: pointer;
  border-radius: 1.75em; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06);
  font-size: 1.02em; font-weight: 600; line-height: 1.3; text-shadow: inherit;
  transition: background .2s ease, border-color .2s ease, transform .15s ease, opacity .2s ease;
}
.qopt:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }
.qopt:active:not(:disabled) { transform: scale(.985); }
.qopt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qopt:disabled { cursor: default; }
.qopt .key { flex: none; width: 2.1em; height: 2.1em; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; font-size: .85em; text-shadow: none; }
.qopt[data-state="best"] { border-color: var(--accent); background: rgba(122, 219, 254, .22); }
.qopt[data-state="best"] .key { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.qopt[data-state="picked"] { border-color: var(--heat-yellow); background: rgba(255, 213, 153, .2); }
.qopt[data-state="picked"] .key { border-color: var(--heat-yellow); background: var(--heat-yellow); color: var(--ink); }
.qopt[data-state="other"] { opacity: .45; }
.qopt[data-state="struck"] { opacity: .3; text-decoration: line-through; text-decoration-thickness: 2px; }
.qwhy { margin: 1.1em 0 1.1em; padding: .8em 1em; border-left: 3px solid var(--accent); border-radius: 0 .6em .6em 0; background: rgba(255, 255, 255, .06); color: var(--text-soft); font-size: .95em; }
.qwhy[data-result="miss"] { border-left-color: var(--heat-yellow); }
.qwhy b { color: var(--text); }
.qwhy .award { display: flex; align-items: center; gap: .5em; width: fit-content; margin-top: .7em; padding: .3em .9em .3em .3em; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: .85em; font-weight: 700; text-shadow: none; }
.qwhy .award .icon { width: 2.5em; height: 2.5em; margin: -.3em -.2em; }
.qwhy .award-miss { padding-left: .9em; background: var(--heat-yellow); }

/* ---------- The score card ---------- */
.score-label { margin: 1.2em 0 0; color: var(--muted); font-size: .72em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.score { margin: 0; font: 800 4.6em/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#end-panel .btn--primary { margin-top: 1.2em; }
.stats { display: grid; gap: .45em; margin: 0; padding: 0; list-style: none; }
.stat {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .1em .8em; padding: .4em .8em .4em .5em; border-radius: .8em;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.stat .icon { grid-row: 1 / span 2; width: 3.1em; height: 3.1em; margin: -.35em; }
.stat-label { grid-column: 2; align-self: end; font-size: .68em; font-weight: 600; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; color: var(--muted); }
.stat-value { grid-column: 2; align-self: start; font-size: .98em; font-weight: 600; line-height: 1.3; }
.stat .points { grid-column: 3; grid-row: 1 / span 2; min-width: 4.6em; padding: .25em .8em; border-radius: 999px; background: rgba(255, 255, 255, .1); text-align: center; font: 800 1em var(--display); font-variant-numeric: tabular-nums; text-shadow: none; }
.stat[data-tone="good"] .points { background: var(--accent); color: var(--ink); }
.stat[data-tone="bad"] .points { background: var(--heat-orange); color: #2A0A00; }
/* A row that is about the run, not the score: the value sits where the points would. */
.stat:not(:has(.points)) .stat-label { align-self: center; grid-row: 1 / span 2; }
.stat:not(:has(.points)) .stat-value { grid-column: 3; grid-row: 1 / span 2; align-self: center; font: 800 1.1em var(--display); font-variant-numeric: tabular-nums; }
/* Eleven rows after Overtime: closer together, smaller icons and pills, each row on one line. */
.stats[data-dense] { gap: .28em; }
.stats[data-dense] .stat { grid-template-columns: auto minmax(0, 1fr) auto auto; padding: .18em .6em .18em .4em; }
.stats[data-dense] .stat .icon { grid-row: 1; width: 2.3em; height: 2.3em; margin: -.25em; }
.stats[data-dense] .stat-label { grid-column: 2; grid-row: 1; align-self: center; font-size: .6em; }
.stats[data-dense] .stat-value { grid-column: 3; grid-row: 1; align-self: center; font-size: .86em; text-align: right; }
.stats[data-dense] .stat .points { grid-column: 4; grid-row: 1; min-width: 4.4em; padding: .15em .7em; font-size: .86em; }
.stats[data-dense] .stat:not(:has(.points)) .stat-label { grid-row: 1; }
.stats[data-dense] .stat:not(:has(.points)) .stat-value { grid-column: 3 / span 2; grid-row: 1; font-size: .95em; }

/* ---------- The leaderboard ----------
   On the start card's Leaderboard tab, the score card's, and the leaderboard
   page. A row is rank, alias, time and score; first place has a filled rank;
   the player's own row is outlined and tinted. */
.board { display: grid; gap: .32em; margin: 0; padding: 0; list-style: none; }
.board-row { display: grid; grid-template-columns: 1.9em minmax(0, 1fr) auto 5.4em; align-items: center; gap: .7em; padding: .32em .8em .32em .45em; border-radius: .8em; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.board-row[data-mine] { border-color: var(--accent); background: rgba(112, 207, 255, .2); }
.board-rank { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: rgba(255, 255, 255, .1); font: 800 .85em var(--display); }
.board-row:first-child .board-rank { background: var(--accent); color: var(--ink); text-shadow: none; }
.board-alias { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-time { font-size: .78em; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-score { text-align: right; font: 800 1.05em var(--display); font-variant-numeric: tabular-nums; }
.board-empty { margin: .4em 0 0; color: var(--muted); }
/* The board pane takes no size of its own: the pane beside it (How to play,
   or Your run) sets the space, and the list scrolls inside it. */
.board-pane { display: flex; flex-direction: column; min-height: 0; margin-top: .8em; contain: size; font-size: .8em; }
.tabs--end + .panes > .board-pane, .tabs--end + .panes > .stats { margin-top: .8em; }
.board-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; padding-right: .4em; }
.board-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .8em; }
/* More below: the foot of the list fades until it has been scrolled to the end. */
.board-scroll[data-more] { -webkit-mask-image: linear-gradient(#000 calc(100% - 2.2em), rgba(0, 0, 0, .15)); mask-image: linear-gradient(#000 calc(100% - 2.2em), rgba(0, 0, 0, .15)); }
.board-foot { flex: none; margin: .5em 0 0; color: var(--muted); font-size: .9em; }
.board-foot a { color: var(--accent); text-underline-offset: .2em; white-space: nowrap; }
/* The score card: claim and share, and where the claim put them. */
.end-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin: 1.1em 0 0; }
.end-actions .btn { min-height: 2.9em; padding: .6em 1em; font-size: .95em; }
.end-actions .btn[hidden] + .btn { grid-column: 1 / -1; }
.btn--glow { border-color: var(--accent); background: rgba(112, 207, 255, .22); box-shadow: 0 0 1.6em rgba(112, 207, 255, .35); }
.btn--glow:hover { background: rgba(112, 207, 255, .32); }
.btn--quiet { border-color: transparent; background: none; color: var(--muted); min-height: 2.6em; }
.btn--quiet:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.board-note { margin: .8em 0 0; font-size: .92em; font-weight: 600; color: var(--accent); }
.board-note:empty { display: none; }
/* Arrived from a share link: who challenged them, above Press start. */
.referral { margin: 0 0 .7em; padding: .5em .9em; border-radius: .8em; border: 1px solid rgba(112, 207, 255, .45); background: rgba(112, 207, 255, .12); font-weight: 600; text-align: center; }

/* ---------- The entry forms ----------
   The claim, sharing and the draw, in a sheet over the whole window rather
   than inside the stage, so they are full size on a phone held upright. The
   same glass as the game's cards, at reading size. */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(3, 8, 30, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet .form-card { grid-template-columns: minmax(0, 1fr); align-items: start; width: min(100%, 34em); max-height: none; overflow: visible; padding: 1.6em 1.4em; font-size: clamp(14px, .5vw + 11px, 17px); background-color: rgba(8, 14, 40, .55); }
.sheet .form-card .card-col + .card-col { margin: 1.2em 0 0; padding: 1.2em 0 0; border-left: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .sheet .form-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); width: min(94vw, 62em); padding: 2.1em 2.4em; }
  .sheet .form-card .card-col + .card-col { margin: 0 0 0 2.2em; padding: 0 0 0 2.2em; border-top: 0; border-left: 1px solid var(--line); }
}
.form-card h2 { margin: .2em 0 0; font: 800 2em/1.1 var(--display); }
.form-lede { margin: .6em 0 0; color: var(--text-soft); font-size: .95em; }
.field { display: grid; gap: .3em; margin: .8em 0 0; min-width: 0; }
.field label { font-size: .7em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; min-width: 0; min-height: 2.8em; padding: .5em .95em; border-radius: .8em; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: var(--text); font: 600 1em var(--body); }
.field input:focus, .share-link input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(112, 207, 255, .25); }
.field[data-error] input { border-color: var(--heat-orange); box-shadow: 0 0 0 3px rgba(255, 111, 46, .25); }
.field-hint { margin: 0; font-size: .74em; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7em; }
.check { display: grid; grid-template-columns: 1.3em minmax(0, 1fr); gap: .7em; align-items: start; margin: .9em 0 0; font-size: .88em; line-height: 1.4; color: var(--text-soft); cursor: pointer; }
.sheet .card-col > .check:first-child { margin-top: .2em; }
.check input { width: 1.3em; height: 1.3em; margin: .05em 0 0; accent-color: var(--accent); cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check em { font-style: normal; color: var(--muted); }
.check a, .form-notice a { color: var(--accent); text-underline-offset: .2em; }
.check[data-error] { color: var(--heat-yellow); }
.check[data-error] input { outline: 2px solid var(--heat-orange); outline-offset: 2px; }
.human { margin: 1em 0 0; min-height: 0; }
.form-error { margin: 1em 0 0; color: var(--heat-yellow); font-weight: 600; font-size: .9em; }
.form-error:empty { display: none; }
.form-card .btn--primary { margin-top: 1.1em; }
.form-card .btn--quiet { width: 100%; margin-top: .3em; }
.form-notice { margin: .9em 0 0; font-size: .76em; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin-top: 1em; }
.form-actions .btn { flex: 1 1 auto; width: auto; margin: 0; min-height: 2.8em; padding: .55em 1.2em; font-size: .92em; }
.form-actions .btn--quiet { flex: 0 0 auto; width: auto; }
.steps { display: grid; gap: .55em; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: .55em .8em .55em 2.9em; border-radius: .8em; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-size: .9em; line-height: 1.4; color: var(--text-soft); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: .7em; top: .55em; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--accent); color: var(--ink); font: 800 .9em var(--display); }
.steps b { color: var(--text); }
.share-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5em; margin: 1em 0 0; }
.share-link input { min-width: 0; min-height: 2.8em; padding: .5em .95em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: var(--text); font: 600 .92em var(--body); }
.share-link .btn, .share-grid .btn { min-height: 2.8em; padding: .55em 1em; font-size: .92em; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin: .7em 0 0; }
.share-grid .btn { width: 100%; text-decoration: none; }
.btn--linkedin { grid-column: 1 / -1; border: 0; background: #0A66C2; color: #fff; }
.btn--linkedin:hover { background: #0B74DC; }
.btn--follow { text-decoration: none; }
.btn--follow[data-nudge] { border-color: var(--accent); box-shadow: 0 0 0 .25em rgba(112, 207, 255, .3); }
.form-card > .stepper { grid-column: 1 / -1; }
/* The steps of sharing, across the head of the sheet: done, current, still to come. */
.stepper { display: flex; gap: .4em; margin: 0 0 1.3em; padding: 0; list-style: none; counter-reset: none; }
.stepper li { flex: 1; display: flex; align-items: center; gap: .55em; min-width: 0; padding: .45em .7em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: var(--muted); font-size: .82em; font-weight: 600; }
.stepper-dot { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); font: 800 .9em var(--display); }
.stepper-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li[data-state="current"] { border-color: var(--accent); background: rgba(112, 207, 255, .16); color: var(--text); box-shadow: 0 0 1em rgba(112, 207, 255, .25); }
.stepper li[data-state="current"] .stepper-dot { border-color: #fff; background: #fff; color: var(--ink); }
.stepper li[data-state="done"] { color: var(--text-soft); }
.stepper li[data-state="done"] .stepper-dot { border-color: var(--mint); background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230A1230' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; color: transparent; }
@media (max-width: 600px) { .stepper li:not([data-state="current"]) .stepper-text { display: none; } .stepper li:not([data-state="current"]) { flex: none; } }
/* The draw, beside the card: locked until the link is used, then open. */
.draw-box { margin: 1.1em 0 0; padding: .9em 1em 1em; border-radius: .9em; border: 1px dashed rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); }
.draw-box-title { margin: 0; font: 800 1.05em var(--display); }
.draw-box-line { margin: .35em 0 0; font-size: .86em; color: var(--muted); }
.draw-box-line::before { content: '🔒 '; }
.draw-box[data-state="ready"] { border-style: solid; border-color: var(--mint); background: rgba(159, 240, 224, .1); box-shadow: 0 0 1.4em rgba(159, 240, 224, .2); }
.draw-box[data-state="ready"] .draw-box-line { color: var(--text-soft); }
.draw-box[data-state="ready"] .draw-box-line::before { content: ''; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .4em; vertical-align: -.15em; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230A1230' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.draw-box .btn--primary { margin-top: .8em; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
/* What the draw form still needs, ticked off as it is filled in. */
.needs-title { margin: 0; font-size: .7em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.needs { display: grid; gap: .3em; margin: .45em 0 .4em; padding: 0; list-style: none; font-size: .86em; color: var(--text-soft); }
.needs li { display: flex; align-items: center; gap: .55em; }
.need-dot { flex: none; width: 1.15em; height: 1.15em; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .4); }
.needs li[data-done] { color: var(--text); }
.needs li[data-done] .need-dot { border-color: var(--mint); background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230A1230' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.card-preview { overflow: hidden; border-radius: .9em; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); aspect-ratio: 1200 / 627; }
.card-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-preview { position: relative; }
.card-preview[data-failed] img { visibility: hidden; }
.card-preview[data-failed]::after { content: attr(data-failed); position: absolute; inset: 0; display: grid; place-items: center; padding: 1em; text-align: center; color: var(--muted); font-size: .9em; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60; max-width: min(90vw, 30em); padding: .7em 1.2em; border-radius: 999px; background: #fff; color: var(--ink); font: 600 15px/1.35 var(--body); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; translate: -50% 10px; pointer-events: none; }
.toast.is-on { animation: toast 3.2s ease forwards; }
@keyframes toast { 0% { opacity: 0; translate: -50% 10px; } 8%, 85% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; translate: -50% 0; } }
.offscreen { position: fixed; left: -9999px; top: 0; }

/* ---------- The leaderboard page (/leaderboard) ---------- */
body.page { overflow: auto; height: auto; min-height: 100%; display: flex; flex-direction: column; }
body.page .page-main { flex: 1; }
.page-world { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.page-world img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 100%; filter: brightness(.7); }
.page-world img + img { position: absolute; left: 50%; bottom: -2vh; width: max(110vw, 900px); height: auto; translate: -50% 0; opacity: .9; }
.page-head { display: flex; align-items: center; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 16px 10px; }
.page-head .start-logo { margin-right: 0; }
.page-head nav { display: flex; gap: 14px; margin-left: auto; font-weight: 600; font-size: 14px; }
.page-head nav a { color: var(--text-soft); text-underline-offset: .25em; }
.page-head nav a[aria-current] { color: var(--accent); }
@media (max-width: 640px) {
  .page-head .start-tag { display: none; }
  .page-head nav { gap: 12px; font-size: 13px; }
  .page-head .start-logo { width: 110px; }
}
.page-main { display: grid; justify-items: center; padding: 8px 16px 48px; }
.page-card { grid-template-columns: minmax(0, 1fr); align-items: start; width: min(100%, 64em); max-height: none; overflow: visible; padding: 1.6em 1.3em; font-size: clamp(14px, .5vw + 11px, 17px); background-color: rgba(8, 14, 40, .5); }
.page-card .card-col + .card-col { margin: 1.4em 0 0; padding: 1.4em 0 0; border-left: 0; border-top: 1px solid var(--line); }
.page-card h1 { margin: .15em 0 0; font: 800 2.6em/1.05 var(--display); }
.page-card .board { margin-top: .5em; font-size: .95em; }
.page-card .board-head { display: grid; grid-template-columns: 1.9em minmax(0, 1fr) auto 5.4em; gap: .7em; margin: 1.2em 0 0; padding: 0 .8em 0 .45em; font-size: .68em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.page-card .board-head span:last-child { text-align: right; }
.page-card .board-head + .board { margin-top: .5em; }
.page-card .btn--primary { margin-top: 1.2em; text-decoration: none; }
.page-card .prize-list { margin-top: 1em; }
.page-note { margin: .9em 0 0; color: var(--muted); font-size: .85em; }
.page-card .prize-tile { grid-template-columns: minmax(0, 1fr); gap: .2em; }
.page-card .prize-amount { font-size: 1.55em; }
/* On a desktop window the page is the window: the card fills what the
   header and foot leave, and the board scrolls inside it. */
@media (min-width: 900px) and (min-height: 560px) {
  body.page { height: 100svh; overflow: hidden; }
  body.page .page-main { min-height: 0; padding-bottom: 4px; }
  .page-card { height: 100%; align-items: stretch; overflow: hidden; }
  .page-card > .card-col:first-child { display: flex; flex-direction: column; min-height: 0; }
  .page-card > .card-col + .card-col { position: static; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .page-card .board-wrap { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; padding-right: .4em; }
  .page-card .page-note { flex: none; }
}
.page-note a { color: var(--accent); }
.page-draw { width: 100%; margin-top: 1em; }
@media (min-width: 900px) {
  .page-head { padding: 22px 40px; }
  .page-card { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding: 2.2em 2.5em; }
  .page-card .card-col + .card-col { margin: 0 0 0 2.2em; padding: 0 0 0 2.2em; border-top: 0; border-left: 1px solid var(--line); position: sticky; top: 24px; }
}

/* ---------- Fullscreen ----------
   The top right corner of the HUD, mirroring the mark in the top left. */
.fullscreen {
  position: absolute; z-index: 7; top: 2.89%; right: 1.75%; width: max(4.5%, 34px); aspect-ratio: 1; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: #C6D6F5;
  border-radius: 19.5%; border: 1px solid rgba(198, 214, 245, .16); background: rgba(4, 16, 64, .6);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.fullscreen:hover { color: #fff; background: rgba(10, 36, 120, .75); border-color: rgba(112, 207, 255, .6); }
.fullscreen:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fullscreen svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen .fs-exit, .fullscreen[aria-pressed="true"] .fs-enter { display: none; }
.fullscreen[aria-pressed="true"] .fs-exit { display: inline; }

/* Touch pad: only where there is no keyboard to speak of. */
.touch { position: absolute; z-index: 4; left: 0; right: 0; bottom: 12px; display: flex; gap: 10px; padding: 0 16px; pointer-events: none; }
.touch button {
  pointer-events: auto;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(198, 214, 245, .5);
  background: rgba(3, 12, 48, .55);
  color: var(--text);
  font: 700 18px var(--body);
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.touch .jump { margin-left: auto; width: 88px; height: 88px; }
.touch button.is-pressed { background: rgba(112, 207, 255, .45); }
@media (hover: hover) and (pointer: fine) { .touch { display: none; } }

/* ---------- Callout: what just happened to the bubble ----------
   The reason leads, big: the pressure that hit you or the capability you
   picked up. What it cost or gave follows in the pill. */
.flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 3; }
.flash[data-tone="bad"] { box-shadow: inset 0 0 90px 18px rgba(255, 110, 50, .7); }
.flash[data-tone="good"] { box-shadow: inset 0 0 90px 18px rgba(112, 207, 255, .55); }
.flash[data-tone="shield"] { box-shadow: inset 0 0 90px 18px rgba(159, 240, 224, .55); }
.flash.is-on { animation: flash .55s ease forwards; }
@keyframes flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

.callout {
  /* In the band between the two HUD columns, just under their top lines. */
  position: absolute; left: 50%; top: 16.5%; z-index: 6; pointer-events: none; width: max-content; max-width: 44cqw;
  display: grid; justify-items: center; gap: .7cqw; text-align: center; opacity: 0;
  transform: translate(-50%, -50%) scale(.6);
}
/* With a card open the play band belongs to the card, so the callout moves up out of its way. */
.stage[data-phase="question"] .callout { top: 7.5%; }
.callout.is-on { animation: callout 1.5s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes callout {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); }
  20% { transform: translate(-50%, -50%) scale(1); }
  74% { opacity: 1; transform: translate(-50%, -52%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}
/* The glow behind it. Wide and blue for a power-up, so a reward fills the band. */
.callout::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 52cqw; height: 22cqw; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(130, 205, 255, .95), rgba(40, 130, 255, .7) 38%, rgba(30, 100, 255, .26) 70%, rgba(112, 207, 255, 0));
  filter: blur(1.4cqw);
}
.callout[data-tone="shield"]::before { background: radial-gradient(closest-side, rgba(40, 190, 190, .7), rgba(60, 200, 190, .36) 42%, rgba(159, 240, 224, .12) 72%, rgba(159, 240, 224, 0)); }
.callout[data-tone="bad"]::before { width: 38cqw; height: 13cqw; background: radial-gradient(closest-side, rgba(120, 10, 0, .7), rgba(200, 50, 10, .3) 55%, rgba(255, 110, 50, 0)); }
.callout.is-on::before { animation: callout-glow 1.5s ease-out forwards; }
@keyframes callout-glow { 0% { scale: .4; } 22% { scale: 1.12; } 100% { scale: 1; } }

.callout-big {
  font: 800 2.6cqw/1.02 var(--display); letter-spacing: .01em; text-transform: uppercase; color: #F5F7FF;
  text-shadow: 0 0 1.6cqw rgba(112, 207, 255, .95), 0 0 .5cqw rgba(112, 207, 255, .6), 0 .2cqw 0 rgba(3, 11, 48, .8);
}
.callout-small {
  font: 700 1.2cqw/1.3 var(--body); color: #F5F7FF; text-shadow: none;
  background: rgba(3, 12, 48, .78); border: 1px solid rgba(112, 207, 255, .6); border-radius: 999px; padding: .28cqw 1.1cqw;
}
.callout[data-tone="shield"] .callout-big { color: #DFFFF8; text-shadow: 0 0 1.6cqw rgba(159, 240, 224, .95), 0 .2cqw 0 rgba(3, 11, 48, .8); }
.callout[data-tone="shield"] .callout-small { border-color: rgba(159, 240, 224, .7); }
.callout[data-tone="bad"] .callout-small { background: rgba(60, 8, 4, .82); border-color: rgba(255, 140, 80, .8); color: #FFE3D3; }
/* A missed answer is not a hit: plain amber, no lava and no glow. */
.callout[data-tone="miss"]::before { display: none; }
.callout[data-tone="miss"] .callout-big { color: var(--heat-yellow); text-shadow: 0 0 1.2cqw rgba(255, 178, 92, .7), 0 .2cqw 0 rgba(3, 11, 48, .8); }
.callout[data-tone="miss"] .callout-small { border-color: rgba(255, 213, 153, .7); }

/* A hit is written in lava. The letters are cut out of a melt that flows
   downward while two layers of bright domes rise through it, and along the
   foot of the word bubbles swell and burst, as they do in the floor. */
.callout[data-tone="bad"] .callout-big {
  color: transparent; text-shadow: none;
  background:
    radial-gradient(circle, rgba(255, 250, 226, .95) 0 16%, rgba(255, 222, 150, .55) 17% 32%, transparent 34%) 0 0 / .62em .78em,
    radial-gradient(circle, rgba(255, 236, 190, .8) 0 22%, rgba(255, 190, 110, .4) 23% 40%, transparent 42%) .3em .2em / 1.06em 1.3em,
    linear-gradient(180deg, #FFF0C2 0%, #FFC569 16%, #FF8A3C 40%, #E2441A 62%, #FF8A3C 82%, #FFD27A 100%) 0 0 / 100% 300%;
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 .9cqw rgba(255, 90, 40, .9)) drop-shadow(0 .18cqw 0 rgba(40, 6, 10, .85));
}
.callout.is-on[data-tone="bad"] .callout-big { animation: lava-flow 1.5s linear forwards; }
@keyframes lava-flow {
  from { background-position: 0 0, .3em .2em, 0 100%; }
  to { background-position: .1em -2.34em, .22em -1.1em, 0 0; }
}
.callout-head { position: relative; display: block; }
.callout-lava { position: absolute; left: 0; right: 0; bottom: .1cqw; height: 0; display: none; }
.callout[data-tone="bad"] .callout-lava { display: block; }
.callout-lava i {
  position: absolute; bottom: 0; left: var(--x); width: var(--w, .9cqw); aspect-ratio: 1; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 38% 32%, #FFF6DC 0 18%, #FFC569 34%, #FF7A2E 66%, rgba(226, 68, 26, 0) 72%);
  box-shadow: 0 0 .7cqw rgba(255, 120, 50, .85);
}
.callout.is-on .callout-lava i { animation: lava-bubble .62s ease-out var(--d) both; }
.callout-lava i:nth-child(1) { --x: 5%; --d: .1s; }
.callout-lava i:nth-child(2) { --x: 20%; --w: 1.3cqw; --d: .42s; }
.callout-lava i:nth-child(3) { --x: 36%; --w: .7cqw; --d: .22s; }
.callout-lava i:nth-child(4) { --x: 49%; --w: 1.1cqw; --d: .7s; }
.callout-lava i:nth-child(5) { --x: 63%; --d: .34s; }
.callout-lava i:nth-child(6) { --x: 78%; --w: 1.4cqw; --d: .58s; }
.callout-lava i:nth-child(7) { --x: 91%; --w: .8cqw; --d: .86s; }
@keyframes lava-bubble {
  0% { opacity: 0; transform: translateY(.5cqw) scale(.2); }
  35% { opacity: 1; transform: translateY(-.3cqw) scale(1); }
  78% { opacity: 1; transform: translateY(-1cqw) scale(1.18); }
  100% { opacity: 0; transform: translateY(-1.3cqw) scale(1.9); }
}

/* ---------- The test harness ----------
   Only ever on the page when the server was started with TEST_HARNESS=on.
   A chip at the foot of the window, clear of the HUD, the cards' buttons and
   the touch pad, which opens upward into a panel in the cards' glass. The
   amber is what marks it as not part of the game. */
.harness { position: fixed; z-index: 40; left: max(12px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); font: 600 13px/1.4 var(--body); color: var(--text); }
.harness summary {
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 24px); margin: 0; padding: 6px 14px 6px 10px; cursor: pointer; list-style: none;
  border-radius: 999px; border: 1px solid rgba(255, 213, 153, .55); background: rgba(8, 14, 40, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--heat-yellow);
}
.harness summary::-webkit-details-marker { display: none; }
.harness summary::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--heat-yellow); box-shadow: 0 0 8px rgba(255, 213, 153, .8); }
.harness summary b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.harness summary b::before { content: '· '; color: var(--muted); }
.harness summary:hover { border-color: var(--heat-yellow); }
.harness summary:focus-visible { outline: 2px solid var(--heat-yellow); outline-offset: 3px; }
.harness-body {
  position: absolute; left: 0; bottom: calc(100% + 10px); display: grid; gap: 12px; width: min(360px, calc(100vw - 24px)); padding: 16px;
  max-height: calc(100dvh - 80px); overflow-y: auto;
  max-height: calc(100dvh - 80px); overflow-y: auto;
  border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(145deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .05) 38%, rgba(8, 14, 40, .3) 100%), rgba(8, 14, 40, .72);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 20px 50px rgba(0, 0, 0, .45);
}
.harness label { display: grid; gap: 5px; min-width: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.harness select {
  width: 100%; min-width: 0; padding: 9px 34px 9px 12px; -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); color: var(--text); font: 600 13px var(--body); letter-spacing: 0; text-transform: none;
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23D9E8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.harness select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(112, 207, 255, .25); }
.harness select option { color: var(--ink); }
.harness-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.harness button { min-height: 38px; padding: 8px 18px; cursor: pointer; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: var(--text); font: 600 13px var(--body); }
.harness button:hover { background: rgba(255, 255, 255, .16); }
.harness button[data-h="go"] { border: 0; background: #fff; color: var(--ink); }
.harness button[data-h="go"]:hover { background: #E6EEFF; }
.harness button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(112, 207, 255, .45); }
.harness p { margin: 0; font-size: 11px; font-weight: 400; color: var(--muted); }
/* The scoring model's checks, from docs/scoring-model.json. */
.harness-model { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); }
.harness-model-head { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.harness-model-head b { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.harness-model ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 400; color: var(--text-soft); }
.harness-model li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; cursor: help; }
.harness-model li::before { content: '✓'; color: var(--accent); }
.harness-model li[data-pass="false"]::before { content: '✗'; color: #FF7A50; }
.harness-model li[data-pass="false"] { color: var(--text); }
.harness-model p[data-tone="warn"] { color: var(--heat-yellow); }
.harness-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; color: var(--text-soft); }
.harness-toggle b { font-weight: 400; color: var(--muted); }
.harness [data-h="report"] { word-break: break-word; }

/* ---------- Narrow screens ----------
   Held upright, the stage is a thin band across the middle of the screen,
   so the cards drop to one column and take the screen's height instead. */
@media (max-aspect-ratio: 1 / 1) {
  .overlay { inset: calc((100cqh - 100svh) / 2) 0; padding: 12px; }
  .card { grid-template-columns: minmax(0, 1fr); width: min(100%, 30em); max-height: calc(100svh - 24px); padding: 1.5em 1.4em; font-size: clamp(12px, 3.5vw, 16px); }
  .card-col + .card-col { margin: 1.3em 0 0; padding: 1.3em 0 0; border-left: 0; border-top: 1px solid var(--line); }
  h1 { font-size: 2.8em; }
  .countdown .icon { width: 16cqw; height: 16cqw; }
  .countdown-kicker { font-size: 2.6cqw; }
  .countdown-name { font-size: 6.4cqw; }
  .countdown-hint { font-size: 3cqw; }
  .countdown-num { font-size: 16cqw; min-height: 16cqw; }
  .callout { max-width: 70cqw; }
  .callout-big { font-size: 4.2cqw; }
  .callout-small { font-size: 2.4cqw; }
}

@keyframes callout-still {
  0%, 85% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .qopt, .pick-row button { transition: none; }
  .card, .countdown-zone { animation: none; }
  .toast.is-on { animation: none; opacity: 1; translate: -50% 0; }
  .world-sheen::before, .world-sheen::after, .world-simmer, .world-lava img { animation: none; }
  .world-embers { display: none; }
  .world-plate, .world-heat, .world-glow, .world-lava, .world-sheen, .start, .start-scroll { transition-duration: .01ms; }
  .intro.is-holding .intro-hold { animation: none; }
  .morph.is-popping { animation: none; }
  .world-game { transition-duration: .01ms; }
  .countdown-num.is-tick { animation: none; }
  .status::before { animation: none; }
  .callout.is-on { animation: callout-still 1.5s linear forwards; }
  .callout.is-on::before, .callout.is-on[data-tone="bad"] .callout-big { animation: none; }
  .callout.is-on .callout-lava i { animation: none; opacity: 0; }
  .flash.is-on { animation: none; }
}

/* ---------- The page foot ----------
   Terms and privacy, pinned to the bottom of every page but the game: the
   start page, the leaderboard, and the two documents. */
.site-foot { flex: none; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); text-align: center; }
.site-foot .legal-links { margin: 0; font: 600 13px/1.4 var(--body); letter-spacing: .02em; color: var(--muted); text-shadow: 0 1px 8px rgba(3, 8, 30, .9); }
.site-foot a { color: var(--text-soft); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.site-foot a:hover, .site-foot a[aria-current] { color: var(--accent); }
.site-foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
