html, body { position:fixed; inset:0; width:100%; height:100%; overflow:hidden; overscroll-behavior:none; background:#09090b!important; }
#canvas { position:fixed!important; left:50%!important; top:50%!important;
  width:min(100vw,calc(100vh * 16 / 9))!important; height:min(100vh,calc(100vw * 9 / 16))!important;
  width:min(100vw,calc(100dvh * 16 / 9))!important; height:min(100dvh,calc(100vw * 9 / 16))!important; max-width:none!important; max-height:none!important;
  transform:translate(-50%,-50%)!important; object-fit:contain; }
#sky-controls { position:fixed; inset:0; pointer-events:none; z-index:1000; user-select:none; }
#sky-controls[hidden] { display:none; }
#sky-controls[data-battle="0"] { display:none; }
.sky-control { pointer-events:auto; touch-action:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent;
  color:#ffe7a2; background:rgba(10,18,34,.82); border:2px solid #d2ae63; font:bold 14px system-ui; }
#sky-stick { position:absolute; left:max(16px,env(safe-area-inset-left)); bottom:max(16px,env(safe-area-inset-bottom));
  width:132px; height:132px; border-radius:50%; display:grid; place-items:center; }
#sky-thumb { display:block; width:52px; height:52px; border-radius:50%; border:2px solid #ffe7a2; background:#d2ae6377; pointer-events:none; }
#sky-actions { position:absolute; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); display:flex; gap:12px; align-items:flex-end; }
#sky-actions button { width:64px; height:64px; border-radius:50%; }
#sky-actions [data-action=fire] { width:80px; height:80px; border-color:#ff9386; color:#ffc0b8; }
.sky-control.held { background:#b99442; color:#101827; }
#sky-tools { position:fixed; left:max(12px,env(safe-area-inset-left)); top:max(12px,env(safe-area-inset-top)); z-index:1001; display:flex; gap:8px; }
#sky-tools button { min-height:44px; padding:8px 12px; border-radius:8px; }
#sky-controls [data-action=pause] { position:absolute; left:max(12px,env(safe-area-inset-left)); top:64px; min-width:64px; min-height:44px; border-radius:8px; }
/* Leave the wallet's top-right return control clear. */
#sm-pill, #sm-panel { top:max(64px,env(safe-area-inset-top)); right:max(12px,env(safe-area-inset-right)); }
@media (max-width:380px) { #sky-stick { width:116px; height:116px; } #sky-actions { gap:8px; } #sky-actions button { width:56px; height:56px; } #sky-actions [data-action=fire] { width:68px; height:68px; } }

#sky-controls.sky-left-handed #sky-stick{left:auto;right:max(16px,env(safe-area-inset-right))}
#sky-controls.sky-left-handed #sky-actions{right:auto;left:max(16px,env(safe-area-inset-left))}
#sky-wallet-toggle[data-pending="true"]{border-color:#ffe7a2;color:#ffe7a2}
.sky-control:focus-visible{outline:3px solid #ffe7a2;outline-offset:3px}
