:root {
  color-scheme: dark;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070a0d;
  color: #f4f7f9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 65% 35%, rgba(55, 74, 84, 0.26), transparent 32%),
    #070a0d;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

#viewport,
#viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(6, 9, 12, 0.92), rgba(6, 9, 12, 0));
  pointer-events: none;
}

.brand,
.status-pill {
  display: flex;
  align-items: center;
}

.brand-mark {
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.06em;
  color: #ff542f;
}

.brand-divider {
  width: 1px;
  height: 16px;
  margin: 0 14px;
  background: rgba(255, 255, 255, 0.22);
}

.brand-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #d8e0e4;
}

.status-pill {
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(10, 15, 18, 0.68);
  backdrop-filter: blur(16px);
  color: #9ba8ae;
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb32c;
  box-shadow: 0 0 14px rgba(255, 179, 44, 0.8);
}

.status-pill.ready .status-dot {
  background: #53e391;
  box-shadow: 0 0 14px rgba(83, 227, 145, 0.8);
}

.race-timer {
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 7;
  display: flex;
  min-width: 230px;
  padding: 8px 18px 9px;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 82, 45, 0.36);
  border-radius: 14px;
  background: rgba(8, 12, 15, 0.84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), inset 0 0 20px rgba(255, 82, 45, 0.04);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.race-timer span {
  color: #ffb531;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.race-timer #time-value {
  min-width: 190px;
  margin-top: 2px;
  text-align: center;
  font-size: 34px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.telemetry {
  position: absolute;
  top: 92px;
  left: 26px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.metric {
  min-width: 112px;
  padding: 13px 15px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(10, 14, 17, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.metric-label,
.eyebrow {
  display: block;
  color: #7d8b91;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.metric div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 5px;
}

.metric strong {
  font-variant-numeric: tabular-nums;
  font-size: 25px;
  line-height: 1;
  font-weight: 650;
}

.metric small {
  color: #7d898e;
  font-size: 10px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(8, 12, 15, 0.79);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
}

.right-stack {
  position: absolute;
  top: 92px;
  right: 26px;
  z-index: 6;
  display: flex;
  width: min(448px, calc(100vw - 52px));
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.sensor-suite {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  padding: 13px;
  border-radius: 16px;
  background: rgba(5, 10, 13, 0.91);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28), inset 0 0 40px rgba(28, 208, 255, 0.025);
  backdrop-filter: blur(18px);
}

.sensor-renderer {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sensor-suite > :not(.sensor-renderer) {
  position: relative;
  z-index: 1;
}

.sensor-suite-heading,
.sensor-pair-heading,
.lidar-spec-row,
.sensor-live-badge,
.sensor-feed-state {
  display: flex;
  align-items: center;
}

.sensor-suite-heading {
  justify-content: space-between;
  margin-bottom: 8px;
}

.sensor-suite-heading h2 {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sensor-live-badge {
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(83, 227, 145, 0.28);
  border-radius: 999px;
  color: #75dca2;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.sensor-live-badge i,
.sensor-feed-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #53e391;
  box-shadow: 0 0 9px rgba(83, 227, 145, 0.9);
}

.sensor-pair + .sensor-pair {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sensor-pair-heading {
  min-height: 18px;
  gap: 7px;
  color: #829198;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.sensor-pair-heading strong {
  color: #dce7eb;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.sensor-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sensor-feed {
  position: relative;
  aspect-ratio: 1.6 / 1;
  overflow: hidden;
  border: 1px solid rgba(116, 219, 245, 0.23);
  border-radius: 9px;
  background: rgba(2, 7, 10, 0.12);
  box-shadow: 0 0 0 2px rgba(2, 6, 8, 0.48), inset 0 0 22px rgba(0, 0, 0, 0.16);
}

.sensor-feed[data-mode="depth"] {
  border-color: rgba(109, 146, 255, 0.27);
}

.lidar-monitor {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.lidar-monitor-heading {
  justify-content: space-between;
  margin-bottom: 5px;
}

.lidar-feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.lidar-feed {
  position: relative;
  aspect-ratio: 1.9 / 1;
  overflow: hidden;
  border: 1px solid rgba(53, 230, 255, 0.3);
  border-radius: 9px;
  background: #020608;
  box-shadow: 0 0 0 2px rgba(2, 6, 8, 0.48), inset 0 0 26px rgba(23, 199, 231, 0.05);
}

.lidar-feed.combined {
  border-color: rgba(83, 225, 242, 0.34);
  box-shadow: 0 0 0 2px rgba(2, 6, 8, 0.48), inset 0 0 30px rgba(54, 210, 235, 0.045);
}

.lidar-feed canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.lidar-feed::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 24%, transparent 88%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.lidar-feed .sensor-feed-label,
.lidar-feed-range {
  z-index: 2;
}

.lidar-feed-range {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #77eaff;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.lidar-feed-range.rear-range {
  top: 21px;
  color: #ffb15c;
}

.lidar-feed-range em {
  font-style: normal;
  font-weight: 900;
}

.lidar-feed-range i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.lidar-feed-range b {
  font-weight: 800;
}

.sensor-viewport {
  position: absolute;
  inset: 0;
}

.sensor-feed::before,
.sensor-feed::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.sensor-feed::before {
  background-image:
    linear-gradient(rgba(113, 230, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 230, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.sensor-feed::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), transparent 35%, transparent 68%, rgba(0, 0, 0, 0.5));
}

.sensor-feed-label,
.sensor-feed-state,
.depth-scale {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.sensor-feed-label {
  top: 7px;
  left: 8px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(2, 8, 11, 0.7);
  color: #e6f8fc;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.sensor-feed-state {
  top: 8px;
  right: 8px;
  gap: 4px;
  color: rgba(221, 242, 247, 0.74);
  font-size: 7px;
  font-weight: 750;
}

.depth-scale {
  right: 8px;
  bottom: 7px;
  width: 48px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  background: linear-gradient(90deg, #ff522f, #e9e547 30%, #24dda0 58%, #2765ff);
}

.lidar-spec-row {
  justify-content: flex-end;
  gap: 9px;
  margin-top: 9px;
  color: #718189;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.lidar-spec-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lidar-swatch {
  display: inline-block;
  width: 12px;
  height: 2px;
  border-radius: 99px;
  box-shadow: 0 0 7px currentColor;
}

.lidar-swatch.front {
  color: #35e6ff;
  background: #35e6ff;
}

.lidar-swatch.rear {
  color: #ff9f2f;
  background: #ff9f2f;
}

.lidar-swatch.sensor {
  color: #ff2c2c;
  background: #ff2c2c;
}

.mast-panel {
  position: relative;
  align-self: flex-end;
  width: 258px;
  padding: 17px;
  border-radius: 16px;
  pointer-events: auto;
}

.mirror-suite {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
  --mirror-width: clamp(198px, 11vw, 260px);
  --mirror-height: clamp(290px, 34vh, 380px);
  --mirror-left-inset: clamp(282px, 15vw, 300px);
  --mirror-right-inset: clamp(460px, 26vw, 514px);
  --mirror-top-inset: clamp(126px, 14vh, 160px);
  --mirror-bottom-inset: clamp(136px, 14vh, 175px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.mirror-suite.visible {
  opacity: 1;
  visibility: visible;
}

.mirror-view {
  position: absolute;
  width: var(--mirror-width);
  height: var(--mirror-height);
  overflow: hidden;
  border: 2px solid rgba(177, 229, 242, 0.56);
  border-radius: 18px 18px 14px 14px;
  background: rgba(2, 7, 10, 0.14);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(68, 210, 242, 0.11), inset 0 0 24px rgba(0, 0, 0, 0.18);
}

.mirror-front-left,
.mirror-front-right {
  top: var(--mirror-top-inset);
}

.mirror-rear-left,
.mirror-rear-right {
  bottom: var(--mirror-bottom-inset);
}

.mirror-front-left,
.mirror-rear-left {
  left: var(--mirror-left-inset);
}

.mirror-front-right,
.mirror-rear-right {
  right: var(--mirror-right-inset);
}

.mirror-view::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(3, 9, 12, 0.08), transparent 58%, rgba(3, 9, 12, 0.64));
}

.mirror-viewport {
  position: absolute;
  inset: 0;
}

.mirror-view > span {
  position: absolute;
  left: 9px;
  bottom: 7px;
  z-index: 1;
  color: rgba(224, 244, 248, 0.8);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 650;
}

.ghost-button {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #aab5ba;
  font-size: 10px;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: rgba(255, 84, 47, 0.55);
  color: #fff;
}

.panel-actions {
  display: flex;
  gap: 5px;
}

.cargo-metric {
  min-width: 106px;
}

.cargo-metric strong {
  font-size: 16px;
  color: #aeb9be;
}

.cargo-metric strong.cargo-lifted {
  color: #53e391;
}

.game-banner {
  position: absolute;
  top: 91px;
  left: 50%;
  z-index: 4;
  min-width: 330px;
  padding: 11px 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 12, 15, 0.82);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.game-banner span {
  color: #ffb531;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.game-banner strong {
  font-size: 11px;
  font-weight: 650;
  color: #dce4e7;
}

.game-banner[data-state="success"] {
  border-color: rgba(83, 227, 145, 0.48);
  box-shadow: 0 0 32px rgba(83, 227, 145, 0.12);
}

.game-banner[data-state="success"] span,
.game-banner[data-state="success"] strong {
  color: #53e391;
}

.game-banner[data-state="failure"] {
  border-color: rgba(255, 75, 58, 0.58);
}

.game-banner[data-state="failure"] span,
.game-banner[data-state="failure"] strong {
  color: #ff6b57;
}

.drive-command {
  position: absolute;
  top: 148px;
  left: 50%;
  z-index: 7;
  min-width: 430px;
  padding: 14px 26px 13px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid rgba(53, 230, 255, 0.62);
  border-radius: 16px;
  background: rgba(4, 18, 23, 0.9);
  box-shadow: 0 0 42px rgba(53, 230, 255, 0.18);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.drive-command strong {
  color: #5deaff;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.drive-command span {
  margin-top: 7px;
  color: #c6f7ff;
  font-size: 13px;
  font-weight: 700;
}

.drive-command[data-state="reverse"] {
  border-color: rgba(255, 159, 47, 0.72);
  background: rgba(31, 17, 4, 0.92);
  box-shadow: 0 0 42px rgba(255, 159, 47, 0.22);
}

.drive-command[data-state="reverse"] strong,
.drive-command[data-state="reverse"] span {
  color: #ffb558;
}

.drive-command[data-state="pickup"],
.drive-command[data-state="unload"] {
  border-color: rgba(83, 227, 145, 0.68);
  background: rgba(5, 28, 18, 0.92);
  box-shadow: 0 0 42px rgba(83, 227, 145, 0.2);
}

.drive-command[data-state="pickup"] strong,
.drive-command[data-state="pickup"] span,
.drive-command[data-state="unload"] strong,
.drive-command[data-state="unload"] span,
.drive-command[data-state="success"] strong,
.drive-command[data-state="success"] span {
  color: #62e99b;
}

.drive-command[data-state="failure"] {
  border-color: rgba(255, 88, 62, 0.76);
  background: rgba(37, 8, 5, 0.92);
}

.drive-command[data-state="failure"] strong,
.drive-command[data-state="failure"] span {
  color: #ff745f;
}

/* Leave the full course visible in the map camera instead of covering its
   northern edge with the normal driving HUD. */
body[data-camera-mode="top_map"] .race-timer {
  transform: translateX(-50%) scale(0.82);
  transform-origin: top center;
}

body[data-camera-mode="top_map"] .game-banner {
  min-width: 285px;
  padding: 8px 14px;
  transform: translateX(-50%) scale(0.86);
  transform-origin: top center;
}

body[data-camera-mode="top_map"] .drive-command {
  min-width: 330px;
  padding: 9px 18px 8px;
  transform: translateX(-50%) scale(0.82);
  transform-origin: top center;
}

body[data-camera-mode="top_map"] .drive-command strong {
  font-size: 23px;
}

body[data-camera-mode="top_map"] .drive-command span {
  margin-top: 4px;
  font-size: 11px;
}

body[data-camera-mode="top_map"] .edge-warning {
  transform: translate(-50%, -8px) scale(0.84);
  transform-origin: top center;
}

.edge-warning {
  position: absolute;
  top: 236px;
  left: 50%;
  z-index: 8;
  padding: 11px 18px;
  transform: translate(-50%, -8px);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 190, 54, 0.78);
  border-radius: 10px;
  background: rgba(73, 49, 3, 0.9);
  box-shadow: 0 0 30px rgba(255, 181, 49, 0.24);
  opacity: 0;
  visibility: hidden;
  transition: 150ms ease;
  pointer-events: none;
}

.edge-warning.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  animation: warning-pulse 0.75s ease-in-out infinite alternate;
}

.edge-warning strong {
  color: #ffd56e;
  font-size: 12px;
}

.edge-warning span {
  color: #f2d89d;
  font-size: 10px;
}

.leaderboard {
  position: absolute;
  top: 184px;
  left: 26px;
  z-index: 4;
  width: 248px;
  min-height: 178px;
  padding: 16px;
  border-radius: 16px;
}

.leaderboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.leaderboard h2 {
  margin: 4px 0 0;
  font-size: 17px;
}

.lock-mark {
  padding: 4px 6px;
  border: 1px solid rgba(83, 227, 145, 0.2);
  border-radius: 5px;
  color: #6dc595;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: score;
}

#leaderboard-list li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 10px;
}

#leaderboard-list li > span {
  color: #66747b;
  font-variant-numeric: tabular-nums;
}

#leaderboard-list li > strong {
  overflow: hidden;
  color: #cbd4d8;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#leaderboard-list time {
  color: #ffb531;
  font-variant-numeric: tabular-nums;
}

#leaderboard-empty {
  margin: 25px 0;
  color: #65737a;
  font-size: 10px;
  text-align: center;
}

.recording-panel {
  position: absolute;
  top: 375px;
  left: 26px;
  z-index: 5;
  width: 248px;
  padding: 14px 16px;
  border-radius: 16px;
}

.recording-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 9px;
}

.recording-heading h2 {
  margin: 3px 0 0;
  font-size: 15px;
}

.recording-state {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #7d8b91;
  font-size: 8px;
  font-weight: 850;
}

.recording-state[data-state="recording"] {
  border-color: rgba(255, 91, 55, 0.58);
  color: #ff7658;
  box-shadow: 0 0 15px rgba(255, 84, 47, 0.18);
}

.recording-state[data-state="saved"] {
  border-color: rgba(83, 227, 145, 0.45);
  color: #62e99b;
}

.recording-state[data-state="replay"] {
  border-color: rgba(93, 234, 255, 0.5);
  color: #5deaff;
}

.recording-state[data-state="error"] {
  border-color: rgba(255, 75, 58, 0.5);
  color: #ff745f;
}

#recording-select,
#recording-speed {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: #11181c;
  color: #cbd4d8;
  outline: none;
}

#recording-select {
  width: 100%;
  height: 31px;
  padding: 0 8px;
  font-size: 9px;
}

.recording-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 7px;
}

.recording-buttons button,
.result-recording-actions button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #b8c4c9;
  font-size: 9px;
  cursor: pointer;
}

