/* Fullscreen includes dialogs; the arena owns the available play space. */
.arena-display{position:absolute;z-index:9;right:12px;bottom:10px;pointer-events:auto}.arena-display .icon-button{background:#10262bc9}
.cinematic-mode .arena-display{top:calc(7% + 12px);left:22px;right:auto;bottom:auto}
:root.game-focus{overflow:hidden;overscroll-behavior:none;--play-top:154px;--play-bottom:96px}
:root.game-focus body{overflow:hidden;overscroll-behavior:none}
.game-focus .shell{max-width:none;padding:0;margin:0}.game-focus .layout{display:block;padding:0}
.game-focus .topbar,.game-focus .footer,.game-focus .offline-bar{display:none}
.game-focus body>div[style*="position: fixed"]:has(a[href^="https://pagelove.com"]){display:none!important}
.game-focus .stage{width:100%;height:100dvh;min-height:0;max-height:none;border:0;border-radius:0}
.game-focus .stage:not(.cinematic-mode) canvas{top:calc(var(--play-top) + env(safe-area-inset-top,0px));left:env(safe-area-inset-left,0px);width:calc(100% - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:calc(100% - var(--play-top) - var(--play-bottom) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
.game-focus .stage-top{top:calc(14px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));right:calc(16px + env(safe-area-inset-right,0px))}
.game-focus .hud{top:calc(42px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px))}
.game-focus .effects{top:calc(128px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));right:calc(16px + env(safe-area-inset-right,0px))}
.game-focus .toast{top:calc(158px + env(safe-area-inset-top,0px))}
.game-focus .stage-bottom{left:calc(16px + env(safe-area-inset-left,0px));right:calc(76px + env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px))}
.game-focus .arena-display{right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px))}
.game-focus .arena-progress{left:calc(16px + env(safe-area-inset-left,0px));right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(110px + env(safe-area-inset-bottom,0px))}
.game-focus .launch-controls{bottom:calc(10px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 112px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}
.game-focus .scene-copy{bottom:calc(7% + 12px + env(safe-area-inset-bottom,0px));width:min(780px,calc(100% - 48px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)))}
.game-focus .cinematic-mode .arena-display{left:calc(16px + env(safe-area-inset-left,0px));top:calc(7% + 12px + env(safe-area-inset-top,0px));right:auto;bottom:auto}
.game-focus #skip-cut{right:calc(16px + env(safe-area-inset-right,0px));top:calc(7% + 12px + env(safe-area-inset-top,0px))}
.game-focus dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-width:calc(100vw - 28px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}
@media(max-height:550px){
 :root.game-focus{--play-top:90px;--play-bottom:64px}.game-focus .hud{top:calc(24px + env(safe-area-inset-top,0px));gap:12px}.game-focus .hud strong{font-size:18px}.game-focus .hud>div>span,.game-focus .top-score>span:first-child{font-size:9px;margin-bottom:2px}.game-focus .top-score{padding:5px 10px}.game-focus .top-score #top-player{font-size:10px;margin-top:2px}.game-focus .hud #score-chase{display:none}.game-focus .effects{top:calc(79px + env(safe-area-inset-top,0px))}.game-focus .effect{font-size:10px;padding:3px 7px}.game-focus .toast{top:calc(96px + env(safe-area-inset-top,0px))}.game-focus .arena-progress{bottom:calc(58px + env(safe-area-inset-bottom,0px))}.game-focus .play-tip{display:none}.game-focus .launch-controls{display:flex;justify-content:center;gap:0}.game-focus .launch{min-height:44px;padding:10px 16px}
}
@media(max-height:550px){.game-focus .hud .hud-player{padding:4px 10px}.game-focus .hud .hud-player>span{font-size:9px;margin-bottom:2px}.game-focus .hud .hud-player #score{font-size:25px}.game-focus .hud .hud-actions{padding-top:4px;gap:14px}}

/* Phone play owns a fixed viewport even when native fullscreen is declined or
   exited. Only the stage is fixed; top-layer dialogs retain native scrolling. */
:root.play-locked,:root.play-locked body{height:100%;width:100%;overflow:hidden;overscroll-behavior:none}
.play-locked .shell{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}
.play-locked .stage{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;overflow:hidden;overflow-anchor:none}
/* Gesture policy must exist before contact, including HUD and lower margins.
   Cinematic copy and menus intentionally remain scrollable and zoomable. */
.stage:not(.home-mode):not(.cinematic-mode){touch-action:none;overscroll-behavior:none;user-select:none;-webkit-user-select:none}
.play-locked dialog{touch-action:auto;overscroll-behavior:contain;overflow:auto;user-select:text;-webkit-user-select:text}

.stage:not(.home-mode):not(.cinematic-mode) :is(.play-header,.effects){touch-action:none}
