/* The active table uses the viewport; the menu retains its brand header. */
body:has(.immersive-game) .topbar,body:has(.immersive-game) .connection-bar{display:none}
.immersive-game.room-view{width:100%;max-width:none;margin:0;padding:0 10px 8px;height:100dvh;display:flex;flex-direction:column;box-sizing:border-box}
.immersive-game .room-top{height:42px;min-height:42px;padding:5px 4px;gap:14px;box-sizing:border-box}
.immersive-game .room-top h1{font-size:22px;margin:0}.immersive-game .room-top .eyebrow{display:none}.immersive-game .room-top>.text-button{margin-left:auto}
.immersive-game .room-code{padding:2px 6px}.immersive-game .room-code b{font-size:14px}
.orientation-note{display:none}
.immersive-game .game-layout{flex:1;min-height:0;display:grid;grid-template-columns:145px minmax(0,1fr);gap:12px}
.immersive-game .play-area{min-height:0;min-width:0;display:grid;grid-template-rows:20px minmax(0,1fr) 38px}
.immersive-game .table-owner{display:none}.immersive-game .table-info{margin:0;padding:0 4px;font-size:10px}
.immersive-game .felt{height:100%;min-height:0;box-sizing:border-box;container-type:size;padding:12px;gap:10px}
.immersive-game .round-status{min-height:0;padding:4px;font-size:11px;gap:6px}.immersive-game .round-status b{font-size:11px}.immersive-game .round-status small{font-size:10px}.immersive-game .pass-button{padding:7px 12px}
.immersive-game .game-sidebar{min-height:0;display:flex;flex-direction:column;gap:8px}
.immersive-game .target-box{padding:12px 6px;min-height:0}.immersive-game .target-letter{font-size:62px}.immersive-game .target-box>.eyebrow{font-size:8px}.immersive-game .target-box>span:last-child{font-size:10px}
.immersive-game .compact{margin:0;padding:10px 6px;overflow:auto;min-height:0;max-height:none}.immersive-game .compact .player{padding:7px 0}.immersive-game .player-info b{font-size:11px}.immersive-game .rules-link{font-size:10px;margin:0}
/* One large solo pile and two small piles, with the same thin stacked edges. */
.immersive-game.solo-game .game-layout{grid-template-columns:minmax(0,1fr)}
.immersive-game.solo-game .game-sidebar{display:none}
.immersive-game.solo-game .play-area{grid-template-rows:minmax(0,1fr)}
.immersive-game.solo-game .table-info{display:none}
.immersive-game.solo-game .round-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.immersive-game.solo-game .felt,.immersive-game.solo-game .felt:has(.expanded){grid-template-rows:minmax(0,1fr) auto;gap:12px;padding:16px}
.immersive-game.solo-game .table-head{position:absolute;top:6px;right:8px;height:54px;pointer-events:none}
.immersive-game.solo-game .table-props{height:54px}.immersive-game.solo-game .product-box{width:80px;height:54px;pointer-events:auto}
.immersive-game.solo-game .board,.immersive-game.solo-game .felt:has(.expanded) .board{grid-row:1;grid-column:2;width:100%;max-width:min(680px,calc((100cqh - 145px)*1.5))}
.immersive-game.solo-game .own-pile>.review-pile{grid-row:1;grid-column:1;width:100%;max-width:110px;margin:0;justify-self:center}
.immersive-game.solo-game .own-pile>.missed-pile{grid-column:3}
.immersive-game.solo-game .own-pile>.expanded{max-width:min(680px,calc((100cqh - 230px)*1.5))}
.immersive-game.solo-game.focus-won .board,.immersive-game.solo-game.focus-missed .board{max-width:110px}
.solo-game .board .card-face{box-shadow:2px 3px 0 #ccc,4px 6px 0 #939b95,6px 9px 12px #0007}
.immersive-game.solo-game .felt>.answer-form{grid-row:2;grid-column:1/-1;display:flex;flex-wrap:nowrap;padding:10px 16px;gap:12px;margin:0;align-items:center}
.immersive-game.solo-game .answer-form label{flex:1;min-width:0;font-size:12px;gap:4px}.immersive-game.solo-game .answer-entry{min-height:48px;padding:5px 10px}
.immersive-game.solo-game .answer-form small{display:none}.immersive-game.solo-game .answer-form button{width:auto;white-space:nowrap;min-height:44px;padding:10px 15px;font-size:12px}
.immersive-game.solo-game .countdown,.immersive-game.solo-game .results{grid-row:1/-1;max-height:100%;overflow:auto}
/* Multiplayer keeps the objective and players beside the full table. */
.immersive-game:not(.solo-game) .felt{display:flex;flex-direction:column;justify-content:space-between;overflow:clip}
.immersive-game:not(.solo-game) .table-props{display:none}
.immersive-game:not(.solo-game) .table-head{width:100%;min-height:45px;height:45px;justify-content:center}
.immersive-game:not(.solo-game) .opponent-piles{display:flex;gap:16px;justify-content:center;overflow:auto}
.immersive-game:not(.solo-game) .personal-pile{gap:2px;font-size:9px}.immersive-game:not(.solo-game) .personal-pile b{font-size:10px}.immersive-game:not(.solo-game) .pile-cards{width:38px}
.immersive-game:not(.solo-game) .own-pile{margin:0;height:45px}
.immersive-game:not(.solo-game) .board{width:min(100%,calc((100cqh - 145px)*2));margin:auto;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-width:0}
.immersive-game:not(.solo-game) .board.colors{grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,calc((100cqh - 150px)*1.5))}
.immersive-game:not(.solo-game) .game-card{min-width:0}
body:has(.immersive-game) #room-chat{bottom:8px;right:12px;width:280px}.chat-toggle{padding:10px 14px}
@media(max-height:550px) and (orientation:landscape){
 .immersive-game.room-view{padding:0 6px 4px}.immersive-game .room-top{height:32px;min-height:32px;padding:2px 4px}.immersive-game .room-top h1{font-size:17px}.immersive-game .room-top .icon-button{height:24px;width:24px}
 .immersive-game .game-layout{grid-template-columns:105px minmax(0,1fr);gap:6px}.immersive-game .play-area{grid-template-rows:16px minmax(0,1fr) 32px}
 .immersive-game .felt{border-width:3px;padding:6px;gap:5px;border-radius:12px}.immersive-game .target-box{padding:5px}.immersive-game .target-letter{font-size:36px}.immersive-game .target-swatch{width:25px;height:25px;margin:4px auto}.immersive-game .target-box strong{font-size:16px}.immersive-game .compact>.eyebrow,.immersive-game .rules-link{display:none}.immersive-game .compact .avatar{display:none}.immersive-game .compact .player{padding:3px 0}.immersive-game .player-info span{font-size:8px}.immersive-game .score{font-size:16px}
 .immersive-game.solo-game .felt,.immersive-game.solo-game .felt:has(.expanded){padding:8px 14px;gap:6px}
 .immersive-game.solo-game .board,.immersive-game.solo-game .felt:has(.expanded) .board{max-width:calc((100cqh - 95px)*1.5)}
 .immersive-game.solo-game .own-pile>.expanded{max-width:calc((100cqh - 160px)*1.5)}
 .immersive-game.solo-game.focus-won .board,.immersive-game.solo-game.focus-missed .board,.immersive-game.solo-game .own-pile>.review-pile:not(.expanded){max-width:75px}
 .immersive-game.solo-game .felt>.answer-form{padding:5px 10px;gap:8px}.immersive-game.solo-game .answer-entry{min-height:34px;padding:2px 6px}.immersive-game.solo-game .guided-answer{font-size:24px}.immersive-game.solo-game .answer-form label{font-size:10px;gap:2px}.immersive-game.solo-game .answer-form button{min-height:34px;padding:6px 10px;font-size:11px}
 .immersive-game .pile-navigation{margin-top:0}.immersive-game .pile-navigation button{height:28px;width:28px}.immersive-game .pile-collapse{padding:2px}.immersive-game .review-pile{gap:2px}.immersive-game .review-pile b{font-size:11px}
 .immersive-game.solo-game .product-box{width:55px;height:38px}
 .immersive-game:not(.solo-game) .table-head,.immersive-game:not(.solo-game) .own-pile{height:32px;min-height:32px}.immersive-game:not(.solo-game) .pile-cards{width:25px}.immersive-game:not(.solo-game) .personal-pile>span{display:none}
 .immersive-game:not(.solo-game) .board{width:min(100%,calc((100cqh - 90px)*2));gap:5px}.immersive-game:not(.solo-game) .board.colors{width:min(100%,calc((100cqh - 95px)*1.5))}
 body:has(.immersive-game) #room-chat{width:210px;bottom:4px}.chat-toggle{font-size:11px;padding:7px 10px}
}
@media(max-width:600px) and (orientation:portrait){.immersive-game .orientation-note{display:block;font-size:10px;max-width:130px}.immersive-game .room-top h1{font-size:16px}.immersive-game.solo-game .felt>.answer-form{flex-wrap:wrap}.immersive-game.solo-game .answer-form label{flex-basis:100%}.immersive-game .game-layout{gap:5px;grid-template-columns:85px minmax(0,1fr)}.immersive-game.solo-game .game-layout{grid-template-columns:1fr}}
.immersive-game.room-view:has(~#room-chat:not([hidden])){padding-bottom:8px}
.immersive-game.solo-game.focus-won .felt:has(.expanded) .board,.immersive-game.solo-game.focus-missed .felt:has(.expanded) .board{max-width:110px}
body:has(.immersive-game) #room-chat{top:3px;bottom:auto;right:90px;width:200px}
body:has(.immersive-game) #room-chat:has(.chat-body:not([hidden])){width:min(340px,calc(100vw - 24px));top:42px;right:12px}
@media(max-height:550px) and (orientation:landscape){
 .immersive-game.room-view:has(~#room-chat:not([hidden])){padding-bottom:4px}
 .immersive-game.solo-game.focus-won .felt:has(.expanded) .board,.immersive-game.solo-game.focus-missed .felt:has(.expanded) .board{max-width:75px}
 body:has(.immersive-game) #room-chat{width:145px;top:2px;right:65px}
 body:has(.immersive-game) #room-chat:has(.chat-body:not([hidden])){top:33px;width:280px}
}
.immersive-game .felt>.countdown,.immersive-game .felt>.results{position:absolute;inset:0;z-index:12;overflow:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#153329f5;padding:16px;border-radius:inherit}
@media(max-height:550px){.immersive-game .results h2{font-size:24px;margin:6px}.immersive-game .results .trophy{font-size:30px;margin:0}.immersive-game .winner-count{font-size:30px;margin:8px}.immersive-game .results p{margin:6px}.immersive-game .countdown h2{margin:6px}.immersive-game .countdown>span{font-size:32px}}
/* Only the two small piles show stacked card edges. */
.solo-game.focus-play .board .card-face{box-shadow:0 3px 8px #0005}
.solo-game.focus-won .board .card-face,.solo-game.focus-missed .board .card-face{box-shadow:2px 3px 0 #ccc,4px 6px 0 #939b95,6px 9px 12px #0007}
.solo-game .review-pile.expanded .pile-cards{box-shadow:0 3px 8px #0005}
/* Keep the flag and answer above the phone keyboard. */
.immersive-game.room-view{height:var(--visible-game-height,100dvh)}
.keyboard-dismiss{display:none}
body.answer-editing .immersive-game.solo-game{position:fixed;inset:auto 0 auto 0;top:var(--visible-game-top,0px);height:var(--visible-game-height,100dvh);padding:4px;z-index:20}
body.answer-editing .immersive-game.solo-game .room-top,
body.answer-editing .immersive-game.solo-game .table-head,
body.answer-editing .immersive-game.solo-game .own-pile{display:none}
body.answer-editing .immersive-game.solo-game .felt{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);grid-template-rows:minmax(0,1fr);padding:8px;gap:12px;min-height:0}
body.answer-editing .immersive-game.solo-game .felt .board{grid-column:1;grid-row:1;width:100%;max-width:min(420px,calc((100cqh - 28px)*1.5));margin:auto}
body.answer-editing .immersive-game.solo-game .board .card-face{box-shadow:0 3px 8px #0005}
body.answer-editing .immersive-game.solo-game .felt>.answer-form{grid-column:2;grid-row:1;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:8px;max-height:100%;overflow-y:auto;min-height:0;box-sizing:border-box}
body.answer-editing .immersive-game.solo-game .answer-form label{grid-column:1/-1;min-width:0;gap:2px;font-size:11px}
body.answer-editing .immersive-game.solo-game .answer-form .answer-entry{min-height:34px;padding:2px 5px}
body.answer-editing .immersive-game.solo-game .answer-form input{font-size:24px}
body.answer-editing .immersive-game.solo-game .answer-form .guided-answer input{font:inherit}
body.answer-editing .immersive-game.solo-game .answer-form button{min-height:34px;padding:6px;font-size:11px;width:100%;white-space:normal}
body.answer-editing .immersive-game.solo-game .answer-form .keyboard-dismiss{display:block;position:fixed;top:calc(var(--visible-game-top,0px) + 7px);left:8px;width:32px;min-height:28px;height:28px;border:1px solid #fff6;border-radius:6px;background:#111b;color:#fff;font-size:23px;padding:0;z-index:3}
@media(max-width:600px) and (min-height:330px){
 body.answer-editing .immersive-game.solo-game .felt{grid-template-columns:1fr;grid-template-rows:minmax(65px,1fr) auto;gap:6px}
 body.answer-editing .immersive-game.solo-game .felt .board{grid-column:1;grid-row:1;max-width:min(65vw,calc((100cqh - 200px)*1.5));min-width:65px}
 body.answer-editing .immersive-game.solo-game .felt>.answer-form{grid-column:1;grid-row:2;width:100%;padding:6px}
}
/* Multiplayer table and original expansion objective cards. */
.immersive-game:not(.solo-game) .game-layout{grid-template-columns:minmax(0,1fr)}
.immersive-game:not(.solo-game) .game-sidebar{display:none}
.immersive-game:not(.solo-game) .play-area{grid-template-rows:minmax(0,1fr) 36px}
.immersive-game:not(.solo-game) .table-info{display:none}
.immersive-game:not(.solo-game) .felt{--objective-width:clamp(90px,12vw,170px);padding-left:calc(var(--objective-width) + 40px)}
.table-objective{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:var(--objective-width);display:flex;flex-direction:column;align-items:center;gap:8px;color:white;text-align:center}
.table-objective .eyebrow{font-size:9px;color:white}.table-objective strong{font-size:18px}.table-objective small{font-size:11px}
.objective-art{position:relative;width:100%;aspect-ratio:2/3;overflow:hidden;border-radius:9px;background:white;box-shadow:0 5px 12px #0005}
.objective-art img{position:absolute;left:50%;top:50%;width:150%;height:66.6667%;object-fit:contain;transform:translate(-50%,-50%) rotate(-90deg)}
.leave-game{display:flex;align-items:center;justify-content:center;gap:6px;margin-left:auto;padding:5px 12px;min-width:76px;min-height:34px;background:#fff;color:#111;border:1px solid #777;border-radius:8px;font:inherit;font-size:13px;font-weight:800;cursor:pointer;flex-shrink:0}
.leave-game span{font-size:25px;line-height:20px}.leave-game:hover{background:#fff000}.leave-game:focus-visible{outline:3px solid #50baa5;outline-offset:2px}
.dialog-close.icon-button{display:grid;place-items:center;width:40px;height:40px;border:1px solid #777;background:white;color:#111;font-size:28px;line-height:1;z-index:5}
.room-browser{max-width:1250px;margin:28px auto;background:white;border:1px solid #ddd;border-radius:14px;padding:24px}.room-browser h2{margin:6px 0}.room-browser .section-title{gap:15px}.room-browser>label{display:flex;align-items:center;gap:12px;margin:16px 0}.room-browser select{max-width:230px}
.available-room{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-top:1px solid #ddd}.available-room h3{margin:7px 0}.available-room p{margin:8px 0}.available-room small{color:#666}.available-room .primary{min-width:120px}.no-rooms{color:#666;line-height:1.6}
#mode-setup .public-room-option{display:flex;align-items:center;font-size:13px;font-weight:400;gap:10px}#mode-setup .public-room-option input{width:18px;height:18px;min-width:18px;margin:0}#mode-setup input[type=number]{min-height:45px;width:100%;padding:10px}
@media(max-height:550px) and (orientation:landscape){
 .immersive-game:not(.solo-game) .felt{--objective-width:80px;padding-left:104px}.table-objective{left:10px;gap:3px}.table-objective .eyebrow{font-size:8px}.table-objective strong{font-size:13px}.table-objective small{font-size:9px}
 .leave-game{min-height:28px;padding:2px 7px;min-width:64px;font-size:11px}.leave-game span{font-size:23px}
 body:has(.immersive-game) #room-chat{right:80px}
}
@media(max-width:600px){.room-browser{padding:16px}.available-room{gap:10px;flex-wrap:wrap}.room-browser .section-title{align-items:start}}
#mode-setup .public-room-option{flex-direction:row;text-align:left;justify-content:flex-start}
.leave-game span,.dialog-close.icon-button{font-family:Arial,sans-serif}.immersive-game:not(.solo-game) .personal-pile>span{display:none}
.room-browser .section-title>div{flex:1}.room-browser .section-title .secondary{width:auto;min-width:130px}.room-browser>label{flex-direction:row;justify-content:flex-start;text-align:left}
