.touch-device{overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%;--control-bottom:calc(env(safe-area-inset-bottom,0px) + 22px);--stick-size:124px}
.touch-device #game{height:100dvh;min-height:0;touch-action:auto}.touch-device #view{touch-action:none}
.touch-device .topbar,.touch-device .combat-panel,.touch-device .combat-bar,.touch-device .inventory,.touch-device .touch-joystick{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.touch-device [data-tooltip]::after{display:none}.touch-device .tool:hover{background:var(--glass)}
.touch-device .topbar{top:calc(env(safe-area-inset-top,0px) + 10px);left:calc(env(safe-area-inset-left,0px) + 10px);right:calc(env(safe-area-inset-right,0px) + 10px);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.touch-device .identity{min-width:0}.touch-device .identity h1{font-size:18px;line-height:1.2;white-space:normal}.touch-device .identity p{margin:4px 0 0;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
.touch-device .top-tools{gap:4px;margin:0}.touch-device .top-tools .tool{width:44px;height:44px}.touch-device .top-tools svg{width:19px;height:19px}.touch-device #photo{display:none}
.touch-device .battle-hud{position:static;transform:none;grid-column:1/-1;grid-row:2;order:initial;width:100%;height:40px;min-width:0;padding:6px 9px;gap:9px}
.touch-device .mission-number{gap:5px}.touch-device .mission-number strong{font-size:19px}.touch-device .battle-hud small{font-size:8px}.touch-device .mission-progress{flex:1;width:auto;min-width:50px}.touch-device .mission-progress>div:first-child{font-size:8px;gap:3px}.touch-device .mission-progress strong{font-size:11px}.touch-device .wave-track{margin-top:5px}
.touch-device .score,.touch-device .battle-time{padding-left:8px;min-width:55px}.touch-device .score strong,.touch-device .battle-time strong{font-size:12px;min-width:0;margin-top:3px}
.touch-device .combat-panel,.touch-device.boss-active .combat-panel{left:calc(env(safe-area-inset-left,0px) + 10px);top:calc(env(safe-area-inset-top,0px) + 110px);width:166px;padding:6px 7px;background:#202a25d9}
.touch-device .hero-status,.touch-device.boss-active .hero-status{gap:6px}.touch-device .hero-status img,.touch-device.boss-active .hero-status img{width:28px;height:30px}.touch-device .health-row{gap:5px}.touch-device .health-row>strong,.touch-device.boss-active .health-row>strong{font-size:10px}.touch-device .health-row>span{font-size:10px}.touch-device .health-track,.touch-device.boss-active .health-track{height:5px;margin:5px 0 0}
.touch-device .weapon-row,.touch-device .status-label,.touch-device .campaign-progress,.touch-device .weapon-readout,.touch-device .current-kit{display:none}
.touch-device .tactical-map,.touch-device.boss-active .tactical-map{top:calc(env(safe-area-inset-top,0px) + 110px);right:calc(env(safe-area-inset-right,0px) + 10px);width:76px}.touch-device .map-caption{height:24px;padding:3px 4px;gap:2px}.touch-device .map-caption strong{font-size:8px;line-height:10px}.touch-device .map-caption>span{font-size:8px}.touch-device .map-location{display:none}
.touch-device .boss-panel{top:calc(env(safe-area-inset-top,0px) + 164px);left:calc(env(safe-area-inset-left,0px) + 10px);right:calc(env(safe-area-inset-right,0px) + 96px);transform:none;width:auto;max-width:none;padding:6px 8px}.touch-device .boss-panel>div:first-child{gap:7px}.touch-device .boss-panel strong{font-size:11px}.touch-device .boss-panel #boss-phase,.touch-device .boss-panel output{font-size:9px}.touch-device .boss-track{height:4px;margin-top:5px}
.touch-device .combo,.touch-device.boss-active .combo{top:calc(env(safe-area-inset-top,0px) + 214px);right:calc(env(safe-area-inset-right,0px) + 10px)}.touch-device .combo strong{font-size:24px}
.touch-device .combat-bar{inset:0;display:block;pointer-events:none;z-index:4}.touch-device .configuration{position:absolute;left:calc(env(safe-area-inset-left,0px) + 184px);top:calc(env(safe-area-inset-top,0px) + 110px);pointer-events:auto}.touch-device .configure{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%}.touch-device .configure span{display:none}
.touch-device .combat-controls{position:absolute;right:calc(env(safe-area-inset-right,0px) + 18px);bottom:var(--control-bottom);display:grid;grid-template-columns:52px 74px;grid-template-rows:52px 74px;gap:8px;place-items:center;pointer-events:auto;touch-action:none}
.touch-device .combat-controls .tool{width:52px;height:52px;border:1px solid #d5e9df70;background:#233831eb;box-shadow:0 2px 8px #101d1840}.touch-device .combat-controls .tool svg{width:23px;height:23px}.touch-device #grenade{grid-area:1/1;color:#d3e8a6}.touch-device #skill{grid-area:1/2;color:#f7d48c;background:#476046eb}.touch-device #dodge{grid-area:2/1;color:#b2e5f3}.touch-device #fire{grid-area:2/2;width:74px;height:74px}.touch-device #fire svg{width:33px;height:33px}
.touch-device .grenade>span{right:-1px;bottom:-3px;min-width:21px;min-height:20px;font-size:12px}.touch-device .combat-controls button:disabled{opacity:.5}.touch-device .skill span{font-size:17px}
.touch-device .touch-joystick{position:absolute;left:calc(env(safe-area-inset-left,0px) + 18px);bottom:var(--control-bottom);display:grid;place-items:center;width:var(--stick-size);height:var(--stick-size);border-radius:50%;border:1px solid #d2e4d96b;background:#253b3166;box-shadow:inset 0 0 0 10px #d4e6d40a,0 2px 16px #13281b33;z-index:4;touch-action:none;transition:opacity .15s}
.touch-device .joystick-axis{position:absolute;background:#d5e5d92e;pointer-events:none}.touch-device .joystick-axis-x{width:calc(100% - 24px);height:1px}.touch-device .joystick-axis-y{height:calc(100% - 24px);width:1px}
.touch-device .joystick-thumb{display:grid;place-items:center;width:52px;height:52px;border:1px solid #d3ecdfb3;border-radius:50%;color:#eff7e8;background:#60877cdf;box-shadow:0 3px 10px #112b2366;pointer-events:none;will-change:transform}.touch-device .joystick-thumb svg{width:23px;height:23px}.touch-device .touch-joystick.engaged{border-color:#e0f1ccaa;background:#2840348a}.touch-device .touch-joystick.engaged .joystick-thumb{background:#8aa98a;color:#142d26}.touch-device .touch-joystick.unavailable{opacity:.35;pointer-events:none}
.touch-device .inventory{bottom:calc(var(--control-bottom) + 154px);left:50%;transform:translateX(-50%);grid-template-columns:repeat(4,64px);gap:4px;z-index:4}.touch-device .weapon-slot{height:58px;padding:3px;gap:2px}.touch-device .weapon-slot img{width:56px;height:30px}.touch-device .slot-name{display:none}.touch-device .slot-index,.touch-device .slot-rank{font-size:10px;top:3px}.touch-device .slot-ammo{font-size:14px;line-height:16px}
.touch-device .toast,.touch-device.boss-active .toast{top:auto;bottom:calc(var(--control-bottom) + 226px);font-size:11px;line-height:1.4;padding:7px 10px;max-width:calc(100% - 32px)}
.touch-device .nuclear-support{bottom:calc(var(--control-bottom) + 226px);width:360px;max-width:calc(100% - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);padding:10px;gap:8px}.touch-device .nuclear-support strong{font-size:11px}.touch-device .nuclear-support span{font-size:10px}.touch-device .nuclear-support button{min-height:48px;padding:10px;font-size:12px}.touch-device .nuclear-support kbd{display:none}.touch-device:has(.nuclear-support:not([hidden])) .toast{opacity:0}
.touch-device.cinematic .touch-joystick,.touch-device.result-shown .touch-joystick{visibility:hidden;pointer-events:none}.touch-device .loading h2{font-size:28px}.touch-device .lens{box-shadow:inset 0 0 45px #0d181e29}
.touch-device dialog{width:min(820px,calc(100% - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);touch-action:pan-y;overscroll-behavior:contain}.touch-device .garage-header{padding:14px 16px 10px}.touch-device .garage-header h2{font-size:20px}.touch-device .garage-tools .tool{width:44px;height:44px}.touch-device .garage-tabs{padding:0 16px}.touch-device .garage-tabs button{min-height:44px}.touch-device .choices{padding:14px 16px;min-height:0}.touch-device .garage-footer{padding:12px 16px;gap:10px}.touch-device .garage-footer .depart{min-width:124px;min-height:44px}.touch-device .garage-footer>span{min-width:0;max-width:none;font-size:10px}
.touch-device .render-settings{inset:calc(env(safe-area-inset-top,0px) + 62px) calc(env(safe-area-inset-right,0px) + 10px) auto auto;max-width:calc(100% - 20px)}.touch-device .render-settings select{font-size:16px;min-height:44px}
.touch-device .campaign-victory{padding:calc(env(safe-area-inset-top,0px) + 18px) calc(env(safe-area-inset-right,0px) + 16px) calc(env(safe-area-inset-bottom,0px) + 18px) calc(env(safe-area-inset-left,0px) + 16px);touch-action:pan-y}.touch-device .victory-content>h2{font-size:26px}.touch-device .victory-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.touch-device .victory-stats dd{font-size:18px}.touch-device .leaderboard-form input{font-size:16px;height:44px;touch-action:manipulation}.touch-device .leaderboard .leaderboard-submit{height:44px;min-width:104px}.touch-device .leaderboard .leaderboard-refresh{width:44px;height:44px;min-width:44px}.touch-device .leaderboard-list{max-height:180px;touch-action:pan-y}.touch-device .leaderboard-row{grid-template-columns:22px minmax(0,1fr) max-content;gap:6px;padding:8px 3px}.touch-device .leaderboard-identity strong,.touch-device .leaderboard-score{font-size:11px}.touch-device .result-actions{gap:16px}.touch-device .result-actions button,.touch-device .victory-content>button,.touch-device #resume{min-height:44px}.touch-device .result-actions .depart{min-width:140px}
@media(orientation:portrait){
  .touch-device .nuclear-support{top:calc(env(safe-area-inset-top,0px) + 110px);bottom:auto;padding:7px 10px}
  .touch-device:has(.nuclear-support:not([hidden])) .combat-panel,.touch-device:has(.nuclear-support:not([hidden])) .configuration,.touch-device:has(.nuclear-support:not([hidden])) .tactical-map{visibility:hidden}
  .touch-device:has(.nuclear-support:not([hidden])) .boss-panel{top:calc(env(safe-area-inset-top,0px) + 182px);right:calc(env(safe-area-inset-right,0px) + 10px)}
}
@media(orientation:landscape){
  .touch-device{--control-bottom:calc(env(safe-area-inset-bottom,0px) + 14px);--stick-size:110px}
  .touch-device .topbar{grid-template-columns:minmax(100px,1fr) minmax(0,340px) auto;gap:8px}.touch-device .identity h1{font-size:16px}.touch-device .identity p{font-size:9px}.touch-device .battle-hud{grid-column:auto;grid-row:auto;padding:6px 8px;gap:7px}
  .touch-device .combat-panel,.touch-device.boss-active .combat-panel,.touch-device .configuration{top:calc(env(safe-area-inset-top,0px) + 64px)}.touch-device .tactical-map,.touch-device.boss-active .tactical-map{top:calc(env(safe-area-inset-top,0px) + 64px);width:90px}
  .touch-device .boss-panel{top:calc(env(safe-area-inset-top,0px) + 64px);left:calc(env(safe-area-inset-left,0px) + 238px);right:calc(env(safe-area-inset-right,0px) + 110px)}.touch-device .combo{display:none}
  .touch-device .combat-controls{grid-template-columns:48px 68px;grid-template-rows:48px 68px}.touch-device .combat-controls .tool{width:48px;height:48px}.touch-device #fire{width:68px;height:68px}.touch-device .joystick-thumb{width:48px;height:48px}
  .touch-device .inventory{bottom:calc(var(--control-bottom) + 4px);grid-template-columns:repeat(4,56px)}.touch-device .weapon-slot{height:56px}.touch-device .weapon-slot img{width:48px;height:28px}
  .touch-device .toast,.touch-device.boss-active .toast{bottom:calc(var(--control-bottom) + 74px);max-width:calc(100% - 310px)}.touch-device .nuclear-support{bottom:calc(var(--control-bottom) + 80px);width:340px}.touch-device .choices{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.touch-device .choice img{height:100px}.touch-device .choice>span{font-size:11px;padding:7px 8px 0}.touch-device .choice small{font-size:9px;padding:5px 8px 9px}.touch-device .victory-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
}
