/* v1.09 presentation-only layer: never resize the internal 640 x 640 canvas. */
.screen-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.screen-actions .ghost{white-space:nowrap;min-height:42px;margin:0!important}
.screen-actions .ghost[aria-pressed="true"]{background:var(--yellow);color:var(--ink);border-color:var(--yellow);font-weight:800}
.screen-actions .ghost span{margin-left:8px}
.title-full-start{display:block;margin:0 auto 15px;min-height:44px;background:#ffffff14}
#screenToast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:500;background:#08172eee;color:white;border:1px solid #ffffff55;padding:16px 22px;border-radius:12px;max-width:90vw;text-align:center;font-size:16px;pointer-events:none}
#screenToast[hidden]{display:none}
#displaySettings{width:min(700px,94vw);max-height:88vh;padding:28px;overflow:auto}
#displaySettings h2{padding-right:40px}
#displaySettings .round-options{display:flex;flex-direction:column;align-items:stretch;padding:20px 0;gap:15px;font-size:16px}
#displaySettings .round-options label{justify-content:space-between;flex-wrap:wrap}
#displaySettings select{font-size:16px;min-height:44px;max-width:100%}
#displaySettings .round-options span{font-size:13px;line-height:1.6}
#displaySettings .sound-controls{border-top:1px solid #d8e0e8;padding:20px 0;gap:18px}
#displaySettings .sound-controls label{font-size:15px;color:#344865}
#displaySettings .sound-controls input{width:130px;height:30px}
#displaySettings .sound-controls span{color:#52617a;line-height:1.6}
#displaySettings #soundToggle{color:var(--ink);border-color:#c4cedb;background:#edf1f6;font-size:15px;min-height:44px}
#displaySettings .under{display:block;color:#52617a;padding:12px 0;font-size:13px;line-height:1.7}
#displaySettings .under details{text-align:left;max-width:none;margin-top:14px}
#displaySettings .under summary{min-height:40px;padding:9px 0;font-size:15px}
.screen-version{font-size:12px;color:#778597;line-height:1.6;border-top:1px solid #d8e0e8;padding-top:15px}
body.tv-mode{height:var(--view-height,100vh);overflow:hidden}
body.tv-mode>header{max-width:none;width:100%;height:auto;min-height:58px;padding:6px 16px;gap:10px;border:0}
body.tv-mode .brand{font-size:18px;letter-spacing:-.6px;white-space:nowrap;gap:9px}
body.tv-mode .brand-icon{width:34px;height:34px;border-radius:10px;font-size:31px}
body.tv-mode .brand small{font-size:8px;letter-spacing:1.5px}
body.tv-mode .screen-actions .ghost{font-size:14px;padding:10px 14px;border-radius:9px}
body.tv-mode main{max-width:none;width:100%;height:var(--main-height,calc(100vh - 58px));padding:4px 12px 8px;display:flex;align-items:center;justify-content:center;overflow:hidden}
body.tv-mode .intro,body.tv-mode main>footer{display:none}
body.tv-mode .game{width:var(--game-width,100%);max-width:100%;padding:0 16px;flex:none;border-radius:15px}
body.tv-mode .toolbar{height:48px;min-height:48px;gap:10px}
body.tv-mode .mission{flex-direction:row;align-items:center;gap:12px;min-width:0}
body.tv-mode .mission>span{font-size:12px;letter-spacing:.8px;padding:7px 9px;white-space:nowrap}
body.tv-mode .mission>b{font-size:15px;white-space:nowrap}
body.tv-mode .stats{gap:12px;flex-shrink:0}
body.tv-mode .stats>strong,body.tv-mode .timer{font-size:17px}
body.tv-mode .dots i{width:12px;height:12px}
body.tv-mode .boards{display:grid;grid-template-columns:var(--board-size) var(--board-size);gap:14px;padding-top:7px;justify-content:center}
body.tv-mode .board-heading{height:25px;padding:0 1px 7px;line-height:18px}
body.tv-mode .board-heading span{font-size:13px}
body.tv-mode .board-heading small{font-size:11px;display:block}
body.tv-mode .canvas-wrap{width:var(--board-size);height:var(--board-size);max-width:none;margin:0;border-radius:8px;aspect-ratio:1/1}
body.tv-mode canvas{width:100%;height:100%}
body.tv-mode .game-bottom{position:static;min-height:60px;padding:8px 0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;border:0}
body.tv-mode .game-bottom p{margin:0;font-size:14px;line-height:1.5;text-align:left;flex:1;min-width:0}
body.tv-mode .actions{flex-wrap:nowrap;gap:9px;flex-shrink:0}
body.tv-mode .actions button{font-size:15px;min-height:44px;padding:11px 17px;white-space:nowrap}
body.tv-mode .loading{inset:48px 0 0;font-size:18px}
body.tv-mode #missions{width:min(1050px,94vw)}
body.tv-mode dialog{max-height:90vh}
body.tv-mode .chapter-picker,body.tv-mode .dialog-head p{font-size:16px}
body.tv-mode .level-button span{font-size:15px}
body.tv-mode .close{min-width:44px;min-height:44px}
body.tv-mode.tv-portrait .boards{grid-template-columns:var(--board-size);gap:7px}
@media(max-width:900px){
 header{height:auto;min-height:80px;padding:12px 16px;flex-wrap:wrap;gap:12px}
 .screen-actions{gap:6px}.screen-actions .ghost{font-size:12px;padding:9px 11px}
 body.tv-mode .brand small{display:none}
 body.tv-mode>header{padding:6px 10px;justify-content:center;gap:6px}
 body.tv-mode .screen-actions .ghost{font-size:12px;padding:8px 10px}
 body.tv-mode .game-bottom p{display:none}
 body.tv-mode .game-bottom{justify-content:center}
 body.tv-mode .actions{flex:1;justify-content:center}
 body.tv-mode .actions button{flex:0 1 auto;font-size:13px}
 body.tv-mode .board-heading small{display:none}
}
@media(max-width:600px){
 body.tv-mode .mission>b{display:none}
 body.tv-mode .mission>span{font-size:10px}
 body.tv-mode .stats{gap:7px}
 body.tv-mode .stats>strong,body.tv-mode .timer{font-size:13px}
 body.tv-mode .dots{gap:4px}
 body.tv-mode .dots i{width:9px;height:9px}
 body.tv-mode .game{padding:0 10px}
 body.tv-mode .actions button{padding:10px 12px;font-size:12px}
 body.tv-mode .boards{column-gap:8px}
}
@media(max-height:600px) and (min-width:601px){
 body.tv-mode>header{min-height:48px;padding-top:3px;padding-bottom:3px}
 body.tv-mode .toolbar{height:40px;min-height:40px}
 body.tv-mode .game-bottom{min-height:48px;padding:4px 0}
 body.tv-mode .game-bottom p{display:none}
 body.tv-mode .actions{margin-left:auto}
 body.tv-mode .actions button{min-height:38px;font-size:13px;padding:8px 14px}
 body.tv-mode .board-heading{height:22px;padding-bottom:4px}
}
