/* Motorbike Challenge — the show's look: the Broadcast · scene-first design (David, 2026-10-07).
 *
 * Every screen is a SCENE over the live arena: words straight on the picture, legibility from type,
 * shadow and the scene's own light, never a panel (root lessons.md, Styling). The one framed object is
 * the studio monitor on the running order. Each screen's content is laid out on the design's 1280 × 720
 * stage and scaled to the window (`--s`, set by screens.js), so the composition holds at any size; the
 * light and the scrims behind it fill the whole window.
 *
 * Motion: entry animations replay from `.entering`; `prefers-reduced-motion` turns every one of them
 * off, and every element's resting style is its visible one (a hidden tab never runs an animation). */

:root {
  color-scheme: dark;
  --ink: #f4efe2;
  --dim: #b9b3a6;
  --mute: #8f897d;
  --star: #ffd23f;
  --up: #8be04e;
  --down: #ff9a7a;
  --red: #d62a1d;
  --hot: #ff4d2e;
  --panel: rgba(21, 22, 26, 0.88);
  --anton: "mc-anton", Impact, "Arial Narrow", sans-serif;
  --barlow: "mc-barlow", system-ui, "Segoe UI", sans-serif;
  --cond: "mc-condensed", "Arial Narrow", system-ui, sans-serif;
  --dirt: "mc-dirt", "mc-anton", Impact, sans-serif;
  --marker: "mc-marker", "Comic Sans MS", cursive;
  /* The HUD band the renderer keeps clear at the top (game.js HUD_BAND). */
  --hud-band: 48px;
  --s: 1;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0e0e11;
  color: var(--ink);
  font: 500 16px/1.4 var(--barlow);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* ================================================================================================
 * The score bug: one row in the 48 px band, under a shade that fades into the arena's top edge. */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--hud-band);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 22px;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  animation: bug-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hud::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 86px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 10, 13, 0.97) 0, rgba(10, 10, 13, 0.92) 40px, rgba(10, 10, 13, 0.55) 60px, rgba(10, 10, 13, 0) 86px);
}

.bug-arena {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.bug-n {
  font: 400 31px/1 var(--anton);
  color: var(--star);
}

.bug-name {
  font: 400 20px/1 var(--anton);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bug-stars {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--star);
  font: 400 23px/1 var(--anton);
  font-variant-numeric: tabular-nums;
}

.bug-stars svg {
  width: 17px;
  height: 17px;
  align-self: center;
}

.bug-of {
  font-size: 17px;
  color: var(--mute);
}

.bug-fame {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.bug-total {
  display: inline-block;
  min-width: 72px;
  font: 400 27px/1 var(--anton);
  font-variant-numeric: tabular-nums;
  transform-origin: 0 70%;
}

.bug-unit {
  font: 700 13px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.bug-bank {
  position: absolute;
  left: 0;
  top: 30px;
  font: 400 17px/1 var(--anton);
  color: var(--star);
  opacity: 0;
}

/* The rockets left: one pip each, spent ones hollow. */
.bug-rockets {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bug-rockets i {
  width: 6px;
  height: 16px;
  border-radius: 3px 3px 1px 1px;
  background: var(--hot);
  box-shadow: 0 0 6px rgba(255, 77, 46, 0.6);
}

.bug-rockets i.spent {
  background: none;
  box-shadow: inset 0 0 0 1.5px rgba(244, 239, 226, 0.35);
}

.hud.free-ride .bug-rockets {
  visibility: hidden;
}

.bug-bank.banking {
  animation: float-down 1.3s ease-out both;
}

.bug-exit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  --door: var(--up);
}

.bug-exit[data-state="closing"] {
  --door: #ffb020;
}

.bug-exit[data-state="urgent"],
.bug-exit[data-state="shut"] {
  --door: var(--hot);
}

.bug-exit[data-state="ended"] {
  visibility: hidden;
}

.bug-exit-word {
  font: 700 14px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d8d2c4;
}

.bug-door {
  position: relative;
  width: 176px;
  height: 4px;
}

.bug-door-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 1.5px;
  height: 1px;
  background: rgba(244, 239, 226, 0.22);
}

.bug-door-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 50%;
  border-radius: 2px;
  background: var(--door);
  box-shadow: 0 0 9px var(--door);
  transition: left 0.1s linear, right 0.1s linear, background-color 0.4s ease;
}

.bug-secs {
  width: 50px;
  font: 400 22px/1 var(--anton);
  font-variant-numeric: tabular-nums;
  color: var(--door);
}

.bug-exit[data-state="shut"] .bug-secs {
  font: 700 15px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.bug-exit[data-state="urgent"] .bug-door-bar,
.bug-exit[data-state="urgent"] .bug-secs {
  animation: urgent 0.4s steps(1) infinite;
}

.bug-right {
  position: relative;
  width: 300px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bug-line {
  font: 400 21px/1 var(--anton);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--up);
}

.bug-line[data-kind="star"] {
  color: var(--star);
}

.bug-line[data-kind="bad"] {
  color: #ff5a3c;
}

.bug-line.speaking {
  animation: line-in 0.25s ease-out both;
}

.hud.speaking .bug-tally {
  display: none;
}

.bug-tally {
  display: flex;
  align-items: baseline;
}

.bug-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.bug-count + .bug-count::before {
  content: "·";
  padding: 0 9px;
  font: 700 15px/1 var(--cond);
  color: #6f6a62;
}

.bug-count b {
  font: 400 21px/1 var(--anton);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.bug-count span {
  font: 700 14px/1 var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.bug-crowd {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bug-fan {
  width: 40px;
  height: 40px;
}

.bug-fan img {
  display: block;
  width: 100%;
  height: 100%;
}

.bug-mult {
  display: inline-block;
  min-width: 100px;
  font: 400 36px/1 var(--anton);
  font-variant-numeric: tabular-nums;
  transform-origin: 0 75%;
}

.popping {
  animation: pop 0.4s ease-out;
}

.hud.crashing .bug-crowd {
  animation: shake 0.45s ease-out;
}

.hud.crashing .bug-mult {
  color: #ff5a3c !important;
}

/* A free ride has no stars, no fame and no door; the bug says only where you are. */
.hud.free-ride .bug-stars,
.hud.free-ride .bug-fame,
.hud.free-ride .bug-crowd,
.hud.free-ride .bug-right,
.hud.no-exit .bug-exit {
  visibility: hidden;
}

@media (max-width: 1100px) {
  .bug-right {
    display: none;
  }
}

/* A narrow window tightens the bug rather than running it off the right edge: first the exit's word
 * and a shorter door, then, under 600 px, everything but the figures themselves. */
@media (max-width: 900px) {
  .hud {
    gap: 14px;
    padding: 0 12px;
  }

  .bug-exit-word {
    display: none;
  }

  /* The exit keeps its room, and a long arena name is what gives way (it ellipsizes). */
  .bug-exit {
    flex: 1 0 auto;
  }

  .bug-door {
    width: 96px;
  }
}

@media (max-width: 600px) {
  .hud {
    gap: 10px;
  }

  .bug-name,
  .bug-of,
  .bug-unit,
  .bug-door,
  .bug-fan {
    display: none;
  }

  .bug-total,
  .bug-mult {
    min-width: 0;
  }

  .bug-secs {
    width: auto;
  }

  .bug-mult {
    font-size: 28px;
  }
}

/* A screen in front is the whole picture; only the pause keeps the bug, above its scrim, so the
 * ride's state stays in view. */
body:not([data-screen=""]):not([data-screen="paused"]) .hud {
  visibility: hidden;
}

body[data-screen="paused"] .hud {
  z-index: 11;
}

/* ================================================================================================
 * A replay's pill, bottom right: one capsule in the bug's own shade and type, its cells divided by a
 * hairline on each cell's own left edge. The save button's word says what pressing it does, and its
 * colour the recording's state. */

.replay-bar {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 12;
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 10, 13, 0.92);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 226, 0.16), 0 12px 32px rgba(0, 0, 0, 0.55);
  font: 700 15px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.replay-bar > * {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
}

.replay-bar > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(244, 239, 226, 0.18);
}

.rb-tag {
  color: var(--hot);
}

.rb-tag svg {
  width: 11px;
  height: 12px;
  fill: currentColor;
}

.replay-bar button:hover,
.replay-bar button:focus-visible {
  background: rgba(244, 239, 226, 0.08);
  outline: none;
}

.replay-bar button:disabled {
  cursor: default;
  color: var(--mute);
}

.rb-save[data-state="recording"] {
  color: var(--hot);
}

.rb-save[data-state="ready"] {
  color: var(--star);
}

.rb-save[data-state="saved"] {
  color: var(--up);
}

.rb-back kbd {
  min-width: 0;
  padding: 0;
  font-size: 13px;
  color: var(--mute);
}

/* ================================================================================================
 * The pad's hint: a lower third over the arena, before the first throttle press. */

.hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 9vh 16px 4vh;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 10, 13, 0.8) 0%, rgba(10, 10, 13, 0.45) 60%, rgba(10, 10, 13, 0) 100%);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* The pad in the lower half: the hint goes up under the bug, so the bike and its heading stay clear. */
.hint[data-at="top"] {
  top: var(--hud-band);
  bottom: auto;
  padding: 3vh 16px 9vh;
  background: linear-gradient(180deg, rgba(10, 10, 13, 0.8) 0%, rgba(10, 10, 13, 0.45) 60%, rgba(10, 10, 13, 0) 100%);
}

.hint > p {
  animation: rise 0.45s ease-out both;
}

.hint p {
  margin: 0;
}

.hint-arena {
  font: 700 15px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--star);
}

