/* ==========================================================================
   APEX // OLD CREW — BUILD 02 HARDWARE DESIGN TOKENS & CARBON CONSOLE
   Zero soft gradients · Machined 45deg chamfers · MoTeC / Racelogic Precision
   ========================================================================== */

:root {
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;    /* 12px floor */
  --text-sm: 0.84rem;    /* 13.5px */
  --text-base: 0.95rem;  /* 15.2px */
  --text-lg: 1.15rem;    /* 18.4px */
  --text-xl: 1.45rem;    /* 23.2px */

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;

  --color-bg: #090b0f;
  --color-chassis: #0d1016;
  --color-module: #131821;
  --color-module-hi: #1a212e;
  --color-bezel: #273142;
  --color-bezel-bright: #3b4963;

  --color-text: #f2efe9;
  --color-text-muted: #98a3b8;
  --color-text-faint: #657086;

  --color-cyan: #10d0dc;
  --color-rtc-red: #e52531;
  --color-purple: #b84dff;
  --color-green: #1fe066;
  --color-amber: #f7b21b;

  --chamfer-sm: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  --chamfer-md: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  background: var(--color-bg);
}

/* ==========================================================================
   TOP PIT-WALL TELEMETRY BAR
   ========================================================================== */
.hud-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  padding-top: calc(6px + 20px);
  background: var(--color-chassis);
  border-bottom: 2px solid var(--color-bezel);
  z-index: 25;
}

@media (min-width: 760px) {
  .hud-header {
    padding-top: 6px;
    padding-left: 232px; /* generous breathing room after top-left FPS debug counter */
  }
}

.hud-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pos-pill {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  padding: 3px 10px;
  background: var(--color-rtc-red);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  clip-path: var(--chamfer-sm);
  font-variant-numeric: tabular-nums lining-nums;
}

.pos-pill.p1 {
  background: var(--color-purple);
}

.pos-total {
  font-size: var(--text-xs);
  opacity: 0.9;
  margin-left: 1px;
}

.chrono-block {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
  white-space: nowrap;
}

.lap-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lap-clock {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.beat-banner {
  justify-self: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 12px;
  background: var(--color-module);
  border-left: 3px solid var(--color-cyan);
  border-top: 1px solid var(--color-bezel);
  border-right: 1px solid var(--color-bezel);
  border-bottom: 1px solid var(--color-bezel);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.beat-banner.tone-purple {
  border-left-color: var(--color-purple);
  background: #231438;
  color: #f3e6ff;
}

.beat-banner.tone-green {
  border-left-color: var(--color-green);
  background: #102a1c;
  color: #d7ffe7;
}

.beat-banner.tone-amber {
  border-left-color: var(--color-amber);
  background: #2c210e;
  color: #ffefc4;
}

.beat-banner.tone-red {
  border-left-color: var(--color-rtc-red);
  background: #2c1216;
  color: #ffdce0;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hw-cap-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 9px;
  background: var(--color-module);
  border: 1px solid var(--color-bezel-bright);
  clip-path: var(--chamfer-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hw-cap-btn:hover {
  background: var(--color-module-hi);
  border-color: var(--color-cyan);
}

.rtc-cap {
  border-color: #8f2630;
  background: #221116;
}

.cap-led, .hw-led, .pit-led {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #3d4656;
}

.cyan-led { background: var(--color-cyan); }
.green-led { background: var(--color-green); }
.red-led { background: var(--color-rtc-red); }
.violet-led { background: var(--color-purple); }
.led-off { background: #313846 !important; }

@media (max-width: 660px) {
  .hud-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 4px;
    padding-top: calc(4px + 19px);
    padding-bottom: 5px;
  }
  .hud-left { grid-column: 1; grid-row: 1; }
  .hud-actions { grid-column: 2; grid-row: 1; }
  .beat-banner {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    text-align: center;
  }
}

/* ==========================================================================
   STAGE & OVERLAY CARDS (START, PIT BOX, RTC / EXPORT)
   ========================================================================== */
.stage-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  overflow: hidden;
  background: #0d1612;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.overlay-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  background: rgba(7, 9, 13, 0.80);
}

.sheet-card {
  width: 100%;
  max-width: 540px;
  max-height: 100%;
  overflow-y: auto;
  padding: var(--space-3);
  background: var(--color-chassis);
  border: 2px solid var(--color-bezel-bright);
  border-top: 4px solid var(--color-rtc-red);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wide-card {
  max-width: 680px;
}

.pit-card {
  border-top-color: var(--color-amber);
  gap: 5px;
  padding: 8px 10px;
}

.sheet-head-row, .drawer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.eyebrow-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-cyan);
}

.sheet-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.05;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.1;
}

.crew-mini-badge, .pit-timer-pill {
  padding: 4px 8px;
  background: #1b2230;
  border: 1px solid var(--color-amber);
  color: var(--color-amber);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  white-space: nowrap;
}

.sheet-sub {
  font-size: var(--text-xs);
  line-height: 1.38;
  color: var(--color-text-muted);
}

/* Sub-Tabs */
.tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #090b0f;
  padding: 3px;
  border: 1px solid var(--color-bezel);
}

