/* Stage: the hub as a big Saturday-night game show set, purple and magenta with warm gold, spotlights and a bulb marquee.
   Every rule sits under html[data-theme="stage"] and every @keyframes name starts with stage-, so nothing here reaches
   another look.

   The set: a velvet-dark purple stage with soft beams sweeping slowly from the rig, a glossy curved floor with a gold
   rim that the game cards stand on, and the Game Center title in a light-bulb marquee whose bulbs chase. The picked
   game is the hero, its name on a lit sign and its blurb and Play on the host's cue card; the players are contestant
   name plates in their own colors. theme.js hangs the rig and the bulbs (mount) and plays the ident (splash).

   The show carries on inside every game: the palette is set on the whole page, so a game's plates and type take the
   set's purple, gold and Nunito through the tokens, and its shared parts (the banner, the lobby rail and roster, the
   buttons and switches, the start dock, the paused cover and the finale) are dressed through data-part, never through
   a game's own classes. Classic cyan stays a game's live color, since the teams are named Cyan and Gold. Lite mode
   keeps the set but stills it (no sweeping beams, no chasing bulbs, no glows that cost a frame), and reduced motion
   holds every light still. */

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

html[data-theme="stage"] {
  --st-night: #12051F;
  --st-night-rgb: 18, 5, 31;
  --st-plum: #1E0934;
  --st-purple: #2E0D52;
  --st-violet: #4A1A7A;
  --st-violet-rgb: 74, 26, 122;
  --st-magenta: #FF2E9A;
  --st-magenta-rgb: 255, 46, 154;
  --st-pink: #FF8AC6;
  --st-gold: #FFC24A;
  --st-gold-rgb: 255, 194, 74;
  --st-bulb: #FFE3A0;
  --st-bulb-rgb: 255, 227, 160;
  --st-ink: #FFF4E6;
  --st-ink-2: #DCC8EA;
  --st-ink-3: #AE97C4;
  --st-cream: #FFF3DC;
  --st-cream-ink: #2A1338;
  --st-gold-metal: linear-gradient(180deg, #FFF0C2 0%, #FFD36B 30%, #FFC24A 55%, #E89B1C 80%, #FFCF66 100%);
  --st-pink-metal: linear-gradient(180deg, #FFB3DA, #FF7CC0 55%, #E8509E);
  --st-on-pink: #2A0618;
  --st-show: 'Unbounded', 'Nunito', 'Arial Rounded MT Bold', sans-serif;
  --st-body: 'Nunito', 'Arial Rounded MT Bold', sans-serif;
  --st-round: 999px;

  /* The whole page takes the stage'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. Corners are round, not cut, and the lights stay lit (--glow). */
  --obsidian: #0D0217;
  --obsidian-rgb: 13, 2, 23;
  --surface-sunk: #0E0418;
  --surface-0: #160626;
  --surface-1: #1E0934;
  --surface-2: #250B40;
  --surface-3: #2E0D52;
  --surface-4: #3A1466;
  --surface-glass-rgb: 30, 9, 52;
  --stage: #1E0934;
  --stage-2: #2E0D52;
  --stage-light-rgb: 120, 30, 140;
  --stage-pool-rgb: 150, 40, 130;
  --stage-deep-rgb: 60, 14, 90;
  --gold: var(--st-gold);
  --gold-rgb: var(--st-gold-rgb);
  --gold-hi: #FFF0C2;
  --gold-text: var(--st-gold);
  --gold-metal: var(--st-gold-metal);
  --gold-metal-tv: var(--st-gold-metal);
  --on-gold: #2A1200;
  --on-gold-2: #4A2600;
  --ink-title: #FFFFFF;
  --ink: var(--st-ink);
  --ink-2: var(--st-ink-2);
  --ink-3: var(--st-ink-3);
  --line: rgba(var(--st-gold-rgb), 0.3);
  --paper: var(--st-cream);
  --paper-ink: var(--st-cream-ink);
  --display: var(--st-body);
  --gold-floor: rgba(58, 30, 8, 0.82);
  --bevel: 0px;
  --radius: 1rem;
  --rim: inset 0 1px 0 rgba(255, 236, 200, 0.18);
  --rim-hi: inset 0 1px 0 rgba(255, 236, 200, 0.3);
  accent-color: var(--st-gold);
  caret-color: var(--st-gold);
}

/* ---------- the materials (tokens.css): theatre wood and brass ---------- */

/* What the four dimensional games are built from. On the stage they are scenery: stained wood with a brass rim, deep
   enough to throw a shadow, under a warm haze that drifts across the boards. Keys are brass. The scrim behind words
   that float over the stage is the theatre night. */
html[data-theme="stage"] {
  --gc-scrim: rgba(var(--st-night-rgb), 0.7);
  --gc-scrim-ink: var(--st-ink);
  --st-wood: #6B3A1E;
  --st-wood-2: #3E1F0E;
  --st-brass: #D9A441;
  --st-brass-2: #8C6420;
  --st-velvet: #7A1636;
  --st-tile: #2A1338;
  --gc-stage-1: var(--st-purple);
  --gc-stage-2: var(--st-night);
  --gc-stage-light: rgba(var(--st-bulb-rgb), 0.3);
  --gc-stage-motion: 26s;
  --gc-prop-face: var(--st-wood);
  --gc-prop-edge: var(--st-wood-2);
  --gc-prop-rim: rgba(var(--st-bulb-rgb), 0.55);
  --gc-prop-depth: 12px;
  --gc-prop-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 60px rgba(var(--st-gold-rgb), calc(0.18 * var(--glow)));
  --gc-prop-sheen:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, rgba(255, 236, 200, 0.16), transparent 45%, rgba(0, 0, 0, 0.25));
  --gc-ctl-face: var(--st-gold);
  --gc-ctl-ink: var(--on-gold);
  --gc-ctl-edge: var(--st-brass-2);
  --gc-ctl-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  --gc-ctl-press: 0 5px;
  --gc-ctl-radius: 1rem;
  --gc-outline-w: 2px;
  --gc-outline: var(--st-brass);
  --gc-metal:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.05) 1px 3px),
    linear-gradient(180deg, #F2D489, var(--st-brass) 46%, #E6BB5E 52%, var(--st-brass-2));
  --gc-felt:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255, 200, 220, 0.1), transparent 70%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.07) 0 2px, transparent 2px 4px),
    linear-gradient(var(--st-velvet), #4A0A20);
  --gc-paper:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 30%),
    linear-gradient(var(--st-cream), #EED9B0);
  --gc-flap:
    linear-gradient(180deg, transparent calc(50% - 1px), rgba(0, 0, 0, 0.85) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, var(--st-tile) 50%, #1C0B27 50%);
}

/* The hub's own parts light in warm pink where the classic look is cyan. A game keeps cyan: its teams are named for it. */
html[data-theme="stage"] :is(.top, .hub-view, .rail .join, .hub-roster, .howto, .sting, .wipe, .bar, .hub-app, .drawer) {
  --cyan: #FF7CC0;
  --cyan-rgb: 255, 124, 192;
  --on-cyan: var(--st-on-pink);
  --cyan-metal: var(--st-pink-metal);
}
html[data-theme="stage"] :focus-visible { outline-color: var(--st-bulb); }
html[data-theme="stage"] ::selection { background: rgba(var(--st-magenta-rgb), 0.45); color: #FFFFFF; }

/* Buttons on the set are rounded and lit, not beveled: the hub's, the drawer's and every game's. */
html[data-theme="stage"] body :is(.btn, [data-part="button"]) {
  --edge: 0;
  clip-path: none; border-radius: var(--st-round);
  font-weight: 900; letter-spacing: 0.01em;
}
html[data-theme="stage"] body :is(.btn, [data-part="button"]).gold {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -3px 0 rgba(150, 80, 0, 0.45), 0 0 0 2px rgba(var(--st-gold-rgb), 0.35);
}
html[data-theme="stage"] body :is(.btn, [data-part="button"]).ghost {
  --bg: rgba(var(--st-violet-rgb), 0.55); --fg: var(--st-ink);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.2), inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.38);
}
html[data-theme="stage"] body :is(.btn, [data-part="button"])::after { border-radius: inherit; }

