#touch-ui,#touch-tools,#touch-orientation{display:none}
.touch-mode{--touch-gold:#ddbd7f;--touch-dark:#14241fe6;overscroll-behavior:none}
.touch-mode button{touch-action:manipulation;min-height:44px}
.touch-mode #game{touch-action:none}.touch-mode #game canvas{touch-action:none}
.touch-mode #touch-tools{display:none;position:absolute;z-index:36;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));gap:5px}
.touch-mode.touch-playing #touch-tools{display:flex}
#touch-tools button{padding:6px 12px;background:#14241fcc;font-size:12px}
.touch-playing #touch-ui{display:block;position:absolute;inset:0;pointer-events:none;z-index:28;user-select:none;-webkit-user-select:none}
#touch-look{position:absolute;right:0;top:0;width:65%;height:100%;touch-action:none;pointer-events:auto}
#touch-stick{position:absolute;left:max(24px,env(safe-area-inset-left));bottom:22px;width:120px;height:120px;border-radius:50%;border:2px solid #e3d2a865;background:#14241f55;pointer-events:auto;touch-action:none}
#touch-thumb{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;background:#dec184bb;border:1px solid #f5e4ba}
#touch-stick small{position:absolute;top:124px;left:0;width:100%;text-align:center;font-size:10px;color:#f4e9ca}
#touch-fire{position:absolute;right:max(28px,env(safe-area-inset-right));bottom:84px;width:76px;height:76px;border-radius:50%;background:#ddbd7fc9;color:#17281f;border:2px solid #f4e3ba;font-size:18px;pointer-events:auto;touch-action:none}
.touch-actions{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:22px;display:flex;gap:6px;pointer-events:auto}
.touch-actions button{width:50px;height:48px;padding:0;border-radius:12px;background:#14241fbb;font-size:12px;touch-action:none}
#touch-ui .held{background-color:#e8ca8f!important;color:#14241f!important}
#touch-help-panel{position:absolute;z-index:100;inset:12px;max-width:540px;margin:auto;padding:20px;background:#14241ff5;border:1px solid #ddbd7f80;border-radius:12px;overflow:auto;color:#eadfc6}
#touch-help-panel h2{font-size:22px;margin:0 0 8px}#touch-help-panel p{font-size:12px;color:#ddbd7f}#touch-help-panel dl{display:grid;grid-template-columns:120px 1fr;gap:12px;font-size:13px;line-height:1.5}#touch-help-panel dd{margin:0;color:#bac8b9}#touch-help-close{width:100%}
.touch-mode .toolbar,.touch-mode #network-roster,.touch-mode #pointer-lock-notice{display:none!important}
.touch-mode #map-panel{top:8px!important;right:8px!important;width:84px!important;padding:5px!important;pointer-events:none}
.touch-mode #district,.touch-mode #map-panel small{display:none!important}
.touch-mode #combat-hud{bottom:88px!important;left:50%!important;transform:translateX(-50%);width:186px!important;padding:7px!important;background:#14241f99;pointer-events:none}
.touch-mode #combat-hud .combat-sub,.touch-mode #combat-hud button,.touch-mode #combat-mode-label{display:none!important}
.touch-mode .combat-health-head{font-size:12px}.touch-mode #combat-hud .combat-wallet{display:none}
.touch-mode footer{left:50%!important;right:auto!important;bottom:6px!important;transform:translateX(-50%);width:208px!important;padding:0!important;z-index:35!important}
.touch-mode .weapon-panel{width:100%;padding:5px!important}.touch-mode .weapon-readout{height:25px;min-height:0!important;justify-content:center!important;margin:0!important}.touch-mode .weapon-readout>div:first-child,.touch-mode .ammo small{display:none!important}.touch-mode .ammo b{font-size:19px!important}.touch-mode .slots button{font-size:11px;padding:2px!important;min-height:44px}
.touch-mode #round-hud{top:8px!important;left:50%!important;transform:translateX(-50%);width:180px!important;max-width:180px!important;padding:5px!important;pointer-events:none}.touch-mode #round-hud ol{max-height:42px;overflow:hidden}
.touch-mode #entry{max-height:calc(100% - 20px);overflow:auto;max-width:520px}
.touch-mode #multiplayer-lobby,.touch-mode #combat-shop{width:calc(100% - 24px)!important;max-width:650px;max-height:calc(100% - 16px)!important;overflow-y:auto!important;overscroll-behavior:contain}
.touch-mode #multiplayer-lobby input,.touch-mode #multiplayer-lobby select,.touch-mode #combat-shop select{font-size:16px!important;min-height:44px}
.touch-mode .character-option{min-height:62px}.touch-mode .character-picker{position:static!important}
.touch-mode #combat-products{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 12px 12px}.touch-mode .combat-heading{padding:12px}.touch-mode #combat-death{padding:16px;max-height:calc(100% - 24px);overflow:auto}
@media(orientation:portrait){.touch-mode.touch-playing #touch-orientation{display:block;position:absolute;top:58px;left:8px;right:100px;font-size:11px;color:#f1d69e;z-index:29;pointer-events:none}.touch-mode #round-hud{top:92px!important;left:8px!important;transform:none}.touch-mode footer{bottom:165px!important}.touch-mode #combat-hud{bottom:247px!important}.touch-mode .character-options{grid-template-columns:repeat(2,1fr)!important}.touch-mode #touch-help-panel dl{grid-template-columns:90px 1fr}}
#touch-aim[aria-pressed=true]{background:#ddbd7f;color:#14241f}
@media(orientation:portrait){.touch-mode.touch-playing #touch-orientation{top:200px;left:12px;right:12px;padding:8px 10px;background:#14241fe6;border-radius:6px;line-height:1.5}}
