/* Reference-led illustrated UI; all controls remain live and accessible. */
#stage{position:relative;isolation:isolate;min-height:100svh}body{background:#01071d}
.marquee,.modal-card{border:26px solid transparent;border-image:url('assets/gold-frame.png') 106 / 26px / 7px round;border-radius:32px;box-shadow:0 8px 22px #0008,0 0 16px #ffbc2544;isolation:isolate}.marquee:before,.modal-card:before,.frame-decor{display:none}
.mode-card,.modal-card,.screen-panel{background:radial-gradient(ellipse at 45% 20%,#fffdf2,#fff2d2 65%,#ffe5ac);background-clip:padding-box;color:var(--navy)}
.mode-card{padding:10px 18px 20px;display:flex;align-items:center;flex-direction:column}
.mode-icon{position:relative;width:100%;height:165px;flex:none;margin:0;overflow:hidden}.mode-icon img{position:absolute;left:50%;top:50%;width:280px;height:280px;object-fit:contain;transform:translate(-50%,-52%)}.mode-icon.phone img{width:220px;height:220px;transform:translate(-50%,-50%)}
.mode-card h2{font-size:32px;line-height:1.05;letter-spacing:-.025em;font-weight:1000;margin:5px 0 10px;white-space:nowrap}.mode-card p{font-size:20px;font-weight:900;line-height:1.18;max-width:460px;margin:0 0 20px}
button.primary{border-radius:100px;border:2px solid #fff1a7;background:linear-gradient(#27e1e1 0%,#079aa4 15%,#007783 75%,#005b66 100%);box-shadow:0 0 0 2px #eca20b,0 4px 0 #764206,0 6px 8px #00273444,inset 0 1px 2px #c6ffff;color:#fffef2;text-shadow:0 2px 2px #003740}button.primary.pink{background:linear-gradient(#ff69cc,#e60a9c 18%,#bd007e 78%,#90005d);text-shadow:0 2px 2px #68003c}
.mode-card button{margin-top:auto;font-size:23px;line-height:1.1;padding:.55em .7em;min-height:50px}
.welcome-footer{font-weight:900;letter-spacing:.055em;font-size:22px;margin:22px 0 8px}.welcome-footer:before,.welcome-footer:after{content:'';display:inline-block;vertical-align:middle;width:65px;height:2px;margin:0 20px;background:#ffe1a0;box-shadow:0 0 7px 2px #ffac04}.welcome-links{font-size:11px;margin:9px 0}.choice-heading{font-weight:1000;letter-spacing:.025em}
.welcome-wrap .utility{position:absolute;right:10px;top:8px;z-index:8;max-width:140px;gap:5px;justify-content:flex-end}.welcome-wrap .utility button{font-size:9px;padding:5px 8px;min-height:26px;border-radius:7px;background:#00143bce}
.brand{max-height:none}.brand img{transform:none;filter:drop-shadow(0 4px 5px #0008)}
.board{border-width:20px;border-image-width:20px;border-image-outset:6px;padding:0;gap:5px;background:#fff8e5;border-radius:25px;grid-template-rows:1.13fr repeat(4,1fr)}
.cat{font-weight:1000;line-height:1.07;border-radius:17px;letter-spacing:-.025em;background:linear-gradient(145deg,color-mix(in srgb,var(--cat),white 11%),var(--cat) 68%,color-mix(in srgb,var(--cat),black 12%));border:1px solid color-mix(in srgb,var(--cat),white 24%);box-shadow:inset 0 2px 1px #ffffff66,inset 0 -3px 3px #0002;text-shadow:0 2px 1px #0008}
.tile{font-weight:1000;letter-spacing:-.035em;border-radius:16px;background:radial-gradient(ellipse at 30% 10%,#fff 0%,var(--tint) 75%);box-shadow:inset 0 3px 2px #fff,inset 0 -3px 5px #00114725,0 1px 2px #0004;line-height:1}
.score-panel{border-width:20px;border-image-width:20px;border-image-outset:6px;background:linear-gradient(145deg,#061943f5,#000c29f5);padding:0 5px 12px;gap:12px}.score-panel h2{font-weight:1000;letter-spacing:-.025em;white-space:nowrap;margin:0 0 4px}.score-scroll{padding:4px 3px;scrollbar-width:thin;scrollbar-color:#2a567b transparent}
.score-panel .team-score{background:linear-gradient(145deg,#0b2d63,#001134);border-radius:19px;border:2px solid var(--team);box-shadow:0 0 4px #fff8,0 0 9px var(--team),inset 0 0 8px color-mix(in srgb,var(--team) 30%,transparent);padding:8px;margin:3px 0 21px}.team-score h3{font-weight:1000;line-height:1.05;margin:0 0 7px;text-transform:uppercase}.score-panel .score-num{gap:8px}.score-num strong{font-weight:1000;line-height:1;min-width:64px}.score-num button{border:1px solid #e0ffff;background:linear-gradient(#fbffff,#c5e9ff);color:#001147;box-shadow:0 2px 3px #0007;border-radius:9px;padding:0;font-weight:1000}.team-score small{font-size:9px;margin-top:5px;opacity:.75}
.buzz-flag{background:linear-gradient(#fff8ae,#ffc800);color:#501258;box-shadow:0 0 7px #ffdf35;font-size:11px;border:1px solid #fff8cb;border-radius:30px;position:relative;margin:-20px -2px 6px;padding:4px}
.side-actions{gap:17px}.score-panel .side-actions button{background:linear-gradient(#064c68,#00223e);border:2px solid #82fcff;box-shadow:0 0 4px white,0 0 10px #00eaff,inset 0 0 7px #00eeff88;border-radius:16px;font-weight:1000;line-height:1.05;padding:.6em .4em}.score-panel .side-actions .danger{background:linear-gradient(#931d50,#500d33);border-color:#ffaccf;box-shadow:0 0 4px white,0 0 10px #ff127d,inset 0 0 7px #ff1b68}
.side-icons{justify-content:space-evenly;gap:15px;align-items:center;padding-top:10px}.side-icons button{flex:none;width:52px;height:46px;min-height:0;border:2px solid #96f9ff;box-shadow:0 0 5px #0ff,inset 0 0 6px #0ff6;font-size:27px;padding:0;background:#001b37;border-radius:12px}.side-icons button:first-child{font-size:30px}
.game-caption{font-size:12px;padding-bottom:12px;font-weight:900;text-shadow:0 2px 4px #000;letter-spacing:.025em}.game-tools{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:16px}.game-tools button{font-size:11px}
dialog{width:min(900px,85vw);max-width:94vw;padding:20px;overflow:auto;max-height:94svh}dialog::backdrop{background:#000b2699;backdrop-filter:blur(3px)}.modal-card{padding:14px 25px 22px;border-radius:38px}
.category-badge{border:2px solid #fff3a6;background:linear-gradient(165deg,color-mix(in srgb,var(--cat),white 20%),var(--cat) 75%,color-mix(in srgb,var(--cat),black 20%));box-shadow:0 0 0 2px #e79b0b,0 3px 4px #4b2b2855,inset 0 1px 2px #ffffffb0;border-radius:100px;font-size:21px;font-weight:900;padding:7px 26px;margin:0 0 15px}
.question-label{display:flex;justify-content:center;align-items:center;gap:15px;font-size:23px;line-height:1.1;font-weight:1000;letter-spacing:.04em;color:#001147;margin:0 0 15px}.question-label:before,.question-label:after{content:'';height:2px;width:65px;background:currentColor;opacity:.7}
.question-copy{font-weight:1000;letter-spacing:-.025em;font-size:47px;line-height:1.05;max-width:750px;margin:0 auto 27px}.answer-copy{font-weight:1000;letter-spacing:-.035em;font-size:68px;line-height:1.05;margin:25px 0 29px;position:relative;z-index:0}.answer-accept{font-size:25px;font-weight:900;display:block;margin-top:12px;letter-spacing:-.015em}
.question-modal .actions{margin-top:0}.question-modal .actions>.primary{flex:0 1 440px;font-size:26px;min-height:54px;padding:.45em .9em}.question-modal:has(.answer-copy)>.muted{display:none}.question-modal:has(.answer-copy) .question-label{color:#005e65}.question-modal:has(.answer-copy) .question-label:before,.question-modal:has(.answer-copy) .question-label:after{content:'✦';width:auto;height:auto;background:none;color:#eaa511;font-size:32px;opacity:1;text-shadow:0 0 7px #ffd038}.question-modal:has(.answer-copy){background:radial-gradient(ellipse at 50% 48%,#aaffedb0 0%,#e1fff088 29%,#fff4dc 63%,#ffedc6);background-clip:padding-box}
.score-drawer{margin:18px 0 -7px;font-size:11px;color:#4a6575}.score-drawer summary{cursor:pointer;list-style:none;font-weight:900;letter-spacing:.04em}.score-drawer summary:after{content:' ▾'}.score-drawer[open]{margin-bottom:0}.score-drawer .eyebrow{display:none}.score-drawer .award-grid{grid-template-columns:repeat(3,1fr);margin-top:14px;max-height:180px;overflow:auto}.score-drawer .award-team{padding:8px}.score-drawer button{font-size:12px;min-height:30px}.score-drawer strong{font-size:13px}.close{right:4px;top:0;font-size:34px;font-weight:900;z-index:4;color:#001147}
@media(min-width:900px){
 body{min-height:100svh;display:flex;align-items:center;justify-content:center}
 #stage{width:min(100vw,177.77778svh);container-type:inline-size;min-height:100svh}
 body[data-screen=home] #stage,body[data-screen=board] #stage{aspect-ratio:16/9;min-height:0}
 .city,.water,#stars{position:absolute}
 .masthead{height:14cqw;padding:0;min-height:0;max-height:none}.brand{width:43cqw;height:100%;min-width:0}#app{width:94cqw;margin:0 auto}
 .welcome-wrap{width:73cqw;max-width:none;margin:0 auto}.choice-heading{font-size:2.65cqw;line-height:1.05;letter-spacing:.015em;margin:.25cqw 0 1.6cqw;white-space:nowrap}.mode-grid{gap:2.6cqw}.mode-card{height:32.5cqw;min-height:0;border-width:2.2cqw;border-image-width:2.2cqw;border-image-outset:.4cqw;padding:0 1.2cqw 1.1cqw}
 .mode-icon{height:12.3cqw}.mode-icon img{width:22.7cqw;height:22.7cqw}.mode-icon.phone img{width:17cqw;height:17cqw}.mode-card h2{font-size:3.05cqw;margin:.5cqw 0 .6cqw;line-height:1}.mode-card p{font-size:1.8cqw;line-height:1.15;max-width:29cqw;margin:0 0 1.4cqw}.mode-card button{font-size:2.1cqw;min-height:4.1cqw;padding:.45em .4em}
 .welcome-footer{font-size:1.9cqw;margin:1.8cqw 0 .3cqw;line-height:1}.welcome-links{font-size:.7cqw;margin:.5cqw 0 0;gap:1.2cqw}.welcome-wrap .utility{max-width:9cqw;right:1cqw;top:.7cqw}.welcome-wrap .utility button{font-size:.6cqw;min-height:1.7cqw}
 body[data-screen=board] .masthead{height:10.7cqw;min-height:0;padding:0 21cqw 0 0}body[data-screen=board] .brand{width:33cqw;max-height:none}
 .play-layout{height:42.7cqw;min-height:0;grid-template-columns:minmax(0,1fr) 18cqw;gap:2cqw;align-items:stretch}.game-caption{position:absolute;bottom:100%;width:100%;font-size:.7cqw;padding:0 0 .4cqw;pointer-events:none}
 .board{border-width:1.25cqw;border-image-width:1.25cqw;border-image-outset:.4cqw;gap:.25cqw;grid-template-rows:1.12fr repeat(4,1fr)}.cat{font-size:2.2cqw;padding:.3cqw .25cqw;border-radius:1.05cqw;line-height:1.02}.tile{font-size:5.55cqw;border-width:.22cqw;border-radius:1cqw;min-height:0}
 .score-panel{border-width:1.25cqw;border-image-width:1.25cqw;border-image-outset:.4cqw;padding:.2cqw .15cqw .9cqw;gap:.7cqw}.score-panel h2{font-size:1.7cqw;margin:0 0 .2cqw}.score-panel .team-score{padding:.65cqw .3cqw;margin:.25cqw 0 1.3cqw;border-radius:1.2cqw}.team-score h3{font-size:1.55cqw;margin:0 0 .45cqw}.score-num strong{font-size:3.25cqw;min-width:6.2cqw;background:linear-gradient(#faffff,#c6dcf5);border-radius:.7cqw;color:#001147}.score-num button{width:2.5cqw;height:2.5cqw;min-height:0;font-size:2cqw;border-radius:.5cqw}.team-score small{font-size:.52cqw;margin-top:.4cqw}.score-panel .side-actions{gap:1cqw}.score-panel .side-actions button{font-size:1.45cqw;min-height:3.3cqw;padding:.5em .2em;border-radius:1cqw}.side-icons{padding-top:1.3cqw;padding-bottom:.2cqw;gap:2cqw}.side-icons button{width:3.9cqw;height:3.5cqw;font-size:2.6cqw;border-radius:.7cqw}.side-icons button:first-child{font-size:2.8cqw}.buzz-flag{font-size:.8cqw;margin:-1.3cqw -.2cqw .45cqw;padding:.25cqw}
 .connection{position:absolute;top:.6cqw;left:.6cqw;z-index:2;font-size:.65cqw}.mini-join{padding:.3cqw;font-size:.6cqw}.mini-join canvas{width:3.7cqw!important;height:3.7cqw!important}.mini-join strong{font-size:.9cqw}.side-notice{font-size:.7cqw}
 body[data-screen=board] dialog:has(.question-modal){width:min(65vw,115.55svh);max-width:92vw;margin:auto;left:0;right:0;top:0;bottom:0;transform:none}
 dialog:has(.question-modal){--du:min(1vw,1.77778svh)}.question-modal{padding:calc(var(--du)*.7) calc(var(--du)*1.4) calc(var(--du)*1.5);border-width:calc(var(--du)*1.9);border-image-width:calc(var(--du)*1.9)}.question-modal .category-badge{font-size:calc(var(--du)*1.95);padding:calc(var(--du)*.35) calc(var(--du)*2);margin-bottom:calc(var(--du)*1.1)}.question-modal .question-label{font-size:calc(var(--du)*2);margin-bottom:calc(var(--du)*1)}.question-copy{font-size:calc(var(--du)*4.05);line-height:1.04;margin-bottom:calc(var(--du)*2)}.answer-copy{font-size:calc(var(--du)*6.2);margin:calc(var(--du)*2) 0 calc(var(--du)*2.5)}.answer-accept{font-size:calc(var(--du)*2.45);margin-top:calc(var(--du)*1)}.question-modal .actions>.primary{font-size:calc(var(--du)*2.2);min-height:calc(var(--du)*4.5);flex-basis:calc(var(--du)*35)}.close{font-size:calc(var(--du)*3.4)}
}
@media(max-width:899px){#app{width:94vw}.masthead{height:190px}.brand{width:min(650px,88vw)}.welcome-wrap{max-width:720px}.mode-grid{gap:25px}.mode-card{padding:5px 6px 20px;min-height:400px;height:auto}.mode-card h2{font-size:25px}.mode-card p{font-size:17px}.mode-card button{font-size:17px}.welcome-footer{font-size:17px}.welcome-wrap .utility{position:static;max-width:none;justify-content:center;margin:13px 0}.play-layout{grid-template-columns:minmax(0,1fr) 180px;gap:23px;height:calc(100svh - 220px);min-height:420px}.score-panel h2{font-size:14px}.score-panel .side-actions button{font-size:12px}.side-icons button{width:40px;height:35px;font-size:23px}.score-num strong{font-size:28px}.team-score h3{font-size:15px}.score-num button{width:27px;min-height:29px}.tile{font-size:44px}.cat{font-size:15px}.question-copy{font-size:34px}.answer-copy{font-size:50px}.category-badge{font-size:17px}.question-modal .actions>.primary{font-size:22px}}
@media(max-width:600px){.masthead{height:145px}.mode-grid{grid-template-columns:1fr}.mode-card{max-width:390px;margin:auto;width:100%;min-height:350px}.mode-icon{height:130px}.mode-icon img{width:230px;height:230px}.mode-icon.phone img{width:175px;height:175px}.mode-card h2{font-size:29px}.mode-card p{font-size:18px}.welcome-footer{font-size:13px}.welcome-footer:before,.welcome-footer:after{width:20px;margin:0 10px}.play-layout{grid-template-columns:minmax(0,1fr) 120px;gap:15px;min-height:430px}.board,.score-panel{border-width:12px;border-image-width:12px;border-image-outset:3px}.score-panel{padding:0 1px 8px;gap:8px}.score-panel h2{font-size:9px}.team-score h3{font-size:10px}.score-panel .team-score{padding:5px 1px;margin-bottom:13px}.score-num strong{font-size:20px;min-width:25px}.score-num button{width:18px;min-height:23px;font-size:17px}.team-score small{font-size:7px}.score-panel .side-actions button{font-size:9px;min-height:35px}.side-icons{gap:10px}.side-icons button{width:30px;height:30px;font-size:21px}.side-icons button:first-child{font-size:23px}.tile{font-size:24px;border-width:2px;border-radius:9px}.cat{font-size:8px;padding:3px 1px;border-radius:9px}.game-caption{font-size:8px}.modal-card{padding:10px 8px 16px;border-width:19px;border-image-width:19px}.question-copy{font-size:29px}.question-label{font-size:17px}.question-label:before,.question-label:after{width:30px}.category-badge{font-size:12px;padding:7px 12px}.answer-copy{font-size:43px}.answer-accept{font-size:18px}.question-modal .actions>.primary{font-size:18px;min-height:45px}.close{font-size:25px;right:-9px;top:-5px}.score-drawer .award-grid{grid-template-columns:repeat(2,1fr)}}
/* V3.1: opaque cards, all teams visible, centered vector controls. */
.question-modal,.question-modal:has(.answer-copy){background:#fff;background-clip:padding-box}
.score-panel{min-width:0;overflow:visible}
.score-panel>h2,.score-panel>.side-actions,.score-panel>.side-icons,.score-panel>.mini-join{flex-shrink:0}
.score-panel .score-scroll{display:grid;grid-template-rows:repeat(var(--team-count,1),minmax(0,1fr));gap:10px;overflow:visible;min-height:0;align-content:stretch;padding:6px 3px}
.score-panel .team-score{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:0;margin:0;padding:7px 5px;position:relative}
.score-panel .team-score h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}
.score-panel .team-score small{flex-shrink:0}
.score-panel .score-num{min-width:0;flex-shrink:0}
.score-panel .score-num strong{min-width:0;flex:1;max-width:6.2cqw;overflow:hidden;text-overflow:ellipsis}
.score-panel .side-icons{display:flex;justify-content:center;align-items:center;gap:32px;padding-top:12px;padding-bottom:2px}
.score-panel .side-icons button{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;line-height:1;padding:0}
.score-panel .side-icons svg{display:block;width:58%;height:58%;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.score-panel .side-icons svg ellipse{fill:currentColor;stroke:none}
.score-panel .buzz-flag{position:absolute;top:-8px;left:4px;right:4px;margin:0;font-size:10px;line-height:1;padding:3px}
@media(min-width:900px){
 body[data-screen=board]{overflow:hidden}
 body[data-screen=board] #stage{width:min(99vw,176svh);flex:none}
 .score-panel{gap:.65cqw;padding:.25cqw .2cqw .65cqw}
 .score-panel .score-scroll{gap:.9cqw;padding:.5cqw .25cqw}
 .score-panel .team-score{padding:.4cqw .25cqw}
 .score-panel .team-score h3{font-size:1.4cqw;margin:0 0 .25cqw}
 .score-panel .score-num strong{font-size:2.8cqw}
 .score-panel .score-num button{height:2.25cqw;width:2.25cqw;font-size:1.8cqw}
 .score-panel .team-score small{font-size:.5cqw;margin-top:.25cqw}
 .score-panel .side-icons{gap:3cqw;padding:.7cqw 0 .15cqw}
 .score-panel[data-teams='4'] .score-scroll{gap:.55cqw}
 .score-panel[data-teams='4'] .team-score h3{font-size:1.15cqw}
 .score-panel[data-teams='4'] .score-num strong{font-size:2.2cqw}
 .score-panel[data-teams='4'] .score-num button{height:1.8cqw;width:1.8cqw}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .score-scroll{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:.5cqw}
 .score-panel:is([data-teams='5'],[data-teams='6']) .score-scroll{grid-template-rows:repeat(3,minmax(0,1fr))}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .team-score h3{font-size:.85cqw}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .score-num{gap:.15cqw}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .score-num strong{font-size:1.65cqw}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .score-num button{height:1.3cqw;width:1.3cqw;font-size:1.1cqw}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .team-score small{font-size:.4cqw}
}
@media(max-width:899px){.score-panel .score-scroll{gap:6px}.score-panel .team-score{padding:4px 2px}.score-panel .team-score h3{font-size:12px;margin-bottom:3px}.score-panel .score-num strong{max-width:none;font-size:25px}.score-panel .team-score small{font-size:7px}.score-panel .side-icons{gap:16px}.score-panel .buzz-flag{font-size:7px}}
/* V3.3: camera-friendly QR codes. Keep native integer pixels and quiet zone intact. */
.screen-panel canvas[data-qr],.modal-card canvas[data-qr]{display:block;width:auto!important;height:auto!important;max-width:min(360px,72vw);aspect-ratio:1;object-fit:contain;margin:18px auto;border:0;border-radius:0;padding:0;background:#fff;image-rendering:pixelated;box-shadow:0 0 0 8px #fff}
.mini-join{flex-direction:column;justify-content:center;text-align:center;gap:6px}
.mini-join canvas[data-qr]{display:block;width:min(148px,10cqw)!important;height:auto!important;aspect-ratio:1;border:0;border-radius:0;padding:0;background:#fff;image-rendering:pixelated;box-shadow:0 0 0 3px #fff}
.mini-join button{display:block;margin:5px auto 0;font-size:10px;padding:4px 7px;min-height:25px}
@media(max-width:600px){.mini-join canvas[data-qr]{display:none}.screen-panel canvas[data-qr],.modal-card canvas[data-qr]{max-width:min(330px,65vw)}}
/* V3.6: legible cumulative scores, TV recovery, and restrained sky motion. */
.score-panel .team-score .all-game-total{display:flex;flex-direction:column;align-items:center;gap:3px;margin:7px 0 0;opacity:1;color:#bfe9ef;line-height:1.1;flex-shrink:0}
.score-panel .all-game-total span{font-size:clamp(9px,.65cqw,13px);font-weight:900;letter-spacing:.025em}
.score-panel .all-game-total strong{font-size:clamp(17px,1.4cqw,28px);font-weight:1000;color:#ffdd83;line-height:1}
.score-panel .return-home{flex-shrink:0;align-self:stretch;min-height:36px;font-size:clamp(11px,.85cqw,16px);font-weight:900;padding:7px 9px;margin:0 3px 3px;color:#fff8e7;border:1px solid #f1c267;background:#001147;border-radius:10px;box-shadow:0 0 7px #eda20e33}
.score-panel .side-icons{padding-top:.3cqw;padding-bottom:.15cqw}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total{margin-top:4px;gap:2px}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total span{font-size:clamp(7px,.45cqw,10px)}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total strong{font-size:clamp(13px,.95cqw,19px)}
.water{display:none}
#stars{inset:0 0 70%;overflow:hidden}
.star{background:#f4fbff;box-shadow:0 0 4px #a3dcff,0 0 8px #65cfff66;animation-name:gentle-twinkle;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-direction:normal}
@keyframes gentle-twinkle{0%,100%{opacity:.18;transform:scale(.75)}40%{opacity:.95;transform:scale(1.15)}65%{opacity:.4;transform:scale(.85)}}
@media(max-width:899px){.score-panel .return-home{font-size:9px;min-height:30px;padding:5px 2px;margin:0}.score-panel .all-game-total span{font-size:7px}.score-panel .all-game-total strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){.star{animation:none!important;opacity:.5}}
.tv-question .tv-return-home{font-size:14px;min-height:38px;padding:8px 16px;margin-top:4px;background:#001147;color:#fff8e7;border:1px solid #dcb658;border-radius:10px}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total{flex-direction:row;justify-content:center}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total span{font-size:0}
.score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total span:after{content:'TOTAL';font-size:8px}
/* V3.7: keep sky effects above the artwork and below every control. */
#stars{z-index:0;pointer-events:none}
.masthead,#app{position:relative;z-index:1}
.star{border-radius:50%;background:#fff;box-shadow:0 0 5px 1px #d5f5ff,0 0 12px #5fcfff99;animation-name:visible-sky-twinkle}
.star:nth-child(3n):before,.star:nth-child(3n):after{content:'';position:absolute;left:50%;top:50%;background:linear-gradient(transparent,#fff,transparent);transform:translate(-50%,-50%);border-radius:50%;height:12px;width:1px}
.star:nth-child(3n):after{height:1px;width:12px;background:linear-gradient(90deg,transparent,#fff,transparent)}
@keyframes visible-sky-twinkle{0%,100%{opacity:.08;transform:scale(.6)}38%{opacity:1;transform:scale(1.35)}70%{opacity:.22;transform:scale(.8)}}
/* Fit the TV sidebar at normal browser heights as well as fullscreen. */
.score-panel .team-score{justify-content:center;overflow:visible}
.score-panel .team-score h3{margin:0 0 5px;line-height:1.15;flex:none}
.score-panel .team-score .all-game-total{flex-direction:row;justify-content:center;align-items:center;gap:7px;margin:7px 0 0;flex-wrap:nowrap}
.score-panel .all-game-total span{font-size:clamp(9px,.63cqw,12px);white-space:nowrap;line-height:1.15}
.score-panel .all-game-total strong{font-size:clamp(17px,1.3cqw,26px);line-height:1.15}
.score-panel .mini-join{padding:5px;gap:4px}
.score-panel .mini-join canvas[data-qr]{width:min(124px,8cqw)!important}
.score-panel .side-notice{margin:0;font-size:clamp(9px,.65cqw,12px);line-height:1.25}
.score-panel .side-icons{padding:3px 0;gap:24px}
.score-panel .side-icons button{width:clamp(36px,3.3cqw,52px);height:clamp(34px,3cqw,46px)}
@media(min-width:900px){
 .score-panel .score-scroll{min-height:calc(var(--score-rows,1)*92px);flex:1 1 auto;gap:.6cqw}
 .score-panel .team-score{padding:7px 4px}
 .score-panel[data-teams='1'] .score-scroll{min-height:108px}
 .score-panel[data-teams='2'] .score-scroll{min-height:200px}
 .score-panel:is([data-teams='2'],[data-teams='3'],[data-teams='4'],[data-teams='5'],[data-teams='6']) .mini-join canvas{display:none}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .score-scroll{min-height:calc(var(--score-rows,1)*75px)}
 .score-panel:is([data-teams='5'],[data-teams='6'],[data-teams='7'],[data-teams='8']) .all-game-total{gap:4px;margin-top:5px}
}
@media(max-width:899px){.score-panel .team-score .all-game-total{flex-direction:column;gap:2px}.score-panel .mini-join canvas[data-qr]{width:90px!important}}
body.still .star{opacity:.35;animation:none!important;transform:none}
@media(prefers-reduced-motion:reduce){.star{opacity:.35;animation:none!important;transform:none}}
/* V3.8: readable welcome-screen controls in the right-hand rail. */
@media(min-width:900px){
 .welcome-wrap .utility{width:11.5cqw;max-width:225px;right:1cqw;top:.7cqw;display:flex;flex-direction:column;align-items:stretch;gap:9px}
 .welcome-wrap .utility button{width:100%;font-size:clamp(12px,.85cqw,18px);min-height:44px;line-height:1.25;padding:10px 12px;border-radius:11px;background:#001147ed;border:1px solid #78bfd1;box-shadow:0 2px 8px #0005;white-space:normal;text-align:center}
}
/* V3.9: keep the larger utility rail outside both illuminated mode cards. */
@media(min-width:900px){
 .welcome-wrap .utility{right:-2cqw;width:10.5cqw;max-width:225px}
}
/* V3.10: optional host reference stays small and separate from play controls. */
.mode-card .host-reference{margin:0 0 12px;padding:8px 12px;border:1px solid #d4bf8c;border-radius:9px;background:#fffaf0;color:#001147;width:100%}
.mode-card .host-reference p{font-size:12px;line-height:1.3;font-weight:700;margin:0 0 4px;max-width:none}
.host-reference a{display:inline-block;font-size:12px;font-weight:900;line-height:1.3;color:#006e78;text-underline-offset:3px}
.modal-card>.host-reference{background:#eaf7f4;border:1px solid #8cbab7;color:#001147;padding:12px;border-radius:10px;margin:12px 0 18px;text-align:center}
.modal-card>.host-reference p{font-size:13px;margin:0 0 5px;line-height:1.35}
.modal-card>.host-reference a{font-size:14px}
@media(min-width:900px){
 .mode-card:has(.host-reference) .mode-icon{height:10.8cqw}
 .mode-card:has(.host-reference)>p{margin-bottom:.5cqw}
 .mode-card .host-reference{padding:.3cqw .5cqw;margin-bottom:.6cqw}
 .mode-card .host-reference p,.mode-card .host-reference a{font-size:clamp(10px,.67cqw,14px)}
}
@media(max-width:899px){.mode-card:has(.host-reference){min-height:420px}.mode-card .host-reference{max-width:400px;margin:0 0 14px}.mode-card .host-reference p{font-size:12px}}
.tester-settings{padding:12px;margin:12px 0 16px;background:#f3eddf;border:1px solid #cab982;border-radius:10px;color:#001147;text-align:center}
.tester-settings>strong{font-size:12px;letter-spacing:.04em}
.tester-settings p{font-size:13px;line-height:1.35;margin:7px 0 10px}
.tester-settings summary{cursor:pointer;font-size:12px;font-weight:900;margin:8px 0;color:#001147}
.tester-code-list{display:grid;gap:7px;max-height:250px;overflow:auto;margin-top:10px}
.tester-code-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px;background:#fffaf0;border-radius:7px;text-align:left}
.tester-code-list strong{font-size:12px}.tester-code-list span{font-size:11px;color:#3c5867}