/* Switches everywhere (the join card, the drawer, a game's mode and round pickers): a dark pill track, the pick lit pink. */
html[data-theme="stage"] :is(.seg, [data-part="seg"]) {
  clip-path: none; border-radius: var(--st-round); padding: 0.4vh;
  background: rgba(14, 4, 24, 0.85); box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.3);
}
html[data-theme="stage"] :is(.seg, [data-part="seg"]) button { border-radius: var(--st-round); font-weight: 800; color: var(--st-ink-2); }
html[data-theme="stage"] :is(.seg, [data-part="seg"]) button:hover { color: #FFFFFF; }
html[data-theme="stage"] :is(.seg, [data-part="seg"]) button[aria-checked='true'] {
  color: var(--st-on-pink); background: var(--st-pink-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 1.4vh rgba(var(--st-magenta-rgb), 0.45);
}
html[data-theme="stage"] body.phone :is(.seg, [data-part="seg"]) { padding: 4px; }
html[data-theme="stage"] body.phone :is(.seg, [data-part="seg"]) button { min-height: 46px; }
html[data-theme="stage"] :is(.hub-view, .howto) kbd {
  font-family: var(--st-body); font-weight: 800; border-radius: 0.5em;
  background: rgba(var(--st-violet-rgb), 0.6); color: var(--st-ink);
  box-shadow: inset 0 0 0 1px rgba(var(--st-gold-rgb), 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
html[data-theme="stage"] :is(.hub-view, .howto) .btn.gold kbd { color: var(--on-gold-2); background: rgba(80, 40, 0, 0.12); box-shadow: inset 0 0 0 1px rgba(120, 60, 0, 0.4); }

/* ---------- TV: the set ---------- */

/* The house: deep velvet, a magenta glow where the floor meets the dark. */
html[data-theme="stage"] body.tv:not([data-view="game"]) .spotlights {
  background:
    radial-gradient(ellipse 125% 105% at 50% 46%, transparent 52%, rgba(6, 1, 12, 0.78) 100%),
    radial-gradient(ellipse 58% 34% at 36% 92%, rgba(var(--st-magenta-rgb), 0.26), transparent 72%),
    radial-gradient(ellipse 64% 60% at 36% 34%, rgba(var(--st-violet-rgb), 0.7), transparent 76%),
    linear-gradient(180deg, #1C0733, #0D0217 78%);
}
html[data-theme="stage"] body.tv:not([data-view="game"]) .spotlights::before { opacity: 0; }
/* While a game is on the rig is struck, and the house is quieter: the same velvet, one warm pool where the game plays
   and the magenta low along the floor, so a game's own board reads first. */
html[data-theme="stage"] body.tv[data-view="game"] .spotlights {
  background:
    radial-gradient(ellipse 125% 105% at 50% 46%, transparent 56%, rgba(6, 1, 12, 0.7) 100%),
    radial-gradient(ellipse 70% 28% at 38% 100%, rgba(var(--st-magenta-rgb), 0.2), transparent 74%),
    radial-gradient(ellipse 60% 56% at 38% 30%, rgba(var(--st-violet-rgb), 0.55), transparent 76%),
    linear-gradient(180deg, #1C0733, #0D0217 80%);
}
html[data-theme="stage"] body.tv[data-view="game"] .spotlights::before { opacity: 0; }
/* The house and the rig hang at z-index -1, under the page; the body's own fill would paint over them, so on the set
   the page's dark comes from <html> alone. */
html[data-theme="stage"] body.tv:not([data-view="game"]), html[data-theme="stage"] body.phone { background-color: transparent; }
/* A phone page longer than the screen scrolls past the fixed wash: the night under it is the stage's, not the classic blue-black. */
html[data-theme="stage"]:has(body.phone) { background-color: var(--st-night); }

/* The rig (theme.js): beams from the grid above and the floor, behind everything, gone while a game is on. */
html[data-theme="stage"] .stage-rig {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  transition: opacity 600ms var(--ease-out), visibility 0s;
}
html[data-theme="stage"] body[data-view="game"] .stage-rig { opacity: 0; visibility: hidden; transition: opacity 300ms ease-in, visibility 0s 300ms; }

/* A beam is a soft wedge of light from a point above the screen: a conic gradient, so its edges are soft without a
   blur, faded out toward the floor. It swings slowly about that point. */
html[data-theme="stage"] .stage-beam {
  --c: var(--st-bulb-rgb);
  position: absolute; top: -8vh; left: var(--x, 30%); width: 90vh; height: 118vh; margin-left: -45vh;
  transform-origin: 50% 0; transform: rotate(var(--from, -10deg));
  background: conic-gradient(from 166deg at 50% 0%, transparent 0deg, rgba(var(--c), 0.05) 6deg, rgba(var(--c), 0.17) 12deg, rgba(var(--c), 0.21) 14deg, rgba(var(--c), 0.17) 16deg, rgba(var(--c), 0.05) 22deg, transparent 28deg);
  -webkit-mask-image: linear-gradient(180deg, #000 8%, rgba(0, 0, 0, 0.55) 52%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 8%, rgba(0, 0, 0, 0.55) 52%, transparent 88%);
  animation: stage-sweep var(--dur, 15s) ease-in-out var(--delay, 0s) infinite alternate;
  will-change: transform;
}
html[data-theme="stage"] .stage-beam.b1 { --x: 8%; --from: -16deg; --to: 10deg; --dur: 17s; }
html[data-theme="stage"] .stage-beam.b2 { --x: 36%; --c: var(--st-magenta-rgb); --from: 12deg; --to: -12deg; --dur: 13s; --delay: -4s; }
html[data-theme="stage"] .stage-beam.b3 { --x: 64%; --from: 14deg; --to: -14deg; --dur: 19s; --delay: -9s; }
@keyframes stage-sweep { from { transform: rotate(var(--from)); } to { transform: rotate(var(--to)); } }

/* The floor: a wide ellipse rising under the shelf (and stopping short of the roster, so its rim never crosses a name), glossy and dark, with a gold rim, rings scored into it and the
   beams' light caught on its face. */
html[data-theme="stage"] .stage-floor {
  position: absolute; left: -4vw; width: 76vw; bottom: -52vh; height: 82vh; border-radius: 50%;
  background:
    radial-gradient(ellipse 42% 22% at 50% 4%, rgba(var(--st-bulb-rgb), 0.2), transparent 70%),
    radial-gradient(ellipse 60% 34% at 50% 8%, rgba(var(--st-magenta-rgb), 0.32), transparent 72%),
    linear-gradient(180deg, #3D1570 0%, #1C0734 22%, #0D0217 46%);
  box-shadow: inset 0 0.4vh 0 rgba(var(--st-gold-rgb), 0.85), inset 0 1.2vh 1.6vh -0.8vh rgba(var(--st-bulb-rgb), 0.35), 0 -0.4vh 3.2vh rgba(var(--st-gold-rgb), 0.22);
}
html[data-theme="stage"] .stage-floor::before, html[data-theme="stage"] .stage-floor::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
html[data-theme="stage"] .stage-floor::before {
  background: repeating-radial-gradient(ellipse 50% 50% at 50% 50%, transparent 0 4.6%, rgba(var(--st-gold-rgb), 0.11) 4.6% 4.85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 34%);
  mask-image: linear-gradient(180deg, #000, transparent 34%);
}
html[data-theme="stage"] .stage-floor::after {
  background: linear-gradient(90deg, transparent 26%, rgba(var(--st-bulb-rgb), 0.12) 31%, transparent 35%, transparent 62%, rgba(var(--st-magenta-rgb), 0.16) 67%, transparent 71%);
  -webkit-mask-image: linear-gradient(180deg, #000 2%, transparent 30%);
  mask-image: linear-gradient(180deg, #000 2%, transparent 30%);
}

/* The proscenium round the home screen's stage: a scalloped valance along the top and a velvet drape tied back at
   each side, the right one where the stage meets the rail, so the showpiece and its row stand inside one frame. */
html[data-theme="stage"] body.tv > .stage-rig {
  background:
    linear-gradient(180deg, #2A0630, #4A0C46) 0 0 / 100% 1.6vh no-repeat,
    radial-gradient(ellipse 50% 100% at 50% 0%, #4A0C46 0 88%, rgba(var(--st-gold-rgb), 0.75) 90% 95%, transparent 97%) 0 1.5vh / 6vw 2.6vh repeat-x;
}
html[data-theme="stage"] body.tv > .stage-rig::before, html[data-theme="stage"] body.tv > .stage-rig::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 6.5vw;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 22%, transparent 70%, rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(90deg, #2A0630 0, #6E1858 0.7vw, #3C0A40 1.3vw, #2A0630 1.6vw);
}
html[data-theme="stage"] body.tv > .stage-rig::before {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 96% 8%, 82% 22%, 60% 38%, 38% 52%, 30% 58%, 34% 74%, 40% 100%, 0 100%);
}
/* The rail is a share of the 16:9 stage, so on a wider screen the drape stops where the rail now starts. */
html[data-theme="stage"] body.tv > .stage-rig::after {
  right: calc(var(--tv-stage-x) + 28 * var(--tv-vw)); width: 4.5vw;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 60% 100%, 66% 74%, 70% 58%, 62% 52%, 40% 38%, 18% 22%, 4% 8%);
}
html[data-theme="stage"] body.tv[data-rail="0"] > .stage-rig::after { right: 0; }

/* ---------- TV: the marquee ---------- */

/* The Game Center title on a sign framed in bulbs (theme.js lays them round the frame and keeps them there). */
html[data-theme="stage"] .top { padding-top: var(--gc-safe-y); }
html[data-theme="stage"] .top .mark {
  position: relative; justify-self: start;
  padding: 1.05rem 1.9rem 1.15rem;
  font-family: var(--st-show); font-weight: 900; font-size: var(--tv-md); letter-spacing: 0.06em; line-height: 1;
  color: var(--st-ink);
  text-shadow: 0 0 0.5em rgba(var(--st-gold-rgb), 0.55);
  border-radius: 1.2rem;
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(var(--st-magenta-rgb), 0.38), transparent 70%),
    linear-gradient(180deg, #3A1268, #1E0934);
  box-shadow: inset 0 0 0 0.18rem rgba(var(--st-gold-rgb), 0.8), inset 0 0 0 0.42rem rgba(30, 9, 52, 0.9), 0 0 2.6vh rgba(var(--st-magenta-rgb), 0.35), 0 0.8vh 1.6vh rgba(0, 0, 0, 0.5);
}
html[data-theme="stage"] .top .mark .mark-grid { display: none; }
html[data-theme="stage"] .top .mark-game { color: var(--st-pink); letter-spacing: 0.04em; font-weight: 800; }
html[data-theme="stage"] .top .mark-game::before { color: var(--st-gold); }
/* The sign is one line, whatever the window: a sign that wraps doubles the bar and shoves the stage down. */
html[data-theme="stage"] .top .mark { white-space: nowrap; min-width: 0; }
/* While a game is on the sign steps down, so the game's own stage keeps its height, and its bulbs hold still and lit:
   a running light beside a game's board only pulls the eye off it. The bar gives the sign what it needs and the tools
   the rest; a long game name gives way before the sign would. */
html[data-theme="stage"] body.tv[data-view="game"] .top { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.4vw; }
html[data-theme="stage"] body.tv[data-view="game"] .top .mark { font-size: var(--tv-sm); letter-spacing: 0.04em; padding: 0.7rem 1.3rem 0.8rem; max-width: 100%; }
html[data-theme="stage"] body.tv[data-view="game"] .top .mark-game { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="stage"] body.tv[data-view="game"] .top .stage-bulb::after { animation: none; }

/* The line the bulbs sit on is this layer's edge, and its column-gap is the pitch between them (theme.js reads both). */
html[data-theme="stage"] .stage-bulbs { position: absolute; inset: 0.32rem; border-radius: 0.9rem; column-gap: 1.2rem; pointer-events: none; }
/* A bulb: warm glass, dim until lit. Its light is a layer of its own, so a chase only changes opacity. */
html[data-theme="stage"] .stage-bulb {
  --s: 0.5rem;
  position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #8A6A44, #4A2E14 70%);
}
html[data-theme="stage"] .stage-bulb::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #FFFFFF, var(--st-bulb) 45%, var(--st-gold) 100%);
  box-shadow: 0 0 calc(var(--s) * 0.9) calc(var(--s) * 0.15) rgba(var(--st-gold-rgb), 0.85);
  animation: stage-chase 1.35s linear infinite;
  animation-delay: calc(var(--k, 0) * -0.45s);
}
/* Three bulbs in a row take turns, so the light runs round the frame. Lit is the resting state, so a still screen
   (lite, reduced motion) shows the sign fully lit. */
@keyframes stage-chase { 0%, 30% { opacity: 1; } 36%, 94% { opacity: 0.18; } 100% { opacity: 1; } }
/* While the ident covers the page, the set behind it holds still: nobody sees it, so it need not be drawn. */
html[data-theme="stage"].splashing .top .stage-bulb::after,
html[data-theme="stage"].splashing body > .stage-rig .stage-beam { animation-play-state: paused; }

/* The tools on the right: round lit buttons. */
html[data-theme="stage"] .top .tool {
  clip-path: none; border-radius: 50%;
  color: var(--st-ink-2);
  background: radial-gradient(circle at 50% 30%, rgba(var(--st-violet-rgb), 0.9), rgba(30, 9, 52, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.2), inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.28);
}
html[data-theme="stage"] .top .tool:hover { color: var(--st-ink); background: radial-gradient(circle at 50% 30%, rgba(var(--st-magenta-rgb), 0.55), rgba(30, 9, 52, 0.95)); }
html[data-theme="stage"] .top .tool.wide { border-radius: var(--st-round); white-space: nowrap; }
html[data-theme="stage"] .top .audio-hint { clip-path: none; border-radius: var(--st-round); font-weight: 800; color: var(--on-gold); background: var(--st-gold-metal); }
/* Inside a game the sound hint leaves the bar for a gold ticket pinned low at the left, so it never crowds the sign or
   the tools, and never sits over a game's own buttons in the middle. It stays under the finale and the paused cover,
   and any click or key (on it or anywhere) turns the sound on and takes it away. */
html[data-theme="stage"] 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);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 2px rgba(122, 58, 0, 0.6), 0 0.8vh 2vh rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
html[data-theme="stage"] [data-part="sound-hint"][hidden] { display: none; }

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

/* Headline, the showpiece, the row of tonight's acts on the floor, the keys. The strip under the classic shelf is
   gone: the showpiece carries the picked game's facts and its Play. Each part keeps its own row, since the
   showpiece's ring of bulbs (theme.js) is laid over the same cell. */
html[data-theme="stage"] .hub-view { grid-template-rows: auto auto minmax(0, 1fr) auto; padding-bottom: var(--gc-safe-y); isolation: isolate; }
html[data-theme="stage"] .hub-view > .banner { grid-row: 1; }
html[data-theme="stage"] .hub-view > .feature { grid-row: 2; grid-column: 1; }
html[data-theme="stage"] .hub-view > .shelf { grid-row: 3; }
html[data-theme="stage"] .hub-view > .actions { grid-row: 4; }
html[data-theme="stage"] .hub-view .banner { position: relative; height: auto; padding: 0 11vw 1.4vh; }
/* The show's host either side of the headline: calling the room up on the left, playing along on the right. They bob
   in time with each other, half a beat apart (transform only; still in lite and reduced motion). */
@keyframes stage-host-bob {
  0%, 100% { transform: translateY(0) rotate(-2.5deg) scale(1.02, 0.98); }
  50% { transform: translateY(-0.9vh) rotate(3deg) scale(0.98, 1.03); }
}
html[data-theme="stage"] .hub-view .banner::before,
html[data-theme="stage"] .hub-view .banner::after {
  content: ''; position: absolute; bottom: 0.4vh; z-index: 2; pointer-events: none;
  background: center bottom / contain no-repeat;
  filter: drop-shadow(0 0.8vh 1vh rgba(10, 2, 20, 0.55));
  transform-origin: 50% 94%;
  animation: stage-host-bob 1.1s ease-in-out infinite;
}
html[data-theme="stage"] .hub-view .banner::before { left: 2.4vw; width: 9vh; height: 12vh; background-image: url(/assets/looks/stage/mascots/mascot-host.webp); }
html[data-theme="stage"] .hub-view .banner::after { right: 2.4vw; width: 8vh; height: 12vh; background-image: url(/assets/looks/stage/mascots/mascot-gamer.webp); animation-delay: -0.55s; }
html[data-theme="stage"] .hub-view .headline {
  font-family: var(--st-show); font-weight: 800; font-size: var(--tv-xl); text-transform: none; letter-spacing: -0.01em;
  color: var(--st-ink); text-shadow: 0 0 0.6em rgba(var(--st-magenta-rgb), 0.45);
}
html[data-theme="stage"] .hub-view .headline.long { font-size: var(--tv-lg); }
html[data-theme="stage"] .hub-view .subline { font-weight: 700; color: var(--st-ink-2); }
html[data-theme="stage"] .hub-view .shelf-pick { display: none; }
html[data-theme="stage"] .hub-view .actions { min-height: 5vh; }
html[data-theme="stage"] .hub-view .hub-keys { color: var(--st-ink-3); font-weight: 700; }

/* One spotlight from the grid onto the showpiece: a still cone, so the sweeping beams behind stay the only motion. */
html[data-theme="stage"] .hub-view::before {
  content: ''; position: absolute; z-index: -1; left: 6%; right: 6%; top: -14vh; height: 78vh; pointer-events: none;
  background: conic-gradient(from 158deg at 50% 0%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.08) 9deg, rgba(var(--st-bulb-rgb), 0.15) 22deg, rgba(var(--st-bulb-rgb), 0.08) 35deg, transparent 44deg);
  -webkit-mask-image: linear-gradient(180deg, transparent 6%, #000 30%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 6%, #000 30%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
}
html[data-theme="stage"] .hub-view:has(> .feature:empty)::before,
html[data-theme="stage"] .hub-view:has(.shelf.solo)::before { display: none; }

/* The showpiece: the picked game's art, its name in bulb letters, the blurb and Play on one lit panel, a gold rim with
   a dark channel inside it where the marquee bulbs sit. */
html[data-theme="stage"] .hub-view .feature {
  --rim: 2.1vh;
  --frame: inset 0 0 0 0.3vh rgba(var(--st-gold-rgb), 0.9), inset 0 0 0 var(--rim) rgba(20, 4, 36, 0.72), inset 0 0 0 calc(var(--rim) + 0.2vh) rgba(var(--st-magenta-rgb), 0.55);
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 2.2vw;
  margin-top: 0.4vh; padding: calc(var(--rim) + 1.4vh) calc(var(--rim) + 1.4vw);
  border-radius: 3.2vh;
  background:
    radial-gradient(ellipse 46% 70% at 24% 55%, rgba(var(--st-magenta-rgb), 0.3), transparent 72%),
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(var(--st-bulb-rgb), 0.16), transparent 72%),
    linear-gradient(180deg, #3C1470, #22093D 60%, #1A062D);
  box-shadow: var(--frame), 0 0 4vh rgba(var(--st-magenta-rgb), 0.28), 0 2vh 4vh rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
html[data-theme="stage"] .hub-view .feature:empty { display: none; }
html[data-theme="stage"] .hub-view:has(.shelf.solo) .feature { display: none; }
/* The ring: laid in the showpiece's cell, its line running down the middle of the dark channel. */
html[data-theme="stage"] .hub-view > .stage-hero-bulbs {
  position: relative; z-index: 1; inset: auto; grid-row: 2; grid-column: 1;
  margin: calc(0.4vh + 1.05vh) 1.05vh 1.05vh; border-radius: 2.3vh; column-gap: 2.7vh;
}
html[data-theme="stage"] .hub-view:has(> .feature:empty) > .stage-hero-bulbs,
html[data-theme="stage"] .hub-view:has(.shelf.solo) > .stage-hero-bulbs { display: none; }
html[data-theme="stage"] .stage-hero-bulbs .stage-bulb { --s: 0.95vh; }
/* The showpiece's bulbs crawl, a step every second and a half: a marquee, never a flasher. */
html[data-theme="stage"] .stage-hero-bulbs .stage-bulb::after { animation-duration: 4.5s; animation-delay: calc(var(--k, 0) * -1.5s); }

/* The art: flat and framed like a screen on the set, in its own pool of light. */
html[data-theme="stage"] .feature-art { position: relative; height: 19vh; }
html[data-theme="stage"] .feature-art::before {
  top: auto; bottom: -2.2vh; width: 96%; height: 6vh; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse 50% 50% at 50% 40%, rgba(var(--st-bulb-rgb), 0.32), rgba(var(--st-magenta-rgb), 0.2) 55%, transparent 72%);
}
html[data-theme="stage"] .feature-art img {
  width: auto; max-width: 100%; height: 100%; max-height: 19vh; object-fit: contain;
  border-radius: 1.4vh;
  transform: none;
  box-shadow: 0 0 0 0.3vh rgba(var(--st-gold-rgb), 0.75), 0 0 0 0.7vh rgba(20, 4, 36, 0.8), 0 1.8vh 3vh rgba(0, 0, 0, 0.6);
  filter: none;
  animation: stage-hero-in 480ms var(--ease-out) both;
}
html[data-theme="stage"] .feature-art .art-mark { font-family: var(--st-show); color: var(--st-gold); }
@keyframes stage-hero-in { from { opacity: 0; transform: translateY(1.2vh) scale(0.97); } }

/* The words are sized to their column, so every game's blurb takes the same lines and its two buttons share one row:
   the showpiece keeps one height while Jan browses, and the row under it never jumps. */
html[data-theme="stage"] .feature-text {
  container-type: inline-size;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; align-content: center; row-gap: 1.3vh;
}
/* The name lit in the marquee's own warm bulb gold, glowing like the bulbs round it. */
html[data-theme="stage"] .feature-name {
  justify-self: stretch;
  font-family: var(--st-show); font-weight: 800; font-size: var(--tv-lg); line-height: 1.04; letter-spacing: 0.005em;
  text-wrap: balance; overflow-wrap: break-word;
  color: var(--st-bulb);
  text-shadow: 0 0 0.3em rgba(var(--st-gold-rgb), 0.6), 0 0 0.9em rgba(var(--st-magenta-rgb), 0.5);
  animation: stage-sign-on 520ms var(--ease-out) both;
}
@keyframes stage-sign-on { from { opacity: 0.2; } }
html[data-theme="stage"] .feature-text .game-blurb {
  max-width: none;
  font-size: min(var(--tv-base), 3.8cqi); font-weight: 700; line-height: 1.3; color: var(--st-ink);
  min-height: calc(3 * 1.3em);
}
html[data-theme="stage"] .feature-text .game-meta { font-weight: 800; }
html[data-theme="stage"] .feature-text .game-meta .chip { border-radius: var(--st-round); color: var(--st-ink); background: rgba(14, 4, 24, 0.6); box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45); }
html[data-theme="stage"] .feature-text .fit { color: var(--st-pink); }
html[data-theme="stage"] .feature-text .fit.warn { color: var(--st-bulb); }
html[data-theme="stage"] .feature-go { display: flex; flex-wrap: wrap; gap: 1.2vh 0.7em; padding-top: 0.6vh; font-size: min(var(--tv-base), 3.7cqi); }
html[data-theme="stage"] .feature-go .btn { font-size: inherit; min-height: 5.8vh; padding: 0 1.1em; pointer-events: auto; margin: 0; white-space: nowrap; max-width: 100%; }
html[data-theme="stage"] .feature-go .game-go { order: -1; }
/* The keys are in the line under the row, so the two buttons fit side by side. */
html[data-theme="stage"] .feature-go .btn kbd { display: none; }
/* How to play reads white on the set's violet, ringed in gold like the tools in the bar. */
html[data-theme="stage"] .feature-go .btn.ghost {
  --bg: rgba(var(--st-violet-rgb), 0.9); --fg: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.25), inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.7);
}
html[data-theme="stage"] .feature-go .btn.gold { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -3px 0 rgba(150, 80, 0, 0.45), 0 0 0 2px rgba(var(--st-gold-rgb), 0.4), 0 0 2.4vh rgba(var(--st-gold-rgb), 0.35); }
/* A game still short of phones opens its lobby to wait for them: Play goes dark on the set, the line above says why. */
html[data-theme="stage"] .hub-view .feature[data-ready="false"] .btn.gold[data-play] {
  --face: linear-gradient(180deg, #3A1466, #250B40); --fg: var(--st-ink);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.18), inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.4);
}

/* Tonight's acts: the row of lit cards standing on the floor, under a line that names them. */
html[data-theme="stage"] .hub-view .shelf { grid-template-rows: auto minmax(0, 1fr); row-gap: 2.2vh; padding: 2.2vh 0 1vh; }
html[data-theme="stage"] .hub-view .shelf::before {
  content: "Tonight\2019s acts"; display: block; padding-right: 1em;
  font-family: var(--st-show); font-weight: 700; font-size: var(--tv-sm); line-height: 1; letter-spacing: 0.01em;
  color: var(--st-pink);
  background: linear-gradient(90deg, rgba(var(--st-gold-rgb), 0.5), rgba(var(--st-gold-rgb), 0)) no-repeat right center / calc(100% - 9.6em) 2px;
}
html[data-theme="stage"] .hub-view .shelf.solo { grid-template-rows: minmax(0, 1fr); }
html[data-theme="stage"] .hub-view .shelf.solo::before { display: none; }
html[data-theme="stage"] .hub-view .shelf-row { gap: 2.4vh 1.6vw; }
html[data-theme="stage"] .hub-view .game-card {
  --b: 0px;
  clip-path: none; border-radius: 1.6vh; overflow: hidden;
  background: linear-gradient(180deg, #3A1466, #1E0934 70%);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.22), inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.28), inset 0 -0.5vh 0 rgba(var(--st-gold-rgb), 0.45);
  transition: transform 320ms var(--spring), box-shadow 220ms var(--ease-out);
}
html[data-theme="stage"] .hub-view .shelf.many .game-card { padding: 0; gap: 0; text-align: center; }
html[data-theme="stage"] .hub-view .shelf.dense .game-card { width: 100%; padding: 0; gap: 0; }
html[data-theme="stage"] .hub-view .shelf.many .game-art { flex: 1 1 0; min-height: 0; width: 100%; align-self: stretch; position: relative; overflow: hidden; }
html[data-theme="stage"] .hub-view .game-card .game-art::before { display: none; }
/* The cover fills its window rather than sizing it, so the name under it always keeps its lines. */
html[data-theme="stage"] .hub-view .shelf.many .game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none; filter: none; border-radius: 0; }
html[data-theme="stage"] .hub-view .shelf.many .game-card.on .game-art img { transform: none; }
html[data-theme="stage"] .hub-view .shelf.many .game-text {
  flex: none; align-self: stretch; justify-content: center; padding: 0.8vh 0.5vw 1.2vh;
  background: linear-gradient(180deg, rgba(var(--st-magenta-rgb), 0.16), transparent);
}
/* A name always has room for two whole lines, so "Higher or Lower" and "The Chameleon" wrap rather than lose a line. */
html[data-theme="stage"] .hub-view .shelf.many .game-name {
  display: grid; place-items: center; width: 100%; height: calc(2 * 1.12em);
  font-family: var(--st-body); font-weight: 900; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.12;
  white-space: normal; text-wrap: balance; overflow-wrap: normal;
  color: var(--st-ink);
}
html[data-theme="stage"] .hub-view .shelf.dense .game-name { font-size: clamp(1.6vh, 10cqi, 2.5vh); }
/* The picked card steps up into the light: a gold ring, a magenta glow round it, its name in bulb gold. */
html[data-theme="stage"] .hub-view .game-card.on {
  transform: translateY(-0.9vh) scale(1.05); z-index: 1;
  background: linear-gradient(180deg, #55208F, #2A0B4A 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 0.35vh var(--st-gold), inset 0 -0.6vh 0 var(--st-gold), 0 0 3.2vh rgba(var(--st-magenta-rgb), 0.65), 0 0 1vh rgba(var(--st-gold-rgb), 0.5);
}
html[data-theme="stage"] .hub-view .game-card.on .game-name { color: var(--st-bulb); }
html[data-theme="stage"] .hub-view .game-card[aria-disabled='true'] .game-art { opacity: 0.55; filter: saturate(0.5); }
html[data-theme="stage"] .hub-view .game-card[aria-disabled='true'] .game-name { color: var(--st-ink-2); }
html[data-theme="stage"] .hub-view .game-card:focus-visible { outline: 3px solid var(--st-bulb); outline-offset: 4px; }

/* One game alone: the classic plate, dressed for the set. */
html[data-theme="stage"] .hub-view .shelf.solo .game-name { font-family: var(--st-show); font-weight: 800; text-transform: none; color: var(--st-bulb); }
html[data-theme="stage"] .hub-view .shelf.solo .game-art img { border-radius: 1.6vh; }

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

/* The join code as a "Join the show" card: a framed ticket with the code on cream in the middle. */
html[data-theme="stage"] .rail .join {
  --qr: min(13.5vw, 21vh);
  margin-top: 0.4vh; padding: 2vh 1.4vw 2.2vh; gap: var(--tv-sp-2);
  border-radius: 2.4vh;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(var(--st-magenta-rgb), 0.32), transparent 72%),
    linear-gradient(180deg, #3A1268, #1A062D);
  box-shadow: inset 0 0 0 0.3vh rgba(var(--st-gold-rgb), 0.8), inset 0 0 0 0.75vh rgba(26, 6, 45, 0.9), inset 0 0 0 0.9vh rgba(var(--st-magenta-rgb), 0.45), 0 1.2vh 2.6vh rgba(0, 0, 0, 0.5);
}
html[data-theme="stage"] .rail .join::before {
  content: 'Join the show'; display: block; position: static; z-index: auto; order: -1;
  width: auto; height: auto; transform: none; background: none;
  font-family: var(--st-show); font-weight: 800; font-size: var(--tv-md); line-height: 1; letter-spacing: -0.005em;
  color: var(--st-bulb); text-shadow: 0 0 0.5em rgba(var(--st-gold-rgb), 0.6);
}
html[data-theme="stage"] .rail .qr-card { clip-path: none; border-radius: 1.4vh; padding: 0.9vh; box-shadow: 0 0 0 0.35vh var(--st-gold), 0 0 2.4vh rgba(var(--st-gold-rgb), 0.45); }
html[data-theme="stage"] .rail .qr-card .qr { border-radius: 0.6vh; }
html[data-theme="stage"] .rail .qr-wait { border-radius: 1.4vh; font-weight: 800; }
html[data-theme="stage"] .rail .join .seg button { min-height: 2.8rem; }
html[data-theme="stage"] .rail .join-url { color: var(--st-bulb); }
html[data-theme="stage"] .rail .join-hint { color: var(--st-ink-2); font-weight: 700; }

/* In a game's lobby the ticket folds down to a stub: the title across the top, the code beside the hint, the link and
   the switch under them. The roster under it then has the room for a full table of players. */
html[data-theme="stage"] 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; border-radius: 2vh;
}
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"]::before { grid-area: title; font-size: var(--tv-sm); }
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"] .qr-card { grid-area: qr; border-radius: 1vh; padding: 0.6vh; box-shadow: 0 0 0 0.3vh var(--st-gold), 0 0 1.6vh rgba(var(--st-gold-rgb), 0.4); }
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"] .qr-wait { padding: 0.6vh; font-size: var(--tv-xs); }
html[data-theme="stage"] 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="stage"] body.tv[data-view="game"] [data-part="join"] .join-url { grid-area: url; text-align: left; font-size: var(--tv-sm); }
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"] .join-url:empty { display: none; }
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"] .seg { grid-area: seg; }
html[data-theme="stage"] body.tv[data-view="game"] [data-part="join"] .seg button { min-height: 2.4rem; font-size: var(--tv-xs); }

/* Who's here: contestant name plates, each lit in the player's color, in the hub and in a game's lobby alike. */
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-title { font-family: var(--st-show); font-weight: 800; font-size: var(--tv-md); text-transform: none; color: var(--st-ink); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-title .num { font-family: var(--st-show); color: var(--st-gold); }
html[data-theme="stage"] [data-part="game-roster"] .roster-title { font-size: var(--tv-base); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-row {
  min-height: 2.6rem; padding: 0.2rem 0.8rem 0.35rem 0.6rem; border-radius: 1.1vh;
  color: #FFFFFF;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(90deg, rgba(var(--pc), 0.5), rgba(var(--pc), 0.16) 70%),
    #1E0934;
  box-shadow: inset 0 0 0 1.5px rgba(var(--pc), 0.8), inset 0 -0.42vh 0 rgb(var(--pc)), 0 0.5vh 1vh rgba(0, 0, 0, 0.4);
}
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-row i {
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #FFFFFF, rgb(var(--pc)) 60%);
  box-shadow: 0 0 1vh rgba(var(--pc), 0.95);
}
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .rr-name { font-weight: 900; text-transform: none; letter-spacing: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); }
/* In the lobby the names come up to the blurb's size, to find your own from the couch. A name with a word too long
   for its plate (hub-tv.js marks it .long) shrinks to the plate's width rather than break mid-word, down to the plain
   look's size; only a word longer than that still breaks. */
html[data-theme="stage"] .hub-roster .roster-row { container-type: inline-size; }
html[data-theme="stage"] .hub-roster .rr-name { font-size: var(--tv-base); line-height: 1.08; }
html[data-theme="stage"] .hub-roster .rr-name.long { font-size: clamp(var(--tv-xs), 15cqi, var(--tv-base)); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .rr-host { color: var(--st-gold); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-x { border-radius: 1.1vh; background: rgba(30, 9, 52, 0.9); box-shadow: inset 0 0 0 1px rgba(var(--st-gold-rgb), 0.25); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) li.away .roster-row { color: var(--st-ink-3); background: linear-gradient(90deg, rgba(var(--pc), 0.14), rgba(30, 9, 52, 0.85) 70%); box-shadow: inset 0 0 0 1.5px rgba(var(--pc), 0.35); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) li.away .roster-row i { background: transparent; box-shadow: inset 0 0 0 2px rgb(var(--pc)); }
html[data-theme="stage"] :is(.hub-roster, [data-part="game-roster"]) .roster-note { color: var(--st-ink-2); font-weight: 700; }
/* A plate you can pick (The Floor's lobby) steps into the light like a picked card: a gold ring. */
html[data-theme="stage"] [data-part="game-roster"] .roster-row:is(:hover, .on) {
  box-shadow: inset 0 0 0 0.3vh var(--st-gold), inset 0 -0.42vh 0 rgb(var(--pc)), 0 0 1.8vh rgba(var(--st-gold-rgb), 0.45);
}

/* ---------- TV: inside a game ---------- */

/* The rail's go button runs the width of the rail, the biggest lit thing in it. */
html[data-theme="stage"] [data-part="game-rail"] > [data-part="button"].gold { width: 100%; min-height: 6.6vh; padding: 0 1.2vw; font-size: var(--tv-base); }

/* The banner: the line the host reads out, in the show's face under a spotlight from the rig, with the pelmet of the
   stage curtain along its top. */
html[data-theme="stage"] [data-part="game-banner"] { position: relative; isolation: isolate; }
html[data-theme="stage"] [data-part="game-banner"]::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: -3vh; bottom: -2vh; width: 92vh; transform: translateX(-50%);
  background: conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.05) 10deg, rgba(var(--st-bulb-rgb), 0.15) 20deg, rgba(var(--st-bulb-rgb), 0.05) 30deg, transparent 40deg);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
  pointer-events: none;
}
html[data-theme="stage"] [data-part="game-banner"]::after {
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 1.6vh;
  background:
    radial-gradient(ellipse 50% 100% at 50% 0%, #7A1A5C 0 62%, rgba(var(--st-gold-rgb), 0.85) 64% 74%, transparent 76%) 0 0 / 4vh 1.6vh repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}
html[data-theme="stage"] [data-part="game-banner"] .headline {
  font-family: var(--st-show); font-weight: 800; font-size: 5.6vh; line-height: 1.02; letter-spacing: -0.015em; text-transform: none;
  color: var(--st-ink); text-shadow: 0 0 0.5em rgba(var(--st-magenta-rgb), 0.5), 0 0.05em 0 rgba(0, 0, 0, 0.35);
}
html[data-theme="stage"] [data-part="game-banner"] .headline.long { font-size: 4.3vh; }
html[data-theme="stage"] [data-part="game-banner"] .subline {
  margin-inline: auto; max-width: 62ch; font-weight: 700; font-size: 2.3vh; line-height: 1.35; color: var(--st-ink-2); text-wrap: balance;
}

/* Paused: the curtain comes down, the word lit in bulb gold on it and a row of bulbs under it. */
html[data-theme="stage"] [data-part="paused"] {
  background:
    radial-gradient(ellipse 42% 46% at 50% 50%, rgba(var(--st-magenta-rgb), 0.3), transparent 70%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.45)),
    repeating-linear-gradient(90deg, #4A0F3A 0, #7A1A5C 2.2vw, #5C1247 4vw, #2E0828 5.6vw, #4A0F3A 6.4vw);
}
html[data-theme="stage"] [data-part="paused"] .paused-word {
  font-family: var(--st-show); font-weight: 900; font-size: 12vh; text-transform: none; letter-spacing: -0.01em;
  color: var(--st-bulb); text-shadow: 0 0 0.3em rgba(var(--st-gold-rgb), 0.6), 0 0 0.9em rgba(var(--st-magenta-rgb), 0.5), 0 0.05em 0 #3A0628;
}
html[data-theme="stage"] [data-part="paused"] .paused-word::after {
  content: ''; display: block; width: 33.6vh; height: 2vh; margin: 3vh auto 0;
  background: radial-gradient(circle, var(--st-bulb) 0 30%, rgba(var(--st-gold-rgb), 0.5) 42%, transparent 62%) 0 50% / 2.8vh 2vh repeat-x;
}
html[data-theme="stage"] [data-part="paused"] .paused-hint { font-weight: 700; color: var(--st-ink); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }

/* The finale: the curtain open on both sides with its pelmet across the top, a warm spotlight on the champion, and the
   standings as contestant plates. */
html[data-theme="stage"] body.tv [data-part="finale"] {
  background:
    linear-gradient(180deg, #5C1247, #4A0F3A) 0 0 / 100% 2.4vh no-repeat,
    linear-gradient(var(--st-gold), var(--st-gold)) 0 2.4vh / 100% 0.35vh no-repeat,
    radial-gradient(ellipse 50% 100% at 50% 0%, #6A1650 0 64%, transparent 66%) 0 2.75vh / 6vh 2.6vh repeat-x,
    linear-gradient(90deg, rgba(0, 0, 0, 0) 2vw, rgba(0, 0, 0, 0.5) 4.6vw) 0 0 / 4.6vw 100% no-repeat,
    linear-gradient(270deg, rgba(0, 0, 0, 0) 2vw, rgba(0, 0, 0, 0.5) 4.6vw) 100% 0 / 4.6vw 100% no-repeat,
    repeating-linear-gradient(90deg, #4A0F3A 0, #7A1A5C 1.2vw, #5C1247 2.2vw, #2E0828 3vw, #4A0F3A 3.4vw) 0 0 / 4.6vw 100% no-repeat,
    repeating-linear-gradient(270deg, #4A0F3A 0, #7A1A5C 1.2vw, #5C1247 2.2vw, #2E0828 3vw, #4A0F3A 3.4vw) 100% 0 / 4.6vw 100% no-repeat,
    radial-gradient(ellipse 52% 80% at 27% 46%, rgba(var(--pc, var(--st-gold-rgb)), 0.3), transparent 72%),
    radial-gradient(ellipse 60% 30% at 50% 104%, rgba(var(--st-magenta-rgb), 0.24), transparent 72%),
    linear-gradient(180deg, #1C0733, #0D0217 80%);
}
html[data-theme="stage"] body.tv [data-part="finale"]::before {
  background: linear-gradient(180deg, rgba(var(--st-bulb-rgb), 0.26), rgba(var(--st-bulb-rgb), 0.06) 62%, transparent);
}
/* The show's face is wide, so the champion's name is sized to its column (a nine-letter name fills it) and only a
   very long single word breaks. */
html[data-theme="stage"] body.tv [data-part="finale"] .finale-hero { container-type: inline-size; }
html[data-theme="stage"] body.tv [data-part="finale"] .finale-name {
  font-family: var(--st-show); font-weight: 900; font-size: min(10vh, 11cqi); line-height: 1.02; letter-spacing: -0.02em; text-transform: none;
  overflow-wrap: break-word;
}
html[data-theme="stage"] body.tv [data-part="finale"] .finale-line { font-weight: 700; color: var(--st-ink-2); }
html[data-theme="stage"] body.tv [data-part="finale"] [data-part="button"] { font-size: var(--tv-base); min-height: 6.6vh; padding: 0 2vw; }
html[data-theme="stage"] body.tv [data-part="finale"] .stats { border-spacing: 0 0.8vh; }
html[data-theme="stage"] body.tv [data-part="finale"] .stats.dense { border-spacing: 0 0.45vh; }
html[data-theme="stage"] body.tv [data-part="finale"] .stats th { font-weight: 800; color: var(--st-ink-2); }
html[data-theme="stage"] body.tv [data-part="finale"] .stats tbody tr {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 48%), linear-gradient(90deg, rgba(var(--pc), 0.42), rgba(var(--pc), 0.1) 62%), #1E0934;
}
html[data-theme="stage"] body.tv [data-part="finale"] .stats td { box-shadow: inset 0 -0.35vh 0 rgba(var(--pc), 0.8); }
html[data-theme="stage"] body.tv [data-part="finale"] .stats td:first-child { border-radius: 1.2vh 0 0 1.2vh; color: var(--st-ink-2); }
html[data-theme="stage"] body.tv [data-part="finale"] .stats td:last-child { border-radius: 0 1.2vh 1.2vh 0; }
html[data-theme="stage"] body.tv [data-part="finale"] .stats td.p { font-weight: 900; text-transform: none; color: #FFFFFF; }
html[data-theme="stage"] body.tv [data-part="finale"] .stats td.p i { border-radius: 50%; background: radial-gradient(circle at 38% 34%, #FFFFFF, rgb(var(--pc)) 60%); }
html[data-theme="stage"] body.tv [data-part="finale"] .stats tr.first {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 48%), linear-gradient(90deg, rgba(var(--st-gold-rgb), 0.42), rgba(var(--st-gold-rgb), 0.12) 62%), #2A0B4A;
}
html[data-theme="stage"] body.tv [data-part="finale"] .stats tr.first td { color: var(--st-bulb); box-shadow: inset 0 -0.35vh 0 var(--st-gold), 0 0 1.6vh rgba(var(--st-gold-rgb), 0.25); }

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

/* The sting: the game's name in gold on a lit sign, a run of bulbs under it. */
html[data-theme="stage"] .sting {
  background:
    radial-gradient(ellipse 46% 40% at 50% 46%, rgba(var(--st-magenta-rgb), 0.42), transparent 74%),
    radial-gradient(ellipse 80% 70% at 50% 50%, #3A1268, #0D0217 80%);
}
html[data-theme="stage"] .sting-name {
  font-family: var(--st-show); font-weight: 900; font-size: 13vh; text-transform: none; letter-spacing: -0.02em; line-height: 1;
  color: var(--st-gold);
  text-shadow: 0 0 0.3em rgba(var(--st-gold-rgb), 0.55), 0 0 0.9em rgba(var(--st-magenta-rgb), 0.6), 0 0.06em 0 #8A4A00;
}
html[data-theme="stage"] .sting-line {
  width: 60vw; height: 2.2vh;
  background: radial-gradient(circle, var(--st-bulb) 0 30%, rgba(var(--st-gold-rgb), 0.5) 42%, transparent 62%) 0 50% / 3.2vh 2.2vh repeat-x;
}

/* The wipe: a velvet curtain drawn across, gold fringe on its edges and the title in the middle. */
html[data-theme="stage"] .wipe {
  background:
    radial-gradient(ellipse 44% 50% at 50% 50%, rgba(var(--st-magenta-rgb), 0.28), transparent 70%),
    repeating-linear-gradient(90deg, #4A0F3A 0, #7A1A5C 2.2vw, #5C1247 4vw, #2E0828 5.6vw, #4A0F3A 6.4vw);
}
html[data-theme="stage"] .wipe::before { width: 1.2vw; background: linear-gradient(90deg, #8A5A00, var(--st-gold) 40%, var(--st-bulb)); box-shadow: 0 0 3vw 0.4vw rgba(var(--st-gold-rgb), 0.5); }
html[data-theme="stage"] .wipe::after { width: 1.2vw; background: linear-gradient(90deg, var(--st-bulb), var(--st-gold) 60%, #8A5A00); box-shadow: 0 0 2vw 0.2vw rgba(var(--st-gold-rgb), 0.45); }
html[data-theme="stage"] .wipe-mark { font-family: var(--st-show); font-weight: 900; letter-spacing: 0.04em; color: var(--st-bulb); text-shadow: 0 0 0.45em rgba(var(--st-gold-rgb), 0.65), 0 0.08em 0 #3A0628; }
html[data-theme="stage"] .wipe-mark .mark-grid { display: none; }

/* The how-to: the game on its podium under a spotlight on the left, the page on the right, the pages as bulbs. */
html[data-theme="stage"] body.tv .howto {
  background:
    conic-gradient(from 166deg at 25% -6%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.1) 12deg, rgba(var(--st-bulb-rgb), 0.14) 14deg, rgba(var(--st-bulb-rgb), 0.1) 16deg, transparent 28deg),
    radial-gradient(ellipse 36% 52% at 25% 52%, rgba(var(--st-magenta-rgb), 0.3), transparent 72%),
    radial-gradient(ellipse 90% 80% at 50% 40%, #2E0D52, #0D0217 82%);
}
html[data-theme="stage"] .howto-name, html[data-theme="stage"] .howto-title {
  font-family: var(--st-show); font-weight: 800; text-transform: none; letter-spacing: -0.01em; line-height: 1.02; color: var(--st-ink);
}
html[data-theme="stage"] .howto-name { color: var(--st-bulb); text-shadow: 0 0 0.4em rgba(var(--st-gold-rgb), 0.55); }
html[data-theme="stage"] body.tv .howto-name { font-size: 7vh; }
html[data-theme="stage"] body.tv .howto-title { font-size: 6.4vh; }
html[data-theme="stage"] .howto-art img { border-radius: 1.6vh; }
html[data-theme="stage"] .howto-kicker, html[data-theme="stage"] .howto-where { font-weight: 800; color: var(--st-pink); }
html[data-theme="stage"] .howto-goal { font-weight: 700; color: var(--st-ink-2); }
html[data-theme="stage"] .howto-body { font-weight: 600; color: var(--st-ink); }
html[data-theme="stage"] .howto-chip { border-radius: var(--st-round); font-weight: 800; box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45); }
html[data-theme="stage"] .howto-tiles i {
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #8A6A44, #4A2E14 70%); box-shadow: none;
}
html[data-theme="stage"] .howto-tiles i.done { background: radial-gradient(circle at 38% 34%, #FFE9B8, #C98A2A 70%); box-shadow: none; }
html[data-theme="stage"] .howto-tiles i.on { background: radial-gradient(circle at 40% 36%, #FFFFFF, var(--st-bulb) 45%, var(--st-gold)); box-shadow: 0 0 1.4vh 0.2vh rgba(var(--st-gold-rgb), 0.8); }
html[data-theme="stage"] .howto-count { font-weight: 800; }
html[data-theme="stage"] .howto-item::before { width: 0.9em; height: 0.9em; bottom: auto; top: 0.18em; border-radius: 50%; }
html[data-theme="stage"] body.tv .howto-item { padding-left: 2.2vw; }
html[data-theme="stage"] .howto-item dt { font-weight: 900; }
html[data-theme="stage"] .howto-item dd { font-weight: 600; }
html[data-theme="stage"] .howto .icon-btn, html[data-theme="stage"] .howto-x { border-radius: 50%; }

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

/* The house: the stage's purple, a beam from the rig on each side and the player's color pooled at the top. */
html[data-theme="stage"] body.phone::before {
  background:
    conic-gradient(from 160deg at 18% -4%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.1) 10deg, rgba(var(--st-bulb-rgb), 0.13) 13deg, rgba(var(--st-bulb-rgb), 0.08) 18deg, transparent 26deg),
    conic-gradient(from 170deg at 84% -4%, transparent 0deg, rgba(var(--st-magenta-rgb), 0.09) 8deg, rgba(var(--st-magenta-rgb), 0.14) 12deg, rgba(var(--st-magenta-rgb), 0.08) 16deg, transparent 24deg),
    radial-gradient(80% 30% at 50% -6%, rgba(var(--me), 0.3), transparent 74%),
    radial-gradient(120% 30% at 50% 104%, rgba(var(--st-magenta-rgb), 0.2), transparent 72%),
    linear-gradient(180deg, #2A0B4A, #12051F 44%, #0D0217);
}

html[data-theme="stage"] .bar .mark { gap: 7px; font-family: var(--st-show); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; color: var(--st-gold); }
html[data-theme="stage"] .bar .mark .mark-grid { display: none; }
/* Three bulbs stand in for the mark's tiles. */
html[data-theme="stage"] .bar .mark::before {
  content: ''; flex: none; width: 26px; height: 8px;
  background: radial-gradient(circle, var(--st-bulb) 0 2.4px, rgba(var(--st-gold-rgb), 0.45) 3.2px, transparent 4.4px) 0 50% / 9px 8px repeat-x;
}
html[data-theme="stage"] .bar .me { clip-path: none; border-radius: var(--st-round); font-weight: 900; background: linear-gradient(90deg, rgba(var(--me), 0.42), rgba(var(--me), 0.14)); box-shadow: inset 0 0 0 1.5px rgba(var(--me), 0.6); }
html[data-theme="stage"] .bar .me i { border-radius: 50%; }
html[data-theme="stage"] .bar .host-btn { clip-path: none; border-radius: var(--st-round); font-weight: 900; }
html[data-theme="stage"] .bar .host-btn.claim { box-shadow: inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.6); }

/* Headings: the show's face for the screen's one headline, the plates' face for the section heads. */
html[data-theme="stage"] .hub-app h1 {
  font-family: var(--st-show); font-weight: 800; font-size: clamp(30px, 8.6vw, 40px); text-transform: none; letter-spacing: -0.015em; line-height: 1.05;
  color: var(--st-ink); text-shadow: 0 0 0.5em rgba(var(--st-magenta-rgb), 0.5);
}
html[data-theme="stage"] .hub-app h1.hero { font-size: clamp(40px, 12vw, 58px); color: var(--st-bulb); text-shadow: 0 0 0.35em rgba(var(--st-gold-rgb), 0.6), 0 0 1em rgba(var(--st-magenta-rgb), 0.5); }
html[data-theme="stage"] .hub-app h2 { font-weight: 900; letter-spacing: 0.06em; color: var(--st-ink); }
html[data-theme="stage"] .hub-app .h2-count { font-family: var(--st-show); color: var(--st-gold); }
html[data-theme="stage"] .hub-app .lede { font-weight: 700; color: var(--st-ink-2); }
html[data-theme="stage"] .hub-app .note { font-weight: 700; color: var(--st-ink-3); }
html[data-theme="stage"] .hub-app .link { font-weight: 800; color: var(--st-ink-2); text-decoration-color: rgba(var(--st-gold-rgb), 0.6); }

/* "I'm new here": the big lit button, a pill with a row of bulbs along its top and its base. */
html[data-theme="stage"] .hub-app #joinNew {
  --face: linear-gradient(180deg, #FF5DB1, var(--st-magenta) 55%, #C8167A);
  --fg: #FFFFFF; --sheen: 0.18;
  min-height: 76px; font-size: var(--ph-xl); letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(80, 0, 40, 0.5);
  background:
    radial-gradient(circle, var(--st-bulb) 0 2.6px, rgba(var(--st-gold-rgb), 0.5) 3.4px, transparent 4.6px) 50% 6px / 18px 10px repeat-x,
    radial-gradient(circle, var(--st-bulb) 0 2.6px, rgba(var(--st-gold-rgb), 0.5) 3.4px, transparent 4.6px) 50% calc(100% - 6px) / 18px 10px repeat-x,
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 50%),
    var(--face);
  box-shadow: inset 0 0 0 2.5px var(--st-gold), inset 0 -3px 0 rgba(90, 0, 50, 0.4), 0 0 22px rgba(var(--st-magenta-rgb), 0.55), 0 8px 18px rgba(0, 0, 0, 0.45);
}
html[data-theme="stage"] .hub-app #joinNew .ico { color: var(--st-bulb); }

/* Contestant plates: who's playing, and everyone else in the lobby. Rounded, lit from the player's color, a light
   strip in that color along the base and a bulb for the swatch. */
html[data-theme="stage"] :is(.hub-app, .drawer) .row {
  --wash: 0.42;
  clip-path: none; border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 46%),
    linear-gradient(90deg, rgba(var(--pc), var(--wash)), rgba(var(--pc), 0.08) 72%),
    #1E0934;
  box-shadow: inset 0 0 0 1.5px rgba(var(--pc), 0.7), inset 0 -4px 0 rgb(var(--pc)), 0 6px 14px rgba(0, 0, 0, 0.4);
}
html[data-theme="stage"] :is(.hub-app, .drawer) .row:focus-visible { outline-offset: 3px; }
html[data-theme="stage"] :is(.hub-app, .drawer) .row:disabled { opacity: 0.55; }
html[data-theme="stage"] :is(.hub-app, .drawer) .row .sw, html[data-theme="stage"] .hub-app .tile .sw {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #FFFFFF, rgb(var(--pc)) 62%);
  box-shadow: 0 0 12px 2px rgba(var(--pc), 0.85);
}
html[data-theme="stage"] :is(.hub-app, .drawer) .row-name { font-weight: 900; font-size: var(--ph-lg); color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
html[data-theme="stage"] :is(.hub-app, .drawer) .row-tag {
  padding: 3px 10px; border-radius: var(--st-round); font-weight: 800; color: var(--st-ink-2); background: rgba(14, 4, 24, 0.55);
}
html[data-theme="stage"] :is(.hub-app, .drawer) .row-main .row-tag { align-self: flex-start; padding: 1px 8px; }
html[data-theme="stage"] :is(.hub-app, .drawer) .row-tag.on { color: var(--st-pink); }
html[data-theme="stage"] :is(.hub-app, .drawer) .row-tag.host { color: var(--st-gold); }
html[data-theme="stage"] .hub-app .rm-btn { border-radius: 12px; }

/* The join form: a plum card with rounded fields and round color bulbs. */
html[data-theme="stage"] :is(.hub-app, .drawer) .sheet {
  clip-path: none; border-radius: 20px;
  background: radial-gradient(100% 60% at 50% 0%, rgba(var(--st-magenta-rgb), 0.2), transparent 70%), linear-gradient(180deg, #34105C, #1E0934);
  box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45), 0 10px 24px rgba(0, 0, 0, 0.45);
}
html[data-theme="stage"] .hub-app .form label, html[data-theme="stage"] .hub-app .form .label { font-weight: 800; color: var(--st-ink-2); }
html[data-theme="stage"] .hub-app .field {
  border-radius: 14px; font-family: var(--st-body); font-weight: 800; font-size: var(--ph-lg); color: var(--st-ink);
  background-color: rgba(14, 4, 24, 0.75);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.35);
}
html[data-theme="stage"] .hub-app .field:focus-visible { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 0 2px var(--st-gold), 0 0 16px rgba(var(--st-gold-rgb), 0.35); }
html[data-theme="stage"] .hub-app .swatch { clip-path: none; border-radius: 50%; background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 46%), rgb(var(--pc)); box-shadow: 0 0 10px rgba(var(--pc), 0.6); }
html[data-theme="stage"] .hub-app .swatch[aria-checked="true"] { box-shadow: inset 0 0 0 3px #1E0934, inset 0 0 0 5px #FFFFFF, 0 0 16px rgba(var(--pc), 0.9); }
html[data-theme="stage"] .hub-app .swatch:disabled { box-shadow: none; }
html[data-theme="stage"] .hub-app .form .btn.gold { min-height: 60px; font-size: var(--ph-lg); }

/* Your own plate on top of the lobby, as a backstage pass: a laminated card on a lanyard, punched at the top, your
   color across it and your name big. */
html[data-theme="stage"] .hub-app .lift:has(> .tile) { filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); }
html[data-theme="stage"] .hub-app .tile {
  clip-path: none; border-radius: 22px; overflow: hidden;
  padding: 46px var(--sp-5) 26px;
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.1) 46%, transparent 54%),
    linear-gradient(180deg, rgba(var(--pc), 0.85) 0 30px, rgba(var(--pc), 0.32) 30px, rgba(var(--pc), 0.1) 70%),
    #1E0934;
  box-shadow: inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.7), inset 0 0 0 7px rgba(30, 9, 52, 0.55);
}
/* The punched slot the lanyard goes through. */
html[data-theme="stage"] .hub-app .tile::before {
  content: ''; position: absolute; left: 50%; top: 9px; width: 54px; height: 11px; margin-left: -27px; border-radius: 6px;
  background: #0D0217; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.35);
}
html[data-theme="stage"] .hub-app .tile::after { height: 6px; background: rgb(var(--pc)); box-shadow: 0 -10px 24px 2px rgba(var(--pc), 0.55); }
html[data-theme="stage"] .hub-app .tile-name {
  font-family: var(--st-show); font-weight: 800; font-size: clamp(28px, 9vw, 44px); text-transform: none; letter-spacing: -0.02em; line-height: 1.04;
  overflow-wrap: break-word;
  color: #FFFFFF; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 0 26px rgba(var(--pc), 0.75);
}
html[data-theme="stage"] .hub-app .tile-sub { font-weight: 900; font-size: var(--ph-md); text-transform: uppercase; letter-spacing: 0.08em; color: var(--st-ink); }
html[data-theme="stage"] .hub-app .tile-edit { top: 38px; border-radius: 50%; background: rgba(14, 4, 24, 0.55); box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45); }
/* The host's pass runs as one line, punched at its left end. */
html[data-theme="stage"] .hub-app .tile.strip {
  padding: 8px 8px 10px 40px; min-height: 64px; border-radius: 18px;
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.08) 46%, transparent 54%),
    linear-gradient(90deg, rgba(var(--pc), 0.6), rgba(var(--pc), 0.14) 70%),
    #1E0934;
}
html[data-theme="stage"] .hub-app .tile.strip::before { left: 14px; top: 50%; width: 11px; height: 30px; margin: -15px 0 0; }
html[data-theme="stage"] .hub-app .tile.strip::after { height: 4px; }
html[data-theme="stage"] .hub-app .tile.strip .tile-name { font-size: var(--ph-xl); }
html[data-theme="stage"] .hub-app .tile.strip .tile-sub { font-size: var(--ph-sm); color: var(--st-gold); }
html[data-theme="stage"] .hub-app .tile.strip .tile-edit { margin-left: 2px; }

/* The host's shelf: tonight's acts as lit cards in two rows that swipe sideways, the next column peeking in from the
   right. Ready games come first. Eleven games stay one swipe wide instead of six screens tall, so Everyone else sits
   right under them. The whole card plays; the rules button sits on the art.
   The scroller itself carries no filter: iPhone Safari draws a filtered scroller's whole wide strip through one layer
   of limited size, and mid-swipe it drops the part past that edge, blanking half the cards until it catches up. The
   cards cast their own shadow instead (they are not clipped here), and the strip's padding gives that shadow room
   under the second row, which the negative margins hand back so nothing around it moves. */
html[data-theme="stage"] .hub-app .list[data-part="shelf"] {
  display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 43%;
  gap: 14px 12px;
  margin: -2px calc(-1 * var(--sp-4, 16px)) -16px; padding: 4px var(--sp-4, 16px) 24px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--sp-4, 16px);
  scrollbar-width: none;
  filter: none;
}
html[data-theme="stage"] .hub-app .list[data-part="shelf"]::-webkit-scrollbar { display: none; }
html[data-theme="stage"] .hub-app .list[data-part="shelf"] .game-plate { scroll-snap-align: start; }
html[data-theme="stage"] .hub-app .game-plate {
  /* --lift-1's two drop shadows, as a box-shadow the card casts itself. */
  --st-plate-drop: 0 3px 3px rgba(0, 0, 0, 0.5), 0 10px 14px rgba(0, 0, 0, 0.38);
  clip-path: none; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  min-height: 0; padding: 0 0 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 46%),
    #2A0B4A;
  box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.35), inset 0 -3px 0 rgba(var(--st-gold-rgb), 0.6), var(--st-plate-drop);
}
html[data-theme="stage"] .hub-app .game-plate.off { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 46%), #1E0934; box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.18), var(--st-plate-drop); }
html[data-theme="stage"] .hub-app .game-plate:has(.plate-go:focus-visible) { outline-color: var(--st-gold); outline-offset: 3px; }
html[data-theme="stage"] .hub-app .game-thumb { clip-path: none; width: 100%; border-radius: 16px 16px 0 0; box-shadow: inset 0 -1.5px 0 rgba(var(--st-gold-rgb), 0.35); }
html[data-theme="stage"] .hub-app .game-plate.off .game-thumb img { opacity: 0.42; }
html[data-theme="stage"] .hub-app .plate-go { gap: 3px; padding: 0 10px; }
/* A name keeps two whole lines' room, so the cards in a row line up and nothing is cut. */
html[data-theme="stage"] .hub-app .game-title { min-height: calc(2 * 1.12em); font-weight: 900; font-size: var(--ph-base); line-height: 1.12; letter-spacing: 0; text-transform: none; color: #FFFFFF; overflow-wrap: normal; }
html[data-theme="stage"] .hub-app .game-fit { font-size: var(--ph-xs); font-weight: 800; color: var(--st-pink); }
html[data-theme="stage"] .hub-app .game-fit.warn { color: var(--st-bulb); }
/* The action under each card says what a tap does: a gold Play once the game has its phones, a quiet Open lobby while
   it still waits for some (the line above says how many), nothing on a game the room cannot start. */
html[data-theme="stage"] .hub-app .play-chip {
  align-self: flex-start; width: auto; height: 34px; margin: 2px 10px 0; padding: 0 14px 0 11px;
  display: inline-flex; align-items: center; gap: 6px;
  clip-path: none; border-radius: var(--st-round); font-size: var(--ph-sm); font-weight: 900;
  color: var(--on-gold); background: var(--st-gold-metal); box-shadow: 0 0 12px rgba(var(--st-gold-rgb), 0.4);
}
html[data-theme="stage"] .hub-app .play-chip::after { content: 'Play'; }
html[data-theme="stage"] .hub-app .game-plate[data-ready="false"] .play-chip {
  color: var(--st-ink); background: rgba(14, 4, 24, 0.6); box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45);
}
html[data-theme="stage"] .hub-app .game-plate[data-ready="false"] .play-chip .ico { display: none; }
html[data-theme="stage"] .hub-app .game-plate[data-ready="false"] .play-chip::after { content: 'Open lobby'; }
html[data-theme="stage"] .hub-app .game-plate.off .play-chip { display: none; }
html[data-theme="stage"] .hub-app .game-plate:not(.off):has(.plate-go:active) .play-chip { color: var(--on-gold); background: var(--st-gold-metal); filter: brightness(0.88); }
html[data-theme="stage"] .hub-app .plate-rules {
  position: absolute; top: 4px; right: 4px;
  width: 44px; height: 44px; border-radius: 50%;
  color: #FFFFFF; background: rgba(14, 4, 24, 0.72); box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.45);
}
html[data-theme="stage"] .hub-app .plate-rules .ico { font-size: 20px; }
html[data-theme="stage"] .hub-app .plate-rules:focus-visible { outline-offset: 2px; }

/* Waiting on the host: an announcement under a spotlight, the crown lit at its top. */
html[data-theme="stage"] .hub-app .lift:has(> .wait) { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); }
html[data-theme="stage"] .hub-app .wait {
  clip-path: none; border-radius: 24px;
  align-items: center; text-align: center; gap: 10px; padding: 30px var(--sp-5) 28px;
  background:
    conic-gradient(from 160deg at 50% -30%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.16) 12deg, rgba(var(--st-bulb-rgb), 0.24) 20deg, rgba(var(--st-bulb-rgb), 0.16) 28deg, transparent 40deg),
    radial-gradient(60% 40% at 50% 100%, rgba(var(--pc), 0.32), transparent 72%),
    linear-gradient(180deg, #34105C, #1A062D);
  box-shadow: inset 0 0 0 2px rgba(var(--st-gold-rgb), 0.75), inset 0 0 0 7px rgba(26, 6, 45, 0.8), inset 0 0 0 8.5px rgba(var(--st-magenta-rgb), 0.45);
}
html[data-theme="stage"] .hub-app .wait > .ico { font-size: 40px; color: var(--st-gold); filter: drop-shadow(0 0 10px rgba(var(--st-gold-rgb), 0.75)); }
html[data-theme="stage"] .hub-app .wait-line { font-family: var(--st-show); font-weight: 800; font-size: var(--ph-xl); text-transform: none; line-height: 1.12; letter-spacing: -0.01em; color: #FFFFFF; }
html[data-theme="stage"] .hub-app .wait-line .who { text-shadow: 0 0 0.5em rgba(var(--pc), 0.7); }
html[data-theme="stage"] .hub-app .wait .note { text-align: center; color: var(--st-ink-2); }

/* The host drawer: a plum sheet with rounded shoulders and a gold glow along its top. */
html[data-theme="stage"] .drawer-scrim { background: rgba(10, 2, 18, 0.78); }
html[data-theme="stage"] .drawer-sheet {
  clip-path: none; border-radius: 26px 26px 0 0;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(var(--st-gold-rgb), 0.2), transparent 70%),
    linear-gradient(180deg, #34105C, #160626 50%);
  box-shadow: inset 0 2px 0 rgba(var(--st-gold-rgb), 0.7);
}
html[data-theme="stage"] .drawer-head h2 { font-family: var(--st-show); font-weight: 800; text-transform: none; }
html[data-theme="stage"] .drawer h3 { font-weight: 900; letter-spacing: 0.06em; color: var(--st-ink-2); }
html[data-theme="stage"] .drawer .now-name { font-family: var(--st-show); font-weight: 800; text-transform: none; color: var(--st-bulb); }
html[data-theme="stage"] .drawer .now-status { font-weight: 800; color: var(--st-pink); }
html[data-theme="stage"] .drawer .icon-btn { border-radius: 50%; }
html[data-theme="stage"] .drawer .ctl { clip-path: none; border-radius: 18px; background: linear-gradient(180deg, rgba(var(--tone), 0.2), rgba(var(--tone), 0.05)), linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%), #2A0B4A; box-shadow: inset 0 0 0 1.5px rgba(var(--tone), 0.4), inset 0 -3px 0 rgba(var(--tone), 0.65); }
html[data-theme="stage"] .drawer .ctl b { font-weight: 900; }
html[data-theme="stage"] .drawer .ctl span { font-weight: 700; }
html[data-theme="stage"] .drawer .ctl.armed { background: var(--red); box-shadow: none; }
html[data-theme="stage"] .drawer .seg button { font-weight: 900; }
html[data-theme="stage"] .drawer .seg button[aria-checked='true'] { color: var(--on-gold); background: var(--st-gold-metal); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }

/* The phone's how-to: the same stage, the pages as bulbs. */
html[data-theme="stage"] body.phone .howto {
  background:
    conic-gradient(from 164deg at 50% -8%, transparent 0deg, rgba(var(--st-bulb-rgb), 0.08) 12deg, rgba(var(--st-bulb-rgb), 0.12) 16deg, rgba(var(--st-bulb-rgb), 0.08) 20deg, transparent 32deg),
    radial-gradient(110% 30% at 50% 0%, rgba(var(--st-magenta-rgb), 0.26), transparent 72%),
    linear-gradient(180deg, #2A0B4A, #12051F 40%, #0D0217);
}
html[data-theme="stage"] body.phone .howto-name { font-size: var(--ph-xl); }
html[data-theme="stage"] body.phone .howto-page h1 { font-family: var(--st-show); font-weight: 800; text-transform: none; letter-spacing: -0.01em; line-height: 1.05; color: var(--st-ink); overflow-wrap: break-word; }
html[data-theme="stage"] body.phone .howto-thumb { clip-path: none; border-radius: 10px; }
html[data-theme="stage"] body.phone .howto-tiles i { width: 16px; height: 16px; }
html[data-theme="stage"] body.phone .howto-dock { background: linear-gradient(180deg, rgba(13, 2, 23, 0), rgba(13, 2, 23, 0.94) 34%, #0D0217); }

/* ---------- phone: inside a game ---------- */

/* The start dock: the page fades into the night under the go button. While it waits for more players the button is
   an unlit plate, still readable, rather than a greyed-out gold one. */
html[data-theme="stage"] [data-part="start-dock"] { background: linear-gradient(180deg, rgba(var(--obsidian-rgb), 0), rgba(var(--obsidian-rgb), 0.94) 38%, var(--obsidian)); }
html[data-theme="stage"] [data-part="start-dock"] [data-part="button"]:disabled {
  --face: linear-gradient(180deg, #34105C, #250B40); --fg: var(--st-ink-2);
  opacity: 1; filter: none;
  box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.35);
}

/* The phone's finale: the crest is a lit gold medallion, the winner's name in the show's face, the stats on plum plates
   with a gold base. */
html[data-theme="stage"] body.phone [data-part="finale"] .champ::before { background: radial-gradient(closest-side, rgba(var(--st-magenta-rgb), 0.3), rgba(var(--st-gold-rgb), 0.12) 55%, transparent); }
html[data-theme="stage"] body.phone [data-part="finale"] .crest {
  clip-path: none; border-radius: 50%;
  color: var(--on-gold); background: var(--st-gold-metal);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45), 0 0 0 4px #1E0934, 0 0 0 6px var(--st-gold), 0 0 26px rgba(var(--st-gold-rgb), 0.5);
}
html[data-theme="stage"] body.phone [data-part="finale"] .champ-name { font-family: var(--st-show); font-weight: 900; text-transform: none; letter-spacing: -0.02em; line-height: 1.02; }
html[data-theme="stage"] body.phone [data-part="finale"] .stat {
  clip-path: none; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%), #2A0B4A;
  box-shadow: inset 0 0 0 1.5px rgba(var(--st-gold-rgb), 0.3), inset 0 -3px 0 rgba(var(--st-gold-rgb), 0.6);
}
html[data-theme="stage"] body.phone [data-part="finale"] .stat span { font-weight: 700; color: var(--st-ink-2); }

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

/* The classic ident's pieces stay put away; the stage's own takes the cover. */
html[data-theme="stage"] .splash.run { background: #0D0217; }
html[data-theme="stage"] .splash > :not(.stage-show) { display: none; }
html[data-theme="stage"] .stage-show { position: absolute; inset: 0; overflow: hidden; }
html[data-theme="stage"] .stage-show .stage-rig { position: absolute; z-index: 0; }
html[data-theme="stage"] .stage-show .stage-floor { left: -5vw; width: 110vw; bottom: -58vh; height: 92vh; }
/* The sign: the title in a frame of bulbs, in the middle of the set. */
html[data-theme="stage"] .stage-sign {
  position: absolute; left: 50%; top: 44%; z-index: 1;
  display: grid; place-items: center;
  padding: 7vh 6vw 7.4vh; border-radius: 4.4vh;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 80% 110% at 50% 0%, rgba(var(--st-magenta-rgb), 0.42), transparent 70%),
    linear-gradient(180deg, #3A1268, #1A062D);
  box-shadow: inset 0 0 0 0.45vh rgba(var(--st-gold-rgb), 0.85), inset 0 0 0 4.8vh rgba(26, 6, 45, 0.55), 0 0 9vh rgba(var(--st-magenta-rgb), 0.4), 0 3vh 6vh rgba(0, 0, 0, 0.6);
}
html[data-theme="stage"] .stage-title {
  margin: 0; white-space: nowrap;
  font-family: var(--st-show); font-weight: 900; font-size: 11vh; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--st-ink);
  text-shadow: 0 0 0.3em rgba(var(--st-gold-rgb), 0.6), 0 0 0.9em rgba(var(--st-magenta-rgb), 0.55), 0 0.05em 0 #8A4A00;
}
html[data-theme="stage"] .stage-sign .stage-bulbs { inset: 2.4vh; border-radius: 2vh; column-gap: 4.4vh; }
html[data-theme="stage"] .stage-sign .stage-bulb { --s: 2vh; }
html[data-theme="stage"] .stage-sign .stage-bulb::after { animation: none; opacity: 0; transition: opacity 120ms; }
html[data-theme="stage"] .stage-sign .stage-bulb.on::after { opacity: 1; }
html[data-theme="stage"] .stage-sign.chase .stage-bulb::after { animation: stage-chase 1.1s linear infinite; animation-delay: calc(var(--k, 0) * -0.367s); opacity: 1; }
html[data-theme="stage"] body.phone .stage-sign { top: 42%; max-width: 94vw; padding: 4.6vh 6vw 5vh; border-radius: 3vh; box-shadow: inset 0 0 0 0.35vh rgba(var(--st-gold-rgb), 0.85), inset 0 0 0 3.2vh rgba(26, 6, 45, 0.55), 0 0 6vh rgba(var(--st-magenta-rgb), 0.4); }
html[data-theme="stage"] body.phone .stage-title { font-size: min(7.2vw, 5vh); }
html[data-theme="stage"] body.phone .stage-sign .stage-bulbs { inset: 1.6vh; border-radius: 1.4vh; column-gap: 3.2vh; }
html[data-theme="stage"] body.phone .stage-sign .stage-bulb { --s: 1.3vh; }
/* The real sign in the bar is put back as the cover starts to lift, so the two cross rather than one popping in. */
html[data-theme="stage"].splashing.stage-lifting .top .mark,
html[data-theme="stage"].splashing.stage-lifting .bar .mark { opacity: 1; animation: none; }

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

/* The set stands still: the beams hold where they hang, the bulbs stay lit, and the glows that cost a frame go. */
html[data-theme="stage"].lite .stage-beam { animation: none; will-change: auto; }
html[data-theme="stage"].lite .hub-view .banner::before, html[data-theme="stage"].lite .hub-view .banner::after { animation: none; filter: none; }
html[data-theme="stage"].lite .stage-beam.b3 { display: none; }
html[data-theme="stage"].lite .stage-bulb::after { animation: none; box-shadow: none; }
html[data-theme="stage"].lite .stage-sign.chase .stage-bulb::after { animation: none; }
html[data-theme="stage"].lite .hub-view .game-card.on { box-shadow: inset 0 0 0 0.35vh var(--st-gold), inset 0 -0.6vh 0 var(--st-gold); }
html[data-theme="stage"].lite .hub-view .shelf { filter: none; }
html[data-theme="stage"].lite .feature-art img { box-shadow: 0 0 0 0.3vh rgba(var(--st-gold-rgb), 0.75), 0 0 0 0.7vh rgba(20, 4, 36, 0.8); }
html[data-theme="stage"].lite .feature-name { text-shadow: none; }
html[data-theme="stage"].lite .hub-view .feature { box-shadow: var(--frame); }
html[data-theme="stage"].lite .top .mark { box-shadow: inset 0 0 0 0.18rem rgba(var(--st-gold-rgb), 0.8), inset 0 0 0 0.42rem rgba(30, 9, 52, 0.9); }
html[data-theme="stage"].lite .hub-app .lift:has(> .tile), html[data-theme="stage"].lite .hub-app .lift:has(> .wait) { filter: none; }
html[data-theme="stage"].lite [data-part="game-banner"]::before { display: none; }
html[data-theme="stage"].lite [data-part="game-banner"] .headline { text-shadow: 0 0.05em 0 rgba(0, 0, 0, 0.35); }
html[data-theme="stage"].lite [data-part="paused"] .paused-word { text-shadow: 0 0.05em 0 #3A0628; }
html[data-theme="stage"].lite :is(.seg, [data-part="seg"]) button[aria-checked='true'] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55); }

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

/* base.css already runs every animation to its end at once; the lights rest where they hang, lit. */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="stage"] .stage-beam, html[data-theme="stage"] .stage-bulb::after { animation: none !important; }
  html[data-theme="stage"] .hub-view .banner::before, html[data-theme="stage"] .hub-view .banner::after { 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="stage"] .hub-app [data-part="cup"] { clip-path: none; border-radius: 22px; }