.hint-lead {
  margin-top: 10px !important;
  font: 400 26px/1.15 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hint-keys {
  margin-top: 12px !important;
  font: 600 17px/1.5 var(--barlow);
  color: #d8d2c4;
}

/* The lines a touch-only device reads in place of the keys it has not got: drawn only by the
 * touch-first block at the end of this file. */
.touch-only {
  display: none;
}

.hint-touch {
  margin-top: 12px !important;
  font: 700 17px/1.5 var(--barlow);
  color: var(--star);
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 4px;
  font: 700 17px/1.3 var(--cond);
  color: var(--star);
  text-transform: uppercase;
}

/* A controller button drawn as the controller draws it (David, 2026-10-23: a bare "Y" did not read as
 * the controller's Y): A, B, X and Y as the standard layout's coloured face buttons, the letter dark on
 * each, and every other button — a trigger, a bumper, Start, the stick, the D-pad — as a small dark
 * pill with its name. Sized off the type it stands in (`controls.js`, `glyphNodes`). */
.pad-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 1.5em;
  vertical-align: middle;
  font: 700 0.8em/1 var(--barlow);
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pad-face {
  width: 1.5em;
  border-radius: 50%;
  color: #121212;
  background: var(--face);
  box-shadow: inset 0 -0.14em 0 rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pad-a {
  --face: #5fc14d;
}

.pad-b {
  --face: #e5483c;
}

.pad-x {
  --face: #3d8fe8;
}

.pad-y {
  --face: #f4c430;
}

.pad-pill {
  padding: 0 0.5em;
  border: 1.5px solid rgba(244, 239, 226, 0.55);
  border-radius: 0.45em;
  background: #26262c;
  color: #f4efe2;
  letter-spacing: 0.04em;
}

/* ================================================================================================
 * Screens: a whole-window scene, its content on the scaled stage. */

.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

/* The player's fame, on the four screens where it decides something (David, 2026-10-23): one line of
 * type on the scene, its figure in the show's face and star gold — on the title just above what the
 * next arena needs, on ESCAPED! in the top-left corner, on the heading's line in the running order and
 * the Standings. Each screen places its own (`.title-fame` …). */
.fame-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
}

.ft-word {
  font: 700 14px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.ft-n {
  font: 400 30px/1 var(--anton);
  font-variant-numeric: tabular-nums;
  color: var(--star);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.ft-rise {
  font: 400 18px/1 var(--anton);
  color: var(--up);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.screen .stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  transform: translate(-50%, -50%) scale(var(--s));
  transform-origin: 50% 50%;
}

.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}

.curtain {
  position: absolute;
  top: -40px;
  bottom: -40px;
  left: -20vw;
  width: 140vw;
  pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--star) 0 46px, #141414 46px 92px);
  transform: skewX(-14deg) translateX(125%);
}

.screen.entering .curtain {
  animation: curtain 0.75s cubic-bezier(0.7, 0, 0.3, 1) both;
}

.kicker {
  margin: 0;
  font: 700 15px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d8d2c4;
}

.erik {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.6));
}

/* A menu item is a word: the selected one turns gold, gets its ▸ and the follow-spot. */
.menu {
  isolation: isolate;
}

.mi {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  padding-left: 44px;
  margin-left: -44px;
  text-align: left;
  outline: none;
}

.mi-big {
  height: 70px;
}

