/* Flow screens (2026-11-11, art/SWITCH-FLOW-SPEC-2026-11-11.md): the main (attract) screen, the pick view,
   the first-time grip card, the turn cue, connection notes and the corner QR of a match.
   Same language as tv.css: white plates, one flat shadow, bold navy type, upright text, flat colours.
   Things hide with [hidden]; sizes follow --u in the lobby and the window height in a match. */

/* ---- Lobby: two views of one DOM (#lobby[data-view]) ---- */
.tv-lobby .when-attract,.tv-lobby .when-pick,.tv-title{display:none}
.tv-lobby[data-view=attract] .when-attract,.tv-lobby[data-view=pick] .when-pick{display:inline}
.tv-slot b{width:calc(22px*var(--u));height:calc(22px*var(--u));margin:0 calc(4px*var(--u))}

/* Pick view (somebody is in): who is in on the left, what is picked on the right. A small QR stays for more people. */
.tv-lobby[data-view=pick]{grid-template-columns:calc(330px*var(--u)) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
.tv-lobby[data-view=pick] .tv-roster{grid-column:1;grid-row:1;grid-template-columns:minmax(0,1fr);gap:calc(8px*var(--u));align-items:start}
.tv-lobby[data-view=pick] .tv-roster-head h3{font-size:calc(24px*var(--u))}
.tv-lobby[data-view=pick] .tv-roster-head span{font-size:calc(17px*var(--u))}
.tv-lobby[data-view=pick] .tv-slots{grid-template-columns:minmax(0,1fr)}
.tv-lobby[data-view=pick] .tv-slot{height:calc(64px*var(--u))}
.tv-lobby[data-view=pick] .tv-slot strong{font-size:calc(24px*var(--u))}
.tv-lobby[data-view=pick] .tv-slot span{font-size:calc(16px*var(--u))}
.tv-lobby[data-view=pick] .tv-join{grid-column:1;grid-row:2;align-self:end;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;justify-content:stretch;gap:calc(2px*var(--u)) calc(14px*var(--u));padding:calc(12px*var(--u));border-radius:calc(22px*var(--u))}
.tv-lobby[data-view=pick] .tv-scan{display:contents}
.tv-lobby[data-view=pick] .tv-join .qr-box{grid-column:1;grid-row:1/3;width:calc(132px*var(--u));padding:calc(6px*var(--u));border-radius:calc(14px*var(--u))}
.tv-lobby[data-view=pick] .tv-join h2{grid-column:2;grid-row:1;align-self:end;font-size:calc(21px*var(--u));white-space:normal;word-break:keep-all}
.tv-lobby[data-view=pick] .tv-code{grid-column:2;grid-row:2;align-self:start;flex-wrap:wrap;gap:0 calc(8px*var(--u))}
.tv-lobby[data-view=pick] .tv-code span{font-size:calc(15px*var(--u))}
.tv-lobby[data-view=pick] .tv-code strong{font-size:calc(24px*var(--u));letter-spacing:calc(1px*var(--u))}
.tv-lobby[data-view=pick] .tv-show{grid-column:2;grid-row:1/3}
.tv-lobby[data-view=pick] .tv-foot{grid-row:3}

/* Main screen (nobody is in): the match preview fills the screen; a big title, a big QR, one line, the eight sports. */
.tv-lobby[data-view=attract]{display:block;height:calc(100svh - 64px);min-height:0;max-width:none;padding:0}
.tv-lobby[data-view=attract] .tv-show{display:block}
.tv-lobby[data-view=attract] .tv-show .hero-stage{position:fixed;inset:0;width:auto;height:auto;min-height:0;border-radius:0}
.tv-lobby[data-view=attract] .tv-info,.tv-lobby[data-view=attract] .tv-roster,.tv-lobby[data-view=attract] .network,.tv-lobby[data-view=attract] .tv-hint,.tv-lobby[data-view=attract] .tv-code span{display:none}
.tv-lobby[data-view=attract] .tv-title{display:block;position:fixed;left:calc(36px*var(--u));top:calc(28px*var(--u));padding:calc(14px*var(--u)) calc(30px*var(--u)) calc(16px*var(--u));border-radius:calc(28px*var(--u));background:#fff;box-shadow:var(--plate)}
.tv-title h1{margin:0;font-size:calc(66px*var(--u));font-weight:900;line-height:1.15;letter-spacing:-.05em;white-space:nowrap}
.tv-title p{margin:0;font-size:calc(22px*var(--u));font-weight:800;line-height:1.4;color:var(--soft);white-space:nowrap}
.tv-lobby[data-view=attract] .tv-join{position:fixed;right:calc(36px*var(--u));top:calc(28px*var(--u));width:calc(350px*var(--u));box-sizing:border-box;gap:calc(12px*var(--u));padding:calc(20px*var(--u)) calc(22px*var(--u)) calc(14px*var(--u));border-radius:calc(30px*var(--u))}
.tv-lobby[data-view=attract] .tv-join h2{font-size:calc(28px*var(--u));line-height:1.3;text-align:center}
.tv-lobby[data-view=attract] .tv-join .qr-box{width:calc(300px*var(--u));padding:calc(10px*var(--u))}
.tv-lobby[data-view=attract] .tv-code strong{font-size:calc(22px*var(--u));letter-spacing:calc(4px*var(--u));color:var(--soft)}
.tv-lobby[data-view=attract] .tv-sports{position:fixed;left:calc(36px*var(--u));right:calc(36px*var(--u));bottom:calc(22px*var(--u))}
.tv-lobby[data-view=attract] .tv-sport{height:calc(96px*var(--u))}
.tv-lobby[data-view=attract] .tv-sport img{width:calc(52px*var(--u));height:calc(52px*var(--u))}
.tv-lobby[data-view=attract] .tv-sport strong{font-size:calc(19px*var(--u))}
.tv-lobby[data-view=attract] .tv-foot{position:fixed;left:calc(36px*var(--u));bottom:calc(128px*var(--u));padding:0}
/* On the main screen the top bar steps back: the big title carries the name. */
body.attract .topbar{background:transparent}
body.attract .topbar .brand,body.attract .header-actions{display:none}
@media(max-width:860px){.tv-lobby[data-view=attract] .tv-title h1{font-size:34px}.tv-lobby[data-view=attract] .tv-title p{font-size:14px}.tv-lobby[data-view=attract] .tv-join{top:auto;bottom:calc(240px*var(--u));width:calc(250px*var(--u))}.tv-lobby[data-view=attract] .tv-join .qr-box{width:calc(190px*var(--u))}.tv-lobby[data-view=attract] .tv-join h2{font-size:18px}.tv-lobby[data-view=pick]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto}.tv-lobby[data-view=pick] .tv-roster,.tv-lobby[data-view=pick] .tv-join,.tv-lobby[data-view=pick] .tv-show{grid-column:1;grid-row:auto}.tv-lobby[data-view=pick] .tv-foot{grid-row:auto}}

/* "○○ 님이 들어왔어요": the person's colour and name, large, for a moment. */
.welcome{position:fixed;left:50%;top:clamp(120px,30vh,330px);transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:.4em;padding:.42em .95em .42em .7em;border-radius:999px;background:#fff;color:#16324a;box-shadow:0 clamp(5px,1.1vh,12px) 0 rgba(22,50,74,.18);font-size:clamp(30px,6.6vh,72px);font-weight:900;line-height:1.2;letter-spacing:-.03em;white-space:nowrap;pointer-events:none}
.welcome[hidden]{display:none}
.welcome i{flex:none;width:.7em;height:.7em;border-radius:50%}
.welcome.pop{animation:flow-pop .24s ease-out}
@keyframes flow-pop{from{transform:translateX(-50%) scale(.82)}}
@media(prefers-reduced-motion:reduce){.welcome.pop,.turn-cue.pop{animation:none}}

/* "아직 계세요?": nobody has touched a phone for a minute, or everyone's phone is gone. Ten seconds, then the main screen. */
.still-here{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:45;display:grid;justify-items:center;gap:clamp(6px,1.4vh,16px);padding:clamp(20px,4.4vh,48px) clamp(34px,7vh,78px);border-radius:clamp(24px,4.6vh,50px);background:#fff;color:#16324a;box-shadow:0 clamp(6px,1.2vh,13px) 0 rgba(22,50,74,.2);pointer-events:none}
.still-here[hidden]{display:none}
.still-here b{font-size:clamp(34px,7vh,76px);font-weight:900;line-height:1.2;letter-spacing:-.04em;white-space:nowrap}
.still-here span{font-size:clamp(17px,3vh,33px);font-weight:800;color:#5d7186;white-space:nowrap}
.still-here strong{display:grid;place-items:center;width:clamp(64px,12vh,132px);height:clamp(64px,12vh,132px);margin-top:clamp(4px,1vh,12px);border-radius:50%;background:#16324a;color:#fff;font-size:clamp(34px,6.6vh,72px);font-weight:900;line-height:1;font-variant-numeric:tabular-nums}

/* ---- In a match ---- */
/* First time in a sport: how to hold the phone and the two moves that matter. A phone's button or one swing moves on. */
.grip-guide{position:absolute;left:50%;top:51%;transform:translate(-50%,-50%);display:grid;justify-items:center;gap:clamp(8px,2vh,22px);box-sizing:border-box;max-width:calc(100vw - 24px);padding:clamp(16px,3.2vh,36px) clamp(24px,5.4vh,60px) clamp(14px,2.6vh,30px);border-radius:clamp(22px,4.4vh,48px);background:#fff;color:#16324a;box-shadow:0 clamp(5px,1.1vh,12px) 0 rgba(22,50,74,.16);z-index:6;pointer-events:none}
.grip-guide[hidden]{display:none}
.gg-head{display:grid;justify-items:center;gap:.1em;margin:0}
.gg-head b{font-size:clamp(17px,3vh,33px);font-weight:900;line-height:1.3;color:#5d7186}
.gg-head span{font-size:clamp(28px,5.6vh,62px);font-weight:900;line-height:1.25;letter-spacing:-.04em;white-space:nowrap}
.gg-moves{display:flex;align-items:flex-start;gap:clamp(16px,5vh,56px)}
.gg-moves .move-cue{display:grid;justify-items:center;gap:clamp(2px,.8vh,10px);width:clamp(170px,36vh,400px)}
.gg-moves .move-cue img{width:clamp(110px,23vh,254px);height:clamp(110px,23vh,254px);object-fit:contain}
.gg-moves .move-cue b{font-size:clamp(20px,3.9vh,43px);font-weight:900;line-height:1.25;letter-spacing:-.02em;text-align:center;word-break:keep-all}
.gg-foot{display:flex;align-items:center;gap:clamp(8px,1.4vh,16px);margin:0;font-size:clamp(15px,2.5vh,28px);font-weight:800;line-height:1.3;color:#5d7186;white-space:nowrap}
.gg-foot img{flex:none;width:clamp(32px,5.4vh,60px);height:clamp(32px,5.4vh,60px);object-fit:contain}
.gg-bar{flex:none;display:block;width:clamp(64px,12vh,132px);height:clamp(6px,1.1vh,12px);border-radius:999px;background:#e3ecef;overflow:hidden}
.gg-bar i{display:block;width:100%;height:100%;border-radius:999px;background:#16324a;transform-origin:left center}
.game-hud:has(.grip-guide:not([hidden])) .team-intro{top:auto;bottom:clamp(10px,2vh,24px)}
@media(max-width:700px){.gg-moves .move-cue{width:42vw}.gg-moves .move-cue img{width:30vw;height:30vw}.gg-foot{white-space:normal;text-align:center}}

/* Whose turn (bowling, golf): the name and colour, large, for a second. */
.turn-cue{position:absolute;left:50%;top:34%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:.36em;padding:.3em .9em .3em .62em;border-radius:999px;background:#fff;color:#16324a;box-shadow:0 clamp(5px,1.1vh,12px) 0 rgba(22,50,74,.18);font-size:clamp(36px,8vh,88px);font-weight:900;line-height:1.2;letter-spacing:-.04em;white-space:nowrap;z-index:6;pointer-events:none}
.turn-cue[hidden]{display:none}
.turn-cue i{flex:none;width:.6em;height:.6em;border-radius:50%}
.turn-cue.pop{animation:flow-pop2 .22s ease-out}
@keyframes flow-pop2{from{transform:translate(-50%,-50%) scale(.82)}}

/* A small note under the clock: "○○ 님 연결을 기다려요 (10)", "○○ 님 없이 계속해요". */
.flow-note{position:absolute;left:50%;top:clamp(100px,17.4vh,192px);transform:translateX(-50%);padding:.34em 1em;border-radius:999px;background:#16324a;color:#fff;box-shadow:0 clamp(3px,.6vh,6px) 0 rgba(22,50,74,.16);font-size:clamp(16px,2.7vh,30px);font-weight:900;line-height:1.3;white-space:nowrap;z-index:7;pointer-events:none}
.flow-note[hidden]{display:none}

/* Bottom right corner: a small QR so anybody can still come in, and who is waiting for the next match. */
.corner-join{position:absolute;right:clamp(10px,1.8vh,20px);bottom:clamp(10px,1.8vh,20px);display:grid;justify-items:end;gap:clamp(6px,1vh,12px);z-index:4;pointer-events:none}
.corner-qr{display:flex;align-items:center;gap:clamp(6px,1.1vh,12px);padding:clamp(5px,.8vh,9px) clamp(10px,1.6vh,18px) clamp(5px,.8vh,9px) clamp(5px,.8vh,9px);border-radius:clamp(12px,2vh,22px);background:#fff;color:#16324a;box-shadow:0 clamp(3px,.6vh,6px) 0 rgba(22,50,74,.16)}
.corner-qr img{flex:none;width:clamp(66px,11.4vh,126px);height:clamp(66px,11.4vh,126px);border-radius:clamp(4px,.7vh,8px)}
.corner-qr span{font-size:clamp(14px,2.1vh,23px);font-weight:900;line-height:1.3;white-space:nowrap}
.waiting-list{display:grid;justify-items:end;gap:clamp(4px,.7vh,8px)}
.waiting-list span{display:flex;align-items:center;gap:.4em;padding:.28em .8em .28em .55em;border-radius:999px;background:#fff;color:#16324a;box-shadow:0 clamp(3px,.6vh,6px) 0 rgba(22,50,74,.16);font-size:clamp(14px,2.2vh,24px);font-weight:900;line-height:1.3;white-space:nowrap}
.waiting-list i{flex:none;width:.72em;height:.72em;border-radius:50%}
@media(max-width:700px){.corner-qr span{display:none}}

/* Result: one warm line, and the return to the sport list by itself. */
.result-praise{margin:6px 0 0;font-size:20px;font-weight:900;line-height:1.4;color:#087f87;word-break:keep-all}
.result-praise:empty,.result-auto:empty{display:none}
.result-praise+#result-message{font-size:14px;color:#5d7186}
.result-auto{margin:2px 0 0;font-size:15px;font-weight:800;line-height:1.4;color:#5d7186;text-align:center}
/* A match the big screen ended early (stage limit, somebody left): the sport's own HUD pieces step aside under the result. */
body:has(#result-modal:not([hidden])) .sport-overlay :is(.sp-guide,.sp-status,.sp-gauge,.sp-clock,.bm-tag,.bm-timing,.bm-band){display:none}
/* Side-by-side split: each half has its control row at its bottom, so the corner QR sits above the right half's row. */
.game-hud:has(.sp-split-h) .corner-join{bottom:clamp(78px,12.6vh,140px)}
/* Who is on which side, before a split match: names and colours, readable from the sofa. */
.team-intro{gap:clamp(14px,2.6vh,30px);padding:clamp(12px,2.2vh,26px) clamp(18px,3.4vh,40px);border-radius:clamp(20px,3.6vh,40px)}
.team-intro b{font-size:clamp(18px,3.4vh,38px)}
.team-side{gap:clamp(6px,1vh,12px)}
.team-side small{font-size:clamp(14px,2.3vh,25px);font-weight:900}
.team-side span{height:auto;gap:.4em;padding:.3em .8em;font-size:clamp(17px,3vh,33px);font-weight:900}
.team-side i{width:.72em;height:.72em}
/* Notices from the flow ("○○ 님이 나갔어요", "처음 화면으로 돌아왔어요") must be readable on a living-room screen. */
.toast{bottom:clamp(64px,10vh,120px);padding:.6em 1.3em;font-size:clamp(16px,2.5vh,28px)}

/* 14차: 잡는 법 카드의 '한 번 휘둘러 보세요' 한 줄 */
.gg-try{margin:10px 0 0;font-size:1.1em;font-weight:800;color:#0b7f86}
.gg-try:empty{display:none}
