:root {
   --bg: #0a0b0d;
   --panel: #14161a;
   --panel-edge: #24272e;
   --text: #e8eaee;
   --text-dim: #8b919c;
   --amber: #ffb02e;
   --red: #ff3b30;
   --drive: #e2412a;
   --drive-hot: #ff5a3d;
}

* { box-sizing: border-box; }

html, body {
   margin: 0;
   padding: 0;
   background: var(--bg);
   color: var(--text);
   font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   -webkit-font-smoothing: antialiased;
}

body {
   min-height: 100vh;
   display: flex;
   justify-content: center;
   background:
      radial-gradient(1100px 620px at 50% -12%, #1b1f27 0%, transparent 62%),
      var(--bg);
}

.shell {
   width: 100%;
   max-width: 560px;
   padding: 32px 20px 48px;
   display: flex;
   flex-direction: column;
   gap: 26px;
}

/* ---------- masthead ---------- */

.masthead { text-align: center; }

.masthead h1 {
   margin: 0;
   font-size: 40px;
   letter-spacing: 0.22em;
   font-weight: 800;
   background: linear-gradient(180deg, #fff 0%, #98a0ad 100%);
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
}

.tagline {
   margin: 8px 0 0;
   font-size: 12px;
   letter-spacing: 0.09em;
   text-transform: uppercase;
   color: var(--text-dim);
}

/* ---------- instrument cluster ---------- */

.cluster {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 22px;
}

.gauge-wrap {
   position: relative;
   width: 260px;
   height: 260px;
}

.gauge { width: 100%; height: 100%; display: block; }

.dial-rim { fill: #16181d; stroke: #2c3038; stroke-width: 2; }

.ticks-major line { stroke: #cfd4dd; stroke-width: 3; stroke-linecap: round; }
.ticks-minor line { stroke: #5c626d; stroke-width: 2; stroke-linecap: round; }

.tick-labels text {
   fill: #cfd4dd;
   font-size: 17px;
   font-weight: 700;
   text-anchor: middle;
   font-variant-numeric: tabular-nums;
}

.dial-unit {
   fill: var(--text-dim);
   font-size: 9px;
   letter-spacing: 0.16em;
   text-anchor: middle;
   text-transform: uppercase;
}

.redzone {
   fill: none;
   stroke: var(--red);
   stroke-width: 7;
   stroke-linecap: round;
   opacity: 0.75;
   transition: opacity 90ms linear;
}

.redzone.hot { opacity: 1; filter: drop-shadow(0 0 7px rgba(255, 59, 48, 0.85)); }

.needle {
   fill: var(--amber);
   filter: drop-shadow(0 0 5px rgba(255, 176, 46, 0.55));
}

.needle-hub { fill: #2a2e36; stroke: #464c57; stroke-width: 2; }

.shift-light {
   position: absolute;
   left: 50%;
   top: 24px;
   width: 42px;
   height: 5px;
   margin-left: -21px;
   border-radius: 3px;
   background: #33373f;
   transition: background 60ms linear, box-shadow 60ms linear;
}

.shift-light.lit {
   background: var(--red);
   box-shadow: 0 0 14px 2px rgba(255, 59, 48, 0.9);
}

/* ---------- readouts ---------- */

.readouts {
   width: 100%;
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 10px;
}

.readout {
   background: var(--panel);
   border: 1px solid var(--panel-edge);
   border-radius: 12px;
   padding: 11px 13px;
   display: flex;
   flex-direction: column;
   gap: 5px;
}

.readout-state { grid-column: 1 / -1; }

.readout-label {
   font-size: 10px;
   letter-spacing: 0.13em;
   text-transform: uppercase;
   color: var(--text-dim);
}

.readout-value {
   font-size: 25px;
   font-weight: 700;
   line-height: 1;
   font-variant-numeric: tabular-nums;
}

.readout-value em {
   font-style: normal;
   font-size: 11px;
   font-weight: 500;
   color: var(--text-dim);
   margin-left: 5px;
}

.readout-value-sm { font-size: 15px; font-weight: 600; }

.readout-gear .readout-value { color: var(--amber); }

/* ---------- controls ---------- */

.controls { display: flex; flex-direction: column; gap: 12px; }

.btn {
   font: inherit;
   color: var(--text);
   border: 1px solid var(--panel-edge);
   background: var(--panel);
   border-radius: 16px;
   cursor: pointer;
   user-select: none;
   -webkit-user-select: none;
   -webkit-tap-highlight-color: transparent;
   touch-action: none;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 4px;
   transition: transform 70ms ease, filter 70ms ease, box-shadow 70ms ease;
}

.btn:active { transform: translateY(1px); }

.btn-drive {
   height: 128px;
   border: none;
   background: linear-gradient(180deg, var(--drive-hot) 0%, var(--drive) 100%);
   box-shadow: 0 10px 26px rgba(226, 65, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-drive.active {
   filter: brightness(1.16);
   box-shadow: 0 0 42px rgba(255, 90, 61, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
   transform: translateY(2px);
}

.btn-title { font-size: 30px; font-weight: 800; letter-spacing: 0.16em; }
.btn-title-sm { font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }

.btn-sub {
   font-size: 10.5px;
   letter-spacing: 0.11em;
   text-transform: uppercase;
   opacity: 0.72;
}

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-secondary { height: 68px; font-size: 17px; font-weight: 600; }

.btn-secondary:hover:not(:disabled) { border-color: #3a3f49; }

.btn-secondary.active {
   border-color: var(--amber);
   color: var(--amber);
   box-shadow: 0 0 20px rgba(255, 176, 46, 0.22);
}

.btn-secondary:disabled {
   opacity: 0.38;
   cursor: not-allowed;
}

.hint {
   margin: 0;
   text-align: center;
   font-size: 12.5px;
   color: var(--text-dim);
   min-height: 17px;
}

/* ---------- mixer ---------- */

.mixer {
   display: flex;
   align-items: center;
   gap: 12px;
   font-size: 12px;
   color: var(--text-dim);
}

.mixer label {
   letter-spacing: 0.1em;
   text-transform: uppercase;
   font-size: 10px;
}

.mixer input[type="range"] {
   flex: 1;
   accent-color: var(--amber);
}

.mixer span {
   font-variant-numeric: tabular-nums;
   min-width: 38px;
   text-align: right;
}

/* ---------- colophon ---------- */

.colophon {
   border-top: 1px solid var(--panel-edge);
   padding-top: 16px;
}

.colophon p {
   margin: 0;
   font-size: 11px;
   line-height: 1.55;
   color: #666c77;
   text-align: center;
}

.colophon a { color: #8b919c; }

@media (max-width: 420px) {
   .gauge-wrap { width: 230px; height: 230px; }
   .masthead h1 { font-size: 33px; }
   .readout-value { font-size: 22px; }
}
