#cockpit{border:0;background:none;box-shadow:none;border-radius:0;overflow:hidden}
#shell{position:absolute;inset:0;background:url(cabin.webp) center / 100% 100% no-repeat}
#sight{position:fixed;left:50%;top:48%;pointer-events:none;transform:translate(-50%,-50%);width:40px;height:40px;color:#d6ffd3;filter:drop-shadow(0 1px 1px #19281f) drop-shadow(0 0 2px #19281f)}
#sight:before,#sight:after{content:"";position:absolute;inset:50% 0 auto;height:2px;background:linear-gradient(to right,currentColor 28%,transparent 28% 72%,currentColor 72%)}
#sight:after{transform:rotate(90deg)}#sight i{position:absolute;inset:40%;border:2px solid #182018;background:currentColor;border-radius:50%;box-shadow:0 0 0 1px #fff}#sight.charging{color:#ffca7f}
#bridge{position:absolute;top:75%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:clamp(4px,1vw,14px);padding:clamp(4px,.6vw,9px);border:2px ridge #525747;border-radius:8px;background:linear-gradient(160deg,#444a3d,#202820 50%,#363e31);box-shadow:1px 5px 10px #10130dd4,inset 0 1px #737661}
#gauges{display:flex;gap:clamp(3px,.65vw,10px)}#gauges svg{display:block;width:clamp(39px,min(7.4vw,12vh),110px);border:4px ridge #7d806c;border-radius:50%;background:radial-gradient(ellipse at 33% 14%,#64706677,transparent 51%),radial-gradient(#222924,#111711 70%,#4c5144);box-shadow:1px 3px 4px #10130e;font:700 12px monospace}
.status{display:grid;color:#c6c7ac;font:700 clamp(8px,.74vw,11px) monospace;gap:4px}.status strong{background:#141e16;padding:4px;color:#dcdbac;font:700 clamp(12px,1.3vw,20px) monospace}.status i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#5a4628}.status .lit{background:#ffd779;box-shadow:0 0 6px #ffc45d}
.inside header h1{font-size:clamp(19px,3vw,38px)}.inside header small{display:none}
@media(max-width:620px) and (orientation:portrait){#bridge{top:72%}#shell{background-size:125% 100%}.inside #mapBtn{width:76px;top:136px}}
@media(max-height:500px){#bridge{top:76%}.inside #mapBtn{top:52px;left:12px;right:auto;bottom:auto;width:67px}}
#stick,#touchFire{display:none}
@media(any-pointer:coarse){
 :root{--stick-size:clamp(100px,24vmin,142px);--bottom-edge:max(14px,env(safe-area-inset-bottom))}
 #stick,#touchFire{position:fixed;display:grid;place-items:center;border-radius:50%;touch-action:none;user-select:none;-webkit-tap-highlight-color:transparent}
 #stick{left:max(16px,env(safe-area-inset-left));bottom:var(--bottom-edge);width:var(--stick-size);height:var(--stick-size);border:1px solid #e5e5c688;background:radial-gradient(circle,transparent 43%,#d8dac52a 44% 46%,transparent 47%),#1b241f77;box-shadow:inset 0 0 0 5px #131e1c35}
 #stick i{width:42%;height:42%;border-radius:50%;border:1px solid #dfdfc5aa;background:radial-gradient(circle at 36% 27%,#b1b79bbf,#626e5bcf 62%,#343f34);box-shadow:0 3px 7px #131a1580;transform:translate(var(--dx,0px),var(--dy,0px));transition:transform .12s ease-out;pointer-events:none}
 #stick.held i{transition:none}
 #touchFire{bottom:calc(var(--bottom-edge) + 12px);right:max(20px,env(safe-area-inset-right));width:clamp(68px,17vmin,85px);aspect-ratio:1;background:#312a1dd9;border:2px solid #dfbd80;color:#ffe5af;box-shadow:inset 0 0 0 4px #161e1977;font:700 13px monospace;letter-spacing:.06em}
 #touchFire:active{background:#796037}#fireBtn{display:none}
 footer{left:max(16px,env(safe-area-inset-left));bottom:calc(var(--stick-size) + var(--bottom-edge) + 6px);pointer-events:none}
 #mapBtn,.inside #mapBtn{right:max(16px,env(safe-area-inset-right));left:auto;top:102px;bottom:auto;width:clamp(64px,16vmin,92px)}
 @media(orientation:portrait){.inside #bridge{top:65%}}
 @media(max-height:500px){footer{bottom:auto;top:62px;max-width:142px;font-size:11px}footer b{font-size:17px}}
}
#cruise[aria-pressed=true]{color:#172821;background:#a7c9af}
@media(any-pointer:coarse){#mapBtn,.inside #mapBtn{top:146px}}
@media(pointer:fine) and (min-height:541px){#mapBtn{top:202px}}

#mouseHint{display:none}@media(pointer:fine){#mouseHint{display:block;margin-top:4px;font:12px monospace;color:#d8e2cb}}

#sight.offscreen:before,#sight.offscreen:after{display:none}
#cockpit,#cockpit *,#sight,#sight *,header,footer{pointer-events:none}

@media(any-pointer:coarse){#mapBtn,.inside #mapBtn{top:188px}}
@media(pointer:fine) and (min-height:541px){#mapBtn,.inside #mapBtn{top:244px}}

#shell{background:none}
#cabinPhoto{display:block;width:100%;height:100%;user-select:none}
#driverDial,#driverScreen{display:none;position:absolute;transform:translate(-50%,-50%);pointer-events:none}
body[data-vehicle]:not([data-vehicle=szura]) #bridge{display:none}
[data-vehicle=tiger] #driverDial{display:block;left:13.32%;top:70.85%;width:8.7%;height:16.4%}
[data-vehicle=leopard] #driverDial{display:block;left:15.85%;top:77.35%;width:9.15%;height:17.7%}
[data-vehicle=abrams] #driverDial{display:block;left:12.18%;top:77.02%;width:10%;height:17.4%}
[data-vehicle=merkava] #driverScreen{left:18.8%;top:74.7%;width:9.7%;height:11.0%;display:flex;gap:.09em;align-items:center;justify-content:center;flex-wrap:wrap;align-content:center;overflow:hidden;transform:translate(-50%,-50%) rotate(-2.5deg);font:600 clamp(10px,2.15vmin,28px)/1 monospace;color:#aed1bf;text-shadow:0 0 3px #7fa796}
#driverScreen strong{font-size:1.75em}#driverScreen span{font-size:.47em}#driverScreen small{flex-basis:100%;text-align:center;font-size:.60em;letter-spacing:.08em;margin-top:.32em}
/* The title stays fixed while the selected vehicle changes in the garage. */
.hudIdentity{
 width:fit-content;max-width:100%;padding:7px 11px 6px;border-left:2px solid #a87457;
 background:linear-gradient(110deg,#15191beb,#1a201fe6);box-shadow:0 2px 9px #0c11163d
}
.hudIdentity h1{width:clamp(140px,15vw,208px);max-width:100%;margin:0;line-height:0}
.hudIdentity picture,.menuBrand picture,.hudIdentity img,.menuBrand img{display:block;width:100%;height:auto}
#vehicleTitle{margin:4px 0 0;color:#dfddd4;font:650 11px/1.1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.menuBrand{width:min(256px,90%);margin:6px 0 18px}
.inside .hudIdentity h1{width:clamp(120px,13vw,162px)}
#garageButton{pointer-events:auto;display:inline-flex;align-items:center;gap:.6em;min-height:34px;padding:6px 12px;margin-top:5px;background:#202c27ec;border-color:#909887}
#garageButton kbd,.garageKeys kbd{font:.75em/1.1 monospace;padding:2px 4px;border:1px solid #8d967c;border-radius:3px}
#info.garage{width:min(720px,94vw);max-width:none;max-height:90dvh;overflow:auto;padding:clamp(12px,2.2vw,23px);box-shadow:0 18px 80px #0d150fa8}
#info [hidden]{display:none}
.garageHeading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.garageHeading h2{margin:0;font:750 clamp(24px,3.8vw,36px)/1 system-ui;letter-spacing:-.045em}
#garageClose{font:400 24px/1 system-ui;padding:0;width:36px;height:36px}
#fleetGrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.fleetCard{grid-column:span 2;min-width:0;padding:0 9px 10px;overflow:hidden;text-align:left;color:#ecebda;border:1px solid #6e7666;border-radius:5px;background:linear-gradient(160deg,#919588 -60%,#536051 40%,#39463b);position:relative}
.fleetCard:nth-last-child(-n+2){grid-column:span 3}
.fleetCard img{display:block;width:100%;height:clamp(69px,11vw,106px);object-fit:contain;filter:drop-shadow(0 4px 3px #0c140e59)}
.fleetCard span{font:680 clamp(13px,1.65vw,17px)/1.3 system-ui;letter-spacing:-.02em}
.fleetCard[aria-pressed=true]{border:2px solid #dbc887;padding:0 8px 9px;background:linear-gradient(150deg,#897f5f -30%,#555c45 45%,#414a38)}
.fleetCard[aria-pressed=true]:after{content:'✓';position:absolute;right:7px;top:5px;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#dac88d;color:#26332a;font:800 12px system-ui}
.fleetCard:hover{background-color:#54674f;border-color:#d5d6ba}
#garageButton:focus-visible,.fleetCard:focus-visible,#garageClose:focus-visible{outline:2px solid #f0dda0;outline-offset:2px}
.garageKeys{margin:13px 0 0;color:#d4d6c4;font:12px system-ui}
.garageKeys kbd{margin-left:4px}
@media(max-width:620px) and (orientation:portrait){
 #shell{inset:0 -8%}
 body[data-vehicle=szura] #shell{inset:0 -12.5%}
 header{max-width:calc(100% - 142px)}
 .hudIdentity h1{width:clamp(110px,30vw,165px)}
 #fleetGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .fleetCard,.fleetCard:nth-last-child(-n+2){grid-column:span 1}
 .fleetCard:last-child{grid-column:span 2}
 .fleetCard img{height:clamp(58px,15vw,90px)}
}
@media(max-height:500px){
 header{display:flex;align-items:center;gap:9px;max-width:calc(100% - 165px);left:13px;top:12px}
 .hudIdentity{display:flex;align-items:center;gap:9px;padding:4px 7px;min-width:0}
 .hudIdentity h1,.inside .hudIdentity h1{width:clamp(82px,13vw,120px);flex-shrink:0}
 #vehicleTitle{margin:0;font-size:10px;max-width:8em}
 .menuBrand{width:min(200px,70%);margin:0 0 12px}
 #garageButton{margin:0;min-height:32px}
 #info.garage{max-height:96dvh}.garageHeading{margin-bottom:8px}
 .fleetCard img{height:clamp(35px,14vh,65px)}.garageKeys{margin-top:6px}
}
@media(any-pointer:coarse){#garageButton kbd,.garageKeys{display:none}#garageButton{min-height:38px}.fleetCard{touch-action:manipulation}}
#scopeViews,#shell picture{display:block;position:absolute;inset:0;width:100%;height:100%}
@media(orientation:landscape){
 body[data-vehicle]:not([data-vehicle=szura]) #shell{inset:auto;left:50%;top:50%;width:max(100%,148dvh);height:max(100%,47vw);transform:translate(-50%,-50%)}
}
@media(orientation:portrait){
 body[data-vehicle]:not([data-vehicle=szura]) #shell{inset:auto;left:50%;top:50%;width:max(100%,50dvh);height:max(100%,148vw);transform:translate(-50%,-50%)}
}
@media(orientation:portrait){
 [data-vehicle=tiger] #driverDial{left:15.7%;top:60.5%;width:16.25%;height:8.95%}
 [data-vehicle=leopard] #driverDial{left:26.4%;top:62.4%;width:15.95%;height:9.05%}
 [data-vehicle=abrams] #driverDial{left:17.52%;top:62.87%;width:16.1%;height:9.1%}
 [data-vehicle=merkava] #driverScreen{left:17.0%;top:61.65%;width:14.1%;height:5.9%;transform:translate(-50%,-50%)}
}
@media(orientation:portrait) and (any-pointer:coarse){
 body.inside[data-vehicle]:not([data-vehicle=szura]) footer{top:132px;bottom:auto;left:12px;max-width:53vw;font-size:11px}
}
#routesButton{pointer-events:auto;min-height:34px;padding:6px 12px;margin-top:5px;background:#202c27ec;border-color:#909887}
#info.routes{width:min(640px,94vw);max-width:none;max-height:91dvh;overflow:auto;padding:clamp(12px,2vw,22px);box-shadow:0 15px 70px #111b15a0}
#routeClose{width:36px;height:36px;padding:0;font:24px/1 system-ui}
#routeGrid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.routeChoice{display:flex;gap:12px;align-items:center;padding:5px 10px 5px 5px;text-align:left;background:#35453b;border-color:#657364;min-width:0}
.routeChoice canvas{width:clamp(48px,5vw,66px);height:auto;border-radius:2px}
.routeChoice strong,.routeChoice small{display:block}
.routeChoice strong{font:700 clamp(15px,1.6vw,19px)/1.2 system-ui}
.routeChoice small{font:12px/1.5 system-ui;color:#dcddcc;letter-spacing:0}
.routeChoice[aria-pressed=true]{background:#50553e;border-color:#ead08a;box-shadow:inset 0 0 0 1px #ead08a}
.routeChoice:focus-visible,#routesButton:focus-visible{outline:2px solid #ead08a;outline-offset:1px}
@media(max-width:530px){#routeGrid{grid-template-columns:1fr}.routeChoice canvas{width:42px}.routeChoice{min-height:47px}}
@media(max-height:500px){#routesButton{margin:0;min-height:32px}#info.routes{max-height:96dvh}}
@media(any-pointer:coarse){#routesButton{min-height:38px}.routeChoice{touch-action:manipulation}}
.eraSwitch{display:flex;gap:3px;align-items:center;width:fit-content;max-width:100%;margin:0 0 12px;padding:3px;border:1px solid #657364;border-radius:5px;background:#19251f}
.eraSwitch legend{padding:0 5px;color:#dddfcf;font:650 12px/1.2 system-ui}
.eraSwitch label{position:relative;cursor:pointer}
.eraSwitch input{position:absolute;left:0;top:0;opacity:0;width:1px;height:1px}
.eraSwitch span{display:flex;min-height:36px;padding:4px 15px;align-items:center;justify-content:center;border:1px solid transparent;border-radius:3px;color:#dddfd1;font:650 14px/1.2 system-ui;white-space:nowrap}
.eraSwitch input:checked+span{color:#fff0c7;background:#4f553c;border-color:#d9be7a}
.eraSwitch input:focus-visible+span{outline:2px solid #fff2cb;outline-offset:1px}
.eraMenu select:disabled{opacity:.55}
@media(any-pointer:coarse){.eraSwitch span{min-height:44px}}
#mapBtn.survey-wide{width:min(315px,40vw);max-height:55dvh}
#mapBtn.survey-wide #mini{max-height:48dvh;object-fit:contain}
.mapCredits{display:block;margin:10px 0 0;color:#c8cebd;font:12px/1.4 system-ui}
.mapCredits a{color:#e8d7a4;text-underline-offset:2px}
@media(max-width:600px){#mapBtn.survey-wide{width:min(63vw,285px);top:145px;bottom:auto;right:10px}}
@media(max-height:500px){#mapBtn.survey-wide{width:min(42dvh,210px);right:160px;top:12px;bottom:auto}}
