html,body{height:100%;overscroll-behavior:none}body{-webkit-tap-highlight-color:transparent}canvas,#touchControls,button{-webkit-user-select:none;user-select:none}#touchControls{touch-action:none}.touch .controls{display:none}.settings{max-height:calc(100dvh - 105px);overflow:auto;overscroll-behavior:contain}.topbar{top:max(20px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right))}.settings{right:max(20px,env(safe-area-inset-right))}.move-hint,.look-hint{position:absolute;font-size:8px;letter-spacing:1.4px;color:#d1e3d8;pointer-events:none;text-shadow:0 1px 5px #142b36}.move-hint{left:max(26px,calc(env(safe-area-inset-left) + 10px));bottom:calc(166px + env(safe-area-inset-bottom))}.look-hint{right:max(24px,calc(env(safe-area-inset-right) + 10px));bottom:calc(260px + env(safe-area-inset-bottom));max-width:145px;text-align:right;line-height:1.8;opacity:.6}
.touch .toolbar .icon-button{width:44px;height:44px;touch-action:manipulation}.touch .brand h1{font-size:11px;letter-spacing:1px}.touch .brand p{font-size:6px;letter-spacing:1px}.touch .brand-icon{width:34px;height:34px;font-size:26px}.touch .brand{gap:9px}.touch .live,.touch .scene-label{display:none}.touch .combat-hud{top:88px;left:max(22px,calc(env(safe-area-inset-left) + 12px))}.touch .combat-hud>div{gap:17px;margin-top:10px}.touch .combat-hud p{max-width:180px;font-size:9px;line-height:1.7;margin-top:10px}.touch .combat-hud strong{font-size:17px}.touch .weapon-name{font-size:8px}.touch .hud{right:max(22px,calc(env(safe-area-inset-right) + 12px));bottom:calc(230px + env(safe-area-inset-bottom))}.touch .speed strong{font-size:29px}.touch .coordinates{margin-top:9px}.touch .welcome{bottom:calc(210px + env(safe-area-inset-bottom))}.touch #touchControls{opacity:.96}.touch:not(.playing) #touchControls{visibility:hidden}.touch .settings{z-index:5;top:max(76px,calc(env(safe-area-inset-top) + 56px));width:min(310px,calc(100vw - 40px));max-height:calc(100dvh - 95px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.touch .settings-title button{width:40px;height:40px}.touch .settings .toggle{min-height:46px}.touch .settings .toggle input{width:22px;height:22px}.touch .settings input[type=range]{min-height:28px}.touch .modal-card{width:min(330px,calc(100vw - 32px));z-index:4}.touch .primary{min-height:48px}.touch .text-button{min-height:42px}.touch #toast{top:86px;z-index:6;width:max-content;max-width:calc(100vw - 32px);text-align:center;line-height:1.6}
#joystick{width:120px;height:120px;left:max(20px,calc(env(safe-area-inset-left) + 8px));bottom:calc(35px + env(safe-area-inset-bottom));background:radial-gradient(circle,#d8eee60d 40%,#d8eee620);border:1px solid #def5e166;box-shadow:inset 0 0 0 17px #d8eee606}#stick{width:48px;height:48px;left:35px;top:35px;background:#e1f1d950;border:1px solid #edf9e6aa;box-shadow:0 3px 12px #122b3633}#touchFire{width:80px;height:80px;right:max(24px,calc(env(safe-area-inset-right) + 8px));bottom:calc(57px + env(safe-area-inset-bottom));font-size:29px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 0 0 6px #def4ca0a;background:#d7efbd36;touch-action:none}#touchFire.pressed{background:#d7efbd80;box-shadow:0 0 0 7px #def4ca20}#touchJump{width:57px;height:57px;right:max(35px,calc(env(safe-area-inset-right) + 19px));bottom:calc(162px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:22px}#touchFire small,#touchJump small{font-size:7px;letter-spacing:1px}#touchRun{width:55px;height:55px;right:max(125px,calc(env(safe-area-inset-right) + 109px));bottom:calc(78px + env(safe-area-inset-bottom));font-size:9px}#touchRun.active{background:#d7efbd85;color:#18332c}
@media(max-width:380px){.touch .topbar{left:14px;right:14px}.touch .brand-icon{display:none}.touch .brand h1{font-size:10px}.touch .toolbar{gap:4px}.touch .toolbar .icon-button{width:42px;height:42px}.touch .welcome h2{font-size:27px}.touch .welcome .eyebrow{font-size:7px}}
@media(orientation:landscape) and (max-height:600px){.touch .topbar{top:max(10px,env(safe-area-inset-top));left:max(18px,calc(env(safe-area-inset-left) + 8px));right:max(18px,calc(env(safe-area-inset-right) + 8px))}.touch .combat-hud{top:67px}.touch .combat-hud .weapon-name,.touch .combat-hud p{display:none}.touch .combat-hud>div{gap:15px;margin-top:0}.touch .combat-hud strong{font-size:16px}.touch .hud{bottom:16px;right:calc(205px + env(safe-area-inset-right))}.touch .coordinates,.touch .speed>span{display:none}.touch .speed strong{font-size:24px}.touch .welcome{bottom:32px;left:50%;width:310px;padding:18px;border-radius:12px;background:#20363dd9;backdrop-filter:blur(8px)}.touch .welcome h2{font-size:25px;margin:10px 0 8px}.touch .welcome p{margin:0 0 13px;font-size:10px}.touch .welcome small{font-size:8px}.touch .welcome .eyebrow{font-size:7px}.touch .welcome .primary{padding:12px 18px;min-height:44px}.touch .settings{top:64px;max-height:calc(100dvh - 75px)}.touch .modal-card{padding:22px}.touch .modal-card h2{font-size:25px;margin:10px 0}.touch .modal-card p{margin-bottom:15px}.touch .modal-card .text-button{margin-top:10px}#joystick{bottom:calc(20px + env(safe-area-inset-bottom));width:110px;height:110px}#stick{width:44px;height:44px;left:32px;top:32px}.move-hint{bottom:calc(140px + env(safe-area-inset-bottom))}.look-hint{display:none}#touchFire{bottom:calc(28px + env(safe-area-inset-bottom));width:75px;height:75px}#touchRun{bottom:calc(32px + env(safe-area-inset-bottom));right:max(121px,calc(env(safe-area-inset-right) + 105px))}#touchJump{bottom:calc(123px + env(safe-area-inset-bottom));right:max(33px,calc(env(safe-area-inset-right) + 17px))}}
/* Suppress double-tap zoom without disabling multi-pointer game controls. */
html,body{touch-action:manipulation}button,a,label{touch-action:manipulation}canvas,#touchControls,#joystick,#touchFire,#touchRun,#touchJump{touch-action:none}.webapp-help{margin-top:15px;padding:13px;border:1px solid #d5efbc30;border-radius:8px;background:#d5efbc0a}.webapp-help strong{font-size:11px;font-weight:500;color:#d7efbd}.settings .webapp-help p{margin:8px 0 0;font-size:11px;line-height:1.7}#fullscreenHint{max-width:290px;margin:12px auto 0;color:#e0efce;line-height:1.7}.touch .welcome:has(#fullscreenHint:not([hidden])){bottom:calc(165px + env(safe-area-inset-bottom))}@media(orientation:landscape) and (max-height:600px){.touch .welcome:has(#fullscreenHint:not([hidden])){bottom:18px;padding:14px}.touch #fullscreenHint{font-size:8px;margin-top:8px}}
/* Fixed game scale across the scene, HUD, menus and all control buttons. */
html,body,button,a,label{touch-action:none}.settings{touch-action:pan-y}.settings button,.settings label,.settings input{touch-action:pan-y}.settings input[type=range]{touch-action:pan-x}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* Allow one-finger menu scrolling; omit pinch-zoom at the root. */
html,body{touch-action:pan-x pan-y}
