#touch-controls{position:fixed;inset:0;z-index:4;pointer-events:none;touch-action:none;user-select:none;-webkit-user-select:none}
#touch-controls button,#touch-stick,#touch-look{pointer-events:auto;touch-action:none}
#touch-controls button{min-height:44px;min-width:48px;border:1px solid #dcebe870;border-radius:12px;background:#10222bae;color:#edf6f2;font:bold 9px Arial;padding:9px;box-shadow:0 2px 8px #0003}
#touch-controls button.pressed{background:#3b766be0;border-color:#acf0db}
#touch-look{position:absolute;inset:44px 0 0 36%;background:transparent}
#touch-look>span{position:absolute;left:25%;top:14%;font:9px Arial;color:#ffffff70;pointer-events:none}
#touch-stick{position:absolute;left:max(22px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));width:126px;height:126px;border-radius:50%;border:1px solid #dcebe870;background:#10222b65}
#touch-stick i{position:absolute;left:39px;top:39px;width:46px;height:46px;border-radius:50%;background:#c9e8de70;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
#touch-stick>span{position:absolute;bottom:8px;left:0;width:100%;text-align:center;font:8px Arial;color:#e2eee9;pointer-events:none}
.touch-top{position:absolute;right:max(10px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));display:flex;gap:6px}
.touch-slots{position:absolute;left:max(155px,calc(env(safe-area-inset-left) + 140px));bottom:max(8px,env(safe-area-inset-bottom));display:flex;gap:5px}
.touch-actions{position:absolute;right:max(10px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,58px);gap:6px;align-items:end}
#touch-controls .touch-fire{background:#a75d2bbd;min-height:58px;border-color:#f5bb79}
#touch-rotate{position:fixed;inset:0;z-index:120;background:#10191ef5;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:16px;padding:32px;font:16px Arial;color:#e5f3ef}
#touch-rotate strong{font-size:25px}#touch-rotate span{max-width:300px;line-height:1.6;color:#acc4bd}
body.touch-device #game{touch-action:none}body.touch-device{overscroll-behavior:none}
@media(orientation:landscape){
body.touch-device .radar-panel{width:88px;height:88px;left:max(10px,env(safe-area-inset-left));top:8px}body.touch-device .radar-panel canvas{width:76px;height:76px}
body.touch-device .top-left{top:101px;left:12px}body.touch-device .top-left strong{font-size:8px}
body.touch-device .top-right,body.touch-device .case-points-hud,body.touch-device .weapon-status .equipment,body.touch-device #weapon-hint,body.touch-device #weapon-mechanic{display:none}
body.touch-device .feed{top:60px;right:12px}body.touch-device .feed>div{font-size:8px}
body.touch-device .bottom-left{bottom:60px;left:calc(50% - 70px);gap:12px}body.touch-device .health-status strong{font-size:23px}body.touch-device .armor-status strong{font-size:17px}
body.touch-device .weapon-status{bottom:155px;right:15px;min-width:100px}body.touch-device .weapon-status strong{font-size:24px}
body.touch-device .mission-strip{left:155px;bottom:65px;max-width:100px}body.touch-device .mission-strip>span{font-size:7px}body.touch-device .mission-strip small{font-size:16px}
body.touch-device .prep-hint{bottom:110px;font-size:8px}body.touch-device .tactical-roster{display:none}
body.touch-device .panel{max-height:90dvh;overflow-y:auto}body.touch-device .menu.menu-upgraded{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
}
@media(orientation:landscape) and (max-width:640px){.touch-actions{grid-template-columns:repeat(4,52px);gap:5px}#touch-controls button{padding:6px;font-size:8px}.touch-slots{gap:3px}.touch-slots button{min-width:44px}}
