.model-shell #drive-toggle{left:calc(16px + env(safe-area-inset-left));transition:color .2s,border-color .2s}
.model-shell #drive-toggle.running{color:#9de2bc;border-color:#78b99888}
.model-shell #part-undo{left:calc(72px + env(safe-area-inset-left))}
.model-shell #part-redo{left:calc(128px + env(safe-area-inset-left))}
.model-shell #part-undo,.model-shell #part-redo{touch-action:manipulation}
.model-menu #explode{margin:0;touch-action:pan-y}
.model-menu .part-list{margin-top:8px}
#drive-panel{position:absolute;z-index:19;top:calc(72px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));display:grid;grid-template-columns:134px minmax(0,1fr);gap:4px 6px;width:292px;max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));box-sizing:border-box;padding:7px 8px 8px;border:1px solid #6b8a9d52;border-radius:15px;background:linear-gradient(145deg,#1c2c38f5,#101b24f7);box-shadow:0 15px 45px #0006,inset 0 1px #ffffff08;color:#cbd7de;direction:ltr;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);user-select:none;overscroll-behavior:contain}
#drive-panel[hidden]{display:none}
.drive-toolbar{display:flex;flex-wrap:wrap;align-items:center;align-content:center;gap:2px;min-height:32px}.toolbar-space{display:none}
#drive-panel .drive-icon{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:6px;border:1px solid transparent;border-radius:10px;background:transparent;color:#8da4b5;cursor:pointer;touch-action:manipulation}
#drive-panel .drive-icon:hover{color:#e2eff6;background:#d2e4ef0c}
#drive-panel .drive-icon[hidden]{display:none}
#drive-panel svg{display:block}
.drive-icon svg,#clutch-state{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#drive-panel :focus-visible{outline:2px solid #a4d5e8;outline-offset:3px}
#drive-panel #play{width:32px;height:32px;color:#adbbc5;background:#33424d;border-color:#869baa44;transition:color .2s,background .2s,box-shadow .2s}
#drive-panel #play[aria-pressed=true]{color:#c8ffdf;background:#206342;border-color:#83dbac99;box-shadow:0 0 14px #58ba7d33}
#drive-panel #play.stalled{border-color:#deb27b}
#drive-panel #drive-slow[aria-pressed=true]{color:#b6d9e7;background:#6eacc51a}
#drive-panel #engine-alert{color:#efba73}
.drive-gauges{display:grid;grid-template-columns:52px 26px 52px;align-items:center;justify-content:end;margin:0;gap:2px}
.drive-gauges>svg{width:52px;height:52px;overflow:visible}
.dial-ring{fill:#0d1721;stroke:#66869b55;stroke-width:1}.dial-tick{stroke:#536979;stroke-width:.65}.dial-tick.major{stroke:#8ba3b4;stroke-width:.9}.dial-number{fill:#bccbd5;font:7px system-ui,sans-serif;text-anchor:middle}.dial-unit{fill:#6f8b9d;font:6px system-ui,sans-serif;text-anchor:middle}.needle{fill:#a6dbc9}.dial-hub{fill:#dfede9;stroke:#304e50;stroke-width:2}.dial-hand{transition:transform .08s linear;transform-box:view-box}
.drive-state{display:flex;flex-direction:column;align-items:center;gap:4px}.drive-state output{font:400 17px ui-monospace,monospace;color:#d8e8e5;line-height:1}
#clutch-state{color:#567685;width:20px;height:20px}#clutch-state.slipping{color:#e6b675}#clutch-state.released{color:#8fcabd}#clutch-state.released .clutch-link{opacity:0}
.drive-controls{grid-column:1/-1;display:grid;grid-template-columns:88px 72px minmax(0,1fr);align-items:center;gap:4px}
#gear-gate,#drive-steering{width:100%;height:92px;overflow:visible;touch-action:none;cursor:grab}
#gear-gate:active,#drive-steering:active{cursor:grabbing}
.gate-shadow{fill:none;stroke:#080f16;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}.gate-track{fill:none;stroke:#557284;stroke-width:1;stroke-linecap:round;stroke-linejoin:round}.gate-labels text{fill:#9cb4c5;font:9px ui-monospace,monospace;text-anchor:middle;cursor:pointer;stroke:transparent;stroke-width:10px;paint-order:stroke;pointer-events:all}
#gear-knob{fill:#b9d6d5;stroke:#506d7b;stroke-width:2;filter:drop-shadow(0 2px 3px #0008)}#gear-gate.shifting #gear-knob{fill:#e5bf7f}#gear-gate.blocked #gear-knob{fill:#df8c78}
.steering-guide{fill:none;stroke:#58778b22;stroke-width:1}.steering-rim{fill:none;stroke:#7893a5;stroke-width:8}.steering-spokes{fill:none;stroke:#617f93;stroke-width:6;stroke-linecap:round}.steering-marker{fill:none;stroke:#bcded6;stroke-width:4;stroke-linecap:round}.steering-hub{fill:#223947;stroke:#849eae;stroke-width:1.3}
.drive-pedals{display:grid;grid-template-columns:repeat(3,1fr);align-items:end;gap:0;min-width:0}.drive-pedal{display:flex;flex-direction:column;align-items:center;min-width:0}
#drive-panel .pedal-icon{width:30px;height:28px;min-height:28px;padding:5px 6px}.pedal-icon svg{width:19px;height:19px}
.drive-pedal input[type=range]{--pedal:#b9cdd7;--pedal-fill:0%;appearance:none;-webkit-appearance:none;writing-mode:vertical-lr;direction:rtl;width:32px;height:62px;margin:0 0 2px;padding:0;border:0;border-radius:8px;background:linear-gradient(to top,var(--pedal) 0 var(--pedal-fill),#4c63724d var(--pedal-fill) 100%) center/8px 100% no-repeat;cursor:ns-resize;touch-action:none;box-shadow:none}
.drive-pedal input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:22px;height:12px;border:1px solid #94b0c0;border-radius:4px;background:#d3e1e8;box-shadow:0 2px 5px #0006}
.drive-pedal input::-moz-range-thumb{width:20px;height:10px;border:1px solid #94b0c0;border-radius:4px;background:#d3e1e8}
.drive-pedal #drive-brake{--pedal:#c99184}.drive-pedal #drive-throttle{--pedal:#9acfb7}
#drive-notice{grid-column:1/-1;direction:rtl;text-align:right;font-size:11px;line-height:1.5;color:#e5c598;margin:3px 2px 0;max-width:100%}
@media(max-height:500px){#drive-panel{top:calc(66px + env(safe-area-inset-top));padding-top:5px;padding-bottom:5px}}
@media(max-width:330px){#drive-panel{grid-template-columns:minmax(0,1fr) 134px}.drive-controls{grid-template-columns:84px 64px minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.dial-hand{transition:none}}
#app.driving-open>.floating-info{right:auto;bottom:auto;left:calc(316px + env(safe-area-inset-left));top:calc(72px + env(safe-area-inset-top));z-index:20}
@media(max-width:650px){#app.driving-open>.floating-info{left:12px;top:var(--cockpit-bottom,254px);max-height:min(250px,calc(100dvh - var(--cockpit-bottom,254px) - 16px));box-sizing:border-box;width:min(316px,calc(100vw - 24px))}}

#auto-ranges{display:grid;grid-template-columns:1fr 1fr;gap:4px;width:88px;height:92px}#auto-ranges button{font:500 15px ui-monospace,monospace;border:1px solid #66839655;border-radius:9px;color:#aebfca;background:#12232f;min-height:44px;padding:0;cursor:pointer;touch-action:manipulation}#auto-ranges button[aria-pressed=true]{border-color:#95cdb6;background:#30594d;color:#d6f5e8}#drive-panel.automatic .drive-pedals{grid-template-columns:repeat(2,1fr);padding-left:0}#drive-panel [hidden]{display:none!important}#drive-panel #auto-coupling{width:26px;height:26px;min-height:26px;padding:3px;color:#b8a477}#auto-coupling .lock-link{opacity:0}#auto-coupling.locked{color:#a4d8c0!important}#auto-coupling.locked .lock-link{opacity:1}.automatic .drive-state output{font-size:18px}
