/* Dedicated driving instruments replace the entire flight readout in a truck. */
.ground-vehicle #flightUI :is(.instruments,.bottom-flight){display:none!important}
.phone-ui.ground-vehicle #phoneTelemetry{display:none!important}
.phone-ui.ground-vehicle #groundDrivingHint{display:none!important}
.driving-hud{position:absolute;left:28px;bottom:28px;width:340px;padding:10px 13px 12px;border:1px solid #bdd7ba44;border-radius:12px;background:#10242cce;box-shadow:0 5px 24px #04171d33;pointer-events:none;color:#e9f3df;font-family:var(--mono);font-variant-numeric:tabular-nums;user-select:none;z-index:3}
.driving-hud[hidden]{display:none!important}
.driving-hud-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;font-size:8px;line-height:1.2;letter-spacing:.09em;color:#b8ccbd}
.driving-hud-heading>span:last-child{font-size:7px;color:#cadd9f}
.driving-gauges{display:grid;grid-template-columns:112px 112px 28px 42px;align-items:center;gap:5px}
.driving-speed,.driving-rpm{position:relative;min-width:0;height:76px}
.driving-speed-dial,.driving-rpm-dial{display:block;width:112px;height:76px;overflow:visible}
.driving-dial-track,.driving-dial-fill,.driving-dial-redline,.driving-dial-ticks{fill:none;stroke-width:3;stroke-linecap:round}
.driving-dial-track{stroke:#bfd7c12b}.driving-dial-fill{stroke:#d0e6a3}.driving-dial-redline{stroke:#db967c;stroke-width:4}.driving-dial-ticks{stroke:#c3d5bc99;stroke-width:1.2}
.driving-speed-dial text,.driving-rpm-dial text{fill:#adc3b3;font-size:7px;font-family:var(--mono)}
.driving-needle path{stroke:#e8f2d3;stroke-width:1.5;stroke-linecap:round}.driving-needle circle{fill:#e8f2d3}
.driving-speed-value,.driving-rpm-value{position:absolute;bottom:1px;left:22px;right:22px;display:flex;flex-direction:column;align-items:center;background:#10242ce6;border-radius:5px;line-height:1.1}
.driving-speed-value output{font-size:23px}.driving-rpm-value output{font-size:15px;padding:4px 0}
.driving-speed-value small,.driving-rpm-value small,.driving-gear small,.driving-status small{font-size:7px;line-height:1.3;color:#b4c9b7}
.driving-rpm-strip{display:none}
.driving-gear{display:flex;flex-direction:column;align-items:center;gap:6px;line-height:1.2}.driving-gear output{font-size:24px;color:#e3f1bf}.driving-gear>[data-driving-brake]{font-size:6px;letter-spacing:0;color:#f4db9e}
.driving-status{display:flex;flex-direction:column;gap:12px;border-left:1px solid #b3cfba26;padding-left:6px}.driving-status[hidden]{display:none}.driving-status>span{display:flex;flex-direction:column;gap:4px}.driving-status output{font-size:10px;line-height:1.2}
.driving-hud[data-size=compact]{width:282px;padding:8px 10px}.driving-hud[data-size=compact] .driving-gauges{grid-template-columns:92px 92px 25px 35px;gap:5px}.driving-hud[data-size=compact] :is(.driving-speed,.driving-rpm){height:63px}.driving-hud[data-size=compact] :is(.driving-speed-dial,.driving-rpm-dial){width:92px;height:63px}.driving-hud[data-size=compact] .driving-speed-value output{font-size:20px}.driving-hud[data-size=compact] .driving-rpm-value output{font-size:13px}
.driving-hud[data-redline=true] :is(.driving-rpm-value output,.driving-rpm-dial .driving-dial-fill){color:#ffd1a6;stroke:#ffd1a6}
/* The phone panel reuses the existing 36px top safe strip. The road remains visible between both thumbs. */
.phone-ui .driving-hud{position:fixed;top:calc(var(--phone-viewport-top,0px) + var(--phone-top));bottom:auto;left:var(--phone-left);right:var(--phone-right);width:auto;height:36px;box-sizing:border-box;padding:3px 5px;border-radius:7px;z-index:7;box-shadow:none;background:#102832ae}
.phone-ui .driving-hud-heading{display:none}
.phone-ui .driving-hud .driving-gauges{height:100%;grid-template-columns:100px minmax(60px,1fr) 24px 40px;gap:5px}
.phone-ui .driving-hud[data-status=false] .driving-gauges{grid-template-columns:100px minmax(60px,1fr) 24px}
.phone-ui .driving-hud .driving-speed{display:flex;align-items:center;height:30px;gap:2px}
.phone-ui .driving-hud .driving-speed-dial{width:46px;height:30px;flex:none}
.phone-ui .driving-hud .driving-speed-value{position:static;flex:1;display:flex;align-items:center;flex-direction:row;gap:4px;background:none;line-height:1}
.phone-ui .driving-hud .driving-speed-value output{font-size:21px;line-height:1}.phone-ui .driving-hud .driving-speed-value small{font-size:7px}
.phone-ui .driving-hud .driving-rpm{display:flex;justify-content:center;flex-direction:column;height:29px;gap:5px;min-width:0;padding:0 3px}
.phone-ui .driving-hud .driving-rpm-dial{display:none}
.phone-ui .driving-hud .driving-rpm-value{position:static;display:flex;flex-direction:row;justify-content:space-between;gap:4px;background:none;white-space:nowrap}
.phone-ui .driving-hud .driving-rpm-value output{font-size:11px;padding:0}.phone-ui .driving-hud .driving-rpm-value small{font-size:7px}
.phone-ui .driving-hud .driving-rpm-strip{display:block;height:4px;border-radius:2px;background:linear-gradient(to right,#bfd7c135 0 86%,#d496784b 86% 100%);overflow:hidden;flex:none}
.phone-ui .driving-hud .driving-rpm-strip i{display:block;height:100%;width:0;background:#d0e6a3;border-radius:2px}
.phone-ui .driving-hud[data-redline=true] .driving-rpm-strip i{background:#ffd1a6}
.phone-ui .driving-hud .driving-gear{gap:1px}.phone-ui .driving-hud .driving-gear output{font-size:17px}.phone-ui .driving-hud .driving-gear small{font-size:6px}.phone-ui .driving-hud .driving-gear>[data-driving-brake]{position:absolute;bottom:2px;right:48px;font-size:5px}
.phone-ui .driving-hud .driving-status{height:28px;justify-content:center;gap:2px;padding-left:5px}.phone-ui .driving-hud .driving-status>span{flex-direction:row;justify-content:space-between;gap:3px;align-items:center}.phone-ui .driving-hud .driving-status small{font-size:5px}.phone-ui .driving-hud .driving-status output{font-size:7px}
.phone-ui .driving-hud[data-size=compact]{height:30px;padding:2px 5px}.phone-ui .driving-hud[data-size=compact] .driving-speed{height:24px}.phone-ui .driving-hud[data-size=compact] .driving-speed-dial{width:38px;height:24px}.phone-ui .driving-hud[data-size=compact] .driving-speed-value output{font-size:19px}.phone-ui .driving-hud[data-size=compact] :is(.driving-rpm,.driving-status){height:24px}
.phone-ui .driving-hud[data-size=compact] .driving-gear{line-height:1}.phone-ui .driving-hud[data-size=compact] .driving-gear small{line-height:1}.phone-ui .driving-hud[data-size=compact] .driving-gear output{font-size:16px;line-height:1}
@media(orientation:landscape){
 .phone-ui .driving-hud{height:30px;padding:2px 5px}
 .phone-ui .driving-hud .driving-speed{height:24px}
 .phone-ui .driving-hud .driving-speed-dial{width:38px;height:24px}
 .phone-ui .driving-hud :is(.driving-rpm,.driving-status){height:24px}
 .phone-ui .driving-hud .driving-gear{line-height:1}
 .phone-ui .driving-hud .driving-gear small{line-height:1}
 .phone-ui .driving-hud .driving-gear output{font-size:16px;line-height:1}
}
.driving-settings-section{padding:12px 0;border-bottom:1px solid #a2c1a729}.driving-settings-section h4{margin:0 0 13px;font:9px var(--mono);letter-spacing:.09em;color:#c8dba5}
.driving-setting-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:12px 0;font-size:12px}.driving-setting-row>span{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0}.driving-setting-row output{font:10px var(--mono);color:#d5e7b5}.driving-setting-row input[type=range]{width:45%;min-width:100px;accent-color:#c9e89d}.driving-setting-row select{width:45%;padding:10px;border:1px solid #91b3a249;border-radius:5px;background:#15313b;color:#e2ecd8;font-size:12px}
.driving-switch-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:62px;padding:10px 0}.driving-switch-row strong{display:block;font-size:12px;font-weight:500}.driving-switch-row small{display:block;max-width:470px;color:#a8bfb5;font-size:11px;line-height:1.6;margin-top:5px}.driving-switch-row input{width:20px;height:20px;accent-color:#c9e89d;flex:none}.driving-controls-note{font-size:11px;line-height:1.9;color:#b8cabc;margin:20px 0}.driving-settings [data-driving-reset]{min-height:44px;padding:12px;font-size:10px}
.phone-ui .driving-setting-row{display:block;font-size:14px;padding:12px 0}.phone-ui .driving-setting-row>span{width:100%;margin-bottom:10px}.phone-ui .driving-setting-row :is(input[type=range],select){width:100%;min-height:44px;margin:0}.phone-ui .driving-switch-row{min-height:65px}.phone-ui .driving-switch-row strong{font-size:14px}.phone-ui .driving-switch-row small{font-size:12px}.phone-ui .driving-switch-row input{width:24px;height:24px}.phone-ui .driving-controls-note{font-size:12px;line-height:1.75}
.phone-ui #settingsDialog .settings-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.phone-ui #settingsDialog .settings-tabs button{overflow-wrap:anywhere;min-height:44px;font-size:8px;letter-spacing:0;padding:7px 3px}
/* The existing Systems position becomes one camera button in both truck seats. */
.phone-ui #phoneControls:is([data-state=driver],[data-state=passenger]) #phoneSystems{display:flex!important}
.phone-ui #phoneControls[data-state=passenger] .phone-flight-access{display:grid!important;width:64px;height:44px;grid-template-columns:1fr;grid-template-rows:44px}

/* Ground drivers get a dedicated hold pedal. The metal tread is CSS-only and
   uses the existing pointer capture path; no canvas, image or frame updates. */
.phone-ui #phoneControls .phone-gas-pedal{display:none}
.phone-ui #phoneControls[data-state=driver] #phoneAccelerate:not([hidden]){display:flex;position:absolute;left:auto;right:var(--phone-right);top:auto;bottom:calc(var(--phone-bottom) + var(--phone-stick-size) + 36px);width:58px;min-width:58px;height:94px;min-height:94px;box-sizing:border-box;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;padding:9px 6px;border:1px solid #c4d4cda3;border-radius:10px 10px 15px 15px;background:linear-gradient(105deg,#82948f9c,#203c3bcb 24%,#45605ba6 72%,#aec1b585);box-shadow:inset 2px 1px 0 #d7e6da66,inset -2px -2px 0 #041b205e,0 3px 5px #04171d33;color:#f0f6df;font-size:10px;font-weight:700;letter-spacing:.07em;touch-action:none;pointer-events:auto}
.phone-ui #phoneAccelerate .phone-pedal-tread{display:block;width:100%;height:51px;box-sizing:border-box;flex:none;border:1px solid #b3c5ba3b;border-radius:4px;background:repeating-linear-gradient(0deg,#081e21b3 0 3px,#91a99a7a 3px 5px,transparent 5px 8px);pointer-events:none}
.phone-ui #phoneAccelerate>span{pointer-events:none}
.phone-ui #phoneControls[data-state=driver] #phoneAccelerate.is-active{background:linear-gradient(105deg,#d0e8b6bd,#618c73d9 26%,#90b48ac4 74%,#e3f1c7a8);border-color:#e6f9bc;color:#17362b;box-shadow:inset 1px 2px 5px #062b284d}
.phone-ui #phoneControls[data-state=driver] #phoneAccelerate:focus-visible{outline:2px solid #e4f8b7;outline-offset:3px}
/* A broad service-brake pad sits beside the narrow gas pedal. Keep the same
   bottom edge and an 8px gap; the camera button sits separately above Brake.
   A pseudo-element survives the shared aircraft/parachute brake-label updates. */
.phone-ui #phoneControls[data-state=driver] .phone-flight-access{display:block;left:auto;right:calc(var(--phone-right) + 66px);bottom:calc(var(--phone-bottom) + var(--phone-stick-size) + 36px);width:82px;height:104px}
.phone-ui #phoneControls[data-state=driver] #phoneSystems{position:absolute;left:auto;right:0;top:auto;bottom:60px;width:58px;min-width:58px;height:44px;box-sizing:border-box;font-size:8px}
.phone-ui #phoneControls[data-state=driver] #phoneBrake{position:absolute;left:auto;right:0;top:auto;bottom:0;display:flex;width:82px;min-width:82px;height:52px;min-height:52px;box-sizing:border-box;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;padding:6px 7px;border:1px solid #c4d4cda3;border-radius:7px 7px 10px 10px;background:linear-gradient(105deg,#82948f9c,#203c3bcb 24%,#45605ba6 72%,#aec1b585);box-shadow:inset 2px 1px 0 #d7e6da66,inset -2px -2px 0 #041b205e,0 3px 5px #04171d33;color:#f0f6df;font-size:10px;font-weight:700;letter-spacing:.07em;touch-action:none;pointer-events:auto}
.phone-ui #phoneControls[data-state=driver] #phoneBrake::before{content:'';display:block;width:100%;height:20px;box-sizing:border-box;flex:none;border:1px solid #b3c5ba3b;border-radius:3px;background:repeating-linear-gradient(0deg,#081e21b3 0 3px,#91a99a7a 3px 5px,transparent 5px 8px);pointer-events:none}
.phone-ui #phoneControls[data-state=driver] #phoneBrake.is-active{background:linear-gradient(105deg,#eadabbbd,#937c55d9 26%,#bea77bc4 74%,#f1e7c7a8);border-color:#f3deb0;color:#3b301c;box-shadow:inset 1px 2px 5px #3023094d}
.phone-ui #phoneControls[data-state=driver] #phoneBrake:focus-visible{outline:2px solid #f3deb0;outline-offset:3px}
.phone-ui #phoneControls[data-state=driver] .phone-interaction{left:var(--phone-left);right:auto;bottom:calc(var(--phone-bottom) + var(--phone-move-size) + 30px);width:var(--phone-move-size)}
@media(orientation:landscape){
 /* Short displays put pedals beside Look, below the map and utility lane. */
 .phone-ui #phoneControls[data-state=driver] #phoneAccelerate:not([hidden]){right:calc(var(--phone-right) + var(--phone-stick-size) + 12px);bottom:calc(var(--phone-bottom) + 20px)}
 .phone-ui #phoneControls[data-state=driver] .phone-flight-access{right:calc(var(--phone-right) + var(--phone-stick-size) + 78px);bottom:calc(var(--phone-bottom) + 20px)}
 .phone-ui #phoneControls[data-state=driver] .phone-interaction{left:calc(var(--phone-left) + var(--phone-move-size) + 12px);right:auto;bottom:calc(var(--phone-bottom) + 20px);width:94px}
}
