/* The game owns multi-touch; scrollable menus retain one-finger scrolling. */
html,body{touch-action:pan-x pan-y;overscroll-behavior:none}
body.playing #game,body.playing #touch,body.playing #touch button{touch-action:none;-webkit-touch-callout:none}
body.playing dialog{touch-action:pan-y}
.touch-controls #joystick{position:fixed;left:max(20px,8vw);top:38%;bottom:auto;transform:translateY(-50%);width:136.136px;height:136.136px;border:1px solid #ffffff38;border-radius:50%;background:#ffffff12;box-shadow:none}
.touch-controls #joystick div{width:40%;height:40%;left:30%;top:30%;border-radius:50%;border:1px solid #ffffff42;background:#25404c88;box-shadow:none}
.touch-controls #joystick>span{display:none}
.touch-controls .touch-actions{position:fixed;right:max(18px,env(safe-area-inset-right));top:auto;bottom:max(14px,env(safe-area-inset-bottom));width:164px;height:clamp(240px,76vh,320px);display:block;pointer-events:none}
.touch-controls .touch-actions button{position:absolute;width:60px;height:60px;min-width:0;min-height:0;padding:12px;border:2px solid #ffffff85;border-radius:50%;background:#183238ad;box-shadow:none;display:flex;align-items:center;justify-content:center;gap:0;touch-action:none;text-shadow:none}
.touch-controls .touch-actions svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.touch-controls .touch-actions .action-symbol{width:100%;height:100%;font-size:28px;display:flex;align-items:center;justify-content:center}
.touch-controls .touch-actions .button-caption,.touch-controls #touch-attack-label,.touch-controls #touch-lock .lock-state{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.touch-controls #touch-sprint{right:0;top:0;background:#385b4599}
.touch-controls #touch-sprint[aria-pressed=true]{background:#69b67aaa;border-color:#c2f8c8}
.touch-controls #touch-interact{right:0;top:25%}
.touch-controls #touch-build{right:0;top:50%;border-color:#ffffff85}
.touch-controls #touch-attack{right:82px;bottom:25%;width:72px;height:72px}
.touch-controls #touch-lock{right:82px;top:0;width:48px;height:48px;padding:9px;background:#48616b88}
.touch-controls #touch-lock[aria-pressed=true]{background:#e6f2f3a8;color:#203437;border-color:white}
.touch-controls #touch-jump{right:0;bottom:0;width:76px;height:76px;background:#46626975;padding:17px}
.touch-controls .touch-actions button.held{background:#647e869e!important;transform:scale(.96)}
.touch-controls .bottom-hud{width:min(60vw,calc(100vw - 360px),720px);bottom:calc(10px + env(safe-area-inset-bottom));z-index:9}
.touch-controls .health-row{display:none}.touch-controls .health-track{height:24px;border:2px solid #e9eeee;background:#44282c;box-shadow:none;margin-bottom:4px}.touch-controls #health{background:#ee6268}.touch-controls #health-text{font-size:14px;text-shadow:0 1px 2px #55232a}
.touch-controls #selected-item{font-size:11px;min-height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:3px}
.touch-controls .inventory-row{gap:3px}.touch-controls #hotbar{gap:3px;padding:0;scrollbar-width:none;justify-content:flex-start;touch-action:pan-x}
.touch-controls #hotbar button,.touch-controls #hotbar .empty-slot{width:48px;min-width:48px;height:50px;flex:0 0 48px;border:1px solid #ffffff85;background:#4655639e;border-radius:0}
.touch-controls #hotbar button.active{border:2px solid white;background:#91b1c286}
.touch-controls #hotbar .slot-icon{height:34px;margin:3px 0 0}.touch-controls #hotbar .slot-icon img{width:34px;height:34px}
.touch-controls #hotbar .slot-name{display:none}.touch-controls #hotbar .slot-count{font-size:12px;right:3px;top:auto;bottom:2px}.touch-controls #inventory-prev{display:none}.touch-controls #inventory-next{width:28px;min-width:28px;height:50px;font-size:0;padding:0;background:#4655639e;border:1px solid #ffffff85}.touch-controls #inventory-next::after{content:'•••';font-size:12px}
.touch-controls.playing .brand{display:none}.touch-controls.playing header{top:10px;left:14px;right:14px;justify-content:flex-end;pointer-events:none}.touch-controls.playing .header-right{pointer-events:auto;gap:5px}.touch-controls.playing header button{min-height:44px;height:44px}.touch-controls .icon-button{width:44px}
.touch-controls .top-hud{top:64px;left:14px;right:14px}.touch-controls .match-chip{padding:5px 8px;min-width:0}.touch-controls #team-board>div{padding:4px 6px}.touch-controls .objective{display:none}.touch-controls #feed{top:92px;right:190px;font-size:11px}.touch-controls .shop-button{top:10px;left:66px;right:auto;bottom:auto;min-height:44px;padding:7px 10px}.touch-controls .pause-button{top:10px;left:14px;right:auto;bottom:auto;width:44px;height:44px;padding:5px}.touch-controls #toast{top:27%;max-width:58vw;font-size:13px}
@media(orientation:portrait){.touch-controls #joystick{top:auto;bottom:218px;left:14px;transform:none;width:132.132px;height:132.132px}.touch-controls .touch-actions{right:14px;top:auto;bottom:172px;height:300px;width:164px}.touch-controls .bottom-hud{width:calc(100vw - 20px);bottom:calc(12px + env(safe-area-inset-bottom))}.touch-controls #feed{top:108px;right:14px}.touch-controls .top-hud{top:64px}.touch-controls .shop-button{top:106px;left:14px}.touch-controls #toast{max-width:90vw;top:24%}.touch-controls #hotbar button,.touch-controls #hotbar .empty-slot{height:56px;min-width:50px;flex-basis:50px}.touch-controls #inventory-next{height:56px}}
@media(orientation:landscape){.touch-controls .top-hud{right:190px}.touch-controls #team-board{gap:3px}.touch-controls #team-board>div{min-width:58px}}
@media(orientation:landscape) and (max-height:350px){.touch-controls .touch-actions{top:auto;height:240px;bottom:max(10px,env(safe-area-inset-bottom))}.touch-controls .touch-actions button{width:48px;height:48px;padding:10px}.touch-controls #touch-jump{width:64px;height:64px}.touch-controls #touch-attack{width:60px;height:60px;right:74px}.touch-controls #touch-lock{width:44px;height:44px;right:74px}.touch-controls #joystick{width:120.12px;height:120.12px}.touch-controls .bottom-hud{width:min(60vw,calc(100vw - 340px))}}

/* Separate left column: Shift Lock, Home, Attack. Keep Jump clear below. */
.touch-controls #touch-home{right:82px;top:25%;bottom:auto;width:60px;height:60px;padding:8px 10px 6px;display:flex;flex-direction:column;gap:1px;background:#244d50b8;border-color:#99e9d7}
.touch-controls #touch-home svg{width:27px;height:27px;flex-shrink:0}
.touch-controls #touch-home-label{font-size:12px;line-height:1;white-space:nowrap;pointer-events:none}
.touch-controls #touch-home[aria-pressed=true]{background:#367c70db;border-color:#d3fff3;color:#fff}
.touch-controls #touch-home:disabled{opacity:.4}
@media(orientation:landscape) and (max-height:350px){.touch-controls #touch-home{right:74px;width:52px;height:52px;padding:5px}.touch-controls #touch-home svg{width:24px;height:24px}.touch-controls #touch-home-label{font-size:11px}}
