/* The map fills the phone; commands live in a sliding drawer. */
.mobile-command-bar,.mobile-map-tools,.fine-adjust,.mobile-gesture-hint,.mobile-other,.mobile-help,.mobile-menu-toggle,.touch-deck{display:none}
.range-adjust{display:flex;align-items:center;min-width:0}.range-adjust input{flex:1;min-width:0}
.mobile-dialog-head,.mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-dialog-head h2,.mobile-menu-head h2{margin:0}.mobile-dialog-head button,.mobile-menu-head button{flex:0 0 44px;width:44px;height:44px;border:1px solid #536360;background:#223234;border-radius:8px;font-size:27px}
.mobile-report-body{line-height:2!important}.mobile-report-body .report-chip{margin-right:5px}
.practice-panel{position:absolute;top:45px;left:15px;z-index:2;display:flex;flex-direction:column;gap:3px;padding:9px 12px;border:1px solid #9eae8170;background:#13272bdc;border-radius:6px;pointer-events:none;font:12px var(--sans);color:#dce7c6}.practice-panel[hidden]{display:none}.practice-panel strong{color:#b9e4a4}.practice-panel small{font-size:10px;color:#b2c6bd}
.tactical{flex-wrap:wrap}#repair{white-space:nowrap}#repairCount{color:#a9d495}
noscript{position:fixed;bottom:0;left:0;right:0;z-index:1000;padding:14px;background:#392a20;color:#ffe3b5;font:14px/1.5 var(--sans)}
body.mobile{overflow:hidden;overscroll-behavior:none}.mobile button{touch-action:manipulation}.mobile .move-buttons button,.mobile #touchAimLeft,.mobile #touchAimRight{touch-action:none}
.mobile .app{width:100%;max-width:none;height:100vh;height:100dvh;margin:0;padding:0 env(safe-area-inset-right) 0 env(safe-area-inset-left);display:block;background:#14272e}
.mobile .topbar,.mobile .battle-heading,.mobile main>footer,.mobile main>.shot-report{display:none}.mobile main{height:100%;display:block;padding:0;margin:0}.mobile .arena-shell{position:relative;width:100%;height:100%;margin:0;border:0;border-radius:0;overflow:hidden;background:#15262b;display:block}
.mobile .canvas-wrap{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;overflow:hidden;background:#172c34;touch-action:none}.mobile #battlefield{position:absolute;left:0;top:0;max-width:none;transform-origin:0 0;touch-action:none}
.mobile .arena-top{position:absolute;top:0;left:0;right:0;height:calc(45px + env(safe-area-inset-top));padding:calc(5px + env(safe-area-inset-top)) 8px 5px;gap:8px;z-index:3;background:linear-gradient(#0e1c21ed,#112a30b8);align-items:center;pointer-events:none}
.mobile .tank-card{width:calc((100% - 92px)/2);min-width:0;gap:0;margin:0;padding:2px 6px;align-self:stretch;border:0;background:transparent}.mobile .tank-card .avatar{display:none}.mobile .tank-card>div:last-child{min-width:0;flex:1}.mobile .tank-title{font:9px var(--sans);letter-spacing:0;margin-bottom:3px;gap:5px}.mobile .tank-title strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.mobile .tank-title>span{font:18px/18px var(--mono)}.mobile .health-track{height:3px;border-radius:3px;overflow:hidden}.mobile .tank-sub{display:none}
.mobile .weather{min-width:76px;width:76px;padding:0;align-self:center}.mobile .weather .eyebrow{font:7px var(--sans);gap:4px;letter-spacing:0}.mobile .weather>div:nth-child(2){gap:5px;height:22px}.mobile .weather strong{font-size:18px}.mobile .weather #windArrow{font-size:23px}.mobile .weather small,.mobile .wind-track,.mobile .map-label{display:none}
.mobile .arena-bottom{position:absolute;top:calc(51px + env(safe-area-inset-top));left:8px;right:auto;bottom:auto;max-width:calc(100% - 132px);min-height:25px;padding:6px 8px;background:#12262cc4;border:0;border-radius:5px;font:9px var(--sans);letter-spacing:0;z-index:2;pointer-events:none}.mobile .arena-bottom>span{gap:5px}.mobile #turnHint{display:none}.mobile .arena-bottom .live-dot{width:5px;height:5px}
.mobile .announcement{top:25%;width:92%;font-size:20px;letter-spacing:1.3px;pointer-events:none}.mobile .announcement small{font:11px/1.5 var(--sans);letter-spacing:0}.mobile .supply-toast{top:88px;right:8px;max-width:180px;padding:7px 9px;pointer-events:none}.mobile .supply-toast span,.mobile .supply-toast b{font-size:9px}
.mobile .mobile-menu-toggle{display:flex;align-items:center;justify-content:center;gap:7px;position:absolute;top:calc(50px + env(safe-area-inset-top));right:8px;min-width:92px;height:44px;padding:5px 10px;border:1px solid #9b9568;border-radius:8px;background:#233335e8;color:#f1d7a4;font:20px var(--sans);z-index:4}.mobile #touchWeapon{max-width:84px;overflow:hidden;text-overflow:ellipsis;font:11px var(--sans)}
.mobile #mobileGestureMode{position:absolute;left:8px;bottom:calc(78px + env(safe-area-inset-bottom));z-index:3;display:block;min-width:75px;min-height:44px;border:1px solid #667e7c;border-radius:7px;background:#142c33d9;color:#d3e4d8;font:12px var(--sans);padding:5px 10px}.mobile #mobileGestureMode[aria-pressed=true]{border-color:#bca674;color:#ffda99}
.mobile .mobile-other{display:block;position:absolute;top:44%;min-height:44px;max-width:100px;padding:6px 8px;border:1px solid #b9865d;border-radius:7px;background:#34291fc4;color:#ffd19e;font:9px var(--sans);z-index:2}.mobile .mobile-other[hidden]{display:none}
.mobile .touch-deck{position:absolute;left:0;right:0;bottom:0;z-index:3;display:grid;grid-template-columns:128px minmax(65px,1fr) 52px;gap:10px;align-items:end;padding:14px 8px calc(8px + env(safe-area-inset-bottom));background:linear-gradient(#0d202600,#10242bd9 45%,#10242bf2);color:#d2dfd2}
.mobile .touch-aim small{display:block;text-align:center;font:7px var(--sans);letter-spacing:1px;margin-bottom:2px}.mobile .touch-aim>div{display:grid;grid-template-columns:44px 40px 44px;align-items:center}.mobile .touch-aim button{height:44px;width:44px;border:1px solid #63808099;background:#1b353dbf;border-radius:7px;color:#c8e4de;font-size:17px}.mobile #touchAngle{text-align:center;font:15px var(--mono)}
.mobile .touch-power{display:block;min-width:0;margin:0;color:#b5c7bf;font:8px var(--sans);letter-spacing:.6px}.mobile .touch-power output{float:right;color:#f1d0a0;font:13px var(--mono);letter-spacing:0}.mobile .touch-power input{display:block;width:100%;height:44px;margin:0;touch-action:none}
.mobile #touchFire{width:52px;height:52px;padding:3px;border:1px solid #f3d599;border-radius:12px;background:linear-gradient(#f3ca82,#cfa15e);color:#26322d;font:bold 8px var(--sans);letter-spacing:.6px;box-shadow:0 2px 12px #0004}.mobile #touchFire span{display:block;font:27px/28px var(--sans)}.mobile #touchFire:disabled{opacity:.4}
.mobile .mobile-gesture-hint{display:block;position:absolute;left:95px;right:8px;bottom:calc(84px + env(safe-area-inset-bottom));margin:0;padding:5px 7px;text-align:center;color:#cfdfd7;background:#14262bb0;border-radius:4px;font:9px/1.3 var(--sans);pointer-events:none}.mobile .mobile-gesture-hint[hidden]{display:none}.mobile .map-scale{bottom:calc(138px + env(safe-area-inset-bottom));right:10px}
.mobile .practice-panel{top:calc(99px + env(safe-area-inset-top));left:8px;max-width:calc(100% - 16px);padding:6px 8px;gap:2px;font-size:10px}.mobile .practice-panel small{font-size:9px}
.mobile .mobile-menu-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:min(360px,94vw);max-width:none;height:100vh;height:100dvh;max-height:100dvh;padding:calc(12px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));border:0;border-left:1px solid #6d8078;border-radius:14px 0 0 14px;background:#15282eef;color:#d9e2d6;overflow-y:auto;overscroll-behavior:contain;animation:command-in .18s ease-out}.mobile .mobile-menu-dialog::backdrop{background:#07171f60}.mobile .mobile-menu-head{position:sticky;top:calc(-12px - env(safe-area-inset-top));z-index:4;background:#15282ef2;padding:5px 0 9px}.mobile .mobile-menu-head small{font:8px var(--mono);letter-spacing:1px;color:#b9b68c}.mobile .mobile-menu-head h2{font:19px var(--sans);margin:3px 0 0}.mobile .mobile-menu-actions{display:flex;flex-wrap:wrap;gap:6px;padding:7px 0;border-bottom:1px solid #3d5459}.mobile .mobile-menu-actions nav{display:flex;gap:6px;flex:1;flex-wrap:wrap}.mobile .mobile-menu-actions nav button{min-height:44px;padding:6px 9px;border:1px solid #49605f;border-radius:6px;font:11px var(--sans)}.mobile .mobile-menu-actions nav button span{display:inline}.mobile .mobile-menu-actions #fullscreen{height:44px;min-width:44px;border:1px solid #49605f;border-radius:6px;font:20px var(--sans);padding:5px}.mobile #fullscreen span{display:inline;font:11px var(--sans)}
.mobile .mobile-map-tools{display:grid;grid-template-columns:1fr 1fr 44px 44px;gap:5px;order:3;width:100%}.mobile .mobile-map-tools button{height:44px;min-width:44px;border:1px solid #49605f;border-radius:6px;background:#1c363d;font:11px var(--sans);padding:4px;color:#c9dfd4}.mobile .mobile-map-tools button[aria-pressed=true]{border-color:#a6d4c8;background:#2a484c}.mobile #mobileZoomIn,.mobile #mobileZoomOut{font-size:23px}
.mobile .command-deck{display:flex;flex-direction:column;width:100%;min-height:0;margin:0;padding:10px 0 0;gap:13px;border:0;border-radius:0;background:transparent}.mobile .command-deck>div{padding:0;border:0}.mobile .command-deck .section-label{margin:0 0 8px;font:10px var(--mono);letter-spacing:.7px}.mobile .command-deck .section-label small{max-width:140px;text-align:right;font:9px var(--sans);letter-spacing:0}.mobile .command-deck .arsenal{display:block}
.mobile .weapon-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.mobile .weapon{min-height:69px;padding:8px 4px;border-radius:6px}.mobile .weapon svg{height:24px;width:27px;margin:0 auto 5px}.mobile .weapon strong{font:10px var(--sans)}.mobile .weapon small{font-size:8px}
.mobile .mobile-command-bar{display:grid;grid-template-columns:1fr 1fr;gap:6px;order:3}.mobile .mobile-command-bar>button{height:44px;border:1px solid #49605f;border-radius:6px;background:#1b333b;font:11px var(--sans);padding:5px}.mobile #mobileArsenal{display:none}.mobile #mobileAssist[aria-pressed=true]{color:#ffdc9f;border-color:#b99e68}
.mobile .aim-panel>.section-label,.mobile .range-extents{display:none}.mobile .aim-controls{display:flex;flex-direction:column;gap:5px}.mobile .range-control{display:grid;grid-template-columns:60px minmax(0,1fr);gap:6px;align-items:center;min-width:0}.mobile .range-control>span:first-child{height:44px;display:flex;flex-direction:column;justify-content:center;align-items:start;gap:1px;font:10px var(--sans);color:#bacac2}.mobile .range-control output{font:20px var(--mono);letter-spacing:0}.mobile .range-control output small{font-size:11px}.mobile .range-adjust{gap:5px;height:44px}.mobile .fine-adjust{display:block;flex:0 0 44px;width:44px;height:44px;border:1px solid #49605f;border-radius:6px;background:#1b333b;font-size:23px}
.mobile input[type=range]{height:44px;margin:0;background:transparent;border-radius:0}.mobile input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(to right,var(--amber) 0%,var(--amber) var(--fill,25%),#49605f var(--fill,25%),#49605f 100%)}.mobile input[type=range]::-webkit-slider-thumb{width:17px;height:23px;border-radius:5px;border:2px solid #293b3b;margin-top:-9.5px;box-shadow:0 0 0 1px #d1b27d;background:#f5ce8d}.mobile input[type=range]::-moz-range-track{height:4px;background:#49605f;border-radius:4px}.mobile input[type=range]::-moz-range-thumb{width:17px;height:23px;background:#f5ce8d;border:2px solid #293b3b;border-radius:5px}
.mobile .fire-panel{display:flex;flex-direction:column!important;gap:7px;align-items:stretch}.mobile .fire-button{width:100%;height:44px;max-width:none;min-height:44px;padding:5px;font-size:13px;border-radius:7px}.mobile .fire-button kbd{display:none}.mobile .fire-button .crosshair{font-size:22px}.mobile .tactical{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between}.mobile .tactical button{height:44px;min-width:44px;padding:5px 8px;border-radius:6px;font-size:11px}.mobile .move-buttons{gap:4px}.mobile .move-buttons span{display:none}.mobile .move-buttons button{font-size:22px}.mobile .movement-info{display:flex;justify-content:space-between;gap:5px;font:10px var(--sans);min-height:16px}.mobile .movement-info span{font:9px var(--sans);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile .fire-warning{position:static;max-width:100%;margin:0;padding:6px 8px;font:10px var(--sans)}.mobile .fire-warning[hidden]{display:none}.mobile .mobile-help{display:block;border-left:2px solid var(--amber);padding-left:12px}
.mobile .mobile-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:80dvh;padding:16px 14px calc(16px + env(safe-area-inset-bottom));border:1px solid #60716c;border-bottom:0;border-radius:16px 16px 0 0;background:#18292e}.mobile .mobile-dialog h2{font-size:23px;margin:0}.mobile .mobile-dialog p{font-size:12px;margin:8px 0 14px;line-height:1.5}
.mobile dialog:not(.mobile-menu-dialog):not(.mobile-dialog){width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:22px;border-radius:12px}.mobile dialog select{min-height:44px;font-size:14px}.mobile dialog .check-row,.mobile dialog .dialog-actions button{min-height:44px}.mobile .mobile-report-body{font-size:13px!important}
@keyframes command-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.mobile .mobile-menu-dialog{animation:none}}
@media(orientation:landscape){.mobile .arena-top{padding-left:12px;padding-right:12px}.mobile .touch-deck{left:50%;transform:translateX(-50%);width:min(520px,72%);border-radius:14px 14px 0 0}.mobile #mobileGestureMode{bottom:calc(12px + env(safe-area-inset-bottom))}.mobile .mobile-gesture-hint{left:110px;right:110px;bottom:85px}.mobile .announcement{top:23%;font-size:18px}.mobile .practice-panel{top:88px}.mobile .mobile-dialog{left:auto;width:min(460px,100%);max-height:94dvh}.mobile .map-scale{bottom:88px}.mobile .supply-toast{top:100px}}

#challengeLabel[hidden]{display:none}.mobile .canvas-wrap{min-height:0}

.practice-panel{top:95px}.practice .map-label{display:none}.mobile .practice-panel{top:calc(99px + env(safe-area-inset-top))}

/* Direct access on phones, without covering the central aiming area. */
.mobile-sound-toggle,.touch-drive{display:none}
.mobile .mobile-menu-toggle{width:92px;min-width:0}
.mobile #touchWeapon{flex:1;min-width:0;max-width:none}
.mobile .arena-bottom{max-width:calc(100% - 202px)}
.mobile #turnStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile .mobile-sound-toggle{display:flex;align-items:center;justify-content:center;gap:5px;position:absolute;top:calc(50px + env(safe-area-inset-top));right:108px;width:78px;height:44px;padding:3px 5px;border:1px solid #7a908699;border-radius:8px;background:#1b3036e8;color:#d8dfcf;z-index:4}
.mobile .mobile-sound-toggle>span:first-child{font:21px var(--sans)}
.mobile #mobileSoundLabel{white-space:pre-line;text-align:left;font:10px/1.25 var(--sans)}
.mobile .mobile-sound-toggle[aria-pressed=true]{border-color:#b2d89a;color:#d8f0b9;background:#294335e8}
.mobile .touch-drive{position:absolute;right:8px;bottom:calc(78px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:2px;z-index:3}
.mobile .touch-drive>small{font:7px var(--sans);letter-spacing:1px;color:#d4dfd1;text-shadow:0 1px 3px #102129}
.mobile .touch-drive .move-buttons{display:flex;gap:4px}
.mobile .touch-drive .move-buttons button{width:44px;height:44px;min-width:44px;padding:2px;border:1px solid #63808099;border-radius:7px;background:#1b353dbf;color:#c8e4de;font-size:22px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* The board always pans; aiming and firing keep their own simple controls. */
.mobile #mobileGestureMode{font-size:11px;min-width:75px;border-color:#63808099;color:#c8e4de}
.mobile .aim-panel,.mobile .fire-panel>#fire{display:none}
.mobile .mobile-map-tools{grid-template-columns:1fr 44px 44px}
.mobile #mobileFocus{display:none}
.mobile .mobile-menu-head h2{font-size:18px}
.mobile .command-deck{gap:10px}
.mobile .mobile-gesture-hint{left:95px;right:112px}
.mobile .supply-toast{top:calc(102px + env(safe-area-inset-top))}
.mobile .map-scale{bottom:calc(144px + env(safe-area-inset-bottom))}
@media(orientation:landscape){.mobile .mobile-gesture-hint{left:110px;right:112px}}

/* Small persistent tactical map, away from aim/fire and movement buttons. */
.mini-map{display:none}.mobile .mini-map{display:block;position:absolute;left:8px;bottom:calc(139px + env(safe-area-inset-bottom));width:128px;height:68px;border:1px solid #99b5a899;border-radius:6px;z-index:3;opacity:.9;touch-action:none;cursor:pointer}.mobile .mini-map:focus-visible{outline:2px solid #ffd08a;outline-offset:2px}@media(orientation:landscape){.mobile .mini-map{bottom:calc(72px + env(safe-area-inset-bottom));width:116px;height:62px}}@media(max-width:360px){.mobile .mini-map{width:108px;height:58px}}

.mobile .mini-map[hidden]{display:none}
