/* The session uses the available screen, including when a mobile browser has
   no native fullscreen API. The learning menu stays reachable in landscape. */
body.drive-studio {
  --cab: #121c1e;
  --metal: #b5c8c7;
  --mint: #72e2bc;
  --panel: #1c2729;
  background: var(--cab);
  color: #eaf3ee;
  overflow: hidden;
  margin: 0;
}
.drive-studio > .top,
.drive-studio .intro,
.drive-studio main > footer,
.drive-studio .layout > aside {
  display: none;
}
.drive-studio main,
.drive-studio .layout {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}
.drive-studio .simulator,
.drive-studio .simulator:fullscreen,
.drive-studio .simulator.expanded {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-flow: column nowrap;
  border: 0;
  border-radius: 0;
  background: var(--cab);
  overflow: hidden;
  color: #eff6f3;
}
.drive-studio .sim-head,
.drive-studio .simulator:fullscreen .sim-head,
.drive-studio .simulator.expanded .sim-head {
  display: flex;
  flex: 0 0 auto;
  padding: 9px max(18px, env(safe-area-inset-right)) 9px
    max(18px, env(safe-area-inset-left));
  min-height: 52px;
  background: linear-gradient(120deg, #202c2d, #152023 72%);
  border-bottom: 1px solid #4b5d5d;
  z-index: 5;
}
.drive-studio .studio-mark {
  width: 34px;
  height: 34px;
  border: 1px solid #5e8273;
  border-radius: 9px;
}
.drive-studio .head-left {
  gap: 10px;
}
.drive-studio .head-left h2 {
  font:
    700 19px/1.3 system-ui,
    sans-serif;
  letter-spacing: 0.01em;
}
.drive-studio .kicker {
  font:
    600 9px/1.3 system-ui,
    sans-serif;
  color: #9bb4a9;
}
.drive-studio .sim-actions {
  gap: 8px;
}
.drive-studio .sim-actions select,
.drive-studio .sim-actions button {
  appearance: auto;
  min-height: 33px;
  padding: 5px 10px;
  color: #d7e6df;
  background: #263335;
  border: 1px solid #405153;
  border-radius: 6px;
  font:
    600 12px system-ui,
    sans-serif;
}
.drive-studio .sim-actions .session-menu {
  color: #082d27;
  background: #8cdec2;
  border-color: #91e7c9;
}
.session-menu span {
  padding-right: 4px;
}
.drive-studio #viewport,
.drive-studio #viewport.dual-view,
.drive-studio .simulator:fullscreen #viewport,
.drive-studio .simulator.expanded #viewport {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  max-height: none;
}
.drive-studio #viewport {
  background: #25383c;
}
.drive-studio .expand {
  top: 10px;
  right: max(12px, env(safe-area-inset-right));
  width: 36px;
  height: 32px;
  background: #122025bf;
}
.drive-studio .view-indicator {
  top: 10px;
  left: max(12px, env(safe-area-inset-left));
  background: #122025c9;
}
.drive-studio .viewbar,
.drive-studio .simulator:fullscreen .viewbar {
  background: #1a2628;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px max(18px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  border: 0;
  border-top: 1px solid #506263;
  gap: 12px;
  flex-wrap: nowrap;
}
.drive-studio .view-group,
.drive-studio .mode-group,
.drive-studio .gears {
  display: flex;
  gap: 2px;
  background: #101a1c;
  border: 1px solid #394a4c;
  border-radius: 7px;
  padding: 3px;
  flex: none;
}
.drive-studio .view-group button,
.drive-studio .mode-group button,
.drive-studio .gears button {
  background: transparent;
  color: #b7c8c4;
  font:
    550 12px/1.3 system-ui,
    sans-serif;
  padding: 6px 10px;
  border-radius: 4px;
  min-height: 29px;
  white-space: nowrap;
}
.drive-studio .view-group [aria-pressed="true"],
.drive-studio .mode-group [aria-pressed="true"],
.drive-studio .gears [aria-pressed="true"] {
  color: #b1ffdc;
  background: #2a4942;
  box-shadow: inset 0 0 0 1px #4d7263;
}
.drive-studio .mode-group {
  margin-left: auto;
}
.drive-studio .guide-toggle {
  color: #d3e0d8;
}
.drive-studio .gears[hidden] {
  display: none;
}
.drive-studio .driving,
.drive-studio .simulator:fullscreen .driving {
  display: block;
  flex: 0 0 auto;
  background: #1a2628;
  padding: 0 18px 6px;
  border: 0;
}
.drive-studio .driving:has(#demo-controls[hidden]) {
  display: none;
}
.drive-studio .play-controls,
.drive-studio #manual-controls {
  display: none;
}
.drive-studio .timeline {
  margin-top: 0;
}
.drive-studio .phase-caption {
  color: #cad8d1;
}
.drive-studio .rate {
  color: #dfebe6;
  border-color: #61786c;
}
.drive-studio .timeline .primary {
  background: #91dcbe;
  color: #0e3327;
}
.drive-studio .telemetry,
.drive-studio .simulator:fullscreen .telemetry {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: linear-gradient(125deg, #142227ed, #0d191adb);
  color: #fff;
  border: 1px solid #9eb2af66;
  border-top: 2px solid #8ee6be;
  border-radius: 9px;
  padding: 7px 14px;
  pointer-events: none;
  box-shadow: 0 2px 12px #08161444;
}
.drive-studio .telemetry > span {
  display: flex;
  align-items: center;
  flex-direction: column;
  line-height: 1.1;
  gap: 2px;
}
.drive-studio .telemetry b {
  color: #edf9f2;
  font:
    650 17px/1.05 ui-monospace,
    monospace;
  white-space: nowrap;
}
.drive-studio .telemetry .speed-reading b {
  font-size: 25px;
}
.drive-studio .telemetry .gear-reading b {
  color: #a3f2c9;
}
.drive-studio .telemetry small {
  font: 500 9px/1 system-ui;
  color: #b0c6bb;
}
.drive-studio #feedback,
.drive-studio .gaps,
.drive-studio .first-drive-tip {
  position: absolute;
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 60%;
  text-align: center;
  bottom: 72px;
  line-height: 1.4;
  padding: 4px 9px;
  background: #162220c9;
  color: white;
  border-radius: 5px;
  font-size: 11px;
  margin: 0;
}
.drive-studio #feedback:not(.warning) {
  display: none;
}
.drive-studio #feedback.warning {
  bottom: auto;
  top: 48px;
  color: #ffda97;
  background: #402d16e5;
}
.drive-studio .gaps {
  bottom: 76px;
  white-space: nowrap;
}
.drive-studio .first-drive-tip {
  background: #132325ce;
  color: #e3f2eb;
  letter-spacing: 0.02em;
  bottom: 75px;
  white-space: nowrap;
}
.drive-studio #viewport:has(.gaps:not([hidden])) .first-drive-tip,
.drive-studio #viewport:not(.manual-view) .first-drive-tip {
  display: none;
}
.drive-studio .screen-cue {
  top: 12px;
  bottom: auto;
  max-width: 55%;
  background: #1c2b28dd;
}
.drive-studio .follow-frame {
  border-color: #65847e;
}
.drive-studio .follow-frame span {
  font-size: 10px;
}
#training-drawer {
  width: min(780px, 93vw);
  max-width: 93vw;
  max-height: 88dvh;
  color: #203a2f;
  background: #f7f9f3;
  padding: 0;
  border: 1px solid #758d7d;
}
.drawer-head,
.drawer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 17px;
}
.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3e9;
}
.drawer-head h2 {
  font-size: 19px;
}
.drawer-close,
.drawer-help,
.drawer-links a {
  font: 600 12px system-ui;
  background: #e0e9de;
  padding: 7px 10px;
  border-radius: 6px;
  color: #234f3e;
}
.drawer-body {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(240px, 1.25fr);
  gap: 12px;
  padding: 12px;
}
.drawer-body .catalogue,
.drawer-body .coach,
.drawer-body .compare {
  grid-column: auto;
  grid-row: auto;
}
.drawer-body .compare {
  grid-column: 1/-1;
}
.drawer-body #courses {
  display: grid;
  gap: 2px;
  padding: 4px;
}
.drawer-body .course {
  width: 100%;
}
.drawer-body .mini-map {
  width: 50px;
  height: 35px;
}
.drawer-body .catalogue .section-head {
  display: flex;
}
.drawer-body .cue {
  grid-template-columns: 1fr;
  gap: 2px;
}
.drawer-links {
  justify-content: flex-start;
  border-top: 1px solid #d7e1d4;
}
@media (max-width: 820px) {
  .drive-studio .viewbar {
    gap: 5px;
    padding: 5px 7px;
  }
  .drive-studio .view-group button,
  .drive-studio .mode-group button,
  .drive-studio .gears button {
    font-size: 11px;
    padding: 4px 6px;
  }
  .drive-studio .mode-group svg,
  .drive-studio .view-group svg {
    display: none;
  }
  .drive-studio .guide-toggle {
    font-size: 11px;
    padding: 3px;
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .drive-studio .sim-head,
  .drive-studio .simulator:fullscreen .sim-head {
    min-height: 36px;
    padding: 2px max(9px, env(safe-area-inset-right)) 2px
      max(9px, env(safe-area-inset-left));
  }
  .drive-studio .studio-mark {
    width: 26px;
    height: 26px;
  }
  .drive-studio .head-left h2 {
    font-size: 15px;
  }
  .drive-studio .kicker {
    font-size: 8px;
  }
  .drive-studio .sim-actions button,
  .drive-studio .sim-actions select {
    min-height: 26px;
    font-size: 11px;
    padding: 2px 7px;
  }
  .drive-studio .viewbar,
  .drive-studio .simulator:fullscreen .viewbar {
    padding: 2px max(5px, env(safe-area-inset-right))
      max(2px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    gap: 5px;
  }
  .drive-studio .view-group,
  .drive-studio .gears,
  .drive-studio .mode-group {
    padding: 1px;
  }
  .drive-studio .view-group button,
  .drive-studio .mode-group button,
  .drive-studio .gears button {
    min-height: 25px;
    padding: 4px 6px;
  }
  .drive-studio .telemetry {
    bottom: 5px;
    padding: 4px 12px;
    gap: 11px;
  }
  .drive-studio .telemetry .speed-reading b {
    font-size: 19px;
  }
  .drive-studio .telemetry b {
    font-size: 14px;
  }
  .drive-studio .first-drive-tip,
  .drive-studio .gaps {
    bottom: 47px;
  }
  .drive-studio .simulator:fullscreen .driving {
    padding: 0 12px 3px;
  }
  .drive-studio .phase-caption {
    margin-top: 0;
  }
}
@media (max-width: 599px) and (orientation: portrait) {
  .drive-studio .sim-head {
    min-height: 48px;
    padding: 5px 7px;
  }
  .drive-studio .sim-actions {
    gap: 4px;
  }
  .drive-studio .sim-actions button,
  .drive-studio .sim-actions select {
    font-size: 10px;
    padding: 4px 6px;
  }
  .drive-studio .viewbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 3px;
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }
  .drive-studio .view-group {
    grid-column: 1/-1;
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .drive-studio .mode-group {
    grid-column: 3;
  }
  .drive-studio .gears {
    justify-self: end;
  }
  .drive-studio .telemetry {
    bottom: 6px;
    gap: 6px;
    padding: 4px 7px;
  }
  .drive-studio .telemetry b {
    font-size: 12px;
  }
  .drive-studio .telemetry .speed-reading b {
    font-size: 16px;
  }
  .drive-studio .telemetry small {
    font-size: 8px;
  }
  .drive-studio .first-drive-tip,
  .drive-studio .gaps {
    bottom: 46px;
    font-size: 9px;
  }
  .drive-studio #feedback.warning {
    top: 42px;
    max-width: 70%;
  }
  .drive-studio .screen-cue {
    top: 46px;
  }
  .drawer-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .drawer-body #courses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .drawer-body .course {
    min-width: 0;
  }
  .drawer-body .cue {
    display: block;
  }
}
.drive-studio .dual-view:not(:has(.stacked)) .screen-cue {
  top: auto;
  bottom: 73px;
}
/* Leave the dashboard dials and the physical steering wheel visible. */
.drive-studio .telemetry,
.drive-studio .simulator:fullscreen .telemetry {
  bottom: auto;
  top: 10px;
  left: 98px;
  transform: none;
  align-items: center;
  gap: 10px;
  padding: 4px 9px;
  border-top: 1px solid #a9c3b77d;
  background: #112326ca;
}
.drive-studio .telemetry b,
.drive-studio .telemetry .speed-reading b {
  font-size: 15px;
}
.drive-studio .telemetry .angle-reading {
  display: none;
}
.drive-studio .first-drive-tip {
  bottom: 5px;
}
.drive-studio .gaps {
  bottom: 6px;
}
.drive-studio #feedback.warning {
  top: 54px;
  z-index: 7;
}
@media (max-height: 520px) and (orientation: landscape) {
  .drive-studio .telemetry,
  .drive-studio .simulator:fullscreen .telemetry {
    top: 9px;
    left: 88px;
  }
  .drive-studio .first-drive-tip {
    font-size: 10px;
  }
}
.input-status:empty {
  display: none;
}
.drive-studio .input-status {
  top: 48px;
  bottom: auto;
  max-width: 65%;
}
.drive-studio .follow-frame span {
  font-size: 9px;
  padding: 2px 5px;
}
.drive-studio .manual-view:has(.input-status:not(:empty)) .first-drive-tip {
  display: none;
}
.drive-studio .pedal-label {
  white-space: nowrap;
  letter-spacing: 0;
}
@media (max-width: 430px) and (orientation: portrait) {
  .drive-studio .pedal-label {
    font-size: 0;
  }
  .drive-studio .pedal-label b {
    font-size: 11px;
  }
}
.drive-studio .studying #demo-controls{display:none}
.mirror-lesson{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0;color:#e5f0ea;font:13px/1.5 system-ui,sans-serif}
.mirror-lesson strong{color:#a3efca}.mirror-lesson p{margin:1px 0}.mirror-actions{display:flex;gap:5px;flex-shrink:0}
.mirror-actions button{background:#30463e;color:#d7fae5;border:1px solid #4c6357;border-radius:5px;font-size:12px;padding:6px 9px}
@media(max-width:640px){.mirror-lesson{display:block;font-size:12px}.mirror-actions{margin-top:5px;justify-content:flex-end}}
.drawer-head h2 small { color: #566b60; font: 12px system-ui, sans-serif; }
.steering-setting { display: flex; align-items: center; gap: 12px; margin: 12px 18px 0; font-size: 14px; }
.steering-setting select { padding: 6px 10px; font: inherit; }