.recording-buttons button:hover:not(:disabled),
.result-recording-actions button:hover:not(:disabled) {
  border-color: rgba(93, 234, 255, 0.48);
  color: #fff;
}

.recording-buttons button:disabled,
.result-recording-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

#recording-timeline {
  width: 100%;
  height: 13px;
  margin: 8px 0 2px;
  accent-color: #5deaff;
}

.recording-meta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px;
}

#recording-time {
  color: #8ea0a8;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

#recording-speed {
  height: 25px;
  padding: 0 5px;
  font-size: 8px;
}

.recording-import {
  grid-column: 1 / -1;
  padding: 5px 7px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  color: #819097;
  font-size: 8px;
  text-align: center;
  cursor: pointer;
}

.recording-import:hover {
  border-color: rgba(93, 234, 255, 0.42);
  color: #c9f8ff;
}

.recording-import input {
  display: none;
}

#recording-status {
  display: block;
  min-height: 13px;
  margin-top: 6px;
  color: #718088;
  font-size: 8px;
  line-height: 1.35;
}

#mast-slider {
  width: 100%;
  height: 4px;
  margin: 21px 0 6px;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(90deg, #ff542f var(--mast-progress, 13.7%), #293137 var(--mast-progress, 13.7%));
  cursor: pointer;
}

