/* fahrmodus-v01.css — Gemini (Antigravity), 29.11.2026
   Eigener Reiter „Fahren“ im Volvo C304 Expedition Studio (Steps 1 + 2 + 3:
   Fahren, 6x6-Federung & Verschränkung, over-the-hill-Biomes, Kollisionen, FD51/Sperren & Performance-Modus).
   Lässt die drei Basis-Reiter (Studio, Farben & Räder, Anbauteile & Technik) vollständig unangetastet. */

/* 4. Reiter „Fahren“ in der Topbar-Reiterleiste */
.reiter-v67 .tabs button[data-drive-tab="fahren"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reiter-v67 .tabs button[data-drive-tab="fahren"] .drive-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5c7560;
  flex: none;
  transition: background .15s, box-shadow .15s;
}
.reiter-v67 .tabs button[data-drive-tab="fahren"].chosen .drive-dot {
  background: var(--accent, #d0e5a4);
  box-shadow: 0 0 7px #d0e5a4aa;
}
@media (max-width: 1260px) {
  .reiter-v67 .topbar { gap: 10px; }
  .reiter-v67 .tabs button { padding: 7px 11px; font-size: 11.5px; }
  .reiter-v67 .brand span:last-child { display: none; }
}

/* Reiter-Panel für „Fahren“ anzeigen */
body[data-tab="fahren"] .pane[data-pane="fahren"] {
  display: block;
}
body[data-tab="fahren"] .reiter-v67 .ausbau-strip,
body[data-tab="fahren"] .reiter-v67 .view-toolbar,
body[data-tab="fahren"] .reiter-v67 .gesture-hint,
body[data-tab="fahren"] .reiter-v67 .selection-card,
body[data-tab="fahren"] .reiter-v67 .scene-bar {
  display: none !important;
}

/* Optionales Vollbild im Fahren-Reiter (Panel einklappen) */
body[data-tab="fahren"].drive-fullscreen .reiter-v67 .workspace {
  grid-template-columns: minmax(0, 1fr);
}
body[data-tab="fahren"].drive-fullscreen .reiter-v67 .panel {
  display: none;
}

/* Pane-Inhalt im Stil der Studio-Gruppen */
.drive-pane .drive-step-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #d0e5a440;
  background: #d0e5a414;
  color: var(--accent, #d0e5a4);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.drive-pane .drive-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.drive-pane .drive-btn-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.drive-pane .drive-veh-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.drive-pane .drive-veh-grid button {
  padding: 6px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drive-pane .drive-btn-grid button,
.drive-pane .drive-action-row button {
  font-size: 11px;
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid #ffffff14;
  background: #0b110e;
  color: #c9d3c8;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: border-color .14s, background .14s, color .14s;
}
.drive-pane .drive-btn-grid button small {
  display: block;
  font-size: 8.5px;
  color: #7c8d7f;
  margin-top: 2px;
}
.drive-pane .drive-btn-grid button:hover,
.drive-pane .drive-action-row button:hover {
  border-color: #ffffff2e;
  color: #edf4ea;
}
.drive-pane .drive-btn-grid button.chosen {
  background: #d0e5a41c;
  border-color: #d0e5a458;
  color: var(--accent, #d0e5a4);
}
.drive-pane .drive-btn-grid button.chosen small {
  color: #b7cca0;
}
.drive-pane .drive-btn-grid button.lock-on {
  background: #e3a86b24;
  border-color: #e3a86b70;
  color: #f4c68e;
}
.drive-pane .drive-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 6px;
}
.drive-pane .drive-check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.drive-pane .drive-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #c9d3c8;
  cursor: pointer;
}
.drive-pane .drive-check input {
  accent-color: #b7d683;
  cursor: pointer;
}
.drive-pane .drive-sub-label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7e9081;
  margin: 8px 0 5px;
}

/* Live-Geometrie- & Fahrwerk-Tabelle im Fahren-Reiter */
.drive-telemetry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  font-size: 10.5px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #ffffff10;
  background: #0a100d;
}
.drive-telemetry span {
  color: #8b9a8d;
}
.drive-telemetry b {
  color: #dfe8dc;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.drive-wheel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid #ffffff10;
  background: #0a100d;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}
.drive-wheel-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  color: #8b9a8d;
}
.drive-wheel-cell b {
  color: #cfdacc;
  font-weight: 500;
}
.drive-wheel-cell.slip b {
  color: #f2b46e;
}
.drive-wheel-cell.air b {
  color: #e88e8e;
}

/* Schwebende Pill-Leiste oben mittig im Viewer */
.drive-stage-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
  max-width: calc(100% - 260px);
}
.drive-stage-bar[hidden],
.drive-hud[hidden] {
  display: none !important;
}
.drive-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #ffffff1c;
  background: #0b120ed9;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px #0000004a;
}
.drive-pill-group button {
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #b7c3b6;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s;
}
.drive-pill-group button:hover {
  color: #eef5ec;
  background: #ffffff0c;
}
.drive-pill-group button.chosen {
  background: #d0e5a424;
  border-color: #d0e5a455;
  color: var(--accent, #d0e5a4);
}

/* Kurze Kollisions-/Status-Meldung oben unter der Pill-Leiste */
.drive-toast {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  background: #1d150fe8;
  border: 1px solid #e8a45c66;
  color: #f7c994;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
  white-space: nowrap;
}
.drive-toast.show {
  opacity: 1;
}

/* Kompaktes Offroad-HUD unten mittig im Viewer */
.drive-hud {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  max-width: calc(100% - 24px);
}
.drive-gauges {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid #ffffff1a;
  background: #0b120ee2;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px #00000055;
  pointer-events: auto;
}
.drive-speed {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 92px;
  padding-right: 12px;
  border-right: 1px solid #ffffff14;
}
.drive-speed-val {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  color: #edf4ea;
  line-height: 1;
}
.drive-speed-unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drive-speed-unit small {
  font-size: 8.5px;
  letter-spacing: .12em;
  color: #8b9a8d;
  text-transform: uppercase;
}
.drive-gear {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #d0e5a420;
  color: var(--accent, #d0e5a4);
  text-align: center;
}
.drive-gear.rev {
  background: #e3a86b28;
  color: #f0be82;
}

.drive-incline-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding-right: 12px;
  border-right: 1px solid #ffffff14;
  min-width: 118px;
}
.drive-incline-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #9aa89b;
}
.drive-incline-row b {
  color: #e4ede3;
  font-variant-numeric: tabular-nums;
}
.drive-surface-tag {
  font-size: 9px;
  color: #b7cca0;
  margin-top: 1px;
  white-space: nowrap;
}

