/* Arcade: a loud retro cabinet, neon tubes on near-black, scanlines and a high-score roster.
   Every rule sits under html[data-theme="arcade"] and every @keyframes name starts with arcade-, so nothing here reaches
   another look.

   The cabinet: near-black with hot pink, cyan and yellow neon that glows and buzzes on, and a faint CRT over the TV
   (scanlines, a soft glow where the glass curves away; theme.js lays it). Titles are in a pixel face (Press Start 2P),
   everything people read in a clear one (Oxanium). The picked game plays as the attract-mode screen, its art on a
   monitor and a blinking PRESS START for Play; every other game is a lit cabinet marquee in the row under it; the
   players are a high-score table, P1 down, each in their own color; the join code is a coin door: INSERT PHONE.
   On a phone: SELECT PLAYER with chunky neon buttons, your own card as the ready screen, the host's games as marquees
   with a round arcade button, and HOST IS CHOOSING while someone else picks.

   The cabinet carries on inside every game: the palette is set on the whole page, so a game's plates and type take
   the cabinet's near-black, neon and Oxanium through the tokens, and its shared parts are dressed through data-part,
   never through a game's own classes: the banner as a lit marquee, the lobby roster as the high-score table, the
   buttons and switches as cabinet buttons, the start dock as PRESS START, the paused cover and the finale as the
   cabinet's own screens. Cyan stays a game's live color (the teams are named Cyan and Gold, and the cabinet's yellow
   is their gold). A game's own play board is drawn in games/<id>.css. Lite mode keeps the cabinet but stills it (no
   buzzing, no blinking, no rolling scanline, fewer glows), and reduced motion holds every light on and still. Nothing
   blinks faster than once a second. */

/* ---------- the palette ---------- */