#mast-slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #11161a;
  border-radius: 50%;
  appearance: none;
  background: #ff6845;
  box-shadow: 0 0 0 1px rgba(255, 104, 69, 0.55), 0 0 15px rgba(255, 84, 47, 0.4);
}

#mast-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #11161a;
  border-radius: 50%;
  background: #ff6845;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: #647177;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.follow-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9aa7ad;
  font-size: 11px;
  cursor: pointer;
}

.follow-toggle input {
  accent-color: #ff5b37;
}

.camera-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}

.camera-mode-button {
  min-width: 102px;
  color: #d8f7ff;
}

.camera-mode-button span {
  color: #5deaff;
  font-weight: 800;
}

.controls {
  position: absolute;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 15px;
  padding: 12px;
  border-radius: 18px;
  user-select: none;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.control-group > .eyebrow {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-right: 3px;
}

.drive-pad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 42px);
  gap: 5px;
}

.control-key,
.brake-button {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  cursor: pointer;
  transition: 100ms ease;
  touch-action: none;
}

.control-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 56px;
}

.control-key b,
.brake-button b {
  color: #f3f6f7;
  font-size: 11px;
}

.control-key span,
.brake-button span {
  color: #77858b;
  font-size: 9px;
}

.control-key.active,
.control-key:active,
.brake-button.active,
.brake-button:active {
  transform: translateY(1px);
  border-color: rgba(255, 91, 55, 0.68);
  background: rgba(255, 84, 47, 0.18);
  box-shadow: inset 0 0 16px rgba(255, 84, 47, 0.08);
}

