*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 10%,#174c89,#071428 70%);color:#f8f4e8;font:16px system-ui,Segoe UI,sans-serif;height:100dvh;overflow:hidden}header{height:66px;display:flex;justify-content:space-between;align-items:center;padding:8px 2vw;border-bottom:3px solid #d5a64b;background:#07152c}h1{margin:0;font-size:clamp(18px,3vw,31px);letter-spacing:.06em;text-shadow:0 2px 6px #000}h1 em{color:#eeb64b;font-style:normal}button,select,input{font:inherit;border-radius:9px;padding:11px;border:1px solid #bd9c54}button{cursor:pointer;color:white;background:linear-gradient(#2274ca,#134482);font-weight:700}button:disabled{opacity:.35;cursor:default}button.danger{background:linear-gradient(#d83f4d,#861b31)}button.gold{background:linear-gradient(#d6a848,#8e631c)}#join{max-width:430px;margin:9vh auto;padding:24px;background:#102c50;border:2px solid #bd9c54;border-radius:18px;display:grid;gap:12px}#join input,#join select{width:100%;background:#eaf1fa;color:#16243a}main{display:grid;grid-template-columns:minmax(0,1fr) 245px;height:calc(100dvh - 66px);gap:12px;padding:12px}main[hidden]{display:none}.stage{min-width:0;display:flex;flex-direction:column;border:2px solid #d4ad5b;border-radius:14px;padding:16px;background:#10264a;overflow:hidden}.topline{display:flex;justify-content:space-between;color:#f0c86b;font-size:1.1rem;font-weight:700;min-height:35px}#content{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;overflow:hidden;text-align:center}#actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;min-height:60px}#message{min-height:18px;margin:5px;color:#ffd275}aside{border:1px solid #b48b46;background:#091b36;border-radius:12px;padding:14px;overflow:auto}aside h3{color:#e8bd63;margin:12px 0 8px}#players>div,#buzzes>div{padding:6px;border-bottom:1px solid #35516f;display:flex;justify-content:space-between;gap:10px}.board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));width:100%;height:100%;gap:5px}.tile{min-width:0;min-height:0;padding:3px;font-size:clamp(10px,1.3vw,18px);overflow:hidden;overflow-wrap:anywhere;border:2px solid #3ca6f3;background:linear-gradient(#267cda,#0b408a);box-shadow:inset 0 0 16px #4a9ef866}.tile:disabled{background:#07162b;color:#7b8a9c;border-color:#31425b;opacity:1}.question{font-size:clamp(23px,3.5vw,48px);line-height:1.22;max-width:94%;padding:20px;position:relative}.category{font-size:clamp(22px,3vw,38px);color:#eac36d}.options{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px}.options button{min-height:65px}.bigbuzz{font-size:clamp(28px,5vw,55px);padding:18px 45px;background:linear-gradient(#ff4b56,#a6092c);border:4px solid #ffcb65;border-radius:25px}.overlay{position:absolute;inset:0;pointer-events:none;width:100%;height:100%}.score{font-size:clamp(22px,3vw,45px)}.slider{width:min(500px,90%)}.wager-num{font-size:3rem;color:#f3c660}.small{font-size:.9rem;color:#a7c2e3}.results{font-size:clamp(18px,2vw,26px)}@media(max-width:700px){main{grid-template-columns:minmax(0,1fr) 110px;gap:5px;padding:5px}aside{padding:5px;font-size:11px}.stage{padding:7px}.tile{font-size:10px}#actions button{padding:7px}header{height:52px}main{height:calc(100dvh - 52px)}.options{grid-template-columns:1fr}.options button{min-height:35px;padding:5px}}

