/* București Drive — cohesive dark frosted slate glass UI across cockpit, exterior cameras, dialogs & mobile. */
.game-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper, #0e141b); }
.drive-header { display: none; }
.drive-main { width: 100%; max-width: none; margin: 0; padding: 0; }
.game-shell { background: #0e141b; border: 0; border-radius: 0; }

.scene-wrap {
  position: relative;
  overflow: hidden;
  background: #0d131b;
  height: 100dvh;
  min-height: 420px;
}
.scene-wrap > canvas#scene {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  touch-action: none;
}
#scene:focus { outline: none; }

/* Unified frosted dark slate surface mixin */
.scene-hud > div,
.career-hud,
.drive-toast,
.drive-quiz-timer,
.nav-toggle,
.nav-panel,
.nav-instruction,
#cockpit-startup-hud,
#hud-toggle {
  background: linear-gradient(145deg, rgba(39, 48, 60, 0.78), rgba(24, 31, 41, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(6, 11, 18, 0.34);
  color: #f1f5f9;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

/* Top HUD layout */
.scene-hud {
  position: absolute;
  inset: 12px 14px auto;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}
/* Minimalist 2-pill top-left HUD matching pro simulator aesthetic */
.hud-left {
  margin-top: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.hud-pill-top,
.hud-pill-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(28, 36, 46, .76), rgba(15, 20, 28, .72));
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(4, 8, 15, .38);
  color: #f1f5f9;
  white-space: nowrap;
}
.hud-pill-top { position: relative; z-index: 85; padding: 4px 6px; gap: 5px; flex-wrap: nowrap; }
.hud-pill-top .bd-menu-link,
.hud-pill-top .city-switch {
  padding: 4px 8px !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #e2e8f0 !important;
}
.hud-pill-top .bd-menu-link {
  border-right: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 7px 0 0 7px !important;
  padding-right: 10px !important;
}
.hud-pill-top .bd-menu-link:hover,
.hud-pill-top .city-switch:hover {
  background: rgba(255, 255, 255, .10) !important;
  color: #ffffff !important;
}
.hud-pill-top .bd-menu-link svg,
.hud-pill-top .city-switch svg {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 13px !important;
}
/* Compact Top-Left Dropdown Triggers (Meniu, Server, Admin, Mob Cam) */
.bd-info-dd, .bd-srv-dd, .bd-admin-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.bd-info-trigger,
.bd-srv-trigger,
.bd-adm-trigger,
.bd-mob-cam-btn {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .09);
  color: #f8fafc;
  font: 650 11.5px/1 var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .14s, border-color .14s;
}
.bd-srv-trigger {
  border-color: rgba(56, 189, 248, .38);
  background: rgba(14, 165, 233, .16);
}
.bd-adm-trigger {
  border-color: rgba(251, 191, 36, .42);
  background: rgba(217, 119, 6, .20);
}
.bd-mob-cam-btn { display: none; }
.bd-ham-ic { width: 13px; height: 13px; flex: 0 0 13px; opacity: .95; }
#bd-mp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  flex: 0 0 7px;
}
.bd-info-trigger:hover, .bd-info-dd.is-open .bd-info-trigger,
.bd-srv-trigger:hover, .bd-srv-dd.is-open .bd-srv-trigger,
.bd-adm-trigger:hover, .bd-admin-dd.is-open .bd-adm-trigger,
.bd-mob-cam-btn:hover {
  background: rgba(56, 189, 248, .28);
  border-color: rgba(125, 211, 252, .75);
  color: #ffffff;
}
.bd-info-dd.is-open .bd-dd-caret,
.bd-srv-dd.is-open .bd-dd-caret,
.bd-admin-dd.is-open .bd-dd-caret {
  transform: rotate(180deg);
}
.bd-info-popover,
.bd-srv-popover,
.bd-adm-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 125;
  background: rgba(13, 19, 28, .97);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 22px 58px rgba(2, 6, 14, .82);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  white-space: normal;
}
.bd-info-popover {
  width: min(400px, calc(100vw - 24px));
  max-height: min(76vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  gap: 7px;
}
.bd-srv-popover {
  width: min(330px, calc(100vw - 24px));
  max-height: min(76vh, 520px);
  overflow-y: auto;
  padding: 11px;
  gap: 8px;
}
.bd-adm-popover {
  width: min(260px, calc(100vw - 24px));
  padding: 11px;
  gap: 8px;
}
.bd-info-popover[hidden],
.bd-srv-popover[hidden],
.bd-adm-popover[hidden] { display: none !important; }
.bd-pop-head,
.bd-srv-dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  font: 700 13px/1.2 var(--sans);
  color: #f8fafc;
}
.bd-pop-x {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: #e2e8f0;
  font: 700 13px/1 var(--sans);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.bd-pop-x:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.bd-acc-group {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  background: rgba(22, 30, 43, .84);
  overflow: hidden;
}
.bd-acc-group.is-open {
  border-color: rgba(56, 189, 248, .50);
  background: rgba(18, 27, 40, .96);
}
.bd-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
}
.bd-acc-trigger:hover { background: rgba(255, 255, 255, .04); }
.bd-acc-ic { font-size: 16px; line-height: 1; flex: 0 0 22px; text-align: center; }
.bd-acc-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bd-acc-title { font: 700 13px/1.2 var(--sans); color: #f8fafc; }
.bd-acc-sub { font: 500 11px/1.25 var(--sans); color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-acc-chev { font-size: 11px; color: #94a3b8; transition: transform .15s; flex-shrink: 0; }
.bd-acc-group.is-open .bd-acc-chev { transform: rotate(180deg); color: #7dd3fc; }
.bd-acc-body {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bd-acc-body[hidden] { display: none !important; }
.bd-acc-slot, .bd-acc-stack { display: flex; flex-direction: column; gap: 6px; }
.bd-acc-slot:empty { display: none; }
.bd-acc-injected { margin-top: 0 !important; font-size: 12.5px !important; line-height: 1.3 !important; }
.bd-ip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bd-dd-chip {
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(34, 43, 56, .84);
  color: #f1f5f9;
  font: 700 12px/1.1 var(--sans);
  cursor: pointer;
  text-align: center;
}
.bd-dd-chip:hover { border-color: rgba(125, 211, 252, .55); background: rgba(56, 189, 248, .22); }
.bd-srv-dd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bd-srv-dd-actions button {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(30, 41, 59, .92);
  color: #fff;
  font: 700 12px/1.1 var(--sans);
  cursor: pointer;
  text-align: center;
}
.bd-srv-dd-peers, .bd-srv-dd-servers { display: flex; flex-direction: column; gap: 5px; }
.bd-srv-peer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(30, 41, 59, .78);
  border: 1px solid rgba(56, 189, 248, .28);
  font-size: 11.5px;
}
.bd-srv-peer-info { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-srv-peer-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.bd-srv-peer-btns { display: flex; gap: 4px; flex-shrink: 0; }
.bd-srv-peer-btns button {
  width: 28px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}
.bd-srv-peer-btns button.is-active { background: #166534; border-color: #22c55e; }
.bd-srv-dd-hint { font-size: 11.5px; color: #94a3b8; padding: 2px; }
.bd-srv-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(30, 41, 59, .75);
  color: #e2e8f0;
  font: 650 12px/1.2 var(--sans);
  cursor: pointer;
  text-align: left;
}
.bd-srv-opt.is-current { border-color: rgba(74, 222, 128, .70); background: rgba(22, 163, 74, .24); color: #ffffff; }
.bd-srv-opt-meta { font-size: 11px; color: #93c5fd; white-space: nowrap; }
.bd-srv-dd-priv { display: flex; gap: 6px; align-items: center; }
.bd-srv-dd-priv input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font: 600 12px var(--sans);
}
.bd-srv-dd-priv button {
  padding: 7px 11px;
  border-radius: 8px;
  border: 0;
  background: #4f46e5;
  color: #fff;
  font: 700 12px var(--sans);
  cursor: pointer;
}
.bd-srv-dd-full,
.bd-adm-item {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(30, 41, 59, .88);
  color: #f8fafc;
  font: 700 12.5px/1.2 var(--sans);
  cursor: pointer;
  text-align: left;
}
.bd-adm-item.bd-adm-ed {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-color: rgba(196, 181, 253, .45);
}
.bd-key-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 10px;
  font-size: 11px;
  color: #cbd5e1;
}
.bd-key-grid > div {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
}
.bd-key-grid span { margin-left: auto; color: #94a3b8; font-size: 10.5px; }

/* Smart H-key Details Dock (Joburi, Obiectiv, Regulă) */
.bd-details-dock {
  display: none;
  position: absolute;
  left: 14px;
  bottom: 54px;
  z-index: 15;
  width: min(560px, calc(100vw - 260px));
  pointer-events: auto;
}
body[data-hud="details"] .bd-details-dock { display: block; }
.bdd-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}
.bdd-card {
  padding: 8px 10px;
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(24, 32, 42, .84), rgba(14, 19, 27, .82));
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(3, 7, 14, .45);
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #f1f5f9;
}
.bdd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 700 9.5px/1 var(--sans);
  letter-spacing: .06em;
  color: #93c5fd;
}
.bdd-head b { color: #fde68a; font-size: 10.5px; }
.bdd-job-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.bdd-job-actions button {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(34, 44, 58, .85);
  color: #e2e8f0;
  font: 650 10.5px/1.1 var(--sans);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bdd-job-actions button:hover {
  background: rgba(56, 189, 248, .24);
  border-color: rgba(125, 211, 252, .6);
  color: #fff;
}
.bdd-job-live {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bdd-job-live.is-active { color: #86efac; font-weight: 600; }
.bdd-obj strong { font-size: 12px; color: #f8fafc; line-height: 1.2; }
.bdd-obj small { font-size: 10.5px; color: #cbd5e1; line-height: 1.25; }
@media (max-width: 700px) {
  .bd-details-dock { width: calc(100vw - 24px); bottom: 145px; }
  .bdd-row { grid-template-columns: 1fr; }
}
/* Stats pill: 880 PTS | 0 / 4 COLIZIUNI | 04:36 */
.hud-pill-stats { position: relative; z-index: 10; padding: 6px 12px; gap: 10px; }
.hud-stat-pts { display: inline-flex; align-items: center; gap: 6px; }
.hud-shield-sm { width: 16px; height: 16px; color: #cbd5e1; opacity: .9; }
.hud-left b#score {
  display: inline;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1;
  color: #f8fafc;
}
.hud-stat-dmg {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #cbd5e1;
}
.hud-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .16);
}
.hud-right.speed-gauge {
  position: relative;
  margin-left: auto;
  width: 108px;
  height: 108px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: visible;
  text-align: center;
}
.sg-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sg-center {
  position: relative;
  display: grid;
  gap: 1px;
  place-items: center;
  margin-top: 2px;
}
.sg-center b {
  display: block;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: #f8fafc;
}
.sg-center small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  color: #9fb0c4;
}
.sg-limit {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: inline-grid;
  place-items: center;
}
.limit-sign {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #dc2626;
  color: #111827;
  font: 800 11px/1 var(--sans);
  box-shadow: 0 0 12px rgba(239, 68, 68, .48), 0 3px 8px rgba(0, 0, 0, .4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
/* Legal speed tolerance visual feedback (warn = within +10 km/h legal margin, danger = over +10 km/h) */
.hud-right.speed-gauge[data-speed-state="warn"] .sg-center b {
  color: #fb923c;
  text-shadow: 0 0 12px rgba(251, 146, 60, 0.55);
}
.hud-right.speed-gauge[data-speed-state="warn"] #speed-arc {
  stroke: #f97316 !important;
}
.hud-right.speed-gauge[data-speed-state="warn"] .limit-sign {
  background: #fff7ed;
  border-color: #f97316;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.78), 0 3px 8px rgba(0, 0, 0, .4);
  transform: scale(1.08);
}
.hud-right.speed-gauge[data-speed-state="danger"] .sg-center b {
  color: #f87171;
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
}
.hud-right.speed-gauge[data-speed-state="danger"] #speed-arc {
  stroke: #ef4444 !important;
}
.hud-right.speed-gauge[data-speed-state="danger"] .limit-sign {
  background: #dc2626;
  color: #ffffff;
  border-color: #fecaca;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.95), 0 3px 10px rgba(0, 0, 0, .5);
  animation: bdLimitPulse 0.7s ease-in-out infinite;
}
@keyframes bdLimitPulse {
  0%, 100% { transform: scale(1.08); }
  50% { transform: scale(1.22); }
}

/* Top-center Fuel + RON compact pill */
.career-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 6px 14px;
  border-radius: 999px !important;
  background: linear-gradient(145deg, rgba(32, 40, 50, .78), rgba(16, 22, 30, .74)) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  pointer-events: none;
  display: grid;
  gap: 4px;
  min-width: auto;
}
.ch-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 12.5px;
  color: #e2e8f0;
  white-space: nowrap;
}
.ch-money { display: inline-flex; align-items: center; gap: 5px; }
.ch-coin { font-size: 13px; line-height: 1; }
.ch-main strong, .ch-main b { font-weight: 700; color: #f8fafc; }
.ch-dot { opacity: .45; }
.ch-fuel { display: inline-flex; align-items: center; gap: 4px; }
.ch-fuel svg { width: 13px; height: 13px; color: #cbd5e1; }
.ch-fuel-btn {
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 1px 5px;
  margin: -1px -5px;
  color: inherit;
  font: inherit;
  transition: background-color .14s ease, border-color .14s ease;
}
.ch-fuel-btn:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .20);
}
.ch-fuel-btn.is-on svg { color: #fbbf24; }
.ch-bar {
  width: 100%;
  height: 3.5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.ch-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #bae6fd);
  box-shadow: 0 0 8px rgba(125, 211, 252, .45);
  transition: width .25s ease;
}

/* Quiz Countdown — docked cleanly inside the unified top-left glass card footer */
.drive-quiz-timer {
  position: static;
  transform: none;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  white-space: nowrap;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 6px;
  font-size: 11px;
  pointer-events: auto;
}
.drive-quiz-timer .drive-quiz-clock-icon { font-size: 13px; color: #cbd5e1; line-height: 1; }
.drive-quiz-timer .drive-quiz-clock-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: #cbd5e1; }
.drive-quiz-timer strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: .01em;
}
.drive-quiz-timer.urgent strong { color: #fde68a; }
.drive-quiz-timer .drive-quiz-freq {
  padding: 2px 5px;
  font-size: 9.5px;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  color: #cbd5e1;
}
.drive-quiz-timer .drive-quiz-test-now {
  padding: 2px 5px;
  font-size: 9px;
}
#drive-quiz-timer .drive-quiz-test-now[hidden] { display: none !important; }

/* Startup sequence guidance pill */
#cockpit-startup-hud {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border-color: rgba(125, 211, 252, .45);
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
}
#cockpit-startup-hud[hidden] { display: none !important; }
#cockpit-startup-hud .cs-badge {
  background: rgba(56, 189, 248, .18);
  border: 1px solid rgba(125, 211, 252, .45);
  color: #bae6fd;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
#cockpit-startup-hud small { color: #9fb0c4; font-size: 11px; }

/* Bottom-left Info Toast */
.drive-toast {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  max-width: min(520px, calc(100% - 260px));
  padding: 9px 13px 9px 36px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #e6edf5;
}
.drive-toast::before {
  content: 'i';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #9fb0c4;
  color: #cbd5e1;
  font: 700 10px/15px var(--sans);
  text-align: center;
}
.drive-toast.penalty {
  border-color: rgba(248, 113, 113, .55);
  background: linear-gradient(145deg, rgba(64, 24, 28, .88), rgba(38, 18, 22, .84));
  color: #fecaca;
}
.drive-toast.penalty::before { content: '!'; border-color: #f87171; color: #fecaca; }

/* Navigator & Minimap (bottom right aligned seamlessly) */
.scene-wrap canvas[aria-label^="Hartă"] {
  z-index: 12 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: rgba(20, 26, 35, .84) !important;
  box-shadow: 0 12px 28px rgba(4, 8, 14, .45);
}
.nav-toggle {
  position: absolute;
  bottom: 244px;
  right: 18px;
  width: 220px;
  min-height: 36px;
  z-index: 15;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}
.nav-toggle:hover, .nav-toggle.is-active {
  border-color: rgba(147, 197, 253, .6);
  background: rgba(46, 58, 74, .88);
}
.nav-panel {
  position: absolute;
  bottom: 284px;
  right: 16px;
  width: 250px;
  max-height: min(380px, calc(100% - 300px));
  overflow: auto;
  z-index: 15;
  padding: 12px;
}
.nav-panel[hidden], .nav-instruction[hidden] { display: none !important; }
.nav-panel > strong { display: block; font-size: 12px; font-weight: 700; margin: 2px 2px 9px; color: #cbd5e1; }
.nav-panel button {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(42, 52, 65, .78);
  color: #f1f5f9;
  font-size: 12px;
  cursor: pointer;
}
.nav-panel button:hover { background: rgba(58, 72, 90, .9); border-color: rgba(255, 255, 255, .36); }
.nav-panel button.nav-stop { background: rgba(79, 32, 34, .75); color: #fecaca; margin-top: 8px; }
.nav-instruction {
  position: absolute;
  right: 18px;
  bottom: 286px;
  left: auto;
  top: auto;
  transform: none;
  z-index: 15;
  width: 220px;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(11, 16, 24, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 22px rgba(2, 6, 14, 0.55);
  color: #f0f9ff;
  font-size: 11.5px;
  line-height: 1.32;
  font-weight: 700;
  text-align: left;
  pointer-events: none;
}

/* HUD Mode button */
#hud-toggle {
  position: fixed;
  left: 12px;
  top: 52%;
  z-index: 30;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  opacity: .72;
}
#hud-toggle:hover { opacity: 1; border-color: rgba(255, 255, 255, .42); }
body[data-hud="off"] :is(.scene-hud,.career-hud,.drive-toast,.drive-toolbar,.mobile-driving,.mission-strip,.live-rule,.drive-foot,.drive-header,.nav-toggle,.nav-panel,.nav-instruction,.training-instruction,.fuel-rescue,#cockpit-startup-hud,.bd-top-left-pills,#cabin-model-status,canvas[aria-label^="Hartă"]) { display: none !important; }
body[data-hud="essential"] :is(.hud-left,.career-hud,.drive-toast,.keyboard-guide,.mission-strip,.live-rule,.drive-foot,.drive-header,.nav-toggle,.nav-panel,canvas[aria-label^="Hartă"],#restart,.bd-top-left-pills) { display: none !important; }
body[data-hud="off"] { margin: 0; padding: 0; overflow: hidden; }
body[data-hud="off"] .scene-wrap { position: fixed; inset: 0; width: 100vw; height: 100dvh; }
body[data-hud="off"] #hud-toggle { display: none !important; }
body[data-hud="off"] .drive-quiz-timer { top: 12px; }
body[data-hud="essential"] .drive-quiz-timer { top: 12px; }

/* Bottom Toolbar — normalized single row with upward-opening frosted dropdowns */
.drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 16px;
  background: rgba(15, 20, 28, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  min-height: 48px;
  position: relative;
  z-index: 28;
}
.keyboard-guide {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 11.5px;
  color: #9aa7b8;
}
.bd-kb-sep { opacity: .4; }
.bd-dd { position: relative; display: inline-flex; align-items: center; }
.bd-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(34, 43, 56, .84);
  color: #e2e8f0;
  font: 650 11.5px/1.1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .14s, border-color .14s;
}
.bd-dd-trigger:hover, .bd-dd.is-open .bd-dd-trigger {
  background: rgba(52, 65, 84, .95);
  border-color: rgba(147, 197, 253, .55);
  color: #ffffff;
}
.bd-dd-caret { font-style: normal; font-size: 10px; opacity: .75; transition: transform .15s; }
.bd-dd.is-open .bd-dd-caret { transform: rotate(180deg); }
.bd-dd-menu {
  position: absolute;
  bottom: calc(100% + 9px);
  right: 0;
  min-width: 224px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 21, 30, .96);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(2, 6, 14, .72);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 50;
}
.bd-dd-left .bd-dd-menu { right: auto; left: 0; min-width: 250px; }
.bd-dd-menu[hidden] { display: none !important; }
.bd-dd-title {
  font: 700 10px/1.1 var(--sans);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8fa0b5;
  padding: 2px 4px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 2px;
}
.bd-info-popover .bd-dd-item {
  position: static !important;
  inset: auto !important;
  opacity: 1 !important;
  width: 100% !important;
  text-align: left !important;
  justify-content: flex-start !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  background: rgba(30, 41, 59, .84) !important;
  color: #f1f5f9 !important;
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  cursor: pointer;
}
.bd-info-popover .bd-dd-item:hover {
  background: rgba(56, 189, 248, .22) !important;
  border-color: rgba(125, 211, 252, .55) !important;
}
.bd-info-popover .bd-dd-card {
  margin: 0 !important;
  padding: 9px 10px !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  gap: 8px !important;
}
.bd-info-popover .mission-strip strong { font-size: 12.5px !important; }
.bd-info-popover .mission-strip p { font-size: 12px !important; line-height: 1.35 !important; }
.bd-info-popover .live-rule { align-items: flex-start !important; }
.bd-info-popover .live-rule .rule-symbol {
  width: 34px !important;
  height: 34px !important;
  font-size: 14px !important;
  flex: 0 0 34px !important;
}
.bd-info-popover .live-rule h1 { font-size: 13px !important; margin: 2px 0 !important; }
.bd-info-popover .live-rule p { font-size: 12px !important; line-height: 1.35 !important; margin: 0 0 4px !important; }
.bd-info-popover .live-rule a { font-size: 11px !important; }
.bd-info-popover .bd-dd-foot {
  margin: 0 !important;
  padding: 6px 2px 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 12px !important;
  color: #cbd5e1 !important;
}
.bd-info-popover .bd-dd-foot details summary { font-size: 12px; color: #bae6fd; cursor: pointer; }
.bd-info-popover .bd-dd-foot details p { font-size: 11.5px; line-height: 1.45; margin: 5px 0 0; color: #94a3b8; }
.drive-toolbar[hidden] { display: none !important; }
.bd-dd-cam-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
.bd-dd-cam-grid button {
  padding: 6px 8px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(34, 43, 56, .75) !important;
  text-align: center;
}
.bd-key-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 2px;
  font-size: 11.5px;
  color: #cbd5e1;
}
.bd-key-list > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bd-key-list span { margin-left: auto; color: #94a3b8; font-size: 11px; }
kbd {
  background: rgba(43, 52, 64, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  padding: 4px 7px;
  font: 700 11px/1 var(--sans);
  color: #f1f5f9;
}
.drive-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.drive-actions button {
  border-radius: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(36, 45, 57, 0.88);
  color: #e8edf5;
  font: 600 12px var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background-color .15s;
}
.drive-actions button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(52, 64, 80, 0.92);
}
.drive-actions button#learn {
  background: rgba(52, 65, 82, 0.94);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  font-weight: 700;
}
.camera-pills {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(15, 20, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.drive-actions .camera-pills button {
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #a6b4c6;
  font-size: 12px;
}
.drive-actions .camera-pills button.active {
  background: rgba(65, 80, 99, 0.85);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
}

/* Compact Timed Road Question Modal (.drive-quiz-dialog) */
.drive-quiz-dialog {
  width: min(510px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  background: rgba(22, 29, 39, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 15px 17px;
  color: #f1f5f9;
  box-shadow: 0 26px 80px rgba(4, 8, 15, 0.72);
  box-sizing: border-box;
  font-family: var(--sans);
}
.drive-quiz-dialog::backdrop { background: rgba(7, 11, 17, 0.72); backdrop-filter: blur(5px); }
.drive-quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.drive-quiz-eyebrow { font: 700 10px var(--sans); letter-spacing: .07em; color: #93c5fd; text-transform: uppercase; }
.drive-quiz-reward {
  display: inline-block;
  background: rgba(34, 197, 94, .18);
  border: 1px solid rgba(74, 222, 128, .4);
  border-radius: 6px;
  padding: 4px 8px;
  font: 700 11px var(--sans);
  color: #86efac;
  white-space: nowrap;
}
.dq-body {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 10px 0 11px;
}
.quiz-visual {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: #0f151d;
  padding: 6px;
  text-align: center;
}
.quiz-visual img {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 82px;
  object-fit: contain;
}
.quiz-visual figcaption {
  font: 500 9px/1.25 var(--sans);
  color: #7f90a4;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quiz-visual a { color: #93c5fd; text-decoration: underline; }
.dq-prompt h2 {
  font: 700 15.5px/1.32 var(--sans);
  margin: 0 0 4px;
  color: #f8fafc;
}
.drive-quiz-sub { font: 11px/1.35 var(--sans); color: #94a3b8; margin: 0; }
.drive-quiz-answers { display: grid; gap: 6px; margin-bottom: 10px; }
.drive-quiz-answers button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(38, 47, 60, 0.82);
  color: #e2e8f0;
  cursor: pointer;
  font: 550 12.5px/1.35 var(--sans);
}
.drive-quiz-answers button span {
  display: inline-grid;
  flex: 0 0 24px;
  place-items: center;
  height: 24px;
  border-radius: 6px;
  background: rgba(59, 130, 246, .18);
  color: #93c5fd;
  font: 700 11px var(--sans);
}
.drive-quiz-answers button em { font-style: normal; flex: 1; }
.drive-quiz-answers button:hover { border-color: rgba(147, 197, 253, .55); background: rgba(50, 62, 79, .92); }
.dq-actions { display: flex; align-items: center; gap: 8px; }
.dq-actions .drive-quiz-confirm { flex: 1; margin: 0; }
.drive-quiz-skip {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(33, 41, 52, 0.78);
  color: #9fb0c4;
  font: 600 12px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.drive-quiz-skip:hover { border-color: rgba(255, 255, 255, 0.35); color: #f1f5f9; }
.dq-sources {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.drive-quiz-result > span {
  display: inline-block;
  background: rgba(34, 197, 94, .2);
  color: #86efac;
  padding: 5px 9px;
  border-radius: 6px;
  font: 700 11px var(--sans);
}
.drive-quiz-result.bad > span { background: rgba(245, 158, 11, .2); color: #fcd34d; }
.drive-quiz-result h2 { font-size: 18px; margin: 8px 0 6px; color: #f8fafc; }
.drive-quiz-result p { line-height: 1.45; color: #cbd5e1; font-size: 13px; margin: 5px 0; }
.drive-quiz-result button {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(147, 197, 253, .45);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-radius: 8px;
  padding: 11px 15px;
  cursor: pointer;
  font: 700 13px var(--sans);
}

/* Career / Service / Fallback School Dialog (.career-dialog) */
.career-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  background: rgba(22, 29, 39, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #f1f5f9;
  padding: 18px 20px;
  box-shadow: 0 26px 80px rgba(4, 8, 15, .72);
}
.career-dialog::backdrop { background: rgba(7, 11, 17, 0.72); backdrop-filter: blur(5px); }
.career-dialog h2 { margin: 0 0 6px; font-size: 20px; color: #f8fafc; }
.career-dialog p { color: #cbd5e1; font-size: 13px; line-height: 1.45; }
.career-dialog p a { color: #93c5fd; text-decoration: underline; }
.career-dialog button {
  padding: 9px 13px;
  margin: 4px 4px 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(40, 50, 64, 0.9);
  color: #f1f5f9;
  font: 600 12.5px var(--sans);
  cursor: pointer;
}
.career-dialog button:hover:not(:disabled) { border-color: rgba(147, 197, 253, .55); background: rgba(54, 67, 85, .95); }
.career-dialog button:disabled { opacity: .42; cursor: not-allowed; }
.career-dialog .school-quiz-visual {
  margin: 8px 0 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: #0f151d;
  padding: 8px;
  text-align: center;
}
.career-dialog .school-quiz-visual img { display: block; margin: 0 auto; max-width: 240px; height: 110px; object-fit: contain; }
.career-dialog .school-quiz-visual small { display: block; color: #7f90a4; font-size: 10px; margin-top: 4px; }
.school-quiz-question > span { font: 700 10px var(--sans); letter-spacing: .06em; color: #93c5fd; text-transform: uppercase; }
.school-quiz-question h3 { font: 700 15.5px/1.32 var(--sans); margin: 8px 0 10px; color: #f8fafc; }
.career-dialog .school-quiz-answer {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 5px 0;
  text-align: left;
  line-height: 1.35;
  background: rgba(38, 47, 60, .82);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .14);
}
.career-dialog .school-quiz-answer b { background: rgba(59, 130, 246, .18); color: #93c5fd; padding: 3px 7px; border-radius: 5px; }

/* Fuel rescue & Pause/Training HUD */
.fuel-rescue {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 13px 20px;
  border: 1px solid rgba(251, 191, 36, .6);
  border-radius: 10px;
  background: rgba(36, 28, 16, .92);
  color: #fde68a;
  font: 700 14px var(--sans);
  cursor: pointer;
}
.fuel-rescue[hidden] { display: none; }
.cockpit[hidden] { display: none !important; }
.cockpit { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.cockpit-dashboard { display: none; }
.training-instruction {
  pointer-events: auto;
  position: absolute;
  top: 14px;
  left: 24%;
  right: 24%;
  background: rgba(22, 29, 39, .92);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f1f5f9;
  font-size: 12px;
}
.training-instruction strong { font-size: 15px; }
.training-instruction span { color: #93c5fd; }

/* Violation Replay Modal (#driving-replay) — Compact near-black translucent frosted design matching quiz v84 */
.driving-replay {
  box-sizing: border-box;
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  color: #f4f6f8;
  padding: 0;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .75);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.driving-replay::backdrop { background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(3px); }
.dr-replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
}
.dr-replay-eyebrow { color: #a5c8ff; font: 700 10px/1.2 system-ui, -apple-system, sans-serif; letter-spacing: .08em; }
.dr-replay-head h2 { font: 750 clamp(15px, 1.8vw, 18.5px)/1.22 system-ui, -apple-system, sans-serif; margin: 3px 0 0; color: #ffffff; }
.dr-alert { flex: 0 0 auto; background: rgba(185, 28, 28, .85); border: 1px solid rgba(248, 113, 113, .4); color: #fee2e2; padding: 5px 9px; border-radius: 6px; font: 800 9.5px system-ui, sans-serif; letter-spacing: .05em; }
.dr-replay-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(230px, 0.92fr); gap: 13px; padding: 13px 16px 15px; align-items: start; }
.dr-media { min-width: 0; }
.dr-video-label { font: 700 10px system-ui, sans-serif; letter-spacing: .04em; color: #a5c8ff; margin-bottom: 6px; }
#dr-canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; background: #080b10; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; }
.dr-media-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dr-media-controls button { padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; background: rgba(255, 255, 255, .06); color: #f1f5f9; font: 650 11.5px system-ui, sans-serif; cursor: pointer; }
.dr-media-controls button:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .28); }
#dr-progress { font: 600 10.5px system-ui, sans-serif; color: #9cc2ff; margin-left: auto; }
.dr-media-caption { font: 11px/1.38 system-ui, sans-serif; color: #94a3b8; margin: 5px 0 0; }
.dr-speed-summary { display: block; background: rgba(255, 255, 255, .045); border-left: 3px solid #60a5fa; color: #f1f5f9; border-radius: 6px; padding: 7px 10px; margin-top: 7px; font: 700 11.5px system-ui, sans-serif; }
.dr-speed-summary.overspeed { background: rgba(127, 29, 29, .42); border-color: #f87171; }
.dr-explainer { background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; padding: 13px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dr-explainer p { margin: 0; line-height: 1.42; font-size: 12.5px; color: #e2e8f0; }
.dr-explainer .dr-wrong { font: 800 10px system-ui, sans-serif; color: #fca5a5; letter-spacing: .05em; }
.dr-explainer .dr-correct { font: 800 10px system-ui, sans-serif; color: #86efac; letter-spacing: .05em; margin-top: 5px; }
#dr-law { font: 600 11.5px system-ui, sans-serif; color: #9cc2ff; text-decoration: underline; margin: 2px 0 0; }
.dr-reminder { display: grid; gap: 3px; background: rgba(59, 130, 246, .11); border-left: 3px solid #60a5fa; padding: 8px 10px; margin-top: 3px; font-size: 11.5px; line-height: 1.38; border-radius: 5px; color: #dbeafe; }
.dr-reminder strong { font: 800 10px system-ui, sans-serif; color: #93c5fd; }
#dr-retry { width: 100%; border: 1px solid rgba(147, 197, 253, .45); border-radius: 8px; padding: 10px 12px; margin-top: 6px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font: 750 12.5px system-ui, sans-serif; cursor: pointer; min-height: 40px; }
#dr-retry:hover { background: linear-gradient(135deg, #3b82f6, #2563eb); }

/* Fail & Lesson Modals */
.fail-overlay[hidden], .lesson-modal[hidden] { display: none !important; }
.fail-overlay { position: absolute; inset: 0; z-index: 35; background: rgba(9, 13, 20, .82); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
.fail-overlay > div { background: rgba(24, 31, 41, .96); padding: 24px; max-width: 400px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; text-align: center; color: #f1f5f9; }
.fail-overlay h2 { font: 800 28px var(--sans); margin: 6px 0; color: #f8fafc; }
.fail-overlay p { font-size: 13px; line-height: 1.5; color: #cbd5e1; }
.fail-overlay .button.primary { display: inline-flex; align-items: center; justify-content: center; margin-top: 10px; padding: 11px 18px; border-radius: 8px; border: 1px solid rgba(147, 197, 253, .5); background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font: 700 13px var(--sans); cursor: pointer; }

.lesson-modal { position: fixed; inset: 0; z-index: 40; background: rgba(7, 11, 17, .76); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; }
.lesson-card { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; width: min(680px, 100%); max-height: calc(100dvh - 36px); overflow: auto; padding: 24px; background: rgba(22, 29, 39, .97); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; color: #f1f5f9; box-shadow: 0 24px 80px rgba(4, 8, 15, .75); }
.lesson-close { position: absolute; right: 12px; top: 8px; border: 0; background: transparent; color: #94a3b8; font-size: 28px; line-height: 1; cursor: pointer; }
.lesson-art { width: 170px; height: 170px; display: grid; place-items: center; background: #0f151d; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; }
.lesson-art svg { width: 140px; height: 140px; }
.lesson-kicker { font: 700 10px var(--sans); letter-spacing: .08em; color: #93c5fd; }
.lesson-copy h2 { margin: 6px 0 8px; font-size: 22px; line-height: 1.2; color: #f8fafc; }
.lesson-copy p { font-size: 14px; line-height: 1.5; margin: 6px 0; color: #cbd5e1; }
.lesson-example { padding: 9px 11px; background: rgba(59, 130, 246, .12); border-left: 3px solid #60a5fa; border-radius: 4px; }
.lesson-copy > a { display: inline-block; margin-top: 4px; color: #93c5fd; font-size: 12px; text-decoration: underline; }
.lesson-done { display: inline-block; margin-top: 14px; padding: 10px 16px; border: 1px solid rgba(147, 197, 253, .45); border-radius: 8px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font: 700 13px var(--sans); cursor: pointer; }

/* Below-canvas Mission / Rule / Footer in matching dark obsidian slate */
.mission-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1120px;
  margin: 14px auto 0;
  padding: 12px 16px;
  background: #161e28;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #f1f5f9;
}
.mission-tag { flex: none; background: rgba(59, 130, 246, .2); border: 1px solid rgba(96, 165, 250, .4); color: #93c5fd; padding: 5px 8px; border-radius: 6px; font: 700 10px var(--sans); letter-spacing: .05em; }
.mission-strip > div { flex: 1; }
.mission-strip strong { font-size: 14px; color: #f8fafc; }
.mission-strip p { margin: 2px 0 0; color: #9aa7b8; font-size: 13px; line-height: 1.4; }
.mission-strip > b { font: 700 11px var(--sans); color: #93c5fd; white-space: nowrap; }

.live-rule {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 1120px;
  margin: 10px auto 0;
  padding: 14px 18px;
  background: #161e28;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
}
.rule-symbol {
  flex: 0 0 54px;
  min-height: 54px;
  background: #212c3b;
  color: #f8fafc;
  display: grid;
  place-items: center;
  font: 800 19px var(--sans);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
}
.rule-symbol[data-kind="red"], .rule-symbol[data-kind="stop"] { background: #991b1b; border-color: #f87171; }
.rule-symbol[data-kind="yellow"] { background: #92400e; border-color: #fbbf24; }
.rule-symbol[data-kind="green"] { background: #166534; border-color: #4ade80; }
.rule-content { flex: 1; }
.rule-meta { display: flex; justify-content: space-between; gap: 8px; font: 700 10px var(--sans); letter-spacing: .04em; color: #93c5fd; }
.rule-content h1 { font-size: 18px; line-height: 1.25; margin: 5px 0; color: #f8fafc; }
.rule-content p { font-size: 13px; line-height: 1.5; margin: 0 0 5px; color: #cbd5e1; }
.rule-content > a { font: 600 11px var(--sans); color: #93c5fd; text-decoration: underline; }

.drive-foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1120px;
  margin: 10px auto 24px;
  padding: 10px 4px;
  font: 11px var(--sans);
  color: #8494a8;
}
.drive-foot details { max-width: 560px; line-height: 1.6; }
.drive-foot summary { cursor: pointer; }
.drive-foot p { font: 12px/1.5 var(--sans); }

/* Mobile directional controls */
.mobile-driving { display: none; padding: 8px; background: #11161d; }
.mobile-driving > div { display: flex; gap: 6px; }
.mobile-driving button { touch-action: none; user-select: none; background: rgba(39, 48, 60, .92); border: 1px solid rgba(255, 255, 255, .18); color: #f1f5f9; border-radius: 8px; min-width: 44px; height: 44px; font: 700 15px var(--sans); }
.mobile-driving [data-key="w"] { background: rgba(37, 99, 235, .85); border-color: rgba(147, 197, 253, .5); }

#indicator-pad { display: none; position: fixed; left: 10px; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); z-index: 25; gap: 7px; align-items: center; }
#indicator-pad button { min-width: 72px; padding: 8px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 8px; background: rgba(24, 31, 41, .9); color: #f1f5f9; font: 700 12px var(--sans); cursor: pointer; }
#indicator-pad button span { font-size: 9px; }
#indicator-pad button.active { background: #b45309; border-color: #fbbf24; color: #fef3c7; }
@media (hover: none), (pointer: coarse) {
  #indicator-pad { display: flex; }
  .mobile-driving [data-indicator] { display: none !important; }
}

@media (max-width: 899px) {
  .keyboard-guide { display: none; }
  .drive-toolbar { justify-content: center; padding: 6px 8px; min-height: 0; }
  .mobile-driving { display: flex; justify-content: space-between; gap: 8px; }
}

@media (max-width: 700px) {
  .scene-wrap { height: 64vh; min-height: 390px; }
  .scene-hud { inset: 6px 6px auto; flex-direction: column; align-items: flex-end; gap: 4px; }
  .hud-left { order: 2; margin-top: 0; padding: 4px 8px; border-radius: 8px; gap: 5px; }
  .hud-right.speed-gauge { order: 1; margin-top: 0; width: 76px; height: 76px; }
  .sg-center b { font-size: 19px; }
  .sg-center small { font-size: 7.5px; }
  .sg-limit { right: -2px; bottom: -2px; }
  .hud-shield { width: 13px; height: 13px; flex-basis: 13px; }
  .hud-left b { font-size: 11px; }
  .hud-left span { font-size: 8.5px; }
  .limit-sign { width: 20px; height: 20px; font-size: 9px; border-width: 2px; }
  .career-hud { top: 68px; padding: 5px 10px 4px; min-width: 0; max-width: calc(100% - 16px); }
  .ch-main { font-size: 10px; gap: 5px; }
  .drive-quiz-timer { top: 82px; left: 10px; padding: 4px 8px; gap: 5px; font-size: 10px; }
  .drive-quiz-timer strong { font-size: 12px; }
  #cockpit-startup-hud { top: 132px; max-width: calc(100% - 16px); white-space: normal; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 5px 9px; font-size: 10px; }
  #cockpit-startup-hud small { font-size: 9px; }
  .drive-toast { left: 8px; bottom: 8px; max-width: calc(100% - 170px); padding: 7px 9px 7px 29px; font-size: 10.5px; }
  .drive-toast::before { left: 8px; width: 15px; height: 15px; font-size: 9px; line-height: 13px; }
  .scene-wrap canvas[aria-label^="Hartă"] { width: 150px !important; height: 150px !important; }
  .nav-toggle { bottom: 174px; right: 18px; width: 150px; min-height: 32px; font-size: 11px; }
  .nav-panel { bottom: 212px; right: 18px; width: 220px; max-height: calc(100% - 220px); }
  .nav-instruction { bottom: 210px; right: 18px; left: auto; top: auto; transform: none; width: 150px; font-size: 10px; padding: 5px 8px; }
  .drive-actions { flex-wrap: wrap; justify-content: center; gap: 4px; }
  .drive-actions button { padding: 6px 8px; font-size: 10px; }
  .drive-actions .camera-pills button { padding: 5px 7px; font-size: 10px; }
  .dq-body { grid-template-columns: 1fr; gap: 8px; }
  .quiz-visual img { height: 74px; }
  .dr-replay-layout { grid-template-columns: 1fr; padding: 12px; }
  .lesson-card { grid-template-columns: 1fr; padding: 18px; text-align: center; }
  .lesson-art { margin: 0 auto; width: 120px; height: 120px; }
}

/* Minimap + navigator can be closed (× or M) and reopened (Hartă). */
.map-close, .map-open {
  position: absolute; z-index: 16; cursor: pointer; font-weight: 700; color: #e2e8f0;
  background: rgba(20, 26, 35, .9); border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px;
}
.map-close { right: 24px; bottom: 210px; width: 24px; height: 24px; padding: 0; font-size: 16px; line-height: 20px; }
.map-close:hover, .map-open:hover { background: rgba(56, 72, 94, .95); }
.map-open { display: none; right: 18px; bottom: 18px; padding: 7px 12px; font-size: 12px; }
body[data-map="off"] :is(.scene-wrap canvas[aria-label^="Hartă"], .nav-toggle, .nav-panel, .map-close) { display: none !important; }
body[data-map="off"] .map-open { display: block; }
body[data-hud="off"] :is(.map-close, .map-open), body[data-hud="essential"] :is(.map-close, .map-open) { display: none !important; }
@media (max-width: 700px) {
  .map-close { bottom: 140px; right: 22px; width: 22px; height: 22px; font-size: 14px; line-height: 18px; }
  .map-open { padding: 6px 10px; font-size: 11px; }
}

/* v84 · Quiz window: near-black, slightly transparent, high-contrast readable type. */
.drive-quiz-dialog {
  background: rgba(6, 8, 12, .84) !important;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, .10) !important;
  color: #f4f6f8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.drive-quiz-dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); }
.drive-quiz-eyebrow { font: 700 11px/1.2 system-ui, -apple-system, sans-serif !important; letter-spacing: .08em; color: #a5c8ff !important; }
.drive-quiz-top { border-bottom-color: rgba(255, 255, 255, .08) !important; }
.dq-prompt h2 { font: 650 19px/1.4 system-ui, -apple-system, sans-serif !important; color: #ffffff !important; letter-spacing: -.005em; }
.drive-quiz-sub { font: 13px/1.45 system-ui, -apple-system, sans-serif !important; color: #b8c2cf !important; }
.drive-quiz-answers button {
  background: rgba(255, 255, 255, .045) !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  color: #f1f4f7 !important;
  font: 550 15px/1.45 system-ui, -apple-system, sans-serif !important;
}
.drive-quiz-answers button:hover { background: rgba(255, 255, 255, .085) !important; }
.drive-quiz-answers button[aria-pressed="true"], .drive-quiz-answers button.is-selected { border-color: #8ab8ff !important; background: rgba(110, 160, 255, .14) !important; }
.quiz-visual { background: rgba(255, 255, 255, .04) !important; border-color: rgba(255, 255, 255, .10) !important; }
.quiz-visual figcaption { color: #aab4c0 !important; font-size: 11.5px !important; }
.drive-quiz-confirm, .drive-quiz-skip { font: 650 15px/1.2 system-ui, -apple-system, sans-serif !important; }
.drive-quiz-skip { background: rgba(255, 255, 255, .06) !important; color: #e6eaef !important; border-color: rgba(255, 255, 255, .12) !important; }
.dq-sources a, .drive-quiz-source { color: #9cc2ff !important; font-size: 12.5px !important; }

/* v84 · Mod realist: toolbar toggle, status strip, gear picker. */
#realistic-toggle { font-weight: 700; }
#realistic-toggle.is-active { background: #b45309 !important; border-color: #f59e0b !important; color: #fff !important; }
.realistic-strip {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 14;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 520px);
  padding: 6px 8px; border-radius: 12px; background: rgba(6, 8, 12, .78); border: 1px solid rgba(255, 255, 255, .10);
  font: 600 11.5px/1.2 system-ui, -apple-system, sans-serif; color: #cbd5e1; pointer-events: none;
}
.realistic-strip[hidden] { display: none; }
.rs-gear { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #f8fafc; color: #0b0f14; font: 800 17px/1 system-ui, sans-serif; }
.rs-pill { padding: 5px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.rs-pill.is-on { background: rgba(34, 197, 94, .18); border-color: rgba(74, 222, 128, .5); color: #dcfce7; }
.rs-pill.is-need { background: rgba(239, 68, 68, .2); border-color: rgba(248, 113, 113, .7); color: #fee2e2; animation: rs-blink 1s steps(2) infinite; }
.rs-weather { padding: 5px 8px; color: #93c5fd; }
@keyframes rs-blink { 50% { border-color: rgba(248, 113, 113, .2); } }
.gear-picker {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 20;
  padding: 10px 12px 12px; border-radius: 14px; background: rgba(6, 8, 12, .86); border: 1px solid rgba(255, 255, 255, .12);
  font: 600 12px system-ui, sans-serif; color: #e2e8f0;
}
.gear-picker[hidden] { display: none; }
.gp-title { text-align: center; margin-bottom: 8px; letter-spacing: .04em; text-transform: uppercase; color: #a5c8ff; }
.gp-grid { display: grid; grid-template-columns: repeat(3, 46px); gap: 6px; }
.gp-grid button { height: 42px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font: 800 18px system-ui, sans-serif; cursor: pointer; }
.gp-grid button:hover { background: rgba(255, 255, 255, .14); }
.gp-grid button.is-on { background: #f8fafc; color: #0b0f14; }
@media (max-width: 700px) {
  .realistic-strip { max-width: calc(100% - 16px); bottom: 118px; font-size: 10px; gap: 4px; }
  .rs-pill { padding: 4px 6px; }
}

/* v85 · Cockpit Cabin Navigation (Left/Center/Right mirror look), Hazard Lights & Romanian FM Radio bar. */
.cockpit-cabin-bar {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100% - 480px);
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(10, 14, 21, .82);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(4, 8, 15, .52);
  font: 600 11.5px/1 var(--sans, system-ui, sans-serif);
  color: #e2e8f0;
}
.cockpit-cabin-bar[hidden],
body[data-hud="off"] .cockpit-cabin-bar,
body[data-hud="essential"] .cockpit-cabin-bar {
  display: none !important;
}
.ccb-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cockpit-cabin-bar button {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font: 650 11px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}
.cockpit-cabin-bar button:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}
.cockpit-cabin-bar button.is-active {
  background: rgba(56, 189, 248, .22);
  border-color: rgba(125, 211, 252, .55);
  color: #f0f9ff;
}
.ccb-hazard {
  background: rgba(185, 28, 28, .24) !important;
  border: 1px solid rgba(248, 113, 113, .42) !important;
  color: #fecaca !important;
  font-weight: 700 !important;
}
.ccb-hazard.is-hazard-on {
  background: #dc2626 !important;
  border-color: #fca5a5 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, .75);
  animation: ccb-hazard-pulse .66s steps(2) infinite;
}
@keyframes ccb-hazard-pulse {
  50% { background: #7f1d1d !important; box-shadow: none; }
}
.ccb-radio button.is-radio-on {
  background: rgba(14, 165, 233, .28);
  border-color: rgba(56, 189, 248, .65);
  color: #e0f2fe;
}
.ccb-station {
  padding: 0 6px;
  color: #7dd3fc;
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .cockpit-cabin-bar {
    max-width: calc(100% - 16px);
    bottom: 54px;
    padding: 4px 6px;
    gap: 4px;
  }
  .cockpit-cabin-bar button { padding: 4px 6px; font-size: 10px; }
  .ccb-station { max-width: 110px; font-size: 10px; }
}

#cockpit-zoom-bar,
.cockpit-zoom-bar {
  position: absolute;
  left: 14px;
  top: 46%;
  transform: translateY(-50%);
  z-index: 16;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 13px;
  background: linear-gradient(155deg, rgba(30, 38, 48, .76), rgba(16, 22, 30, .72));
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(4, 8, 15, .44);
}
#cockpit-zoom-bar[hidden],
.cockpit-zoom-bar[hidden],
body[data-hud="off"] #cockpit-zoom-bar,
body[data-hud="off"] .cockpit-zoom-bar {
  display: none !important;
}
#cockpit-zoom-bar button,
.cockpit-zoom-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #e2e8f0;
  font: 650 11.5px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .14s ease, color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
#cockpit-zoom-bar button:hover,
.cockpit-zoom-bar button:hover {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}
#cockpit-zoom-bar button.is-active,
.cockpit-zoom-bar button.is-active {
  background: rgba(56, 189, 248, .24);
  border-color: rgba(125, 211, 252, .65);
  color: #f0f9ff;
  box-shadow: 0 0 12px rgba(56, 189, 248, .35);
}
.czb-mirrors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.czb-mirrors button {
  justify-content: center !important;
  padding: 5px 6px !important;
  font-size: 11px !important;
}
.czb-adjust {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(125, 211, 252, .24);
}
.czb-adjust[hidden] {
  display: none !important;
}
.czb-slider {
  display: grid;
  grid-template-columns: 36px 72px 30px;
  align-items: center;
  gap: 5px;
  font: 600 10px/1 var(--sans, system-ui, sans-serif);
  color: #cbd5e1;
}
.czb-slider input[type="range"] {
  width: 72px;
  height: 4px;
  margin: 0;
  accent-color: #38bdf8;
  cursor: pointer;
}
.czb-slider b {
  text-align: right;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #7dd3fc;
}
@media (max-width: 700px) {
  #cockpit-zoom-bar,
  .cockpit-zoom-bar {
    left: 8px;
    top: 138px;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: calc(100% - 110px);
    padding: 4px;
    gap: 4px;
  }
  #cockpit-zoom-bar button,
  .cockpit-zoom-bar button {
    padding: 5px 7px;
    font-size: 10.5px;
  }
  .czb-adjust {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }
  .czb-slider {
    grid-template-columns: 32px 54px 26px;
    gap: 3px;
  }
  .czb-slider input[type="range"] { width: 54px; }
}

/* ==========================================================================
   Compliance, Compact © Circle Attribution & Legal Dialog
   ========================================================================== */
.bd-map-attribution {
  position: absolute;
  right: 24px;
  bottom: 24px; /* Anchored cleanly at bottom-right corner of minimap regardless of resize */
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  user-select: none;
  transition: bottom 0.2s ease, right 0.2s ease, opacity 0.2s ease;
}
.bd-attr-circle {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(226, 232, 240, 0.82);
  font: 700 13px/1 system-ui, -apple-system, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  opacity: 0.72;
  transition: opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}
.bd-attr-circle:hover,
.bd-attr-circle[aria-expanded="true"] {
  opacity: 1;
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(147, 197, 253, 0.6);
  color: #ffffff;
  transform: scale(1.06);
}
.bd-attr-popover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  font: 500 11px system-ui, -apple-system, sans-serif;
  color: #cbd5e1;
  white-space: nowrap;
}
.bd-attr-popover[hidden] {
  display: none !important;
}
.bd-map-attribution a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}
.bd-map-attribution a:hover {
  text-decoration: underline;
  color: #bfdbfe;
}
.bd-attr-sep {
  color: rgba(255, 255, 255, 0.28);
}
.bd-attr-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bd-attr-btn:hover {
  color: #38bdf8;
}
body[data-map="off"] .bd-map-attribution {
  right: 112px;
  bottom: 20px;
}
@media (max-width: 899px) {
  .bd-map-attribution {
    right: 22px;
    bottom: 22px;
  }
  .bd-attr-popover {
    font-size: 10px;
    padding: 3px 8px;
  }
}
body[data-hud="off"] .bd-map-attribution {
  right: 10px !important;
  bottom: 10px !important;
  opacity: 0.45;
}
body[data-hud="off"] .bd-map-attribution:hover {
  opacity: 1;
}

/* Footer Legal Bar */
.foot-legal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  padding: 0 8px;
  color: #94a3b8;
  font-size: 11px;
}
.foot-legal-bar a {
  color: #93c5fd;
  text-decoration: underline;
}
.foot-legal-bar .legal-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 3px 8px;
  color: #f1f5f9;
  font: 600 11px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.foot-legal-bar .legal-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(147, 197, 253, 0.5);
  color: #38bdf8;
}

/* Comprehensive Legal & Compliance Modal */
.bd-legal-dialog:not([open]) {
  display: none !important;
}
.bd-legal-dialog {
  max-width: 780px;
  width: 92vw;
  max-height: 85vh;
  margin: auto;
  padding: 0;
  background: linear-gradient(155deg, rgba(20, 27, 38, 0.97), rgba(11, 16, 23, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  color: #f1f5f9;
  font-family: var(--sans);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bd-legal-dialog::backdrop {
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(6px);
}
.bd-legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.bd-legal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
}
.bd-legal-head small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 2px;
}
.bd-legal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bd-legal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}
.bd-legal-tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bd-legal-tab {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  color: #94a3b8;
  font: 600 12px var(--sans);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bd-legal-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}
.bd-legal-tab.active {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.bd-legal-body {
  padding: 18px 22px;
  overflow-y: auto;
  max-height: calc(85vh - 140px);
  line-height: 1.6;
  font-size: 13px;
  color: #cbd5e1;
}
.bd-legal-panel {
  display: none;
}
.bd-legal-panel.active {
  display: block;
}
.bd-legal-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bd-legal-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
}
.bd-legal-card p {
  margin: 6px 0;
}
.bd-legal-card ul {
  margin: 6px 0 6px 20px;
  padding: 0;
}
.bd-legal-card li {
  margin: 4px 0;
}
.bd-legal-card a {
  color: #93c5fd;
  text-decoration: underline;
}
.bd-legal-card strong {
  color: #e2e8f0;
}
.bd-legal-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.bd-legal-toggle-row label {
  cursor: pointer;
  font-weight: 600;
  color: #f1f5f9;
}
.bd-legal-toggle-row p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}
.bd-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}
.bd-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.bd-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.bd-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .bd-slider {
  background-color: #2563eb;
  border-color: #60a5fa;
}
input:checked + .bd-slider:before {
  transform: translateX(22px);
}

/* ==========================================================================
   Ultra-Minimalist Mobile Hamburger HUD, Mutually-Exclusive Dropdowns & Pedals
   ========================================================================== */
body.bd-custom-touch .mobile-driving {
  display: none !important;
}
@media (max-width: 960px), (pointer: coarse) and (max-width: 1080px) {
  html,
  body.game-page {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.game-page .scene-wrap {
    height: 100dvh !important;
    min-height: 100dvh !important;
  }
  /* Eliminate mobile CSS backdrop-filter compositor overhead without reducing 3D quality */
  .scene-hud > div,
  .hud-pill-top,
  .hud-pill-stats,
  .drive-toast,
  .bd-info-popover,
  .bd-srv-popover,
  .bd-adm-popover,
  .bd-details-dock,
  .nav-panel,
  .nav-toggle,
  .nav-instruction,
  .bd-attr-circle,
  .bd-attr-popover {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.game-page .scene-hud {
    inset: 8px 8px auto !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
  body.game-page .hud-left {
    order: 1 !important;
    max-width: calc(100vw - 82px) !important;
    gap: 0 !important;
  }
  body.game-page .hud-pill-top {
    padding: 3px 5px !important;
    gap: 4px !important;
    background: rgba(15, 23, 42, 0.92) !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
  }
  body.game-page .hud-pill-top .bd-menu-link {
    padding: 4px 6px !important;
    border-right: 1px solid rgba(255, 255, 255, .14) !important;
  }
  .hud-pill-top .bd-menu-link span,
  .bd-srv-word,
  .bd-adm-lbl,
  .bd-key-grid {
    display: none !important;
  }
  .bd-info-trigger,
  .bd-srv-trigger,
  .bd-adm-trigger,
  .bd-mob-cam-btn {
    height: 26px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
  }
  /* Minimalist screen: hide cluttered secondary desktop HUD on phone (accessible via Menu / Server) */
  #hud-card-foot,
  .career-hud,
  .bd-details-dock,
  #cockpit-zoom-bar,
  .cockpit-zoom-bar,
  #hud-toggle,
  .cockpit-cabin-bar,
  .city-switch,
  #bd-servers-bar,
  #bd-free-100-bar,
  .drive-toolbar,
  #indicator-pad,
  body.game-page .mobile-driving > div:nth-child(2),
  body.game-page .mobile-driving [data-indicator],
  body.game-page .bd-map-controls,
  body.game-page .bd-map-resize,
  body.game-page .nav-toggle,
  body.game-page .map-close {
    display: none !important;
  }
  #bd-mob-cam-top,
  .bd-mob-cam-btn {
    display: inline-flex !important;
  }
  body.game-page .bd-info-popover,
  body.game-page .bd-srv-popover,
  body.game-page .bd-adm-popover {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: 48px !important;
    width: auto !important;
    max-width: 420px !important;
    max-height: calc(100dvh - 122px) !important;
    overflow-y: auto !important;
    background: rgba(13, 19, 28, 0.98) !important;
    z-index: 130 !important;
  }
  /* Compact Top-Right Speedometer + Mini Radar Map */
  body.game-page .hud-right.speed-gauge {
    order: 2 !important;
    width: 64px !important;
    height: 64px !important;
    margin-left: auto !important;
    background: rgba(15, 23, 42, 0.88) !important;
  }
  body.game-page .sg-center b { font-size: 18px !important; }
  body.game-page .sg-center small { font-size: 7px !important; }
  body.game-page .limit-sign { width: 20px !important; height: 20px !important; font-size: 9px !important; border-width: 2px !important; }
  body.game-page .scene-wrap canvas[aria-label^="Hartă"] {
    top: 78px !important;
    right: 8px !important;
    bottom: auto !important;
    width: 100px !important;
    height: 100px !important;
    border-radius: 10px !important;
  }
  body.game-page .nav-instruction {
    top: 182px !important;
    right: 8px !important;
    bottom: auto !important;
    width: 100px !important;
  }
  body.game-page .bd-map-attribution {
    top: 152px !important;
    right: 12px !important;
    bottom: auto !important;
  }
  body.game-page .drive-toast {
    left: 8px !important;
    right: auto !important;
    top: 48px !important;
    bottom: auto !important;
    max-width: calc(100vw - 122px) !important;
    font-size: 11px !important;
    padding: 5px 9px 5px 25px !important;
    z-index: 40 !important;
  }
  /* Floating Ergonomic Bottom Touch Pedals */
  body.game-page .mobile-driving {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
    z-index: 42 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    background: transparent !important;
    padding: 0 !important;
    pointer-events: none !important;
  }
  body.game-page .mobile-driving > div {
    pointer-events: auto !important;
    display: flex !important;
    gap: 8px !important;
  }
  body.game-page .mobile-driving button {
    min-width: 58px !important;
    height: 56px !important;
    border-radius: 14px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.45) !important;
    color: #f8fafc !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48) !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  body.game-page .mobile-driving [data-key="space"] {
    background: rgba(234, 88, 12, 0.90) !important;
    border-color: rgba(253, 186, 116, 0.72) !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    padding: 0 10px !important;
  }
  body.game-page .mobile-driving [data-key="s"] {
    background: rgba(185, 28, 28, 0.88) !important;
    border-color: rgba(252, 165, 165, 0.65) !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    padding: 0 10px !important;
  }
  body.game-page .mobile-driving [data-key="w"] {
    background: rgba(22, 163, 74, 0.90) !important;
    border-color: rgba(134, 239, 172, 0.72) !important;
    color: #ffffff !important;
    font-size: 20px !important;
  }
}
@media (max-width: 440px) {
  body.game-page .mobile-driving {
    left: 8px !important;
    right: 8px !important;
  }
  body.game-page .mobile-driving > div {
    gap: 6px !important;
  }
  body.game-page .mobile-driving button {
    min-width: 48px !important;
    height: 52px !important;
    font-size: 15px !important;
  }
  body.game-page .mobile-driving [data-key="space"],
  body.game-page .mobile-driving [data-key="s"] {
    font-size: 11.5px !important;
    padding: 0 8px !important;
  }
}