.key-forward {
  grid-column: 2;
}

.drive-pad .control-key:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.drive-pad .control-key:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.drive-pad .control-key:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.control-rule {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.mast-keys {
  display: grid;
  grid-template-columns: auto 67px 67px;
}

.mast-keys > .eyebrow {
  grid-row: 1;
}

.control-key.wide {
  height: 48px;
  flex-direction: column;
  gap: 2px;
}

.brake-button {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.hint {
  position: absolute;
  right: 26px;
  bottom: 28px;
  color: rgba(205, 215, 220, 0.46);
  font-size: 10px;
  pointer-events: none;
}

.result-overlay {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 8, 0.54);
  opacity: 0;
  visibility: hidden;
  transition: 220ms ease;
  pointer-events: none;
}

.result-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.result-card {
  width: min(390px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: 220ms ease;
}

.result-overlay.visible .result-card {
  transform: translateY(0) scale(1);
}

.result-card h2 {
  margin: 9px 0 5px;
  font-size: 30px;
}

.result-card > p {
  margin: 0 0 20px;
  color: #a9b6bc;
  font-size: 13px;
}

.score-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.score-fields input,
.score-fields button,
.result-restart {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
}

.score-fields input {
  min-width: 0;
  padding: 0 12px;
  background: #11181c;
  color: #fff;
  outline: none;
}

.score-fields input:focus {
  border-color: #ff6845;
}

.score-fields button {
  padding: 0 14px;
  background: #ff5935;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

#score-status {
  display: block;
  min-height: 16px;
  margin-top: 8px;
  color: #8ea0a8;
  font-size: 9px;
}

.result-recording-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.result-recording-actions button {
  min-height: 38px;
}

.result-restart {
  width: 100%;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #c7d0d4;
  cursor: pointer;
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 10, 0.94);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loading.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ff5b37;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading p {
  margin: 18px 0 12px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.loading-track {
  width: min(260px, 70vw);
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #222a2e;
}

.loading-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff5b37;
  transition: width 250ms ease;
}

.loading small {
  margin-top: 10px;
  color: #66747b;
  font-size: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes warning-pulse {
  from { box-shadow: 0 0 18px rgba(255, 181, 49, 0.18); }
  to { box-shadow: 0 0 42px rgba(255, 181, 49, 0.46); }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .right-stack {
    right: 16px;
    width: 382px;
  }

  .mirror-suite {
    --mirror-width: clamp(164px, 16vw, 194px);
    --mirror-height: clamp(228px, 28vh, 275px);
    --mirror-left-inset: clamp(218px, 23vw, 282px);
    --mirror-right-inset: 414px;
    --mirror-top-inset: 230px;
    --mirror-bottom-inset: 136px;
  }

  .sensor-suite {
    padding: 11px;
  }

  .sensor-feed-label {
    top: 6px;
    left: 6px;
  }

  .sensor-feed-state {
    top: 7px;
    right: 6px;
  }

}

@media (max-width: 900px) {
  .topbar {
    height: 64px;
    padding: 16px;
  }

  .brand-title,
  .hint {
    display: none;
  }

  .brand-divider {
    display: none;
  }

  .telemetry {
    top: 70px;
    left: 12px;
    right: 12px;
    gap: 5px;
  }

  .race-timer {
    top: 8px;
    min-width: 190px;
    padding: 7px 12px;
  }

  .race-timer #time-value {
    min-width: 166px;
    font-size: 28px;
  }

  .game-banner {
    top: 135px;
    min-width: 280px;
  }

  .drive-command {
    top: 184px;
    min-width: min(430px, calc(100vw - 28px));
    padding: 12px 18px;
  }

  .drive-command strong {
    font-size: 25px;
  }

  .drive-command span {
    font-size: 11px;
  }

  .edge-warning {
    top: 266px;
  }

  .leaderboard {
    top: 184px;
    left: 12px;
    width: 205px;
    max-height: 240px;
    overflow: auto;
  }

  .recording-panel {
    top: 435px;
    left: 12px;
    width: 205px;
  }

  .metric {
    flex: 1;
    min-width: 0;
    padding: 10px;
  }

  .metric strong {
    font-size: 20px;
  }

  .cargo-metric {
    display: none;
  }

  .right-stack {
    top: auto;
    right: 12px;
    bottom: 154px;
    width: 224px;
  }

  .sensor-suite {
    display: none;
  }

  .mirror-suite {
    --mirror-width: min(26vw, 190px);
    --mirror-height: min(28vh, 230px);
    --mirror-left-inset: 12px;
    --mirror-right-inset: 12px;
    --mirror-top-inset: 285px;
    --mirror-bottom-inset: 110px;
  }

  .mast-panel {
    width: 224px;
  }

  .controls {
    bottom: 10px;
    max-width: calc(100% - 20px);
    gap: 8px;
    padding: 9px;
  }

  .drive-pad {
    grid-template-columns: repeat(3, 47px);
    grid-template-rows: repeat(2, 38px);
  }

  .control-key {
    min-width: 47px;
  }

  .mast-keys {
    grid-template-columns: 50px 50px;
  }

  .mast-keys > .eyebrow,
  .control-group > .eyebrow,
  .control-rule {
    display: none;
  }

  .control-key.wide {
    height: 42px;
  }

  .brake-button {
    width: 58px;
  }
}

@media (max-width: 540px) {
  .status-pill {
    padding: 7px 9px;
  }

  .metric-label {
    letter-spacing: 0.08em;
  }

  .right-stack {
    left: 12px;
    right: 12px;
    bottom: 143px;
    width: auto;
  }

  .mast-panel {
    width: 100%;
    padding: 13px;
  }

  .controls {
    width: calc(100% - 20px);
    justify-content: center;
  }

  .brake-button {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* JEV examiner panel ----------------------------------------------------- */
.jev-panel {
  position: absolute;
  top: 596px;
  left: 26px;
  z-index: 5;
  width: 248px;
  max-height: calc(100vh - 640px);
  overflow: hidden auto;
  padding: 14px 16px 12px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jev-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.jev-heading h2 {
  margin: 2px 0 0;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.jev-status {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 224, 230, 0.7);
  white-space: nowrap;
}
.jev-status[data-state="ready"] { color: #8fd3ff; border-color: rgba(143, 211, 255, 0.4); }
.jev-status[data-state="live"],
.jev-status[data-state="busy"] { color: #46f0b0; border-color: rgba(70, 240, 176, 0.45); }
.jev-status[data-state="busy"] { animation: jev-pulse 0.9s ease-in-out infinite; }
.jev-status[data-state="done"] { color: #ffd479; border-color: rgba(255, 212, 121, 0.45); }
.jev-status[data-state="off"] { color: #ff8a80; border-color: rgba(255, 138, 128, 0.4); }
@keyframes jev-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.jev-verdict {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.jev-verdict strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.jev-verdict span {
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(214, 224, 230, 0.72);
}
.jev-verdict[data-verdict="good"] { border-color: rgba(70, 240, 176, 0.5); background: rgba(70, 240, 176, 0.08); }
.jev-verdict[data-verdict="good"] strong { color: #46f0b0; }
.jev-verdict[data-verdict="warn"] { border-color: rgba(255, 212, 121, 0.5); background: rgba(255, 212, 121, 0.08); }
.jev-verdict[data-verdict="warn"] strong { color: #ffd479; }
.jev-verdict[data-verdict="bad"] { border-color: rgba(255, 96, 82, 0.55); background: rgba(255, 96, 82, 0.1); }
.jev-verdict[data-verdict="bad"] strong { color: #ff7b6e; }
.jev-judgments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jev-judgment-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: rgba(214, 224, 230, 0.7);
}
.jev-judgment-head b {
  color: #eef3f6;
  font-weight: 700;
  text-align: right;
}
.jev-judgment[data-tone="good"] .jev-judgment-head b { color: #7cf0c4; }
.jev-judgment[data-tone="warn"] .jev-judgment-head b { color: #ffd479; }
.jev-judgment[data-tone="bad"] .jev-judgment-head b { color: #ff8a80; }
.jev-bar {
  position: relative;
  height: 6px;
  margin-top: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.jev-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4fb7ff, #46f0b0);
  transition: width 0.35s ease;
}
.jev-judgment[data-tone="warn"] .jev-bar i { background: linear-gradient(90deg, #ffb347, #ffd479); }
.jev-judgment[data-tone="bad"] .jev-bar i { background: linear-gradient(90deg, #ff5a4c, #ff8a80); }
.jev-bar em {
  position: absolute;
  right: 0;
  top: -13px;
  font-size: 9px;
  font-style: normal;
  color: rgba(214, 224, 230, 0.55);
}
.jev-log {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  color: rgba(214, 224, 230, 0.68);
}
.jev-log li {
  display: flex;
  gap: 6px;
  line-height: 1.35;
}
.jev-log time {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: rgba(214, 224, 230, 0.45);
}
.jev-log li[data-kind="good"] span { color: #7cf0c4; }
.jev-log li[data-kind="warn"] span { color: #ffd479; }
.jev-log li[data-kind="bad"] span { color: #ff8a80; }
.jev-meta {
  font-size: 9px;
  color: rgba(214, 224, 230, 0.42);
  line-height: 1.4;
}
.result-jev {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(214, 224, 230, 0.85);
}
.result-jev:empty { display: none; }
.result-jev[data-tone="good"] { border-color: rgba(70, 240, 176, 0.5); color: #7cf0c4; }
.result-jev[data-tone="warn"] { border-color: rgba(255, 212, 121, 0.5); color: #ffd479; }
.result-jev[data-tone="bad"] { border-color: rgba(255, 96, 82, 0.55); color: #ff8a80; }
@media (max-width: 1200px) {
  .jev-panel { display: none; }
}


/* JEV driving ------------------------------------------------------------ */
.jev-heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.jev-drive-toggle {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.45);
  background: rgba(143, 211, 255, 0.08);
  color: #8fd3ff;
  font: 800 9.5px/1 system-ui, sans-serif;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.jev-drive-toggle:hover { background: rgba(143, 211, 255, 0.18); }
.jev-drive-toggle[data-state="on"] {
  color: #10141a;
  background: #46f0b0;
  border-color: #46f0b0;
  animation: jev-pulse 1.2s ease-in-out infinite;
}
.jev-status[data-state="drive"] { color: #10141a; background: #46f0b0; border-color: #46f0b0; }
.jev-drive-feed {
  list-style: none;
  margin: 0;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(70, 240, 176, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.jev-drive-entry {
  display: grid;
  grid-template-columns: 36px 1.3fr 0.9fr 0.8fr 0.7fr;
  gap: 4px;
  align-items: center;
  font-size: 10px;
  color: rgba(214, 224, 230, 0.6);
}
.jev-drive-entry time { font-variant-numeric: tabular-nums; color: rgba(214, 224, 230, 0.45); }
.jev-drive-entry span {
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jev-drive-entry em { font-style: normal; opacity: 0.6; }
.jev-drive-entry[data-latest="true"] { font-size: 11px; color: #eef3f6; }
.jev-drive-entry[data-latest="true"] span { background: rgba(70, 240, 176, 0.16); color: #d8fff0; }
.jev-drive-pedal[data-value="back_up"] { color: #ffb347; }
.jev-drive-pedal[data-value="stop"] { color: #ff8a80; }
.jev-drive-mast[data-value="raise"], .jev-drive-mast[data-value="lower"] { color: #8fd3ff; }

/* Centre ticker: Jev's latest verdict / driving decision under the command banner */
.jev-ticker {
  position: absolute;
  top: 232px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(720px, calc(100vw - 560px));
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 15, 0.82);
  backdrop-filter: blur(14px);
  color: #eef3f6;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jev-ticker-label {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: rgba(143, 211, 255, 0.16);
  color: #8fd3ff;
}
.jev-ticker[data-state="good"] { border-color: rgba(70, 240, 176, 0.55); }
.jev-ticker[data-state="good"] .jev-ticker-label { background: rgba(70, 240, 176, 0.2); color: #46f0b0; }
.jev-ticker[data-state="warn"] { border-color: rgba(255, 212, 121, 0.55); }
.jev-ticker[data-state="warn"] .jev-ticker-label { background: rgba(255, 212, 121, 0.2); color: #ffd479; }
.jev-ticker[data-state="bad"] { border-color: rgba(255, 96, 82, 0.6); }
.jev-ticker[data-state="bad"] .jev-ticker-label { background: rgba(255, 96, 82, 0.22); color: #ff8a80; }
.jev-ticker[data-state="drive"] { border-color: #46f0b0; box-shadow: 0 0 24px rgba(70, 240, 176, 0.25); }
.jev-ticker[data-state="drive"] .jev-ticker-label { background: #46f0b0; color: #10141a; }
@media (max-width: 1200px) {
  .jev-ticker { display: none; }
}

/* JEV decision board: every option Jev weighed, the applied choice, the
   planner's recommendation and what the executor does with it. Sits under the
   command banner while Jev drives. */
.jev-board {
  position: absolute;
  top: 232px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  width: min(1040px, calc(100vw - 600px));
  padding: 11px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(70, 240, 176, 0.55);
  background: rgba(8, 12, 15, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 28px rgba(70, 240, 176, 0.16);
  color: #eef3f6;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jev-board-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.jev-board-head strong {
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jev-board-tag {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: #46f0b0;
  color: #10141a;
}
.jev-board-tag.exec { background: rgba(143, 211, 255, 0.2); color: #8fd3ff; }
.jev-board-meta {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  color: rgba(214, 224, 230, 0.6);
  font-variant-numeric: tabular-nums;
}
.jev-board-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr 1.15fr;
  gap: 12px;
}
.jev-board-group[hidden] { display: none; }
.jev-board-group h4 {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 224, 230, 0.72);
}
.jev-board-group h4 small {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(214, 224, 230, 0.45);
}
.jev-board-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.jev-board-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px 34px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(214, 224, 230, 0.62);
}
.jev-board-option-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jev-board-bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.jev-board-bar b {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: rgba(214, 224, 230, 0.4);
  transition: width 0.25s ease;
}
.jev-board-percent { text-align: right; font-variant-numeric: tabular-nums; }
.jev-board-option[data-chosen="true"] { color: #eef3f6; font-weight: 700; }
.jev-board-option[data-chosen="true"] .jev-board-bar b { background: #46f0b0; }
.jev-board-option[data-chosen="true"][data-tone="warn"] .jev-board-bar b { background: #ffb347; }
.jev-board-option[data-held="true"] { color: #ffd479; }
.jev-board-option[data-held="true"] .jev-board-bar b { background: rgba(255, 212, 121, 0.6); }
.jev-board-options[data-single="true"] .jev-board-option { color: rgba(214, 224, 230, 0.8); }
.jev-board-chip {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: 1px;
  background: rgba(143, 211, 255, 0.18);
  color: #8fd3ff;
}
.jev-board-chip.held { background: rgba(255, 212, 121, 0.18); color: #ffd479; }
.jev-board-judge { display: flex; flex-wrap: wrap; gap: 6px; }
.jev-board-judge-chip {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(214, 224, 230, 0.8);
}
.jev-board-judge-chip[data-tone="good"] { border-color: rgba(70, 240, 176, 0.5); color: #b9f7df; }
.jev-board-judge-chip[data-tone="warn"] { border-color: rgba(255, 212, 121, 0.5); color: #ffd479; }
.jev-board-judge-chip[data-tone="bad"] { border-color: rgba(255, 96, 82, 0.6); color: #ff8a80; }
.jev-board-exec-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.jev-board-exec {
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.45;
  color: #d6e0e6;
}
/* while the board is up, the line warning and the one-line ticker move out of its way */
body.jev-driving .edge-warning { top: 520px; }
body.jev-driving .jev-ticker { display: none; }
@media (max-width: 1400px) {
  .jev-board { display: none; }
  body.jev-driving .edge-warning { top: 236px; }
  body.jev-driving .jev-ticker { display: flex; }
}
/* drive-decision history in the examiner panel: full labels, two lines */
.jev-panel { width: 300px; }
.jev-drive-entry {
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: "time maneuver" "time pedal";
  row-gap: 2px;
}
.jev-drive-entry time { grid-area: time; }
.jev-drive-entry .jev-drive-maneuver { grid-area: maneuver; }
.jev-drive-entry .jev-drive-pedal,
.jev-drive-entry .jev-drive-offset,
.jev-drive-entry .jev-drive-mast { grid-area: pedal; }
.jev-drive-entry .jev-drive-pedal { display: inline-flex; flex-wrap: wrap; gap: 4px; background: none; padding: 0; overflow: visible; white-space: normal; }
