/* Dedicated host/player controls. Desktop and Teacher Mode keep their board layout. */
body:is([data-role=host],[data-role=player]){display:block;overflow-x:hidden;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body:is([data-role=host],[data-role=player]) #stage{width:100%;min-height:100svh;container-type:normal;aspect-ratio:auto}
body:is([data-role=host],[data-role=player]) .masthead{height:96px;min-height:0;padding:10px 14px 2px}
body:is([data-role=host],[data-role=player]) .brand{width:270px;max-width:74vw;min-width:0;height:100%}
body:is([data-role=host],[data-role=player]) .brand img{transform:none}
body:is([data-role=host],[data-role=player]) #app{width:min(100% - 24px,680px);margin:0 auto 20px}
body:is([data-role=host],[data-role=player]) .connection{position:static;font-size:11px;gap:6px;margin:2px 0 10px}
body:is([data-role=host],[data-role=player]) .connection span{padding:4px 10px;background:#001147;border:1px solid #244673}
.phone-panel.screen-panel{width:100%;max-width:none;margin:0;padding:14px;border:1px solid #edb748;border-image:none;border-radius:20px;background:linear-gradient(145deg,#071a46,#00102f);color:#fff8e7;box-shadow:0 0 0 3px #001147,0 0 20px #eda20e33;text-align:left}
.phone-panel h1{font-size:25px;line-height:1.15;margin:8px 0 13px;color:#fff8e7}
.phone-panel h2{color:#fff8e7}
.phone-panel .eyebrow{color:#5ee9e6;font-size:11px}
.phone-panel p{font-size:14px;line-height:1.4}
.phone-panel .hint,.phone-panel small{color:#b4c8e6;opacity:1}
.phone-panel label{font-size:13px}
.phone-panel a{color:#5ee9e6}
.phone-panel button{min-height:42px;font-size:12px;padding:9px 10px;border-radius:11px;line-height:1.2}
.phone-panel button.ghost{background:#081d43;border:1px solid #48698a;color:#fff8e7}
.phone-panel button.danger{background:#7e1649;border:1px solid #ff65b6;color:#fff}
.phone-panel button.primary{border-radius:12px;box-shadow:0 0 0 1px #edb748,inset 0 1px 1px #b5ffff55,0 2px 4px #0006}
.phone-panel .roster{background:#063849;color:#9cfff4;font-size:13px}
.phone-panel .host-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 12px}
.phone-panel .board-tools{grid-template-columns:1fr 1fr;margin-bottom:15px}
.phone-game-heading{display:flex;align-items:center;gap:10px;border-bottom:1px solid #34516e;padding:0 0 10px;margin-bottom:9px}
.phone-game-heading strong{flex:none;border:1px solid #e1b75d;background:#001147;color:#ffdd83;font-size:14px;border-radius:7px;padding:6px 9px}
.phone-game-heading span{font-size:15px;font-weight:900;color:#fff8e7}
.phone-board{display:grid;gap:8px}
.phone-category-row{display:grid;grid-template-columns:minmax(84px,1.5fr) repeat(4,minmax(0,1fr));gap:5px;align-items:stretch;min-height:58px}
.phone-category{display:flex;align-items:center;justify-content:flex-start;padding:6px 7px;background:var(--cat);border:1px solid #ffffff33;border-radius:9px;font-size:10px;font-weight:900;line-height:1.18;overflow-wrap:normal;word-break:normal;hyphens:none;color:#fff;text-transform:uppercase}
.phone-panel .phone-tile{padding:0;min-width:0;min-height:52px;background:linear-gradient(#fff,#e9eef8);color:var(--cat);border:2px solid var(--cat);border-radius:9px;font-size:19px;font-weight:1000;letter-spacing:-.04em;line-height:1;box-shadow:inset 0 1px 0 #fff}
.phone-panel .phone-tile.played{opacity:1;background:#10284b;border-color:#385370;color:#7aadc4}
.host-extras{margin-top:15px;border-top:1px solid #34516e;padding-top:12px}
.host-extras summary{font-size:12px;font-weight:900;color:#c6e8f4;cursor:pointer;padding:4px 0}
.phone-panel .phone-scores{margin-top:13px;gap:9px}
.phone-panel .team-score{border-width:1px;border-radius:12px;padding:9px;box-shadow:none;background:#041531;color:#fff8e7}
.phone-panel .team-score h3{font-size:13px;line-height:1.2;margin:0 0 7px}
.phone-panel .score-num strong{font-size:24px;min-width:35px;background:none;color:#fff8e7}
.phone-panel .score-num button{width:30px;min-height:30px;padding:0;background:#0e4f65;color:#fff;border:1px solid #4ddad5;font-size:20px}
.phone-panel .team-score small{font-size:9px;margin-top:5px}
.phone-panel .roster-names{font-size:11px;margin:12px 0 0}
.phone-panel .category-badge{display:block;max-width:100%;margin:4px 0 14px;padding:8px 10px;font-size:12px;line-height:1.3;border-width:1px;border-radius:9px;box-shadow:none;text-align:center}
.phone-panel .host-question .question-copy{font-size:23px;line-height:1.22;letter-spacing:-.02em;color:#fff8e7;margin:0 0 14px;text-align:left}
.phone-panel .private-answer{margin:10px 0;padding:12px;background:#072f3a;border:1px solid #138e93;border-radius:12px}
.phone-panel .private-answer small{font-size:9px;letter-spacing:.06em;color:#83dacf;margin-bottom:5px}
.phone-panel .private-answer .answer-copy{font-size:23px;font-weight:900;color:#fff8e7;margin:0;line-height:1.2;letter-spacing:0;text-shadow:none}
.phone-panel .round-status{font-size:13px;line-height:1.3;margin:12px 0;padding:10px;border:1px solid #12acaa;background:#063d46;color:#a7fff2;border-radius:10px}
.phone-panel .round-status.locked{background:#0b2146;border-color:#31527b;color:#c3d6f0}
.phone-panel .round-status.first{background:#4a063e;border-color:#f34eae;color:#ffdaef}
.phone-panel .host-question .actions{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
.phone-panel .host-question .actions button{font-size:11px;min-height:44px}
.phone-panel .award-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.phone-panel .award-team{background:#082448;border-color:#34516e;padding:9px;color:#fff8e7}
.phone-panel .award-team strong{font-size:13px}
.phone-panel .award-team button{font-size:12px;min-height:35px;margin:0 2px;padding:7px}
.phone-panel.buzzer-panel{text-align:center;padding:16px 18px}
.player-identity .eyebrow{display:inline-block;border:1px solid #17b5be;border-radius:30px;padding:4px 12px;margin:0 0 7px;color:#67f4ec;font-weight:900}
.player-identity h1{font-size:23px;margin:0 0 7px;overflow-wrap:anywhere}
.phone-panel .player-category{font-size:11px;line-height:1.35;margin:0 0 10px}
.phone-panel.buzzer-panel .round-status{margin:8px 0 13px;min-height:39px;display:flex;align-items:center;justify-content:center}
.phone-panel .buzz-button{display:flex;align-items:center;justify-content:center;width:clamp(135px,24svh,185px);height:clamp(135px,24svh,185px);margin:12px auto 17px;padding:0;border:4px solid #ffb5e8;border-radius:50%;background:radial-gradient(circle at 35% 22%,#ff8fd9,#dd0996 45%,#9b006e 85%);box-shadow:inset 0 3px 6px #ffdcf3aa,inset 0 -6px 8px #67004d,0 7px 0 #470838,0 0 23px #f008a255;color:#fff;font-size:30px;font-weight:1000;letter-spacing:.02em;touch-action:manipulation}
.phone-panel .buzz-button:disabled{opacity:1;background:radial-gradient(circle at 35% 25%,#153e60,#001147 80%);color:#baf9ff;border-color:#29cbd5;box-shadow:inset 0 2px 4px #79cce655,0 6px 0 #000c2b,0 0 17px #16b7d533}
.phone-panel .buzz-button.won{background:radial-gradient(circle at 35% 25%,#75ffe1,#0a9c91 60%,#005b64);border-color:#b3fff1;box-shadow:0 6px 0 #003b4c,0 0 25px #0ff9;color:#fff}
.phone-panel .buzzer-help{font-size:12px;min-height:18px;margin:0 0 12px;color:#b4c8e6}
.player-score{display:flex;align-items:center;justify-content:center;gap:12px;background:#04132f;border:1px solid #34516e;border-radius:10px;padding:8px 12px;margin:0 0 12px}
.player-score span{font-size:10px;color:#b4c8e6;font-weight:900;letter-spacing:.06em}
.player-score strong{font-size:24px;line-height:1;color:#ffdd83}
.phone-panel.buzzer-panel .actions{margin:0;gap:8px}
.phone-panel .vibrate-setting{font-size:10px;line-height:1.4;margin-top:12px;color:#b4c8e6;font-weight:600}
/* Large, readable game stamp in the clear sky beside the desktop logo. */
body[data-screen=board] .board-wrap>.game-caption{position:absolute;bottom:calc(100% + .8cqw);right:0;left:auto;width:18cqw;max-width:300px;padding:.5cqw .7cqw;background:#001147;border:1px solid #e4b753;border-radius:.8cqw;box-shadow:0 3px 9px #0007;text-shadow:none;display:flex;flex-direction:column;gap:.15cqw;line-height:1.1}
.game-number{display:block;font-size:1.55cqw;font-weight:1000;color:#ffdd83;letter-spacing:.045em}
.game-name{display:block;font-size:1.05cqw;font-weight:900;color:#fff8e7}
@media(max-width:899px){body[data-screen=board] .board-wrap>.game-caption{position:static;width:auto;max-width:none;margin:0 0 9px;padding:6px;border-radius:8px}.game-number{font-size:15px}.game-name{font-size:11px}}
@media(max-width:370px){.phone-panel.screen-panel{padding:11px}.phone-category-row{grid-template-columns:minmax(75px,1.5fr) repeat(4,minmax(0,1fr));gap:4px}.phone-category{font-size:9px;padding:5px}.phone-panel .phone-tile{font-size:17px}.phone-panel .host-question .question-copy{font-size:21px}.phone-panel.buzzer-panel{padding:14px}.phone-panel .buzz-button{width:140px;height:140px}}
@media(max-height:650px) and (orientation:portrait){body:is([data-role=host],[data-role=player]) .masthead{height:72px}.phone-panel .buzz-button{width:130px;height:130px;margin:8px auto 13px}.phone-panel.buzzer-panel{padding:12px}.phone-panel.buzzer-panel .round-status{margin:7px 0;padding:8px}.phone-panel .vibrate-setting{margin-top:8px}}
/* V3.5: match the TV board's original orientation on the host phone. */
.phone-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:minmax(72px,auto) repeat(4,57px);gap:6px;width:100%;min-width:0}
.phone-category{justify-content:center;text-align:center;font-size:9px;line-height:1.2;padding:7px 3px;min-width:0;overflow-wrap:normal;word-break:normal;hyphens:none;border-radius:9px}
.phone-panel .phone-tile{min-width:0;min-height:0;padding:0;font-size:22px;border-radius:9px;letter-spacing:-.045em}
.host-controls{border-top:1px solid #34516e;margin-top:12px;padding-top:10px}
.host-controls summary{color:#b4c8e6;font-size:11px;font-weight:900;cursor:pointer;padding:4px 0}
.host-controls .host-toolbar{margin:10px 0 0}
body[data-role=host][data-question-focus=true] .masthead{display:none}
body[data-role=host][data-question-focus=true] #app{padding-top:10px}
body[data-role=host][data-question-focus=true] .connection{font-size:10px;margin:0 0 9px}
body[data-role=host][data-question-focus=true] .host-panel{padding:18px}
body[data-role=host][data-question-focus=true] .question-copy{font-size:26px;line-height:1.28;font-weight:900;margin:16px 0 19px;letter-spacing:-.01em}
body[data-role=host][data-question-focus=true] .category-badge{margin:0 0 15px;font-size:11px;padding:9px 8px}
body[data-role=host][data-question-focus=true] .private-answer{padding:13px;margin:14px 0}
body[data-role=host][data-question-focus=true] .private-answer .answer-copy{font-size:25px}
body[data-role=host][data-question-focus=true] .host-question .actions button{min-height:47px;font-size:12px}
@media(max-width:370px){.phone-board{gap:5px;grid-template-rows:minmax(75px,auto) repeat(4,53px)}.phone-category{font-size:8px;padding:5px 2px}.phone-panel .phone-tile{font-size:20px}body[data-role=host][data-question-focus=true] .host-panel{padding:14px}body[data-role=host][data-question-focus=true] .question-copy{font-size:24px}}