/* Phase 2.1: honor hidden attributes even where layout uses display:grid */
[hidden]{display:none!important}
:root{--head:clamp(40px,8dvh,66px)}
header{height:var(--head)}
main{height:calc(100dvh - var(--head));min-height:0;grid-template-columns:minmax(0,1fr) clamp(105px,20vw,245px);gap:clamp(3px,1vw,12px);padding:clamp(3px,1vw,12px)}
.stage{padding:clamp(4px,1vw,16px)}
#join{margin:min(6dvh,40px) auto;max-height:calc(100dvh - var(--head) - 12px);overflow:hidden;padding:clamp(8px,2dvh,24px);gap:clamp(4px,1dvh,12px)}
#join h2{margin:0;font-size:clamp(18px,3dvh,28px)}
#join input,#join select,#join button{min-height:0;padding:clamp(5px,1.1dvh,11px)}
#joinError{color:#ffd275;margin:0}
#actions{min-height:0;max-height:45%;gap:clamp(3px,1dvh,8px)}
#actions button{padding:clamp(4px,1dvh,11px)}
.options button{min-height:clamp(30px,7dvh,65px)}
.question{font-size:clamp(14px,min(3.2vw,5dvh),48px);padding:clamp(5px,2dvh,20px)}
.category{font-size:clamp(16px,3.5dvh,38px);margin:0}
.topline{min-height:0;font-size:clamp(12px,2dvh,18px)}
#message{min-height:0;font-size:clamp(10px,1.8dvh,16px)}
aside{overflow:hidden;padding:clamp(3px,1vw,14px);font-size:clamp(10px,1.5vw,16px)}
aside h3{margin:clamp(2px,1dvh,12px) 0}
#players{max-height:40%;overflow:hidden}
#players>div,#buzzes>div{padding:clamp(1px,.5dvh,6px)}
.room-info{text-align:center;min-width:0}.room-info h2{font-size:clamp(25px,6dvh,54px);letter-spacing:.15em;margin:0}.join-url{font-size:clamp(9px,1.5dvh,14px);overflow-wrap:anywhere}.qr{width:min(28dvh,180px);height:min(28dvh,180px);background:white;padding:6px;border-radius:8px}
@media(max-aspect-ratio:3/4){main{grid-template-columns:minmax(0,1fr)}aside{position:absolute;right:5px;top:calc(var(--head) + 4px);width:min(32vw,135px);max-height:35dvh;background:#091b36e8;z-index:2}#content{padding-right:min(8vw,40px)}.options{grid-template-columns:1fr}.tile{font-size:clamp(8px,2vw,12px)}}
@media(max-height:500px){#join{grid-template-columns:1fr 1fr;max-width:85vw;margin:2dvh auto}#join h2,#joinError{grid-column:1/-1}.bigbuzz{font-size:20px;padding:5px 20px}.qr{width:90px;height:90px}}

/* Phase 2.2 fixed board, larger questions, and responsive wheel */
.board{grid-template-rows:repeat(5,minmax(0,1fr));aspect-ratio:auto}
.tile.played,.tile.played:disabled{background:#071528;border-color:#26374b;color:#536479;box-shadow:none;opacity:1}
.question{font-size:clamp(24px,min(5.1vw,7.8dvh),82px);line-height:1.13;max-width:98%;width:100%;font-weight:750;text-wrap:balance;overflow-wrap:break-word}
.wheel-canvas{height:min(68dvh,65vw,100%);width:auto;max-width:100%;object-fit:contain;aspect-ratio:1}
@media(max-aspect-ratio:3/4){.wheel-canvas{height:auto;width:min(95%,52dvh)}.question{font-size:clamp(22px,6vw,60px)}}

/* Stable wheel geometry and reserved control space across spin transitions. */
.wheel-heading{flex:0 0 auto;min-height:1.3em;margin:0 0 .25em}
.wheel-canvas{flex:0 1 auto;min-height:0;max-height:calc(100% - 3.5em);display:block;margin:auto}
.wheel-control{height:clamp(58px,12dvh,108px);min-width:min(100%,320px);display:flex;align-items:center;justify-content:center}
.wheel-status{font-size:clamp(15px,2.3dvh,24px);font-weight:700;color:#eac36d}

/* Phase 2.2 presentation: stable wheel result and center-out board entrance */
.wheel-control{height:clamp(86px,15dvh,140px);flex-shrink:0;position:relative}
.spin-announcement{width:100%;animation:result-pop .28s ease-out both;text-align:center}
.spin-announcement h2{margin:0;color:#ffe08b;font-size:clamp(17px,3.1dvh,34px);line-height:1.15}
.spin-total{font-weight:800;font-size:clamp(14px,2.2dvh,23px);margin-top:5px}
@keyframes result-pop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
.tile{font-weight:900;font-size:clamp(12px,min(2.0vw,3.1dvh),30px);line-height:1.05;text-wrap:balance;letter-spacing:.005em}
.tile:disabled:not(.played){opacity:1;background:linear-gradient(#267cda,#0b408a);border-color:#3ca6f3;color:#fff;box-shadow:inset 0 0 16px #4a9ef866}
.tile.played,.tile.played:disabled{background:#071528;border-color:#26374b;color:#536479;box-shadow:none}
.tile-build{animation:tile-grow .28s cubic-bezier(.2,.85,.25,1) both;animation-delay:var(--build-delay,0ms);transform-origin:center}
@keyframes tile-grow{from{transform:scale(.02);opacity:0}to{transform:scale(1);opacity:1}}
#message.your-turn{font-weight:900;color:#ffda6e;text-shadow:0 0 8px #a77318}
@media(max-width:700px){.tile{font-size:clamp(10px,2.2vw,18px)}}

/* Animated cumulative leaderboard */
aside h3:first-child{font-size:0}aside h3:first-child::after{content:'Leaderboard';font-size:clamp(13px,1.6vw,20px)}
#players{max-height:55%;overflow:visible}
#players>.leader-row{display:flex;align-items:center;gap:5px;min-height:30px;padding:5px 3px;border-bottom:1px solid #35516f;position:relative;will-change:transform;background:#102a4b;border-radius:5px;margin:2px 0}
.leader-row .leader-rank{width:22px;flex-shrink:0;color:#c3d2e5;font-weight:900}
.leader-row .leader-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.leader-row strong{font-variant-numeric:tabular-nums;font-size:clamp(13px,1.7vw,22px);min-width:32px;text-align:right}
.leader-row.leader-first{background:#314f74;box-shadow:inset 3px 0 #f0c46b}
.leader-row.leader-first .leader-rank{color:#ffd979}
.leader-delta{position:absolute;right:30px;bottom:70%;font-weight:950;font-size:clamp(17px,2vw,28px);text-shadow:0 2px 3px #06101f;pointer-events:none;z-index:5;white-space:nowrap}
.leader-delta.gain{color:#5bff9c}.leader-delta.loss{color:#ff6677}
/* Winner presentation, confined to the existing stage */
.winner-celebration{width:min(100%,850px);height:100%;min-height:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 45%,#315a95 0%,#152f58 50%,#0b1b35 100%);border:3px solid #e9bc5d;border-radius:18px;box-shadow:inset 0 0 55px #b8903e55;text-shadow:0 3px 8px #000}
.winner-label{color:#ffdb75;font-size:clamp(16px,3dvh,34px);font-weight:950;letter-spacing:.13em;z-index:1;animation:winner-enter .65s both}
.winner-name{font-size:clamp(26px,min(6vw,8dvh),86px);margin:.2em 0;color:#fff;z-index:1;overflow-wrap:anywhere;animation:winner-enter .8s .12s both}
.winner-score{font-size:clamp(27px,min(5vw,7dvh),75px);font-weight:950;color:#ffdf7d;z-index:1;animation:winner-enter .8s .24s both}
.winner-subtitle{font-size:clamp(12px,2.5dvh,23px);font-weight:800;letter-spacing:.08em;z-index:1;animation:winner-enter .8s .35s both}
@keyframes winner-enter{from{opacity:0;transform:scale(.7) translateY(15px)}to{opacity:1;transform:scale(1) translateY(0)}}
.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.confetti i{position:absolute;top:-12px;left:var(--x);width:9px;height:15px;background:#ffd66d;opacity:0;animation:confetti-fall var(--dur) var(--delay) linear infinite}
.confetti i:nth-child(3n){background:#52baff}.confetti i:nth-child(4n){background:#ff647a}.confetti i:nth-child(5n){background:#a4ef91}
@keyframes confetti-fall{0%{transform:translateY(-5vh) rotate(0);opacity:0}10%{opacity:1}90%{opacity:1}100%{transform:translateY(75vh) rotate(620deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.confetti i{animation:none;display:none}.winner-label,.winner-name,.winner-score,.winner-subtitle{animation:none}}

/* Compact leaderboard and five-slot animated buzz queue */
.leader-row .leader-rank{display:none!important}
#players>.leader-row{gap:7px;padding:6px 2px}
.leader-row .leader-name{font-size:clamp(13px,1.6vw,22px);font-weight:850}
.leader-row strong{font-size:clamp(15px,1.9vw,26px)}
#buzzes{display:flex;flex-direction:column;gap:5px;position:relative;overflow:hidden}
#buzzes>.buzz-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:2px 6px;padding:7px 8px;border:1px solid #35516f;background:#173454;border-radius:8px;min-height:44px;will-change:transform,opacity}
#buzzes>.buzz-current{background:#2b507e;border:2px solid #e7c46e;min-height:58px}
.buzz-label{grid-column:1/-1;color:#e7c46e;font-size:10px;font-weight:900;letter-spacing:.06em;min-height:0}
.buzz-label:empty{display:none}
.buzz-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(12px,1.3vw,18px)}
.buzz-ms{font-variant-numeric:tabular-nums;color:#d9e8fb;white-space:nowrap;font-size:clamp(11px,1.2vw,17px)}
.buzz-outgoing{border-color:#ff6677!important}
#pot{font-variant-numeric:tabular-nums}
.pot-delta{position:absolute;right:8px;color:#5bff9c;font-weight:950;font-size:24px;pointer-events:none;z-index:10}
.pot-delta.loss{color:#ff6677}

#content{container-type:size}.question{width:min(98cqw, 145cqh);aspect-ratio:16/9;max-height:76cqh;flex:0 1 auto;display:flex;align-items:center;justify-content:center;border-radius:12px;overflow:hidden;background:#10264a;font-size:clamp(18px, min(5.5cqw,10cqh),76px)}@media(max-aspect-ratio:3/4){.question{width:min(98cqw,100cqh);aspect-ratio:4/3}}

/* Keep answer controls visible below the question panel. */
#actions{flex-shrink:0;max-height:none}.options{min-width:0}.options button{overflow-wrap:anywhere;min-width:0}#content{min-height:0}

/* One role-independent wheel stage. */
.wheel-layout{display:grid;grid-template-columns:minmax(0,66%) minmax(0,34%);grid-template-rows:minmax(0,1fr);width:100%;height:100%;min-height:0;align-items:center;gap:0}
.wheel-layout .wheel-canvas{display:block;width:min(96%,99cqh);height:auto;max-height:100%;max-width:100%;aspect-ratio:1;justify-self:center;margin:0;object-fit:contain}
.wheel-layout .wheel-control{display:flex;flex-direction:column;gap:clamp(8px,2cqh,24px);align-items:center;justify-content:center;width:100%;height:100%;min-width:0;min-height:0;padding:0 5%;overflow-wrap:anywhere;text-align:center}
.wheel-heading{font-size:clamp(16px,4cqh,38px);line-height:1.1;margin:0;color:#eac36d}
.wheel-status{font-size:clamp(16px,4cqh,38px);line-height:1.2}
.wheel-spin{font-size:clamp(22px,6cqh,60px);padding:.4em 1.2em;border:2px solid #f6d784;border-radius:10px;background:linear-gradient(#eac56a,#ad7928)!important;color:#102440;font-weight:900;max-width:100%}
.stage:has(.wheel-layout) #actions{display:none}.stage:has(.wheel-layout) #message{display:none}
@container (max-aspect-ratio: 4/5){.wheel-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,78%) minmax(0,22%)}.wheel-layout .wheel-canvas{width:min(96%,76cqh)}.wheel-layout .wheel-control{padding:0;gap:4px}.wheel-heading{font-size:clamp(14px,3cqh,24px)}}

.wheel-intro{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5cqh;width:100%;height:100%;font-size:clamp(16px,4cqh,38px);animation:intro-in .5s ease-out}.wheel-intro h2,.wheel-intro p{margin:0}.intro-points{font-size:clamp(35px,13cqh,120px);color:#ffd36b;text-shadow:0 0 30px #f5bd55;animation:intro-in .8s cubic-bezier(.2,1.5,.4,1) both}.intro-risk{display:flex;gap:4cqw;font-weight:900;animation:intro-in .5s .65s both}.intro-loss{color:#ff8383}.intro-gain,.award-points{color:#69e7a1}.award-points{font-size:clamp(20px,6cqh,55px);animation:intro-in .5s both}.wheel-buttons{display:grid;gap:8px;width:min(95%,240px)}.wheel-buttons button{width:100%}.wheel-pass{font-size:clamp(16px,4cqh,34px);background:#29486c}.spin-decision{width:min(95%,240px);font-weight:800;color:#edc46e;font-size:clamp(12px,2.5cqh,22px)}.spin-decision:after{content:'';display:block;height:5px;margin-top:6px;border-radius:5px;background:linear-gradient(to right,#edc46e calc(var(--remaining,1)*100%),#314b70 0)}.stage:has(.wheel-intro) #actions,.stage:has(.wheel-intro) #message{display:none}@keyframes intro-in{from{opacity:0;transform:scale(.65)}to{opacity:1;transform:scale(1)}}

/* Turn ownership cue: arrival center-stage, then fixed lower-right dock. */
.stage{position:relative}
.turn-cue{position:absolute;right:18px;bottom:75px;z-index:15;pointer-events:none;display:flex;align-items:center;gap:12px;background:linear-gradient(130deg,#e6bd60,#a87527);color:#102440;border:2px solid #ffdd8a;border-radius:12px;padding:10px 14px;box-shadow:0 5px 20px #0009;font-size:clamp(14px,2vw,24px);font-weight:900;white-space:nowrap}
.turn-cue-time{font-variant-numeric:tabular-nums;border-left:2px solid #5b451f;padding-left:12px}
.turn-cue-time:after{content:'';display:block;height:5px;margin-top:4px;border-radius:5px;background:linear-gradient(to right,#fff calc(var(--turn-remaining,1)*100%),#7b622d 0)}
.turn-cue-arrive{animation:turn-cue-arrival .62s cubic-bezier(.2,.8,.25,1) both}
@keyframes turn-cue-arrival{0%{right:50%;bottom:50%;transform:translate(50%,50%) scale(2.1);opacity:0}18%{opacity:1}42%{right:50%;bottom:50%;transform:translate(50%,50%) scale(1.7)}100%{right:18px;bottom:75px;transform:translate(0,0) scale(1);opacity:1}}
@media(max-width:700px){.turn-cue{right:6px;bottom:55px;padding:6px 8px;gap:5px;font-size:12px}.turn-cue-time{padding-left:5px}@keyframes turn-cue-arrival{0%{right:50%;bottom:50%;transform:translate(50%,50%) scale(1.7);opacity:0}30%{opacity:1}100%{right:6px;bottom:55px;transform:none;opacity:1}}}

/* Game-show announcements and approved brand art */
.lobby-brand{width:min(85%,680px);max-height:27%;object-fit:contain;margin-bottom:1cqh}
.spin-pass-brand{width:min(100%,350px);max-height:26%;object-fit:contain;filter:drop-shadow(0 0 8px #eabf6060)}
.game-announcement{display:flex;flex-direction:column;align-items:center;gap:clamp(3px,1cqh,10px);width:100%;max-width:100%;animation:announce-arrive .48s cubic-bezier(.18,1.3,.3,1) both}
.game-announcement-title{font-weight:1000;color:#fff;font-size:clamp(20px,4.4cqh,52px);line-height:1.05;text-shadow:0 3px 0 #163b68,0 0 20px #c9964666}
.game-announcement-category{font-weight:1000;color:#ffd069;font-size:clamp(28px,7cqh,80px);line-height:1.08;text-shadow:0 3px 0 #6c4411,0 0 22px #ffd36b55;overflow-wrap:anywhere}
.game-announcement-detail{font-size:clamp(15px,2.8cqh,30px);font-weight:750;color:#e6f0ff}
@keyframes announce-arrive{from{opacity:0;transform:translateY(-12px) scale(.88)}to{opacity:1;transform:none}}
.board-announcement{position:absolute;top:0;left:0;right:0;z-index:3;padding:clamp(4px,1cqh,12px);font-size:clamp(13px,2.8cqh,32px);font-weight:1000;background:linear-gradient(90deg,#0b2857e8,#173f77f5,#0b2857e8);color:#ffd77d;text-shadow:0 2px 5px #000;pointer-events:none;animation:announce-arrive .4s both}
.wager-panel{display:flex;flex-direction:column;align-items:center;gap:clamp(4px,1cqh,12px);width:min(95%,560px);min-height:0;margin-top:1cqh}
.wager-label{font-size:clamp(12px,2.3cqh,24px);font-weight:850;color:#d8e5fa;letter-spacing:.06em}
.wager-current{font-size:clamp(44px,11cqh,115px);line-height:1;font-weight:1000;color:#ffd46c;text-shadow:0 0 18px #f8c45699;font-variant-numeric:tabular-nums}
.wager-selected{font-size:clamp(13px,2.5cqh,27px);font-weight:800;color:#fff}
.wager-adjustments{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(2px,.6cqw,8px);width:100%}
.wager-adjustments button{min-width:0;padding:clamp(4px,1cqh,10px) 1px;font-size:clamp(11px,1.9cqh,20px)}
.wager-submit{font-size:clamp(17px,3cqh,30px);width:min(100%,330px);padding:clamp(7px,1.4cqh,15px);border:2px solid #ffe5a1}
.wager-amount-pop{animation:wager-pop .62s cubic-bezier(.2,1.4,.4,1)}
@keyframes wager-pop{0%{transform:scale(.55);opacity:.4;filter:brightness(2)}60%{transform:scale(1.2);opacity:1;filter:brightness(1.6)}100%{transform:scale(1);filter:none}}
.wager-wait{font-size:clamp(20px,4cqh,42px);font-weight:850;color:#f0c86b}
.stage:has(.wager-panel:not(.tutorial-wager)) #actions{display:none}
.stage:has(.game-announcement) .category{display:none}
@media(max-width:700px){.wager-adjustments{grid-template-columns:repeat(3,minmax(0,1fr))}.game-announcement-title{font-size:clamp(16px,3.5cqh,32px)}.game-announcement-category{font-size:clamp(23px,5.5cqh,50px)}}

/* Phase 3.1: unobstructed timed category selection */
.header-brand{width:clamp(220px,29vw,425px);max-height:55px;object-fit:contain;object-position:left center}
.board-status{flex:0 0 auto;width:100%;min-height:49px;display:flex;justify-content:center;align-items:center;gap:22px;background:linear-gradient(90deg,#102c57,#1b4478,#102c57);border:2px solid #d5a64b;border-radius:10px;margin-bottom:7px;color:#ffdc86;font-weight:1000;font-size:clamp(13px,1.6vw,24px);text-shadow:0 2px 3px #000;white-space:normal;line-height:1.1}
.board-status-clock{color:white;border-left:2px solid #cda74d;padding-left:16px;font-variant-numeric:tabular-nums;font-size:clamp(18px,2.1vw,29px)}
.board{flex:1;min-height:0}
.tile.random-lit{border-color:#fff2a1!important;box-shadow:0 0 10px 5px #ffe278,inset 0 0 18px #fff6aa!important;filter:brightness(1.3)}
.tile.random-winner{animation:random-winner .25s ease-in-out infinite alternate}
@keyframes random-winner{from{filter:brightness(1.1)}to{filter:brightness(2);box-shadow:0 0 25px 10px #ffe079}}
@media(max-width:700px){.board-status{min-height:38px;font-size:11px;gap:7px}.board-status-clock{padding-left:7px;font-size:17px}.header-brand{width:210px}}

.board-status{position:relative;z-index:3;animation:board-status-land .95s cubic-bezier(.16,.8,.3,1) both;transform-origin:center center}
@keyframes board-status-land{0%{transform:translateY(180px) scale(1.5);opacity:0;box-shadow:0 0 45px #ffc94b}18%{opacity:1}42%{transform:translateY(160px) scale(1.45);box-shadow:0 0 38px #ffc94b}100%{transform:translateY(0) scale(1);opacity:1;box-shadow:none}}
@media(prefers-reduced-motion:reduce){.board-status,.tile.random-winner{animation:none}}

/* Dedicated answering countdown: never overlaps the answer buttons. */
#content.answer-layout{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:clamp(8px,1.5cqw,20px);padding:0;overflow:hidden}
#content.answer-layout>.question{width:calc(100% - clamp(105px,23%,240px) - 12px);max-width:none;max-height:100%;aspect-ratio:16/9;min-width:0;flex:0 1 auto;animation:answer-question-shift .48s cubic-bezier(.22,1,.36,1) both}
#content.answer-layout>.answer-timer-panel{width:clamp(105px,23%,240px);height:min(92%,390px);flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(6px,1.5cqh,16px);border:3px solid #dcb65d;border-radius:18px;background:radial-gradient(ellipse at 50% 20%,#244d7e,#102340 80%);box-shadow:inset 0 0 28px #dfb45c22,0 4px 20px #0006;animation:answer-timer-enter .48s cubic-bezier(.22,1,.36,1) both;min-width:0;padding:8px;text-align:center}
.answer-timer-label{font-weight:950;font-size:clamp(10px,1.3vw,21px);color:#f6d079;line-height:1.1;overflow-wrap:anywhere}
.answer-timer-ring{--answer-progress:1;width:min(88%,180px);aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at center,#112747 0 59%,transparent 60%),conic-gradient(#f3ca69 calc(var(--answer-progress)*1turn),#3c536e 0);box-shadow:0 0 22px #e9b95544;transition:background .1s linear}
.answer-timer-value{font-size:clamp(40px,6.5vw,94px);font-variant-numeric:tabular-nums;color:#fff;line-height:1}
.answer-timer-caption{font-size:clamp(10px,1.2vw,18px);font-weight:900;color:#b8cce6}
.answer-timer-panel.answer-urgent{border-color:#ffad52;box-shadow:0 0 24px #ff943c88;animation:answer-pulse .8s ease-in-out infinite}
.answer-urgent .answer-timer-ring{background:radial-gradient(circle at center,#321f30 0 59%,transparent 60%),conic-gradient(#ff9b47 calc(var(--answer-progress)*1turn),#61414c 0)}
.answer-timer-panel.answer-critical,.answer-timer-panel.answer-expired{border-color:#ff565c;background:radial-gradient(ellipse at 50% 20%,#7b2938,#2e172c 80%);box-shadow:0 0 30px #ff343c99;animation:answer-pulse .38s ease-in-out infinite}
.answer-critical .answer-timer-ring,.answer-expired .answer-timer-ring{background:radial-gradient(circle at center,#3c1c2b 0 59%,transparent 60%),conic-gradient(#ff505c calc(var(--answer-progress)*1turn),#69323e 0)}
.answer-critical .answer-timer-caption,.answer-expired .answer-timer-caption{color:#ffb4b4}
@keyframes answer-question-shift{from{transform:translateX(8%);opacity:.8}to{transform:translateX(0);opacity:1}}
@keyframes answer-timer-enter{from{transform:translateX(60%);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes answer-pulse{50%{transform:scale(1.035);filter:brightness(1.2)}}
.stage:has(.answer-timer-panel) #message{display:none}
@media(max-width:700px){#content.answer-layout>.question{width:calc(100% - 92px);font-size:clamp(15px,3vw,30px);padding:5px}#content.answer-layout>.answer-timer-panel{width:88px;padding:3px;border-width:2px;border-radius:9px;gap:5px}.answer-timer-label{font-size:10px}.answer-timer-value{font-size:35px}.answer-timer-caption{font-size:9px}}
@media(prefers-reduced-motion:reduce){#content.answer-layout>.question,#content.answer-layout>.answer-timer-panel{animation:none}.answer-timer-panel.answer-urgent,.answer-timer-panel.answer-critical{animation:none}}

/* Lobby: keep the stage uncluttered; host setup lives in the sidebar. */
body.in-lobby .header-brand{visibility:hidden;opacity:0}
.header-brand{transition:opacity .45s ease,transform .45s ease}
body:not(.in-lobby) .header-brand{animation:header-logo-arrive .55s ease both}
@keyframes header-logo-arrive{from{opacity:0;transform:translateX(-18px)}to{opacity:1;transform:translateX(0)}}
body.in-lobby #content{justify-content:center;gap:clamp(6px,1.4dvh,15px)}
body.in-lobby #content .lobby-brand{width:min(82%,650px);max-height:24dvh;flex-shrink:0;object-fit:contain;margin:0}
body.in-lobby #content h2{margin:0}
body.in-lobby #actions{display:none}
body.in-lobby .room-info{display:flex;flex-direction:column;align-items:center;gap:3px;max-width:100%}
body.in-lobby .room-info .qr{width:min(24dvh,190px);height:min(24dvh,190px);object-fit:contain}
body.in-lobby .room-info .qr[hidden]{display:none}
.join-mode-note{font-size:clamp(11px,1.5dvh,14px);color:#f3cb77;max-width:480px}
.host-setup{display:grid;gap:10px;margin-top:16px;border-top:1px solid #5a7493;padding-top:12px}
.host-setup h3{margin:0 0 2px}
.join-mode-label,.deck-upload-label{display:grid;gap:5px;font-size:13px;color:#e8bd63;font-weight:700}
.host-setup select,.host-setup input{width:100%;min-width:0;max-width:100%;font-size:13px;padding:7px;background:#eaf1fa;color:#14243a}
.host-setup button{width:100%}
@media(max-width:700px){.host-setup{gap:5px;margin-top:6px;padding-top:5px}.host-setup h3{font-size:13px}.host-setup select,.host-setup input{font-size:11px;padding:4px}}

body:has(#app[hidden]) .header-brand{visibility:hidden;opacity:0}
.join-brand{display:block;width:100%;max-height:110px;object-fit:contain}
@media(max-height:500px){#join .join-brand{max-height:48px;grid-column:1/-1}}

.bigbuzz{background:linear-gradient(#fa4552,#a70829);border:2px solid #a70c26;padding:8px 18px;min-width:min(380px,90vw);box-shadow:0 6px 18px #0008}.bigbuzz .buzz-art{display:block;width:100%;max-height:100px;object-fit:contain}.bigbuzz:active{transform:scale(.96)}

/* Lobby: join-order roster only; no scoring or buzz information. */
body.in-lobby aside>h3:first-child{font-size:clamp(15px,1.7vw,22px)}
body.in-lobby aside>h3:first-child::after{content:'Players Joined';font-size:inherit}
body.in-lobby aside>h3:nth-of-type(2),body.in-lobby aside>h3:nth-of-type(3),body.in-lobby #buzzes,body.in-lobby #pot{display:none!important}
body.in-lobby #players{max-height:45%;overflow-y:auto}
body.in-lobby #players>.lobby-player-row{display:flex;justify-content:flex-start;align-items:center;gap:12px;background:#142d4e;border-radius:7px;margin:5px 0;padding:9px 7px;border:1px solid #35516f}
.lobby-player-number{color:#e9bc63;font-size:.85em;font-variant-numeric:tabular-nums;font-weight:900}
.lobby-player-name{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lobby-player-arrive{animation:lobby-player-enter .45s ease-out both}
@keyframes lobby-player-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* Compact solid answering clock with a restrained clockwise radial sweep. */
#content.answer-layout>.answer-timer-panel{width:clamp(78px,14%,145px);height:min(72%,245px);gap:clamp(2px,.7cqh,7px);padding:5px;border-width:2px;border-radius:12px}
.answer-timer-label{font-size:clamp(9px,1vw,14px)}
.answer-timer-caption{font-size:clamp(8px,.85vw,12px)}
.answer-timer-ring{width:min(98%,125px);aspect-ratio:1;position:relative;isolation:isolate;overflow:hidden;background:conic-gradient(from 0deg,#f3cc6e calc(var(--answer-progress)*1turn),#916827 0);box-shadow:0 0 18px #f0bd5940}
.answer-timer-ring::before{content:'';position:absolute;inset:4%;border-radius:50%;background:radial-gradient(circle at 32% 24%,#ffe49b,#e5a83c 72%,#b17c26);z-index:0;opacity:.88}
.answer-timer-value{position:relative;z-index:1;font-size:clamp(40px,6.5vw,94px);line-height:1;color:#102340;letter-spacing:-.055em}
.answer-urgent .answer-timer-ring{background:conic-gradient(#ffad52 calc(var(--answer-progress)*1turn),#854626 0)}
.answer-urgent .answer-timer-ring::before{background:radial-gradient(circle at 32% 24%,#ffd27b,#e58a34 80%)}
.answer-critical .answer-timer-ring,.answer-expired .answer-timer-ring{background:conic-gradient(#ff6771 calc(var(--answer-progress)*1turn),#7e2432 0)}
.answer-critical .answer-timer-ring::before,.answer-expired .answer-timer-ring::before{background:radial-gradient(circle at 32% 24%,#ff8b91,#d83143 75%)}
.answer-critical .answer-timer-value,.answer-expired .answer-timer-value{color:#fff}
@media(max-width:700px){#content.answer-layout>.answer-timer-panel{width:72px;padding:2px;gap:3px}#content.answer-layout>.question{width:calc(100% - 76px)}.answer-timer-ring{width:65px}.answer-timer-value{font-size:40px}.answer-timer-label{font-size:9px}.answer-timer-caption{font-size:8px}}

/* Lobby sidebar: single roster title, bounded scrolling, controls pinned below. */
body.in-lobby aside{display:flex;flex-direction:column;min-height:0;overflow:hidden}
body.in-lobby aside>h3:first-child{font-size:clamp(15px,1.7vw,22px);flex:0 0 auto}
body.in-lobby aside>h3:first-child::after{content:none}
body.in-lobby aside>h3:nth-of-type(2),body.in-lobby aside>h3:nth-of-type(3){display:none!important}
body.in-lobby #players{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b78b3b #102a4b}
body.in-lobby #host{flex:0 0 auto;min-height:0;max-height:55%;overflow-y:auto}
body.in-lobby .host-setup{margin-top:8px;padding-top:10px}
body.in-lobby .host-setup h3{display:none}
.lobby-game-buttons{display:flex;gap:8px;align-items:stretch}
.lobby-game-buttons button:first-child{flex:1 1 auto;min-width:0}
.lobby-game-buttons button:last-child{flex:0 0 auto}
@media(max-width:700px){.lobby-game-buttons{gap:4px}.lobby-game-buttons button{padding:6px 4px;font-size:11px}}

/* Lobby containment correction: only roster scrolls; host actions never overflow. */
body.in-lobby #timer{display:none!important}
body.in-lobby aside{min-width:0;overflow:hidden!important}
body.in-lobby #host,body.in-lobby .host-setup,body.in-lobby .join-mode-label,body.in-lobby .deck-upload-label{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
body.in-lobby #host{overflow-x:hidden!important;overflow-y:auto;flex:0 0 auto}
body.in-lobby .host-setup{display:flex;flex-direction:column;gap:9px}
body.in-lobby .host-setup label{display:block;overflow-wrap:anywhere}
body.in-lobby .host-setup select,body.in-lobby .host-setup input[type=file]{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
body.in-lobby .lobby-game-buttons{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%;min-width:0;max-width:100%;align-items:stretch}
body.in-lobby .lobby-game-buttons button,body.in-lobby .lobby-game-buttons button:first-child,body.in-lobby .lobby-game-buttons button:last-child{display:block;min-width:0;max-width:100%;width:100%;padding:10px 3px;white-space:normal;overflow-wrap:normal;line-height:1.15;font-size:clamp(11px,1.1vw,16px);flex:none}
body.in-lobby #players{overflow-x:hidden!important}

/* Single deadline-driven timer. The active version is next to action controls;
   the passive version lives in the same top-right position for all phases. */
#timer,.board-status-clock,#spinDecision{display:none!important}
.topline{display:flex;align-items:center;justify-content:space-between;gap:10px}
.unified-timer{--sweep:360deg;display:grid;place-items:center;flex:0 0 auto;pointer-events:none;z-index:2}
.unified-timer-face{width:100%;aspect-ratio:1;display:grid;place-items:center;position:relative;border-radius:50%;isolation:isolate;background:conic-gradient(from 0deg,var(--sweep-color) 0 var(--sweep),var(--empty-color) var(--sweep) 360deg);border:3px solid var(--rim-color);box-sizing:border-box}
.unified-timer-face::before{content:'';position:absolute;inset:7%;border-radius:50%;background:var(--face-color);opacity:.45;z-index:-1}
.unified-timer-number{font-size:clamp(32px,5vw,72px);font-weight:950;line-height:1;color:var(--number-color);font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #0004}
.unified-timer.timer-passive{width:clamp(46px,5vw,66px);--sweep-color:#3b9fea;--empty-color:#17395f;--rim-color:#83caff;--face-color:#1d609d;--number-color:#fff}
.unified-timer.timer-passive .unified-timer-number{font-size:clamp(25px,2.8vw,39px)}
.unified-timer.timer-active{width:clamp(88px,10vw,136px);--sweep-color:#ffd66c;--empty-color:#a36520;--rim-color:#ffefac;--face-color:#f4bd52;--number-color:#102546;filter:drop-shadow(0 0 10px #ffb32dcc) drop-shadow(0 0 20px #fba41a88)}
.unified-timer.timer-urgent{--sweep-color:#ffae43;--empty-color:#954326;--rim-color:#ffb65e;--face-color:#e38d31;animation:unified-urgency .8s ease-in-out infinite}
.unified-timer.timer-critical{--sweep-color:#ff545f;--empty-color:#802632;--rim-color:#ff8b90;--face-color:#e73c4d;--number-color:#fff;animation:unified-urgency .42s ease-in-out infinite}
@keyframes unified-urgency{50%{filter:drop-shadow(0 0 20px #ff4e39) drop-shadow(0 0 30px #ff4e3999);transform:scale(1.055)}}
#actions:has(.unified-timer.timer-active){display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
#actions .unified-timer.timer-active{order:2}
#actions .options{flex:1 1 70%;min-width:0}
.buzz-disabled{position:relative;filter:grayscale(1);opacity:.7;cursor:not-allowed}
.buzz-disabled-overlay{position:absolute;inset:auto 5% 7%;padding:5px;background:#07182be8;color:#fff;font-weight:900;font-size:clamp(11px,1.4vw,19px);text-align:center;border-radius:6px;line-height:1.1}
@media(max-width:700px){.unified-timer.timer-active{width:clamp(72px,19vw,105px)}.unified-timer.timer-active .unified-timer-number{font-size:clamp(37px,9vw,58px)}.unified-timer.timer-passive{width:48px}}
@media(prefers-reduced-motion:reduce){.unified-timer.timer-urgent,.unified-timer.timer-critical{animation:none}}
/* The previous answer-specific panel is retired; question regains full width. */
#content.answer-layout>.question{width:100%;max-width:100%}

/* Compact integrated countdown: preserves board/grid geometry. */
.board-status{position:relative;min-height:49px;padding:4px 58px 4px 8px;flex-shrink:0}
.board-status-label{min-width:0;text-align:center;width:100%}
.board-status>.unified-timer.timer-active{position:absolute;right:5px;top:50%;transform:translateY(-50%);margin:0}
.unified-timer.timer-active{width:54px;--sweep-color:#ffd66c;filter:drop-shadow(0 0 5px #ffb32dcc) drop-shadow(0 0 9px #fba41a77)}
.unified-timer.timer-passive{width:34px}
.unified-timer.timer-active .unified-timer-number{font-size:clamp(39px,3.7vw,52px);letter-spacing:-.075em}
.unified-timer.timer-passive .unified-timer-number{font-size:clamp(25px,2.5vw,34px)}
.unified-timer-face{border-width:2px}
.unified-timer.timer-active.timer-urgent,.unified-timer.timer-active.timer-critical{animation:compact-urgency .65s ease-in-out infinite}
@keyframes compact-urgency{50%{filter:drop-shadow(0 0 9px #ff4e39) drop-shadow(0 0 14px #ff4e3999)}}
#actions .unified-timer.timer-active{order:2;flex:0 0 54px}
#actions:has(.unified-timer.timer-active){gap:5px}
@media(max-width:700px){.board-status{padding-right:49px}.unified-timer.timer-active{width:43px}.unified-timer.timer-active .unified-timer-number{font-size:39px}.unified-timer.timer-passive{width:29px}.unified-timer.timer-passive .unified-timer-number{font-size:26px}#actions .unified-timer.timer-active{flex-basis:43px}}
/* Never display ranking numerals or decorative first-place badges. */
.leader-rank,.leader-row .leader-rank,.leader-row::before{display:none!important;content:none!important}

/* Timer positioning correction: preserve stage geometry during spin decisions. */
.board-status{overflow:visible;isolation:isolate}
.board-status>.unified-timer.timer-active{width:50px;height:50px;right:5px;top:50%;transform:translateY(-50%);overflow:visible}
.board-status>.unified-timer.timer-active .unified-timer-face{width:100%;height:100%;overflow:visible;display:flex;align-items:center;justify-content:center}
.board-status>.unified-timer.timer-active .unified-timer-number{display:block;position:relative;line-height:1;text-align:center;letter-spacing:0;transform:translateY(-1px);font-variant-numeric:tabular-nums}
/* Wheel countdown is an overlay inside the right controls column, not a grid item. */
.wheel-layout .wheel-control{position:relative;min-width:0;min-height:0}
.wheel-layout .wheel-control>.unified-timer.timer-active{position:absolute;top:5%;right:8%;width:54px;height:54px;z-index:5;margin:0;flex:none}
.wheel-layout .wheel-control>.unified-timer.timer-active .unified-timer-face{height:100%;display:flex;align-items:center;justify-content:center}
.wheel-layout .wheel-control>.unified-timer.timer-active .unified-timer-number{line-height:1;letter-spacing:0;transform:translateY(-1px)}
@media(max-width:700px){.board-status>.unified-timer.timer-active{width:42px;height:42px}.wheel-layout .wheel-control>.unified-timer.timer-active{width:43px;height:43px;top:1%;right:3%}}

/* Wager and buzz/reveal clocks are stage overlays, never flex children.
   Equal center-to-edge distances: center 40px from top and right borders. */
.stage>.unified-timer.timer-corner{position:absolute;z-index:8;top:calc(40px - 27px);right:calc(40px - 27px);width:54px;height:54px;margin:0;flex:none}
.stage>.unified-timer.timer-corner.timer-passive{top:calc(40px - 17px);right:calc(40px - 17px);width:34px;height:34px}
.stage>.unified-timer.timer-corner .unified-timer-face{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.stage>.unified-timer.timer-corner .unified-timer-number{line-height:1;letter-spacing:0;transform:translateY(-1px)}
.leader-row.leader-first{box-shadow:none}

/* Compact buzz buttons for every contestant and disabled state. */
:is(#actions,.demo-buzz-controls) .bigbuzz{width:min(266px,63vw);min-width:0;max-width:100%;padding:6px 13px;border-radius:18px;flex:none}
:is(#actions,.demo-buzz-controls) .bigbuzz .buzz-art{width:100%;max-height:70px}
:is(#actions,.demo-buzz-controls) .bigbuzz.buzz-disabled:disabled{opacity:1;filter:grayscale(1);cursor:not-allowed}
:is(#actions,.demo-buzz-controls) .bigbuzz .buzz-disabled-overlay{color:#fff;opacity:1;font-size:clamp(10px,1.1vw,15px);font-weight:1000;text-shadow:0 1px 3px #000;inset:auto 2% 5%;background:#07182bf2}
/* The selected wager is the focal value on the submit button. */
.wager-submit{display:flex;justify-content:center;align-items:center;gap:10px;width:min(100%,450px);max-width:100%;white-space:nowrap}
.wager-submit-label{font-size:clamp(14px,2.4cqh,24px)}
.wager-submit-amount{font-size:clamp(17px,3.3cqh,33px);color:#fff0a5;text-shadow:0 1px 2px #6c3b00;background:#76500b88;padding:2px 10px;border-radius:30px;font-variant-numeric:tabular-nums}
.wager-submit:disabled{opacity:.55;filter:grayscale(.45)}
/* Timer center 30px from both stage edges, irrespective of diameter. */
.stage>.unified-timer.timer-corner{top:calc(30px - 27px);right:calc(30px - 27px)}
.stage>.unified-timer.timer-corner.timer-passive{top:calc(30px - 17px);right:calc(30px - 17px)}

/* Phase presentation cleanup: reclaim the top bar during gameplay. */
body.game-running{--head:0px}
body.game-running header{height:0;min-height:0;padding:0;border:0;overflow:hidden}
body.game-running main{height:100dvh}
body.game-running .topline{display:none!important}
body.game-running .stage{position:relative}
body.game-running aside{position:relative;padding-bottom:clamp(42px,6vw,80px)}
.sidebar-brand{display:none}
body.game-running .sidebar-brand{display:block;position:absolute;right:9px;bottom:9px;width:calc(100% - 18px);max-height:65px;object-fit:contain;object-position:right bottom;pointer-events:none}
/* Board timers, active or passive, live within the message band. */
.board-status{padding-right:65px;min-height:54px}
.board-status>.unified-timer{position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important}
.board-status>.unified-timer.timer-passive{width:36px;height:36px}
.board-status>.unified-timer.timer-active{width:48px;height:48px}
.board-status>.unified-timer .unified-timer-face{width:100%;height:100%;display:grid;place-items:center}
@media(max-width:700px){.board-status{padding-right:53px;min-height:42px}.board-status>.unified-timer.timer-active{width:39px;height:39px}.board-status>.unified-timer.timer-passive{width:30px;height:30px}body.game-running aside{padding-bottom:40px}}

/* Simultaneous-answer interface */
aside #battle-title,aside #buzzes{display:none}
aside.battle-active #battle-title,aside.battle-active #buzzes{display:block}
aside.battle-active #players{display:none}
aside.battle-active #sidebar-heading{color:#ffdb83;text-shadow:0 2px 2px #5a1830,0 0 14px #d38a30;letter-spacing:.09em}
#battle-title{display:none!important}
.battle-entry{display:grid;grid-template-columns:1.5em minmax(4em,1fr) auto;gap:4px 8px;align-items:center;margin:8px 0;padding:10px 8px;border-radius:10px;background:linear-gradient(115deg,#173963,#2d285b);border:1px solid #e4b657;animation:battle-in .3s ease-out}
.battle-rank{color:#ffdc89;font-weight:900}.battle-name{overflow-wrap:anywhere}.battle-wager{font-size:.85em;color:#ffdc89}.battle-time{grid-column:2;font-variant-numeric:tabular-nums;font-size:.85em}.battle-status{grid-column:3;font-size:.72em;letter-spacing:.04em}.battle-correct{border-color:#4ff09b}.battle-wrong{border-color:#ff7789}
@keyframes battle-in{from{opacity:0;transform:translateX(25px)}to{opacity:1;transform:none}}
.wager-adjustments{display:none!important}.wager-slider-wrap{position:relative;margin:55px 16px 15px}.wager-slider{width:100%;height:36px;accent-color:#ffd05d;touch-action:none}.wager-slider::-webkit-slider-thumb{width:36px;height:36px}.wager-slider-bubble{position:absolute;top:-40px;transform:translateX(-50%);padding:5px 11px;border-radius:14px;background:#ffdb76;color:#1b2342;font-size:1.2rem;font-weight:900;pointer-events:none;white-space:nowrap}.wager-submit{margin-top:12px}

/* Tiered board: blue 1x, purple 2x, magenta 3x. */
.board-tier-frame{display:flex;align-items:stretch;gap:7px;min-height:0;flex:1}
.board-tier-frame>.board{flex:1;min-width:0}
.board-tier-tabs{display:grid;grid-template-rows:repeat(5,minmax(0,1fr));gap:7px;width:clamp(38px,5vw,64px);flex:none}
.board-tier-tab{display:grid;place-items:center;font-size:clamp(18px,2.6vw,34px);font-weight:1000;color:white;border:2px solid #e9d7ff;border-radius:8px;text-shadow:0 2px 6px #120020;box-shadow:inset 0 0 14px #ffffff40}
.tier-tab-1{background:linear-gradient(#2377d4,#073a91)}
.tier-tab-2{background:linear-gradient(#9945d5,#441080)}
.tier-tab-3{background:linear-gradient(#ef4db8,#941064)}
.tile.tier-2:not(.played),.tile.tier-2:disabled:not(.played){background:linear-gradient(#8d3cc6,#401079);border-color:#bd79f1;box-shadow:inset 0 0 16px #d49aff66}
.tile.tier-3:not(.played),.tile.tier-3:disabled:not(.played){background:linear-gradient(#d638a5,#8a125e);border-color:#ff7cd6;box-shadow:inset 0 0 16px #ffa5e466}
.tile.played,.tile.played:disabled{background:#071528!important;border-color:#26374b!important;color:#536479!important;box-shadow:none!important}
.board-tier-tab{animation:tier-tab-arrive .36s cubic-bezier(.2,.8,.2,1) both}
@keyframes tier-tab-arrive{from{opacity:0;transform:translateX(-25px);filter:brightness(3)}to{opacity:1;transform:translateX(0);filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.board-tier-tab{animation:none}}
@media(max-width:700px){.board-tier-tabs{width:34px;gap:4px}.board-tier-tab{font-size:17px}}

/* Staggered battle adjudication: statuses reveal in original buzz order. */
.battle-entry.battle-revealed{animation:battle-adjudicate .42s ease-out both}
@keyframes battle-adjudicate{0%{filter:brightness(2.3);transform:translateX(12px)}100%{filter:brightness(1);transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.battle-entry.battle-revealed{animation:none}}

/* Opening board sequence: center-out blue spiral, multiplier tabs, then tier ripples. */
.tile.tier-ripple:not(.played){animation:tile-grow .28s cubic-bezier(.2,.85,.25,1) both, tier-color-flash .55s ease-out both;animation-delay:var(--build-delay,0ms),var(--ripple-delay,1.5s)}
@keyframes tier-color-flash{0%{filter:brightness(1);box-shadow:inset 0 0 14px #71baff99}30%{filter:brightness(2.25);box-shadow:inset 0 0 25px #fff,0 0 24px #fff8}100%{filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.tile.tier-ripple:not(.played){animation:none}}

/* Row-by-row magic-touch entrance and expansive grid. */
#content:has(.board-tier-frame){justify-content:flex-start;align-items:stretch}
.board-tier-frame{width:100%;flex:1 1 0;min-height:0;display:grid;grid-template-columns:clamp(28px,3.3vw,45px) minmax(0,1fr);gap:8px;align-items:stretch}
.board-tier-frame>.board{width:100%;height:100%;min-height:0;min-width:0;gap:7px}
.board-tier-frame .tile{font-size:clamp(14px,1.65vw,29px);font-weight:900;line-height:1.08;padding:4px}
.board-tier-tabs{width:100%;min-width:0;display:grid;grid-template-rows:repeat(5,minmax(0,1fr));gap:7px}
.board-tier-tab{font-size:clamp(12px,1.3vw,19px);height:42%;min-height:26px;align-self:center;border-radius:4px;border-width:1px;box-shadow:0 0 6px #ffffff55,inset 0 0 8px #ffffff33;animation:row-tab-touch .24s cubic-bezier(.2,.8,.2,1) both}
@keyframes row-tab-touch{0%{opacity:0;transform:translateX(-26px) scale(.7);filter:brightness(3)}70%{opacity:1;transform:translateX(2px) scale(1.15);filter:brightness(2.6)}100%{opacity:1;transform:translateX(0) scale(1);filter:brightness(1)}}
/* Initial spiral tiles stay blue until their tab touches the row. */
.board-tier-frame .tile.row-touch:not(.played){background:linear-gradient(#267cda,#0b408a);border-color:#3ca6f3;animation:tile-grow .28s cubic-bezier(.2,.85,.25,1) both, row-color-sweep .46s ease-out both;animation-delay:var(--build-delay,0ms),var(--touch-delay,1450ms)}
.board-tier-frame .tile.row-touch.tier-1:not(.played){--row-light:#4fb6ff;--row-dark:#0b408a;--row-border:#3ca6f3}
.board-tier-frame .tile.row-touch.tier-2:not(.played){--row-light:#a347d9;--row-dark:#46107c;--row-border:#bd79f1}
.board-tier-frame .tile.row-touch.tier-3:not(.played){--row-light:#e13db2;--row-dark:#8a125e;--row-border:#ff7cd6}
@keyframes row-color-sweep{0%{background:linear-gradient(#267cda,#0b408a);border-color:#3ca6f3;filter:brightness(1)}24%{background:linear-gradient(#a7e8ff,#4a9fe5);border-color:#fff;filter:brightness(2);box-shadow:0 0 24px #fff9}100%{background:linear-gradient(var(--row-light),var(--row-dark));border-color:var(--row-border);filter:brightness(1);box-shadow:inset 0 0 16px #ffffff44}}
@media(prefers-reduced-motion:reduce){.board-tier-frame .tile.row-touch:not(.played),.board-tier-tab{animation:none}.board-tier-frame .tile.row-touch.tier-2:not(.played){background:linear-gradient(#a347d9,#46107c)}.board-tier-frame .tile.row-touch.tier-3:not(.played){background:linear-gradient(#e13db2,#8a125e)}}
@media(max-width:700px){.board-tier-frame{grid-template-columns:26px minmax(0,1fr);gap:5px}.board-tier-frame .tile{font-size:clamp(11px,2.2vw,17px)}.board-tier-tab{font-size:12px;min-height:20px}}

/* B4: true Battleboard visibility, without the legacy Leaderboard pseudo-title. */
aside.battle-active #sidebar-heading::after{content:'Battleboard'!important}
aside.battle-active #sidebar-heading{font-size:0}
aside.battle-active #sidebar-heading::after{font-size:clamp(13px,1.6vw,20px)}
aside.battle-active #players{display:none!important}
aside.battle-active #buzzes{display:flex!important;flex-direction:column;gap:5px;max-height:calc(100% - 110px);overflow-y:auto}
aside.battle-active #buzzes>.battle-entry{display:grid;grid-template-columns:1.4em minmax(0,1fr) auto;grid-template-rows:auto auto auto;align-items:center;gap:3px 6px;padding:9px 7px;margin:2px 0;min-width:0;flex-shrink:0;animation:none;transition:border-color .2s;background:#142d50}
.battle-entry .battle-rank{grid-column:1;grid-row:1}
.battle-entry .battle-name{grid-column:2;grid-row:1;min-width:0}
.battle-entry .battle-wager{grid-column:3;grid-row:1;white-space:nowrap}
.battle-entry .battle-time{grid-column:2;grid-row:2}
.battle-entry .battle-status{grid-column:1 / 3;grid-row:3;font-size:.72em}
.battle-entry .battle-question-score{grid-column:3;grid-row:2 / 4;font-size:clamp(16px,1.7vw,24px);font-variant-numeric:tabular-nums;text-align:right;color:#c4d2e4}
.battle-entry.battle-correct .battle-question-score{color:#5bff9c}
.battle-entry.battle-wrong .battle-question-score{color:#ff7789}
aside.battle-active #buzzes>.battle-entry.battle-revealed{animation:none!important;filter:none!important}

/* B5: one-line, question-local Battleboard with stable wager/result column. */
aside.battle-active #buzzes>.battle-entry{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(45px,auto) minmax(52px,auto)!important;grid-template-rows:1fr!important;gap:6px!important;align-items:center!important;min-height:39px;padding:7px 8px!important}
aside.battle-active .battle-entry .battle-name{grid-column:1!important;grid-row:1!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
aside.battle-active .battle-entry .battle-amount{grid-column:2!important;grid-row:1!important;text-align:right;font-variant-numeric:tabular-nums;color:#fff;font-weight:800;white-space:nowrap}
aside.battle-active .battle-entry .battle-amount.battle-positive{color:#5bff9c}
aside.battle-active .battle-entry .battle-amount.battle-negative{color:#ff7789}
aside.battle-active .battle-entry .battle-time{grid-column:3!important;grid-row:1!important;text-align:right;font-variant-numeric:tabular-nums;font-size:.8em;white-space:nowrap}
aside.battle-active .battle-entry .battle-rank,aside.battle-active .battle-entry .battle-wager,aside.battle-active .battle-entry .battle-status,aside.battle-active .battle-entry .battle-question-score{display:none!important}
/* Wager control: text-width button and a 40% wider slider track. */
.wager-panel .wager-submit{width:max-content!important;max-width:100%;align-self:center;padding-inline:22px!important}
.wager-panel .wager-slider-wrap{width:min(140%,calc(100vw - 310px));max-width:calc(100vw - 310px);margin-left:0;margin-right:0;align-self:center}
.wager-panel .wager-slider{width:100%;max-width:none}
@media(max-width:700px){.wager-panel .wager-slider-wrap{width:min(140%,calc(100vw - 135px));max-width:calc(100vw - 135px)}aside.battle-active #buzzes>.battle-entry{gap:3px!important;padding:5px 3px!important;grid-template-columns:minmax(0,1fr) auto auto!important}.battle-entry .battle-name{font-size:10px}.battle-entry .battle-amount,.battle-entry .battle-time{font-size:9px!important}}

/* B6: Leaderboard adopts Battleboard's roomy, single-line contestant tiles. */
#players>.leader-row{padding:9px 12px!important;min-height:40px;gap:10px!important;margin:4px 0;border:1px solid #35516f;border-radius:7px;background:#142d50}
#players>.leader-row.leader-first{background:#203c61;box-shadow:none}
#players>.leader-row .leader-name{padding:0;min-width:0}
#players>.leader-row strong{padding:0 1px 0 4px;flex-shrink:0}
@media(max-width:700px){#players>.leader-row{padding:8px 9px!important;gap:6px!important}}

/* B7: touch-sized range thumb, with consistent cross-browser rendering. */
.wager-panel input[type="range"].wager-slider{appearance:none;-webkit-appearance:none;background:transparent;height:62px;cursor:pointer;touch-action:pan-y;padding:0;border:0;border-radius:0;accent-color:#ffd05d}
.wager-panel .wager-slider::-webkit-slider-runnable-track{height:12px;background:linear-gradient(90deg,#2768b7,#e8b74b);border:2px solid #e9d6a0;border-radius:12px}
.wager-panel .wager-slider::-moz-range-track{height:12px;background:linear-gradient(90deg,#2768b7,#e8b74b);border:2px solid #e9d6a0;border-radius:12px}
.wager-panel .wager-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:52px;height:52px;margin-top:-22px;border:4px solid #fff1bb;border-radius:50%;background:radial-gradient(circle at 34% 28%,#fff5be,#f6bd36 58%,#a86c14);box-shadow:0 3px 10px #000b,0 0 0 3px #a26e25;cursor:grab}
.wager-panel .wager-slider::-moz-range-thumb{width:46px;height:46px;border:4px solid #fff1bb;border-radius:50%;background:radial-gradient(circle at 34% 28%,#fff5be,#f6bd36 58%,#a86c14);box-shadow:0 3px 10px #000b,0 0 0 3px #a26e25;cursor:grab}
.wager-panel .wager-slider:focus-visible{outline:3px solid #fff2a0;outline-offset:5px}
/* B7: SVG titles only during active game; lobby retains Players Joined. */
body.game-running #sidebar-heading{font-size:0!important;line-height:0!important;margin:7px 0 13px;min-height:43px;display:block;background:url('/static/assets/leaderboard-title.svg') center / contain no-repeat}
body.game-running #sidebar-heading::after{content:none!important;display:none!important}
body.game-running aside.battle-active #sidebar-heading{background-image:url('/static/assets/battleboard-title.svg')}
@media(max-width:700px){body.game-running #sidebar-heading{min-height:27px;margin:6px 0 9px}.wager-panel .wager-slider::-webkit-slider-thumb{width:52px;height:52px}.wager-panel .wager-slider::-moz-range-thumb{width:46px;height:46px}}

/* B8: pixel-accurate thumb-center wager bubble, and marquee-branded titles. */
.wager-panel .wager-slider-bubble{left:26px;z-index:2;will-change:left}
body.game-running #sidebar-heading{min-height:48px;background-size:contain;position:relative}
/* B8: one-shot board-mode transition; score rows retain their own FLIP animations. */
aside{position:relative}
aside.sidebar-switching #sidebar-heading{animation:sidebar-title-arrive .52s cubic-bezier(.18,.82,.22,1) both}
aside.sidebar-switching > #players,aside.sidebar-switching > #buzzes{animation:sidebar-panel-arrive .52s cubic-bezier(.18,.82,.22,1) both}
aside.sidebar-switching::before{content:"";position:absolute;top:7px;left:5%;width:90%;height:53px;z-index:3;pointer-events:none;background:linear-gradient(95deg,transparent 0%,#fff7bb55 45%,#ffe277bb 50%,transparent 58%);animation:sidebar-sweep .52s ease-out both}
.sidebar-transition-ghost{position:absolute;z-index:2;pointer-events:none;overflow:hidden;animation:sidebar-panel-depart .52s cubic-bezier(.4,0,.8,.3) both}
.sidebar-transition-ghost #players,.sidebar-transition-ghost #buzzes{display:flex!important;flex-direction:column;max-height:none!important;overflow:hidden!important;animation:none!important}
.sidebar-transition-ghost .battle-entry{display:grid!important}
@keyframes sidebar-panel-depart{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-32px)}}
@keyframes sidebar-panel-arrive{0%{opacity:0;transform:translateX(30px)}100%{opacity:1;transform:translateX(0)}}
@keyframes sidebar-title-arrive{0%{opacity:.15;transform:scale(.92)}65%{opacity:1;transform:scale(1.055)}100%{opacity:1;transform:scale(1)}}
@keyframes sidebar-sweep{0%{opacity:0;transform:translateX(-80%)}35%{opacity:1}100%{opacity:0;transform:translateX(75%)}}
@media(prefers-reduced-motion:reduce){aside.sidebar-switching #sidebar-heading,aside.sidebar-switching #players,aside.sidebar-switching #buzzes,.sidebar-transition-ghost,aside.sidebar-switching::before{animation:none!important}}

/* B9: scoreboard context is immediately visible through distinct panel treatments. */
body.game-running aside{
 background:radial-gradient(ellipse at 52% 22%,#1451a0 0%,#0a2d66 46%,#06152f 100%);
 border:2px solid #e6b84b;
 box-shadow:inset 0 0 0 1px #478fe266,inset 0 0 32px #0b5bc322;
 transition:background-color .52s,border-color .52s,box-shadow .52s;
}
body.game-running aside.battle-active{
 background:radial-gradient(ellipse at 52% 22%,#8d1832 0%,#4b0b24 47%,#210918 100%);
 border-color:#ffc15a;
 box-shadow:inset 0 0 0 1px #ef5e7966,inset 0 0 32px #e0204429;
}
body.game-running aside #players>.leader-row{background:linear-gradient(125deg,#143d77,#0c2851);border:1px solid #3978c3}
body.game-running aside.battle-active #buzzes>.battle-entry{background:linear-gradient(120deg,#481127,#280d21);border:1px solid #b94d70}
body.game-running #sidebar-heading{height:63px;min-height:63px;margin:1px -6px 9px;background-size:100% 100%;background-position:center;}
@media(max-width:700px){body.game-running #sidebar-heading{height:34px;min-height:34px;margin:2px -3px 5px}}
/* Maintain the established game-logo position across both color contexts. */
body.game-running .sidebar-brand{z-index:1}

/* B10: center board status against the entire banner, not the timer-free space. */
.board-status{padding-left:65px}
@media(max-width:700px){.board-status{padding-left:53px}}
/* Question tier is announced before wagering; the actual wager remains unmultiplied. */
.wager-multiplier-note{align-self:center;max-width:100%;padding:7px 19px;border:2px solid #f5c45e;border-radius:12px;background:linear-gradient(110deg,#173c79,#285da2,#173c79);color:#ffe5a1;font-size:clamp(15px,2.1vw,27px);font-weight:1000;letter-spacing:.035em;text-align:center;text-shadow:0 2px 3px #0009;box-shadow:0 3px 14px #0006}

/* B11 stimulus interlude */
.stimulus-stage{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:18px;padding:25px;color:#fff;background:radial-gradient(ellipse at center,#244a7d 0%,#102544 75%);border-radius:16px}
.stimulus-heading{font-size:clamp(28px,4vw,64px);font-weight:1000;color:#ffdb70;text-shadow:0 4px 0 #8c3e13,0 7px 14px #000;letter-spacing:.02em}
.stimulus-stage p{font-size:clamp(16px,2vw,27px);margin:0}
.stimulus-award{font-size:clamp(23px,3.4vw,49px);color:#69fba2;text-shadow:0 3px 8px #001b13}

/* B12: touch-safe wager and usable phone layouts. */
#fullscreenToggle{position:fixed;left:12px;bottom:12px;z-index:30;width:44px;height:44px;padding:4px;border:2px solid #e8b94e;border-radius:12px;background:#103765e8;color:#ffda79;font-size:25px;box-shadow:0 2px 12px #0008}
body.in-lobby #fullscreenToggle{display:none}
.wager-panel .wager-slider-wrap{min-width:0;max-width:min(95%,680px);width:min(95%,680px);margin:46px auto 16px;flex:none}
.wager-panel input[type=range].wager-slider{display:block;width:100%;min-width:0;height:62px;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.wager-panel .wager-slider-bubble{top:-38px}
@media(max-width:800px){
 .wager-panel .wager-slider-wrap{width:min(92%,550px);max-width:92%;margin-top:44px}
 .wager-panel{gap:6px}
}
@media(max-width:700px) and (orientation:portrait){
 body.game-running{height:100dvh;overflow:auto;overscroll-behavior:contain}
 body.game-running main{height:auto;min-height:100dvh;display:flex;flex-direction:column;gap:10px;padding:8px}
 body.game-running .stage{flex:none;min-height:58dvh;height:auto;padding:10px;overflow:visible}
 body.game-running #content{min-height:48dvh;overflow:visible;justify-content:center;padding:20px 0 12px;container-type:normal}
 body.game-running aside{position:relative;inset:auto;right:auto;top:auto;width:100%;max-height:none;min-height:200px;flex:none;padding:12px 12px 68px;overflow:visible}
 body.game-running #sidebar-heading{height:55px;min-height:55px;margin:2px auto 12px;background-size:contain}
 body.game-running .sidebar-brand{max-width:200px;max-height:45px}
 body.game-running #players>.leader-row{font-size:16px;padding:12px!important}
 .game-announcement-title{font-size:clamp(17px,5vw,25px)}
 .game-announcement-category{font-size:clamp(24px,7vw,38px)}
 .game-announcement-detail{font-size:clamp(14px,4vw,19px)}
 .wager-panel{width:100%;gap:7px;margin-top:10px}
 .wager-panel .wager-current{font-size:clamp(42px,12vw,64px)}
 .wager-panel .wager-slider-wrap{width:calc(100% - 30px);max-width:calc(100% - 30px);margin:46px auto 18px}
 .wager-panel .wager-submit{font-size:19px;min-height:52px}
 .wager-multiplier-note{font-size:16px;padding:6px 12px}
 #fullscreenToggle{bottom:calc(12px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:900px) and (orientation:landscape){
 .wager-panel .wager-slider-wrap{width:min(90%,600px);max-width:90%;margin-top:36px}
 .wager-panel .wager-current{font-size:clamp(35px,9cqh,65px)}
 .wager-panel{gap:3px}
 .wager-panel .wager-submit{margin-top:2px;padding:6px 18px!important}
}

/* B13: phone-first stage proportions, readable controls, and safe tap targets. */
@media(max-width:700px) and (orientation:portrait){
 body.game-running main{min-width:0;width:100%;box-sizing:border-box}
 body.game-running .stage{width:100%;min-width:0;min-height:0;height:auto;box-sizing:border-box}
 body.game-running #content{width:100%;min-width:0;min-height:0;box-sizing:border-box;padding:20px 8px 24px}
 body.game-running aside{width:100%;box-sizing:border-box}
 #actions{max-width:100%;min-width:0;box-sizing:border-box}
 #actions .options{width:100%;max-width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 #actions .options button{width:100%;min-height:54px;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
 :is(#actions,.demo-buzz-controls) .bigbuzz{width:min(90%,350px);min-height:76px;touch-action:manipulation}
 .wager-panel{max-width:100%;box-sizing:border-box}
 .wager-panel .wager-slider-wrap{width:calc(100% - 64px);max-width:calc(100% - 64px);margin-top:52px;margin-bottom:28px}
 .wager-panel .wager-slider-bubble{top:-44px}
 .wager-panel input[type=range].wager-slider{width:100%;height:64px}
 .question{max-width:100%;overflow-wrap:anywhere}
}
@media(max-width:900px) and (orientation:landscape){
 body.game-running main{min-width:0}
 body.game-running .stage,body.game-running aside{min-width:0}
 #actions .options button{min-height:44px;touch-action:manipulation}
}

/* B14: intrinsic phone layouts; do not use viewport-height container units in auto-height stages. */
@media (max-width: 700px) and (orientation: portrait){
 body.game-running main{height:auto;min-height:0;padding:8px 8px 12px;gap:10px}
 body.game-running .stage{flex:0 0 auto;overflow:hidden;padding:12px;min-height:0}
 body.game-running #content{flex:0 0 auto;height:auto;min-height:0;padding:8px 0;gap:8px;container-type:inline-size}
 body.game-running #content:has(.wheel-layout){padding-top:46px}
 .wheel-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;height:auto;gap:12px;flex:none}
 .wheel-layout .wheel-canvas{width:min(82%,290px);height:auto;max-height:none;margin:auto}
 .wheel-layout .wheel-control{height:auto;width:100%;padding:0;gap:10px;overflow-wrap:normal}
 .wheel-layout .spin-pass-brand{width:120px;max-height:75px}
 .wheel-layout .wheel-status,.wheel-layout h2,.wheel-layout .spin-total{font-size:18px;line-height:1.2;margin:0;overflow-wrap:normal}
 .wheel-layout .wheel-buttons{display:grid;grid-template-columns:1fr 1fr;width:100%;max-width:320px;gap:8px}
 .wheel-layout .wheel-buttons button{min-width:0;min-height:48px;padding:8px;font-size:22px;white-space:nowrap}
 .wheel-layout .wheel-control>.unified-timer.timer-active{top:auto;bottom:100%;right:0;position:absolute}
 .wheel-layout:has(.wheel-buttons) .wheel-control>.unified-timer.timer-active{top:-42px;bottom:auto}
 .board-tier-frame{flex:none;height:auto;grid-template-columns:24px minmax(0,1fr);gap:4px}
 .board-tier-frame>.board{height:auto;grid-template-rows:repeat(5,minmax(44px,auto));gap:4px}
 .board-tier-frame .tile{font-size:clamp(9px,2.6vw,13px);padding:2px;line-height:1.12;overflow-wrap:anywhere;min-height:44px}
 .board-tier-tabs{gap:4px}.board-tier-tab{font-size:11px;min-height:22px}
 .board-status{padding:5px 40px;min-height:44px;margin:0;font-size:12px;animation:none}
 .game-announcement{gap:5px;padding-inline:26px}
 .game-announcement-title{font-size:clamp(15px,4.2vw,22px)}
 .game-announcement-category{font-size:clamp(22px,6vw,32px)}
 .game-announcement-detail{font-size:14px}
 .wager-panel{margin:0;gap:5px}.wager-label{font-size:14px}.wager-panel .wager-current{font-size:44px}
 .wager-panel .wager-submit{margin-top:5px;min-height:44px;font-size:16px;padding-block:6px}
 .wager-panel .wager-slider-wrap{width:calc(100% - 24px);max-width:calc(100% - 24px);margin:39px auto 5px}
 .wager-panel .wager-slider-bubble{top:-32px;font-size:16px;padding:3px 10px}
 .wager-multiplier-note{font-size:13px;padding:5px 9px}
 body.game-running #content .question,body.game-running #content.answer-layout>.question{width:100%;max-width:100%;max-height:none;min-height:140px;aspect-ratio:auto;font-size:clamp(20px,5.6vw,32px);padding:14px;flex:none;overflow-wrap:anywhere}
 #content.answer-layout{flex-direction:column;gap:8px}
 #actions .options{flex:1 1 100%}#actions .options button{font-size:16px;min-height:48px}
 .stage>.unified-timer.timer-corner{width:36px;top:6px;right:6px}.stage>.unified-timer.timer-corner .unified-timer-number{font-size:25px}
 body.game-running aside{min-height:0;padding:10px;overflow:hidden}
 body.game-running aside #players,body.game-running aside.battle-active #buzzes{max-height:none;overflow:visible}
 body.game-running .sidebar-brand{position:static;display:block;width:145px;max-height:40px;margin:10px 0 0 auto}
 body.game-running #sidebar-heading{height:42px;min-height:42px;margin:0 auto 8px}
 aside.battle-active .battle-entry .battle-name,aside.battle-active .battle-entry .battle-amount,aside.battle-active .battle-entry .battle-time{font-size:14px!important}
 body.game-running #fullscreenToggle{position:static;display:block;margin:0 8px 8px auto;width:38px;height:38px;font-size:20px}
}
@media (max-width: 950px) and (orientation: landscape) and (max-height: 500px){
 body.game-running main{grid-template-columns:minmax(0,1fr) minmax(120px,23%);gap:6px;padding:5px 5px 44px}
 body.game-running .stage{padding:6px}body.game-running #content{padding:0}
 .wheel-layout{grid-template-columns:minmax(0,55%) minmax(0,45%)}
 .wheel-layout .wheel-control{gap:4px;padding:0 4px;overflow-wrap:normal}
 .wheel-layout .wheel-buttons button{font-size:17px;min-height:36px;padding:4px;white-space:nowrap}
 .wheel-layout .wheel-status,.wheel-layout h2,.wheel-layout .spin-total{font-size:14px;margin:0}
 .wheel-layout .spin-pass-brand{max-height:48px}
 .board-tier-frame .tile{font-size:clamp(9px,1.6vw,14px)}
 .wager-panel .wager-slider-wrap{margin:30px auto 0}.wager-panel .wager-slider-bubble{top:-27px;font-size:14px;padding:2px 8px}
 .wager-panel input[type=range].wager-slider{height:58px}.wager-panel .wager-current{font-size:30px}
 .wager-panel .wager-submit{font-size:14px;min-height:30px}.wager-multiplier-note{font-size:12px;padding:3px 8px}
 .game-announcement-title{font-size:16px}.game-announcement-category{font-size:22px}.game-announcement-detail{font-size:12px}
 #fullscreenToggle{width:34px;height:34px;bottom:5px;left:5px;font-size:18px}
}
/* B15: approved raster artwork, mobile lobby and stable fullscreen controls. */
body.game-running #sidebar-heading{background-image:url('/static/assets/leaderboard-title.png');background-size:contain}
body.game-running aside.battle-active #sidebar-heading{background-image:url('/static/assets/battleboard-title.svg')}
#fullscreenToggle,body.in-lobby #fullscreenToggle,body.game-running #fullscreenToggle{display:grid;place-items:center;position:fixed;left:auto;right:calc(8px + env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));margin:0;width:42px;height:42px;padding:5px}
.result-positive{color:#69fba2}.result-negative{color:#ff7789}
aside.battle-active #buzzes>.battle-entry{grid-template-columns:minmax(0,1fr) auto auto!important;gap:8px!important;padding:8px!important}
aside.battle-active .battle-entry .battle-name{font-size:clamp(11px,1.5vw,16px)}
@media(max-width:700px) and (orientation:portrait){
 body.in-lobby{overflow:auto;height:auto;min-height:100dvh}
 body.in-lobby header{height:auto;min-height:36px;justify-content:center;padding:6px;font-size:12px;text-align:center}
 body.in-lobby .header-brand{display:none}
 body.in-lobby main{display:flex;flex-direction:column;height:auto;min-height:0;gap:10px;padding:8px 8px 60px}
 body.in-lobby main[hidden]{display:none}
 body.in-lobby .stage{height:auto;min-height:0;padding:14px}
 body.in-lobby #content{height:auto;min-height:0;overflow:visible;padding:8px 0;flex:none}
 body.in-lobby #content .lobby-brand{width:65%;max-height:90px}
 body.in-lobby aside{position:static;width:100%;max-height:none;height:auto;padding:12px}
 body.in-lobby #players{flex:none;max-height:35dvh}
 body.in-lobby #host{max-height:none}
 body.in-lobby .room-info .qr{width:100px;height:100px}
 body.game-running main{padding-bottom:60px}
 .wheel-intro{height:auto;gap:12px;font-size:clamp(15px,4.3vw,22px);padding:12px 0}
 .wheel-intro h2{font-size:clamp(20px,5.5vw,28px)}
 .intro-points{font-size:clamp(28px,10vw,52px);white-space:nowrap}
 .intro-risk{gap:12px;font-size:clamp(13px,4vw,19px)}
 .wheel-layout .wheel-canvas{width:min(68%,232px)}
 body.game-running #content:has(.wheel-layout){padding-top:28px}
 body.game-running .stage>.unified-timer.timer-corner,body.game-running .stage>.unified-timer.timer-corner.timer-passive{top:8px;right:8px;width:36px;height:36px}
 body.game-running #sidebar-heading{height:53px;min-height:53px;width:100%}
 #actions .options{grid-template-columns:repeat(2,minmax(0,1fr))}
 aside.battle-active .battle-entry .battle-name,aside.battle-active .battle-entry .battle-amount,aside.battle-active .battle-entry .battle-time{font-size:13px!important}
}
@media(max-width:950px) and (orientation:landscape) and (max-height:500px){aside.battle-active #buzzes>.battle-entry{gap:4px!important;padding:5px!important}aside.battle-active .battle-entry .battle-name,aside.battle-active .battle-entry .battle-amount,aside.battle-active .battle-entry .battle-time{font-size:11px!important}#fullscreenToggle,body.game-running #fullscreenToggle{width:34px;height:34px;bottom:5px;right:5px;left:auto}}
/* B17: intrinsic lobby sizing and promotional branding. */
.brand-promo{display:block;color:#e5bc65;font-size:clamp(10px,1.1vw,13px);font-weight:400;line-height:1.3;text-align:center;text-decoration:none;overflow-wrap:normal;pointer-events:auto;padding:3px 0}
.brand-promo:hover,.brand-promo:focus-visible{color:#ffda79;text-decoration:underline}
.join-brand-block,.lobby-brand-block{display:flex;flex-direction:column;align-items:center;width:100%;flex:none;min-width:0}
body.in-lobby #content .lobby-brand{width:min(82%,650px);max-height:20dvh}
.sidebar-brand-block{display:none}
body.game-running .sidebar-brand-block{display:flex;flex-direction:column;align-items:flex-end;position:absolute;right:9px;bottom:9px;width:calc(100% - 18px);z-index:2}
body.game-running .sidebar-brand-block .sidebar-brand{position:static;width:100%;margin:0;max-height:65px}
body.game-running .sidebar-brand-block .brand-promo{width:100%}
body.game-running aside{padding-bottom:clamp(80px,8vw,110px)}
@media(max-height:500px){#join .join-brand-block{grid-column:1/-1}body.game-running .sidebar-brand-block .sidebar-brand{max-height:35px}body.game-running aside{padding-bottom:70px}}
@media(max-width:700px) and (orientation:portrait){
 body.in-lobby main{flex-direction:column;align-items:stretch;min-height:0;height:auto}
 body.in-lobby .stage{flex:none;height:auto;min-height:0;overflow:visible}
 body.in-lobby #content{container-type:inline-size;flex:none;height:auto;min-height:0;overflow:visible;justify-content:flex-start;gap:10px}
 body.in-lobby #content>*{flex-shrink:0}
 body.in-lobby #content .lobby-brand{width:75%;max-height:90px}
 body.in-lobby .room-info{width:100%;height:auto;flex:none}
 body.in-lobby .room-info h2{font-size:clamp(28px,10vw,48px);line-height:1.15}
 body.in-lobby .room-info .qr{width:120px;height:120px}
 body.game-running .sidebar-brand-block{position:static;width:100%;margin-top:10px;align-items:flex-end}
 body.game-running .sidebar-brand-block .sidebar-brand{width:145px;max-height:40px}
 body.game-running .sidebar-brand-block .brand-promo{width:auto;text-align:right}
 body.game-running aside{padding-bottom:10px}
}

/* B18: preserve the complete raster title within the sidebar, including swords. */
body.game-running aside.battle-active #sidebar-heading{width:100%;max-width:100%;margin-left:auto;margin-right:auto;background-size:contain;background-position:center;background-repeat:no-repeat}

/* B23: tier colors and border-riding speed bonuses. */
.wager-multiplier-note.tier-2{background:linear-gradient(#8d3cc6,#401079);border-color:#bd79f1}
.wager-multiplier-note.tier-3{background:linear-gradient(#d638a5,#8a125e);border-color:#ff7cd6}
body.game-running aside.battle-active{overflow:visible}
aside.battle-active #buzzes{margin-left:-28px;padding-left:28px;overflow-x:hidden;overflow-y:auto}
aside.battle-active #buzzes>.battle-entry{position:relative}
.battle-speed-bonus{position:absolute;left:-30px;top:50%;transform:translateY(-50%);width:38px;height:29px;object-fit:contain;pointer-events:none;z-index:3}
aside.battle-active #buzzes>.battle-entry:has(.battle-speed-bonus){padding-left:12px!important}
@media(max-width:700px) and (orientation:portrait){aside.battle-active #buzzes{margin-left:-8px;padding-left:20px}.battle-speed-bonus{left:-22px;width:30px}}
@media(max-width:950px) and (orientation:landscape) and (max-height:500px){aside.battle-active #buzzes{margin-left:-12px;padding-left:12px}.battle-speed-bonus{left:-17px;width:25px}}

@media(min-width:701px){aside.battle-active #buzzes{margin-left:-34px;padding-left:34px}}

/* B24: transient tier bonus beside the score, without changing tile columns. */
.battle-amount-wrap{grid-column:2;grid-row:1;position:relative;display:flex;align-items:center;justify-content:flex-end;white-space:nowrap}
.battle-tier-bonus{position:absolute;right:100%;width:clamp(20px,3vw,34px);height:25px;object-fit:contain;pointer-events:none;z-index:4;filter:drop-shadow(0 0 3px #160b25)}


@media(max-aspect-ratio:3/4){
 #app{grid-template-columns:minmax(0,1fr)}
 #app>aside{position:relative;inset:auto;max-height:none;width:auto}
}
@media(min-width:701px) and (max-aspect-ratio:3/4){
 body.game-running,body.in-lobby{overflow:auto}
 body #app:not([hidden]){display:flex;flex-direction:column;height:auto}
 body #app>.stage{flex:none;min-height:55dvh}
 body #app>#hostPanel{flex:none}
 body #app>#content{container-type:inline-size}
}

body.game-running #app>aside{display:flex;flex-direction:column;padding:7px 8px 7px 12px;overflow:hidden}
body.game-running #app>aside #sidebar-heading{
 flex:none;height:clamp(30px,6dvh,62px);min-height:0;margin:0 0 4px;width:100%;
}
body.game-running #app>aside .sidebar-brand-block{
 position:static;flex:none;margin-top:auto;width:100%;padding-top:4px;
}
body.game-running #app>aside .sidebar-brand{max-height:clamp(24px,5dvh,55px)}
body.game-running #app>aside .brand-promo{font-size:10px}
body.game-running #app>aside #players,body.game-running #app>aside.battle-active #buzzes{
 flex:0 1 auto;display:grid;grid-template-columns:repeat(var(--tile-columns,1),minmax(0,1fr));
 align-content:start;gap:var(--tile-gap,3px) 8px;max-height:none;min-height:0;
 overflow:auto;margin:0;padding:2px 1px 4px;scrollbar-width:thin;
}
body.game-running #app>aside.battle-active #players{display:none}
body.game-running #app>aside.battle-active #buzzes{
 display:grid!important;column-gap:24px;padding-left:20px;margin-left:-6px;
}
body.game-running #app>aside #players>.leader-row,
body.game-running #app>aside.battle-active #buzzes>.battle-entry{
 min-height:0;min-width:0;margin:0;padding:var(--tile-pad,2px) 4px!important;
 gap:3px!important;font-size:var(--tile-size,14px);line-height:1.15;flex:none;
}
body.game-running #app>aside #players>.leader-row>strong{min-width:0;padding:0;font-size:inherit}
body.game-running #app>aside #players .leader-name,
body.game-running #app>aside.battle-active #buzzes .battle-name{
 font-size:inherit!important;white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;
}
body.game-running #app>aside.battle-active #buzzes .battle-amount,
body.game-running #app>aside.battle-active #buzzes .battle-time{font-size:inherit!important}
body.game-running #app>aside.battle-active .battle-speed-bonus{
 left:-19px;width:24px;height:min(28px,155%);
}
body.game-running #app>aside.battle-active .battle-entry:has(.battle-speed-bonus){padding-left:5px!important}
body.game-running #app>aside .leader-delta{font-size:1em;right:4px;bottom:60%}
.leader-offline .leader-name{color:#b5cbe6}
.leader-offline .leader-name::after{content:' •';color:#ffbf76}
#players,#buzzes,.wager-panel,.winner-score,.personal-result{font-variant-numeric:tabular-nums}
@media(max-width:700px) and (orientation:portrait){
 body.game-running #app>aside{padding:7px 10px}
 body.game-running #app>aside #players,body.game-running #app>aside.battle-active #buzzes{flex:none;overflow:visible}
}
@media(max-height:500px){
 body.game-running #app>aside #sidebar-heading{height:28px}
 body.game-running #app>aside .sidebar-brand-block{padding-top:0}
 body.game-running #app>aside .sidebar-brand{max-height:24px}
}

.final-cue{
 position:relative;display:grid;place-content:center;gap:8px;width:100%;height:100%;min-height:155px;
 padding:12px;overflow:hidden;isolation:isolate;border-radius:14px;
 background:radial-gradient(ellipse at 50% 55%,#40316e 0%,#161d49 52%,#080e24 90%);
}
.final-cue::before,.final-cue::after{
 content:'';position:absolute;inset:-45%;pointer-events:none;z-index:-1;
 background:conic-gradient(from 90deg,transparent 0 20%,#ffda5559 24%,transparent 27% 64%,#a7c2ff8c 69%,transparent 74%);
 animation:final-rays var(--cue-duration) var(--cue-offset) linear both;
}
.final-cue::after{background:linear-gradient(115deg,transparent 44%,#fff3aa88 50%,transparent 57%);animation-name:final-sweep}
.final-cue h2{
 margin:0;color:#ffe082;font-size:clamp(22px,min(6cqw,8dvh),70px);font-weight:1000;line-height:1.05;
 text-shadow:0 3px 0 #a3541d,0 6px 0 #542e12,0 0 22px #e8ad32;
 animation:final-title var(--cue-duration) var(--cue-offset) cubic-bezier(.2,.8,.2,1) both;
}
.final-entrance h2{font-size:clamp(34px,min(16cqw,17dvh),168px);letter-spacing:.045em}
.final-cue p{margin:8px 0 0;color:#fff5d4;font-size:clamp(14px,2.7dvh,23px)}
@keyframes final-rays{from{transform:rotate(-80deg) scale(.85)}to{transform:rotate(105deg) scale(1.35)}}
@keyframes final-sweep{0%{transform:translateX(-80%)}65%,100%{transform:translateX(80%)}}
@keyframes final-title{0%{opacity:.15;transform:scale(.35);filter:brightness(2.5)}24%{opacity:1;transform:scale(1.06)}43%,86%{transform:scale(1);opacity:1}100%{transform:scale(.98);opacity:.9}}

body.game-running #app .question-stage #content{padding:0 0 3px;gap:3px;min-height:0}
body.game-running #app .question-stage #content .question{
 position:relative;max-height:none;height:auto;max-width:100%;width:100%;aspect-ratio:auto;
 min-height:0;flex:1 1 0;padding:clamp(5px,1.2dvh,16px);
 font-size:clamp(18px,min(6cqw,8dvh),68px);overflow-wrap:anywhere;
}
.question-text{width:100%;line-height:1.12}
.question-stage .category{padding-inline:min(9%,45px);font-size:clamp(13px,3dvh,32px);flex:none;overflow-wrap:anywhere}
.question-stage #actions{min-width:0}
.question-controls{width:100%;text-align:center}
.input-status{min-height:1.3em;color:#f8dfab;font-size:clamp(12px,2dvh,16px);text-align:center}
#actions .question-controls button{touch-action:manipulation}
#actions .question-controls .options button:disabled{opacity:.58}
#actions .question-controls .options button.answer-pending{opacity:1;outline:2px solid #ffe784}
.correct-reveal{
 width:100%;min-width:0;display:grid;gap:3px;padding:5px 8px;
 border:1px solid #50ce85;border-radius:9px;background:#0d312e;text-align:center;
 animation:correct-pulse .55s ease-out both;
}
.correct-reveal h2{margin:0;color:#bdffcf;font-size:clamp(13px,2.5dvh,26px);letter-spacing:.1em}
.correct-text{color:#79ffad;font-size:clamp(19px,4dvh,40px);line-height:1.04;overflow-wrap:anywhere}
.revealed-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 4px;list-style:none;padding:0;margin:0}
.revealed-options li{
 padding:2px;border-radius:4px;background:#142b32;color:#aabbc1;line-height:1.05;
 font-size:clamp(10px,1.8dvh,15px);overflow-wrap:anywhere
}
.revealed-options .is-correct{background:#175334;color:#aeffb7;font-weight:800}
.personal-result{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 10px;font-weight:850;line-height:1.05}
.personal-result strong{font-size:clamp(21px,4.5dvh,46px)}
.personal-result span{font-size:clamp(11px,2dvh,17px)}
@keyframes correct-pulse{0%{transform:scale(.97);box-shadow:inset 0 0 25px #6bffa575}55%{transform:scale(1);box-shadow:inset 0 0 18px #6bffa54d}100%{box-shadow:none}}
@media(max-width:700px) and (orientation:portrait){
 body.game-running #app .question-stage #content .question{min-height:115px;flex:auto;font-size:clamp(19px,5.5vw,33px)}
}
@media(prefers-reduced-motion:reduce){.final-cue::before,.final-cue::after,.final-cue h2,.correct-reveal{animation:none}}

/* B27 host setup and sidebar drawer. */
#join:has(#showJoin:not([hidden])){grid-template-columns:minmax(0,1fr)}
#join #nameLimit{margin-top:-4px}
body.in-lobby.hosting #app{grid-template-rows:minmax(0,1fr) minmax(0,33dvh)}
#hostPanel{min-width:0;min-height:0;display:flex;flex-direction:column;background:#10264a;border:1px solid #bd9c54;border-radius:10px}
body.in-lobby #app>#hostPanel{grid-column:1/-1;max-height:33dvh}
.host-panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;color:#ffdb83}
.host-panel-title h2{font-size:clamp(14px,2vw,20px);margin:0}
#hostClose{padding:0 8px;font-size:22px;line-height:1.15}
#hostPanel #host{display:flex;flex-direction:column;align-items:stretch;gap:8px;flex:1;min-height:0;max-height:none;overflow:auto;padding:0 8px 8px}
#hostPanel #host button,#hostPanel #host select,#hostPanel #host input{padding:5px 7px;font-size:clamp(12px,1.8dvh,15px)}
#hostPanel .host-setup,#hostPanel .host-participation,#hostPanel .remove-player,.setup-options{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;width:auto}
#hostPanel .host-setup h3{display:none}
#hostPanel .join-mode-label,#hostPanel .deck-upload-label{width:auto;max-width:100%;margin:0}
#hostPanel .host-name{width:min(250px,100%)}
#hostPanel .host-setup button{margin:0}
#hostPanel .host-setup .pacing-control{flex:1 0 100%;order:2}
#hostToolbar{display:flex;justify-content:flex-end;gap:5px;flex:none;min-height:42px;padding-top:4px;margin-top:4px}
#hostToolbar button{padding:2px 7px;min-height:37px}
#hostGear{font-size:25px;line-height:1;min-width:41px;color:#ffe392}
#hostDrawer{position:absolute;inset:2px 2px 56px;z-index:10;overflow:hidden;pointer-events:none}
body.game-running #hostDrawer>#hostPanel{
 position:absolute;inset:0;overflow:hidden;
 transform:translateY(100%);visibility:hidden;pointer-events:none;
 transition:transform .28s ease-in-out,visibility 0s linear .28s;
}
body.game-running #hostDrawer>#hostPanel.host-panel-open{
 transform:translateY(0);visibility:visible;pointer-events:auto;
 transition:transform .28s ease-in-out,visibility 0s;
}
body.game-running.hosting #fullscreenToggle{left:7px;right:auto}
.pacing-control{min-width:0;margin:0;padding:5px;border:1px solid #557290;border-radius:6px}
.pacing-control legend{font-weight:750;color:#ffdb83}
.pacing-modes{display:flex;flex-wrap:wrap;gap:5px 14px}
.pacing-modes label{display:flex;align-items:center;gap:3px}
.pacing-note{font-size:12px;margin:4px 0}
.pacing-steps{min-width:0}
.pacing-steps input{display:block;width:100%;margin:3px 0 0;accent-color:#e9b854}
.pacing-marks{display:flex;justify-content:space-between;gap:2px;font-size:10px}
.pacing-table{width:100%;border-collapse:collapse;font-size:clamp(9px,1.25vw,13px);line-height:1.14;margin-top:4px}
.pacing-table th,.pacing-table td{text-align:center;padding:2px;overflow-wrap:anywhere}
.pacing-table th:first-child{text-align:left}
.pacing-table .selected-speed{background:#70531d;color:#fff4cf}
@media(max-width:700px) and (orientation:portrait){
 body.in-lobby.hosting #app:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 33dvh}
 body.in-lobby #app>#hostPanel{min-height:0}
 body.game-running.hosting #app>aside{min-height:clamp(245px,40dvh,400px)}
}
@media(prefers-reduced-motion:reduce){body.game-running #hostDrawer>#hostPanel,body.game-running #hostDrawer>#hostPanel.host-panel-open{transition:none}}
/* B28 host lobby split */
body.in-lobby.hosting #app:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,3fr) minmax(0,2fr);gap:8px}
body.in-lobby.hosting #app>.stage{grid-column:1;grid-row:1;min-height:0;height:auto;padding:8px}
body.in-lobby.hosting #app>aside{grid-column:1;grid-row:2;position:relative;inset:auto;width:auto;height:auto;max-height:none;padding:8px 12px}
body.in-lobby.hosting #app>#hostPanel{grid-column:2;grid-row:1/3;max-height:none;min-height:0}
body.in-lobby.hosting #content{justify-content:safe center;overflow:auto;padding:0;gap:4px}
body.in-lobby.hosting #content>*{flex-shrink:0}
body.in-lobby.hosting #content .lobby-brand{max-height:8dvh;width:min(75%,420px)}
body.in-lobby.hosting #content h2{font-size:clamp(16px,3dvh,28px)}
body.in-lobby.hosting #content .room-info h2{font-size:clamp(24px,5dvh,48px)}
body.in-lobby.hosting .room-info .qr{width:clamp(90px,19dvh,180px);height:clamp(90px,19dvh,180px)}
body.in-lobby.hosting #players{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));align-content:start;gap:4px}
body.in-lobby.hosting #players>.lobby-player-row{margin:0;padding:5px;gap:6px}
body.in-lobby.hosting #hostPanel #host{padding:0 12px 12px;overflow:hidden;gap:6px}
body.in-lobby.hosting #hostPanel .host-setup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:start;align-items:start;gap:8px;flex:1;min-height:0;overflow:auto;margin:0;padding:8px 0}
body.in-lobby.hosting #hostPanel .host-participation,body.in-lobby.hosting #hostPanel .pacing-control,body.in-lobby.hosting #hostPanel .deck-upload-label{grid-column:1/-1;width:100%;order:0}
body.in-lobby.hosting #hostPanel .host-participation .host-name,body.in-lobby.hosting #hostPanel .host-participation button{flex:1 1 140px;width:auto}
body.in-lobby.hosting #hostPanel .setup-options{display:grid;gap:5px;width:100%}
body.in-lobby.hosting #hostPanel .join-mode-label{width:100%}
body.in-lobby.hosting #hostPanel .pacing-table{font-size:clamp(11px,1.5dvh,14px)}
body.in-lobby.hosting #hostPanel .lobby-game-buttons{flex:none;padding-top:6px;padding-right:42px}
body.in-lobby.hosting #hostPanel .lobby-game-buttons button:first-child{background:linear-gradient(#308653,#195433)}
@media(max-width:700px) and (orientation:portrait),(max-aspect-ratio:3/4){
 body.in-lobby.hosting{height:auto;overflow:auto}
 body.in-lobby.hosting #app:not([hidden]){height:auto;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;padding-bottom:60px}
 body.in-lobby.hosting #app>.stage{grid-column:1;grid-row:1;min-height:0}
 body.in-lobby.hosting #app>aside{grid-column:1;grid-row:2;min-height:90px}
 body.in-lobby.hosting #app>#hostPanel{grid-column:1;grid-row:3}
 body.in-lobby.hosting #hostPanel #host,body.in-lobby.hosting #hostPanel .host-setup,body.in-lobby.hosting #content{overflow:visible}
}

/* B29 full-game estimates */
.pacing-mark{display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px;border-radius:5px;font-size:clamp(11px,1.5dvh,14px)}
.pacing-mark strong{font-size:1.15em;white-space:nowrap}
.pacing-mark.selected-speed{background:#70531d;color:#fff4cf}

/* B30: in-place style answer reveal and responsive sidebar branding. */
#actions .correct-reveal{background:none;border:0;border-radius:0;padding:0;animation:none;gap:4px}
#actions .revealed-options{gap:10px;margin:0;padding:0}
#actions .revealed-options button{opacity:.30;cursor:default;overflow-wrap:anywhere}
#actions .revealed-options button.is-correct{opacity:1;outline:2px solid #79ffad;box-shadow:0 0 16px #69ff9c;animation:answer-glow .8s ease-in-out 2 alternate}
@keyframes answer-glow{from{box-shadow:0 0 6px #69ff9c}to{box-shadow:0 0 22px #69ff9c}}
@media(prefers-reduced-motion:reduce){#actions .revealed-options button.is-correct{animation:none}}
body.game-running #app>aside #sidebar-heading{width:80%;height:auto;min-height:0;aspect-ratio:442/153;margin:0 auto 4px;background-size:contain}
body.game-running #app>aside.battle-active #sidebar-heading{aspect-ratio:680/160}
body.game-running #app>aside .sidebar-brand-block{align-items:center}
body.game-running #app>aside .sidebar-brand-block .sidebar-brand{width:80%;height:auto;max-width:none;max-height:none;object-fit:contain;object-position:center;margin:0 auto}
body.game-running #app>aside .sidebar-brand-block .brand-promo{text-align:center}


/* B31 tutorial and synchronized cues. */
body.game-running #app>aside .sidebar-brand-block .sidebar-brand{display:block;width:94%;margin-inline:auto}
body.game-running #app .stage:has(.tutorial-card) #content{
 justify-content:safe center;overflow:auto;container-type:inline-size;
}
.tutorial-card{width:min(100%,760px);padding:clamp(4px,1dvh,14px);display:grid;gap:clamp(3px,1dvh,12px);text-align:center}
.tutorial-card h2,.tutorial-card p{margin:0}
.tutorial-card h2{color:#ffe295;font-size:clamp(17px,3.7dvh,35px)}
.lesson-index,.tutorial-progress{color:#ffdc86;font-size:clamp(11px,2.2dvh,16px);font-weight:750}
.lesson-caption{font-size:clamp(12px,2.5dvh,20px);line-height:1.2;animation:lesson-pop .38s .38s both}
.lesson-scene{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.tutorial-grid{display:grid;width:100%;grid-template-columns:clamp(22px,5cqw,44px) minmax(0,1fr);gap:4px}
.tutorial-tiers,.tutorial-tiles{display:grid;gap:3px;grid-template-rows:repeat(5,minmax(0,1fr))}
.tutorial-tiles{grid-template-columns:repeat(5,minmax(0,1fr))}
.tutorial-tier,.tutorial-tile{display:grid;place-content:center;line-height:1.05;min-width:0}
.tutorial-tier{border-radius:4px;background:#193e7a;color:#fff4c7;font-weight:900;font-size:clamp(10px,2.5cqw,19px)}
.tutorial-tier-2{background:#50338a}.tutorial-tier-3{background:#8b285e}
.tutorial-tile{border-radius:5px;font-size:clamp(8px,2.2cqw,18px);padding:2px;overflow-wrap:anywhere;min-height:clamp(20px,4.9dvh,48px)}
.lesson-0 .tutorial-tile,.lesson-2 .tutorial-tile,.lesson-2 .tutorial-tier{
 animation:lesson-pop .4s var(--step-delay,0ms) both
}
.lesson-buzz{width:clamp(80px,25cqw,220px);height:auto;animation:lesson-pop .38s both}
.lesson-math{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 8px}
.lesson-math strong{padding:3px 6px;border-radius:6px;background:#243c75;color:#ffdb7c;animation:lesson-pop .4s .25s both}
.lesson-math strong:last-child{background:#5a256f;animation-delay:.5s}
.lesson-number{font-size:clamp(25px,9dvh,70px);color:#ffda74;animation:lesson-pop .4s both}
.lesson-meter{width:min(74%,350px);height:14px;border:1px solid #dbac57;border-radius:9px;overflow:hidden}
.lesson-meter span{display:block;height:100%;background:linear-gradient(90deg,#ba7434,#ffe392);transform-origin:left;animation:lesson-fill .7s both}
.tutorial-nav{display:flex;justify-content:center;flex-wrap:wrap;gap:5px}
#actions .tutorial-nav button,#actions .tutorial-skip{font-size:clamp(12px,2.2dvh,16px);padding:5px 8px}
@keyframes lesson-pop{from{opacity:0;transform:scale(.76)}to{opacity:1;transform:scale(1)}}
@keyframes lesson-fill{from{transform:scaleX(.1)}to{transform:scaleX(1)}}
.game-entrance h2{font-size:clamp(29px,min(13cqw,17dvh),138px)}
.question-countdown{
 display:grid;place-content:center;min-height:160px;width:100%;height:100%;overflow:hidden;
 border-radius:14px;background:radial-gradient(ellipse,#41407e,#142b59 55%,#09142d 85%);
}
.countdown-digit{font-size:clamp(85px,min(36cqw,53dvh),360px);line-height:.95;font-weight:1000;color:#ffe291;
 text-shadow:0 .035em #a35727,0 .065em #572a14,0 0 .18em #f1b958
}
.question-countdown p{margin:6px;color:#fff3c7;font-size:clamp(15px,3.6dvh,28px);font-weight:750}
@media(prefers-reduced-motion:reduce){.tutorial-card *{animation:none!important}}

/* B31b tutorial callouts and fixed navigation. */
body.game-running #app .tutorial-stage #content{
 flex:1 1 0;min-height:0;overflow:auto;justify-content:safe center;
}
.tutorial-stage #actions{
 display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;
 flex:none;gap:5px;padding:5px 0 2px;
}
.tutorial-stage #message:empty{display:none}
.tutorial-stage .tutorial-nav{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,450px);
}
.tutorial-stage .tutorial-skip{justify-self:center}
.tutorial-progress{grid-column:1 / -1;text-align:center;margin-top:3px}
.tutorial-card{gap:clamp(4px,1dvh,12px);padding-inline:clamp(7px,2cqw,18px)}
.lesson-callout{
 margin:clamp(10px,2dvh,22px) auto 1px;padding:clamp(9px,2dvh,18px);
 width:min(100%,660px);border:1px solid #d9ac5e;border-inline-start:4px solid #ffdc82;
 border-radius:10px;background:linear-gradient(130deg,#1c3c68,#112641);
 box-shadow:0 4px 12px #0614287a;animation:lesson-callout-in .36s var(--callout-delay) both;
}
.lesson-callout .lesson-caption{font-size:clamp(16px,3dvh,23px);line-height:1.25;animation:none;color:#fff8e7}
@keyframes lesson-callout-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.tutorial-wager{width:min(100%,485px);margin:0;padding:0;gap:3px}
.tutorial-wager .wager-slider-wrap{margin:35px auto 0}
.tutorial-wager .wager-slider{pointer-events:none;height:52px!important}
.tutorial-wager .wager-slider-bubble{top:-29px;font-size:15px}
.tutorial-wager .wager-submit{margin:0}
.demo-balance{color:#ffe187;font-size:clamp(15px,3dvh,22px);font-weight:850}
.demo-placed{min-height:1.2em;color:#acffd8;font-size:14px}
.demo-buzz-controls{position:relative;display:grid;justify-items:center}
.demo-buzz-status{position:absolute;right:0;bottom:0;font-size:clamp(10px,1.8dvh,14px);color:#aaffc3}
.demo-question{
 position:relative;overflow:hidden;width:min(100%,560px);
 padding:clamp(8px,2dvh,20px);border:1px solid #4c79b6;border-radius:8px;background:#112958;
 font-size:clamp(15px,3.2dvh,24px);font-weight:800;
}
.demo-reveal-cover{
 position:absolute;inset:0;background:repeating-linear-gradient(116deg,#2063a3 0 28px,#337dbb 28px 58px,#1b5797 58px 83px);
 animation:demo-uncover 1.18s steps(6,end) both;
}
.demo-buzzed .demo-reveal-cover{animation-play-state:paused}
.demo-buzzed .bigbuzz{outline:2px solid #ffdb82}
.lesson-math strong,.lesson-math strong:last-child{animation-delay:var(--math-delay,.5s)}
@keyframes demo-uncover{from{clip-path:inset(0 0 0 0)}to{clip-path:inset(0 0 0 100%)}}
@media(max-width:700px) and (orientation:portrait){
 body.game-running #app .stage.tutorial-stage{height:calc(100dvh - 16px)}
 .demo-buzz-status{position:static;min-height:1.1em}
 .demo-buzz-controls .bigbuzz{min-height:0}
}
@media(max-height:510px) and (orientation:landscape){
 .lesson-callout{margin-top:6px;padding:6px}
 .lesson-callout .lesson-caption{font-size:15px}
 .demo-buzz-controls .bigbuzz .buzz-art{max-height:37px}
}
@media(prefers-reduced-motion:reduce){.demo-reveal-cover{display:none}}


/* B31c premiere. The scene can scroll independently of the fixed lesson controls. */
body.in-tutorial #app>aside #players,body.in-tutorial #app>aside #sidebar-heading{display:none!important}
body.in-tutorial #app>aside{background:radial-gradient(ellipse at top,#254d92,#0a1738 65%);padding-top:clamp(10px,2.4dvh,24px)}
#tutorialSidebar{display:flex;flex-direction:column;gap:clamp(8px,2dvh,20px);min-height:0;overflow:auto}
#tutorialSidebarTitle{margin:0;text-align:center;color:#ffdf85;font-size:clamp(14px,1.7vw,24px);font-weight:950;text-transform:uppercase;letter-spacing:.06em}
#tutorialSidebarTitle::after{content:none}
.tutorial-stages{display:grid;gap:clamp(4px,1.1dvh,13px);list-style:none;margin:0;padding:2px 4px 9px}
.tutorial-stages li{
 display:grid;grid-template-columns:1.7em minmax(0,1fr);align-items:center;gap:6px;
 border:1px solid #5676ab65;border-radius:8px;padding:clamp(4px,1.1dvh,10px) 6px;
 font-size:clamp(11px,1.45vw,18px);font-weight:800;color:#ccd9ee;background:#101f45;
}
.tutorial-stages .sidebar-step{display:grid;place-items:center;width:1.6em;height:1.6em;border-radius:50%;background:#263e72}
.tutorial-stages .lesson-current{border-color:#eec766;background:#4b3a3c;color:#ffedb7;box-shadow:0 0 12px #ffd87535;animation:lesson-indicator .42s ease-out}
.tutorial-stages .lesson-current .sidebar-step{background:#ffe08a;color:#241a22}
.tutorial-stages .lesson-done{color:#b0eddb;border-color:#6ee5bc50}
.tutorial-stages .lesson-done .sidebar-step{background:#214b56}
@keyframes lesson-indicator{from{box-shadow:0 0 1px #ffe6a0}45%{box-shadow:0 0 16px #ffc758ad}to{box-shadow:0 0 12px #ffd87535}}
body.game-running #app .tutorial-stage{
 isolation:isolate;position:relative;
 background:radial-gradient(ellipse at 50% 42%,#31568f 0%,#192855 41%,#0b142f 79%);
 border-color:#e8bd63;
}
.tutorial-stage::before{
 content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:conic-gradient(from 34deg at 50% 75%,transparent 0 28%,#8177d52c 34%,transparent 40% 72%,#f8d38b22 78%,transparent 85%);
}
body.game-running #app .tutorial-stage #content{justify-content:safe center;align-items:center;padding:2px 0 4px}
.tutorial-stage .tutorial-card{width:min(100%,1220px);gap:clamp(4px,1dvh,12px);padding:3px clamp(4px,2cqw,28px);animation:premiere-in .38s ease-out both}
@keyframes premiere-in{from{opacity:.45;transform:translateY(9px)}to{opacity:1;transform:none}}
.tutorial-card h2{
 font-size:clamp(26px,min(5.3cqw,8dvh),64px);line-height:1.04;
 font-weight:1000;text-transform:uppercase;letter-spacing:-.026em;text-wrap:balance;color:#ffe79b;
 text-shadow:0 .045em #a45822,0 .082em #462233,0 .12em .22em #080c24;
}
.tutorial-card:has(.lesson-2) h2{font-size:clamp(23px,min(4.9cqw,7dvh),56px)}
.tutorial-card .lesson-index{color:#ffe3a3;letter-spacing:.15em;text-transform:uppercase}
.tutorial-card .lesson-scene{gap:clamp(3px,.8dvh,9px)}
.tutorial-stage .lesson-callout{
 width:min(100%,1000px);margin:clamp(4px,1dvh,12px) auto 0;
 text-align:center;border:0;border-block-start:1px solid #e2b866a3;border-radius:0;
 padding:clamp(6px,1dvh,12px) 6px 2px;background:none;box-shadow:none;
}
.lesson-callout>strong{display:block;color:#ffe38e;font-size:clamp(16px,2.8dvh,25px);line-height:1.15}
.tutorial-stage .lesson-callout .lesson-caption{font-size:clamp(15px,3.2dvh,28px);line-height:1.14;margin-top:3px}
.tutorial-stage .tutorial-nav{width:min(100%,590px);grid-template-columns:1fr .8fr 1.65fr}
#actions .tutorial-nav button{min-height:clamp(32px,5.8dvh,58px);font-size:clamp(13px,2.4dvh,21px)}
#actions .tutorial-nav :is(.tutorial-next,.tutorial-ready){color:#21182e;background:linear-gradient(#fff2ac,#e8a945);box-shadow:0 0 16px #ffca7255;font-weight:950}
#actions .tutorial-nav .tutorial-ready{font-size:clamp(15px,2.9dvh,26px)}
#actions .tutorial-nav button:not(.gold){background:#142957;border-color:#6782ac;color:#e0eaf9}
.premiere-board{width:min(100%,980px);height:clamp(155px,42dvh,440px);flex:none}
.lesson-2 .premiere-board{height:clamp(115px,23dvh,240px)}
.premiere-board .tile{display:grid;place-content:center;overflow-wrap:anywhere;text-wrap:balance;font-size:clamp(10px,2.05cqw,26px);min-height:0}
.premiere-board .lesson-scan{border-color:#fff3af!important;box-shadow:0 0 13px #ffeb91a0!important;filter:brightness(1.3)}
.premiere-board .lesson-selected{
 position:relative;z-index:2;border-color:#fff3af!important;box-shadow:0 0 14px #ffe188c4!important;
 animation:premiere-pick .55s ease-out both;
}
@keyframes premiere-pick{0%{transform:none}43%{transform:scale(1.10)}100%{transform:none}}
.premiere-kicker,.premiere-category,.premiere-ranks{color:#ffdf8a;font-weight:850}
.premiere-category{font-size:clamp(19px,4.8dvh,41px);text-shadow:0 2px 4px #08132b;text-wrap:balance}
.tutorial-wager .demo-balance{display:grid;justify-items:center;gap:1px}
.demo-balance>span{font-size:clamp(11px,1.8dvh,16px);text-transform:uppercase;letter-spacing:.12em}
.demo-balance>strong{font-size:clamp(28px,7.2dvh,64px);line-height:1;font-variant-numeric:tabular-nums}
.tutorial-wager .wager-slider-wrap{margin-top:30px}
.tutorial-wager .wager-submit{min-height:35px}
.premiere-final{font-size:clamp(23px,7.2dvh,60px);text-transform:uppercase;font-weight:1000;color:#ffe391;text-shadow:0 3px #a54d2e,0 0 15px #ffb84b88;animation:premiere-pick .5s ease-out both}
.final-potential{min-height:1.1em;font-size:clamp(17px,3.7dvh,33px);font-weight:950;color:#80ffb2;opacity:0}
.final-potential.potential-visible{opacity:1}
.tier-awards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(100%,650px)}
.tier-award{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;padding:3px 8px;border:1px solid #a5b1db75;border-radius:8px;font-weight:900;opacity:.58}
.tier-award strong{font-size:clamp(17px,4.6dvh,40px);opacity:0;font-variant-numeric:tabular-nums}
.tier-award-visible,.tier-award-visible strong{opacity:1}
.tier-award-hit strong{color:#dbffe3}
.tier-award.tier-3.tier-award-hit{box-shadow:0 0 20px #ff50c18c;animation:premiere-pick .5s ease-out both}
.premiere-board .lesson-active-tier{filter:brightness(1.24);box-shadow:inset 0 0 14px #fff0b25a}
.demo-buzz-controls .bigbuzz{min-height:0}
.demo-buzz-controls .bigbuzz .buzz-art{max-height:clamp(25px,6.6dvh,62px)}
.demo-choices{width:min(100%,690px);grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;visibility:hidden}
.demo-choices.options-arrived{visibility:visible}
.demo-choices button{min-height:30px;padding:4px;font-size:clamp(11px,2dvh,19px)}
.demo-choices.demo-correct button{opacity:.3}
.demo-choices.demo-correct button.is-correct{opacity:1;outline:2px solid #79ffad;box-shadow:0 0 16px #69ff9c;animation:answer-glow .8s ease-in-out 2 alternate}
.premiere-demo-result{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 10px;visibility:hidden;color:#abffc8;font-weight:900}
.demo-show-result{visibility:visible}
.premiere-equation{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;color:#ffe49a;font-size:clamp(14px,3.2dvh,26px)}
.premiere-win{font-size:clamp(22px,4.6dvh,46px);font-variant-numeric:tabular-nums;line-height:1}
.premiere-ranks{font-size:clamp(10px,1.8dvh,15px)}
.fairness-lane{width:min(100%,980px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(5px,2cqw,18px)}
.fairness-device{position:relative;display:grid;justify-items:center;align-items:center;gap:5px;min-width:0;padding:clamp(5px,1dvh,12px);border:2px solid #6387ce;border-radius:13px;background:linear-gradient(#213a74,#111d49)}
.fairness-device h3{margin:0;font-size:clamp(13px,2.7dvh,22px);color:#ffe69b}
.fairness-device .demo-question,.fairness-waiting{grid-column:1;grid-row:2;align-self:stretch;width:100%}
.fairness-device .demo-question{visibility:hidden;display:grid;place-content:center;min-height:62px;padding:5px}
.fairness-device.device-revealing .demo-question{visibility:visible}
.fairness-device.device-revealing .fairness-waiting{visibility:hidden}
.fairness-waiting{display:grid;place-content:center;color:#b7c9eb;font-size:clamp(11px,2dvh,15px)}
.fairness-clock,.fairness-result{font-size:clamp(19px,5dvh,52px);font-weight:950;color:#ffe38a;font-variant-numeric:tabular-nums}
.fairness-device.device-reported{border-color:#79edb0}
.device-reported .fairness-clock,.fairness-result{color:#a2ffc4}
.fairness-result{visibility:hidden;font-size:clamp(15px,3dvh,27px)}
.fairness-result.fairness-match{visibility:visible;animation:premiere-pick .5s ease-out both}
@media(max-width:700px) and (orientation:portrait){
 .premiere-board{height:auto}
 .premiere-board>.board{grid-template-rows:repeat(5,minmax(32px,auto))}
 .premiere-board .tile{min-height:32px}
 .tutorial-stages{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-height:520px) and (orientation:landscape){
 .tutorial-card h2{font-size:clamp(22px,7dvh,40px)}
 .tutorial-stage .lesson-callout .lesson-caption{font-size:15px}
 .tutorial-sidebar-title{font-size:13px}
 .tutorial-stage #actions{gap:2px}
 #actions .tutorial-nav button{min-height:30px}
}
@media(prefers-reduced-motion:reduce){.tutorial-sidebar-title,.tutorial-stages *{animation:none!important}}

/* Keep the final's wager, outcome and reading space in the same desktop view. */
.tutorial-card:has(.lesson-5){gap:5px}
.tutorial-card .lesson-5{gap:2px}
.lesson-5 .premiere-final{font-size:clamp(20px,5.2dvh,48px);line-height:1}
.lesson-5 .premiere-category{font-size:clamp(16px,3.5dvh,32px);line-height:1.12}
.lesson-5 .demo-balance>strong{font-size:clamp(25px,5.6dvh,50px)}
.lesson-5 .wager-slider-wrap{margin-top:27px}
.lesson-5 .wager-slider{height:44px!important}
.lesson-5 .final-potential{font-size:clamp(16px,3.1dvh,28px)}


/* B31d: caption and controls take their intrinsic space first. Demonstrations fill the rest. */
.join-url[href]{color:#ffe194;text-decoration:underline;text-underline-offset:2px}
.tier-comparison{width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,7fr) minmax(0,3fr);align-items:stretch;gap:clamp(8px,1.3cqw,18px)}
.tier-comparison .premiere-board{height:100%;min-height:0}
.tier-comparison .tier-awards{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));width:auto;gap:clamp(4px,1dvh,10px)}
.tier-comparison .tier-award{padding:3px clamp(4px,1cqw,14px);background:#173c78}
.tier-comparison .tier-award.tier-2{background:#51277e}
.tier-comparison .tier-award.tier-3{background:#832263}
.tier-comparison .tier-award span{font-size:clamp(15px,2.9dvh,30px);color:#fff0b3}
.tier-comparison .tier-award strong{text-align:right;font-size:clamp(20px,min(4.6cqw,6.5dvh),66px)}
.lesson-2 .board-tier-tab.tier-tab-1{background:#2269ba}
.lesson-2 .board-tier-tab.tier-tab-2{background:#663697}
.lesson-2 .board-tier-tab.tier-tab-3{background:#a12a77}
.lesson-2 .premiere-kicker{font-size:clamp(17px,3.1dvh,28px);text-transform:uppercase}
.tutorial-card .lesson-3{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);align-items:center;gap:clamp(8px,2cqw,24px);width:100%}
.buzz-demo-left{min-width:0;display:grid;justify-items:center;gap:clamp(4px,1dvh,10px)}
.buzz-demo-left .demo-question{width:100%}
.buzz-demo-left .demo-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
.buzz-demo-left .demo-answer-tapped{opacity:1;outline:2px solid #ffe295}
.lesson-3 .premiere-demo-result{display:grid;justify-items:center;gap:clamp(4px,1dvh,10px)}
.lesson-3 .premiere-equation{
 --factor-size:clamp(28px,min(5.4cqw,7dvh),72px);
 position:relative;display:grid;grid-template-columns:1fr 1fr;gap:4px 18px;width:100%;text-align:center
}
.lesson-3 .premiere-equation::before{
 content:'×';position:absolute;left:calc(50% - 4px);top:calc(var(--factor-size) / 2 + 4px);
 transform:translate(-50%,-50%);color:#fff;font:400 clamp(29px,5.7dvh,47px)/1 Arial,sans-serif;
 pointer-events:none
}
.demo-show-result .premiere-equation::before{animation:operator-in .16s .18s both}
@keyframes operator-in{from{opacity:0}to{opacity:1}}
.demo-factor{position:relative;display:grid;justify-items:center;line-height:1;opacity:0}
.demo-factor>strong{font-size:var(--factor-size);font-variant-numeric:tabular-nums}
.demo-factor>span{margin-top:3px;font-size:clamp(11px,2.1dvh,20px);text-transform:uppercase}
.difficulty-factor{color:#eac2ff}.speed-factor{color:#ffe182}
.combined-factor{grid-column:1/-1;color:#ffe99d;text-shadow:0 0 17px #ffce64ae}
.combined-factor>strong{font-size:clamp(38px,min(7cqw,10dvh),112px)}
.combined-factor>strong::before{content:'= ';font-size:.56em}
.demo-show-result .demo-factor{animation:lesson-pop .36s both}
.demo-show-result .speed-factor{animation-delay:.18s}
.demo-show-result .combined-factor{animation-delay:.47s}
.premiere-prize{display:grid;justify-items:center;line-height:.99;color:#a5ffc5;text-shadow:0 0 15px #59ff9b66}
.premiere-prize .premiere-win{font-size:clamp(35px,min(7cqw,11dvh),114px)}
.demo-show-result .premiere-prize{animation:lesson-pop .35s .64s both}
body.in-lobby .join-url{display:block}
@media(min-width:701px){
 body.game-running #app .stage.tutorial-stage #content{
  container-type:size;display:grid;grid-template: minmax(0,1fr) / minmax(0,1fr);
  align-items:stretch;justify-items:center;justify-content:normal
 }
 .tutorial-stage .tutorial-card:has(.lesson-scene){
  min-height:0;height:100%;grid-template-rows:auto auto minmax(0,1fr) auto;align-content:stretch;
  gap:clamp(4px,1.25cqh,11px);padding-block:clamp(8px,2.5cqh,22px)
 }
 .tutorial-stage .tutorial-card:not(:has(.lesson-scene)){align-self:center}
 .tutorial-stage .tutorial-card h2,.tutorial-stage .tutorial-card:has(.lesson-2) h2{
  font-size:clamp(28px,min(5.3cqw,9.2cqh),64px)
 }
 .tutorial-stage .lesson-callout{margin:0 auto;padding-block:clamp(4px,1.1cqh,9px)}
 .tutorial-stage .lesson-callout>strong{font-size:clamp(15px,3.7cqh,25px)}
 .tutorial-stage .lesson-callout .lesson-caption{font-size:clamp(16px,3.85cqh,28px)}
 .tutorial-stage .lesson-scene{min-height:0;align-self:stretch;container-type:size}
 .tutorial-stage .lesson-0 .premiere-board{height:min(96cqh,445px)}
 .tutorial-stage .lesson-2 .tier-comparison{height:min(82cqh,365px)}
 .tutorial-stage .premiere-board .tile{font-size:clamp(11px,min(2cqw,6.6cqh),26px)}
 .tutorial-stage .lesson-2 .premiere-board .tile{font-size:clamp(10px,min(1.55cqw,6.2cqh),21px)}
 .tutorial-stage .lesson-1,.tutorial-stage .lesson-5{gap:clamp(1px,1cqh,7px)}
 .tutorial-stage .premiere-final{font-size:clamp(23px,11cqh,52px)}
 .tutorial-stage .premiere-category{font-size:clamp(17px,9cqh,40px);line-height:1.05}
 .tutorial-stage .demo-balance>strong{font-size:clamp(26px,14cqh,63px)}
 .tutorial-stage .tutorial-wager .wager-slider-wrap{margin-block-start:clamp(20px,8cqh,33px)}
 .tutorial-stage .tutorial-wager .wager-slider{height:clamp(37px,13cqh,55px)!important}
 .tutorial-stage .tutorial-wager .wager-submit{min-height:0;padding-block:clamp(3px,1.8cqh,10px)}
 .tutorial-stage .final-potential{font-size:clamp(17px,7.5cqh,31px)}
 .buzz-demo-left{gap:clamp(4px,2cqh,12px)}
 .buzz-demo-left .demo-question{font-size:clamp(14px,8cqh,24px);padding:clamp(5px,4cqh,18px)}
 .buzz-demo-left .bigbuzz .buzz-art{max-height:clamp(28px,20cqh,68px)}
 .buzz-demo-left .demo-choices button{min-height:0;font-size:clamp(12px,6.5cqh,20px)}
 .combined-factor>strong{font-size:clamp(35px,33cqh,104px)}
 .premiere-prize .premiere-win{font-size:clamp(38px,36cqh,112px)}
}
@media(max-width:700px) and (orientation:portrait){
 .tier-comparison{grid-template-columns:minmax(0,1fr)}
 .tier-comparison .tier-awards{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto}
 .tier-comparison .tier-award{padding-inline:3px;gap:1px}
 .tier-comparison .tier-award span{font-size:13px}
 .tutorial-card .lesson-3{grid-template-columns:minmax(0,1fr)}
 .lesson-3 .premiere-equation{grid-template-columns:repeat(3,minmax(0,1fr))}
 .lesson-3 .premiere-equation::before{left:calc(100% / 3 - 3px)}
 .lesson-3 .combined-factor{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){
 .demo-show-result .demo-factor,.demo-show-result .premiere-prize,.demo-show-result .premiere-equation::before{animation:none;opacity:1}
}

@media(min-width:701px){
 #actions .tutorial-nav button{height:clamp(32px,5.8dvh,58px);padding-block:3px}
 .lesson-3 .premiere-demo-result{gap:clamp(3px,2cqh,8px)}
 .lesson-3 .premiere-equation{row-gap:clamp(2px,1.5cqh,6px)}
 .lesson-3 .premiere-equation{--factor-size:clamp(25px,20cqh,72px)}
 .demo-factor>span,.premiere-prize>span{font-size:clamp(10px,5cqh,18px)}
 .combined-factor>strong{font-size:clamp(33px,27cqh,104px)}
 .premiere-prize .premiere-win{font-size:clamp(35px,30cqh,112px)}
}

/* B31e: preserve the wager bubble's top inset as the amount animates. */
.lesson-callout .lesson-next-pick{margin-top:clamp(4px,1cqh,9px)}
.tutorial-stage .lesson-1 .tutorial-wager .wager-slider-wrap{margin-block-start:calc(29px + clamp(10px,2.8cqh,18px))}
.tutorial-stage .lesson-3 .buzz-demo-left .demo-choices button{
 min-height:clamp(35px,6dvh,52px);
 font-size:clamp(13px,2.5dvh,22px);
}


@keyframes compact-tutorial-fade{from{opacity:0}to{opacity:1}}

/* The compact layout reserves space for the caption and touch controls first. */
@media (orientation:landscape) and (max-height:550px){
 body.game-running.in-tutorial #app:not([hidden]){
  height:100dvh;min-height:0;display:grid;
  grid-template-columns:minmax(0,1fr) clamp(118px,20vw,202px);
  grid-template-rows:minmax(0,1fr);gap:5px;padding:4px;
 }
 body.game-running #app .stage.tutorial-stage{height:100%;min-height:0;padding:4px 7px}
 .tutorial-stage>.topline{display:none}
 body.game-running #app .stage.tutorial-stage #content{
  container-type:size;display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);
  align-items:stretch;justify-items:stretch;justify-content:normal;padding:0 0 2px
 }
 .tutorial-stage .tutorial-card:has(.lesson-scene){
  width:100%;height:100%;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto;
  gap:clamp(2px,1.25cqh,7px);padding:2px 5px
 }
 .tutorial-stage .tutorial-card:not(:has(.lesson-scene)){align-self:center}
 .tutorial-stage .tutorial-card h2,.tutorial-stage .tutorial-card:has(.lesson-2) h2{
  font-size:clamp(17px,min(4.7cqw,10cqh),36px);line-height:1.02
 }
 .tutorial-stage .lesson-index{font-size:clamp(8px,4.2cqh,12px);line-height:1}
 .tutorial-stage .lesson-callout{margin:0 auto;padding:2px 1px 0;max-width:100%}
 .tutorial-stage .tutorial-card,.tutorial-stage .lesson-callout{animation-name:compact-tutorial-fade}
 .tutorial-stage .lesson-callout{transform:none}
 .tutorial-stage .lesson-callout>strong,.tutorial-stage .lesson-callout .lesson-caption{
  font-size:clamp(10px,min(2.45cqw,5.8cqh),19px);line-height:1.1;margin-top:2px
 }
 .tutorial-stage .lesson-callout .lesson-next-pick{margin-top:2px}
 .tutorial-stage .lesson-scene{min-height:0;align-self:stretch;container-type:size;gap:clamp(2px,2cqh,6px)}
 .tutorial-stage .premiere-board{height:100%;min-height:0;grid-template-columns:23px minmax(0,1fr);gap:3px}
 .tutorial-stage .premiere-board>.board,.tutorial-stage .premiere-board>.board-tier-tabs{gap:2px;min-height:0}
 .tutorial-stage .premiere-board .tile,.tutorial-stage .premiere-board .board-tier-tab{
  min-height:0;padding:0 1px;border-width:1px;border-radius:4px;
  font-size:clamp(8px,min(2.4cqw,11cqh),16px);line-height:1
 }
 .tutorial-stage .lesson-0 .premiere-board{height:min(93cqh,260px)}
 .tutorial-stage .lesson-2 .tier-comparison{height:min(81cqh,255px)}
 .tutorial-stage .lesson-2 .premiere-kicker{font-size:clamp(10px,10cqh,17px);line-height:1}
 .tutorial-stage .tier-comparison .tier-awards{gap:3px}
 .tutorial-stage .tier-comparison .tier-award{gap:3px;padding:2px 5px}
 .tutorial-stage .tier-comparison .tier-award span{font-size:clamp(10px,9cqh,17px)}
 .tutorial-stage .tier-comparison .tier-award strong{font-size:clamp(14px,15.5cqh,31px);line-height:1}
 .tutorial-stage .premiere-category{font-size:clamp(13px,13cqh,26px);line-height:1.04}
 .tutorial-stage .tutorial-wager{
  width:min(96%,500px);display:grid;grid-template-columns:minmax(54px,1fr) minmax(0,3fr);
  grid-template-rows:auto auto auto;column-gap:clamp(8px,2cqw,18px);row-gap:2px;
  align-items:center;justify-items:center
 }
 .tutorial-stage .demo-balance{grid-area:1 / 1 / 4 / 2}
 .tutorial-stage .demo-balance>strong{font-size:clamp(20px,22cqh,43px)}
 .tutorial-stage .demo-balance>span{font-size:clamp(9px,7.5cqh,14px)}
 .tutorial-stage .lesson-scene .tutorial-wager .wager-slider-wrap{
  grid-area:1 / 2;width:100%;max-width:none;margin:18px 0 0
 }
 .tutorial-stage .tutorial-wager .wager-slider-bubble{top:-17px;font-size:11px;padding:2px 5px}
 .tutorial-stage .tutorial-wager .wager-slider{
  --wager-thumb-size:24px;height:26px!important;border-radius:10px
 }
 .tutorial-stage .tutorial-wager .wager-slider::-webkit-slider-thumb{width:24px;height:24px;border-width:2px}
 .tutorial-stage .tutorial-wager .wager-slider::-moz-range-thumb{width:22px;height:22px;border-width:2px}
 .tutorial-stage .tutorial-wager .wager-submit{grid-area:2 / 2;min-height:26px;padding:2px 7px!important;margin:0}
 .tutorial-stage .tutorial-wager .wager-submit-label{font-size:clamp(11px,8cqh,15px)}
 .tutorial-stage .demo-placed{grid-area:3 / 2;min-height:1em;font-size:clamp(9px,7cqh,13px);line-height:1}
 .tutorial-stage .lesson-5{
  display:grid;grid-template-columns:minmax(82px,1fr) minmax(0,2.5fr);grid-template-rows:repeat(3,auto);
  align-content:center;justify-items:center;column-gap:7px
 }
 .tutorial-stage .lesson-5>.tutorial-wager{grid-area:1 / 2 / 4 / 3;width:100%;padding-inline-end:14px}
 .tutorial-stage .lesson-5 .premiere-final{font-size:clamp(13px,12.5cqh,25px);line-height:1}
 .tutorial-stage .lesson-5 .final-potential{font-size:clamp(10px,9.6cqh,19px);line-height:1.08;text-align:center}
 .tutorial-stage .lesson-3{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:5px}
 .tutorial-stage .buzz-demo-left{gap:clamp(2px,2cqh,5px)}
 .tutorial-stage .buzz-demo-left .demo-question,.tutorial-stage .fairness-device .demo-question{
  font-size:clamp(10px,min(2.45cqw,10.5cqh),18px);padding:clamp(3px,3cqh,9px);line-height:1.08;min-height:0
 }
 #content .buzz-demo-left .bigbuzz{width:min(86%,180px);min-height:0;padding:2px 5px;border-radius:7px}
 #content .buzz-demo-left .bigbuzz .buzz-art{max-height:clamp(16px,23cqh,49px)}
 .tutorial-stage .buzz-demo-left .demo-choices{gap:2px}
 .tutorial-stage .buzz-demo-left .demo-choices button{
  min-height:clamp(17px,17cqh,28px);padding:1px 2px;font-size:clamp(10px,9cqh,16px);line-height:1
 }
 .tutorial-stage .lesson-3 .premiere-equation{
  --factor-size:clamp(16px,21cqh,49px);gap:1px 8px
 }
 .tutorial-stage .lesson-3 .premiere-equation::before{font-size:clamp(14px,16cqh,30px);top:calc(var(--factor-size) / 2 + 2px)}
 .tutorial-stage .combined-factor>strong,.tutorial-stage .premiere-prize .premiere-win{font-size:clamp(20px,27cqh,61px)}
 .tutorial-stage .demo-factor>span,.tutorial-stage .premiere-prize>span{font-size:clamp(8px,7cqh,15px);margin-top:2px}
 .tutorial-stage .lesson-3 .premiere-demo-result{gap:2px}
 .tutorial-stage .fairness-lane{gap:5px}
 .tutorial-stage .fairness-device{gap:3px;padding:3px 5px;border-width:1px;border-radius:7px}
 .tutorial-stage .fairness-device h3{font-size:clamp(10px,10cqh,18px)}
 .tutorial-stage .fairness-clock{font-size:clamp(15px,17cqh,35px);line-height:1}
 .tutorial-stage .fairness-result{font-size:clamp(10px,9cqh,19px);line-height:1.1}
 .tutorial-stage #actions{
  grid-template-columns:minmax(0,1fr) auto;gap:1px 4px;
  align-items:center;padding:2px 2px 0 35px
 }
 .tutorial-stage .tutorial-nav{width:100%;gap:3px}
 .tutorial-stage #actions .tutorial-nav button,.tutorial-stage #actions .tutorial-skip{
  height:clamp(34px,9dvh,43px);min-height:0;padding:2px 4px;
  font-size:clamp(11px,2.9dvh,16px);line-height:1.05
 }
 .tutorial-stage .tutorial-progress{margin:1px 0;font-size:clamp(9px,3dvh,14px);line-height:1}
 body.game-running.in-tutorial #app>aside{padding:4px 5px}
 body.in-tutorial #tutorialSidebar{overflow:visible;gap:3px}
 #tutorialSidebarTitle{font-size:clamp(10px,3.25dvh,18px);line-height:1.1}
 .tutorial-stages{gap:2px;padding:0 1px 3px}
 .tutorial-stages li{font-size:clamp(9px,3.3dvh,15px);padding:2px 3px;gap:3px;line-height:1.02}
 body.game-running.in-tutorial #app>aside .sidebar-brand-block{padding:2px 0 0}
 body.game-running.in-tutorial #app>aside .sidebar-brand{width:94%;height:auto;max-height:none}
 body.game-running.in-tutorial #app>aside .brand-promo{font-size:clamp(7px,2.4dvh,11px);padding:1px 0}
 body.in-tutorial #hostToolbar{min-height:0;margin-top:2px;padding:0}
 body.in-tutorial #hostToolbar button{min-height:27px;font-size:11px}
 body.in-tutorial #hostToolbar #hostGear{min-width:30px;font-size:18px}
 body.game-running.in-tutorial #fullscreenToggle{width:31px;height:31px;left:7px;right:auto;bottom:7px;padding:4px}
}

@media (orientation:landscape) and (max-height:350px){
 #content .buzz-demo-left .bigbuzz .buzz-art{max-height:23px}
 .tutorial-stage .buzz-demo-left .demo-choices button{min-height:19px}
 .tutorial-stage .buzz-demo-left .demo-question{padding:3px}
 .tutorial-stage .lesson-3 .premiere-equation{--factor-size:clamp(16px,18cqh,40px)}
 .tutorial-stage .combined-factor>strong,.tutorial-stage .premiere-prize .premiere-win{font-size:clamp(20px,23cqh,50px)}
}


.category-prefix{font-size:.67em;font-weight:750;vertical-align:.08em}
@media (orientation:landscape) and (max-height:550px){
 .lesson-5 .premiere-category .category-prefix{display:block;margin-bottom:1px}
}
#demoBrand { border-bottom: 3px solid; font-weight: 700; overflow-wrap: anywhere; }
