/* The game fills the visible viewport; browser menus remain browser-owned. */
[data-display-toggle]{touch-action:manipulation;min-width:44px;min-height:44px}
[data-display-toggle] svg{width:20px;height:20px;flex-shrink:0}
body.focus-play{background:#091722;overscroll-behavior:none}
body.focus-play>.site-header,body.focus-play>.version-switch,body.focus-play>footer,body.focus-play .intro,body.focus-play .stats-consent,body.focus-play #install-invite,body.focus-play .connection-status{display:none!important}
body.focus-play .layout{--display-safe-top:max(8px,env(safe-area-inset-top));--display-safe-bottom:calc(max(8px,env(safe-area-inset-bottom)) + 16px);--display-content-height:calc(var(--display-height,100dvh) - var(--display-safe-top) - var(--display-safe-bottom));position:fixed;top:var(--display-offset-top,0px);left:var(--display-offset-left,0px);right:auto;bottom:auto;display:block;width:var(--display-width,100vw);max-width:none;min-height:0;height:var(--display-height,100dvh);margin:0;padding:var(--display-safe-top) max(8px,env(safe-area-inset-right)) var(--display-safe-bottom) max(8px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.focus-play .game-shell{width:100%;max-width:none;margin:0;min-height:100%;height:auto}
body.focus-play .falling-root{width:100%;height:auto;min-height:100%}
body.focus-play .falling-app{display:block;width:100%;height:auto;min-height:var(--display-content-height);max-width:960px;margin:auto;padding:0 4px 4px;border:0;border-radius:0;background:#091722;box-shadow:none;overflow:visible}
body.focus-play .falling-heading{max-width:680px;min-height:44px;margin:0 auto 4px;gap:8px}
body.focus-play .falling-tag{display:none}
body.focus-play .falling-heading h2{font-size:19px;line-height:1.15}
body.focus-play .falling-tools{gap:5px}
body.focus-play .falling-tools button{min-width:44px;min-height:44px}
body.focus-play .falling-scorebar{max-width:680px;min-height:40px;margin:0 auto 5px;gap:18px}
body.focus-play .falling-main-score strong{font-size:27px}
body.focus-play .falling-scorebar strong{font-size:18px}
body.focus-play .falling-scorebar .falling-main-score strong{font-size:27px}
body.focus-play .falling-awards-link{max-width:100px;min-height:40px}
body.focus-play .falling-arena{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;max-width:680px;margin:auto}
body.focus-play .falling-board-frame{flex:0 0 auto;width:auto;height:var(--display-board-height,min(calc(var(--display-content-height) - 240px),calc(var(--display-width,100vw) + var(--display-width,100vw) - 48px)));min-height:230px;max-width:100%;max-height:none;aspect-ratio:1/2;justify-self:auto;margin:0 auto}
body.focus-play .falling-rail{order:-1;display:grid;grid-template-columns:minmax(32px,.7fr) minmax(32px,.7fr) minmax(46px,.9fr) minmax(104px,1.6fr) 44px;align-items:center;gap:6px;width:100%;padding:0;margin:0;max-width:680px;min-height:48px}
body.focus-play .falling-next-box{display:flex;align-items:center;gap:8px;min-width:0}
body.focus-play .falling-next-box>.falling-label{display:none}
body.focus-play .falling-next{min-height:35px;min-width:48px;display:flex;padding:3px;border:0;background:transparent}
body.focus-play .falling-preview{grid-template-columns:repeat(var(--preview-cols),11px);grid-template-rows:repeat(var(--preview-rows),11px);gap:1px}
body.focus-play .falling-next .later{display:none}
body.focus-play .falling-meter{flex-direction:row;align-items:center;gap:7px}
body.focus-play .falling-meter strong{font-size:22px}
body.focus-play .falling-level-button{flex-direction:column;min-height:44px;padding:4px 5px;justify-content:center;gap:2px}
body.focus-play .falling-level-button .falling-label{overflow-wrap:anywhere;letter-spacing:.2px}
body.focus-play .falling-picker-cue{display:none}
body.focus-play .falling-goal{flex-direction:column;justify-content:center;align-items:flex-start;gap:3px;min-height:44px}
body.focus-play .falling-goal strong{font-size:14px;white-space:nowrap}
body.focus-play .falling-goal progress{width:100%;max-width:80px;height:4px}
body.focus-play .falling-stage-detail{display:none}
body.focus-play .falling-speed{display:flex;flex-direction:row;align-items:center;gap:6px}
body.focus-play .falling-speed>.falling-label{display:none}
body.focus-play .falling-speed select{flex:1;min-width:0;min-height:44px;font-size:16px;padding:7px 4px}
body.focus-play .falling-speed small{display:none}
body.focus-play .falling-restart{justify-content:center;min-width:44px;min-height:44px;padding:0}
body.focus-play .falling-restart>span:not(:first-child){display:none}
body.focus-play .falling-feedback{max-width:680px;height:18px;margin:auto}
body.focus-play .falling-controls{width:100%;max-width:680px;margin:0 auto;gap:5px}
body.focus-play .falling-controls button{min-height:56px;padding:6px 2px}
body.focus-play .falling-controls button b{font-size:22px}
body.focus-play .falling-controls button>span{font-size:11px;line-height:1.25}
body.focus-play .falling-keys{display:none}
body.focus-play #legacy-root{width:min(100%,620px);margin:auto;padding:8px 12px;background:var(--bg,#f8f6f1);color:var(--ink,#243a33);border-radius:12px}
body.focus-play #legacy-root .mode-switch{margin-bottom:8px}
body.focus-play #legacy-root .score-row{padding-bottom:8px}
body.focus-play #legacy-root .score-number{font-size:30px;margin-top:2px}
body.focus-play #legacy-root .board-wrap{width:min(100%,calc(var(--display-height,100dvh) - 285px));min-width:230px;margin:auto}
body.focus-play #legacy-root .tray{min-height:78px;padding-top:6px}
body.focus-play #legacy-root .piece{height:70px}
body.focus-play #legacy-root .hint{margin:4px 0}
body.focus-play #legacy-root .assist-row{margin-top:5px}
body.focus-play .display-classic-control{position:relative;z-index:1;display:flex;justify-content:flex-end;margin:0 auto 4px}
body.focus-play .display-classic-control [data-display-toggle]{min-height:44px}
@media(max-width:380px){body.focus-play .falling-rail{grid-template-columns:32px minmax(32px,.7fr) minmax(46px,.9fr) minmax(104px,1.6fr) 44px;gap:4px}body.focus-play .falling-speed>.falling-label,body.focus-play .falling-next-box>.falling-label{display:none}body.focus-play .falling-next-box{gap:0}body.focus-play .falling-next{min-width:35px;padding:0}}
@media(orientation:landscape) and (min-width:480px){
 body.focus-play .falling-app{display:grid;grid-template-columns:auto minmax(240px,340px);grid-template-rows:auto auto auto auto auto;justify-content:center;align-content:center;column-gap:14px;row-gap:5px;min-height:var(--display-content-height)}
 body.focus-play .falling-heading{grid-column:2;grid-row:1;width:100%;margin:0;flex-wrap:wrap}
 body.focus-play .falling-heading h2{font-size:18px}
 body.focus-play .falling-scorebar{grid-column:2;grid-row:2;width:100%;margin:0}
 body.focus-play .falling-arena{display:contents}
 body.focus-play .falling-board-frame{grid-column:1;grid-row:1/5;height:var(--display-board-height,calc(var(--display-content-height) - 4px));min-height:230px;max-height:none;margin:auto}
 body.focus-play .falling-rail{grid-column:2;grid-row:3;grid-template-columns:1fr 1fr;gap:6px;width:100%;padding:2px 0}
 body.focus-play .falling-next-box{grid-column:1;grid-row:1}
 body.focus-play .falling-meter{grid-column:2;grid-row:1}
 body.focus-play .falling-goal{grid-column:1;grid-row:2}
 body.focus-play .falling-speed{grid-column:2;grid-row:2}
 body.focus-play .falling-restart{grid-column:1/3;grid-row:3;min-height:44px}
 body.focus-play .falling-feedback{grid-column:2;grid-row:4;width:100%;margin:0}
 body.focus-play .falling-controls{grid-column:1/3;grid-row:5;width:100%;margin:0 auto;justify-self:center}
}
/* Very short screens and enlarged text retain document scrolling instead of clipping controls. */

body.focus-play .falling-heading{flex-wrap:wrap}.falling-heading>div:first-child{min-width:0}.falling-tools [data-display-toggle]{width:auto;min-width:86px;padding:5px 8px;gap:4px;flex-direction:column;line-height:1.1}.falling-tools [data-display-label]{display:block;font-size:11px;line-height:1.2;white-space:normal;max-width:100px}.falling-tools [data-display-toggle]>span[aria-hidden]{font-size:19px}.falling-speed select{font-size:16px}
@media(max-width:310px){body.focus-play .falling-rail{grid-template-columns:32px minmax(34px,.8fr) minmax(48px,1fr) minmax(0,1.6fr);gap:5px}body.focus-play .falling-restart{grid-column:4;grid-row:2;justify-self:end;min-height:44px}body.focus-play .falling-speed{grid-column:4;grid-row:1}.falling-heading{flex-wrap:wrap}.falling-tools{margin-left:auto}}
@media(max-width:380px){.falling-heading{flex-wrap:wrap}.falling-tools{margin-left:auto}}
