/* 2026-09-10 — bounded Metro Moth edge-device/accessibility polish. */
html,body,#game-root{width:100%;max-width:100%;min-height:100%;overflow-x:clip}
body,#game-root{min-height:100vh;min-height:100dvh}
#game-canvas{height:min(92dvh,calc(96vw * 14 / 9));max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));touch-action:none}
.hud{width:min(92dvh * 9 / 14,calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
.icon-btn,.btn-pixel,.nn-nudge-signup,.nn-nudge-later{min-width:44px;min-height:44px;touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid #8fe8ff;outline-offset:3px}
.screen{padding-top:max(16px,env(safe-area-inset-top));padding-right:max(16px,env(safe-area-inset-right));padding-bottom:max(16px,env(safe-area-inset-bottom));padding-left:max(16px,env(safe-area-inset-left));overscroll-behavior:contain}
.title-card,.panel-card{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}
#screen-title #btn-menu-mute{min-width:44px!important;min-height:44px!important}
@media(max-width:420px){
  .hud{gap:4px}.hud-top{gap:4px}.hud-chip{min-width:0;padding:5px 7px;font-size:.75rem}.glow-wrap{padding:5px 8px}
  #screen-title .menu-buttons{grid-template-columns:1fr!important}
  #screen-title .btn-primary{grid-column:auto!important}
  #screen-title .subtitle{max-width:100%!important}
}
@media(max-height:500px) and (orientation:landscape){
  #game-canvas{height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right))}
  #screen-title{padding-top:max(12px,env(safe-area-inset-top));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:max(12px,env(safe-area-inset-bottom));padding-left:max(18px,env(safe-area-inset-left))}
  #screen-title .btn-pixel,#screen-pause .btn-pixel,#screen-result .btn-pixel{min-height:44px!important}
  #screen-title #btn-menu-mute{min-height:44px!important}
  #screen-howto .panel-card,#screen-pause .panel-card,#screen-result .panel-card{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}