html[data-theme="arcade"] {
  --ar-black: #07050D;
  --ar-black-rgb: 7, 5, 13;
  --ar-cab-rgb: 17, 12, 30;
  --ar-cab: #110C1E;
  --ar-cab-2: #19122B;
  --ar-cab-3: #241A3B;
  --ar-pink: #FF3AA0;
  --ar-pink-rgb: 255, 58, 160;
  --ar-pink-core: #FFD3EA;
  --ar-cyan: #35F4FF;
  --ar-cyan-rgb: 53, 244, 255;
  --ar-cyan-core: #DDFDFF;
  --ar-yellow: #FFE83D;
  --ar-yellow-rgb: 255, 232, 61;
  --ar-yellow-core: #FFF9C9;
  --ar-red: #FF4A3D;
  --ar-red-rgb: 255, 74, 61;
  --ar-ink: #F6F2FF;
  --ar-ink-2: #D2CAEA;
  --ar-ink-3: #A79FC6;
  --ar-on-yellow: #1C1500;
  --ar-pixel: 'Press Start 2P', 'Courier New', monospace;
  --ar-body: 'Oxanium', 'Chakra Petch', 'Arial Narrow', sans-serif;
  /* A neon tube: a hot white core, then its color close in and far out. */
  --ar-glow-pink: 0 0 0.06em #FFFFFF, 0 0 0.18em rgba(var(--ar-pink-rgb), 0.95), 0 0 0.6em rgba(var(--ar-pink-rgb), 0.7), 0 0 1.4em rgba(var(--ar-pink-rgb), 0.45);
  --ar-glow-cyan: 0 0 0.06em #FFFFFF, 0 0 0.18em rgba(var(--ar-cyan-rgb), 0.95), 0 0 0.6em rgba(var(--ar-cyan-rgb), 0.65), 0 0 1.4em rgba(var(--ar-cyan-rgb), 0.4);
  --ar-glow-yellow: 0 0 0.06em #FFFFFF, 0 0 0.18em rgba(var(--ar-yellow-rgb), 0.95), 0 0 0.6em rgba(var(--ar-yellow-rgb), 0.6), 0 0 1.4em rgba(255, 170, 30, 0.45);
  /* The scanlines and the dot mask a CRT shows up close. */
  --ar-scan: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.32) 2px 3px);
  --ar-mask: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0 0.7px, transparent 1.2px) 0 0 / 4px 4px;

  /* The whole page takes the cabinet's colors and type, the hub and every game alike. The tokens keep their names, so
     every shell and game rule that points at them (a plate's surface, the gold, the face) follows without being
     written again. Cyan stays the live color, gold becomes the cabinet's yellow, corners are a molded plastic round
     instead of a cut, and the tubes stay lit (--glow). */
  --obsidian: #07050D;
  --obsidian-rgb: 7, 5, 13;
  --surface-sunk: #05030A;
  --surface-0: #0B0714;
  --surface-1: #110C1E;
  --surface-2: #160F26;
  --surface-3: #1D1531;
  --surface-4: #261C40;
  --surface-glass-rgb: 17, 12, 30;
  --stage: #110C1E;
  --stage-2: #19122B;
  --stage-light-rgb: 60, 30, 110;
  --stage-pool-rgb: 120, 30, 100;
  --stage-deep-rgb: 30, 14, 60;
  --cyan: var(--ar-cyan);
  --cyan-rgb: var(--ar-cyan-rgb);
  --on-cyan: #001A1D;
  --cyan-metal: linear-gradient(180deg, #A8FBFF, var(--ar-cyan) 55%, #12C6D6);
  --gold: var(--ar-yellow);
  --gold-rgb: var(--ar-yellow-rgb);
  --gold-hi: var(--ar-yellow-core);
  --gold-text: var(--ar-yellow);
  --gold-metal: linear-gradient(180deg, #FFF6A8, var(--ar-yellow) 45%, #F2C400);
  --gold-metal-tv: linear-gradient(180deg, #FFF6A8, var(--ar-yellow) 45%, #F2C400);
  --gold-shade-rgb: 120, 90, 0;
  --gold-floor: rgba(46, 36, 4, 0.85);
  --on-gold: var(--ar-on-yellow);
  --on-gold-2: #3A2C00;
  --ink-title: #FFFFFF;
  --ink: var(--ar-ink);
  --ink-2: var(--ar-ink-2);
  --ink-3: var(--ar-ink-3);
  --line: rgba(var(--ar-cyan-rgb), 0.28);
  --paper: #FFFFFF;
  --paper-ink: #0B0714;
  --display: var(--ar-body);
  --bevel: 0px;
  --radius: 0.6rem;
  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --rim-hi: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  accent-color: var(--ar-yellow);
  caret-color: var(--ar-yellow);
}

/* ---------- the materials (tokens.css): neon in the dark ---------- */

/* What the four dimensional games are built from. In the arcade they are cabinet parts: black plastic faces with a
   neon tube along the rim, lit from around instead of throwing a hard shadow, on a stage that pulses with pink haze.
   The glows scale with --glow, so lite mode can put them out. The scrim behind words that float over the stage is the
   cabinet black. */
html[data-theme="arcade"] {
  --gc-scrim: rgba(var(--ar-black-rgb), 0.76);
  --gc-scrim-ink: var(--ar-ink);
  --ar-chrome: #3B3354;
  --ar-baize: #1A0B2E;
  --ar-tile: #1D1531;
  --gc-stage-1: var(--ar-cab-2);
  --gc-stage-2: var(--ar-black);
  --gc-stage-light: rgba(var(--ar-pink-rgb), 0.22);
  --gc-stage-motion: 16s;
  --gc-prop-face: var(--ar-cab-2);
  --gc-prop-edge: var(--ar-black);
  --gc-prop-rim: var(--ar-cyan);
  --gc-prop-depth: 8px;
  --gc-prop-shadow: 0 0 18px rgba(var(--ar-cyan-rgb), calc(0.55 * var(--glow))), 0 0 60px rgba(var(--ar-pink-rgb), calc(0.28 * var(--glow))), 0 20px 36px rgba(0, 0, 0, 0.6);
  --gc-prop-sheen: linear-gradient(180deg, rgba(var(--ar-cyan-rgb), 0.12), transparent 35%), var(--ar-scan);
  --gc-ctl-face: var(--ar-cab-3);
  --gc-ctl-ink: var(--ar-cyan-core);
  --gc-ctl-edge: var(--ar-black);
  --gc-ctl-shadow: 0 0 14px rgba(var(--ar-pink-rgb), calc(0.5 * var(--glow))), 0 8px 16px rgba(0, 0, 0, 0.6);
  --gc-ctl-press: 0 3px;
  --gc-ctl-radius: 0.6rem;
  --gc-outline-w: 2px;
  --gc-outline: var(--ar-cyan);
  --gc-metal:
    linear-gradient(180deg, transparent 47%, rgba(var(--ar-cyan-rgb), 0.35) 49%, transparent 51%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #5A5370, #231C38 46%, var(--ar-chrome) 52%, #120D1F);
  --gc-felt:
    linear-gradient(rgba(var(--ar-cyan-rgb), 0.12) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(var(--ar-cyan-rgb), 0.12) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(var(--ar-pink-rgb), 0.16), transparent 70%),
    linear-gradient(var(--ar-baize), #0B0616);
  --gc-paper: repeating-linear-gradient(180deg, #E6F5E0 0 18px, #FFFFFF 18px 36px);
  --gc-flap:
    linear-gradient(180deg, transparent calc(50% - 1px), rgba(0, 0, 0, 0.9) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, var(--ar-tile) 50%, var(--ar-cab) 50%);
}
html[data-theme="arcade"] ::selection { color: var(--ar-black); background: var(--ar-yellow); }

/* Buttons are cabinet buttons: a lit face, a thick plastic edge under it, and they sink when pressed. The hub's, the
   drawer's and every game's alike. */
html[data-theme="arcade"] body :is(.btn, [data-part="button"]) {
  --edge: 0;
  clip-path: none; border-radius: 10px;
  font-family: var(--ar-body); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
html[data-theme="arcade"] body :is(.btn, [data-part="button"]).gold {
  --face: linear-gradient(180deg, #FFF6A8, var(--ar-yellow) 42%, #F5CC00);
  --fg: var(--ar-on-yellow);
  background: var(--face);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -0.42em 0 #C49A00, 0 0 0 2px #5C4600, 0 0 1.1em rgba(var(--ar-yellow-rgb), 0.4);
}
html[data-theme="arcade"] body :is(.btn, [data-part="button"]).gold:active:not(:disabled) { transform: translateY(0.18em); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -0.2em 0 #C49A00, 0 0 0 2px #5C4600; }
html[data-theme="arcade"] body :is(.btn, [data-part="button"]).ghost {
  --bg: rgba(var(--ar-cyan-rgb), 0.06); --fg: var(--ar-cyan-core);
  box-shadow: inset 0 0 0 2px var(--ar-cyan), inset 0 0 0.8em rgba(var(--ar-cyan-rgb), 0.25), 0 0 0.8em rgba(var(--ar-cyan-rgb), 0.3);
}
html[data-theme="arcade"] body :is(.btn, [data-part="button"])::after { border-radius: inherit; }
html[data-theme="arcade"] body :is(.btn, button):focus-visible { outline: 3px solid var(--ar-yellow); outline-offset: 4px; }

/* Switches everywhere (the join card, the drawer, a game's mode and round pickers): a black slot, the pick lit cyan. */
html[data-theme="arcade"] :is(.seg, [data-part="seg"]) {
  clip-path: none; border-radius: 10px; padding: 0.4vh;
  background: var(--ar-black); box-shadow: inset 0 0 0 1.5px rgba(var(--ar-cyan-rgb), 0.35);
}
html[data-theme="arcade"] :is(.seg, [data-part="seg"]) button { border-radius: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ar-ink-2); }
html[data-theme="arcade"] :is(.seg, [data-part="seg"]) button:hover { color: #FFFFFF; }
html[data-theme="arcade"] :is(.seg, [data-part="seg"]) button[aria-checked='true'] {
  color: var(--on-cyan); background: var(--ar-cyan);
  box-shadow: inset 0 -3px 0 rgba(0, 80, 90, 0.5), 0 0 1.2rem rgba(var(--ar-cyan-rgb), 0.45);
}
html[data-theme="arcade"] body.phone :is(.seg, [data-part="seg"]) { padding: 4px; }
html[data-theme="arcade"] body.phone :is(.seg, [data-part="seg"]) button { min-height: 46px; }
/* Inside a switch the focus ring sits on the button, so it does not run over the next one. */
html[data-theme="arcade"] :is(.seg, [data-part="seg"]) button:focus-visible { outline-offset: -3px; }
html[data-theme="arcade"] :is(.hub-view, .howto) kbd {
  font-family: var(--ar-body); font-weight: 800; border-radius: 4px;
  color: var(--ar-ink); background: var(--ar-cab-3);
  box-shadow: inset 0 0 0 1px rgba(var(--ar-cyan-rgb), 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.45);
}
html[data-theme="arcade"] :is(.hub-view, .howto) .btn.gold kbd { color: var(--ar-on-yellow); background: rgba(90, 60, 0, 0.14); box-shadow: inset 0 0 0 1px rgba(90, 60, 0, 0.5); }

/* ---------- TV: the cabinet ---------- */

/* The dark of the cabinet: near-black, the dot mask of the glass, a pink tube's glow pooled low on the left and a cyan
   one high on the right. The same cabinet stands behind every game. */
html[data-theme="arcade"] body.tv .spotlights {
  background:
    var(--ar-mask),
    radial-gradient(ellipse 60% 42% at 8% 104%, rgba(var(--ar-pink-rgb), 0.24), transparent 70%),
    radial-gradient(ellipse 46% 40% at 96% -4%, rgba(var(--ar-cyan-rgb), 0.14), transparent 70%),
    radial-gradient(ellipse 70% 60% at 40% 46%, #160E2A, transparent 80%),
    var(--ar-black);
}
html[data-theme="arcade"] body.tv .spotlights::before { opacity: 0; }
html[data-theme="arcade"] body:is(.tv, .phone) { background-color: transparent; }
html[data-theme="arcade"]:has(body:is(.tv, .phone)) { background-color: var(--ar-black); }

/* The CRT (theme.js): scanlines over the hub, the glass darkening where it curves away at the edges, and once in a
   while a faint bright band rolling down. Over the hub and its how-to, under the wipe and the sting, gone in a game. */
html[data-theme="arcade"] .arcade-crt {
  position: fixed; inset: 0; z-index: 33; pointer-events: none; overflow: hidden;
  background:
    var(--ar-scan),
    radial-gradient(ellipse 120% 125% at 50% 50%, transparent 58%, rgba(var(--ar-black-rgb), 0.42) 86%, rgba(var(--ar-black-rgb), 0.85) 100%);
  opacity: 0.55;
  transition: opacity 400ms var(--ease-out), visibility 0s;
}
html[data-theme="arcade"] .arcade-crt::before {
  content: ''; position: absolute; inset: 0; border-radius: 3vh;
  box-shadow: inset 0 0 6vh rgba(var(--ar-cyan-rgb), 0.06), inset 0 0 1.4vh rgba(0, 0, 0, 0.7);
}
html[data-theme="arcade"] .arcade-crt::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18vh;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.035) 50%, transparent);
  transform: translateY(-20vh);
  animation: arcade-roll 9s linear infinite;
}
@keyframes arcade-roll { 0% { transform: translateY(-20vh); } 70%, 100% { transform: translateY(120vh); } }
html[data-theme="arcade"] body[data-view="game"] .arcade-crt { opacity: 0; visibility: hidden; transition: opacity 250ms ease-in, visibility 0s 250ms; }
/* Hidden during a game, the band rests too, so it costs the TV nothing while people play. */
html[data-theme="arcade"] body[data-view="game"] .arcade-crt::after { animation-play-state: paused; }

/* Neon buzzing on: bright, a dip, bright, a smaller dip, lit. Two dips in about a second, so it never strobes. */
@keyframes arcade-buzz {
  0% { opacity: 0.08; }
  12% { opacity: 1; }
  22% { opacity: 0.35; }
  34% { opacity: 1; }
  62% { opacity: 1; }
  70% { opacity: 0.6; }
  80%, 100% { opacity: 1; }
}
/* Now and then a tube catches for a moment, as old ones do. */
@keyframes arcade-catch { 0%, 94% { opacity: 1; } 95% { opacity: 0.55; } 97%, 100% { opacity: 1; } }
/* PRESS START: on for most of a second, off for a moment. Once a second, far under the flashing limit. */
@keyframes arcade-blink { 0%, 64% { opacity: 1; } 68%, 96% { opacity: 0.6; } 100% { opacity: 1; } }

/* ---------- TV: the top bar ---------- */

/* GAME CENTER as a pink neon sign, buzzing on when the cabinet comes up. */
html[data-theme="arcade"] .top { padding-top: var(--gc-safe-y); }
html[data-theme="arcade"] .top .mark {
  gap: 0.9em;
  font-family: var(--ar-pixel); font-weight: 400; font-size: var(--tv-base); letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase;
  color: var(--ar-pink-core);
  text-shadow: var(--ar-glow-pink);
  animation: arcade-buzz 1100ms linear both, arcade-catch 13s linear 2s infinite;
}
html[data-theme="arcade"] .top .mark .mark-grid { display: none; }
html[data-theme="arcade"] .top .mark-game { font-family: var(--ar-pixel); color: var(--ar-cyan-core); text-shadow: var(--ar-glow-cyan); letter-spacing: 0.02em; }
html[data-theme="arcade"] .top .mark-game::before { color: var(--ar-yellow); text-shadow: none; }
html[data-theme="arcade"] body[data-view="game"] .top .mark { font-size: var(--tv-sm); }
/* The quiet lines (status, hints, notes, the goal, the phone's lede) share one softer ink. */
html[data-theme="arcade"] :is(.top .status, .rail .join-hint, .hub-roster .roster-note, [data-part="game-roster"] .roster-note, .howto-goal, .hub-app .lede) { font-weight: 600; color: var(--ar-ink-2); }

/* The tools: chunky square buttons with a cyan tube round each. */
html[data-theme="arcade"] .top .tool {
  clip-path: none; border-radius: 8px;
  color: var(--ar-cyan-core);
  background: var(--ar-cab-2);
  box-shadow: inset 0 0 0 2px rgba(var(--ar-cyan-rgb), 0.55), inset 0 -4px 0 rgba(0, 0, 0, 0.5), 0 0 0.9rem rgba(var(--ar-cyan-rgb), 0.18);
}
html[data-theme="arcade"] .top .tool:hover { color: #FFFFFF; background: var(--ar-cab-3); box-shadow: inset 0 0 0 2px var(--ar-cyan), inset 0 -4px 0 rgba(0, 0, 0, 0.5), 0 0 1.2rem rgba(var(--ar-cyan-rgb), 0.4); }
html[data-theme="arcade"] .top .tool:focus-visible, html[data-theme="arcade"] :is(.hub-app, .drawer) .row:focus-visible { outline: 3px solid var(--ar-yellow); outline-offset: 3px; }
html[data-theme="arcade"] .top .tool.wide { font-family: var(--ar-body); font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
html[data-theme="arcade"] .top .audio-hint { clip-path: none; border-radius: 8px; font-weight: 800; color: var(--ar-on-yellow); background: var(--ar-yellow); box-shadow: 0 0 1.2rem rgba(var(--ar-yellow-rgb), 0.45); }

/* ---------- TV: the home screen ---------- */

/* The headline, the attract screen, the row of marquees, the keys. The strip under the classic shelf is gone: the
   attract screen carries the picked game's facts and its Play. The row of marquees has a height of its own and the
   attract screen takes what is left, so stepping through the games never moves or squeezes the row, however long a
   game's name or blurb runs. */
html[data-theme="arcade"] .hub-view { grid-template-rows: auto minmax(0, 1fr) 25vh auto; padding-bottom: var(--gc-safe-y); }
html[data-theme="arcade"] .hub-view:has(.shelf.solo) { grid-template-rows: auto minmax(0, 1fr) auto; }
html[data-theme="arcade"] .hub-view .banner { position: relative; height: auto; padding: 0.4vh 11vw 1.6vh; }
/* Two cabinet characters either side of the headline. They hop the way a sprite does, in whole steps rather than a
   glide, half a beat apart (transform only; still in lite and reduced motion). */
@keyframes arcade-sprite-hop {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-0.6vh); }
  50% { transform: translateY(-1.2vh); }
  75% { transform: translateY(-0.6vh); }
}
html[data-theme="arcade"] .hub-view .banner::before,
html[data-theme="arcade"] .hub-view .banner::after {
  content: ''; position: absolute; bottom: 0.6vh; z-index: 2; pointer-events: none;
  background: center bottom / contain no-repeat;
  filter: drop-shadow(0 0.7vh 0 rgba(4, 2, 10, 0.5));
  animation: arcade-sprite-hop 0.8s steps(1, end) infinite;
}
html[data-theme="arcade"] .hub-view .banner::before { left: 2.4vw; width: 10vh; height: 9vh; background-image: url(/assets/looks/arcade/mascots/mascot-pixel.webp); }
html[data-theme="arcade"] .hub-view .banner::after { right: 2.4vw; width: 9vh; height: 9.6vh; background-image: url(/assets/looks/arcade/mascots/mascot-gamepad.webp); animation-delay: -0.4s; }
html[data-theme="arcade"] .hub-view .headline {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 2.7rem; line-height: 1.25; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
}
html[data-theme="arcade"] .hub-view .headline.long { font-size: 2.1rem; }
html[data-theme="arcade"] .hub-view .banner.pop .headline { animation: arcade-buzz 900ms linear both; }
html[data-theme="arcade"] .hub-view .subline { margin-top: 1.4vh; font-weight: 600; color: var(--ar-ink-2); }
html[data-theme="arcade"] .hub-view .subline :is(b, strong, span) { color: var(--ar-cyan); }
html[data-theme="arcade"] .hub-view .shelf-pick { display: none; }
html[data-theme="arcade"] .hub-view .shelf { grid-template-rows: minmax(0, 1fr); padding: 2.2vh 0 1vh; filter: none; }
html[data-theme="arcade"] .hub-view .actions { min-height: 5vh; }
html[data-theme="arcade"] .hub-view .hub-keys { color: var(--ar-ink-3); font-weight: 600; }

/* The attract screen: the picked game on a monitor in the cabinet. A plastic bezel, dark curved glass, the art on the
   left and the game's name, blurb and PRESS START on the right, with the screen's scanlines over the lot. */
html[data-theme="arcade"] .hub-view .feature {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; column-gap: 2.2vw;
  min-height: 0; overflow: hidden;
  padding: 2.4vh 2vw;
  border-radius: 3.2vh;
  background:
    radial-gradient(ellipse 80% 90% at 30% 40%, rgba(var(--ar-cyan-rgb), 0.08), transparent 70%),
    radial-gradient(ellipse 70% 80% at 80% 70%, rgba(var(--ar-pink-rgb), 0.08), transparent 70%),
    radial-gradient(ellipse 110% 120% at 50% 50%, #120C24 40%, #06040C 100%);
  box-shadow:
    inset 0 0 0 0.35vh #2A2240, inset 0 0 0 0.9vh #0B0814, inset 0 0 0 1.1vh rgba(var(--ar-cyan-rgb), 0.7),
    inset 0 0 5vh rgba(0, 0, 0, 0.9), 0 0 2.4vh rgba(var(--ar-cyan-rgb), 0.28), 0 1.6vh 3vh rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
html[data-theme="arcade"] .hub-view .feature::after {
  content: ''; position: absolute; inset: 1.1vh; z-index: 2; pointer-events: none; border-radius: 2.4vh;
  background:
    var(--ar-scan),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 30%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0.7;
}
html[data-theme="arcade"] .hub-view .feature:empty { display: none; }
html[data-theme="arcade"] .hub-view:has(.shelf.solo) .feature { display: none; }
/* The art fills its half of the screen: the column is as tall as the screen allows and the picture as wide as the
   column, so on a wide TV it is the screen's subject, not a stamp in an empty panel. */
html[data-theme="arcade"] .feature-art { position: relative; height: 100%; max-height: 100%; min-height: 0; display: grid; place-items: center; }
html[data-theme="arcade"] .feature-art::before { display: none; }
html[data-theme="arcade"] .feature-art img {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain;
  border-radius: 1vh; image-rendering: auto;
  filter: drop-shadow(0 0 2.2vh rgba(var(--ar-cyan-rgb), 0.28)) saturate(1.15) contrast(1.05);
  animation: arcade-screen-on 420ms steps(6, end) both;
}
/* The bright line it comes up as: a white layer the shape of the art over it, squashed and stepped with it and gone
   the moment the screen is half open. An opacity flash, so no frame has a filter to redraw. */
html[data-theme="arcade"] .feature-art:has(> img)::after {
  content: ''; position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; aspect-ratio: 642 / 342;
  border-radius: 1vh; background: #FFFFFF; opacity: 0; pointer-events: none;
  animation: arcade-screen-flash 420ms steps(6, end) both;
}
html[data-theme="arcade"] .feature-art .art-mark { font-family: var(--ar-pixel); color: var(--ar-yellow); text-shadow: var(--ar-glow-yellow); }
/* A new pick comes up the way a screen does: squashed to a bright line, then open. */
@keyframes arcade-screen-on { 0% { opacity: 0; transform: scale(1, 0.04); } 50% { opacity: 1; transform: scale(1, 0.5); } 100% { transform: none; } }
@keyframes arcade-screen-flash {
  0% { opacity: 0; transform: scale(1, 0.04); }
  50% { opacity: 1; transform: scale(1, 0.5); animation-timing-function: steps(1, start); }
  100% { opacity: 0; transform: none; }
}

html[data-theme="arcade"] .feature-text {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; row-gap: 1.6vh;
}
html[data-theme="arcade"] .feature-name {
  margin: 0 0 0.6vh;
  font-family: var(--ar-pixel); font-weight: 400; font-size: 1.9rem; line-height: 1.3; letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
  text-wrap: balance; overflow-wrap: break-word;
  animation: arcade-buzz 800ms linear both;
}
html[data-theme="arcade"] .feature-text .game-blurb {
  max-width: 34ch;
  font-size: var(--tv-base); font-weight: 600; line-height: 1.34; color: var(--ar-ink);
  /* Room for the longest blurb (four lines), so Play stays in one place while Jan browses. */
  box-sizing: content-box; min-height: calc(4 * 1.34em);
}
html[data-theme="arcade"] .feature-text .game-meta { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
html[data-theme="arcade"] .feature-text .game-meta .chip { border-radius: 6px; color: var(--ar-ink); background: rgba(var(--ar-pink-rgb), 0.12); box-shadow: inset 0 0 0 1.5px rgba(var(--ar-pink-rgb), 0.75); }
html[data-theme="arcade"] .feature-text .fit { color: var(--ar-cyan); }
html[data-theme="arcade"] .feature-text .fit.warn { color: var(--ar-ink-2); }
/* On a small window the screen is short and narrow: a smaller name and blurb, the art column narrower, and the key
   hints left to the line of keys under the row, so both buttons stay on one line. */
@media (max-width: 1360px) {
  html[data-theme="arcade"] .hub-view .feature { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 2vh 1.8vw; }
}
html[data-theme="arcade"] .feature-go { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2vw; padding-top: 0.6vh; }
html[data-theme="arcade"] .feature-go .btn { font-size: var(--tv-sm); min-height: 6vh; padding: 0 1.4vw; pointer-events: auto; margin: 0; white-space: nowrap; max-width: 100%; }
/* Play is the attract screen's PRESS START: the label is drawn by the stylesheet, so it reads the same for every
   game and the screen never changes width. Its own words stay for anyone who hears the page instead of seeing it.
   It is the cabinet's lit yellow start button, dark pixel letters on the face, so it reads from the couch; the label
   dims to 0.6 once a second and still holds well over AA on the yellow. */
html[data-theme="arcade"] .feature-go .btn.gold[data-play] {
  --fg: var(--ar-on-yellow);
  gap: 0.9vw; padding: 0 1.4vw 0 1.2vw;
  font-size: 0; color: var(--ar-on-yellow);
}
html[data-theme="arcade"] .feature-go .btn.gold[data-play]::after {
  content: 'Press start'; order: 1;
  position: static; inset: auto; z-index: auto; background: none; opacity: 1; transition: none;
  font-family: var(--ar-pixel); font-size: 1.45rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-on-yellow); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: arcade-blink 1.1s linear infinite;
}
html[data-theme="arcade"] .feature-go .btn.gold[data-play] svg { width: 1.6rem; height: 1.6rem; flex: none; color: var(--ar-on-yellow); }
html[data-theme="arcade"] .feature-go .btn.gold[data-play] kbd { order: 2; font-size: var(--tv-xs); }
html[data-theme="arcade"] .feature-go .btn.gold[data-play]:hover { filter: brightness(1.06); }
/* The monitor's words are sized to the monitor. The room's sizes above are the most they grow to; each also has a
   share of the screen's own height (cqh), so a short window, a two-line name or a five-line blurb shrinks the type
   instead of spilling over the bezel, and the two buttons always share one line. Worst case (two lines of name, five
   of blurb, two of facts) adds up to under the screen's height. */
html[data-theme="arcade"] .hub-view .feature { container-type: size; }
html[data-theme="arcade"] .feature-text { row-gap: min(1.6vh, 2.4cqh); max-height: 100cqh; }
html[data-theme="arcade"] .feature-name { margin: 0; font-size: min(1.9rem, 6.6cqh, 3.1cqw); line-height: 1.25; }
html[data-theme="arcade"] .feature-text .game-blurb { font-size: min(var(--tv-base), 4.7cqh); min-height: calc(3 * 1.34em); }
html[data-theme="arcade"] .feature-text .game-meta { font-size: min(var(--tv-sm), 3.9cqh); row-gap: min(var(--tv-sp-1), 1cqh); }
html[data-theme="arcade"] .feature-go { flex-wrap: nowrap; gap: min(1.2vw, 1.6cqw); padding-top: 0; max-width: 100%; }
html[data-theme="arcade"] .feature-go .btn { flex: none; min-height: min(6vh, 13cqh); padding: 0 min(1.4vw, 1.4cqw); font-size: min(var(--tv-sm), 3.9cqh, 1.5cqw); }
/* The key hints live in the line of keys under the row; here they would push the pair of buttons past the screen. */
html[data-theme="arcade"] .feature-go .btn kbd { display: none; }
html[data-theme="arcade"] .feature-go .btn.gold[data-play] { gap: min(0.9vw, 1cqw); padding: 0 min(1.4vw, 1.6cqw) 0 min(1.2vw, 1.4cqw); font-size: 0; }
html[data-theme="arcade"] .feature-go .btn.gold[data-play]::after { font-size: min(1.45rem, 4.4cqh, 1.7cqw); white-space: nowrap; }
html[data-theme="arcade"] .feature-go .btn.gold[data-play] svg { width: min(1.6rem, 5cqh); height: min(1.6rem, 5cqh); }

/* The row: every game a lit cabinet marquee, its art backlit and its name on the black strip under it, framed in a
   tube of pink, cyan or yellow in turn. The tubes idle low; the picked one burns and steps forward. */
html[data-theme="arcade"] .hub-view .shelf-row { gap: 2.4vh 1.5vw; }
html[data-theme="arcade"] .hub-view .game-card {
  --b: 0px;
  --tube: var(--ar-pink-rgb);
  clip-path: none; border-radius: 1vh; overflow: hidden;
  background: #0A0712;
  box-shadow: inset 0 0 0 0.25vh rgba(var(--tube), 0.5), 0 0.8vh 1.6vh rgba(0, 0, 0, 0.55);
  transition: transform 260ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
html[data-theme="arcade"] .hub-view .game-card:nth-child(3n + 2) { --tube: var(--ar-cyan-rgb); }
html[data-theme="arcade"] .hub-view .game-card:nth-child(3n) { --tube: var(--ar-yellow-rgb); }
html[data-theme="arcade"] .hub-view .shelf.many .game-card { padding: 0.5vh; gap: 0; text-align: center; }
html[data-theme="arcade"] .hub-view .shelf.dense .game-card { width: 100%; padding: 0.5vh; gap: 0; }
html[data-theme="arcade"] .hub-view .shelf.many .game-art { flex: 1 1 0; min-height: 0; width: 100%; align-self: stretch; position: relative; overflow: hidden; border-radius: 0.6vh 0.6vh 0 0; }
html[data-theme="arcade"] .hub-view .game-card .game-art::before { display: none; }
/* The backlight: the art lit from behind the plastic, brighter at the top. */
html[data-theme="arcade"] .hub-view .shelf.many .game-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 40%), var(--ar-scan);
  opacity: 0.6;
}
html[data-theme="arcade"] .hub-view .shelf.many .game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none; filter: saturate(0.85) brightness(0.82); border-radius: 0; transition: filter 200ms var(--ease-out); }
html[data-theme="arcade"] .hub-view .shelf.many .game-card.on .game-art img { transform: none; filter: saturate(1.15) brightness(1.05); }
html[data-theme="arcade"] .hub-view .shelf.many .game-text { align-self: stretch; padding: 1.1vh 0.4vw 1vh; background: #07050D; border-top: 0.25vh solid rgba(var(--tube), 0.5); }
html[data-theme="arcade"] .hub-view .shelf.many .game-name {
  font-family: var(--ar-pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0; line-height: 1.35;
  color: var(--ar-ink-2); text-wrap: balance;
}
html[data-theme="arcade"] .hub-view .shelf.dense .game-name { font-size: clamp(1.15vh, 7.6cqi, 1.7vh); }
html[data-theme="arcade"] .hub-view .game-card.on {
  transform: translateY(-0.9vh) scale(1.06); z-index: 1;
  box-shadow: inset 0 0 0 0.35vh rgb(var(--tube)), 0 0 0.6vh rgba(var(--tube), 0.9), 0 0 3vh rgba(var(--tube), 0.55), 0 1.2vh 2vh rgba(0, 0, 0, 0.6);
}
html[data-theme="arcade"] .hub-view .game-card.on .game-text { border-top-color: rgb(var(--tube)); }
html[data-theme="arcade"] .hub-view .game-card.on .game-name { color: #FFFFFF; text-shadow: 0 0 0.5em rgba(var(--tube), 0.9); }
html[data-theme="arcade"] .hub-view .game-card[aria-disabled='true'] .game-art { opacity: 0.5; filter: grayscale(0.6); }
html[data-theme="arcade"] .hub-view .game-card[aria-disabled='true'] .game-name { color: var(--ar-ink-3); }

/* One game alone: the classic plate, dressed as a marquee. */
html[data-theme="arcade"] .hub-view .shelf.solo .game-card { background: radial-gradient(ellipse 90% 90% at 30% 40%, #1A1230, #07050D); box-shadow: inset 0 0 0 0.35vh var(--ar-pink), 0 0 3vh rgba(var(--ar-pink-rgb), 0.4); }
html[data-theme="arcade"] .hub-view .shelf.solo .game-name { font-family: var(--ar-pixel); font-weight: 400; font-size: 3rem; line-height: 1.25; color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow); }
html[data-theme="arcade"] .hub-view .shelf.solo .game-art img { border-radius: 1vh; }

/* ---------- TV: the rail ---------- */

/* The join code on a coin door: INSERT PHONE over a lit coin slot, the code behind white glass in a cyan tube. */
html[data-theme="arcade"] .rail .join {
  --qr: min(13.5vw, 21vh);
  margin-top: 0.4vh; padding: 2.2vh 1.4vw 2.2vh; gap: var(--tv-sp-2);
  border-radius: 1.6vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px),
    linear-gradient(180deg, #1C1530, #0E0A18);
  box-shadow: inset 0 0 0 0.3vh #33294D, inset 0 0 0 0.7vh #0B0814, inset 0 0 0 0.9vh rgba(var(--ar-pink-rgb), 0.75), 0 0 2.4vh rgba(var(--ar-pink-rgb), 0.25), 0 1.2vh 2.6vh rgba(0, 0, 0, 0.55);
}
html[data-theme="arcade"] .rail .join::before {
  content: 'Insert phone'; display: block; position: static; z-index: auto; order: -1;
  width: auto; height: auto; transform: none;
  padding-left: 2.6rem;
  font-family: var(--ar-pixel); font-size: 1.55rem; line-height: 2rem; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-pink-core); text-shadow: var(--ar-glow-pink);
  /* The coin slot beside the words: a dark slit in a red lit plate. */
  background:
    linear-gradient(90deg, transparent 0.75rem, #0A0204 0.75rem 1.05rem, transparent 1.05rem) 0 50% / 1.8rem 1.5rem no-repeat,
    linear-gradient(180deg, #FF8A7A, var(--ar-red) 50%, #B21E14) 0 50% / 1.8rem 2rem no-repeat;
  border-radius: 0;
  animation: arcade-buzz 1100ms linear 300ms both;
}
@media (max-width: 1360px) {
  html[data-theme="arcade"] .rail .join::before { font-size: 1.15rem; padding-left: 2.3rem; }
}
html[data-theme="arcade"] .rail .qr-card { clip-path: none; border-radius: 1vh; padding: 0.9vh; background: #FFFFFF; box-shadow: 0 0 0 0.3vh var(--ar-cyan), 0 0 2.6vh rgba(var(--ar-cyan-rgb), 0.5); }
html[data-theme="arcade"] .rail .qr-card .qr { border-radius: 0.4vh; }
html[data-theme="arcade"] .rail .qr-wait { border-radius: 1vh; font-weight: 700; }
html[data-theme="arcade"] .rail .join .seg button { min-height: 2.8rem; }
@media (max-width: 1500px) {
  html[data-theme="arcade"] .rail .join .seg button { letter-spacing: 0.01em; white-space: nowrap; font-size: var(--tv-xs); }
}
html[data-theme="arcade"] .rail .join-url { color: var(--ar-cyan-core); text-shadow: 0 0 0.6em rgba(var(--ar-cyan-rgb), 0.5); }

/* Who's here, as a high-score table: P1 down, each name in its player's color on a dotted run to the right edge. With
   more than six players it splits into two columns. */
html[data-theme="arcade"] .hub-roster .roster-title, html[data-theme="arcade"] [data-part="game-roster"] .roster-title {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 1.55rem; line-height: 1.3; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
}
html[data-theme="arcade"] .hub-roster .roster-title .num, html[data-theme="arcade"] [data-part="game-roster"] .roster-title .num { font-family: var(--ar-pixel); color: var(--ar-cyan-core); text-shadow: var(--ar-glow-cyan); }
/* In a game's narrow rail the title and its button keep one line each: "PLAYERS 6" and "ADD PLAYER" had wrapped. */
html[data-theme="arcade"] [data-part="game-roster"] .roster-title { font-size: 1.3rem; white-space: nowrap; }
html[data-theme="arcade"] [data-part="game-roster"] .roster-head .btn { flex: none; white-space: nowrap; }
html[data-theme="arcade"] .hub-roster .roster-list, html[data-theme="arcade"] [data-part="game-roster"] .roster-list { grid-template-columns: minmax(0, 1fr); gap: 0.2vh 1.2vw; counter-reset: arcade-p; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)), html[data-theme="arcade"] [data-part="game-roster"] .roster-list:has(> li:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.8vw; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .roster-row, html[data-theme="arcade"] [data-part="game-roster"] .roster-list:has(> li:nth-child(7)) .roster-row { grid-template-columns: 2.3rem minmax(0, 1fr) auto; column-gap: 0.3rem; min-height: 2.2rem; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .roster-row::before, html[data-theme="arcade"] [data-part="game-roster"] .roster-list:has(> li:nth-child(7)) .roster-row::before { font-size: 0.68rem; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .rr-name, html[data-theme="arcade"] [data-part="game-roster"] .roster-list:has(> li:nth-child(7)) .rr-name { font-size: var(--tv-xs); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .roster-x, html[data-theme="arcade"] [data-part="game-roster"] .roster-list:has(> li:nth-child(7)) .roster-x { min-width: 1.7rem; padding: 0; }
html[data-theme="arcade"] .hub-roster .roster-list > li, html[data-theme="arcade"] [data-part="game-roster"] .roster-list > li { counter-increment: arcade-p; }
html[data-theme="arcade"] .hub-roster .roster-row, html[data-theme="arcade"] [data-part="game-roster"] .roster-row {
  grid-template-columns: 2.6rem minmax(0, 1fr) auto; column-gap: 0.4rem;
  min-height: 2.5rem; padding: 0 0.2rem; border-radius: 0;
  color: rgb(var(--pc));
  background: radial-gradient(circle, rgba(var(--pc), 0.55) 0 1.5px, transparent 2px) 0 calc(100% - 0.35rem) / 0.7rem 0.4rem repeat-x;
  box-shadow: none;
}
html[data-theme="arcade"] .hub-roster .roster-row::before, html[data-theme="arcade"] [data-part="game-roster"] .roster-row::before {
  content: 'P' counter(arcade-p);
  font-family: var(--ar-pixel); font-size: 0.95rem; line-height: 1; color: var(--ar-ink-2);
}
html[data-theme="arcade"] .hub-roster .roster-row i, html[data-theme="arcade"] [data-part="game-roster"] .roster-row i { display: none; }
/* In the lobby each player's doodle sits between their P number and their name, a square tile like a sprite. */
html[data-theme="arcade"] .hub-roster .roster-row { grid-template-columns: 2.6rem auto minmax(0, 1fr) auto; }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .roster-row { grid-template-columns: 2.3rem auto minmax(0, 1fr) auto; }
html[data-theme="arcade"] .hub-roster .roster-row .avatar { width: 1.9rem; height: 1.9rem; border-radius: 4px; box-shadow: 0 0 0.6rem rgba(var(--pc), 0.45); }
html[data-theme="arcade"] .hub-roster .roster-list:has(> li:nth-child(7)) .roster-row .avatar { width: 1.6rem; height: 1.6rem; }
html[data-theme="arcade"] .hub-roster .roster-row .avatar .av-initial { font-family: var(--ar-pixel); font-size: 54px; }
/* On a short window the coin door gives the rail back to the high-score table: a smaller code and tighter rows, so
   six players fit without scrolling. */
@media (max-height: 820px) {
  html[data-theme="arcade"] .rail .join { --qr: min(12vw, 18vh); padding: 1.6vh 1.2vw; }
  html[data-theme="arcade"] .hub-roster .roster-row { min-height: 2rem; }
}
html[data-theme="arcade"] .hub-roster .rr-name, html[data-theme="arcade"] [data-part="game-roster"] .rr-name {
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgb(var(--pc)); text-shadow: 0 0 0.6em rgba(var(--pc), 0.55);
}
html[data-theme="arcade"] :is(.hub-roster, [data-part="game-roster"]) .rr-host { color: var(--ar-yellow); filter: drop-shadow(0 0 0.4rem rgba(var(--ar-yellow-rgb), 0.7)); }
html[data-theme="arcade"] :is(.hub-roster, [data-part="game-roster"]) .roster-x { border-radius: 6px; color: var(--ar-ink-3); background: none; box-shadow: none; }
html[data-theme="arcade"] :is(.hub-roster, [data-part="game-roster"]) .roster-x:is(:hover, :focus-visible):not(:disabled) { color: var(--ar-ink); box-shadow: inset 0 0 0 1.5px var(--red); }
html[data-theme="arcade"] :is(.hub-roster, [data-part="game-roster"]) .roster-x.armed { color: #FFFFFF; background: var(--red); }
/* A player whose phone is away goes out like an unlit tube: grey and glowless, but still readable at AA (dimming the
   whole row would sink the darker player colors under it). Only the dotted leader keeps their color. */
html[data-theme="arcade"] .hub-roster li.away .rr-name, html[data-theme="arcade"] [data-part="game-roster"] li.away .rr-name { color: var(--ar-ink-3); text-shadow: none; }
html[data-theme="arcade"] .hub-roster li.away .roster-row::before, html[data-theme="arcade"] [data-part="game-roster"] li.away .roster-row::before { color: var(--ar-ink-3); }
/* A game's lobby list reads as large as the hub's, and its note steps down so six names show whole beside it. */
html[data-theme="arcade"] body.tv [data-part="game-roster"] .rr-name { font-size: var(--tv-sm); line-height: 1.05; }
html[data-theme="arcade"] body.tv [data-part="game-roster"] .roster-row { min-height: 2.3rem; }
html[data-theme="arcade"] body.tv [data-part="game-roster"] .roster-note { font-size: var(--tv-xs); line-height: 1.35; }

/* ---------- inside a game ---------- */

/* The same cabinet carries on once a game is up: the tokens above already give a game's own plates the cabinet's
   near-black and its type Oxanium, and the shared parts below get the cabinet's marquee, high-score table and buttons.
   Only through data-part and the tokens: a game's own board is drawn in games/<id>.css. */

/* The top bar in a game: GAME CENTER / the game's name on one line however long the name runs. The words shrink to
   the room the tools leave and end in an ellipsis rather than wrapping to a second line. */
html[data-theme="arcade"] .top .mark { white-space: nowrap; min-width: 0; }
html[data-theme="arcade"] body.tv[data-view="game"] .top { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.4vw; }
html[data-theme="arcade"] body.tv[data-view="game"] .top .mark { max-width: 100%; overflow: hidden; }
html[data-theme="arcade"] body.tv[data-view="game"] .top .mark-game { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* "Click for sound" leaves the bar in a game and waits in the bottom corner, so the name has the bar's middle. */
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="sound-hint"] {
  position: fixed; left: calc(var(--tv-stage-x) + var(--gc-safe-x)); bottom: var(--gc-safe-y); z-index: 15; margin: 0;
  padding: 0.7vh 1.2vw; white-space: nowrap; font-size: var(--tv-xs); cursor: pointer;
}
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="sound-hint"][hidden] { display: none; }

/* The join card in a game's rail is a small coin door: INSERT PHONE across the top, the code beside the hint, the
   address and the switch under them. It takes a third of the rail instead of half, so the players list under it keeps
   full rows. */
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] {
  --qr: min(7.4vw, 12.5vh);
  display: grid; grid-template-columns: var(--qr) minmax(0, 1fr);
  grid-template-areas: 'title title' 'qr hint' 'url url' 'seg seg';
  align-items: center; align-content: start; gap: 1vh 1vw;
  padding: 1.6vh 1.1vw 1.7vh;
}
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"]::before { grid-area: title; font-size: 1.1rem; line-height: 1.6rem; padding-left: 2.2rem; background-size: 1.5rem 1.25rem, 1.5rem 1.6rem; }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .qr-card { grid-area: qr; width: var(--qr); height: var(--qr); padding: 0.5vh; }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .qr-wait { padding: 0.4vw; font-size: var(--tv-xs); }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .join-hint { grid-area: hint; max-width: none; text-align: left; font-size: var(--tv-xs); line-height: 1.3; }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .join-url { grid-area: url; text-align: left; font-size: var(--tv-sm); }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .join-url:empty { display: none; }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .seg { grid-area: seg; }
html[data-theme="arcade"] body.tv[data-view="game"] [data-part="join"] .seg button { min-height: 2.4rem; font-size: var(--tv-xs); }
/* The rail's Start is a full-width cabinet button. */
html[data-theme="arcade"] body.tv [data-part="game-rail"] > [data-part="button"].gold { width: 100%; min-height: 6.6vh; }

/* A game's headline is the cabinet's marquee: lit pixel letters over a neon tube, the line under it in the clear
   face. The pixel face is wide, so it runs smaller than the classic headline and balances over two lines when long. */
html[data-theme="arcade"] body.tv [data-part="game-banner"] { position: relative; }
html[data-theme="arcade"] body.tv [data-part="game-banner"] .headline {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 3.6vh; line-height: 1.35; letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
  text-wrap: balance; overflow-wrap: break-word;
}
html[data-theme="arcade"] body.tv [data-part="game-banner"] .headline.long { font-size: 2.8vh; }
html[data-theme="arcade"] body.tv [data-part="game-banner"] .headline .who { color: rgb(var(--pc, var(--ar-yellow-rgb))); text-shadow: 0 0 0.5em rgba(var(--pc, var(--ar-yellow-rgb)), 0.7); }
html[data-theme="arcade"] body.tv [data-part="game-banner"]::after {
  content: ''; display: block; align-self: center; width: min(62%, 40vw); height: 0.35vh; margin-top: 1.4vh; border-radius: 1vh;
  background: var(--ar-pink-core);
  box-shadow: 0 0 0.6vh var(--ar-pink), 0 0 1.8vh rgba(var(--ar-pink-rgb), 0.7);
}
html[data-theme="arcade"] body.tv [data-part="game-banner"] .subline { font-weight: 600; color: var(--ar-ink-2); }

/* Paused: the cabinet's own cover, black glass and scanlines with PAUSED lit in yellow. */
html[data-theme="arcade"] body.tv [data-part="paused"] {
  background: var(--ar-scan), radial-gradient(ellipse 70% 60% at 50% 50%, rgba(var(--ar-black-rgb), 0.9), rgba(var(--ar-black-rgb), 0.97));
}
html[data-theme="arcade"] body.tv [data-part="paused"] .paused-word {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 9vh; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
}
html[data-theme="arcade"] body.tv [data-part="paused"] .paused-hint { font-weight: 600; color: var(--ar-ink-2); }

/* The finale is the high-score screen: the winner's name in lit pixel letters in their color, and the table as
   ranked rows with dotted runs, the top one framed in a yellow tube. */
html[data-theme="arcade"] body.tv [data-part="finale"] {
  background:
    var(--ar-mask),
    radial-gradient(ellipse 52% 80% at 27% 46%, rgba(var(--pc, var(--ar-yellow-rgb)), 0.26), transparent 72%),
    radial-gradient(ellipse 60% 42% at 92% 104%, rgba(var(--ar-pink-rgb), 0.18), transparent 70%),
    var(--ar-black);
}
html[data-theme="arcade"] body.tv [data-part="finale"]::before { display: none; }
html[data-theme="arcade"] body.tv [data-part="finale"] .finale-hero { container-type: inline-size; }
html[data-theme="arcade"] body.tv [data-part="finale"] .finale-name {
  font-family: var(--ar-pixel); font-weight: 400; font-size: min(8vh, 9cqi); line-height: 1.25; letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-shadow: 0 0 0.12em rgba(255, 255, 255, 0.5), 0 0 0.45em rgba(var(--pc, var(--ar-yellow-rgb)), 0.75);
}
html[data-theme="arcade"] body.tv [data-part="finale"] .finale-line { font-weight: 600; color: var(--ar-ink-2); }
/* Column heads in the clear face: pixel letters are twice as wide, and a game with many columns squeezed the names to "SO...". */
html[data-theme="arcade"] body.tv [data-part="finale"] .stats th { font-family: var(--ar-body); font-weight: 700; font-size: 1.7vh; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ar-cyan-core); }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats tbody tr {
  background: radial-gradient(circle, rgba(var(--pc), 0.5) 0 1.5px, transparent 2px) 0 calc(100% - 0.5vh) / 0.8rem 0.5rem repeat-x, rgba(var(--ar-cab-rgb), 0.86);
}
html[data-theme="arcade"] body.tv [data-part="finale"] .stats td { box-shadow: none; font-variant-numeric: tabular-nums; }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats td:first-child { font-family: var(--ar-pixel); font-size: 0.6em; color: var(--ar-ink-2); }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats td.p { color: rgb(var(--pc)); text-shadow: 0 0 0.5em rgba(var(--pc), 0.5); letter-spacing: 0.04em; }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats td.p i { display: none; }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats tr.first { background: rgba(var(--ar-yellow-rgb), 0.12); box-shadow: inset 0 0 0 0.25vh var(--ar-yellow), 0 0 1.6vh rgba(var(--ar-yellow-rgb), 0.4); }
html[data-theme="arcade"] body.tv [data-part="finale"] .stats tr.first td:first-child { color: var(--ar-yellow-core); }

/* On a phone: the Start bar is PRESS START, the cabinet's lit yellow button with its pixel label; while it waits for
   more phones it is a dark plate whose words read plainly. */
html[data-theme="arcade"] body.phone [data-part="start-dock"] { background: linear-gradient(180deg, rgba(var(--ar-black-rgb), 0), rgba(var(--ar-black-rgb), 0.94) 40%, var(--ar-black)); }
html[data-theme="arcade"] body.phone [data-part="start-dock"] [data-part="button"].gold:not(:disabled) {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 15px; letter-spacing: 0.02em; line-height: 1.3;
}
html[data-theme="arcade"] body.phone [data-part="start-dock"] [data-part="button"]:disabled {
  --bg: var(--ar-cab-2); --fg: var(--ar-ink-2); --face: linear-gradient(var(--bg), var(--bg));
  opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(var(--ar-yellow-rgb), 0.35);
}
/* The phone's finale: the crest a round lit coin, the champion's name in pixel letters, the stats as cabinet plates. */
html[data-theme="arcade"] body.phone [data-part="finale"] .champ::before { background: radial-gradient(closest-side, rgba(var(--pc), 0.26), transparent); }
html[data-theme="arcade"] body.phone [data-part="finale"] .crest {
  clip-path: none; border-radius: 50%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -4px 0 #C49A00, 0 0 0 3px #5C4600, 0 0 22px rgba(var(--ar-yellow-rgb), 0.5);
}
html[data-theme="arcade"] body.phone [data-part="finale"] .champ-name {
  font-family: var(--ar-pixel); font-weight: 400; font-size: clamp(22px, 8vw, 34px); line-height: 1.3; letter-spacing: 0.01em;
  text-shadow: 0 0 0.12em rgba(255, 255, 255, 0.5), 0 0 0.5em rgba(var(--pc), 0.7);
}
html[data-theme="arcade"] body.phone [data-part="finale"] .stat { clip-path: none; border-radius: 10px; background: var(--ar-cab); box-shadow: inset 0 0 0 1.5px rgba(var(--ar-cyan-rgb), 0.3); }
html[data-theme="arcade"] body.phone [data-part="finale"] .stat.first { box-shadow: inset 0 0 0 2px var(--ar-yellow), 0 0 14px rgba(var(--ar-yellow-rgb), 0.35); }

/* ---------- TV: sting, wipe and how-to ---------- */

/* The sting: the game's name buzzing on in yellow neon on a black screen, a run of pixel blocks under it. */
html[data-theme="arcade"] .sting {
  background:
    var(--ar-scan),
    radial-gradient(ellipse 50% 40% at 50% 48%, rgba(var(--ar-pink-rgb), 0.22), transparent 74%),
    radial-gradient(ellipse 90% 80% at 50% 50%, #140D26, #050309 80%);
}
html[data-theme="arcade"] .sting-name {
  font-family: var(--ar-pixel); font-weight: 400; font-size: 8.4vh; line-height: 1.25; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-yellow-core);
  text-shadow: var(--ar-glow-yellow), 0.08em 0.08em 0 rgba(var(--ar-pink-rgb), 0.55);
}
html[data-theme="arcade"] .sting.on .sting-name { animation: sting-name 1600ms var(--ease-out) both, arcade-buzz 700ms linear both; }
html[data-theme="arcade"] .sting-line {
  width: 56vw; height: 2.2vh;
  background: linear-gradient(90deg, var(--ar-pink) 0 60%, transparent 60%) 0 0 / 3.6vh 100% repeat-x;
  filter: drop-shadow(0 0 1vh rgba(var(--ar-pink-rgb), 0.8));
}

/* The wipe: a black screen with its scanlines, a cyan beam on its leading edge and a pink one trailing, GAME CENTER
   in pink neon in the middle. */
html[data-theme="arcade"] .wipe {
  background:
    var(--ar-scan),
    radial-gradient(ellipse 44% 50% at 50% 50%, rgba(var(--ar-pink-rgb), 0.18), transparent 70%),
    linear-gradient(180deg, #120B22, #060409);
}
html[data-theme="arcade"] .wipe::before { width: 0.6vw; background: var(--ar-cyan-core); box-shadow: 0 0 1vw 0.3vw rgba(var(--ar-cyan-rgb), 0.9), 0 0 4vw 1vw rgba(var(--ar-cyan-rgb), 0.45); }
html[data-theme="arcade"] .wipe::after { width: 0.4vw; background: var(--ar-pink-core); box-shadow: 0 0 1vw 0.2vw rgba(var(--ar-pink-rgb), 0.9), 0 0 3vw 0.6vw rgba(var(--ar-pink-rgb), 0.4); }
html[data-theme="arcade"] .wipe-mark { font-family: var(--ar-pixel); font-weight: 400; font-size: 5.4vh; letter-spacing: 0.04em; color: var(--ar-pink-core); text-shadow: var(--ar-glow-pink); }
html[data-theme="arcade"] .wipe-mark .mark-grid { display: none; }

/* The how-to: a game's instruction card, the kind printed on a cabinet's control panel. Pixel titles, the pages as
   blocks along the bottom. */
html[data-theme="arcade"] body.tv .howto {
  background:
    var(--ar-mask),
    radial-gradient(ellipse 36% 52% at 25% 52%, rgba(var(--ar-cyan-rgb), 0.12), transparent 72%),
    radial-gradient(ellipse 50% 50% at 80% 100%, rgba(var(--ar-pink-rgb), 0.14), transparent 72%),
    radial-gradient(ellipse 90% 80% at 50% 40%, #150E28, #050309 82%);
}
html[data-theme="arcade"] .howto-name, html[data-theme="arcade"] .howto-title {
  font-family: var(--ar-pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.3;
  color: var(--ar-ink);
}
html[data-theme="arcade"] .howto-name { color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow); }
html[data-theme="arcade"] .howto-title { color: var(--ar-cyan-core); text-shadow: var(--ar-glow-cyan); }
html[data-theme="arcade"] body.tv .howto-name { font-size: 4.6vh; }
html[data-theme="arcade"] body.tv .howto-title { font-size: 4vh; }
html[data-theme="arcade"] .howto-art img { border-radius: 1vh; box-shadow: 0 0 0 0.3vh rgba(var(--ar-cyan-rgb), 0.6), 0 0 3vh rgba(var(--ar-cyan-rgb), 0.3); }
html[data-theme="arcade"] .howto-kicker, html[data-theme="arcade"] .howto-where { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ar-pink-core); }
html[data-theme="arcade"] .howto-body { font-weight: 600; color: var(--ar-ink); }
html[data-theme="arcade"] .howto-chip { border-radius: 6px; font-weight: 800; box-shadow: inset 0 0 0 1.5px rgba(var(--ar-cyan-rgb), 0.55); }
html[data-theme="arcade"] .howto-tiles i { border-radius: 0; background: var(--ar-cab-3); box-shadow: inset 0 0 0 1px rgba(var(--ar-cyan-rgb), 0.3); }
html[data-theme="arcade"] .howto-tiles i.done { background: rgba(var(--ar-cyan-rgb), 0.55); box-shadow: none; }
html[data-theme="arcade"] .howto-tiles i.on { background: var(--ar-yellow); box-shadow: 0 0 1.4vh 0.2vh rgba(var(--ar-yellow-rgb), 0.75); }
html[data-theme="arcade"] .howto-count { font-weight: 800; }
html[data-theme="arcade"] .howto-item::before { border-radius: 0; }
html[data-theme="arcade"] .howto-item dt { font-weight: 800; }
html[data-theme="arcade"] .howto-item dd { font-weight: 600; }
html[data-theme="arcade"] .howto .icon-btn, html[data-theme="arcade"] .howto-x { border-radius: 8px; }

/* ---------- phone ---------- */

/* The cabinet in your hand: near-black, the dot mask, a pink tube's glow at the top tinted with your color, and the
   scanlines laid faint over it all. In a game too, so a phone's play screen sits in the same cabinet as its hub. */
html[data-theme="arcade"] body.phone::before {
  background:
    var(--ar-scan),
    var(--ar-mask),
    radial-gradient(90% 26% at 50% -4%, rgba(var(--me), 0.28), transparent 74%),
    radial-gradient(70% 22% at 0% 0%, rgba(var(--ar-pink-rgb), 0.22), transparent 72%),
    radial-gradient(120% 26% at 50% 104%, rgba(var(--ar-cyan-rgb), 0.12), transparent 72%),
    var(--ar-black);
}

html[data-theme="arcade"] .bar .mark { gap: 8px; font-family: var(--ar-pixel); font-weight: 400; font-size: 10px; letter-spacing: 0.04em; color: var(--ar-pink-core); text-shadow: var(--ar-glow-pink); animation: arcade-buzz 1100ms linear both; }
html[data-theme="arcade"] .bar .mark .mark-grid { display: none; }
html[data-theme="arcade"] .bar .me { clip-path: none; border-radius: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(var(--me), 0.14); box-shadow: inset 0 0 0 2px rgba(var(--me), 0.8), 0 0 12px rgba(var(--me), 0.3); }
html[data-theme="arcade"] .bar .me i { border-radius: 2px; }
html[data-theme="arcade"] .bar .host-btn { clip-path: none; border-radius: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
html[data-theme="arcade"] .bar .host-btn.claim { box-shadow: inset 0 0 0 2px rgba(var(--ar-yellow-rgb), 0.7); }

/* Headings: the pixel face for the screen's headline, the clear one in capitals for the section heads. */
html[data-theme="arcade"] .hub-app h1 {
  font-family: var(--ar-pixel); font-weight: 400; font-size: clamp(19px, 5.6vw, 26px); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.35;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
}
html[data-theme="arcade"] .hub-app h1.hero { font-size: clamp(24px, 7.6vw, 34px); color: var(--ar-pink-core); text-shadow: var(--ar-glow-pink); animation: arcade-buzz 900ms linear both; }
html[data-theme="arcade"] .hub-app h2 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ar-cyan-core); text-shadow: 0 0 0.6em rgba(var(--ar-cyan-rgb), 0.5); }
html[data-theme="arcade"] .hub-app .h2-count { font-family: var(--ar-pixel); font-size: 0.8em; color: var(--ar-yellow); }
html[data-theme="arcade"] .hub-app .note { font-weight: 600; color: var(--ar-ink-3); }
html[data-theme="arcade"] .hub-app .link { font-weight: 700; color: var(--ar-ink-2); text-decoration-color: rgba(var(--ar-cyan-rgb), 0.6); }

/* Who's playing becomes SELECT PLAYER, the arcade's own words for it. The page's own heading stays for anyone who
   hears the page instead of seeing it. */
html[data-theme="arcade"] .hub-app .screen:has(> .list[data-part="players"]) > h1 { font-size: 0; line-height: 0; }
html[data-theme="arcade"] .hub-app .screen:has(> .list[data-part="players"]) > h1::before {
  content: 'Select player'; display: block;
  font-size: clamp(22px, 6.6vw, 30px); line-height: 1.3;
  animation: arcade-buzz 1000ms linear both;
}

/* "I'm new here": a big pink cabinet button. */
html[data-theme="arcade"] .hub-app #joinNew {
  --bg: linear-gradient(180deg, #FF7CC0, var(--ar-pink) 48%, #D0156F); --fg: #FFFFFF;
  min-height: 72px; font-size: var(--ph-lg); letter-spacing: 0.08em; text-shadow: 0 1px 2px rgba(80, 0, 40, 0.6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 46%), linear-gradient(180deg, #FF6AB6, var(--ar-pink) 48%, #D0156F);
  box-shadow: inset 0 0 0 2px #FFC2E1, inset 0 -6px 0 #8E0A4A, 0 0 22px rgba(var(--ar-pink-rgb), 0.55), 0 8px 18px rgba(0, 0, 0, 0.5);
}
html[data-theme="arcade"] .hub-app #joinNew:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px #FFC2E1, inset 0 -2px 0 #8E0A4A, 0 0 16px rgba(var(--ar-pink-rgb), 0.45); }
html[data-theme="arcade"] .hub-app #joinNew .ico { color: #FFFFFF; }

/* Player buttons: chunky, a tube of the player's color round each, a thick plastic edge, the color as a square pixel. */
html[data-theme="arcade"] :is(.hub-app, .drawer) .row {
  clip-path: none; border-radius: 10px;
  background: linear-gradient(180deg, rgba(var(--pc), 0.2), rgba(var(--pc), 0.06)), var(--ar-cab);
  box-shadow: inset 0 0 0 2.5px rgb(var(--pc)), inset 0 -5px 0 rgba(0, 0, 0, 0.45), 0 0 14px rgba(var(--pc), 0.32), 0 6px 12px rgba(0, 0, 0, 0.45);
}
html[data-theme="arcade"] :is(.hub-app, .drawer) button.row:active { transform: translateY(2px); }
html[data-theme="arcade"] :is(.hub-app, .drawer) .row:disabled { opacity: 0.5; box-shadow: inset 0 0 0 2px rgba(var(--pc), 0.6); }
html[data-theme="arcade"] :is(.hub-app, .drawer) .row .sw, html[data-theme="arcade"] .hub-app .tile .sw {
  width: 14px; height: 14px; border-radius: 0;
  background: rgb(var(--pc));
  box-shadow: 0 0 10px 1px rgba(var(--pc), 0.85);
}
html[data-theme="arcade"] :is(.hub-app, .drawer) .row-name { font-weight: 800; font-size: var(--ph-lg); text-transform: uppercase; letter-spacing: 0.05em; color: #FFFFFF; }
html[data-theme="arcade"] :is(.hub-app, .drawer) .row-tag {
  padding: 3px 8px; border-radius: 4px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ar-ink-2); background: rgba(5, 3, 10, 0.7);
}
html[data-theme="arcade"] :is(.hub-app, .drawer) .row-main .row-tag { align-self: flex-start; padding: 1px 6px; }
html[data-theme="arcade"] :is(.hub-app, .drawer) .row-tag.on { color: var(--ar-cyan); }
html[data-theme="arcade"] :is(.hub-app, .drawer) .row-tag.host { color: var(--ar-yellow); }
html[data-theme="arcade"] .hub-app .rm-btn { border-radius: 8px; }

/* Everyone else in the lobby: the high-score table's lines, each name lit in its own color. No P numbers here: your
   own name is left out of this list, so they would not match the TV's. */
html[data-theme="arcade"] .hub-app .list[data-part="roster"] { gap: 2px; }
html[data-theme="arcade"] .hub-app .list[data-part="roster"] .row {
  min-height: 52px; border-radius: 0; background: none;
  box-shadow: inset 0 -1px 0 rgba(var(--pc), 0.28);
}
html[data-theme="arcade"] .hub-app .list[data-part="roster"] .row-name { color: rgb(var(--pc)); }
html[data-theme="arcade"] .hub-app .list[data-part="roster"] .row-tag { background: none; padding-left: 0; }

/* The join form: a dark panel in a cyan tube, square color pixels. */
html[data-theme="arcade"] :is(.hub-app, .drawer) .sheet {
  clip-path: none; border-radius: 14px;
  background: linear-gradient(180deg, #1A1330, #0E0A18);
  box-shadow: inset 0 0 0 2px rgba(var(--ar-cyan-rgb), 0.7), 0 0 18px rgba(var(--ar-cyan-rgb), 0.2), 0 10px 24px rgba(0, 0, 0, 0.5);
}
html[data-theme="arcade"] .hub-app .form label, html[data-theme="arcade"] .hub-app .form .label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ar-cyan-core); }
html[data-theme="arcade"] .hub-app .field {
  border-radius: 8px; font-family: var(--ar-body); font-weight: 700; font-size: var(--ph-lg); color: var(--ar-ink);
  caret-color: var(--ar-yellow);
  background-color: #05030A;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 1.5px rgba(var(--ar-cyan-rgb), 0.4);
}
html[data-theme="arcade"] .hub-app .field::placeholder { color: var(--ar-ink-3); }
html[data-theme="arcade"] .hub-app .field:focus-visible { outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 3px var(--ar-yellow), 0 0 18px rgba(var(--ar-yellow-rgb), 0.45); }
html[data-theme="arcade"] .hub-app .swatch { clip-path: none; border-radius: 4px; background: rgb(var(--pc)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3), 0 0 10px rgba(var(--pc), 0.55); }
html[data-theme="arcade"] .hub-app .swatch[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--ar-black), inset 0 0 0 5px #FFFFFF, 0 0 18px rgba(var(--pc), 0.95); }
html[data-theme="arcade"] .hub-app .swatch:disabled { box-shadow: none; }
html[data-theme="arcade"] .hub-app .form .btn.gold { min-height: 60px; font-size: var(--ph-lg); }

/* Your own card on top of the lobby, as the arcade's player-ready screen: a framed box in your color with corner
   brackets, your name big in the pixel face, and You're in lit under it. */
html[data-theme="arcade"] .hub-app .lift:has(> .tile) { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
html[data-theme="arcade"] .hub-app .tile {
  clip-path: none; border-radius: 6px; overflow: hidden;
  padding: 28px var(--sp-5) 24px;
  background:
    linear-gradient(rgb(var(--pc)), rgb(var(--pc))) 8px 8px / 22px 4px no-repeat,
    linear-gradient(rgb(var(--pc)), rgb(var(--pc))) 8px 8px / 4px 22px no-repeat,
    linear-gradient(rgb(var(--pc)), rgb(var(--pc))) calc(100% - 8px) calc(100% - 8px) / 22px 4px no-repeat,
    linear-gradient(rgb(var(--pc)), rgb(var(--pc))) calc(100% - 8px) calc(100% - 8px) / 4px 22px no-repeat,
    var(--ar-scan),
    radial-gradient(ellipse 90% 90% at 50% 0%, rgba(var(--pc), 0.32), transparent 72%),
    #0C0817;
  box-shadow: inset 0 0 0 2px rgba(var(--pc), 0.75), 0 0 20px rgba(var(--pc), 0.3);
}
html[data-theme="arcade"] .hub-app .tile::before { display: none; }
html[data-theme="arcade"] .hub-app .tile::after { display: none; }
html[data-theme="arcade"] .hub-app .tile-name {
  font-family: var(--ar-pixel); font-weight: 400; font-size: clamp(20px, 6.6vw, 30px); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.3;
  overflow-wrap: anywhere;
  color: #FFFFFF; text-shadow: 0 0 0.12em #FFFFFF, 0 0 0.4em rgba(var(--pc), 0.95), 0 0 1.1em rgba(var(--pc), 0.6);
}
html[data-theme="arcade"] .hub-app .tile-sub { font-family: var(--ar-pixel); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ar-cyan-core); text-shadow: var(--ar-glow-cyan); }
html[data-theme="arcade"] .hub-app .tile-edit { border-radius: 8px; background: rgba(5, 3, 10, 0.7); box-shadow: inset 0 0 0 1.5px rgba(var(--pc), 0.7); }
/* The host's card runs as one line. */
html[data-theme="arcade"] .hub-app .tile.strip {
  padding: 8px 8px 8px 16px; min-height: 64px; border-radius: 6px;
  background: var(--ar-scan), linear-gradient(90deg, rgba(var(--pc), 0.3), rgba(var(--pc), 0.06) 70%), #0C0817;
}
html[data-theme="arcade"] .hub-app .tile.strip .tile-name { font-size: clamp(15px, 4.6vw, 20px); }
html[data-theme="arcade"] .hub-app .tile.strip .tile-sub { font-size: 10px; color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow); }
html[data-theme="arcade"] .hub-app .tile.strip .tile-edit { margin-left: 2px; }

/* The host's shelf: each game a marquee in its tube, with a round arcade button to start it. */
html[data-theme="arcade"] .hub-app .list[data-part="shelf"] .game-plate { --tube: var(--ar-pink-rgb); }
html[data-theme="arcade"] .hub-app .list[data-part="shelf"] .game-plate:nth-child(3n + 2) { --tube: var(--ar-cyan-rgb); }
html[data-theme="arcade"] .hub-app .list[data-part="shelf"] .game-plate:nth-child(3n) { --tube: var(--ar-yellow-rgb); }
html[data-theme="arcade"] .hub-app .game-plate {
  clip-path: none; border-radius: 10px;
  background: linear-gradient(90deg, rgba(var(--tube), 0.14), transparent 60%), #0E0A18;
  box-shadow: inset 0 0 0 2px rgba(var(--tube), 0.75), 0 0 14px rgba(var(--tube), 0.22);
}
html[data-theme="arcade"] .hub-app .game-plate.off { background: #0B0814; box-shadow: inset 0 0 0 1.5px rgba(var(--tube), 0.3); }
html[data-theme="arcade"] .hub-app .game-plate:has(.plate-go:focus-visible) { outline-color: var(--ar-yellow); }
html[data-theme="arcade"] .hub-app .game-thumb { clip-path: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
html[data-theme="arcade"] .hub-app .game-title { font-weight: 800; font-size: var(--ph-lg); text-transform: uppercase; letter-spacing: 0.04em; color: #FFFFFF; }
html[data-theme="arcade"] .hub-app .game-fit { font-weight: 700; color: var(--ar-cyan); }
html[data-theme="arcade"] .hub-app .game-fit.warn { color: var(--ar-ink-3); }
/* The round arcade push button: a yellow dome lit from above, in a black collar. */
html[data-theme="arcade"] .hub-app .play-chip {
  clip-path: none; border-radius: 50%; width: 42px; height: 42px;
  color: var(--ar-on-yellow);
  background: radial-gradient(circle at 50% 32%, #FFFBD9, var(--ar-yellow) 42%, #D9A800 78%);
  box-shadow: 0 0 0 3px #07050D, 0 0 0 5px #3A3050, inset 0 -4px 0 rgba(120, 80, 0, 0.45), 0 0 16px rgba(var(--ar-yellow-rgb), 0.5);
}
html[data-theme="arcade"] .hub-app .game-plate.off .play-chip { color: var(--ar-ink-3); background: radial-gradient(circle at 50% 32%, #3A3050, #1A1428 78%); box-shadow: 0 0 0 3px #07050D, 0 0 0 5px #2A2240; }
html[data-theme="arcade"] .hub-app .plate-rules { color: var(--ar-cyan); }

/* Waiting on the host: an attract screen of its own, HOST IS CHOOSING glowing over the crown and the line. */
html[data-theme="arcade"] .hub-app .lift:has(> .wait) { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
html[data-theme="arcade"] .hub-app .wait {
  clip-path: none; border-radius: 18px;
  align-items: center; text-align: center; gap: 10px; padding: 28px var(--sp-5) 26px;
  background:
    var(--ar-scan),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(60% 50% at 50% 100%, rgba(var(--pc, var(--ar-pink-rgb)), 0.3), transparent 72%),
    #100B1E;
  box-shadow: inset 0 0 0 3px #2A2240, inset 0 0 0 7px #07050D, inset 0 0 0 9px rgba(var(--ar-cyan-rgb), 0.7), 0 0 18px rgba(var(--ar-cyan-rgb), 0.22);
}
html[data-theme="arcade"] .hub-app .wait[data-color]::before {
  content: 'Host is choosing'; display: block; order: -1;
  font-family: var(--ar-pixel); font-size: clamp(14px, 4.4vw, 18px); line-height: 1.4; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
  animation: arcade-buzz 1000ms linear both;
}
html[data-theme="arcade"] .hub-app .wait > .ico { font-size: 34px; color: var(--ar-yellow); filter: drop-shadow(0 0 10px rgba(var(--ar-yellow-rgb), 0.75)); }
html[data-theme="arcade"] .hub-app .wait-line { font-weight: 800; font-size: var(--ph-xl); text-transform: none; line-height: 1.15; color: #FFFFFF; }
html[data-theme="arcade"] .hub-app .wait-line .who { text-shadow: 0 0 0.5em rgba(var(--pc), 0.8); }
html[data-theme="arcade"] .hub-app .wait .note { text-align: center; color: var(--ar-ink-2); }

/* The host drawer: a dark panel sliding up, a pink tube along its top edge. */
html[data-theme="arcade"] .drawer-scrim { background: rgba(4, 2, 8, 0.8); }
html[data-theme="arcade"] .drawer-sheet {
  clip-path: none; border-radius: 18px 18px 0 0;
  background: var(--ar-mask), linear-gradient(180deg, #1A1330, #0B0814 50%);
  box-shadow: inset 0 3px 0 var(--ar-pink), 0 -4px 22px rgba(var(--ar-pink-rgb), 0.35);
}
html[data-theme="arcade"] .drawer-head h2 { font-family: var(--ar-pixel); font-weight: 400; font-size: 15px; line-height: 1.4; text-transform: uppercase; color: var(--ar-pink-core); text-shadow: var(--ar-glow-pink); }
html[data-theme="arcade"] .drawer h3 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ar-cyan-core); }
html[data-theme="arcade"] .drawer .now-name { font-family: var(--ar-pixel); font-weight: 400; font-size: 16px; line-height: 1.4; text-transform: uppercase; color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow); }
html[data-theme="arcade"] .drawer .now-status { font-weight: 700; color: var(--ar-cyan); }
html[data-theme="arcade"] .drawer .icon-btn { border-radius: 8px; }
html[data-theme="arcade"] .drawer .ctl { clip-path: none; border-radius: 10px; background: linear-gradient(180deg, rgba(var(--tone), 0.16), rgba(var(--tone), 0.04)), #120D20; box-shadow: inset 0 0 0 2px rgba(var(--tone), 0.65), inset 0 -4px 0 rgba(0, 0, 0, 0.45), 0 0 12px rgba(var(--tone), 0.2); }
html[data-theme="arcade"] .drawer .ctl b { font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
html[data-theme="arcade"] .drawer .ctl span { font-weight: 600; }
html[data-theme="arcade"] .drawer .ctl.armed { background: var(--red); box-shadow: none; }

/* The phone's how-to: the same instruction card, the pages as blocks. */
html[data-theme="arcade"] body.phone .howto {
  background:
    var(--ar-scan),
    radial-gradient(110% 30% at 50% 0%, rgba(var(--ar-pink-rgb), 0.2), transparent 72%),
    linear-gradient(180deg, #160F28, #07050D 40%);
}
html[data-theme="arcade"] body.phone .howto-name { font-size: 18px; }
html[data-theme="arcade"] body.phone .howto-page h1 { font-family: var(--ar-pixel); font-weight: 400; font-size: 19px; text-transform: uppercase; line-height: 1.4; letter-spacing: 0.01em; color: var(--ar-cyan-core); text-shadow: var(--ar-glow-cyan); overflow-wrap: break-word; }
html[data-theme="arcade"] body.phone .howto-thumb { clip-path: none; border-radius: 6px; }
html[data-theme="arcade"] body.phone .howto-tiles i { width: 14px; height: 14px; }
html[data-theme="arcade"] body.phone .howto-dock { background: linear-gradient(180deg, rgba(7, 5, 13, 0), rgba(7, 5, 13, 0.94) 34%, #07050D); }

/* ---------- the ident (theme.js) ---------- */

/* The classic ident's pieces stay put away; the arcade's own takes the cover: a CRT switching on. */
html[data-theme="arcade"] .splash.run { background: #000000; }
html[data-theme="arcade"] .splash > :not(.arcade-show) { display: none; }
html[data-theme="arcade"] .arcade-show { position: absolute; inset: 0; overflow: hidden; background: #000000; }
/* The tube: first a bright line across the middle, then the line opens to the whole glass and cools to dark. */
html[data-theme="arcade"] .arcade-tube {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, #1A1232, #07050D 90%);
  transform-origin: 50% 50%;
}
/* The tube's flash as it switches on: the same glass eight times as bright, faded out as the tube opens, so the
   tube itself never carries a filter. */
html[data-theme="arcade"] .arcade-tube-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 50%, #D090FF, #382868 90%); opacity: 0; }
html[data-theme="arcade"] .arcade-flash { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 50%, #FFFFFF, #CFF8FF 50%, #6BE3FF); opacity: 0; }
html[data-theme="arcade"] .arcade-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    var(--ar-scan),
    radial-gradient(ellipse 120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.85) 100%);
  border-radius: 4vh;
  box-shadow: inset 0 0 8vh rgba(var(--ar-cyan-rgb), 0.08);
}
/* The boot text: a few lines of a cabinet checking itself, top left as a real one does. */
html[data-theme="arcade"] .arcade-boot {
  position: absolute; left: 7vw; top: 9vh; margin: 0;
  font-family: var(--ar-pixel); font-size: 2.2vh; line-height: 2.1; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ar-cyan-core); text-shadow: 0 0 0.5em rgba(var(--ar-cyan-rgb), 0.7);
  white-space: pre;
}
html[data-theme="arcade"] .arcade-boot span { display: block; visibility: hidden; }
html[data-theme="arcade"] .arcade-boot span.on { visibility: visible; }
html[data-theme="arcade"] .arcade-boot .ok { color: var(--ar-yellow-core); }
html[data-theme="arcade"] .arcade-sign {
  position: absolute; left: 50%; top: 47%; margin: 0;
  display: grid; justify-items: center; row-gap: 3.4vh;
  transform: translate(-50%, -50%);
}
html[data-theme="arcade"] .arcade-title {
  margin: 0; white-space: nowrap;
  font-family: var(--ar-pixel); font-size: 9vh; line-height: 1.2; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--ar-pink-core);
  text-shadow: var(--ar-glow-pink), 0.07em 0.07em 0 rgba(var(--ar-cyan-rgb), 0.35);
  opacity: 0;
}
html[data-theme="arcade"] .arcade-credit {
  margin: 0; font-family: var(--ar-pixel); font-size: 2.4vh; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ar-yellow-core); text-shadow: var(--ar-glow-yellow);
  opacity: 0;
}
html[data-theme="arcade"] .arcade-sign.lit .arcade-title, html[data-theme="arcade"] .arcade-sign.lit .arcade-credit { opacity: 1; }
html[data-theme="arcade"] body.phone .arcade-title { font-size: min(7.4vw, 5vh); }
html[data-theme="arcade"] body.phone .arcade-credit { font-size: min(3.4vw, 2.2vh); }
html[data-theme="arcade"] body.phone .arcade-boot { left: 6vw; top: 7vh; font-size: min(3vw, 1.8vh); }
/* The real sign in the bar is put back lit as the cover starts to lift, so the two cross rather than one popping in.
   It stays lit for the rest of the night (theme.js keeps arcade-signed until the look changes): letting it buzz on
   again once the cover is gone would flicker it straight after the ident lit it. */
html[data-theme="arcade"].arcade-signed .top .mark { opacity: 1; animation: arcade-catch 13s linear 2s infinite; }
html[data-theme="arcade"].arcade-signed .bar .mark { opacity: 1; animation: none; }

/* ---------- lite mode ---------- */

/* The cabinet stands still: no buzzing on, no blinking, no rolling band, and the glows that cost a frame go. The
   scanlines stay, still. */
html[data-theme="arcade"].lite .arcade-crt::after { animation: none; display: none; }
html[data-theme="arcade"].lite .hub-view .banner::before, html[data-theme="arcade"].lite .hub-view .banner::after { animation: none; filter: none; }
html[data-theme="arcade"].lite :is(.top .mark, .bar .mark, .feature-name, .hub-app h1.hero, .sting-name, .hub-view .banner.pop .headline) { animation: none; }
/* Pseudo-elements cannot sit inside :is(), so INSERT PHONE and HOST IS CHOOSING get their own. */
html[data-theme="arcade"].lite .rail .join::before, html[data-theme="arcade"].lite .hub-app .wait[data-color]::before { animation: none; }
html[data-theme="arcade"].lite .hub-app .screen:has(> .list[data-part="players"]) > h1::before { animation: none; }
html[data-theme="arcade"].lite .sting.on .sting-name { animation: sting-name 1600ms var(--ease-out) both; }
html[data-theme="arcade"].lite .feature-go .btn.gold[data-play]::after { animation: none; }
html[data-theme="arcade"].lite .feature-art img { animation: none; filter: none; }
html[data-theme="arcade"].lite .feature-art::after { display: none; }
html[data-theme="arcade"].lite .hub-view .feature { box-shadow: inset 0 0 0 0.35vh #2A2240, inset 0 0 0 0.9vh #0B0814, inset 0 0 0 1.1vh rgba(var(--ar-cyan-rgb), 0.7); }
html[data-theme="arcade"].lite .hub-view .game-card.on { box-shadow: inset 0 0 0 0.35vh rgb(var(--tube)); }
html[data-theme="arcade"].lite .hub-view .shelf.many .game-art img { transition: none; }
html[data-theme="arcade"].lite .hub-app .lift:has(> .tile), html[data-theme="arcade"].lite .hub-app .lift:has(> .wait) { filter: none; }
/* In a game the marquee, the finale's name and its top row keep their color but drop the wide glows. */
html[data-theme="arcade"].lite body.tv [data-part="game-banner"] .headline, html[data-theme="arcade"].lite body.tv [data-part="paused"] .paused-word { text-shadow: 0 0 0.12em rgba(255, 255, 255, 0.4); }
html[data-theme="arcade"].lite body.tv [data-part="game-banner"]::after { box-shadow: none; }
html[data-theme="arcade"].lite body.tv [data-part="finale"] .finale-name, html[data-theme="arcade"].lite body.phone [data-part="finale"] .champ-name { text-shadow: none; }
html[data-theme="arcade"].lite body.tv [data-part="finale"] .stats tr.first { box-shadow: inset 0 0 0 0.25vh var(--ar-yellow); }
html[data-theme="arcade"].lite body :is(.btn, [data-part="button"]).gold { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -0.42em 0 #C49A00, 0 0 0 2px #5C4600; }

/* ---------- reduced motion ---------- */

/* base.css already runs every animation to its end at once; the tubes hold lit and PRESS START holds on. */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="arcade"] .hub-view .banner::before, html[data-theme="arcade"] .hub-view .banner::after { animation: none !important; }
  html[data-theme="arcade"] .arcade-crt::after, html[data-theme="arcade"] .feature-go .btn.gold[data-play]::after, html[data-theme="arcade"] .top .mark { animation: none !important; }
}

/* The Night Cup card in the phone's lobby takes the Look's rounded card instead of the shell's cut corner. */
html[data-theme="arcade"] .hub-app [data-part="cup"] { clip-path: none; border-radius: 6px; }