.drive-steer-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 148px;
  padding-right: 12px;
  border-right: 1px solid #ffffff14;
}
.drive-steer-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  color: #9aa89b;
}
.drive-steer-head b {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #e4ede3;
}
.drive-steer-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #ffffff14;
  overflow: hidden;
}
.drive-steer-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ffffff44;
}
.drive-steer-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-radius: 999px;
  background: var(--accent, #d0e5a4);
}
.drive-steer-ack {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: #7f9182;
}

.drive-drivetrain-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  align-content: center;
}
.drive-drivetrain-pills :is(button, span) {
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #ffffff1a;
  background: #ffffff08;
  color: #8b9a8d;
  cursor: pointer;
  white-space: nowrap;
}
.drive-drivetrain-pills :is(button, span).on {
  background: #d0e5a424;
  border-color: #d0e5a460;
  color: var(--accent, #d0e5a4);
}
.drive-drivetrain-pills :is(button, span).lock {
  background: #e3a86b28;
  border-color: #e3a86b75;
  color: #f4c68e;
}

.drive-keys-hint {
  font-size: 9.5px;
  color: #c2cfc1;
  padding: 4px 11px;
  border-radius: 999px;
  background: #0b120eb8;
  border: 1px solid #ffffff12;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.drive-keys-hint kbd {
  display: inline-block;
  font-family: inherit;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid #ffffff26;
  background: #ffffff10;
  color: #eef5ec;
}
@media (max-width: 920px) {
  .drive-incline-box { display: none; }
  .drive-keys-hint { font-size: 8.5px; white-space: normal; text-align: center; }
}

/* Fahrmodus v04: gemeinsame, einklappbare Steuerung in Studio und Standalone. */
body.drive-controls-left .reiter-v67 .workspace { grid-template-columns: minmax(0, 1fr); }
body.drive-controls-left .reiter-v67 .workspace > .panel { display: none; }
body.drive-controls-left .reiter-v67 .stage { flex: 1; height: auto; min-height: 0; }
body.drive-controls-left .reiter-v67 .stage-top { justify-content: flex-end; }
body.drive-controls-left .stage-top .chip { display: none; }
.drive-controls {
  position: absolute;
  z-index: 15;
  inset: 12px auto 12px 12px;
  width: min(312px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.drive-panel-toggle,
.drive-controls-panel {
  pointer-events: auto;
  border: 1px solid #d0e5a450;
  background: #101914f5;
  color: #eef4ea;
}
.drive-panel-toggle {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}
.drive-panel-toggle:hover,
.drive-controls-panel [data-drive-hold].active { background: #263d2d; }
.drive-controls-panel {
  width: 100%;
  min-height: 0;
  padding: 2px 12px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 12px;
  scrollbar-width: thin;
}
.drive-controls-panel .drive-action-row button,
.drive-controls-panel .drive-btn-grid button { min-height: 36px; }
.drive-controls-panel [data-drive-blink] { margin-top: 5px; }
.drive-controls-panel .drive-target-label { display: block; margin: 8px 0 4px; font-size: 12px; }
.drive-controls-panel select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d0e5a44a;
  border-radius: 7px;
  background: #0b110e;
  color: #eef4ea;
  padding: 4px 8px;
}
.drive-route-status {
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0b120eea;
  color: #e0efbf;
  font-size: 12px;
  text-align: center;
}
body.drive-controls-left .drive-toast {
  top: auto;
  bottom: 116px;
  max-width: calc(100% - 24px);
  text-align: center;
  white-space: normal;
}
.drive-has-touch .drive-hud { bottom: 76px; }
.drive-has-touch .drive-keys-hint { display: none; }
body.drive-controls-left .drive-has-touch .drive-toast { bottom: 166px; }
.drive-drivetrain-pills span { cursor: default; }
@media (max-width: 900px) {
  body.drive-controls-left .reiter-v67 .leftcol { flex: 1; min-height: 0; }
  body.drive-controls-left .reiter-v67 .stage { min-height: min(55dvh, 360px); }
  .drive-controls-panel .drive-action-row button,
  .drive-controls-panel .drive-btn-grid button { min-height: 42px; }
}
@media (max-width: 520px) {
  .drive-controls { width: min(300px, calc(100% - 24px)); }
  .drive-has-touch .drive-controls { bottom: 76px; }
  .drive-controls-left .drive-gauges { gap: 7px; padding: 6px 8px; }
}

.drive-map { display: block; width: 100%; margin-top: 6px; border: 1px solid #d0e5a436; border-radius: 8px; }
