/* Watch-only big screen (2026-11-11). The PC / TV shows; every choice is made on a phone.
   Same language as the match screens: white plates, one flat shadow, bold navy type, flat colours, upright text.
   Things hide with [hidden], never by fading. Sizes follow --u (1 at 1280x720, 1.4 on a 1080p living-room screen). */
.topbar{height:64px}
.header-actions button{min-width:0;min-height:38px;padding:6px 16px;font-size:14px;font-weight:800;color:#44596c}
/* During a match nothing on the big screen is pressed: the help, sound and full-screen buttons step aside. */
.playing .header-actions{display:none}

.tv-lobby{--u:1;--ink:#16324a;--soft:#5d7186;--plate:0 calc(6px*var(--u)) 0 rgba(22,50,74,.12);display:grid;grid-template-columns:calc(380px*var(--u)) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:calc(12px*var(--u)) calc(22px*var(--u));box-sizing:border-box;height:calc(100svh - 64px);min-height:560px;max-width:2100px;margin:0 auto;padding:calc(14px*var(--u)) calc(26px*var(--u)) calc(8px*var(--u));color:var(--ink)}
.tv-lobby[hidden]{display:none}
@media(min-width:1700px) and (min-height:950px){.tv-lobby{--u:1.4}}

/* Left: scan the QR. */
.tv-join{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(10px*var(--u));min-height:0;padding:calc(16px*var(--u)) calc(20px*var(--u));border-radius:calc(26px*var(--u));background:#fff;box-shadow:var(--plate)}
.tv-join h2{margin:0;font-size:calc(27px*var(--u));font-weight:900;line-height:1.25;letter-spacing:-.03em;white-space:nowrap}
.tv-scan{display:grid;justify-items:center;gap:calc(6px*var(--u))}
.tv-join .qr-box{display:grid;place-items:center;box-sizing:border-box;width:min(100%,clamp(180px,34vh,420px));height:auto;aspect-ratio:1;padding:calc(10px*var(--u));border:0;border-radius:calc(22px*var(--u));background:#f1f5f7}
.tv-join .qr-box img{width:100%;height:100%;border-radius:calc(8px*var(--u));object-fit:contain}
.tv-join #qr-message{font-size:calc(15px*var(--u));font-weight:700;color:var(--soft)}
.tv-code{display:flex;align-items:baseline;gap:calc(12px*var(--u))}
.tv-code span{font-size:calc(16px*var(--u));font-weight:800;color:var(--soft)}
.tv-code strong{font-size:calc(36px*var(--u));font-weight:900;line-height:1.1;letter-spacing:calc(3px*var(--u));font-variant-numeric:tabular-nums}
.tv-steps{display:grid;gap:calc(6px*var(--u));margin:0;padding:0;list-style:none;align-self:stretch;justify-content:center}
.tv-steps li{display:flex;align-items:center;gap:calc(10px*var(--u));font-size:calc(18px*var(--u));font-weight:900;line-height:1.3;color:#7b8a98;white-space:nowrap}
.tv-steps b{display:grid;place-items:center;flex:none;width:calc(28px*var(--u));height:calc(28px*var(--u));border-radius:50%;background:#eef3f6;color:var(--soft);font-size:calc(16px*var(--u))}
.tv-join[data-step="1"] .tv-steps li:nth-child(1),.tv-join[data-step="2"] .tv-steps li:nth-child(2),.tv-join[data-step="3"] .tv-steps li:nth-child(3){color:var(--ink)}
.tv-join[data-step="1"] .tv-steps li:nth-child(1) b,.tv-join[data-step="2"] .tv-steps li:nth-child(2) b,.tv-join[data-step="3"] .tv-steps li:nth-child(3) b{background:var(--ink);color:#fff}

/* Right: what is picked now (the phones change it). */
.tv-show{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:calc(10px*var(--u));min-width:0;min-height:0}
.tv-show .hero-stage{position:relative;flex:1;width:100%;height:auto;min-height:calc(150px*var(--u));margin:0;border-radius:calc(24px*var(--u));background:transparent;pointer-events:none}
.tv-info{flex:none;display:grid;gap:calc(6px*var(--u));min-width:0}
.tv-head{display:flex;align-items:center;gap:calc(10px*var(--u));min-width:0}
.tv-head h1{margin:0 calc(4px*var(--u)) 0 0;font-size:calc(42px*var(--u));font-weight:900;line-height:1.15;letter-spacing:-.04em;white-space:nowrap}
.tv-chip{flex:none;padding:calc(3px*var(--u)) calc(12px*var(--u));border-radius:999px;background:#e3ecef;color:#44596c;font-size:calc(15px*var(--u));font-weight:800;line-height:1.5;white-space:nowrap}
.tv-levels{display:flex;gap:calc(6px*var(--u));margin-left:auto;padding:calc(5px*var(--u));border-radius:999px;background:#fff;box-shadow:var(--plate)}
.tv-levels span{padding:calc(4px*var(--u)) calc(16px*var(--u));border-radius:999px;color:#7b8a98;font-size:calc(17px*var(--u));font-weight:900;line-height:1.5;white-space:nowrap}
.tv-levels span.on{background:var(--ink);color:#fff}
.tv-moves{display:flex;flex-wrap:wrap;gap:calc(6px*var(--u)) calc(22px*var(--u));min-height:calc(56px*var(--u))}
.tv-moves .move-cue{display:inline-flex;align-items:center;gap:calc(8px*var(--u));font-size:calc(20px*var(--u));font-weight:900;line-height:1.3;white-space:nowrap}
.tv-moves .move-cue img{flex:none;width:calc(56px*var(--u));height:calc(56px*var(--u));object-fit:contain}
.tv-info p{margin:0;font-size:calc(16px*var(--u));font-weight:600;line-height:1.5;color:#44596c;word-break:keep-all;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.tv-show.sport-arrival .tv-info{animation:menu-arrival .18s ease-out}
/* The eight sports: a strip that shows the choice. Not pressed here. */
.tv-sports{flex:none;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:calc(8px*var(--u))}
.tv-sport{display:grid;justify-items:center;align-content:center;gap:calc(2px*var(--u));box-sizing:border-box;min-width:0;height:calc(84px*var(--u));padding:calc(6px*var(--u)) calc(4px*var(--u));border:0;border-radius:calc(18px*var(--u));background:#fff;color:var(--ink);box-shadow:var(--plate);font:inherit}
.tv-sport img{width:calc(46px*var(--u));height:calc(46px*var(--u));object-fit:contain}
.tv-sport strong{font-size:calc(16px*var(--u));font-weight:900;line-height:1.3;white-space:nowrap}
.tv-sport.on{background:var(--ink);color:#fff}
button.tv-sport{cursor:pointer}

/* Bottom: who is in. */
.tv-roster{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:calc(380px*var(--u)) minmax(0,1fr);gap:calc(22px*var(--u));align-items:center}
.tv-roster-head{display:flex;align-items:baseline;justify-content:space-between;gap:calc(10px*var(--u));padding:0 calc(6px*var(--u))}
.tv-roster-head h3{margin:0;font-size:calc(20px*var(--u));font-weight:900}
.tv-roster-head span{font-size:calc(15px*var(--u));font-weight:800;color:var(--soft)}
.tv-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:calc(8px*var(--u))}
.tv-slot{display:flex;align-items:center;gap:calc(10px*var(--u));box-sizing:border-box;min-width:0;height:calc(52px*var(--u));padding:0 calc(14px*var(--u)) 0 calc(10px*var(--u));border-radius:calc(16px*var(--u));background:#e3ecef}
.tv-slot b{display:grid;place-items:center;flex:none;width:calc(32px*var(--u));height:calc(32px*var(--u));border-radius:50%;background:#cfdbe1;color:#7b8a98;font-size:calc(16px*var(--u));font-weight:900}
.tv-slot strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:calc(19px*var(--u));font-weight:900;color:#93a1ad}
.tv-slot span{flex:none;font-size:calc(15px*var(--u));font-weight:800;color:#93a1ad;white-space:nowrap}
.tv-slot.connected{background:#fff;box-shadow:var(--plate)}
.tv-slot.connected b{background:var(--player-color);color:#fff}
.tv-slot.connected strong{color:var(--ink)}
.tv-slot.connected span{color:#9a5a00}
.tv-slot.ready span{color:#087f87}

.tv-foot{grid-column:1/-1;grid-row:3;display:flex;align-items:center;gap:calc(16px*var(--u));min-height:calc(34px*var(--u));padding:0 calc(6px*var(--u));font-size:calc(15px*var(--u));font-weight:700;color:var(--soft)}
.tv-foot .network{margin:0;font-size:calc(15px*var(--u));color:#417566;white-space:nowrap}
.tv-hint{flex:1;text-align:center;font-size:calc(19px*var(--u));font-weight:900;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The browser needs one touch before it may play sound. Shown once; the match works without it. */
.tv-sound{flex:none;padding:calc(4px*var(--u)) calc(14px*var(--u));border-radius:999px;background:var(--ink);color:#fff;font-size:calc(15px*var(--u));font-weight:800;white-space:nowrap}
.tv-sound[hidden],.tv-qa[hidden]{display:none}
/* Review build only (?practice=1). */
.tv-qa{flex:none;display:flex;align-items:center;gap:calc(10px*var(--u));white-space:nowrap}
.tv-qa button{min-height:calc(34px*var(--u));padding:calc(4px*var(--u)) calc(16px*var(--u));border:2px solid #d5dfe6;border-radius:999px;background:#fff;color:var(--ink);font-size:calc(15px*var(--u));font-weight:900}
.tv-qa button:disabled{color:#a3afba}

/* Short or narrow window: smaller pieces, type stays 14px or more. */
@media(max-height:660px),(max-width:1120px){.tv-lobby{--u:.86;min-height:500px}.tv-chip,.tv-code span,.tv-info p,.tv-roster-head span,.tv-slot span,.tv-foot,.tv-foot .network,.tv-sound,.tv-qa button,.tv-join #qr-message,.tv-steps b,.tv-slot b{font-size:14px}.tv-sport strong{font-size:14px}}
@media(max-width:860px){.tv-lobby{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;height:auto}.tv-join,.tv-show{grid-column:1}.tv-show{grid-row:2}.tv-show .hero-stage{height:240px;flex:none}.tv-roster{grid-row:3;grid-template-columns:minmax(0,1fr);gap:8px}.tv-foot{grid-row:4;flex-wrap:wrap}.tv-sports{grid-template-columns:repeat(4,minmax(0,1fr))}.tv-slots{grid-template-columns:repeat(2,minmax(0,1fr))}.tv-hint{white-space:normal}.tv-head{flex-wrap:wrap}}

/* Countdown card: this sport's phone moves, large, with the count beside them. At the start it drops toward the control row. */
#game-hud .move-intro{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:clamp(14px,3.4vh,40px);box-sizing:border-box;max-width:calc(100vw - 24px);padding:clamp(12px,2.6vh,30px) clamp(18px,4.4vh,52px) clamp(12px,2.6vh,30px) clamp(12px,2.8vh,32px);border-radius:clamp(20px,4.2vh,46px);background:#fff;color:#16324a;box-shadow:0 clamp(5px,1.1vh,12px) 0 rgba(22,50,74,.16);z-index:5;pointer-events:none}
#game-hud .move-intro[hidden]{display:none}
#game-hud .move-intro .countdown{position:static;transform:none;rotate:none;translate:none;flex:none;display:flex;align-items:center;justify-content:center;width:clamp(92px,19vh,210px);height:clamp(92px,19vh,210px);border:0;border-radius:50%;background:#16324a;color:#fff;box-shadow:none;font-size:clamp(54px,12vh,132px);font-weight:900;font-style:normal;line-height:1;-webkit-text-stroke:0;text-shadow:none;font-variant-numeric:tabular-nums}
#game-hud .move-intro .countdown.word{font-size:clamp(26px,5.6vh,60px)}
#game-hud .move-intro .countdown[hidden]{display:none}
.mi-body{display:grid;gap:clamp(6px,1.4vh,16px);min-width:0}
.mi-body>b{font-size:clamp(17px,3vh,33px);font-weight:900;line-height:1.3;color:#5d7186;white-space:nowrap}
.mi-cues{display:flex;align-items:flex-start;gap:clamp(12px,3vh,34px)}
.mi-cues .move-cue{display:grid;justify-items:center;gap:clamp(2px,.6vh,8px);width:clamp(120px,24vh,264px)}
.mi-cues .move-cue img{width:clamp(70px,14.5vh,160px);height:clamp(70px,14.5vh,160px);object-fit:contain}
.mi-cues .move-cue b{font-size:clamp(18px,3.5vh,38px);font-weight:900;line-height:1.25;letter-spacing:-.02em;text-align:center;word-break:keep-all}
#game-hud .move-intro.go{animation:mi-drop .34s ease-in forwards}
@keyframes mi-drop{to{transform:translate(-50%,calc(-50% + 36vh)) scale(.3)}}
@media(prefers-reduced-motion:reduce){#game-hud .move-intro.go{animation:none}}
/* The side card of a split match waits under the move card. */
.game-hud:has(.move-intro:not([hidden])) .team-intro{top:calc(44% + 21vh)}
@media(max-width:700px){#game-hud .move-intro{flex-direction:column;top:46%}.mi-cues .move-cue{width:auto;max-width:30vw}.mi-cues .move-cue b{font-size:14px}.mi-body>b{text-align:center}}

/* Pause and result: the two choices are shown, not pressed. A phone picks; its choice turns dark for a moment. */
.phone-choices{display:grid;gap:8px;margin-top:16px}
.phone-ask{display:flex;align-items:center;justify-content:center;gap:8px;margin:0;font-size:18px;font-weight:900;line-height:1.3;color:#16324a}
.phone-ask img{flex:none;width:36px;height:36px;object-fit:contain}
.phone-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.phone-options span{display:grid;place-items:center;min-height:48px;padding:0 12px;border-radius:999px;background:#eef3f6;color:#44596c;font-size:18px;font-weight:900;white-space:nowrap}
.phone-options span.picked{background:#16324a;color:#fff}
.phone-options span.off{color:#a3afba}
/* Review build (solo practice with the keyboard): the line names the keys, so the phone picture is left out. */
.phone-choices.keys .phone-ask img{display:none}
@media(orientation:landscape) and (max-height:620px){.phone-choices{gap:6px;margin-top:12px}.phone-options span{min-height:44px}.phone-ask img{width:30px;height:30px}}

/* Help: the join address for a phone whose camera will not read the QR. */
#help-dialog .help-link{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:16px 0 0;font-size:15px;font-weight:600;color:#44596c}
#help-dialog .help-link strong{font-weight:900;color:#16324a;word-break:break-all}
#help-dialog .help-link button{min-height:40px;padding:6px 16px;border:2px solid #d5dfe6;border-radius:999px;background:#fff;color:#16324a;font-size:15px;font-weight:800}

/* Name tags over the athletes of real people: a small white plate with the player's colour dot (sizes follow the HUD's --pk). */
.name-tags{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.name-tag{position:absolute;left:0;top:0;display:flex;align-items:center;gap:calc(6px*var(--pk,1));height:calc(28px*var(--pk,1));padding:0 calc(11px*var(--pk,1)) 0 calc(8px*var(--pk,1));border-radius:999px;background:#fff;color:#16324a;box-shadow:0 calc(3px*var(--pk,1)) 0 rgba(22,50,74,.16);font-size:calc(15px*var(--pk,1));font-weight:900;line-height:1;white-space:nowrap}
.name-tag[hidden]{display:none}
.name-tag i{flex:none;width:calc(12px*var(--pk,1));height:calc(12px*var(--pk,1));border-radius:50%}
