/* The look of the station and the app: dark panels, the blue of the logo, the ball's yellow. */
:root { color-scheme: dark; --ink: #E9EFF4; --muted: #9EA3A8; --dim: #53575D; --line: #232930; --panel: #1A1F26; --bg: #12161C; --blue: #5E9BD1; --ball: #DDE83A; --red: #E5484D; --glass: rgba(18, 22, 28, .7); --bar: rgba(18, 22, 28, .92); --grid: #232930; --logo: url("/viewer/logo.svg"); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { color-scheme: light; --ink: #15191E; --muted: #5F666E; --dim: #A3A9B0; --line: #DDE2E7; --panel: #FFFFFF; --bg: #F2F4F6; --blue: #3D7FC0; --red: #D83A40; --glass: rgba(255, 255, 255, .8); --bar: rgba(242, 244, 246, .92); --grid: #C6CCD2; --logo: url("/viewer/logo_light.svg"); } }
:root[data-theme="light"] { color-scheme: light; --ink: #15191E; --muted: #5F666E; --dim: #A3A9B0; --line: #DDE2E7; --panel: #FFFFFF; --bg: #F2F4F6; --blue: #3D7FC0; --red: #D83A40; --glass: rgba(255, 255, 255, .8); --bar: rgba(242, 244, 246, .92); --grid: #C6CCD2; --logo: url("/viewer/logo_light.svg"); }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 16px/1.4 system-ui, sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; touch-action: pan-x pan-y; }   /* no pinch or double-tap zoom */
[hidden] { display: none !important; }
h1 { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 600; margin: 0; }
p { margin: 0; color: var(--muted); }
button { font: inherit; padding: 12px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--blue); color: var(--bg); border-color: var(--blue); font-weight: 700; font-size: 18px; padding: 16px 24px; }
button.danger { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; font-size: 18px; padding: 16px 24px; }
button.quiet { background: none; border-color: transparent; color: var(--muted); padding-left: 0; }
button.subtle { font-size: 13px; align-self: center; padding: 6px 12px; }
.screen { display: flex; flex-direction: column; gap: 20px; padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.logo { height: 120px; aspect-ratio: 411.3 / 204.7; margin: 0 auto 24px; background: var(--logo) center / contain no-repeat; }
.row { display: flex; gap: 12px; align-items: center; }
.grow { flex: 1; }
.card { display: flex; gap: 16px; align-items: center; text-align: left; padding: 18px 20px; }
.card h2 { font-size: 19px; margin-bottom: 4px; }
.icon { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card .icon { color: var(--blue); }
.icon.big { width: 56px; height: 56px; align-self: center; color: var(--blue); }
button.with-icon { display: inline-flex; align-items: center; gap: 6px; }
button.with-icon .icon { width: 18px; height: 18px; }
.card > .game-icon { width: 56px; height: 40px; }
.game-icon { color: var(--blue); }
.game-name { display: flex; align-items: center; gap: 10px; }
.game-name .game-icon { width: 1.6em; height: 1em; flex: none; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--ball); outline-offset: 3px; }
.drill-demo { display: block; width: 100%; max-height: 220px; flex: none; border-radius: 16px; background: var(--panel); }
.demo-toggle { align-self: flex-start; }
.status { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.ready { background: var(--blue); }
.muted { color: var(--muted); }
.stage { position: fixed; inset: 0; background: var(--bg); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewport { position: relative; flex: none; height: 40vh; height: 40dvh; border-radius: 16px; overflow: hidden; background: var(--panel); }
.viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewport .footage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: var(--bg); opacity: 0; transition: opacity .25s; }
.viewport .footage.shown { opacity: 1; }
.viewport-frame { position: relative; }
.view-toggles { position: absolute; bottom: 8px; right: 8px; z-index: 1; display: flex; align-items: flex-end; gap: 6px; }
.frame-toggles { position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; gap: 8px; }
.replay.pinned { position: fixed; z-index: 6; top: 0; left: 0; right: 0; height: calc(40dvh + env(safe-area-inset-top, 0px)); padding: 0; background: var(--bg); display: block; border-bottom: 1px solid var(--line); }
.screen.replay-pinned { padding-top: calc(var(--pinned-height) + 20px); }   /* the page starts below the pinned replay */
.layer-menu { position: relative; }
.layer-list { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.speed-choice { min-width: 52px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); }
.play-toggle, .back-toggle { padding: 6px; border-radius: 10px; flex: none; }
.play-toggle .icon, .back-toggle .icon { width: 20px; height: 20px; display: block; }
.play-toggle .icon { fill: currentColor; }
.layer-toggle, .fullscreen-toggle { padding: 6px; border-radius: 10px; background: var(--glass); color: var(--ink); }
.layer-toggle { color: var(--muted); }
.layer-toggle.on { color: var(--ink); border-color: var(--blue); }
.layer-toggle .icon, .fullscreen-toggle .icon { width: 22px; height: 22px; display: block; }
.replay.full { position: fixed; inset: 0; z-index: 20; border-radius: 0; padding: 0; background: var(--bg); display: block; }
.replay.full .viewport-frame, .replay.pinned .viewport-frame { position: absolute; inset: 0; }
.replay.full .viewport, .replay.pinned .viewport { height: 100% !important; aspect-ratio: auto !important; border-radius: 0; }
.replay.full .chip-strip, .replay.pinned .chip-strip { position: absolute; z-index: 1; top: calc(8px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; }
.replay.full .frame-toggles, .replay.pinned .frame-toggles { top: calc(56px + env(safe-area-inset-top, 0px)); right: 12px; }   /* below the camera chips */
.replay.full .view-toggles, .replay.pinned .view-toggles { bottom: calc(124px + env(safe-area-inset-bottom, 0px)); right: 12px; }   /* above the segments */
.replay.full .segment-strip, .replay.pinned .segment-strip { position: absolute; z-index: 1; left: 12px; right: 12px; top: auto; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.replay.full .scrub, .replay.pinned .scrub { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(8px); }
.replay.pinned .view-toggles { bottom: 124px; }   /* the bottom of a pinned replay is not the screen's */
.replay.pinned .segment-strip { bottom: 68px; }
.replay.pinned .scrub { bottom: 12px; }
.replay.quiet .chip-strip, .replay.quiet .scrub, .replay.quiet .view-toggles, .replay.quiet .frame-toggles { display: none; }
.scan-prompt { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(18, 22, 28, .75); }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter div { height: 100%; background: var(--blue); transition: width .2s; }
.ring { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; background: rgba(18, 22, 28, .55); }
.ring svg { position: absolute; width: 150px; height: 150px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--blue); stroke-linecap: round; stroke-dasharray: 314; transition: stroke-dashoffset 0s linear; }
.ring.turning .bar { stroke-dasharray: 80 234; }
.ring .inside { position: relative; font-size: 22px; font-weight: 700; }
@keyframes turn { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.ring.turning svg { animation: turn 1.2s linear infinite; }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.heading { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.setting { display: flex; flex-direction: column; gap: 6px; }
.setting label { color: var(--muted); font-size: 14px; }
.setting .value { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
input[type=range] { flex: 1; accent-color: var(--blue); padding: 0; border: none; background: none; }
.court .ground { fill: #1f3a4d; }
.court .region { fill: rgba(94, 155, 209, .35); }
.court .line { fill: none; stroke: var(--ink); stroke-width: 2; }
.court .net { stroke: var(--muted); stroke-width: 3; stroke-dasharray: 4 3; }
.court .bar { stroke: var(--ball); stroke-width: 3; stroke-dasharray: 6 4; }
.court .bar.draggable { cursor: grab; stroke-width: 10; stroke-opacity: .85; }
.court .in { fill: #7fe07f; } .court .out { fill: #ff5a5a; }
.outcome { color: var(--ink); font-size: 18px; }
.log { flex: 1; min-height: 50vh; overflow: auto; background: var(--panel); border-radius: 12px; padding: 10px 12px; font: 12px/1.5 ui-monospace, monospace; color: var(--muted); white-space: pre-wrap; word-break: break-all; }
.log .error { color: #ff8a4f; }
.log .time { color: var(--dim); margin-right: 8px; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--blue); }
.menu { display: flex; flex-direction: column; gap: 12px; }
.menu button { font-size: 22px; padding: 22px; }
input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; min-width: 0; flex: 1; }
.cameras { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.camera { background: var(--panel); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.full-picture { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; gap: 12px; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: #000; }
.full-picture img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.camera img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; display: block; }
.camera .row { padding: 0 12px; font-size: 13px; color: var(--muted); }
.camera .row b { color: var(--ink); }
.camera .bad { color: #ff8a4f; }
.camera button { padding: 4px 10px; font-size: 13px; }
table { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
td { padding: 4px 12px 4px 0; color: var(--muted); }
td:last-child { color: var(--ink); text-align: right; }
.menu button { font-size: 22px; padding: 22px; }
select { font: inherit; padding: 12px 16px; border-radius: 12px; background: var(--panel); color: inherit; border: 1px solid var(--line); }
table { width: 100%; }
.hud { position: absolute; z-index: 1; top: 0; left: 0; right: 0; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 0; display: flex; align-items: flex-start; gap: 12px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud .big { font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hud .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.hud .sub.muted { color: var(--ball); }
.segments { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; overflow-x: auto; }
.chip { flex: none; min-width: 44px; padding: 8px 12px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
.chip.chosen { background: var(--blue); color: var(--bg); }
.chip.served { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; }
.chip .face { width: 28px; height: 28px; font-size: 10px; }
.claim { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 16px; background: var(--panel); }
.claim img { width: 160px; max-width: 45%; flex: none; border-radius: 8px; background: #fff; }
.scrub { display: flex; gap: 12px; align-items: center; }
.stage .scrub { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); background: var(--glass); border-radius: 14px; padding: 8px 12px; backdrop-filter: blur(8px); }
.replay { display: flex; flex-direction: column; gap: 12px; }
.replay .viewport { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.chip-strip { display: flex; gap: 8px; overflow-x: auto; }
.face { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--line); }
.face.small { width: 40px; height: 40px; font-size: 15px; flex: none; }
.players { display: flex; flex-wrap: wrap; gap: 16px; }
.player { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; }
.player figcaption { font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.player.taggable { cursor: pointer; }
.player .tagged { font-size: 12px; text-align: center; }
.player figcaption.registered { color: var(--blue); }
.player .tagged.untagged { color: var(--muted); }
.player-card { align-items: center; }
.player-card .row { align-self: stretch; }
.player-card .primary { align-self: stretch; }
.face.initials { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.scrub input { flex: 1; accent-color: var(--ball); padding: 0; border: none; background: none; }
.hud .panel { background: var(--glass); border-radius: 14px; padding: 12px 16px; backdrop-filter: blur(8px); }
.countdown { position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 180px; font-weight: 800; color: var(--ball); background: rgba(18, 22, 28, .55); pointer-events: none; }
.confirm { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(0, 0, 0, .55); }
.dialog { width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; background: var(--panel); }   /* scrolls inside the screen when taller */
.dialog > * { flex-shrink: 0; }   /* the dialog scrolls rather than squash its parts */
.dialog.centered { align-self: center; text-align: center; padding: 32px 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border-radius: 14px; padding: 16px; }
.stat .value { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dialog.centered .face { align-self: center; width: 96px; height: 96px; font-size: 32px; }
.faces { display: flex; flex-wrap: wrap; gap: 14px; }
.faces span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.games-list .card.station { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
.station p { margin: 0; font-size: 15px; }
.station .faces { gap: 14px; }
.station .face { width: 44px; height: 44px; font-size: 15px; }
.scan-to-play { justify-content: center; gap: 10px; }
.join { display: flex; flex-direction: column; gap: 12px; align-self: stretch; }
.join input { flex: none; padding: 14px 16px; font-size: 17px; text-align: center; }
.player-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.player-choices button { font-size: 17px; font-weight: 700; padding: 14px 20px; }
.guest-bar { align-items: center; gap: 12px; padding: 12px 20px; }
.scan-to-play .icon { width: 22px; height: 22px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 20%, transparent); }
.games-list .new-game { background: none; border: 1.5px dashed color-mix(in srgb, var(--blue) 55%, var(--line)); }
.raise-hands { display: flex; flex-direction: column; gap: 10px; padding: 28px 20px; border-radius: 18px; background: var(--panel); border: 2px solid var(--blue); text-align: center; }
.claim-words { display: flex; flex-direction: column; gap: 6px; }
.chip.rule { cursor: default; border: 1px solid var(--line); background: var(--panel); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.rule-icon { width: 18px; height: 18px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); cursor: pointer; }
.choice.chosen { border-color: var(--blue); color: var(--ink); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.rule-icons { display: inline-flex; gap: 4px; color: var(--muted); }
.rule-icons .rule-icon { width: 16px; height: 16px; color: var(--muted); }
.rule-cross { stroke: var(--red); stroke-width: 2.5; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; gap: 4px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--bar); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.tabs button { flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border: none; background: none; color: var(--muted); font-size: 12px; }
.tabs button.chosen { color: var(--ink); }
.game-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.game-rows button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: none; border-radius: 0; background: var(--panel); text-align: left; }
.game-rows button + button { border-top: 1px solid var(--line); }
.game-rows .game-icon { width: 1.6em; height: 1em; flex: none; }
.row-faces { display: flex; }
.row-faces .face { width: 24px; height: 24px; font-size: 9px; box-shadow: 0 0 0 2px var(--panel); }
.row-faces .face + .face { margin-left: -6px; }
.icon-button { padding: 8px; border-radius: 12px; color: var(--ink); }
.icon-button .icon { width: 24px; height: 24px; display: block; }
.scanner video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #000; }
.tabs .icon { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.screen.tabbed { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
.account-row { display: flex; align-items: center; gap: 12px; }
.account-row .face { width: 44px; height: 44px; font-size: 16px; }
.account-row .grow { min-width: 0; }
.photo-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px; }
.photo-picker button { padding: 0; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.photo-picker button.chosen .face { box-shadow: 0 0 0 3px var(--blue); }
.profile-face .face { width: 120px; height: 120px; font-size: 40px; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.profile-face { position: relative; }
.edit-photo { position: absolute; right: -2px; bottom: -2px; padding: 8px; border-radius: 50%; background: var(--panel); border: 2px solid var(--bg); color: var(--ink); }
.edit-photo .icon { width: 18px; height: 18px; display: block; }
.screen input[type=search] { flex: none; }
.name-link { text-align: left; padding: 0; color: var(--ink); }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.rep-card { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.rep-pick, .rep-add { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 0; background: none; color: var(--ink); font-weight: 600; }
.rep-add { justify-content: center; border: 1px dashed var(--muted); border-radius: 14px; background: none; }
.rep-plus { font-size: 36px; line-height: 1; color: var(--blue); }
.rep-edit { position: absolute; top: 2px; right: 2px; padding: 6px; }
.rep-edit .icon { width: 18px; height: 18px; display: block; color: var(--muted); }
.rep-editor { display: flex; flex-direction: column; gap: 12px; }
.rep-editor .rep-figure { width: 56px; height: 56px; }
.rep-figure { width: 72px; height: 72px; flex: none; stroke: var(--blue); stroke-width: .05; stroke-linecap: round; fill: var(--blue); }
.sequence-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sequence-step .rep-figure { width: 40px; height: 40px; }
.figure-missing { border: 1px dashed var(--muted); border-radius: 8px; }
.sequence-step input[type=number] { width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.step-number { width: 1.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.strictness { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.rep-recorder { display: flex; flex-direction: column; gap: 12px; }
.recording-now { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.recording-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); animation: recording-pulse 1s ease-in-out infinite; }
@keyframes recording-pulse { 50% { opacity: .3; } }
.warning { color: var(--red); }
.rep-body { width: 100%; max-width: 320px; aspect-ratio: 1; align-self: center; }
.pose-figure { width: 100%; max-width: 300px; aspect-ratio: 1; align-self: center; display: block; border-radius: 16px; background: var(--bg); transition: box-shadow .3s; }
.pose-figure.lit { box-shadow: 0 0 0 2px var(--ball), 0 0 28px var(--ball); }
.step-state { text-align: center; }
.step-state.lit { color: var(--ball); }
.pose-ask { align-items: center; }
.pose-ask h2 { margin: 0; }
.pose-name { font-size: 40px; text-align: center; margin: 0; }
.pose-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pose-pick { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 0; background: var(--panel); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; text-align: left; }
.pose-pick .rep-figure { width: 56px; height: 56px; flex: none; }
.pose-pick .muted { font-size: 13px; font-weight: 400; margin-left: auto; }
.rep-bone { stroke: var(--dim); stroke-width: .028; stroke-linecap: round; }
.rep-head { fill: var(--dim); }
.rep-part { cursor: pointer; }
.rep-part-target { fill: transparent; }
.rep-part-mark { fill: var(--panel); stroke: var(--muted); stroke-width: .008; }
.rep-part.counted .rep-part-mark { fill: var(--blue); stroke: var(--blue); }
.rep-part.chosen .rep-part-mark { stroke: var(--ink); stroke-width: .012; }
.rep-caption { margin: 0; text-align: center; font-weight: 600; min-height: 1.4em; }
.chip .rep-figure { width: 22px; height: 22px; margin-right: 4px; vertical-align: middle; }
.scoreboard { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.scoreboard .heading { margin: 0; }
.hud-board .scoreboard { padding: 0; border: 0; background: none; }
.score-row { display: flex; align-items: flex-start; justify-content: center; gap: 14px; }
.score-row .team { display: flex; align-items: flex-start; gap: 12px; }
.team.mirrored { flex-direction: row-reverse; }
.team-side, .team-points { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.team-points { padding-top: 4px; }
.team-faces { position: relative; display: flex; padding: 0; margin: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.team-faces:disabled { cursor: default; opacity: 1; }
.team-faces .face { width: 48px; height: 48px; font-size: 16px; box-shadow: 0 0 0 2px var(--panel); }
.team-faces .face + .face { margin-left: -12px; }
.team.serving .team-faces .face { outline: 2px solid var(--blue); outline-offset: 2px; }
.serve-mark { position: absolute; right: -6px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: var(--bg); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.team-score { min-width: 2ch; text-align: center; font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.team.won .team-score { color: var(--blue); }
.score-dash { font-size: 28px; line-height: 48px; color: var(--muted); }
.score-row .team-caption { padding: 0 8px; }
.team-caption { font-size: 12px; color: var(--muted); text-align: center; max-width: 96px; overflow-wrap: anywhere; }
.score-edit { display: flex; gap: 6px; }
.score-edit .quiet { padding: 4px 12px; font-size: 18px; }
.hud-board { position: absolute; z-index: 1; top: calc(130px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; max-width: 480px; padding: 8px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(8px); }
.sound-events { display: grid; gap: 8px; }
.sound-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem) auto; gap: 8px; align-items: center; }
.sound-event label { color: var(--muted); }
.sound-event select { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); min-width: 0; }
.chip .game-icon { width: 2em; height: 1.3em; margin-right: 2px; vertical-align: middle; }
.chip.chosen .rep-figure { stroke: var(--bg); fill: var(--bg); }
.chip.chosen .game-icon { color: var(--bg); }
.player-stats { display: flex; flex-direction: column; gap: 16px; }
.swap-enter-active, .swap-leave-active { transition: opacity .18s, transform .18s; }
.swap-enter-from { opacity: 0; transform: translateY(8px); }
.fade-enter-active, .fade-leave-active { transition: opacity .15s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
.swap-leave-to { opacity: 0; transform: translateY(-8px); }
.figure-switch { position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--glass); }
.figure-switch button { padding: 5px; border: 0; border-radius: 9px; background: none; color: var(--muted); }
.figure-switch button.on { background: var(--blue); color: var(--bg); }
.figure-switch .icon { width: 20px; height: 20px; display: block; }
.corner-toggles { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; align-items: center; gap: 8px; }   /* the eye and the figure switch */
.corner-toggles .layer-toggle:disabled { opacity: .4; }
.pose-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--glass); color: var(--muted); font-size: 14px; font-weight: 700; backdrop-filter: blur(8px); transition: box-shadow .3s, color .3s; }
.pose-chip .rep-figure { width: 36px; height: 36px; }
.pose-chip.lit { color: var(--ink); box-shadow: 0 0 0 2px var(--ball), 0 0 20px var(--ball); }
.replay-figure-switch { position: static; }
.replay.full .corner-toggles, .replay.pinned .corner-toggles { top: calc(56px + env(safe-area-inset-top, 0px)); left: 12px; }   /* below the camera chips */
.replay.quiet .corner-toggles { display: none; }
.contact-tick { position: absolute; top: -6px; bottom: -6px; left: calc(8px + (100% - 16px) * var(--contact) / 100); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); opacity: .45; pointer-events: none; }
button.player-tag, button.race-runner { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; }
.player-tag { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.player-tag .face { width: 40px; height: 40px; font-size: 14px; outline: 2px solid var(--figure); outline-offset: 2px; flex: none; }
.focused .player-tag, .player-tag.focused { color: var(--ink); font-weight: 700; }
.player .face { outline: 3px solid var(--figure, transparent); outline-offset: 2px; }
.comparison { display: flex; flex-direction: column; gap: 12px; }
.comparison .heading { margin: 0; }
.comparison .chip { text-transform: capitalize; }
.race { display: flex; justify-content: center; gap: 12px; padding-bottom: 40px; }   /* room for the last runner, RACE_PIXELS below the leader */
.race-lane { position: relative; flex: 0 1 88px; min-width: 0; }
.race-lane::before { content: ""; position: absolute; left: 50%; top: 0; bottom: -40px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--line); }   /* the lane, behind the runner */
.race-runner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateY(var(--drop)); transition: transform .4s ease; }
.race-value { padding: 0 6px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; background: var(--bg); }
.race-runner .face { width: 44px; height: 44px; font-size: 15px; outline: 2px solid var(--figure); outline-offset: 2px; box-shadow: 0 0 0 2px var(--bg); }   /* the lane hidden between the avatar and its ring */
.race-name { max-width: 100%; padding: 0 4px; font-size: 13px; color: var(--muted); text-align: center; overflow-wrap: anywhere; background: var(--bg); }
.race-lane.focused .race-name { color: var(--ink); font-weight: 700; }
.replay .heading { margin: 0; }
.replay.full .heading, .replay.pinned .heading { display: none; }
.game-tile { flex: none; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; }
.game-tile .game-icon { width: 64px; height: 40px; }
.game-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.game-text h2, .game-text p { margin: 0; }
.game-players { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.game-player { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.game-player .face { width: 24px; height: 24px; font-size: 9px; }
.games-list .card { padding: 12px 14px 12px 6px; border: none; border-radius: 16px; background: var(--panel); }
.like-button { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 8px; border: none; background: none; color: var(--muted); }
.like-button .icon { width: 24px; height: 24px; color: inherit; }   /* not a card's blue */
.like-button.liked { color: var(--red); }
.like-button.liked .icon { fill: currentColor; }
.card.disabled { opacity: .4; pointer-events: none; }
.title-row { gap: 4px; }
.title-row .game-name { margin: 0; }
.share-preview { width: 100%; aspect-ratio: 16 / 9; max-height: 28vh; object-fit: cover; border-radius: 12px; background: var(--line); flex: none; }
.share-sheet { gap: 10px; }
.share-sheet h2 { font-size: 18px; }
.share-sheet .heading { margin: 4px 0 0; }
.share-sheet .chip { padding: 6px 14px; }
.share-sheet p { font-size: 13px; }
.share-sheet button.primary { font-size: 16px; padding: 12px 20px; }
.dialog textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
.shared-moment { justify-content: center; align-items: stretch; gap: 16px; text-align: center; }
.shared-moment .logo { height: 56px; margin: 0 auto 4px; }
.shared-moment .share-preview { aspect-ratio: 4 / 3; max-height: 40vh; }
.shared-comment { font-size: 22px; font-weight: 700; color: var(--ink); text-wrap: balance; }
.shared-by { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.shared-by .face { width: 36px; height: 36px; font-size: 13px; }
:root[data-type-style="bold"] body { font-family: "Archivo", system-ui, sans-serif; }   /* Bold: the flyer's lettering, Bungee for titles, numbers and the main button */
:root[data-type-style="bold"] h1 { font-family: "Bungee", sans-serif; font-weight: 400; letter-spacing: 0; line-height: 1.05; }
:root[data-type-style="bold"] .heading { font-weight: 700; letter-spacing: .16em; }
:root[data-type-style="bold"] :is(.stat .value, .scoreboard .team-score, .hud .big, .countdown, .race-value, .ring .inside) { font-family: "Bungee", sans-serif; font-weight: 400; letter-spacing: 0; }
:root[data-type-style="bold"] .stat .label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
:root[data-type-style="bold"] .game-name { font-weight: 800; }
:root[data-type-style="bold"] button.primary { font-family: "Bungee", sans-serif; font-weight: 400; text-transform: uppercase; border-radius: 14px; box-shadow: 0 4px 0 color-mix(in srgb, var(--blue), #000 30%); transform: translateY(-2px); }
:root[data-type-style="bold"] button.primary:active { transform: translateY(1px); box-shadow: 0 1px 0 color-mix(in srgb, var(--blue), #000 30%); }
