.touch-controls{display:none;position:fixed;inset:0;pointer-events:none;z-index:12}
.touch-controls,.touch-controls *,.touch-rotate,.touch-rotate *{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.touch-controls [hidden],.touch-rotate[hidden],.touch-rotate [hidden]{display:none!important}
.touch-move-zone{position:absolute;box-sizing:border-box;background:transparent;pointer-events:auto}
.touch-pad{position:absolute;box-sizing:border-box;width:112px;height:112px;border-radius:50%;border:2px solid rgba(255,255,255,.48);background:rgba(20,28,34,.28);pointer-events:auto;display:grid;place-items:center;opacity:.72}
.touch-pad.is-moving{opacity:1;background:rgba(20,28,34,.38);border-color:rgba(255,255,255,.72)}
.touch-pad-label{position:absolute;bottom:6px;font:700 10px/1.2 system-ui,sans-serif;color:rgba(255,255,255,.85);text-shadow:0 1px 3px #000}
.touch-pad i{display:block;box-sizing:border-box;width:48px;height:48px;border-radius:50%;background:rgba(231,236,239,.55);border:1.5px solid rgba(255,255,255,.8);box-shadow:0 2px 8px #0003;pointer-events:none}
.touch-actions{position:absolute;box-sizing:border-box;pointer-events:none}
.touch-actions button,.touch-pause,.touch-interact{box-sizing:border-box;border:1.5px solid rgba(255,255,255,.55);background:rgba(20,28,34,.4);color:#fff;font:700 12px/1.2 system-ui,sans-serif;pointer-events:auto;padding:3px;-webkit-tap-highlight-color:transparent;text-shadow:0 1px 3px #0008}
.touch-actions button{position:absolute;min-width:44px;min-height:44px;border-radius:50%;font-size:11px}
.touch-actions button:active,.touch-pause:active,.touch-interact:active{background:rgba(58,73,83,.8);transform:scale(.94)}
.touch-actions button.is-on{border-color:#ffe0ad;background:rgba(168,120,66,.7);box-shadow:inset 0 0 0 2px rgba(255,224,173,.2)}
.touch-pause{position:absolute;width:44px;height:44px;border-radius:50%;font-size:20px}
.touch-interact{position:absolute;width:52px;height:52px;border-radius:12px}
.touch-fire{position:absolute;box-sizing:border-box;min-width:64px;min-height:64px;border:2px solid rgba(255,235,215,.85);border-radius:50%;background:rgba(214,84,60,.62);color:#fff;pointer-events:auto;padding:0;-webkit-tap-highlight-color:transparent;box-shadow:0 3px 12px #0004}
.touch-fire:active,.touch-fire.is-firing,.touch-fire.is-locked{background:rgba(235,101,66,.85);border-color:#ffe4be}
.touch-fire.is-locked{box-shadow:0 3px 12px #0004,inset 0 0 12px rgba(255,223,174,.25)}
.touch-fire.is-manual{outline:2px solid rgba(255,234,204,.8);outline-offset:-7px}
.touch-fire-knob{position:absolute;left:calc(50% - 14px);top:calc(40% - 14px);width:28px;height:28px;display:grid;place-items:center;pointer-events:none}
.touch-crosshair{position:relative;box-sizing:border-box;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%}
.touch-crosshair:before,.touch-crosshair:after{content:"";position:absolute;background:currentColor}
.touch-crosshair:before{left:-5px;top:6.5px;width:25px;height:2px}
.touch-crosshair:after{left:6.5px;top:-5px;width:2px;height:25px}
.touch-fire-label{position:absolute;left:0;right:0;bottom:10px;font:700 12px/1.2 system-ui,sans-serif;text-align:center;text-shadow:0 1px 3px #0008;pointer-events:none}
.touch-rotate{display:none;position:fixed;inset:0;z-index:2147483647;box-sizing:border-box;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:calc(24px + env(safe-area-inset-top,0px)) calc(20px + env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) calc(20px + env(safe-area-inset-left,0px));background:#0b1216;color:#f5ead9;text-align:center;pointer-events:auto;overflow:auto;overscroll-behavior:contain;font-family:system-ui,sans-serif}
.touch-rotate-glyph{display:grid;place-items:center;flex:none;width:96px;height:96px;border:2px solid rgba(241,207,157,.65);border-radius:50%;color:#f1cf9d;font:400 72px/1 system-ui,sans-serif}
.touch-rotate h2{margin:0;max-width:100%;font-size:22px;line-height:1.5;overflow-wrap:anywhere}
.touch-rotate p{margin:0;max-width:100%;color:#b9c4ca;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.touch-rotate button{box-sizing:border-box;flex:none;min-width:44px;min-height:48px;max-width:100%;padding:12px 20px;border:1.5px solid #ffe7c3;border-radius:12px;background:linear-gradient(180deg,#f1cf9d,#d9a66a);color:#30241b;font:700 15px/1.3 system-ui,sans-serif;pointer-events:auto;-webkit-tap-highlight-color:transparent}
.touch-rotate button:active{transform:scale(.96)}
body.nw-portrait-block{overflow:hidden;overscroll-behavior:none}
#game{touch-action:none}
@media(pointer:coarse){
 body[data-mode="night"]:not(.is-paused):not(.wave-open) .touch-controls{display:block}
 body.nw-portrait-block .touch-controls{display:none!important}
 .touch-rotate:not([hidden]){display:flex}
}
