* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width:100%; height:100%; margin:0; overflow:hidden; overscroll-behavior:none; background:#fff; }
body { font-family:Arial,sans-serif; user-select:none; -webkit-user-select:none; touch-action:none; }
#app { position:fixed; top:0;right:0;bottom:0;left:0; overflow:hidden; touch-action:none; }
#stage { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
#game, #controls { position:absolute; top:0;right:0;bottom:0;left:0; width:100%; height:100%; }
#controls { pointer-events:none; }
.control { position:absolute; display:block; padding:0; margin:0; border:0; border-radius:4px; background:transparent; color:transparent; pointer-events:auto; cursor:pointer; touch-action:none; }
.control:focus-visible { outline:4px solid #0077d9; outline-offset:2px; background:rgb(0 119 217 / 10%); }
.control:disabled { cursor:default; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
#status { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); max-width:90vw; margin:0; padding:12px 18px; background:#fff; color:#333; text-align:center; border-radius:6px; z-index:2; }
#status[hidden] { display:none; }
#status.notice { top:auto; bottom:max(6px,env(safe-area-inset-bottom)); transform:translateX(-50%); padding:5px 10px; font-size:12px; pointer-events:none; background:rgb(255 255 255 / 90%); }
#help { position:fixed; top:0;right:0;bottom:0;left:0; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; background:#fff; color:#333; touch-action:auto; }
#help[open] { display:flex; flex-direction:column; }
.help-toolbar { flex:none; padding:calc(2px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 2px max(16px,env(safe-area-inset-left)); }
#help-close { display:block; width:clamp(44px,8vmin,80px); height:clamp(44px,8vmin,80px); padding:0; border:0; background:transparent; cursor:pointer; }
#help-close img { display:block; width:100%; height:100%; object-fit:contain; }
#help-close:focus-visible { outline:4px solid #0077d9; outline-offset:2px; }
#help-frame { flex:1; min-height:0; width:100%; border:0; background:#f1f1f1; }
