/* Shared surfaces for walking and opened controls. Driving edge rails retain
   their existing footprint. Opaque surfaces avoid a full-screen blur pass. */
body.hud-ready {--ui-panel:#13292f;--ui-card:#20383d;--ui-line:#d4e6db20;--ui-text:#eef4ed;--ui-muted:#afc3bd;--ui-accent:#cce6b9}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) {
 position:fixed;z-index:10;inset:auto 20px calc(var(--safe,16px) + 76px) auto;transform:none;width:400px;max-width:calc(100vw - 40px);max-height:calc(100dvh - 180px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;
 padding:20px;border:1px solid var(--ui-line);border-radius:24px;background:var(--ui-panel);color:var(--ui-text);box-shadow:0 18px 48px #07191f45;backdrop-filter:none;scrollbar-width:thin;scrollbar-color:#74958a70 transparent;scroll-padding-top:76px;overflow-x:hidden;
}
body.hud-ready #garage-panel {width:460px;display:block}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) :is(.hud-panel-heading,.panel-title) {
 position:sticky;top:-20px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-20px -20px 18px;padding:14px 20px 12px;background:var(--ui-panel);border-bottom:1px solid var(--ui-line);min-height:72px;
}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) h2 {margin:0;font-size:20px;line-height:1.3;font-weight:650;letter-spacing:-.6px}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) :is(.note,.hud-panel-note) {font-size:12px;line-height:1.65;color:var(--ui-muted);overflow-wrap:anywhere}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel,#shop-strip,.channel-card,.profile-card) button {
 min-height:44px;padding:10px 13px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-card);color:var(--ui-text);font-size:13px;line-height:1.4;box-shadow:none;touch-action:manipulation;
}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel,#shop-strip,.channel-card,.profile-card) button:is([aria-pressed=true],.primary,.fleet-action) {background:var(--ui-accent);border-color:transparent;color:#19392f;font-weight:650}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) button:is(:disabled,[aria-disabled=true]) {opacity:.55}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) :is(.hud-panel-heading,.panel-title) > button,body.hud-ready #channel-panel .channel-heading > button {
 position:relative;float:none;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;margin:0;border:1px solid var(--ui-line);border-radius:50%;background:#ffffff05;font-size:0;
}
body.hud-ready :is(.hud-panel-heading,.panel-title,.channel-heading) > button::after {content:'×';position:absolute;inset:0;display:grid;place-items:center;font:300 25px/1 system-ui;color:var(--ui-muted)}
body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel,.channel-card) select {
 min-width:0;min-height:46px;padding:10px 34px 10px 12px;border:1px solid var(--ui-line);border-radius:12px;background-color:#0d2228;color:var(--ui-text);font-size:14px;line-height:1.4;accent-color:var(--ui-accent);
}
body.hud-ready :is(#options,#vehicle-panel,#destination-panel) input[type=range] {min-height:32px;accent-color:var(--ui-accent);cursor:pointer}
body.hud-ready #options input[type=checkbox] {appearance:none;-webkit-appearance:none;flex:none;width:44px;min-width:44px;height:26px;border:1px solid #d4e6db30;border-radius:20px;background:#4d666b radial-gradient(circle at 12px center,#eff5ec 0 8px,transparent 9px);cursor:pointer;vertical-align:middle}
body.hud-ready #options input[type=checkbox]:checked {background:var(--ui-accent) radial-gradient(circle at 31px center,#25483a 0 8px,transparent 9px);border-color:transparent}
body.hud-ready :is(button,input,select):focus-visible {outline:2px solid var(--ui-accent);outline-offset:3px}
body.hud-ready #options :is(.settings-section,#look-options) {margin:0 0 14px;padding:16px;border:1px solid var(--ui-line);border-radius:17px;background:#ffffff03;min-width:0}
body.hud-ready #options .settings-section h3,body.hud-ready #options #look-options legend {margin:0 0 8px;padding:0;font-size:11px;font-weight:700;letter-spacing:.07em;color:var(--ui-accent)}
body.hud-ready #options #look-options legend {float:none;width:auto;padding:0 6px}
body.hud-ready #options label,body.hud-ready #options #look-options label {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:5px 0;font-size:13px;line-height:1.5;min-width:0}
body.hud-ready #options label:has(select),body.hud-ready #options label:has(input[type=range]) {flex-wrap:wrap}
body.hud-ready #options label:has(input[type=checkbox]) {flex-wrap:nowrap}
body.hud-ready #options select {margin-top:4px}
body.hud-ready #options output {font-size:12px;font-variant-numeric:tabular-nums;color:var(--ui-accent)}
body.hud-ready #options :is(.settings-section,#look-options) p {margin:5px 0 12px;font-size:11px;line-height:1.65}
body.hud-ready #settings-info a {color:var(--ui-muted);font-size:11px;text-underline-offset:3px}
body.hud-ready #vehicle-comfort {padding:0;margin:0;border:0}
body.hud-ready #vehicle-comfort summary {padding:0 0 8px;line-height:32px;font-size:12px;color:var(--ui-muted)}
body.hud-ready #vehicle-comfort label {margin:10px 0;font-size:13px}
body.hud-ready #cabin {padding:14px;border:1px solid var(--ui-line);border-radius:14px;background:#ffffff04;font-size:13px;line-height:1.7}
body.hud-ready #vehicle-panel #return {background:transparent;color:#efb9ae;border-color:#efb9ae38}
body.hud-ready .hud-action-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.hud-ready .hud-action-grid > button {min-height:72px;padding:12px 6px;gap:8px;font-size:12px;background:var(--ui-card)}
body.hud-ready .hud-action-grid svg {width:24px;height:24px;stroke-width:1.5}
body.hud-ready #together-controls {padding:16px;margin:0 0 16px;border:1px solid var(--ui-line);border-radius:17px;background:#ffffff03}
body.hud-ready:not(.ride-ui) #together-controls {margin-top:16px}
body.hud-ready #together-controls h3 {margin:0 0 12px;font-size:14px}
body.hud-ready #together-controls label {display:grid;gap:8px;font-size:12px;color:var(--ui-muted)}
body.hud-ready .together-buttons {gap:8px;margin:12px 0 0}
body.hud-ready #motion-panel-note {margin-bottom:16px}
body.hud-ready #drive-mode-setting {padding:4px;border-radius:15px;background:#0d2228;gap:4px}
body.hud-ready #drive-mode-setting button {padding:10px 8px;font-size:12px;border:0}
body.hud-ready #drive-mode-help,body.hud-ready #auto-destination-status {color:var(--ui-muted);font-size:12px;line-height:1.65}
body.hud-ready #destination-panel #auto-destinations {gap:8px}
body.hud-ready #destination-panel #auto-destinations h3 {margin:12px 0 0;font-size:14px}
body.hud-ready #destination-panel #auto-destinations button {min-height:86px;padding:13px;text-align:left;white-space:pre-line;font-size:11px;line-height:1.6;border-radius:15px}
body.hud-ready #auto-speed-setting {padding:16px;margin-top:18px;border:1px solid var(--ui-line);border-radius:17px;background:#ffffff03}
body.hud-ready .window-grid {gap:10px}
body.hud-ready .window-grid button {min-height:76px;border-radius:16px;font-size:13px}
body.hud-ready .window-all {gap:10px;margin-top:12px}
body.hud-ready #garage-summary {margin:0 0 14px;font-size:12px;color:var(--ui-muted)}
body.hud-ready .fleet-tabs {position:sticky;top:52px;z-index:2;padding:4px;border-radius:14px;background:#0d2228;gap:4px}
body.hud-ready .fleet-tabs button {min-height:44px;padding:8px;font-size:12px;border:0;background:transparent}
body.hud-ready #fleet-list {overflow:visible}
body.hud-ready .fleet-family {margin:20px 0 10px;font-size:11px;letter-spacing:.09em;color:var(--ui-muted)}
body.hud-ready .fleet-card {padding:14px;gap:12px;margin-bottom:8px;background:#ffffff03;border-color:var(--ui-line);border-radius:17px}
body.hud-ready .paint-swatch {width:28px;height:44px;border-radius:9px;box-shadow:inset 0 0 0 1px #ffffff30,inset 5px 0 10px #ffffff20}
body.hud-ready .fleet-info strong {font-size:13px;line-height:1.4;font-weight:650}
body.hud-ready .fleet-info span {font-size:11px;color:var(--ui-muted)}
body.hud-ready .fleet-info small {font-size:10px;color:#8fa8a2}
body.hud-ready .fleet-card button {flex:none;max-width:100px;font-size:11px;padding:9px 11px}
body.hud-ready .quick-selection {margin-top:16px;padding:12px;border:1px solid var(--ui-line);border-radius:15px}
body.hud-ready .quick-selection summary {min-height:32px;font-size:12px;color:var(--ui-text)}
body.hud-ready :is(.profile-card,.channel-card) {background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:24px;box-shadow:0 18px 48px #07191f45}
body.hud-ready #profile-panel {backdrop-filter:none;background:#07191f80}
body.hud-ready #nickname {background:#0d2228;border-color:var(--ui-line);border-radius:13px}
body.hud-ready .channel-row {background:#ffffff03;border-color:var(--ui-line)}
/* Walking controls inherit the light, individually outlined vehicle buttons. */
body.hud-ready:not(.ride-ui) :is(#hud-categories,#social-quick,#refreshment-pocket) {width:max-content;max-width:calc(100vw - 24px);padding:0;gap:6px;border:0;background:none;box-shadow:none}
body.hud-ready:not(.ride-ui) :is(#hud-categories,#social-quick,#refreshment-pocket) button {flex:none;min-width:48px;min-height:48px;margin:0;padding:5px 6px;border:1px solid #eff7e82b;border-radius:12px;background:#102a3359;color:#f1f6ef;font-size:11px;line-height:1.3;text-shadow:0 1px 3px #0007;box-shadow:none}
body.hud-ready:not(.ride-ui) #hud-categories button {width:52px}
body.hud-ready:not(.ride-ui) #hud-categories button span {position:static;width:auto;height:auto;margin:0;clip-path:none;overflow:visible;font-size:10px}
body.hud-ready:not(.ride-ui) :is(#hud-categories,#social-quick) svg {width:21px;height:21px}
body.hud-ready:not(.ride-ui) :is(#hud-categories,#social-quick) button[aria-pressed=true] {background:var(--ui-accent);color:#17382d;text-shadow:none}
body.hud-ready:not(.ride-ui) #quick button,body.hud-ready:not(.ride-ui) header button {min-height:44px;border:1px solid #eff7e82b;border-radius:12px;background:#102a3359;box-shadow:none;font-size:11px}
body.hud-ready:not(.ride-ui) #walk-controls button {border:1px solid #eff7e82b;border-radius:14px;background:#102a3359;color:#f1f6ef;font-size:11px;box-shadow:none}
body.hud-ready:not(.ride-ui) #walk-controls button[aria-pressed=true] {background:var(--ui-accent);color:#17382d}
@media(hover:hover){body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) button:not(:disabled):hover {border-color:#d4e6db60;filter:brightness(1.08)}}
body.hud-ready.hud-mobile :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) {inset:auto var(--hud-right,12px) var(--safe,12px) var(--hud-left,12px);width:auto;max-width:none;max-height:min(64dvh,520px);padding:18px;border-radius:24px}
body.hud-ready.hud-mobile :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) :is(.hud-panel-heading,.panel-title) {top:-18px;margin:-18px -18px 16px;padding:12px 18px;min-height:68px}
body.hud-ready.hud-mobile :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) select,body.hud-ready #channel-panel input {font-size:16px}
body.hud-ready.hud-mobile:not(.ride-ui) header {background:linear-gradient(#0e242b60,transparent)}
body.hud-ready.hud-landscape :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel) {inset:calc(env(safe-area-inset-top,0px) + 12px) var(--hud-right,12px) var(--safe,12px) auto;width:min(400px,calc(100vw - 160px));max-width:none;max-height:none;border-radius:22px}
body.hud-ready.hud-landscape .hud-action-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
@media(prefers-reduced-motion:no-preference){body.hud-ready :is(#options,#vehicle-panel,#motion-panel,#window-panel,#destination-panel,#garage-panel,#rest-panel):not([hidden]) {animation:surface-enter .15s ease-out} @keyframes surface-enter {from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}}

/* One button palette across HUD, sheets, walking and driving. Colour-only
   overrides intentionally win over older per-widget themes; sizing stays local.
   Alpha compositing needs no additional backdrop blur or animation pass. */
body.hud-ready {
 --control-surface:#102a33ad;
 --control-selected:#315e68c4;
 --control-border:#f0f6f53d;
 --control-selected-border:#e6f8e8b8;
 --control-text:#f8faf9;
}
body.hud-ready button {
 background:var(--control-surface)!important;
 color:var(--control-text)!important;
 border-color:var(--control-border)!important;
 text-shadow:0 1px 3px #0008!important;
 box-shadow:inset 0 1px 0 #ffffff08!important;
 backdrop-filter:none;
}
body.hud-ready button:is([aria-pressed=true],[aria-expanded=true],[aria-selected=true]) {
 background:var(--control-selected)!important;
 border-color:var(--control-selected-border)!important;
 box-shadow:inset 0 -2px 0 #d6eddd!important;
}
body.hud-ready button:is(.primary,.fleet-action) {border-color:#e6f8e878!important}
body.hud-ready button:is(:disabled,[aria-disabled=true]) {opacity:.5}
body.hud-ready button[aria-pressed=true]:disabled {opacity:.9}
body.hud-ready :is(#seat-map,#wardrobe-shop) button :is(span,strong),
body.hud-ready :is(.hud-panel-heading,.panel-title,.channel-heading) > button::after {color:var(--control-text)!important}
body.hud-ready #pedals button[data-key=accelerate] {background:#254f47b8!important;border-color:#c9e4d280!important}
body.hud-ready #pedals button[data-key=brake] {background:#613c43b8!important;border-color:#edc6c980!important}
body.hud-ready button.signal-pulse {background:#704820b8!important;border-color:#ffd38bbf!important}
body.hud-ready #high-beam[aria-pressed=true] {border-color:#9fd6ffcc!important}
body.hud-ready button:active {background:#426975d9!important;border-color:#ffffffbf!important}
@media(hover:hover) and (pointer:fine){
 body.hud-ready button:not(:disabled):not([aria-disabled=true]):hover {border-color:#f3faf99e!important}
}