.tab-btn {
  min-height: 30px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  background: transparent;
}

.tab-btn.active {
  background: var(--color-module-hi);
  color: var(--color-cyan);
  border-bottom: 2px solid var(--color-cyan);
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cfg-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.seg-btn {
  flex: 1 1 auto;
  min-height: 32px;
  padding: 4px 8px;
  background: var(--color-module);
  border: 1px solid var(--color-bezel);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.seg-btn.active,
.seg-btn[aria-pressed="true"] {
  background: #122d34;
  border-color: var(--color-cyan);
  color: #e6fcff;
}

/* 3-Slider Setup Hardware Stack */
.sliders-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--color-module);
  border: 1px solid var(--color-bezel);
}

.compact-sliders {
  gap: 6px;
  padding: 6px 8px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-cyan);
}

.hw-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: #090c11;
  border: 1px solid var(--color-bezel-bright);
  padding: 0 3px;
}

.hw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 14px;
  background: var(--color-cyan);
  border: 1px solid #ffffff;
  cursor: pointer;
}

.hw-slider::-moz-range-thumb {
  width: 22px;
  height: 14px;
  background: var(--color-cyan);
  border: 1px solid #ffffff;
  border-radius: 0;
  cursor: pointer;
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.handling-tip-box {
  padding: 6px 10px;
  background: #131c26;
  border-left: 3px solid var(--color-cyan);
  border-top: 1px solid var(--color-bezel);
  border-right: 1px solid var(--color-bezel);
  border-bottom: 1px solid var(--color-bezel);
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--color-text);
}

.handling-tip-box.warn-oversteer {
  border-left-color: var(--color-rtc-red);
  background: #251217;
}

.handling-tip-box.warn-understeer {
  border-left-color: var(--color-amber);
  background: #251d10;
}

/* Pit Crew XP & Diagnosis */
.crew-xp-strip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: #0e131b;
  border: 1px solid var(--color-bezel);
}

.crew-xp-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.xp-track {
  width: 100%;
  height: 6px;
  background: #07090d;
  border: 1px solid var(--color-bezel);
}

.xp-fill {
  height: 100%;
  width: 15%;
  background: var(--color-green);
}

.crew-diag-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #1b1710;
  border: 1px solid #6b5019;
}

.diag-text {
  font-size: var(--text-xs);
  line-height: 1.32;
  color: #ffe9b8;
}

/* CTAs */
.cta-row {
  display: flex;
  gap: var(--space-2);
}

.primary-cta {
  flex: 1.4;
  min-height: 40px;
  padding: 6px 12px;
  background: var(--color-rtc-red);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  clip-path: var(--chamfer-sm);
}

.pit-release-cta {
  background: var(--color-green);
  color: #07120b;
}

.secondary-cta {
  flex: 1;
  min-height: 40px;
  padding: 6px 10px;
  background: var(--color-module);
  border: 1px solid var(--color-bezel-bright);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-xs);
}

/* Split Table & Export Box */
.player-split-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--color-module);
  padding: 6px 8px;
  border: 1px solid var(--color-bezel);
}

.split-cell {
  display: flex;
  flex-direction: column;
}

.sc-lbl {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.sc-val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-bezel);
}

.rtc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums lining-nums;
}

.rtc-table th, .rtc-table td {
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid #1b2230;
  white-space: nowrap;
}

.rtc-table th {
  background: var(--color-module);
  color: var(--color-text-muted);
}

.div-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  vertical-align: middle;
}

.ledger-box {
  background: var(--color-module);
  border: 1px solid var(--color-bezel);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.export-btn-pair {
  display: flex;
  gap: 6px;
}

.mini-action-btn {
  padding: 4px 9px;
  background: #122d34;
  border: 1px solid var(--color-cyan);
  color: #dcfeff;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.download-btn {
  background: #231638;
  border-color: var(--color-purple);
  color: #f3e4ff;
}

.ledger-list {
  max-height: 76px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.export-textarea {
  width: 100%;
  background: #080a0e;
  border: 1px solid var(--color-bezel-bright);
  color: #d7ffe7;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
  padding: 6px;
  resize: none;
  user-select: text;
  -webkit-user-select: text;
}

/* ==========================================================================
   PERMANENT F1 CARBON & MoTeC COCKPIT CONSOLE (Phone, Tablet 978px, Desktop)
   ========================================================================== */
.cockpit-console {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  grid-template-areas:
    "pod pod"
    "yoke pedals";
  gap: 6px;
  padding: 6px 8px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  background: var(--color-chassis);
  border-top: 2px solid var(--color-bezel-bright);
  z-index: 25;
  touch-action: none;
}

/* Tablet Landscape (incl. 978x706) & Desktop: Sleek Single-Row 3-Bay Cockpit Yoke */
@media (min-width: 720px) {
  .cockpit-console {
    grid-template-columns: 1.05fr 1.32fr 1.05fr;
    grid-template-areas: "yoke pod pedals";
    align-items: stretch;
    gap: 8px;
    padding: 7px 12px;
  }
}

/* --- Center Bay: MoTeC Telemetry + Weight-Bias Rocker + Pit Latch --- */
.telemetry-pod {
  grid-area: pod;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 8px;
  background: #090c11;
  border: 1px solid var(--color-bezel-bright);
  clip-path: var(--chamfer-sm);
}

.rpm-led-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  height: 5px;
}

.rpm-led {
  background: #1b212d;
  height: 100%;
}

.rpm-led.lit[data-band="g"] { background: var(--color-green); }
.rpm-led.lit[data-band="r"] { background: var(--color-rtc-red); }
.rpm-led.lit[data-band="p"] { background: var(--color-purple); }

.pod-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.motec-cluster {
  display: flex;
  align-items: center;
  gap: 5px;
}

.speed-num {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
}

.speed-unit {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-right: 2px;
}

.gear-window {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  background: #171d29;
  border: 1px solid var(--color-amber);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-amber);
}

