@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,500;0,600;0,700;0,800;1,800&family=Share+Tech+Mono&display=swap');

/* Redline cockpit dashboard — carbon fibre, brushed aluminium, chrome bezels, glass. */

.rl-dash {
  --cw: 78px; --ch: 114px;
  --red: #ff2d1f; --amber: #ffb02e; --lcd: #ffb02e; --lcd-dim: rgba(255, 176, 46, .07);
  --ink: #e9ecef; --mute: #8f98a3;
  --heat: 0;
  --f-cond: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-mono: 'Share Tech Mono', ui-monospace, monospace;

  position: relative;
  box-sizing: border-box;
  height: 262px;
  padding: 14px 12px 10px;
  display: grid;
  grid-template-columns: 178px 226px minmax(0, 1fr) 122px 232px;
  grid-template-areas: 'heat speedo hand shift ctrl';
  gap: 10px;
  color: var(--ink);
  font-family: var(--f-cond);
  user-select: none;
  -webkit-user-select: none;
  /* carbon fibre weave */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, .35)),
    radial-gradient(120% 140% at 50% -20%, rgba(255, 255, 255, .08), transparent 60%),
    linear-gradient(27deg, #121314 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, #121314 5px, transparent 5px) 10px 0,
    linear-gradient(27deg, #202225 5px, transparent 5px) 0 10px,
    linear-gradient(207deg, #202225 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, #191a1c 10px, transparent 10px),
    linear-gradient(#1b1c1e 25%, #17181a 25%, #17181a 50%, transparent 50%, transparent 75%, #232528 75%, #232528);
  background-color: #111213;
  background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
  box-shadow: inset 0 10px 18px -8px rgba(0, 0, 0, .9), inset 0 -2px 0 rgba(255, 255, 255, .04);
}
.rl-dash *, .rl-dash *::before, .rl-dash *::after { box-sizing: border-box; }
.rl-dash button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

/* chrome trim along the top edge */
.rl-dash .rl-trim {
  position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(180deg, #f2f4f6, #8a929b 45%, #3a3f45 55%, #b9c0c7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .7);
}
.rl-dash .rl-trim::after {
  content: ''; position: absolute; left: 50%; top: 5px; width: 220px; height: 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: .7;
  filter: blur(.5px);
}

/* ---------- brushed aluminium plates ---------- */
.rl-dash .plate {
  position: relative; min-width: 0; border-radius: 12px; padding: 18px 12px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 35%, rgba(0, 0, 0, .28)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 11px),
    linear-gradient(90deg, #353a41, #4b5159 22%, #3a3f46 48%, #535a62 76%, #363b42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .6),
    inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(0, 0, 0, .3),
    0 0 0 1px #07080a, 0 0 0 2px rgba(255, 255, 255, .05), 0 8px 16px rgba(0, 0, 0, .65);
}
.rl-dash .cap {
  position: absolute; left: 0; right: 0; top: 4px; text-align: center;
  font: 700 10.5px/1 var(--f-cond); letter-spacing: 3px; color: #c3c9d0;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .12);
}
.rl-dash .screw {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f6f8, #9aa1a9 45%, #3b4046 85%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 1px 1px rgba(255, 255, 255, .25), inset 0 -1px 1px rgba(0, 0, 0, .5);
}
.rl-dash .screw::after {
  content: ''; position: absolute; left: 1px; right: 1px; top: 3.6px; height: 1.6px; border-radius: 1px;
  background: rgba(20, 22, 25, .85); transform: rotate(var(--r)); box-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}
.rl-dash .screw.tl { left: 6px; top: 6px; } .rl-dash .screw.tr { right: 6px; top: 6px; }
.rl-dash .screw.bl { left: 6px; bottom: 6px; } .rl-dash .screw.br { right: 6px; bottom: 6px; }

/* ---------- LCD strips ---------- */
.rl-dash .lcd {
  position: relative; border-radius: 5px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1d1a12, #0a0906 70%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .18);
  color: var(--lcd); font-family: var(--f-mono);
  text-shadow: 0 0 6px rgba(255, 176, 46, .55);
}
.rl-dash .lcd::after { /* glass sheen */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 40%, transparent 41%);
}
.rl-dash .lcdseg .on { fill: var(--lcd); filter: drop-shadow(0 0 2px rgba(255, 176, 46, .8)); }
.rl-dash .lcdseg .off { fill: var(--lcd-dim); }

/* ---------- heat panel ---------- */
.rl-dash .heat-panel { grid-area: heat; padding: 18px 8px 10px 6px; }
.rl-dash .heat-body { display: flex; height: 100%; gap: 2px; }
.rl-dash .thermo { flex: 0 0 46px; display: flex; align-items: center; }
.rl-dash .thermo-svg { width: 46px; height: 100%; max-height: 222px; overflow: visible; }
.rl-dash .thermo-ticks line { stroke: #cfd5db; stroke-width: 1.2; }
.rl-dash .thermo-ticks text { fill: #dfe4e9; font: 700 11.5px var(--f-cond); }
.rl-dash .merc, .rl-dash .merc-ghost, .rl-dash .merc-ghost2 { transition: y .5s cubic-bezier(.3, 1.2, .5, 1), height .5s cubic-bezier(.3, 1.2, .5, 1); }
.rl-dash .merc { filter: drop-shadow(0 0 3px rgba(255, 60, 20, .9)); }
.rl-dash .merc-ghost { animation: rl-blink 1.1s ease-in-out infinite; }
.rl-dash .heat-right { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
/* ---- engine fx: pure CSS, driven by --heat (0..1) set on .engine by src/engine-fx.js ----
   The frame never moves: only .fx-engine (the engine picture) shakes. Sizes use cqw so it scales with the box. */
@property --heat { syntax: '<number>'; inherits: true; initial-value: 0; }
.rl-dash .engine {
  --heat: 0;
  position: relative; overflow: hidden; border-radius: 8px; background: #0a1220;
  width: 100%; flex: none; aspect-ratio: 148 / 128;     /* never squashed by the flex column */
  container-type: size; isolation: isolate;
  transition: --heat .9s ease-out;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .95), 0 1px 0 rgba(255, 255, 255, .15);
}
.rl-dash .engine i, .rl-dash .engine b { position: absolute; display: block; pointer-events: none; }
.rl-dash .fx-bg, .rl-dash .fx-front, .rl-dash .fx-engine { position: absolute; inset: 0; }
.rl-dash .fx-front { pointer-events: none; }

/* background colour: cold blue-steel -> deep red -> molten orange, cross-faded by heat */
.rl-dash .fx-bg { background: radial-gradient(ellipse at 50% 61%, #1b3350, #0a1220 80%); } /* cold engine: bluish steel */
.rl-dash .b-warm { inset: 0; background: radial-gradient(ellipse at 50% 61%, #3a0a02, #1a0200 85%); opacity: clamp(0, calc(var(--heat) * 2), 1); }
.rl-dash .b-hot { inset: 0; background: radial-gradient(ellipse at 50% 61%, #ffb21f, #b02a05 40%, #3a0600 85%); opacity: clamp(0, calc((var(--heat) - .45) * 1.9), 1); }
/* heat haze: wavy bands that sway */
.rl-dash .haze {
  inset: -10% -10%; opacity: clamp(0, calc((var(--heat) - .1) * .5), .22);
  background: repeating-linear-gradient(0deg, transparent 0 6cqw, rgba(255, 150, 70, .55) 6cqw 6.8cqw);
  animation: rl-haze 1.8s ease-in-out infinite alternate;
}
@keyframes rl-haze { from { transform: translate(-3cqw, 0) skewX(-7deg); background-position-y: 0; } to { transform: translate(3cqw, -3cqw) skewX(7deg); background-position-y: 6cqw; } }
/* anime focus lines: two layers, the second "shot on twos" (stepped) */
.rl-dash .rays {
  left: calc(50% - 110cqw); top: calc(61% - 110cqw); width: 220cqw; height: 220cqw; mix-blend-mode: screen;
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(34cqw - var(--heat) * 16cqw), #000 calc(54cqw - var(--heat) * 14cqw), #000 98cqw, transparent 110cqw);
          mask: radial-gradient(circle closest-side, transparent calc(34cqw - var(--heat) * 16cqw), #000 calc(54cqw - var(--heat) * 14cqw), #000 98cqw, transparent 110cqw);
}
.rl-dash .r1 {
  opacity: clamp(0, calc((var(--heat) - .15) * 2.2), .85);
  background: repeating-conic-gradient(from 3deg, rgba(255, 150, 60, .85) 0 1.1deg, transparent 1.1deg 8deg);
  animation: rl-spin 28s linear infinite;
}
.rl-dash .r2 {
  opacity: clamp(0, calc((var(--heat) - .5) * 2.4), .9);
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 150, .9) 0 1.6deg, transparent 1.6deg 4.5deg);
  animation: rl-twos .6s steps(1) infinite;
}
@keyframes rl-spin { to { transform: rotate(360deg); } }
@keyframes rl-twos {
  0% { transform: rotate(0deg) scale(1); } 17% { transform: rotate(7deg) scale(1.08); } 33% { transform: rotate(-5deg) scale(.95); }
  50% { transform: rotate(11deg) scale(1.12); } 67% { transform: rotate(-9deg) scale(1); } 83% { transform: rotate(4deg) scale(1.05); }
}
/* shockwave rings */
.rl-dash .ring {
  --ro: clamp(0, calc((var(--heat) - .28) * 3), .8);
  left: 50%; top: 61%; width: 60cqw; height: 52cqw; border-radius: 50%; opacity: 0; mix-blend-mode: screen;
  border: calc(.4cqw + var(--heat) * 1.8cqw) solid #ff8a2a;
  animation: rl-ring 1.4s ease-out infinite; animation-delay: calc(var(--i) * -.47s);
}
@keyframes rl-ring { from { transform: translate(-50%, -50%) scale(.3); opacity: var(--ro); } to { transform: translate(-50%, -50%) scale(1.9); opacity: 0; } }
/* pulsing glow + white-hot core, halftone, vignette */
.rl-dash .glow {
  left: 50%; top: 61%; width: calc(45cqw + var(--heat) * 80cqw); aspect-ratio: 1.2; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 130, 50, .95), rgba(255, 50, 10, .4) 55%, transparent);
  opacity: clamp(0, calc((var(--heat) - .05) * 1.4), 1); animation: rl-pulse .7s ease-in-out infinite alternate;
}
.rl-dash .core {
  left: 50%; top: 61%; width: 52cqw; aspect-ratio: 1.2; translate: -50% -50%; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(closest-side, #fff6c8, rgba(255, 200, 90, .5) 55%, transparent);
  opacity: clamp(0, calc((var(--heat) - .8) * 5), .9); animation: rl-pulse .35s ease-in-out infinite alternate;
}
@keyframes rl-pulse { from { transform: scale(.93); } to { transform: scale(1.08); } }
.rl-dash .dots {
  inset: 0; opacity: clamp(0, calc((var(--heat) - .3) * 1.1), .6);
  background: radial-gradient(circle, rgba(0, 0, 0, .75) 0 .9cqw, transparent 1.3cqw) 0 0 / 3.4cqw 3.4cqw;
  -webkit-mask: radial-gradient(ellipse at 50% 61%, transparent 38%, #000 85%); mask: radial-gradient(ellipse at 50% 61%, transparent 38%, #000 85%);
  animation: rl-dotdrift 1.2s steps(2) infinite;
}
@keyframes rl-dotdrift { to { background-position: 1.7cqw 1.7cqw; } }
.rl-dash .vig { inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 52%, rgba(0, 0, 0, .8)); }

/* engine picture: crossfaded states, proportions locked; this is the only thing that shakes */
.rl-dash .fx-engine {
  /* shake grows continuously with the heat outside the engine: a faint tremor when slightly warm, violent when near meltdown */
  --k: clamp(var(--strain, 0), calc(var(--heat) * .55 + var(--heat) * var(--heat) * .7), 1); --a: calc(var(--k) * 4.2cqw);
  animation: rl-engine-shake calc(.34s - var(--heat) * .18s) steps(1) infinite, rl-breath .55s ease-in-out infinite alternate;
}
/* own name: a second @keyframes rl-shake (cards, fixed amplitude) used to override this one, so the engine shook even at zero heat */
@keyframes rl-engine-shake {
  0% { transform: translate(calc(var(--a) * .8), calc(var(--a) * -.5)) rotate(calc(var(--k) * .5deg)); }
  20% { transform: translate(calc(var(--a) * -.6), calc(var(--a) * .7)) rotate(calc(var(--k) * -.4deg)); }
  40% { transform: translate(calc(var(--a) * .4), calc(var(--a) * .9)) rotate(calc(var(--k) * .3deg)); }
  60% { transform: translate(calc(var(--a) * -.9), calc(var(--a) * -.3)) rotate(calc(var(--k) * -.5deg)); }
  80% { transform: translate(calc(var(--a) * .7), calc(var(--a) * .4)) rotate(calc(var(--k) * .2deg)); }
}
@keyframes rl-breath { from { scale: 1; } to { scale: calc(1 + var(--k) * .014); } }
.rl-dash .engine-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .5s; user-select: none; -webkit-user-drag: none; }

/* particles & light (front) */
.rl-dash .em {
  --o: clamp(0, calc((var(--heat) - var(--min)) * 9), .9);
  left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); box-shadow: 0 0 1.4cqw var(--c);
  opacity: 0; mix-blend-mode: screen; animation: rl-rise var(--d) linear infinite; animation-delay: var(--dl);
}
@keyframes rl-rise { from { transform: translate(0, 0); opacity: var(--o); } to { transform: translate(var(--dx), -34cqw); opacity: 0; } }
.rl-dash .sp {
  --o: clamp(0, calc((var(--heat) - var(--min)) * 9), 1);
  left: var(--x); top: var(--y); width: 2.6cqw; height: .7cqw; border-radius: 1cqw; background: #ffeb96; box-shadow: 0 0 1.2cqw #ffb43c;
  opacity: 0; mix-blend-mode: screen; animation: rl-sx var(--d) linear infinite, rl-sy var(--d) infinite; animation-delay: var(--dl), var(--dl);
}
@keyframes rl-sx { from { translate: 0 0; opacity: var(--o); } to { translate: var(--sx) 0; opacity: 0; } }
@keyframes rl-sy { 0% { transform: translateY(0); animation-timing-function: ease-out; } 45% { transform: translateY(var(--up)); animation-timing-function: ease-in; } 100% { transform: translateY(12cqw); } }
.rl-dash .sm {
  left: var(--x); top: 6%; width: 15cqw; aspect-ratio: 1; border-radius: 50%; filter: blur(1.2cqw);
  background: radial-gradient(closest-side, rgba(30, 26, 24, .8), transparent); opacity: 0;
  animation: rl-smoke var(--d) ease-out infinite; animation-delay: var(--dl);
}
@keyframes rl-smoke { from { transform: translate(0, 4cqw) scale(.5); opacity: clamp(0, calc((var(--heat) - .75) * 4), .85); } to { transform: translate(var(--dx), -22cqw) scale(1.8); opacity: 0; } }
.rl-dash .bolts { position: absolute; inset: 0; width: 100%; height: 100%; opacity: clamp(0, calc((var(--heat) - .66) * 5), 1); mix-blend-mode: screen; }
.rl-dash .bolt { opacity: 0; animation: rl-bolt var(--d) steps(1) infinite; animation-delay: var(--dl); }
.rl-dash .b-halo { fill: none; stroke: rgba(255, 120, 40, .45); stroke-width: 4; stroke-linejoin: miter; }
.rl-dash .b-core { fill: none; stroke: #fff6c8; stroke-width: 1.3; stroke-linejoin: miter; }
@keyframes rl-bolt { 0% { opacity: 1; } 7% { opacity: 0; } 12% { opacity: .9; } 17% { opacity: 0; } }
.rl-dash .wash { inset: 0; opacity: clamp(0, calc((var(--heat) - .3) * 1.4), .85); mix-blend-mode: screen; }
.rl-dash .wash b { inset: 0; background: radial-gradient(ellipse 42% 46% at 50% 61%, rgba(255, 150, 60, .6), transparent); animation: rl-flicker .4s steps(1) infinite; }
@keyframes rl-flicker { 0% { opacity: .9; } 20% { opacity: .35; } 40% { opacity: 1; } 55% { opacity: .5; } 75% { opacity: .85; } }
.rl-dash .flare { inset: 0; opacity: clamp(0, calc((var(--heat) - .82) * 5), 1); mix-blend-mode: screen; }
.rl-dash .flare b { left: 50%; top: 61%; width: 130cqw; height: 7cqw; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 246, 200, .95), rgba(255, 160, 60, 0)); animation: rl-flare .6s ease-in-out infinite alternate; }
@keyframes rl-flare { from { transform: scaleX(.7); opacity: .5; } to { transform: scaleX(1.05); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rl-dash .engine *, .rl-dash .engine { animation: none !important; transition: none !important; } }
.rl-dash .heat-lcd { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 3px 4px 4px; font-size: 11px; }
.rl-dash .heat-lcd b { font-size: 22px; font-weight: 400; line-height: 1; }
.rl-dash .heat-note { text-align: center; font: 600 11px/1.1 var(--f-cond); letter-spacing: .6px; color: #c7cdd4; text-transform: uppercase; min-height: 12px; }

/* ---------- speedometer ---------- */
.rl-dash .speedo-panel { grid-area: speedo; display: flex; align-items: center; justify-content: center; padding: 8px; }
.rl-dash .speedo-in { width: 100%; height: 100%; container-type: size; display: grid; place-items: center; }
.rl-dash .bezel {
  width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); border-radius: 50%; padding: 7px;
  background: conic-gradient(from 210deg, #f7f8fa, #7b838c 12%, #e9ecef 26%, #4c535b 40%, #d9dde2 55%, #6d757e 70%, #f2f4f6 85%, #f7f8fa);
  box-shadow: 0 0 0 1px #050607, 0 6px 12px rgba(0, 0, 0, .7), inset 0 0 2px rgba(0, 0, 0, .6);
}
.rl-dash .bezel-in { width: 100%; height: 100%; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 2px #0a0b0c, 0 0 0 1px rgba(255, 255, 255, .4); overflow: hidden; }
.rl-dash .gauge-svg { display: block; width: 100%; height: 100%; }
.rl-dash .g-ticks .tk-maj { stroke: #f3f5f7; stroke-width: 2.4; }
.rl-dash .g-ticks .tk-mid { stroke: #c6ccd3; stroke-width: 1.4; }
.rl-dash .g-ticks .tk-min { stroke: #6f7780; stroke-width: 1; }
.rl-dash .g-ticks .tk-lbl { fill: #eef1f4; font: italic 800 14px var(--f-cond); text-anchor: middle; }
.rl-dash .g-red { fill: none; stroke: rgba(255, 45, 31, .45); stroke-width: 9; }
.rl-dash .g-red-hot { fill: none; stroke: var(--red); stroke-width: 9; filter: drop-shadow(0 0 4px rgba(255, 45, 31, .9)); }
.rl-dash .g-band { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round; opacity: .95; filter: drop-shadow(0 0 4px rgba(255, 176, 46, .9)); }
.rl-dash .g-reach { fill: #fff; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .8)); }
.rl-dash .g-cap { fill: #8f98a3; font: 700 8.5px var(--f-cond); letter-spacing: 2.4px; text-anchor: middle; }
.rl-dash .ro-bg { fill: #0a0906; stroke: rgba(255, 255, 255, .1); }
.rl-dash .g-sub-bg { fill: #0a0906; stroke: rgba(255, 255, 255, .12); }
.rl-dash .g-sub1 { fill: #8f98a3; font: 700 7px var(--f-cond); letter-spacing: 1.8px; text-anchor: middle; }
.rl-dash .g-sub2 { fill: var(--lcd); font: 10px var(--f-mono); text-anchor: middle; filter: drop-shadow(0 0 2px rgba(255, 176, 46, .7)); }

/* ---------- hand tray ---------- */
.rl-dash .hand-panel {
  grid-area: hand; position: relative; min-width: 0; border-radius: 12px; padding: 6px 12px 10px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(100% 120% at 50% 110%, rgba(255, 45, 31, .06), transparent 60%),
    linear-gradient(180deg, #08090a, #141619);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(255, 255, 255, .03);
}
.rl-dash .hand-head { display: flex; align-items: center; gap: 10px; height: 22px; font: 700 11.5px var(--f-cond); letter-spacing: 1.6px; color: var(--mute); white-space: nowrap; }
.rl-dash .lcd-chip { font: 11px var(--f-mono); color: var(--lcd); padding: 2px 6px; border-radius: 3px; background: #0b0a07; box-shadow: inset 0 1px 3px #000, 0 1px 0 rgba(255, 255, 255, .1); text-shadow: 0 0 5px rgba(255, 176, 46, .6); }
.rl-dash .hand-title { overflow: hidden; text-overflow: ellipsis; }
.rl-dash .hand-need { margin-left: auto; color: #d8dde2; }
.rl-dash .spin-tag b { font-weight: 800; }
.rl-dash .spin-tag { display: none; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: 4px; font-size: 11.5px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; }
.rl-dash .spin-tag::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.rl-dash .spin-tag.certain { display: inline-flex; color: #ff5040; background: rgba(255, 40, 20, .12); box-shadow: inset 0 0 0 1px rgba(255, 60, 40, .45); animation: rl-blink .9s ease-in-out infinite; }
.rl-dash .spin-tag.possible { display: inline-flex; color: var(--amber); background: rgba(255, 176, 46, .1); box-shadow: inset 0 0 0 1px rgba(255, 176, 46, .4); }

.rl-dash .hand-row { flex: 1; min-height: 0; display: flex; align-items: flex-end; gap: 8px; }
.rl-dash .hand-row .hand { flex: 1; min-width: 0; }
/* draw / discard pile counters in the engine panel */
.rl-dash .piles { display: flex; gap: 4px; }
.rl-dash .heat-lcd, .rl-dash .heat-note, .rl-dash .piles { flex-shrink: 0; }
.rl-dash .pile { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 3px 4px; border-radius: 5px;
  background: #121417; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .12); }
.rl-dash .pile-stack { position: relative; flex: 0 0 auto; width: 13px; height: 18px; border-radius: 2px;
  background: repeating-linear-gradient(45deg, #8a1a10 0 2px, #5a0d07 2px 4px);
  box-shadow: inset 0 0 0 1px #e9e2d3, 0 1px 2px rgba(0, 0, 0, .7); }
.rl-dash .pile-stack[data-size='mid'] { box-shadow: inset 0 0 0 1px #e9e2d3, 1.5px -1.5px 0 -.5px #cfc6b4, 0 1px 2px rgba(0, 0, 0, .7); }
.rl-dash .pile-stack[data-size='big'] { box-shadow: inset 0 0 0 1px #e9e2d3, 1.5px -1.5px 0 -.5px #cfc6b4, 3px -3px 0 -1px #b8af9c, 0 1px 2px rgba(0, 0, 0, .7); }
.rl-dash .pile-stack[data-size='empty'] { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.rl-dash .pile.disc .pile-stack { background: linear-gradient(#f7f3ea, #ddd5c4); transform: rotate(6deg); }
.rl-dash .pile.disc .pile-stack[data-size='empty'] { background: transparent; transform: none; }
.rl-dash .pile-info { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 3px; }
.rl-dash .pile-info b { font: 700 15px/1 var(--f-mono); color: var(--lcd); text-shadow: 0 0 6px rgba(255, 176, 46, .55); }
.rl-dash .pile-heat { font: 700 9.5px/1 var(--f-mono); color: #ff7b3a; white-space: nowrap; }
.rl-dash .pile-label { grid-column: 1 / -1; order: 3; font: 700 8px/1.1 var(--f-cond); letter-spacing: .8px; text-transform: uppercase; color: var(--mute); }
.rl-dash .hand {
  --cgap: 8px;
  flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 4px 2px; perspective: 900px;
}
.rl-dash .hand-toast {
  position: absolute; left: 50%; bottom: 8px; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  padding: 5px 12px; border-radius: 6px; background: rgba(10, 10, 12, .92); color: #ffd28a; font: 600 13px var(--f-cond); letter-spacing: .4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 176, 46, .3); white-space: nowrap; z-index: 5;
}
.rl-dash .hand-toast.show { animation: rl-toast 2.2s ease forwards; }

/* ---------- cards ---------- */
.rl-dash .card {
  --lift: 0px;
  position: relative; flex: 0 0 auto; width: var(--cw); height: var(--ch); margin: 0 0 0 var(--cgap); padding: 0; border: 0;
  border-radius: 8px; cursor: pointer; overflow: hidden; text-align: center; color: #1b1d21;
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, .85), transparent 45%),
    repeating-radial-gradient(circle at 30% 40%, rgba(110, 90, 60, .035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(35deg, rgba(0, 0, 0, .02) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #fbf8f0, #e9e1cf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(0, 0, 0, .18), 0 2px 3px rgba(0, 0, 0, .55), 0 8px 14px rgba(0, 0, 0, .45);
  transform: translateY(var(--lift)) rotate(calc(var(--i, 0) * 1.2deg));
  transform-origin: 50% 120%;
  transition: transform .24s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s, filter .2s;
}
.rl-dash .card:first-child { margin-left: 0; }
.rl-dash .card::before { /* printed inner frame */
  content: ''; position: absolute; inset: 4px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .14); pointer-events: none;
}
.rl-dash .card::after { /* glossy laminate */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .35), transparent 35%, transparent 70%, rgba(0, 0, 0, .06));
}
.rl-dash .card:not(.locked):hover { --lift: -6px; z-index: 2; }
.rl-dash .card.sel { --lift: -18px; z-index: 3; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 2px #e8f6ff, 0 0 14px 2px rgba(140, 210, 255, .65), 0 16px 22px rgba(0, 0, 0, .6); }
.rl-dash .card:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.rl-dash .card.deal { animation: rl-deal .45s cubic-bezier(.2, 1.2, .4, 1) var(--deal, 0ms) both; }
.rl-dash .card.shake { animation: rl-shake .35s; }

.rl-dash .c-stripe { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--ch) * .2); background: var(--cc, #888);
  background-image: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .22) 0 4px, transparent 4px 10px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.rl-dash .c-big { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%); font: italic 800 calc(var(--ch) * .48)/1 var(--f-cond); color: var(--cc, #333);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 -1px 0 rgba(0, 0, 0, .15); }
.rl-dash .c-idx { position: absolute; font: italic 800 13px/1 var(--f-cond); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .5); }
.rl-dash .c-idx.tl { left: 8px; top: 5px; font-size: calc(var(--ch) * .13); }
.rl-dash .c-idx.br { right: 7px; bottom: 6px; color: var(--cc); text-shadow: none; transform: rotate(180deg); }
.rl-dash .c-lbl { position: absolute; left: 0; right: 0; bottom: 10px; font: 700 calc(var(--ch) * .085)/1 var(--f-cond); letter-spacing: 1.1px; color: #5b5f66; }
.rl-dash .card.v1 { --cc: #2f78c8; } .rl-dash .card.v2 { --cc: #1f9a62; }
.rl-dash .card.v3 { --cc: #e08f0e; } .rl-dash .card.v4 { --cc: #d3281e; }
.rl-dash .card.t-nerv { --cc: #7a47d6; }
.rl-dash .t-nerv .c-big { transform: translateY(-56%); }
.rl-dash .c-range { position: absolute; left: 0; right: 0; bottom: calc(var(--ch) * .22); font: 700 calc(var(--ch) * .1)/1 var(--f-cond); color: var(--cc); letter-spacing: 1px; }

.rl-dash .card.t-heat {
  color: #ffe9c2; cursor: not-allowed;
  background:
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .22) 0 6px, transparent 6px 12px),
    radial-gradient(circle at 50% 45%, #ff7a2a, #c8260c 55%, #6e0d04);
  --lift: 6px;
}
.rl-dash .card.t-heat::before { border-color: rgba(255, 220, 160, .35); }
.rl-dash .card.t-heat .flame { position: absolute; left: 50%; top: 22%; width: 42%; transform: translateX(-50%); filter: drop-shadow(0 0 6px rgba(255, 200, 80, .8)); }
.rl-dash .card.t-heat .c-lbl { color: #ffe1b0; bottom: 10px; }
.rl-dash .c-lock { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #2a2d31;
  background: radial-gradient(circle at 35% 30%, #fff, #a7aeb6 60%, #50565d); box-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.rl-dash .c-lock svg { width: 11px; height: 12px; }
.rl-dash .card.locked:not(.t-heat) { filter: saturate(.35) brightness(.72); cursor: not-allowed; }

/* spin prediction glow on selected cards */
.rl-dash .hand[data-spin='certain'] .card.sel { animation: rl-pulse-red 1s ease-in-out infinite; }
.rl-dash .hand[data-spin='possible'] .card.sel { animation: rl-pulse-amber 1.4s ease-in-out infinite; }

/* discard stamp */
.rl-dash .c-stamp { position: absolute; left: 50%; top: 50%; padding: 2px 4px; border: 2px solid #d3281e; border-radius: 3px; color: #d3281e; opacity: 0;
  font: 800 10px/1 var(--f-cond); letter-spacing: 1px; transform: translate(-50%, -50%) rotate(-18deg) scale(1.6); transition: opacity .15s, transform .2s;
  background: rgba(255, 255, 255, .75); }
.rl-dash .card.to-discard { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 2px #ff4a3a, 0 0 14px 2px rgba(255, 60, 40, .55), 0 16px 22px rgba(0, 0, 0, .6); }
.rl-dash .card.to-discard .c-stamp { opacity: 1; transform: translate(-50%, -50%) rotate(-18deg) scale(1); }

/* ---------- shifter ---------- */
.rl-dash .shifter-panel { grid-area: shift; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 10px 8px; }
.rl-dash .gear-lcd { width: 100%; height: 40px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 6px; }
.rl-dash .gear-seg { height: 30px; width: 23px; }
.rl-dash .gear-ladder { display: flex; gap: 3px; font: 9px/1 var(--f-mono); }
.rl-dash .gear-ladder i { font-style: normal; width: 13px; height: 11px; display: grid; place-items: center; border-radius: 2px; color: rgba(255, 176, 46, .3); text-shadow: none; }
.rl-dash .gear-ladder i.no { color: rgba(255, 176, 46, .08); }
.rl-dash .gear-ladder i.cur { box-shadow: inset 0 0 0 1px rgba(255, 176, 46, .5); color: rgba(255, 176, 46, .7); }
.rl-dash .gear-ladder i.sel { background: var(--lcd); color: #1a1408; box-shadow: 0 0 6px rgba(255, 176, 46, .8); }

.rl-dash .gate { --lv-top: 6px; --lv-bot: 26px; --knob: 34px; position: relative; flex: 1; width: 100%; min-height: 0; touch-action: none; cursor: pointer; }
.rl-dash .shifter-panel.inactive .gate { cursor: default; }
/* y = 0 (4th, top) … 1 (1st, bottom): centre of the knob along the travel */
.rl-dash .gate { --travel: calc(100% - var(--lv-top) - var(--lv-bot) - var(--knob)); }
.rl-dash .gate-slot { position: absolute; top: calc(var(--lv-top) + var(--knob) / 2 - 7px); bottom: calc(var(--lv-bot) - 4px); width: 14px; left: 50%; transform: translateX(-50%); border-radius: 7px;
  background: linear-gradient(90deg, #000, #16181b 50%, #000); box-shadow: inset 0 2px 4px #000, 0 1px 0 rgba(255, 255, 255, .25), 0 -1px 0 rgba(0, 0, 0, .6); }
.rl-dash .detents { position: absolute; inset: 0; pointer-events: none; }
.rl-dash .detents button { pointer-events: auto; position: absolute; left: calc(50% + 20px); width: 34px; height: 28px; padding: 0 0 0 10px; border: 0; background: none; cursor: pointer;
  top: calc(var(--lv-top) + var(--knob) / 2 + var(--y) * (100% - var(--lv-top) - var(--lv-bot) - var(--knob))); transform: translateY(-50%);
  display: flex; align-items: center; font: 700 13px/1 var(--f-mono); color: rgba(255, 176, 46, .45); }
.rl-dash .detents button::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 2px; margin-top: -1px; background: #8d949c; box-shadow: 0 1px 0 #000; }
.rl-dash .detents button.no { color: rgba(255, 176, 46, .28); cursor: not-allowed; }
.rl-dash .detents button.cur b { text-decoration: underline; text-underline-offset: 3px; }
.rl-dash .g-ico { position: absolute; left: -58px; top: 50%; width: 16px; height: 21px; transform: translateY(-50%); font-style: normal; pointer-events: none; }
.rl-dash .g-ico svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rl-dash .g-ico.cold svg { filter: drop-shadow(0 0 3px rgba(95, 200, 255, .55)); }
.rl-dash .g-ico.hot { width: 22px; height: 22px; left: -61px; }
.rl-dash .g-ico.hot svg { filter: drop-shadow(0 0 3px rgba(255, 90, 30, .6)); }
.rl-dash .g-num { position: absolute; right: calc(100% + 2px); top: 50%; transform: translateY(-50%); font: 700 10px/1 var(--f-mono); font-style: normal; white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.rl-dash .g-ico.cold .g-num { color: #8fd8ff; }
.rl-dash .g-ico.hot .g-num { color: #ff8a4a; }
.rl-dash .merc-cool { transition: y .5s cubic-bezier(.3, 1.2, .5, 1), height .5s cubic-bezier(.3, 1.2, .5, 1); animation: rl-blink 1.1s ease-in-out infinite; filter: drop-shadow(0 0 3px rgba(95, 200, 255, .8)); }
.rl-dash .detents button.sel .g-ico.cold svg { filter: drop-shadow(0 0 5px rgba(95, 200, 255, .95)); }
.rl-dash .detents button.sel .g-ico.hot svg { filter: drop-shadow(0 0 5px rgba(255, 90, 30, .95)); animation: rl-blink 1.1s ease-in-out infinite; }
.rl-dash .detents button.sel { color: var(--lcd); text-shadow: 0 0 8px rgba(255, 176, 46, .9); }
.rl-dash .boot { position: absolute; bottom: 2px; left: 50%; width: 56px; height: 26px; transform: translateX(-50%); border-radius: 50% 50% 10px 10px / 70% 70% 10px 10px; z-index: 2;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .45) 0 2px, transparent 2px 6px),
    radial-gradient(80% 100% at 50% 0%, #2c2f33, #0b0c0d);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12); }
.rl-dash .lever { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.rl-dash .shaft, .rl-dash .knob { transition: top .22s cubic-bezier(.3, 1.5, .5, 1); }
.rl-dash .lever.dragging .shaft, .rl-dash .lever.dragging .knob { transition: none; }
.rl-dash .shaft { position: absolute; left: 50%; width: 9px; margin-left: -4.5px; bottom: 10px; border-radius: 4px;
  top: calc(var(--lv-top) + var(--knob) / 2 + var(--y) * (100% - var(--lv-top) - var(--lv-bot) - var(--knob)));
  background: linear-gradient(90deg, #4a5058, #f1f3f5 40%, #8a929b 70%, #2f3338); box-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.rl-dash .knob { pointer-events: auto; position: absolute; left: 50%; width: var(--knob); height: var(--knob); margin-left: calc(var(--knob) / -2); border-radius: 50%; cursor: grab;
  top: calc(var(--lv-top) + var(--y) * (100% - var(--lv-top) - var(--lv-bot) - var(--knob)));
  background: radial-gradient(circle at 34% 28%, #6b7179 0, #2a2d31 38%, #0d0e10 75%);
  box-shadow: 0 7px 10px rgba(0, 0, 0, .8), inset 0 2px 1px rgba(255, 255, 255, .28), inset 0 -4px 7px rgba(0, 0, 0, .9), 0 0 0 1px #000; }
.rl-dash .knob::before { content: ''; position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f3f5f7, #9aa2ab 55%, #4a5058); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); opacity: .85; }
.rl-dash .knob::after { content: 'R'; position: absolute; inset: 0; display: grid; place-items: center; font: 900 12px/1 var(--f-cond); color: #c0261a; letter-spacing: 0; }
.rl-dash .lever.dragging .knob { cursor: grabbing; }
.rl-dash .knob:focus-visible { outline: 2px solid var(--lcd); outline-offset: 3px; }
.rl-dash .lever.clunk-up .knob { animation: rl-clunk-up .28s ease-out; }
.rl-dash .lever.clunk-dn .knob { animation: rl-clunk-dn .28s ease-out; }
.rl-dash .lever.blocked-up .knob { animation: rl-blk-up .3s; }
.rl-dash .lever.blocked-dn .knob { animation: rl-blk-dn .3s; }
.rl-dash .gate-hint { font: 600 9.5px/1 var(--f-cond); letter-spacing: 1px; color: #9aa2ab; text-transform: uppercase; white-space: nowrap; }
.rl-dash .shifter-panel.inactive .knob { filter: brightness(.7); }
.rl-dash .shifter-panel.inactive .knob { cursor: default; }

/* ---------- control panel ---------- */
.rl-dash .ctrl-panel { grid-area: ctrl; display: grid; grid-template-columns: 82px 1fr; grid-template-rows: 1fr auto; gap: 8px; padding: 12px 12px 10px; }
.rl-dash .switches { display: flex; flex-direction: column; gap: 6px; }
.rl-dash .sw-plate { flex: 1; position: relative; border-radius: 7px; padding: 3px 4px; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #1a1c1f, #0e0f11); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .14); }
.rl-dash .sw-cap { font: 700 9px/1 var(--f-cond); letter-spacing: 1.6px; color: #c3c9d0; }
.rl-dash .sw-well { position: relative; flex: 1; width: 100%; display: grid; place-items: center; perspective: 220px; }
.rl-dash .sw-sub { display: flex; align-items: center; gap: 4px; font: 600 9px/1 var(--f-cond); letter-spacing: .5px; color: #8f98a3; text-transform: uppercase; white-space: nowrap; }
.rl-dash .led { width: 6px; height: 6px; border-radius: 50%; background: #3a1a12; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .8); }

/* illuminated push buttons (turbo, adrenaline), three states on the plate's data-state:
   off = unavailable (grey, sunk, no colour) · ready = available (colour unlit, rim glows) · on = activated (lit) */
.rl-dash .lamp { --lamp: #ff4a2a; --lamp-dim: #6a2214; position: relative; width: 40px; height: 40px; border: 0; padding: 0; border-radius: 50%; cursor: pointer;
  font: 900 13px/1 var(--f-cond); letter-spacing: .5px; color: color-mix(in srgb, var(--lamp) 75%, #fff);
  background: radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--lamp-dim) 75%, #fff 25%), var(--lamp-dim) 58%, color-mix(in srgb, var(--lamp-dim) 40%, #000) 100%);
  box-shadow: 0 0 0 3px #0a0b0c, 0 0 0 4px color-mix(in srgb, var(--lamp) 55%, #4a5058), 0 4px 0 1px #050506, 0 6px 8px rgba(0, 0, 0, .7), inset 0 -3px 6px rgba(0, 0, 0, .5);
  transition: transform .08s, box-shadow .15s, background .15s, color .15s; }
.rl-dash [data-state='ready'] .lamp { animation: rl-lamp-ready 2.4s ease-in-out infinite; }
.rl-dash [data-state='ready'] .lamp:hover { filter: brightness(1.2); }
.rl-dash .lamp:active { transform: translateY(2px); }
.rl-dash .lamp:focus-visible { outline: 2px solid var(--lcd); outline-offset: 5px; }
.rl-dash [data-state='on'] .lamp { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, .9);
  background: radial-gradient(circle at 40% 32%, #fff 0, var(--lamp) 38%, color-mix(in srgb, var(--lamp) 60%, #000) 100%);
  box-shadow: 0 0 0 3px #0a0b0c, 0 0 0 4px var(--lamp), 0 4px 0 1px #050506, 0 0 18px 5px color-mix(in srgb, var(--lamp) 70%, transparent), inset 0 -3px 6px rgba(0, 0, 0, .25); }
.rl-dash [data-state='off'] .lamp { cursor: not-allowed; color: #3d4248; transform: translateY(2px);
  background: radial-gradient(circle at 40% 32%, #2a2d31, #17191c 60%, #0c0d0f);
  box-shadow: 0 0 0 3px #0a0b0c, 0 0 0 4px #2a2e33, 0 2px 0 1px #050506, inset 0 2px 5px rgba(0, 0, 0, .8); }
.rl-dash [data-state='off'] .sw-cap, .rl-dash [data-state='off'] .sw-sub { color: #5f666e; }
.rl-dash .turbo[data-state='on'] .sw-sub { color: #ffb4a0; }
.rl-dash .adr[data-state='on'] .sw-sub { color: #ffe08a; }
.rl-dash .turbo.shake, .rl-dash .adr.shake { animation: rl-shake .35s; }
.rl-dash .adr .lamp { --lamp: #ffd23a; --lamp-dim: #5a4a12; }
@keyframes rl-lamp-ready { 0%, 100% { box-shadow: 0 0 0 3px #0a0b0c, 0 0 0 4px color-mix(in srgb, var(--lamp) 55%, #4a5058), 0 4px 0 1px #050506, 0 6px 8px rgba(0, 0, 0, .7), inset 0 -3px 6px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 0 0 3px #0a0b0c, 0 0 0 4px var(--lamp), 0 4px 0 1px #050506, 0 0 8px 1px color-mix(in srgb, var(--lamp) 40%, transparent), inset 0 -3px 6px rgba(0, 0, 0, .5); } }

/* Throttle pedal: the pedal itself is the button. NASCAR-style floor pedal rendered in Blender
   (assets/ui/pedal-{up,down}.png, same crop; source in blender-mcp-labs/pedal-nascar), seen head-on.
   Up = resting; down = floored (plate pitched forward, away from the camera) after a press. */
.rl-dash .go-wrap { display: grid; place-items: center; min-height: 0; }
.rl-dash .go-ring { --pw: 92px; width: var(--pw); height: calc(var(--pw) * 2.1); position: relative; }
.rl-dash .go-ring::after { /* preload the floored frame */
  content: url('../assets/ui/pedal-down.png'); position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; }
.rl-dash .go-ring.shake { animation: rl-shake .35s; }
.rl-dash .go { position: absolute; inset: 0; border: 0; padding: 0; margin: 0; cursor: pointer; background: none; color: inherit;
  display: flex; align-items: flex-end; justify-content: center; transition: filter .2s; -webkit-tap-highlight-color: transparent; }
.rl-dash .go::before { content: ''; position: absolute; inset: 0 0 18px; pointer-events: none;
  background: url('../assets/ui/pedal-up.png') 50% 100% / contain no-repeat; }
.rl-dash .go-ring.ready .go { animation: rl-pedal-glow 1.8s ease-in-out infinite; }
.rl-dash .go-ring.ready.amber .go { --glow: 255, 176, 46; }
.rl-dash .go-ring.ready.danger .go { animation-duration: .7s; }
.rl-dash .go span { position: relative; font: italic 800 9px/1.1 var(--f-cond); letter-spacing: 1.5px; text-align: center; color: #aeb4ba; text-shadow: 0 1px 0 #000; }
.rl-dash[data-mode='discard'] .go span { font-size: 8px; }
.rl-dash .go:hover:not(:disabled) { filter: brightness(1.1); }
.rl-dash .go:active:not(:disabled)::before, .rl-dash .go-ring.down .go::before, .rl-dash .go.pressed::before { background-image: url('../assets/ui/pedal-down.png'); }
.rl-dash .go:disabled { cursor: not-allowed; filter: saturate(.4) brightness(.6); }
.rl-dash .go-ring.down .go:disabled { filter: brightness(.78); }
@keyframes rl-pedal-glow { 0%, 100% { filter: drop-shadow(0 0 3px rgba(var(--glow, 255, 58, 34), .35)); } 50% { filter: drop-shadow(0 0 9px rgba(var(--glow, 255, 58, 34), .85)); } }
.rl-dash .reason { grid-column: 1 / -1; height: 26px; padding: 0 8px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.rl-dash .reason.err { color: #ff6a50; text-shadow: 0 0 6px rgba(255, 80, 50, .6); }
.rl-dash .reason.warn.certain { color: #ff5040; text-shadow: 0 0 6px rgba(255, 60, 40, .8); animation: rl-blink .9s ease-in-out infinite; }
.rl-dash .reason.okay { color: #9bff8a; text-shadow: 0 0 6px rgba(120, 255, 100, .5); }

/* busy / over */
.rl-dash.busy .hand, .rl-dash.busy .switches { pointer-events: none; }
.rl-dash.busy .card { filter: brightness(.75); }
.rl-dash[data-mode='over'] .card { filter: saturate(.3) brightness(.6); }

/* ---------- animations ---------- */
@keyframes rl-pulse-red {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 2px #ff2a1a, 0 0 10px 2px rgba(255, 40, 20, .6), 0 16px 22px rgba(0, 0, 0, .6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 3px #ff4530, 0 0 26px 8px rgba(255, 40, 20, .95), 0 16px 22px rgba(0, 0, 0, .6); }
}
@keyframes rl-pulse-amber {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 2px #ffb02e, 0 0 8px 2px rgba(255, 176, 46, .45), 0 16px 22px rgba(0, 0, 0, .6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 2px #ffc14f, 0 0 20px 6px rgba(255, 176, 46, .85), 0 16px 22px rgba(0, 0, 0, .6); }
}
@keyframes rl-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes rl-ring { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes rl-deal { from { transform: translateY(120px) rotate(-8deg); opacity: 0; } to { transform: translateY(var(--lift)) rotate(calc(var(--i, 0) * 1.2deg)); opacity: 1; } }
@keyframes rl-shake { 0%, 100% { translate: 0; } 20% { translate: -5px; } 40% { translate: 5px; } 60% { translate: -3px; } 80% { translate: 2px; } }
@keyframes rl-clunk-up { 0% { transform: none; } 50% { transform: translateY(-3px) scale(.96); } 100% { transform: none; } }
@keyframes rl-clunk-dn { 0% { transform: none; } 50% { transform: translateY(3px) scale(.96); } 100% { transform: none; } }
@keyframes rl-push { 0% { transform: none; } 40% { transform: translateY(-12px) scale(.94); } 100% { transform: none; } }
@keyframes rl-pull { 0% { transform: none; } 40% { transform: translateY(12px) scale(1.05); } 100% { transform: none; } }
@keyframes rl-blk-up { 0%, 100% { transform: none; } 30% { transform: translateY(-4px); } 60% { transform: translateY(1px); } }
@keyframes rl-blk-dn { 0%, 100% { transform: none; } 30% { transform: translateY(4px); } 60% { transform: translateY(-1px); } }
@keyframes rl-toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -4px); } }

@media (prefers-reduced-motion: reduce) {
  .rl-dash *, .rl-dash *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .rl-dash { --cw: 68px; --ch: 100px; grid-template-columns: 150px 208px minmax(0, 1fr) 108px 214px; gap: 8px; padding: 14px 8px 8px; }
  .rl-dash .gate-hint { display: none; }
  .rl-dash .piles { flex-direction: column; gap: 3px; }
  .rl-dash .pile { padding: 2px 4px; }
  .rl-dash .pile-info { display: flex; align-items: baseline; gap: 4px; }
  .rl-dash .hand-head .more { display: none; }
  .rl-dash[data-mode='plan'] .hand-title { display: none; }
  .rl-dash .go-ring { --pw: 78px; }
  .rl-dash .ctrl-panel { grid-template-columns: 76px 1fr; }
}
@media (max-width: 1100px) {
  .rl-dash { --cw: 62px; --ch: 92px; grid-template-columns: 136px 190px minmax(0, 1fr) 98px 198px; }
  .rl-dash .ctrl-panel { grid-template-columns: 72px 1fr; padding: 12px 8px 8px; }
  .rl-dash .go-ring { --pw: 70px; }
}
@media (max-width: 900px) {
  .rl-dash {
    height: auto; --cw: 58px; --ch: 84px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: 'hand hand' 'speedo heat' 'shift ctrl';
  }
  .rl-dash .hand-panel { height: 150px; }
  .rl-dash .speedo-panel, .rl-dash .heat-panel { height: 250px; }
  .rl-dash .shifter-panel, .rl-dash .ctrl-panel { height: 230px; }
  .rl-dash .spin-tag { max-width: 46vw; }
  .rl-dash .hand-title { display: none; }
}