.mi .ln {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.mi .w {
  font: 400 36px/1 var(--anton);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: #e9e3d6;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  transition: color 0.18s ease;
}

.mi-big .w {
  font-size: 56px;
}

.mi .sub {
  font: 700 17px/1 var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfc8b8;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.tri {
  fill: var(--star);
}

.mi .tri {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 19px;
  height: 21px;
  margin-top: -10px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mi-big .tri {
  left: 6px;
  width: 24px;
  height: 26px;
  margin-top: -13px;
}

.mi::before {
  content: "";
  position: absolute;
  left: -150px;
  top: 50%;
  width: 760px;
  height: 190px;
  margin-top: -95px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 42% 50%, rgba(255, 210, 63, 0.24), rgba(255, 210, 63, 0.08) 45%, rgba(255, 210, 63, 0) 72%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mi.sel .w {
  color: var(--star);
}

.mi.sel .tri {
  opacity: 1;
  transform: none;
  animation: nudge 1.3s ease-in-out 1.6s infinite;
}

.mi.sel::before {
  opacity: 1;
}

/* ------------------------------------------------------------------------------------------------
 * The title. */

.title-scrim {
  background: linear-gradient(90deg, rgba(12, 12, 15, 0.96) 0%, rgba(12, 12, 15, 0.86) 38%, rgba(12, 12, 15, 0.35) 64%, rgba(12, 12, 15, 0.5) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

.spot {
  position: absolute;
  top: -10vh;
  width: 25vw;
  height: 122vh;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 233, 160, 0.3), rgba(255, 233, 160, 0) 82%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
  mix-blend-mode: screen;
  animation: sway 7s ease-in-out infinite;
}

.spot-a {
  left: 62vw;
}

.spot-b {
  left: 79vw;
  animation-duration: 8.5s;
  animation-delay: -4s;
}

.halo {
  position: absolute;
  left: 740px;
  top: 110px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.3), rgba(255, 210, 63, 0) 66%);
  animation: glow 3s ease-in-out infinite;
}

.crowd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25vh;
  pointer-events: none;
}

/* The picture is wide enough that the band's height scales it (`CROWD_W` in screens.js): it fills
   the band edge to edge and never grows taller than it, so nothing at its top is cut off. */
.crowd svg {
  display: block;
  width: 100%;
  height: 100%;
}

.crowd .bob {
  animation: bob 0.8s ease-in-out infinite;
}

.crowd .crowd-back {
  animation: bob-small 1.3s ease-in-out infinite;
}

/* Each sign's pivot, on its pole, is in its markup (crowdSvg), in the picture's own units. */
.crowd .sign-a {
  animation: sign-sway 0.9s ease-in-out -0.4s infinite;
}

.crowd .sign-b {
  animation: sign-sway-b 1.1s ease-in-out infinite;
}

.title-erik {
  right: 24px;
  bottom: -8px;
  width: 520px;
}

.screen.entering .title-erik {
  animation: rise-big 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
}

/* The ride item's side: what the next arena needs, and the player's fame just above it (David,
 * 2026-10-23), so the two figures a player weighs are read together, wherever the item's word ends. */
.ride-side {
  position: relative;
}

.title-fame {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 6px;
}

.logo {
  position: absolute;
  left: 72px;
  top: 48px;
  margin: 0;
  display: flex;
  flex-direction: column;
  font: 400 112px/0.92 var(--anton);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.logo span {
  color: var(--ink);
  text-shadow: 5px 5px 0 var(--red);
  transform-origin: 0 60%;
}

.logo span + span {
  color: var(--star);
}

.screen.entering .logo span {
  animation: slam 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.2s both;
}

.screen.entering .logo span + span {
  animation-delay: 0.42s;
}

.starring {
  position: absolute;
  left: 74px;
  top: 274px;
  margin: 0;
  font: 700 19px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.starring b {
  color: var(--ink);
  font-weight: 700;
}

.tagline {
  position: absolute;
  left: 74px;
  top: 306px;
  margin: 0;
  font: 600 22px/1.3 var(--barlow);
  color: #e9e3d6;
}

/* In the tagline's place on a touch-only device, one line, so a dare under it keeps its room. */
.touch-need {
  position: absolute;
  left: 74px;
  top: 306px;
  margin: 0;
  font: 600 22px/1.3 var(--barlow);
  color: #e9e3d6;
  white-space: nowrap;
}

.touch-need b {
  font-weight: 700;
  color: var(--star);
}

.touch-need span::before {
  content: " · ";
  color: var(--mute);
}

/* The age label as a broadcaster's rating bug in the corner of the programme: small, in the title's
   bottom-right corner (David, 2026-10-23, from the top-right), the numeral in a hard box and the reasons
   beside it in the show's condensed caption type, shadowed off Erik's jacket. */
#title .age-label {
  position: absolute;
  right: 24px;
  bottom: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 10px/1.3 var(--cond);
  letter-spacing: 0.04em;
  color: var(--dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.8);
}

#title .age-badge {
  min-width: 18px;
  height: 16px;
  border-width: 1.5px;
  border-radius: 3px;
  font-size: 11px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.age-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 2px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font: 400 14px/1 var(--anton);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* A friend's dare, between the tagline and the menu; the menu steps down to make room for it. */
.title-dare {
  position: absolute;
  left: 74px;
  top: 342px;
  width: 560px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.title-dare p {
  margin: 0;
}

.title-dare-headline {
  font: 700 19px/1.2 var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--star);
}

.title-dare-body,
.title-dare-status {
  margin-top: 4px !important;
  font: 600 15px/1.35 var(--barlow);
  color: #e9e3d6;
}

#title:has(#title-dare:not([hidden])) .title-menu {
  top: 446px;
}

.title-menu {
  position: absolute;
  left: 72px;
  top: 386px;
  display: flex;
  flex-direction: column;
}

.screen.entering .starring,
.screen.entering .tagline {
  animation: rise 0.45s ease-out 0.75s both;
}

.screen.entering .title-menu .mi {
  animation: rise 0.45s ease-out 1s both;
}

.screen.entering .title-menu .mi:nth-child(2) {
  animation-delay: 1.08s;
}

.screen.entering .title-menu .mi:nth-child(3) {
  animation-delay: 1.16s;
}

.screen.entering .title-menu .mi:nth-child(4) {
  animation-delay: 1.24s;
}

/* ------------------------------------------------------------------------------------------------
 * The running order. */

.arenas-scrim {
  background: radial-gradient(ellipse 70% 60% at 18% 0%, rgba(255, 210, 63, 0.07), rgba(255, 210, 63, 0) 70%),
    linear-gradient(90deg, rgba(12, 12, 15, 0.95) 0%, rgba(12, 12, 15, 0.88) 50%, rgba(12, 12, 15, 0.8) 100%),
    radial-gradient(ellipse 120% 100% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.6) 100%);
}

.arenas-head {
  position: absolute;
  left: 56px;
  top: 34px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.arenas-head h1 {
  margin: 0;
  font: 400 34px/1 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--red);
}

.arenas-summary {
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cfc8b8;
}

/* On the heading's line, after how many arenas are out: the figure a row's "Needs … fame" is read against. */
.arenas-fame {
  margin-left: 8px;
}

.arenas-fame .ft-n {
  font-size: 24px;
}

.arenas-top {
  position: absolute;
  right: 52px;
  top: 26px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.close {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 4px;
  outline: none;
}

.close .cw,
.q {
  font: 700 21px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.close .ck {
  font: 600 15px/1 var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.q {
  height: 48px;
  padding: 0 4px;
  color: var(--dim);
  font-size: 17px;
  outline: none;
}

.close.sel .cw,
.close:hover .cw,
.q.sel,
.q:hover {
  color: var(--star);
}

/* The running order is taller than the stage (every arena and segment of the show, 58px a row), so it
 * scrolls inside a window of its own: from under the heading to the stage's foot, out to the studio
 * monitor, ten rows at rest. Its top padding is the fade the rows slide through at either edge, and
 * `keepInView` in screens.js reads it to keep the lit row clear of both; the left padding is the room
 * the lit row's arrow and follow-spot spill into, which the window would otherwise clip. */
.list {
  --fade: 28px;
  position: absolute;
  left: -100px;
  top: 88px;
  width: 784px;
  height: 632px;
  box-sizing: border-box;
  padding: var(--fade) 0 24px 156px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(207, 200, 184, 0.35) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}

.row {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 210px;
  align-items: center;
  width: 600px;
  height: 58px;
  text-align: left;
  outline: none;
}

.screen.entering .row {
  animation: rise 0.4s ease-out both;
}

.row::before {
  content: "";
  position: absolute;
  left: -160px;
  top: 50%;
  width: 820px;
  height: 150px;
  margin-top: -75px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 40% 50%, rgba(255, 210, 63, 0.17), rgba(255, 210, 63, 0.06) 45%, rgba(255, 210, 63, 0) 72%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.row .tri {
  position: absolute;
  left: -34px;
  top: 50%;
  width: 18px;
  height: 20px;
  margin-top: -10px;
  color: var(--star);
  fill: var(--star);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.row .seg {
  font: 700 17px/1 var(--cond);
  letter-spacing: 0.08em;
  color: #9a9488;
  font-variant-numeric: tabular-nums;
}

.row .nm {
  font: 400 36px/1 var(--anton);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  transition: color 0.18s ease;
}

.row .st {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfc8b8;
  white-space: nowrap;
}

/* A broadcast segment's screen (segment.css styles what is in it): black from the moment it shows,
 * and nothing of it drawn until its own sheet has arrived, so a first airing never flashes the arena
 * or unstyled pictures. */
#segment {
  background: #000;
}

#segment:not([data-styled]) > * {
  visibility: hidden;
}

/* A segment of the show between the arenas, to watch again: a television in the number's column, and
 * its name a size down from an arena's. */
.row .seg .seg-tv {
  width: 24px;
  height: 20px;
  display: block;
}

.row.segment .nm {
  font-size: 26px;
  color: #cfc8b8;
}

.row.dim .nm {
  color: #4a4741;
}

.row.dim .st,
.row.dim .seg {
  color: #5c5851;
}

.row.sel .nm,
.row.sel .seg {
  color: var(--star);
}

.row.sel .tri {
  opacity: 1;
  transform: none;
  animation: nudge 1.3s ease-in-out infinite;
}

.row.sel::before {
  opacity: 1;
}

.aired {
  color: var(--up);
}

.up-next {
  color: var(--ink);
}

.lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff4b3a;
  box-shadow: 0 0 10px 2px rgba(255, 75, 58, 0.75);
  animation: lamp 1.4s ease-in-out infinite;
}

/* The studio monitor: the one framed object, a television in the studio. */
.tv {
  position: absolute;
  left: 684px;
  top: 112px;
  width: 560px;
  height: 352px;
  border-radius: 20px 20px 16px 16px;
  background: linear-gradient(180deg, #3a3a42 0%, #26262c 6%, #1e1e23 62%, #161619 100%);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.75), inset 0 2px 0 rgba(255, 255, 255, 0.13), inset 0 -4px 0 rgba(0, 0, 0, 0.6);
}

.tv-glass {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 532px;
  height: 305px;
  border-radius: 22px;
  background: #0a0a0c;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9);
}

.tv-screen {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 520px;
  height: 293px;
  border-radius: 18px / 22px;
  overflow: hidden;
  background: #050506;
}

.tv-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.tv-nosignal {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #3a3a40;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0.2) 1px 3px);
  animation: jitter 0.5s steps(2) infinite;
}

.tv-nosignal span {
  font: 400 46px/1 var(--anton);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 0 18px rgba(0, 0, 0, 0.95);
}

.tv-screen[data-signal="none"] .tv-nosignal {
  display: flex;
}

.tv-screen[data-signal="none"] .tv-picture {
  visibility: hidden;
}

.tv-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    radial-gradient(ellipse 75% 75% at 50% 50%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.55) 100%);
}

/* The stand: a neck and a foot under the set. */
.tv::before,
.tv::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
}

.tv::before {
  top: 352px;
  width: 92px;
  height: 30px;
  margin-left: -46px;
  background: linear-gradient(180deg, #121215, #1f1f24);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.tv::after {
  top: 380px;
  width: 260px;
  height: 12px;
  margin-left: -130px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #2c2c33, #17171b);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

.tv-led {
  position: absolute;
  left: 26px;
  bottom: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 6px 1px rgba(139, 224, 78, 0.7);
}

.tv-line {
  position: absolute;
  left: 700px;
  top: 528px;
  width: 530px;
  margin: 0;
  font: 600 19px/1.4 var(--barlow);
  color: #d8d2c4;
}

.go {
  position: absolute;
  left: 700px;
  top: 568px;
  min-height: 56px;
  font: 400 48px/1 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--star);
  text-shadow: 0 3px 0 #8a2018, 0 2px 18px rgba(0, 0, 0, 0.8);
  outline: none;
}

.go.sel,
.go:hover {
  color: #ffe27a;
}

/* ------------------------------------------------------------------------------------------------
 * How to Play: the rules segment. The footage plays whole at its own 16:9 on a studio monitor with
 * nothing laid over it (David, 2026-10-07), the words beside it, the chapters under it. */

.howto-scrim {
  background: radial-gradient(ellipse 40% 62% at 84% 42%, rgba(255, 210, 63, 0.075), rgba(255, 210, 63, 0) 72%),
    radial-gradient(ellipse 52% 58% at 36% 44%, rgba(110, 150, 215, 0.11), rgba(110, 150, 215, 0) 74%),
    linear-gradient(180deg, rgba(14, 14, 18, 0.97) 0%, rgba(11, 11, 14, 0.97) 64%, rgba(6, 6, 8, 0.98) 100%);
}

.howto-head {
  position: absolute;
  left: 48px;
  top: 30px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.howto-head h1 {
  margin: 0;
  font: 400 34px/1 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--red);
}

.howto-kicker {
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cfc8b8;
}

.howto-close {
  position: absolute;
  right: 48px;
  top: 22px;
}

.howto-close:hover .cw,
.howto-close:focus-visible .cw {
  color: var(--star);
}

/* How to Play's controls are ordinary buttons reached by Tab, so they keep a focus ring, in gold. */
.howto-close:focus-visible,
.mark:focus-visible,
.hzw:focus-visible,
.step:focus-visible {
  outline: 3px solid var(--star);
  outline-offset: 4px;
  border-radius: 2px;
}

.mark:focus:not(:focus-visible),
.hzw:focus:not(:focus-visible),
.step:focus:not(:focus-visible) {
  outline: none;
}

.howto-monitor {
  position: absolute;
  left: 48px;
  top: 86px;
  width: 816px;
  height: 466px;
  padding: 8px;
  border-radius: 6px;
  background: #141418;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 26px 64px rgba(0, 0, 0, 0.7), 0 0 150px rgba(110, 150, 215, 0.12);
}

.howto-screen {
  position: relative;
  width: 800px;
  height: 450px;
  overflow: hidden;
  background: #000;
}

.howto-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.howto-screen[data-signal="none"] .tv-nosignal {
  display: flex;
}

.howto-screen[data-signal="none"] .howto-picture,
.howto-screen[data-signal="tuning"] .howto-picture {
  visibility: hidden;
}

.howto-caption {
  position: absolute;
  left: 56px;
  top: 571px;
  width: 800px;
  margin: 0;
  font: 600 18px/1.3 var(--barlow);
  color: #cfc8b8;
}

.howto-on {
  margin-right: 10px;
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--star);
}

/* The crowd chapter's five faces, in the caption's slot as the hazard row is on a hazard: the bar's fan at
 * each mood and at the bar's own size, the one the clip's crowd is in lit, the others dimmed with where
 * each starts. */
.howto-crowd {
  position: absolute;
  left: 56px;
  top: 562px;
  width: 800px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.howto-crowd[hidden] {
  display: none;
}

.howto-mood {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.howto-mood.on {
  opacity: 1;
}

.howto-mood img {
  display: block;
  width: 40px;
  height: 40px;
}

.howto-mood-words {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Each mood's word in its own colour (`--mood`, hud.js `HYPE_INK`). */
.howto-mood-word {
  font: 700 13px/1 var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mood);
}

.howto-mood-at {
  font: 400 16px/1 var(--anton);
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.howto-hazards {
  position: absolute;
  left: 44px;
  top: 560px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.howto-hazard-list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step svg {
  width: 15px;
  height: 17px;
  fill: #cfc8b8;
  transition: fill 0.15s ease;
}

.step:hover svg,
.step:focus-visible svg {
  fill: var(--star);
}

.hzw {
  height: 44px;
  padding: 0 2px;
  font: 700 17px/1 var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfc8b8;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.hzw:hover,
.hzw:focus-visible {
  color: var(--ink);
}

.hzw.on {
  color: var(--star);
}

/* Its gaps are 14px so Riding — keys, the slide, the rockets — fits the stage with a controller's buttons. */
.howto-text {
  position: absolute;
  left: 904px;
  top: 94px;
  width: 328px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.howto-text h2 {
  margin: 0;
  font: 400 64px/0.92 var(--anton);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--red);
}

.howto-text p {
  margin: 0;
  font: 600 20px/1.45 var(--barlow);
}

.howto-text strong {
  font-weight: 700;
}

.howto-text strong[data-tone="star"] {
  color: var(--star);
}

.howto-text strong[data-tone="good"] {
  color: var(--up);
}

.howto-text strong[data-tone="bad"] {
  color: #ff7a5c;
}

.howto-text .howto-tag {
  margin-top: -6px;
  font: 700 26px/1 var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.howto-tag[data-tone="kills"] {
  color: #ff4d3d;
}

.howto-tag[data-tone="crash"] {
  color: #ff9a3c;
}

.howto-tag[data-tone="cost"] {
  color: #f2c14e;
}

.howto-tag[data-tone="oil"] {
  color: #b9a4ff;
}

.howto-tag[data-tone="mud"] {
  color: #d9a866;
}

.howto-tag[data-tone="good"] {
  color: var(--up);
}

.howto-keys {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 9px;
  align-items: baseline;
}

.howto-keys dt {
  justify-self: end;
  font: 700 23px/1 var(--cond);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--star);
}

.howto-keys dd {
  margin: 0;
  font: 600 20px/1.2 var(--barlow);
}

/* A controller's buttons in the key list sit on its lines, so the Riding chapter fits the stage with them. */
.howto-keys .pad-glyph {
  font-size: 0.68em;
}

.howto-pays {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.howto-text .howto-pays-head {
  font: 700 15px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cfc8b8;
}

.howto-pays ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 14px;
  row-gap: 7px;
  align-items: baseline;
}

.howto-pays li {
  display: contents;
}

.howto-pays li span {
  font: 600 17px/1.25 var(--barlow);
}

.howto-pays li b {
  justify-self: end;
  font: 700 22px/1 var(--cond);
  color: var(--up);
  white-space: nowrap;
}

.howto-text .howto-small {
  font: 600 15px/1.3 var(--barlow);
  color: var(--dim);
}

.howto-chapters {
  position: absolute;
  left: 56px;
  bottom: 28px;
  width: 800px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 8px;
}

.mark {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  height: 58px;
  text-align: left;
}

.mark-word {
  font: 700 19px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfc8b8;
  transition: color 0.15s ease;
}

.mark:hover .mark-word,
.mark:focus-visible .mark-word {
  color: var(--ink);
}

.mark.on .mark-word {
  color: var(--star);
}

.mark-track {
  position: relative;
  display: block;
  height: 3px;
  background: rgba(244, 239, 226, 0.22);
}

.mark.done .mark-track {
  background: rgba(244, 239, 226, 0.6);
}

.mark.on .mark-track {
  background: rgba(255, 210, 63, 0.32);
}

.mark-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--star);
}

.mark:not(.on) .mark-fill {
  display: none;
}

.mark-head {
  position: absolute;
  right: -2px;
  top: -6px;
  width: 4px;
  height: 15px;
  background: var(--star);
  box-shadow: 0 0 10px rgba(255, 210, 63, 0.8);
  animation: glow 1.1s ease-in-out infinite;
}

.screen.entering .howto-head,
.screen.entering .howto-close {
  animation: rise 0.45s ease-out 0.75s both;
}

.screen.entering .howto-monitor {
  animation: rise 0.5s ease-out 0.6s both;
}

.screen.entering .mark {
  animation: rise 0.4s ease-out 0.95s both;
}

.howto-text.entering > * {
  animation: rise 0.45s ease-out 0.15s both;
}

.howto-text.entering > h2 {
  animation: wipe 0.5s cubic-bezier(0.7, 0, 0.2, 1) both;
}

.howto-screen[data-signal="live"] .howto-picture {
  animation: tv-on 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ------------------------------------------------------------------------------------------------
 * Standings: the board as a results graphic. The rows are the shared `li.board-row` markup
 * (zapjam-board.js); this styles them as the show's own. */

.board-scrim {
  background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(255, 233, 160, 0.06), rgba(255, 233, 160, 0) 70%),
    linear-gradient(180deg, rgba(14, 14, 17, 0.96) 0%, rgba(12, 12, 15, 0.95) 70%, rgba(24, 10, 8, 0.96) 100%);
}

#board .spot {
  opacity: 0.55;
}

.board-title {
  position: absolute;
  left: 56px;
  top: 34px;
  margin: 0;
  font: 400 76px/0.95 var(--anton);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--red);
}

/* On the heading's line, beside STANDINGS: the figure the All arenas board ranks. */
.board-fame {
  position: absolute;
  left: 392px;
  top: 77px;
}

.board-scopes {
  position: absolute;
  left: 52px;
  top: 128px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.scope {
  position: relative;
  outline: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-left: 22px;
  font: 700 19px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cfc8b8;
  transition: color 0.15s ease;
}

.scope .tri {
  position: absolute;
  left: 0;
  top: 50%;
  width: 13px;
  height: 15px;
  margin-top: -7.5px;
  opacity: 0;
}

.scope.on {
  color: var(--star);
}

.scope.on .tri {
  opacity: 1;
}

.scope.sel span,
.scope:hover span {
  color: var(--ink);
}

.scope.on.sel span,
.scope.on:hover span {
  color: #ffe27a;
}

/* The ▸ marks the board on show; the keys' place is marked too, so Enter is never a guess. */
.scope.sel span,
.board-challenge.sel #board-challenge-word {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.board-arena {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -18px;
}

.board-arena-name {
  min-width: 150px;
  text-align: center;
  font: 400 22px/1 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.step.sel svg {
  fill: var(--star);
}

.board-head {
  position: absolute;
  left: 470px;
  top: 184px;
  width: 100px;
  margin: 0;
  text-align: right;
  font: 700 13px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.board-list,
.board-friends {
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-list {
  position: absolute;
  left: 80px;
  top: 204px;
  width: 680px;
}

.board-list .board-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 100px 170px;
  align-items: baseline;
  column-gap: 14px;
  /* Tall enough for the score and its zaps sub-line: eight rows (the top five, a gap, the viewer and
     a neighbour each side) end at 710 of the stage's 720. */
  height: 52px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.board-list .board-row.gap {
  margin-top: 20px;
}

.board-rank {
  justify-self: end;
  font: 400 32px/1 var(--anton);
  color: #b9b3a6;
  font-variant-numeric: tabular-nums;
}

.board-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 26px/1 var(--cond);
  color: var(--ink);
}

.board-escaped {
  justify-self: end;
  font: 700 20px/1 var(--cond);
  color: #cfc8b8;
  font-variant-numeric: tabular-nums;
}

.board-score {
  justify-self: end;
  font: 400 34px/1 var(--anton);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* What a score is worth in zaps: the shared renderer's sub-line under it (`zapjam-board.js`), the same
 * shape on every board in the catalogue, with this game's type and colour. The cell stacks the value
 * over it, both right-aligned; the coin is the catalogue's own mark, a CSS mask drawn from inline data,
 * so nothing is fetched. */
.board-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.board-score .cell-value {
  line-height: 1;
}

.board-zaps {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font: 700 13px/1 var(--cond);
  letter-spacing: 0.06em;
  color: #cfc8b8;
}

.board-zap-coin {
  display: inline-block;
  vertical-align: -0.15em;
  width: 0.95em;
  height: 0.95em;
  flex: none;
  background: linear-gradient(135deg, #e0f050, #f4d344 42%, #f88b50);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M 515.4 142.5 A 264 264 0 1 1 440.9 85.3' fill='none' stroke='%23000' stroke-width='47' stroke-linecap='round'/%3E%3Cpath d='M -84 -120 L 156 -120 L -12 48 L 156 48 L 84 120 L -156 120 L 12 -48 L -156 -48 Z' fill='%23000' transform='translate(320 310)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M 515.4 142.5 A 264 264 0 1 1 440.9 85.3' fill='none' stroke='%23000' stroke-width='47' stroke-linecap='round'/%3E%3Cpath d='M -84 -120 L 156 -120 L -12 48 L 156 48 L 84 120 L -156 120 L 12 -48 L -156 -48 Z' fill='%23000' transform='translate(320 310)'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* The word " zaps" is for a screen reader; the coin and the number are what a sighted reader needs. */
.board-zap-unit {
  position: fixed;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.board-list .board-row.podium {
  height: 72px;
}

.board-list .board-row.p3 {
  margin-bottom: 10px;
}

.board-list .podium .board-rank {
  font-size: 60px;
}

.board-list .podium .board-name {
  font-size: 30px;
}

.board-list .podium .board-score {
  font-size: 46px;
}

.board-list .p1 .board-rank {
  color: var(--star);
}

.board-list .p2 .board-rank {
  color: #dfe3ee;
}

.board-list .p3 .board-rank {
  color: #e07b3c;
}

.board-row.viewer .board-name,
.board-row.viewer .board-score,
.board-row.viewer .board-rank,
.board-row.viewer .board-escaped {
  color: var(--star);
}

.board-list .board-row.viewer::before {
  content: "";
  position: absolute;
  left: -120px;
  top: 50%;
  width: 760px;
  height: 120px;
  margin-top: -60px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 40% 50%, rgba(255, 210, 63, 0.14), rgba(255, 210, 63, 0) 72%);
}

.board-row.viewer .board-name::after,
.board-row.is-friend .board-name::after {
  margin-left: 12px;
  font: 700 13px/1 var(--cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  vertical-align: middle;
}

.board-row.viewer .board-name::after {
  content: "you";
  color: var(--star);
}

.board-list .board-row.is-friend .board-name::after {
  content: "friend";
  color: var(--dim);
}

.board-status {
  position: absolute;
  left: 80px;
  top: 214px;
  width: 640px;
  margin: 0;
  font: 600 20px/1.4 var(--barlow);
  color: #d8d2c4;
}

.board-status:empty {
  display: none;
}

.board-side {
  position: absolute;
  left: 920px;
  top: 172px;
  width: 310px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.board-side-title {
  margin: 0;
  font: 400 30px/1 var(--anton);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--red);
}

.board-friends {
  align-self: stretch;
  margin-top: -4px;
}

/* Three columns: the escaped cell is not drawn here (`display: none` takes it out of the grid), and a
 * friend's Remove control wraps to its own line under the name. */
.board-friends .board-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  min-height: 38px;
}

.board-friends .board-rank {
  font-size: 24px;
}

.board-friends .board-name {
  font-size: 19px;
}

.board-friends .board-escaped {
  display: none;
}

.board-friends .board-score {
  font-size: 24px;
}

.board-friends .board-row.unranked .board-score {
  font: 600 15px/1 var(--barlow);
  color: var(--dim);
}

.board-friends .board-row > .board-link {
  grid-column: 2 / -1;
  justify-self: start;
  margin: -4px 0 6px;
  font-size: 14px;
}

.board-friends-note,
.board-friends-status,
.board-who {
  margin: 0;
  font: 600 19px/1.4 var(--barlow);
  color: #e9e3d6;
}

.board-who b {
  font-weight: 700;
}

.board-link {
  padding: 0;
  color: #d8d2c4;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.board-link:hover,
.board-link.sel,
.board-link:focus-visible {
  color: var(--star);
}

.board-link-strong,
.board-friends-note .board-link {
  font-weight: 700;
  color: var(--star);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.board-challenge {
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 700 20px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--star);
}

.board-challenge .tri {
  width: 13px;
  height: 15px;
}

.board-challenge.sel,
.board-challenge:hover {
  color: #ffe27a;
}

.board-note {
  position: absolute;
  left: 920px;
  top: 588px;
  width: 310px;
  margin: 0;
  font: 600 15px/1.4 var(--barlow);
  color: #cfc8b8;
}

.board-close {
  position: absolute;
  right: 52px;
  top: 26px;
}

.screen.entering .board-title {
  animation: slam 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.25s both;
}

.screen.entering .board-scopes,
.screen.entering .board-side,
.screen.entering .board-close {
  animation: rise 0.45s ease-out 0.6s both;
}

.screen.entering .board-list .board-row {
  animation: rise 0.4s ease-out 0.7s both;
}

/* The line under FAME, and the quiet links under the actions. */
/* The next arena held back by fame alone: how much more it needs. */
.escaped-held {
  margin: 10px 0 0;
  font: 600 17px/1.35 var(--barlow);
  color: var(--star);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.escaped-board {
  margin: 10px 0 0;
  font: 600 17px/1.35 var(--barlow);
  color: #e9e3d6;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.escaped-board[data-tone="warn"] {
  color: #ffb08a;
}

.escaped-board b {
  font-weight: 700;
}

.escaped-board .board-link {
  margin-left: 6px;
  font-size: 15px;
}

.escaped-board .board-link-strong {
  margin: 0 4px 0 0;
  font-size: 17px;
}

.escaped-links {
  display: flex;
  gap: 26px;
  margin: 14px 0 0;
  font: 600 15px/1 var(--barlow);
}

.escaped-links:not(:has(> :not([hidden]))) {
  display: none;
}

.escaped-links a {
  color: #d8d2c4;
}

.escaped-friends-status {
  font: 600 15px/1.3 var(--barlow);
  color: #d8d2c4;
}

.screen.entering .escaped-board,
.screen.entering .escaped-links {
  animation: rise 0.45s ease-out 3.6s both;
}

/* ------------------------------------------------------------------------------------------------
 * The pause. */

.paused-scrim {
  background: linear-gradient(90deg, rgba(12, 12, 15, 0.92) 0%, rgba(12, 12, 15, 0.72) 45%, rgba(12, 12, 15, 0.35) 100%);
}

.paused-kicker {
  position: absolute;
  left: 74px;
  top: 150px;
  color: var(--star);
}

.paused-word {
  position: absolute;
  left: 72px;
  top: 176px;
  margin: 0;
  font: 400 112px/0.92 var(--anton);
  text-transform: uppercase;
  text-shadow: 5px 5px 0 var(--red);
}

.paused-menu {
  position: absolute;
  left: 72px;
  top: 330px;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------------------------------------------
 * The result screens: shared pieces. */

.stamp {
  margin: 8px 0 0;
  font: 400 104px/1 var(--dirt);
  text-transform: uppercase;
  color: var(--star);
  text-shadow: 6px 6px 0 var(--red);
  transform: rotate(-4deg);
  transform-origin: 20% 60%;
}

.stamp-red {
  margin-top: 6px;
  font-size: 100px;
  color: var(--hot);
  text-shadow: 5px 5px 0 #141414, 8px 8px 0 var(--star);
  transform: rotate(-1deg);
  white-space: nowrap;
}

.screen.entering .stamp {
  animation: stamp 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.55s both;
}

.acts {
  display: flex;
  flex-direction: column;
}

.act {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  outline: none;
  transition: color 0.15s ease;
  font: 700 21px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.act-p {
  font: 400 42px/1 var(--anton);
  letter-spacing: 0.02em;
}

.act .tri {
  position: absolute;
  left: -30px;
  top: 50%;
  width: 17px;
  height: 19px;
  margin-top: -9.5px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.act-p .tri {
  left: -38px;
  width: 24px;
  height: 26px;
  margin-top: -13px;
}

.act .key {
  font: 600 15px/1 var(--cond);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.act::before {
  content: "";
  position: absolute;
  left: -150px;
  top: 50%;
  width: 640px;
  height: 150px;
  margin-top: -75px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 38% 50%, rgba(255, 210, 63, 0.2), rgba(255, 210, 63, 0.07) 45%, rgba(255, 210, 63, 0) 72%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.act.sel {
  color: var(--star);
}

.act.sel .tri {
  opacity: 1;
  transform: none;
  animation: nudge 1.3s ease-in-out 1.6s infinite;
}

.act.sel::before {
  opacity: 1;
}

/* Four actions under the main one, in ESCAPED!'s 560px column: Ride again and Watch replay are longer
 * words than Rerun and Replay were, so the row sets them a size down and closer together. */
.acts-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 2px;
}

.acts-row .act {
  font-size: 19px;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------------------------------------------
 * ESCAPED! */

.escaped-scrim {
  background: linear-gradient(90deg, rgba(12, 12, 15, 0) 0%, rgba(12, 12, 15, 0.2) 30%, rgba(12, 12, 15, 0.7) 46%, rgba(12, 12, 15, 0.84) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
}

.escaped-glow {
  position: absolute;
  left: 20px;
  top: 120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 224, 78, 0.3), rgba(139, 224, 78, 0) 66%);
  animation: glow 2.4s ease-in-out infinite;
}

.escaped-erik {
  left: 30px;
  bottom: -14px;
  width: 460px;
}

.screen.entering .escaped-erik {
  animation: rise-big 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.45s both;
}

/* In the top-left corner, just inside the kerb (David, 2026-10-23), with what this escape raised it by. */
.escaped-fame {
  position: absolute;
  left: 40px;
  top: 44px;
}

.screen.entering .escaped-fame {
  animation: rise 0.45s ease-out 1s both;
}

/* The rise rises once, as the screen comes in; coming back to it, it stands. */
.screen.entering .escaped-fame .ft-rise {
  animation: rise 0.45s ease-out 1.5s both;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti span {
  position: absolute;
  top: 0;
  border-radius: 1px;
  animation: fall linear infinite backwards;
}

.escaped-main {
  position: absolute;
  left: 640px;
  top: 16px;
  width: 560px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.tally {
  position: relative;
  margin-top: 14px;
  width: 480px;
}

.tally-row {
  display: flex;
  align-items: baseline;
  height: 50px;
}

.tally-stat {
  height: 46px;
}

.tally-crowd {
  display: block;
  height: 76px;
}

.tally-line {
  display: flex;
  align-items: baseline;
}

.tally-row .tl {
  font: 700 22px/1 var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9e3d6;
}

.tally-row .td {
  margin-left: 12px;
  font: 700 20px/1 var(--cond);
}

.td[data-tone="bad"] {
  color: #ff7a5c;
}

.td[data-tone="good"] {
  color: var(--up);
}

.td-dim {
  color: var(--dim);
}

.td-star {
  color: var(--star);
}

.td-up {
  color: var(--up);
}

.tally .sp {
  flex: 1;
}

.tally .num {
  font: 400 40px/1 var(--anton);
  font-variant-numeric: tabular-nums;
}

.tally .num-small {
  font-size: 34px;
  color: #e9e3d6;
}

.tally .num-peak {
  color: #ff9a3c;
}

.tally .plus {
  margin-right: 10px;
  font: 400 26px/1 var(--anton);
  color: var(--mute);
}

.loved {
  margin: 8px 0 0;
  font: 500 17px/1.2 var(--barlow);
  color: #cfc8b9;
}

.loved strong {
  display: inline-block;
  font-weight: 700;
  color: #c8f5a8;
}

.tally-rule {
  height: 3px;
  margin: 2px 0 0 250px;
  background: var(--ink);
  opacity: 0.55;
  transform-origin: 100% 50%;
}

.tally-fame {
  position: relative;
  height: 96px;
  margin-top: 4px;
}

.fame-word {
  font: 400 30px/1 var(--anton);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e9e3d6;
}

.fame-note {
  position: absolute;
  left: 0;
  top: 18px;
  font: 700 21px/1 var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  transform: rotate(-6deg);
  transform-origin: 20% 60%;
}

.fame-note[data-tone="up"] {
  color: var(--up);
}

.fame-note[data-tone="down"] {
  color: var(--down);
}

.screen.entering .fame-note {
  animation: thunk 0.45s ease-out 3.4s both;
}

.tally .num-fame {
  font-size: 100px;
  color: var(--star);
  text-shadow: 0 0 30px rgba(255, 210, 63, 0.38), 0 3px 0 rgba(0, 0, 0, 0.5);
}

/* The rows slide in one after another on the count-up's own schedule (screens.js), as keyframes off a
 * visible resting style: the figures are written final before the count starts, so a tab that runs
 * no animation shows the whole tally. */
.screen.entering .tally > * {
  animation: tally-in 0.3s ease-out both;
}

.screen.entering .tally > :nth-child(1) {
  animation-delay: 0.95s;
}

.screen.entering .tally > :nth-child(2) {
  animation-delay: 1.25s;
}

.screen.entering .tally > :nth-child(3) {
  animation-delay: 1.8s;
}

.screen.entering .tally > :nth-child(4) {
  animation-delay: 2s;
}

.screen.entering .tally > :nth-child(5) {
  animation-delay: 2.2s;
}

.screen.entering .tally > .tally-rule {
  animation: rule-in 0.3s ease-out 2.45s both;
}

.screen.entering .tally > .tally-fame {
  animation-delay: 2.55s;
}

.escaped-main .acts {
  margin-top: 16px;
}

.screen.entering .escaped-main .acts {
  animation: rise 0.45s ease-out 3.75s both;
}

/* `overflow: visible`: the unlock lifts the shackle 5 units past the top of the viewBox, and an inline
 * SVG clips to its own box (David, 2026-10-23: "the lock gets cut off on the top"). */
.lock {
  display: none;
  width: 34px;
  height: 34px;
  margin-top: -4px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#escaped-next[data-kind="unlocked"] .lock {
  display: block;
}

.screen.entering #escaped-next[data-kind="unlocked"] .shackle {
  animation: unlock 0.5s ease-out 4.15s both;
}

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
  opacity: 0;
}

.screen.entering .flash {
  animation: flash 0.4s ease-out both;
}

/* ------------------------------------------------------------------------------------------------
 * Escape failed: the telestrator. */

.failed-pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(14, 14, 17, 0) 45%, rgba(120, 16, 10, 0.5) 100%);
  animation: pulse-red 2.6s ease-in-out infinite;
}

.failed-scrim {
  background: radial-gradient(ellipse 72% 78% at 0% 100%, rgba(10, 10, 13, 0.9) 0%, rgba(10, 10, 13, 0.72) 42%, rgba(10, 10, 13, 0) 78%);
}

#failed[data-side="right"] .failed-scrim {
  background: radial-gradient(ellipse 72% 78% at 100% 100%, rgba(10, 10, 13, 0.9) 0%, rgba(10, 10, 13, 0.72) 42%, rgba(10, 10, 13, 0) 78%);
}

.static {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0 1px, rgba(0, 0, 0, 0.25) 1px 2px, rgba(255, 255, 255, 0.06) 2px 4px);
  background-size: 100% 7px;
}

.screen.entering .static {
  animation: static 1s ease-out both;
}

.chalk {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* At rest every stroke is drawn; the entry draws it in from dashed-out, so a reader who asked for less
 * motion, or a tab that runs no animation, still sees the ring and the arrow. */
.chalk path {
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: 0;
}

.chalk-ink {
  stroke: var(--star);
  stroke-width: 6;
  filter: url(#mc-chalk-rough);
}

.chalk-shade {
  stroke: #000;
  stroke-opacity: 0.55;
  stroke-width: 11;
  filter: url(#mc-chalk-shade);
}

.chalk-head {
  --len: 80;
}

.screen.entering .chalk-loop {
  animation: draw 0.75s cubic-bezier(0.4, 0, 0.3, 1) 1s both;
}

.screen.entering .chalk-arrow {
  animation: draw 0.45s ease-out 1.75s both;
}

.screen.entering .chalk-head {
  animation: draw 0.2s ease-out 2.15s both;
}

.chalk-note {
  position: absolute;
  margin: 0;
  font: 400 22px/1.28 var(--marker);
  color: var(--star);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.75);
  transform: rotate(-2deg);
  transform-origin: 0 0;
}

.screen.entering .chalk-note {
  animation: write 1.1s linear 2.2s both;
}

.failed-block {
  position: absolute;
  left: 24px;
  right: auto;
  bottom: 22px;
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

#failed[data-side="right"] .failed-block {
  left: auto;
  right: 24px;
  flex-direction: row-reverse;
}

.failed-erik {
  position: relative;
  flex: none;
  width: 176px;
}

.screen.entering .failed-erik {
  animation: erik-up 0.7s cubic-bezier(0.3, 0.9, 0.3, 1) 0.8s both;
}

.failed-main {
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

#failed[data-side="right"] .failed-main {
  align-items: flex-end;
  text-align: right;
}

.failed-stats {
  margin: 12px 0 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.failed-stats b {
  font: 400 22px/1 var(--anton);
  letter-spacing: 0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.failed-stats #failed-fame {
  font-size: 26px;
}

.failed-stats .star {
  color: var(--star);
}

.failed-stats .dot {
  color: #6f6a62;
}

.failed-main .acts {
  margin-top: 10px;
  flex-direction: row;
  align-items: center;
  gap: 50px;
  padding-left: 38px;
}

#failed[data-side="right"] .failed-main .acts {
  padding-left: 0;
}

.screen.entering .failed-main .acts {
  animation: rise 0.45s ease-out 1.5s both;
}

/* A possible solution, offered from the third failed ride of an arena: a line of its own under the
 * actions, where the row has no room left. */
.failed-help {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 0;
  padding-left: 38px;
}

.failed-help[hidden] {
  display: none;
}

#failed[data-side="right"] .failed-help {
  padding-left: 0;
}

.failed-help-word {
  font: 700 17px/1 var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--star);
}

.failed-help .act {
  padding-left: 30px;
}

.failed-help .act .tri {
  left: 0;
}

.screen.entering .failed-help {
  animation: rise 0.45s ease-out 1.7s both;
}

/* ================================================================================================
 * The plain card: a level editor's test ride and a saved run's playback end here (dev furniture). */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 12, 0.55);
}

.card {
  min-width: 260px;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
}

.card h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.card p {
  margin: 0 0 16px;
  color: var(--dim);
}

.card button {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--star);
  color: #1b1b1f;
  font-weight: 700;
}

.result-card {
  min-width: 320px;
}

#result[data-end="escape"] h1 {
  color: var(--up);
}

#result[data-end="shut"] h1,
#result[data-end="killed"] h1 {
  color: var(--down);
}

.card .eyebrow {
  margin-bottom: 2px;
  color: var(--star);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card .result-total {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.card .result-best {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

.card .result-best[data-tone="up"] {
  color: var(--up);
}

.card .result-best[data-tone="down"] {
  color: var(--down);
}

.card .result-meta {
  margin-bottom: 18px;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.card .card-keys {
  margin: 12px 0 0;
  font-size: 13px;
}

/* ================================================================================================
 * Motion. */

@keyframes bug-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes pop {
  0% {
    transform: scale(1.45);
  }
}

@keyframes float-down {
  0% {
    opacity: 0;
    transform: translateY(-2px);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

@keyframes shake {
  20% {
    transform: translate(-5px, 1px);
  }
  40% {
    transform: translate(4px, -2px);
  }
  60% {
    transform: translate(-3px, 2px);
  }
  80% {
    transform: translate(2px, -1px);
  }
}

@keyframes urgent {
  50% {
    opacity: 0.3;
  }
}

@keyframes curtain {
  from {
    transform: skewX(-14deg) translateX(-8%);
  }
  to {
    transform: skewX(-14deg) translateX(125%);
  }
}

@keyframes slam {
  0% {
    opacity: 0;
    transform: scale(1.4);
  }
  60% {
    opacity: 1;
    transform: scale(0.97);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes rise-big {
  from {
    opacity: 0;
    transform: translateY(90px);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

@keyframes nudge {
  50% {
    transform: translateX(6px);
  }
}

@keyframes bob {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes bob-small {
  50% {
    transform: translateY(-3px);
  }
}

@keyframes sign-sway {
  0%,
  100% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-3deg);
  }
}

@keyframes sign-sway-b {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

@keyframes lamp {
  50% {
    opacity: 0.55;
    box-shadow: 0 0 4px 0 rgba(255, 75, 58, 0.4);
  }
}

@keyframes jitter {
  20% {
    transform: translateX(-2px);
  }
  40% {
    transform: translateX(1px);
  }
  60% {
    transform: translateX(-1px);
  }
  80% {
    transform: translateX(2px);
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: scale(2.6) rotate(-10deg);
  }
  62% {
    opacity: 1;
    transform: scale(0.93) rotate(-4deg);
  }
}

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

@keyframes rule-in {
  from {
    transform: scaleX(0);
  }
}

@keyframes thunk {
  0% {
    opacity: 0;
    transform: scale(2.1) rotate(4deg);
  }
  65% {
    opacity: 1;
    transform: scale(0.94) rotate(-7deg);
  }
}

@keyframes unlock {
  40%,
  100% {
    transform: translateY(-5px);
  }
}

@keyframes fall {
  from {
    transform: translate3d(0, -60px, 0) rotate(0);
  }
  to {
    transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot));
  }
}

@keyframes flash {
  from {
    opacity: 0.95;
  }
}

@keyframes pulse-red {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes static {
  0% {
    opacity: 0.85;
    background-position: 0 0;
  }
  30% {
    opacity: 0.55;
    background-position: 0 -40px;
  }
  100% {
    opacity: 0.06;
    background-position: 0 -400px;
  }
}

@keyframes erik-up {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  70% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: var(--len, 2000);
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes write {
  from {
    clip-path: inset(-20px 100% -20px -20px);
  }
  to {
    clip-path: inset(-20px -20px -20px -20px);
  }
}

@keyframes wipe {
  from {
    clip-path: inset(-20% 100% -20% 0);
  }
  to {
    clip-path: inset(-20% -4% -20% 0);
  }
}

@keyframes tv-on {
  0% {
    transform: scaleY(0.012) scaleX(0.5);
    filter: brightness(4);
  }
  40% {
    transform: scaleY(0.012) scaleX(1);
    filter: brightness(3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .curtain,
  .confetti {
    display: none;
  }
}

/* ---------------------------------------------------------------------------------------------
   Controls (David, 2026-10-12): a row per riding action — its name, two key caps and the
   controller's button — in the show's type, the slot the arrows have lit in gold, and the slot
   waiting for a press pulsing green. */

.controls-scrim {
  background: radial-gradient(ellipse 60% 60% at 20% 10%, rgba(255, 210, 63, 0.06), rgba(255, 210, 63, 0) 70%),
    linear-gradient(90deg, rgba(12, 12, 15, 0.96) 0%, rgba(12, 12, 15, 0.9) 60%, rgba(12, 12, 15, 0.82) 100%);
}

.controls-kicker {
  position: absolute;
  left: 74px;
  top: 44px;
  color: var(--star);
}

.controls-word {
  position: absolute;
  left: 72px;
  top: 66px;
  margin: 0;
  font: 400 76px/0.95 var(--anton);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--red);
}

.controls-close {
  position: absolute;
  right: 52px;
  top: 26px;
}

.controls-table {
  position: absolute;
  left: 74px;
  top: 178px;
  width: 860px;
}

.ct-head,
.ct-row {
  display: grid;
  grid-template-columns: 300px 150px 150px 220px;
  column-gap: 12px;
  align-items: center;
}

.ct-head {
  height: 30px;
  font: 700 14px/1 var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.ct-row {
  height: 48px;
}

.ct-name {
  font: 600 22px/1 var(--barlow);
  color: var(--ink);
}

.ct-slot,
.ct-reset {
  height: 38px;
  border: 2px solid rgba(233, 227, 214, 0.35);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--ink);
  font: 700 19px/1 var(--cond);
  letter-spacing: 0.06em;
  outline: none;
  cursor: pointer;
}

.ct-slot.sel,
.ct-reset.sel {
  border-color: var(--star);
  color: var(--star);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.2);
}

.ct-slot.ct-waiting {
  border-color: var(--up);
  color: var(--up);
  animation: ct-wait 0.9s ease-in-out infinite alternate;
}

@keyframes ct-wait {
  from {
    box-shadow: 0 0 0 0 rgba(84, 214, 132, 0.2);
  }
  to {
    box-shadow: 0 0 0 6px rgba(84, 214, 132, 0.25);
  }
}

.ct-fixed {
  font: 600 17px/1 var(--cond);
  letter-spacing: 0.06em;
  color: var(--dim);
}

.ct-row-fixed {
  margin-top: 6px;
}

.controls-note {
  position: absolute;
  left: 74px;
  top: 612px;
  margin: 0;
  font: 600 18px/1.3 var(--barlow);
  color: #e9e3d6;
}

.ct-reset {
  position: absolute;
  left: 74px;
  top: 650px;
  padding: 0 18px;
}

/* A controller arriving or leaving: a strip at the top of the window for a moment. */
.pad-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 60;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 12, 15, 0.9);
  border: 1px solid rgba(255, 210, 63, 0.5);
  font: 700 16px/1 var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--star);
  pointer-events: none;
}

/* ================================================================================================
 * A touch-only device (a phone, a tablet with no mouse). There is no touch scheme yet (_doc.md, Title
 * block), so the page says so rather than naming keys the device has not got: the title's tagline and
 * the pad's keys give way to the line that needs a keyboard or a controller, until one is used on the
 * page (`data-in-hand`, game.js). Held upright it asks to be turned, since the 1280 × 720 stage at a
 * phone's portrait width is past reading. Last in the file, so source order settles it. */

.turn-sideways {
  display: none;
}

.turn-phone {
  width: 88px;
  height: 88px;
  fill: none;
  stroke: var(--star);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.turn-word {
  margin: 0;
  font: 400 34px/1.05 var(--anton);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.turn-line {
  margin: 0;
  max-width: 320px;
  font: 600 16px/1.45 var(--barlow);
  color: var(--dim);
}

@media (hover: none) and (pointer: coarse) {
  body:not([data-in-hand]) .tagline,
  body:not([data-in-hand]) .hint-keys {
    display: none;
  }

  body:not([data-in-hand]) .hint-touch {
    display: block;
  }

  body:not([data-in-hand]) .touch-need {
    display: block;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .turn-sideways {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    background: #0e0e11;
  }
}