.tyre-chip, .aero-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--color-module);
  border: 1px solid var(--color-bezel);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.tyre-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-amber);
}

.aero-chip.x-open {
  background: #0f2b1c;
  border-color: var(--color-green);
  color: var(--color-green);
}

@media (max-width: 430px) {
  .aero-chip {
    display: none; /* keep 375px pod 1-row clean without squeezing Bias/Box buttons */
  }
}

.trim-pit-cluster {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bias-rocker {
  display: inline-flex;
  align-items: center;
  background: var(--color-module);
  border: 1px solid var(--color-bezel-bright);
}

.trim-step-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  background: #1b2332;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-cyan);
}

.trim-step-btn:hover, .trim-step-btn:active {
  background: var(--color-cyan);
  color: #071014;
}

.bias-display {
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.pit-latch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  background: #231b0e;
  border: 1px solid #8a6418;
  color: var(--color-amber);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pit-latch-btn.armed {
  background: var(--color-amber);
  border-color: #ffffff;
  color: #0c0904;
}

.pit-latch-btn.armed .pit-led {
  background: #0c0904;
}

/* --- Left Bay: Machined Carbon Steering Yoke / Rack --- */
.yoke-module {
  grid-area: yoke;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #0b0e14;
  border: 1px solid var(--color-bezel-bright);
  padding: 4px;
  clip-path: var(--chamfer-md);
  touch-action: none;
}

.rack-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  height: 13px;
  align-items: center;
  background: #07090d;
  border-bottom: 1px solid var(--color-bezel);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
}

.steer-needle {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: var(--color-cyan);
}

.yoke-paddles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  flex: 1;
}

/* --- Right Bay: Carbon Brake Pedal + 10-Cell MGU-K Trigger --- */
.pedal-module {
  grid-area: pedals;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 6px;
}

.hw-paddle {
  position: relative;
  min-height: 62px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-module);
  border: 1px solid var(--color-bezel-bright);
  border-top: 2px solid #495a78;
  clip-path: var(--chamfer-sm);
  touch-action: none;
  overflow: hidden;
}

.steer-unit {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #121822;
}

.steer-unit.pressed {
  background: #102d36;
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.hw-glyph {
  width: 24px;
  height: 18px;
  color: var(--color-cyan);
  flex-shrink: 0;
}

.hw-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

/* Carbon Brake Unit */
.brake-unit {
  background: #1b1114;
  border-color: #6e262f;
  border-top-color: #b53845;
}

.brake-unit.pressed {
  background: #4a141c;
  border-color: #ff6b78;
}

.brake-pressure-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4px;
  height: 100%;
  background: var(--color-rtc-red);
  transform-origin: bottom;
  transform: scaleY(0);
}

.pedal-top-line {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  z-index: 2;
}

.hw-code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.hw-main-lbl {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-align: left;
  z-index: 2;
}

.hw-main-lbl small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #dcb8ff;
  font-weight: 700;
}

.pedal-tread {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  height: 5px;
  z-index: 2;
}

.pedal-tread span {
  background: #422026;
  border-top: 1px solid #783540;
}

.brake-unit.pressed .pedal-tread span {
  background: #ff4d5b;
}

/* MGU-K 10-Cell Boost Unit */
.boost-unit {
  background: #161326;
  border-color: #5b3b8c;
  border-top-color: #9e63ff;
}

.boost-unit.ready {
  border-color: var(--color-purple);
}

.boost-unit.pressed {
  background: #331b59;
  border-color: #10d0dc;
}

.ers-cell-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  width: 100%;
  height: 7px;
  z-index: 2;
}

.ers-cell-grid i {
  display: block;
  background: #241e38;
  border: 1px solid #3c315c;
}

.ers-cell-grid i.charged {
  background: var(--color-purple);
  border-color: #dfafff;
}

.ers-cell-grid i.deploying {
  background: var(--color-cyan);
  border-color: #ffffff;
}

@media (max-height: 540px) {
  .hw-paddle {
    min-height: 48px;
    padding: 4px 6px;
  }
}
