.tv-lobby{max-width:1500px;margin:auto;padding:clamp(20px,3vw,64px);color:#eef7ff}
.tv-lobby-top{display:flex;align-items:center;gap:36px}.tv-lobby-top img{width:clamp(140px,20vw,300px);object-fit:contain}.tv-lobby h1{font-size:clamp(30px,4vw,64px);margin:8px 0}.tv-lobby p{font-size:clamp(17px,1.6vw,28px);line-height:1.4}.tv-kicker{font-size:clamp(14px,1.2vw,22px);font-weight:850;letter-spacing:.1em;color:#85e6ff}
.tv-player-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:24px 0}.tv-player-slot{border:2px dashed #566787;border-radius:20px;padding:20px;text-align:center;background:#0e203c}.tv-player-slot.joined{border:3px solid var(--player-color);background:#143550;box-shadow:0 0 22px #00cfff1a}.tv-player-number{display:inline-grid;place-items:center;border-radius:50%;width:48px;height:48px;background:var(--player-color);color:#031224;font-size:28px;font-weight:900}.tv-player-slot h2{font-size:clamp(20px,2.2vw,36px);overflow-wrap:anywhere;margin:12px 0}.tv-player-slot p{font-size:16px;margin:0;color:#d3e4ff}
.tv-lobby-actions,.tv-difficulty,.tv-lobby-bottom{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}.tv-lobby button{min-height:54px;font-size:clamp(15px,1.45vw,24px);padding:13px 24px}.tv-difficulty{margin-top:20px}.tv-difficulty [aria-pressed=true]{border:2px solid #ffd95d;background:#314266;color:white}.tv-lobby-note{color:#c6d6ef;text-align:center}.tv-lobby-status{text-align:center;font-weight:800;color:#ffde6e}.tv-lobby-bottom{margin:22px 0 32px}.tv-lobby button:disabled{opacity:.35}.tv-lobby .tv-start{background:linear-gradient(#8dfbc0,#30b779)}
.controller-overlay{position:fixed;inset:0;background:#020d24ed;z-index:10000;display:grid;place-items:center;padding:5vh 5vw}.controller-dialog{width:min(740px,100%);box-sizing:border-box;padding:clamp(24px,4vw,60px);border:2px solid #78deff;border-radius:24px;background:linear-gradient(135deg,#143750,#0a1738);text-align:center;box-shadow:0 0 60px #1ca4c92a}.controller-dialog h2{font-size:clamp(30px,4vw,64px);line-height:1.1;overflow-wrap:anywhere}.controller-dialog p{font-size:clamp(19px,2vw,30px);line-height:1.45;color:#dfedff}.controller-dialog button{display:block;width:100%;margin-top:16px;min-height:56px;font-size:clamp(18px,1.8vw,28px)}
.controller-overlay.hidden{display:none}.shared-controller .gu-nav-focus{outline:4px solid #fff59b!important;outline-offset:5px!important;box-shadow:0 0 0 8px #07192b!important}.shared-controller .guide-current-player{border-width:3px}
body.tv-mode:not(.in-game) .topbar{padding-left:4vw;padding-right:4vw}body.tv-mode:not(.in-game) #screen{padding:0 3vw 3vh}body.tv-mode .resume-game-bar{bottom:4vh}
@media(max-width:700px){.tv-lobby-top{display:block;text-align:center}.tv-lobby-top img{width:140px}.tv-player-slots{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tv-player-slot{padding:12px}.tv-lobby-actions{display:grid;grid-template-columns:1fr}.tv-lobby{padding:16px}.tv-lobby button{font-size:16px}.controller-dialog{padding:24px}}
@media(prefers-reduced-motion:reduce){.controller-overlay *{animation:none!important}}
@media(min-width:800px) and (max-height:600px){body.tv-mode:not(.in-game) .topbar{min-height:48px;padding-top:4px;padding-bottom:4px}.tv-lobby{padding:6px 12px!important}.tv-lobby-top{gap:16px!important}.tv-lobby-top img{width:110px!important}.tv-lobby h1{font-size:27px!important}.tv-lobby-top p{font-size:15px!important;margin:4px 0!important}.tv-player-slots{margin:8px 0!important;gap:10px!important}.tv-player-slot{padding:7px!important}.tv-player-number{width:26px!important;height:26px!important;font-size:18px!important}.tv-player-slot h2{font-size:20px!important;margin:4px 0!important}.tv-player-slot p{font-size:13px!important}.tv-lobby button{min-height:40px!important;padding:8px 14px!important;font-size:14px!important}.tv-lobby-status{font-size:15px!important;margin:6px!important}.tv-difficulty,.tv-lobby-bottom{margin-top:8px!important;gap:10px!important}.tv-lobby-note{font-size:13px!important;margin:6px 0!important}.tv-kicker{font-size:12px!important}.tv-lobby-bottom{margin-bottom:26px!important}body.tv-mode.in-game .premium-table-arena.universe-table{--tv-hand-height:220px;--guide-width:300px}body.tv-mode .premium-hand-play img,body.tv-mode .premium-hand-dock .power-choice-play img{height:80px}body.tv-mode .premium-hand-card,body.tv-mode .premium-hand-dock .power-choice-card{flex-basis:120px}}
@media(min-width:900px) and (max-height:850px){.tv-lobby{padding:12px 24px}.tv-lobby-top{gap:24px}.tv-lobby-top img{width:145px}.tv-lobby h1{font-size:34px;margin:4px 0}.tv-lobby p{font-size:17px;margin:8px 0}.tv-player-slots{gap:14px;margin:14px 0}.tv-player-slot{padding:12px}.tv-player-number{width:36px;height:36px;font-size:23px}.tv-player-slot h2{font-size:23px;margin:7px 0}.tv-player-slot p{font-size:14px}.tv-lobby button{min-height:46px;font-size:16px;padding:10px 18px}.tv-difficulty{margin-top:12px}.tv-lobby .tv-lobby-note{font-size:15px}.tv-lobby-bottom{margin:12px 0 30px}.tv-kicker{font-size:14px}}

.tv-exit-button{font-size:14px;min-height:40px;padding:8px 14px}.tv-player-slot button{margin-top:8px;font-size:15px;min-height:40px;padding:8px 12px}
.tv-keyboard{width:min(960px,100%);max-height:90vh;overflow:auto;padding:24px}.tv-keyboard h2{font-size:30px;margin:8px 0 14px}.tv-keyboard label{display:block;color:#d7e8ff;font-size:18px}.tv-keyboard input{width:100%;box-sizing:border-box;margin:10px 0 16px;font-size:28px;padding:12px;color:#fff;background:#071a34;border:2px solid #8bdfff;border-radius:8px}.tv-keyboard-row{display:flex;justify-content:center;gap:8px;margin-bottom:8px}.tv-keyboard-row button{flex:0 1 8.5%;margin:0;min-height:48px;font-size:22px;border:1px solid #8bdfff;border-radius:8px;color:white;background:#193f69}.tv-keyboard-tools{display:flex;gap:10px;margin-top:10px}.tv-keyboard-tools button{margin:0;min-height:46px;font-size:18px;border-radius:8px;color:white;background:#193f69;border:1px solid #8bdfff}
@media(max-height:650px){.tv-keyboard{padding:14px}.tv-keyboard h2{font-size:23px;margin:3px 0}.tv-keyboard label{font-size:14px}.tv-keyboard input{font-size:23px;padding:6px;margin:6px 0 10px}.tv-keyboard-row button,.tv-keyboard-tools button{min-height:36px;font-size:18px}.tv-keyboard-row{gap:6px;margin-bottom:6px}.tv-keyboard-tools{margin-top:8px}.tv-player-slot button{margin-top:4px}.tv-lobby .tv-difficulty{margin-top:8px}}

/* Size the hand as a complete panel, including names, actions and focus rings. */
@media (orientation:landscape) {
 body.tv-mode.in-game .premium-table-arena.universe-table{--tv-hand-height:clamp(260px,38dvh,920px);--guide-width:clamp(300px,29vw,1300px)}
 body.tv-mode .premium-hand-dock{height:var(--tv-hand-height);max-height:none;box-sizing:border-box;padding:10px 14px;gap:5px}
 body.tv-mode .premium-hand-dock .board-power-choice-tray{flex:1 1 0;min-height:0!important}
 body.tv-mode .premium-hand-cards,body.tv-mode .premium-hand-dock .power-tray-cards{flex:1 1 0;min-height:0;align-items:stretch;padding:10px;gap:12px;overflow-x:auto;overflow-y:hidden}
 body.tv-mode .premium-hand-card,body.tv-mode .premium-hand-dock .power-choice-card{flex-basis:clamp(140px,12vw,560px);min-height:0}
 body.tv-mode .premium-hand-play,body.tv-mode .premium-hand-dock .power-choice-play{height:100%;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;padding:7px;gap:4px;transform:none}
 body.tv-mode .premium-hand-play img,body.tv-mode .premium-hand-dock .power-choice-play img{flex:1 1 0;min-height:0;height:0;width:100%;object-fit:contain}
 body.tv-mode .premium-hand-play strong,body.tv-mode .premium-hand-dock .power-choice-name{flex-shrink:0;font:800 clamp(15px,1.25vw,60px)/1.15 system-ui!important;text-align:center}
 body.tv-mode .premium-hand-play small{flex-shrink:0;font-size:clamp(10px,.85vw,20px)!important}
 body.tv-mode .premium-hand-dock .power-choice-value,body.tv-mode .hand-stats b{font-size:clamp(12px,1vw,24px)!important}
 body.tv-mode .hand-stats,body.tv-mode .power-choice-value{flex-shrink:0}
 body.tv-mode .premium-hand-dock .power-choice-preview{display:none}
 body.tv-mode .power-tray-head,body.tv-mode .guardian-hand-heading,body.tv-mode .card-impact-preview,body.tv-mode .hand-turn-tools{flex:0 0 auto}
 body.tv-mode .hand-turn-tools:not(:has(button)){display:none}
 body.tv-mode .hand-turn-tools>span{display:none}
 body.tv-mode .hand-turn-tools button{min-height:36px;font-size:clamp(13px,1vw,24px);padding:6px 12px}
 body.tv-mode .card-impact-preview{font-size:clamp(12px,1vw,24px);min-height:1.3em;line-height:1.3}
 body.tv-mode .premium-hand-dock .power-tray-head{font-size:clamp(14px,1.25vw,30px)}
 body.tv-mode .gu-nav-focus{outline:3px solid #fff59b!important;outline-offset:2px!important;box-shadow:0 0 0 5px #07192b!important}
 body.tv-mode .premium-hand-play.gu-nav-focus,body.tv-mode .power-choice-play.gu-nav-focus{background:linear-gradient(145deg,#245375,#122b48);border-color:#fff59b}
 body.tv-mode .viewer-game-buttons button{min-height:48px;font-size:clamp(16px,1.25vw,30px)}
}
@media (orientation:landscape) and (min-width:2200px) {
 body.tv-mode .premium-hand-play small,body.tv-mode .card-impact-preview,body.tv-mode .hand-turn-tools button{font-size:1vw!important}
 body.tv-mode .premium-hand-dock .power-choice-value,body.tv-mode .hand-stats b{font-size:1vw!important}
 body.tv-mode .guardian-hand-heading strong,body.tv-mode .premium-hand-dock .power-tray-head{font-size:1.3vw!important}
 body.tv-mode .guide-current-player strong{font-size:2vw}
 body.tv-mode .guide-score-chip{min-height:5dvh}
 body.tv-mode .guide-score-chip b{font-size:1.7vw}
 body.tv-mode .guide-score-chip small{font-size:.8vw}
 body.tv-mode .guide-pane-tabs button{min-height:5dvh}
 body.tv-mode.in-game .readable-game-guide button{font-size:1.2vw!important;min-height:5dvh!important}
 body.tv-mode.in-game .readable-game-guide .guide-play-pane .universe-action .action-panel h3{font-size:1.8vw!important}
 body.tv-mode.in-game .readable-game-guide .guide-play-pane .universe-action .action-panel p{font-size:1.2vw!important}
 body.tv-mode .base-plan-progress,body.tv-mode .base-power-status,body.tv-mode .action-turn-kicker{font-size:1vw!important}
 body.tv-mode .premium-hand-zoom,body.tv-mode .premium-hand-dock .power-choice-zoom{width:2.5vw!important;height:2.5vw!important}
 body.tv-mode .viewer-game-status,body.tv-mode .viewer-game-buttons button{font-size:1.25vw}
}
@media (orientation:landscape) and (max-height:650px) {
 body.tv-mode.in-game .premium-table-arena.universe-table{--tv-hand-height:250px;padding:12px 12px 34px!important;gap:12px!important}
 body.tv-mode .premium-hand-dock{left:12px;right:calc(var(--guide-width) + 24px);bottom:34px;padding:7px 10px;gap:3px}
 body.tv-mode.in-game .readable-game-guide .guide-play-pane .universe-action .action-panel h3{font:800 20px/1.15 system-ui!important}
 body.tv-mode.in-game .readable-game-guide .guide-play-pane .universe-action .action-panel p{font:600 16px/1.3 system-ui!important}
 body.tv-mode.in-game .readable-game-guide .guide-play-pane .universe-action .action-panel{gap:8px!important}
 body.tv-mode .guide-pane-tabs button{min-height:44px!important}
 body.tv-mode .guide-current-player strong{font-size:20px}
 body.tv-mode .guide-score-chip{min-height:45px}
 body.tv-mode .base-plan-progress,body.tv-mode .team-score-summary{display:none}
 body.tv-mode .tv-control-hint{bottom:7px;gap:14px}
}

/* A tablet hand gets its own space below the whole board, including lower seats. */
@media (orientation:landscape) and (min-width:700px) and (max-width:1400px) and (min-height:600px) {
 body.in-game:not(.tv-mode) .premium-table-arena.universe-table{--tablet-hand-height:clamp(280px,40dvh,390px)}
 body.in-game:not(.tv-mode) .universe-table:has(.premium-hand-dock) .premium-board.universe-board{width:min(100%,calc((100dvh - var(--tablet-hand-height) - 46px)*1.3333333))!important}
 body.in-game:not(.tv-mode) .universe-table:has(.premium-hand-dock) .premium-board.championship-board{width:min(100%,calc((100dvh - var(--tablet-hand-height) - 46px)*1.7777778))!important}
 body.in-game:not(.tv-mode) .premium-hand-dock{height:var(--tablet-hand-height);max-height:none;box-sizing:border-box;bottom:12px}
 body.in-game:not(.tv-mode) .premium-hand-dock .board-power-choice-tray{flex:1 1 0;min-height:0!important}
 body.in-game:not(.tv-mode) .premium-hand-cards,body.in-game:not(.tv-mode) .premium-hand-dock .power-tray-cards{flex:1 1 0;min-height:0;padding:9px;overflow-x:auto;overflow-y:hidden}
 body.in-game:not(.tv-mode) .premium-hand-card,body.in-game:not(.tv-mode) .premium-hand-dock .power-choice-card{min-height:0;flex-basis:130px}
 body.in-game:not(.tv-mode) .premium-hand-play,body.in-game:not(.tv-mode) .premium-hand-dock .power-choice-play{height:100%;min-height:0;box-sizing:border-box;display:flex;flex-direction:column}
 body.in-game:not(.tv-mode) .premium-hand-play img,body.in-game:not(.tv-mode) .premium-hand-dock .power-choice-play img{flex:1 1 0;min-height:0;height:0;width:100%;object-fit:contain}
 body.in-game:not(.tv-mode) .premium-hand-play strong,body.in-game:not(.tv-mode) .premium-hand-play small,body.in-game:not(.tv-mode) .hand-stats,body.in-game:not(.tv-mode) .power-choice-name,body.in-game:not(.tv-mode) .power-choice-value,body.in-game:not(.tv-mode) .power-choice-preview{flex-shrink:0}
 body.in-game:not(.tv-mode) .guardian-hand-heading,body.in-game:not(.tv-mode) .power-tray-head,body.in-game:not(.tv-mode) .hand-turn-tools,body.in-game:not(.tv-mode) .card-impact-preview{flex:0 0 auto}
}
@media (orientation:portrait) and (min-width:700px) {
 body.in-game .premium-table-arena.universe-table{--tablet-hand-height:clamp(260px,30dvh,360px);grid-template-columns:minmax(0,1fr) clamp(280px,39vw,400px)!important;grid-template-rows:minmax(0,1fr) auto!important;grid-template-areas:'table guide' 'hand hand'!important;padding:12px!important;gap:12px!important}
 body.in-game .premium-center-stage{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
 body.in-game .premium-board.universe-board.portrait-board{width:min(100%,calc((100dvh - 36px)*.6666667))!important}
 body.in-game .universe-table:has(.premium-hand-dock) .premium-board.universe-board.portrait-board{width:min(100%,calc((100dvh - var(--tablet-hand-height) - 48px)*.6666667))!important}
 body.in-game .universe-live-hud.readable-game-guide{height:100%!important;max-height:none!important;padding:12px!important;gap:10px!important}
 body.in-game .layout-portrait .readable-game-guide:has(.unity-ready-btn){max-height:none!important}
 body.in-game .layout-portrait .readable-game-guide .action-panel h3{font:800 22px/1.2 system-ui!important}
 body.in-game .layout-portrait .readable-game-guide .action-panel p,body.in-game .layout-portrait .readable-game-guide .think-prompt{font-size:16px!important;line-height:1.4!important}
 body.in-game .layout-portrait .readable-game-guide button{font-size:14px!important;min-height:44px!important}
 .layout-portrait .guide-current-player strong{font-size:22px}
 .layout-portrait .guide-score-chip b{font-size:24px}
 .layout-portrait .guide-score-chip small{font-size:11px}
 body.in-game .layout-portrait .premium-hand-dock{height:var(--tablet-hand-height)!important;max-height:none!important;padding:10px!important}
 body.in-game .layout-portrait .premium-hand-dock .board-power-choice-tray{flex:1 1 0;min-height:0!important}
 body.in-game .layout-portrait .premium-hand-cards,body.in-game .layout-portrait .premium-hand-dock .power-tray-cards{flex:1 1 0;min-height:0;padding:9px;overflow-y:hidden;justify-content:safe center}
 body.in-game .layout-portrait .premium-hand-card,body.in-game .layout-portrait .premium-hand-dock .power-choice-card{flex-basis:140px;min-height:0}
 body.in-game .layout-portrait .premium-hand-play,body.in-game .layout-portrait .premium-hand-dock .power-choice-play{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box}
 body.in-game .layout-portrait .premium-hand-play img,body.in-game .layout-portrait .premium-hand-dock .power-choice-play img{flex:1 1 0;min-height:0;height:0;width:100%;object-fit:contain}
 body.in-game .layout-portrait .premium-hand-play strong,body.in-game .layout-portrait .power-choice-name{font-size:14px!important}
 body.in-game .layout-portrait .premium-hand-play strong,body.in-game .layout-portrait .premium-hand-play small,body.in-game .layout-portrait .hand-stats,body.in-game .layout-portrait .power-choice-name,body.in-game .layout-portrait .power-choice-value,body.in-game .layout-portrait .power-choice-preview,body.in-game .layout-portrait .guardian-hand-heading,body.in-game .layout-portrait .power-tray-head,body.in-game .layout-portrait .hand-turn-tools,body.in-game .layout-portrait .card-impact-preview{flex-shrink:0}
}
