:root { color-scheme: dark; font-family: system-ui, sans-serif; --left: #f3448a; --right: #42e0df; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #f7f7fa; background: #101018; }
body:not([data-page="stage"], [data-page="fight"]) { padding: clamp(16px, 5vw, 60px); }
.panel { max-width: 660px; margin: auto; }
h1 { font-size: clamp(32px, 7vw, 56px); margin: 0; letter-spacing: -.045em; }
h2 { font-size: 1.1rem; margin-block: 24px 12px; }
p { color: #c3c0cd; line-height: 1.5; }
.choices, .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
button { font: inherit; font-weight: 700; color: inherit; border: 1px solid #555366; background: #242432; border-radius: 8px; padding: 12px 16px; cursor: pointer; }
button:disabled { opacity: .38; cursor: default; }
button[aria-pressed="true"] { outline: 2px solid #f7f7fa; outline-offset: -2px; }
.choices button { min-height: 80px; flex: 1 1 110px; overflow-wrap: anywhere; }
.choices .left { background: var(--left); color: #100811; }
.choices .right { background: var(--right); color: #100811; }
section { margin: 24px 0; border-top: 1px solid #363543; }
a { color: var(--right); margin-right: 16px; }
.track-form { margin-bottom: 12px; }
.track-form label { display: block; margin-bottom: 5px; font-weight: 700; }
.track-form > div { display: flex; flex-wrap: wrap; gap: 8px; }
.track-form input { min-width: 130px; flex: 1; padding: 8px 10px; border: 1px solid #555366; border-radius: 6px; background: #15151e; color: inherit; font: inherit; }
.track-current { margin: 4px 0 0; font-size: .9rem; }
.qr-control { display: inline-flex; align-items: center; gap: 6px; }
body[data-page="stage"] { background: #101018; overflow: hidden; min-height: 100vh; display: grid; place-items: center; }
body.overlay { background: transparent; }
.strip { position: relative; width: min(100vw, 800vh); aspect-ratio: 8; container-type: inline-size; }
.strip .left { --team: var(--left); left: 2.5%; }
.strip .right { --team: var(--right); right: 2.5%; text-align: right; }
.side { width: 28%; position: absolute; top: 0; height: 100%; color: var(--team); }
.heading { position: absolute; top: 7%; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 3%; background: #101018; }
.heading strong { font-size: 2.2cqw; line-height: 1.1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.right .heading { flex-direction: row-reverse; }
.onair { background: var(--team); color: #101018; font-size: .98cqw; font-weight: 900; white-space: nowrap; padding: .25em .5em; }
.deck { position: absolute; inset: 30% 0 12%; display: grid; place-items: center; background: #20202c; outline: max(1px, .13cqw) solid var(--team); }
.deck.live { background: #171722; }
.overlay .deck.live { background: transparent; }
.overlay .deck.live > * { visibility: hidden; }
.initial { font-weight: 900; font-size: 3.1cqw; letter-spacing: .06em; opacity: .65; }
.logo { width: 75%; height: 84%; object-fit: contain; }
.center { position: absolute; top: 8%; bottom: 8%; left: 33%; right: 33%; display: flex; align-items: center; gap: 1.05cqw; padding: .65cqw; background: #101018; }
.qr { height: 95%; aspect-ratio: 1; flex-shrink: 0; object-fit: contain; }
.score { min-width: 0; flex: 1; display: grid; gap: .4cqw; }
.score strong { font-size: 2.12cqw; font-weight: 950; white-space: nowrap; line-height: .98; letter-spacing: -.04em; }
.score #status { color: #beb9c9; font-size: .98cqw; font-weight: 800; }
.advantage { height: .86cqw; background: var(--right); position: relative; overflow: hidden; }
.advantage::after { content: ""; position: absolute; left: 50%; width: 2px; background: #101018; top: 0; bottom: 0; }
#fill { height: 100%; width: 50%; background: var(--left); transition: width .38s ease-out; }
.numbers { display: flex; justify-content: space-between; font: 900 1.5cqw/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
#pct-left { color: var(--left); }
#pct-right { color: var(--right); }
[data-view="battle"] .deck { background: repeating-linear-gradient(135deg, #252432 0 .5cqw, #191925 .5cqw 1cqw); }
[data-view="battle"] .deck.leader { background: color-mix(in srgb, var(--team) 30%, #171722); }
[data-view="battle"] .advantage { height: 1.25cqw; }
@media (prefers-reduced-motion: reduce) { #fill { transition: none; } }

body[data-page="fight"] { display: grid; place-items: center; overflow: hidden; min-height: 100vh; background: transparent; }
.fight-track, .fight-handoff { position: absolute; left: 50%; transform: translateX(-50%); }
.fight-track {
  top: 4%; max-width: 57%; padding: .25cqw 1.1cqw .35cqw;
  display: flex; align-items: baseline; gap: .8cqw; width: max-content;
  font: 850 2.15cqw/1.12 "Arial Black", system-ui, sans-serif;
  text-align: center; color: #fff6e7; background: #151020ed;
  box-shadow: inset 0 -.19cqw #f7b530;
  clip-path: polygon(.65cqw 0, calc(100% - .65cqw) 0, 100% .65cqw, 100% 100%, 0 100%, 0 .65cqw);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fight-track strong { color: #ffd05b; flex: none; }
.fight-track span { overflow: hidden; text-overflow: ellipsis; }
.fight-track[data-long="true"] { font-size: 1.55cqw; }
.fight-handoff {
  --cue-color: #ffd05b; top: 36%; display: flex; align-items: center; gap: 1.1cqw;
  padding: .52cqw 1.9cqw .6cqw 1.15cqw; max-width: 58%;
  color: var(--cue-color); background: #100c1ef2;
  box-shadow: inset 0 .24cqw var(--cue-color), inset 0 -.24cqw var(--cue-color);
  clip-path: polygon(1cqw 0, 100% 0, 100% calc(100% - 1cqw), calc(100% - 1cqw) 100%, 0 100%, 0 1cqw);
}
.fight-handoff[data-side="right"] { --cue-color: #d1a3ff; }
.fight-handoff strong { font: 950 4.1cqw/1 "Arial Black", system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fight-emblem { display: block; flex: none; width: 4.25cqw; height: 3.7cqw; background: currentColor; }
.fight-handoff[data-side="left"] .fight-emblem {
  clip-path: polygon(0 0, 28% 0, 28% 21%, 72% 21%, 72% 0, 100% 0, 100% 30%, 86% 30%, 86% 70%, 66% 70%, 66% 100%, 34% 100%, 34% 70%, 14% 70%, 14% 30%, 0 30%);
}
.fight-handoff[data-side="right"] .fight-emblem {
  height: 2.2cqw;
  clip-path: polygon(0 0, 44% 40%, 44% 85%, 18% 72%, 0 45%, 0 0, 100% 0, 100% 45%, 82% 72%, 56% 85%, 56% 40%, 100% 0);
}
.fight-qr { position: absolute; bottom: 3%; right: 1.2%; width: 9%; aspect-ratio: 1; display: block; background: white; image-rendering: pixelated; }
