/* Teaching adds a compact transport row; manual driving keeps its original layout. */
.teaching-panel[hidden],
.teaching-hud[hidden],
.teaching-plan[hidden] {
  display: none !important;
}
.teaching-panel {
  flex: 0 0 auto;
  padding: 8px 18px;
  color: #e8f4ed;
  background: #172928;
  border-top: 1px solid #527064;
  font:
    12px/1.4 system-ui,
    sans-serif;
}
.teaching-selection,
.teaching-playback {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.teaching-selection strong {
  color: #9cebc6;
  white-space: nowrap;
}
.teaching-selection label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.teaching-panel select,
.teaching-panel button {
  font: inherit;
  color: #e4f3ea;
  background: #2b413b;
  border: 1px solid #567267;
  border-radius: 5px;
  padding: 5px 8px;
  min-height: 30px;
}
.teaching-panel select {
  max-width: 230px;
  min-width: 0;
}
.teaching-panel button {
  white-space: nowrap;
}
.teaching-panel button:focus-visible,
.teaching-panel select:focus-visible,
.teaching-progress:focus-visible {
  outline: 2px solid #f3cf88;
  outline-offset: 2px;
}
.teaching-selection .teaching-exit {
  margin-left: auto;
}
.teaching-playback {
  margin-top: 6px;
}
.teaching-playback .teaching-play {
  background: #a0e7c7;
  color: #133b2b;
  min-width: 74px;
}
.teaching-progress {
  width: 160px;
  min-width: 60px;
  flex: 0 1 200px;
  accent-color: #9cebc6;
  touch-action: pan-x;
}
.teaching-percent {
  width: 34px;
  font-variant-numeric: tabular-nums;
}
.teaching-cue {
  flex: 1;
  margin: 0;
  color: #ecf4e8;
  min-width: 0;
}
.teaching-active #driving-inputs,
.teaching-active .first-drive-tip,
.teaching-active .driving,
.teaching-active #screen-cue,
.teaching-active .gears {
  display: none !important;
}
.teaching-hud {
  position: absolute;
  bottom: 8px;
  left: 14px;
  z-index: 5;
  pointer-events: none;
  color: #f4f2dd;
}
.teaching-instruments {
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 7px 12px;
  background: linear-gradient(130deg, #102721d9, #10272180);
  border: 1px solid #a1c5ae55;
  border-radius: 10px;
}
.teaching-wheel {
  text-align: center;
  font: 11px/1.3 system-ui;
}
.teaching-wheel-image {
  width: 112px;
  height: 112px;
  margin: 2px auto;
}
.teaching-wheel output {
  display: block;
  font-variant-numeric: tabular-nums;
}
.teaching-pedals {
  display: flex;
  align-items: end;
  gap: 12px;
  padding-bottom: 2px;
}
.teaching-pedal-column {
  width: 36px;
  text-align: center;
  font: 11px/1.3 system-ui;
}
.teaching-pedal-column output {
  display: block;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.teaching-pedal-column .analog-pedal {
  height: 70px;
  margin: 0 0 5px;
  pointer-events: none;
  cursor: default;
}
.teaching-pedal-column .brake-surface {
  height: 58px;
}
.teaching-pedal-column .pedal-metal {
  inset: 3px 8px 3px 3px;
  padding: 5px 2px;
}
.teaching-pedal-column .pedal-metal i {
  height: 3px;
}
.teaching-plan {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 8px;
  margin: 0;
  width: 240px;
  padding: 6px;
  border: 1px solid #8ca59b;
  border-radius: 8px;
  background: #142b27ed;
  color: #e8f3e8;
  pointer-events: none;
}
.teaching-plan figcaption {
  display: flex;
  justify-content: space-between;
  font: 11px/1.3 system-ui;
}
.teaching-plan figcaption span {
  color: #afc5ba;
  font-size: 9px;
}
.teaching-plan canvas {
  display: block;
  width: 100%;
  height: 145px;
  margin-top: 4px;
  border-radius: 3px;
}
.teaching-comparison-reading {
  margin: 4px 0 0;
  font: 10px/1.4 system-ui;
}
@media (max-height: 540px) and (orientation: landscape) {
  .teaching-panel {
    padding: 3px 9px;
    font-size: 11px;
  }
  .teaching-panel select,
  .teaching-panel button {
    min-height: 26px;
    padding: 3px 6px;
  }
  .teaching-playback {
    margin-top: 3px;
  }
  .teaching-wheel-image {
    width: 72px;
    height: 72px;
  }
  .teaching-instruments {
    gap: 10px;
    padding: 4px 7px;
  }
  .teaching-pedal-column {
    width: 28px;
    font-size: 10px;
  }
  .teaching-pedal-column .analog-pedal {
    height: 48px;
  }
  .teaching-pedal-column .brake-surface {
    height: 40px;
  }
  .teaching-hud {
    bottom: 4px;
    left: 8px;
  }
  .teaching-plan {
    width: 190px;
    right: 8px;
    bottom: 4px;
    padding: 4px;
  }
  .teaching-plan canvas {
    height: 100px;
  }
  .teaching-comparison-reading {
    font-size: 9px;
  }
}
@media (max-width: 600px) {
  .teaching-panel {
    padding: 5px 7px;
  }
  .teaching-selection {
    gap: 4px;
    flex-wrap: wrap;
  }
  .teaching-selection strong {
    display: none;
  }
  .teaching-selection label {
    flex: 1 1 120px;
  }
  .teaching-selection select {
    width: 100%;
    max-width: none;
  }
  .teaching-playback {
    flex-wrap: wrap;
    gap: 5px;
  }
  .teaching-progress {
    flex: 1;
  }
  .teaching-cue {
    flex-basis: 100%;
    font-size: 11px;
  }
  .teaching-hud {
    left: 6px;
  }
  .teaching-instruments {
    gap: 7px;
    padding: 5px;
  }
  .teaching-wheel-image {
    width: 76px;
    height: 76px;
  }
  .teaching-pedals {
    gap: 6px;
  }
  .teaching-pedal-column {
    width: 27px;
  }
  .teaching-plan {
    width: 155px;
    right: 6px;
  }
  .teaching-plan canvas {
    height: 100px;
  }
  .teaching-plan figcaption span {
    display: none;
  }
}
/* Keep mode actions reachable when the view buttons exceed a narrow screen. */
@media (max-width: 820px) and (orientation: landscape) {
  .drive-studio .viewbar .view-group {
    flex: 1 1 auto;
    min-width: 80px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .drive-studio .viewbar .view-group button {
    flex: 0 0 auto;
  }
  .teaching-selection select {
    max-width: 170px;
  }
  .teaching-selection {
    gap: 5px;
  }
}
.teaching-selection .teaching-sequence {
  flex: none;
  cursor: pointer;
  gap: 4px;
}
.teaching-sequence input {
  accent-color: #8ce7bd;
}
.teaching-percent {
  width: auto;
  white-space: nowrap;
}
.teaching-enlarge {
  pointer-events: auto;
  cursor: zoom-in;
  padding: 2px 5px;
  color: #c3f7dc;
  font: inherit;
  background: #26493e;
  border-radius: 3px;
}
.teaching-plan.large {
  inset: 4px 6px 4px auto;
  width: min(68%, 700px);
  display: flex;
  flex-direction: column;
  z-index: 7;
}
.teaching-plan.large canvas {
  flex: 1 1 0;
  min-height: 0;
}
.teaching-plan.large .teaching-enlarge {
  cursor: zoom-out;
}
@media (orientation: landscape) and (max-height: 540px) {
  .teaching-plan:not(.large) canvas {
    height: 70px;
  }
}
@media (orientation: portrait) and (max-width: 600px) {
  .teaching-plan.large {
    inset: auto 5px 5px;
    width: auto;
    height: 49%;
  }
}
