/* V121: PWA touch guards (no zoom, no text selection, no long-press magnifier or callout) and the landscape
   skin that frames the game (Moondusk): the controller picture fills the screen and the game sits in its frame. */
html,body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
*{-webkit-touch-callout:none}
img,canvas{-webkit-user-drag:none;user-drag:none}
/* V131: no rubber-band bounce in any list or page inside the game (holding a direction at the end made iOS bounce and stick) */
.app-shell,.app-shell *{overscroll-behavior:none}
.game-screen{overflow:clip}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text}
@media(orientation:landscape) and (max-height:560px){
 /* V156: the game picture takes touches in landscape too (menus, lists, the PC boxes), as in portrait; the controller's
    buttons lie outside the picture's frame, so the two never overlap */
 .runtime-tools{display:none}
 .app-shell[data-landscape="overlay"] .device-shell{position:relative;display:block;width:min(100vw,calc(100dvh * var(--landscape-w)));max-width:none;height:auto;aspect-ratio:var(--landscape-ratio);padding:0}
 /* V130: the Dynamic Island / notch side gives way by half its safe-area inset (enough to keep a thumb on the dpad or
    A/B off the island); the controller keeps the full screen height and is squeezed a little sideways instead (about
    3.5% on an iPhone 15), so the game still fills the height. The strip left over shows the skin's edge colour. */
 .app-shell[data-landscape="overlay"][data-island]{background:linear-gradient(90deg,var(--edge-left,#000) 50%,var(--edge-right,#000) 50%)}
 .app-shell[data-landscape="overlay"][data-island="left"] .device-shell{--give:calc(var(--sa-left,env(safe-area-inset-left)) / 2);justify-self:end}
 .app-shell[data-landscape="overlay"][data-island="right"] .device-shell{--give:calc(var(--sa-right,env(safe-area-inset-right)) / 2);justify-self:start}
 .app-shell[data-landscape="overlay"][data-island] .device-shell{width:min(calc(100vw - var(--give)),calc(100dvh * var(--landscape-w)));height:min(100dvh,calc((100vw - var(--give)) / var(--landscape-w) * 1.06));aspect-ratio:auto}
 .app-shell[data-landscape="overlay"] .control-deck{position:absolute;inset:0;padding:0;background:transparent}
 .app-shell[data-landscape="overlay"] .landscape-stage{width:100%;height:100%;aspect-ratio:auto}
 .app-shell[data-landscape="overlay"] .game-screen{position:absolute;left:var(--screen-x);top:var(--screen-y);width:var(--screen-w);height:var(--screen-h);aspect-ratio:auto;z-index:2}
}
/* V122: touch areas come straight from skin.json, which already grows small buttons to 44px and splits overlaps
   (scripts/import-v122/import-skins.py separate); a CSS 44px floor would make neighbours overlap again */
.skin-hitbox{width:calc(var(--w) + var(--hit-x)*2);height:calc(var(--h) + var(--hit-y)*2)}
