:root {
  --ink: #12191b; --paper: #f5f3e9; --muted: #a2aaa5; --line: rgba(233,239,225,.14);
  --orange: #ff8756; --orange-bright: #ffa477; --green: #b6d19e; --red: #ee755e;
  --mono: "Bahnschrift", "DIN Alternate", "Arial Narrow", "SFMono-Regular", monospace;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--ink); color: var(--paper); font-family: var(--font); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--orange-bright); outline-offset: 6px; }
button, .cockpit, .topbar, .intro-control { user-select: none; -webkit-user-select: none; }
button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
#game-container { position: relative; width: 100%; height: 100%; height: 100dvh; overflow: hidden; isolation: isolate; }
#roadCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(16,25,27,.58) 0%,transparent 21%, transparent 61%,rgba(9,16,18,.12) 78%), radial-gradient(ellipse at 55% 48%, transparent 27%,rgba(8,18,18,.24) 100%); }
.scene-vignette::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(12,23,26,.87),rgba(15,25,27,.67) 23%,rgba(17,28,29,.13) 61%, transparent 85%); opacity: 0; transition: opacity .7s; }
[data-mode="ready"] .scene-vignette::after, [data-mode="over"] .scene-vignette::after { opacity: 1; }
.topbar { position: absolute; inset: 0 0 auto; padding: 30px 42px; display: flex; align-items: center; justify-content: space-between; z-index: 25; gap: 25px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--paper); flex-shrink: 0; }
.brand > svg { width: 27px; height: 32px; color: var(--orange); }
.brand-number { font-family: var(--mono); font-size: 29px; letter-spacing: -.7px; font-weight: 600; }
.brand-number > span { color: var(--orange); margin-left: 3px; font-size: 18px; }
.brand-divider { width: 1px; height: 27px; background: var(--line); margin: 0 1px 0 5px; }
.brand-name { font-size: 13px; font-weight: 600; letter-spacing: 2px; line-height: 1.8; }
.brand-name small { display: block; font-family: var(--mono); font-size: 7px; font-weight: 400; letter-spacing: 1.6px; color: #bac2b9; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 8px; border: 1px solid rgba(234,236,218,.18); background: rgba(20,32,31,.28); border-radius: 50%; color: #e7e9dd; transition: background .15s, border-color .15s; }
.icon-button:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.45); }
.icon-button:disabled { opacity: .35; }
.icon-button svg { width: 18px; height: 18px; }
.sound-off { display: none; }
[aria-pressed="true"] .sound-off { display: block; }
[aria-pressed="true"] .sound-waves { display: none; }
.best-record { display: flex; align-items: center; gap: 8px; margin-right: 15px; font-size: 11px; color: #d5d9cb; }
.best-record svg { width: 15px; height: 15px; fill: none; stroke: var(--orange-bright); stroke-width: 1.5; }
.best-record b { color: var(--paper); font-family: var(--mono); font-size: 17px; font-weight: 400; margin-left: 7px; }
.run-stats { display: flex; gap: 24px; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); }
.run-stats > div { display: flex; align-items: baseline; gap: 7px; }
.micro-label { font-size: 10px; color: #c8d0c8; margin-right: 4px; letter-spacing: 1px; }
.run-stats strong { font-size: 27px; line-height: 1; font-family: var(--mono); font-weight: 400; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 10px; color: #d0d5c9; }
.stats-divider { height: 21px; width: 1px; background: var(--line); }
[data-mode="ready"] .run-stats { opacity: 0; pointer-events: none; }
.drive-status { position: absolute; left: 50%; top: 113px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1px; color: #e6eadd; padding: 8px 14px; border-radius: 30px; background: rgba(23,41,40,.48); border: 1px solid rgba(215,231,211,.13); backdrop-filter: blur(7px); z-index: 5; white-space: nowrap; }
.drive-status i, .sensor-label i, .speed-led { display: inline-block; width: 5px; height: 5px; background: var(--green); border-radius: 50%; }
.drive-status[data-level="warning"] { color: #ffe5c6; background: rgba(81,46,20,.68); border-color: rgba(255,178,98,.4); }
.drive-status[data-level="warning"] i { background: var(--orange); }
.drive-status[data-level="danger"] { color: #ffd8cc; background: rgba(78,24,18,.8); }
.drive-status[data-level="danger"] i { background: var(--red); }
[data-mode="ready"] .drive-status { top: auto; left: auto; right: 45px; bottom: 29%; transform: none; background: none; border: 0; backdrop-filter: none; color: #f4f0dd; }
.intro { position: absolute; left: 7%; top: clamp(142px, 21%, 220px); width: 355px; z-index: 12; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 2.3px; font-weight: 400; color: #c6cdbf; margin: 0 0 25px; }
.eyebrow > span:first-child { width: 21px; height: 2px; background: var(--orange); }
.intro h1 { font-size: clamp(43px, 4.8vw, 68px); line-height: 1.27; letter-spacing: -2px; margin: 0; font-weight: 700; }
.intro h1 > span { color: var(--orange-bright); }
.intro-copy { font-size: 13px; color: #c2c9bd; line-height: 2; margin: 22px 0 24px; letter-spacing: .5px; }
.intro-range { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; width: 290px; }
.intro-range > span { font-family: var(--mono); font-size: 21px; font-weight: 400; color: #e6e8d7; }
.intro-range > span small { font-size: 12px; color: #a5ae9f; margin-left: 5px; }
.intro-range > div { flex: 1; display: flex; flex-direction: column; gap: 7px; align-items: center; }
.intro-range > div > i { height: 3px; width: 100%; border-left: 1px solid #d5e5b5; border-right: 1px solid #d5e5b5; background: linear-gradient(90deg,rgba(174,200,142,.2),#b1c695,rgba(174,200,142,.2)); position: relative; }
.intro-range > div > i::before, .intro-range > div > i::after { content: ""; position: absolute; width: 1px; height: 8px; background: #bdd29e; top: -3px; }
.intro-range > div > i::before { left: -1px; } .intro-range > div > i::after { right: -1px; }
.intro-range > div > span { font-size: 9px; letter-spacing: 1.5px; color: #bdceab; }
.primary-button { width: 100%; min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--orange); color: #201d19; border: 1px solid rgba(255,218,183,.3); border-radius: 5px; padding: 0 23px; font-size: 14px; font-weight: 700; letter-spacing: 2px; box-shadow: 0 5px 22px rgba(0,0,0,.09); transition: background .18s, transform .18s; }
.primary-button:hover { background: #ffa272; transform: translateY(-2px); }
.primary-button:active { transform: translateY(1px); }
.intro .primary-button { width: 290px; }
.intro-control { display: flex; align-items: center; gap: 6px; color: #b9c1b5; font-size: 10px; margin-top: 17px; white-space: nowrap; }
kbd { font-family: var(--mono); font-weight: 400; font-size: 9px; border: 1px solid rgba(209,219,204,.25); border-radius: 3px; padding: 3px 6px; letter-spacing: .7px; background: rgba(228,229,212,.04); color: #c9cfc2; }
.intro-control > span { color: #919f94; }
.world-caption { position: absolute; left: 45px; bottom: 28.8%; display: flex; align-items: center; gap: 14px; color: #f1f1dd; font-size: 11px; letter-spacing: 2px; z-index: 4; text-shadow: 0 1px 8px #243830; pointer-events: none; }
.world-caption small { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: 1.3px; color: #cad3bf; margin-top: 5px; }
.route-number { font-family: var(--mono); font-size: 30px; font-weight: 300; color: #e8e7d0; letter-spacing: 0; }
.route-line { width: 34px; height: 1px; background: #d6dec277; margin: 0 4px; }
.weather-label { font-family: var(--mono); letter-spacing: 1px; }
[data-mode="running"] .world-caption, [data-mode="over"] .world-caption { opacity: .75; }
.target-marker { position: absolute; z-index: 5; pointer-events: none; color: var(--green); transform: translate(-50%, -100%); }
.target-caption { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; font-size: 9px; letter-spacing: 1px; white-space: nowrap; padding: 5px 8px; border-radius: 3px; background: rgba(20,32,28,.7); }
.target-caption i { height: 4px; width: 4px; border-radius: 50%; background: currentColor; margin-right: 3px; }
.target-caption b { font-family: var(--mono); font-size: 14px; font-weight: 400; }
.target-caption small { font-size: 9px; opacity: .7; }
.target-brackets { position: absolute; inset: 0; --bracket: linear-gradient(currentColor,currentColor); background: var(--bracket) 0 0/10px 1.5px, var(--bracket) 0 0/1.5px 10px, var(--bracket) 100% 0/10px 1.5px, var(--bracket) 100% 0/1.5px 10px, var(--bracket) 0 100%/10px 1.5px, var(--bracket) 0 100%/1.5px 10px, var(--bracket) 100% 100%/10px 1.5px, var(--bracket) 100% 100%/1.5px 10px; background-repeat: no-repeat; opacity: .8; }
.target-marker[data-danger="true"] { color: #ffbb7d; }
.event-toast { position: absolute; top: 21%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; z-index: 20; padding: 14px 20px; min-width: 272px; background: rgba(22,39,34,.88); border: 1px solid rgba(193,224,169,.32); border-radius: 6px; backdrop-filter: blur(10px); animation: toast-in .25s ease-out; }
.event-symbol { font-size: 31px; color: var(--green); font-family: sans-serif; font-weight: 300; }
.event-toast strong { display: block; font-size: 14px; letter-spacing: 1px; font-weight: 500; color: #e8efdc; }
.event-toast div > span { display: block; color: #b3c6a8; font-size: 10px; margin-top: 5px; }
.event-score { margin-left: 16px; font-family: var(--mono); font-size: 22px; color: var(--green); }
.event-toast[data-type="danger"] { border-color: #df886d77; background: rgba(65,29,25,.88); }
.event-toast[data-type="danger"] .event-symbol, .event-toast[data-type="danger"] strong { color: #ffb19c; }
@keyframes toast-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }

/* A shallow physical dashboard keeps the road open. */
.cockpit { position: absolute; inset: auto 0 0; height: 25%; min-height: 200px; max-height: 260px; z-index: 10; pointer-events: none; padding-bottom: var(--safe-bottom); }
.dashboard-shell { position: absolute; inset: 0 -5% -25px; background: linear-gradient(176deg,#343b38 0%,#20282a 8%,#161e21 30%,#10171b 75%); border-radius: 50% 48% 0 0 / 17% 21% 0 0; box-shadow: 0 -3px 0 #66716a88,0 -6px 0 #151e2088,0 -18px 36px #0f1a1a33; overflow: hidden; }
.dashboard-shell::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(25deg, transparent 0 2px,rgba(255,255,255,.018) 2px 3px); opacity: .7; }
.dashboard-seam { position: absolute; top: 25px; width: 100%; height: 2px; border-top: 1px solid #72807744; transform: rotate(.5deg); }
.air-vent { position: absolute; top: 22px; width: 130px; height: 9px; background: repeating-linear-gradient(90deg,#080f12 0 3px,#364043 3px 5px); border: 1px solid #52605966; transform: skewX(-28deg); border-radius: 3px; }
.vent-left { left: 8%; } .vent-right { right: 9%; transform: skewX(28deg); }
.car-bonnet { position: absolute; left: 27%; right: 18%; height: 25px; top: -22px; border-top: 2px solid #b3b9ac50; background: linear-gradient(180deg,#78948a15,#304441aa); clip-path: polygon(19% 0,86% 5%,100% 100%,0 100%); z-index: -1; }
.trip-info { position: absolute; left: 7.3%; bottom: 57px; display: flex; flex-direction: column; align-items: center; color: #a0b0a6; }
.gear-indicator { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 24px; color: var(--orange-bright); }
.gear-indicator > span { font-family: var(--font); color: #b6c2b7; font-size: 9px; letter-spacing: 1px; }
.lane-map { width: 72px; height: 67px; border-left: 1px solid #55665e; border-right: 1px solid #55665e; margin-top: 8px; position: relative; transform: perspective(70px) rotateX(18deg); opacity: .9; mask-image: linear-gradient(transparent,#000 18%); }
.lane-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: repeating-linear-gradient(#92a398 0 7px,transparent 7px 13px); }
.lane-car { position: absolute; width: 12px; height: 20px; background: var(--green); border-radius: 3px; left: 11px; bottom: 4px; box-shadow: 0 0 10px #b6d19e22; }
.other-car { background: var(--orange); bottom: 41px; width: 10px; height: 16px; opacity: .55; }
.trip-label { font-size: 8px; letter-spacing: 1.3px; margin-top: 5px; }
.speed-cluster { position: absolute; left: 24.6%; transform: translateX(-50%); bottom: 98px; width: 193px; text-shadow: 0 0 20px #0006; }
.speed-topline { display: flex; gap: 7px; align-items: center; color: #b5c6b8; font-family: var(--mono); font-size: 8px; letter-spacing: 2px; }
.speed-led { width: 4px; height: 4px; }
.cruise-limit { border: 1px solid #c1c9bb77; font-size: 8px; border-radius: 30px; padding: 2px 3px; letter-spacing: 0; margin-left: auto; }
.speed-value { display: flex; align-items: baseline; gap: 7px; }
#speed-text { font-size: 76px; line-height: 1.17; letter-spacing: -3px; font-family: var(--mono); font-weight: 300; font-variant-numeric: tabular-nums; color: #e8eddf; }
.speed-unit { font-size: 9px; color: #a6b4a7; letter-spacing: 1px; }
.speed-ticks { height: 3px; background: #36443f; width: 150px; mask-image: repeating-linear-gradient(90deg,#000 0 3px,transparent 3px 6px); }
.speed-ticks span { display: block; height: 100%; background: var(--green); width: 75%; }
.steering-wrap { position: absolute; left: 25%; bottom: -229px; transform: translateX(-50%); width: 420px; height: 420px; filter: drop-shadow(0 -6px 7px #0005); }
#steering-wheel { width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.force-meter { --force-color: var(--paper); position: absolute; width: clamp(270px, 27.5vw, 400px); left: 50%; bottom: 45px; color: var(--paper); }
.force-heading { display: flex; align-items: center; justify-content: space-between; color: #bec9bd; font-size: 10px; letter-spacing: 2px; }
.sensor-label { font-family: var(--mono); font-size: 7px; letter-spacing: 1.6px; color: #8b9a91; display: flex; align-items: center; gap: 5px; }
.sensor-label i { width: 3px; height: 3px; background: #758e77; }
.force-readout { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; height: 68px; color: var(--force-color); }
#force-num { font-family: var(--mono); font-size: 55px; font-weight: 300; letter-spacing: -1.5px; line-height: 1.2; font-variant-numeric: tabular-nums; min-width: 35px; }
.force-readout > span { font-family: var(--mono); color: #95a69b; font-size: 14px; }
.force-message { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--force-color); padding-bottom: 4px; letter-spacing: .3px; }
.force-message i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pressure-scale { position: relative; height: 20px; font-family: var(--mono); font-size: 9px; color: #84988a; }
.pressure-scale > span { position: absolute; transform: translateX(-50%); }
.pressure-scale .scale-zero { left: 0; transform: none; color: #9aa89c; }
.scale-safe { left: 50%; color: var(--green); }
.scale-limit { left: 79.45%; color: var(--orange-bright); }
.pressure-scale .scale-max { right: 0; transform: none; font-size: 8px; }
.pressure-track { position: relative; width: 100%; height: 9px; display: flex; gap: 0; border-radius: 2px; }
.pressure-zone { height: 100%; }
.zone-low { width: 50%; background: #46534e; border-radius: 2px 0 0 2px; }
.zone-safe { width: 29.45%; background: #a9c795; border-left: 2px solid #d0e0b7; border-right: 2px solid #ffd2a0; box-shadow: 0 0 10px #a9c7950a; }
.zone-danger { width: 20.55%; border-radius: 0 2px 2px 0; background: repeating-linear-gradient(120deg,#925344 0 3px,#754338 3px 5px); }
.pressure-active { position: absolute; left: 0; top: 0; height: 100%; background: var(--force-color); width: 0; opacity: .28; }
.pressure-needle { position: absolute; left: 0; bottom: -3px; height: 15px; width: 2px; background: #f1f2dc; box-shadow: 0 0 4px #ffffca77; }
.pressure-needle::before { content: ""; position: absolute; left: -3px; top: -5px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid #f5f6e4; }
.pressure-legend { display: grid; grid-template-columns: 50% 29.45% 20.55%; font-size: 8px; color: #92a196; margin-top: 8px; letter-spacing: 1px; }
.pressure-legend > span:nth-child(2) { text-align: center; color: #bed5a9; }
.pressure-legend > span:nth-child(3) { text-align: right; color: #d18b72; }
.force-footer { border-top: 1px solid #e6f2d70d; display: flex; justify-content: space-between; margin-top: 12px; padding-top: 9px; color: #7d9081; font-size: 8px; letter-spacing: 1px; }
.force-footer b { color: #b9c5b5; font-family: var(--mono); font-weight: 400; font-size: 10px; }
.force-meter[data-zone="low"] { --force-color: #edbd8c; }
.force-meter[data-zone="safe"] { --force-color: var(--green); }
.force-meter[data-zone="warning"] { --force-color: var(--orange-bright); }
.force-meter[data-zone="danger"] { --force-color: var(--red); }
.pedal-station { position: absolute; right: 7%; bottom: 47px; width: 103px; height: 150px; pointer-events: auto; perspective: 600px; }
.pedal-rod { position: absolute; left: 45px; top: -7px; height: 79px; width: 17px; border-radius: 5px; background: linear-gradient(90deg,#141b1d,#74817a 38%,#414f49 60%,#101719); box-shadow: 0 1px 4px #000; transform: rotate(-8deg); }
.brake-pedal { position: absolute; left: 0; top: 14px; width: 103px; height: 109px; border-radius: 11px 11px 16px 16px; border: 2px solid #737f77; padding: 15px 14px 10px; background: linear-gradient(145deg,#727a70,#434e47 13%,#25332f 60%,#1a2524); box-shadow: 0 9px 0 #090f10,0 15px 24px #0009,inset 0 1px 0 #b5b6a177,inset 0 0 0 4px #29352d; transform: rotateX(15deg) rotateZ(-3deg); transform-origin: 50% 0; transition: transform .09s,border-color .1s,box-shadow .1s; touch-action: none; }
.brake-pedal:hover:not(:disabled) { border-color: #aeba9e; }
.brake-pedal.pressing { transform: rotateX(35deg) rotateZ(-3deg) translateY(7px); border-color: var(--orange-bright); box-shadow: 0 4px 0 #090f10,0 6px 16px #0009,inset 0 0 0 4px #29352d,0 0 20px #ff985016; }
.pedal-grooves { display: flex; flex-direction: column; gap: 6px; }
.pedal-grooves i { height: 6px; border-top: 1px solid #050d0c; border-bottom: 1px solid #a3b29733; background: #0d1816; border-radius: 3px; box-shadow: inset 0 1px 2px #000; }
.pedal-label { display: block; font-family: var(--mono); letter-spacing: 2px; font-weight: 500; font-size: 9px; color: #d1d7c1; margin-top: 12px; }
.pedal-bolt { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #9ea58e; box-shadow: inset 0 1px 2px #000; top: 7px; }
.bolt-one { left: 7px; } .bolt-two { right: 7px; }
.pedal-edge { position: absolute; left: 25px; right: 25px; bottom: -2px; height: 2px; background: var(--orange); opacity: .7; }
.pedal-control { position: absolute; top: 140px; width: 120px; left: -8px; display: flex; justify-content: center; align-items: center; gap: 6px; white-space: nowrap; }
.pedal-control > span { font-size: 8px; color: #9baa9b; }
.pedal-control kbd { font-size: 8px; padding: 2px 4px; }
.pedal-station.broken .brake-pedal { transform: translateY(28px) rotateZ(24deg) rotateX(30deg); border-color: #c58165; box-shadow: 0 12px 12px #0009; }
.pedal-station.broken .pedal-rod { clip-path: polygon(0 0,100% 0,100% 28%,30% 42%,100% 45%,0 71%); }
.pedal-spark { position: absolute; top: 18px; left: 45px; width: 18px; height: 18px; background: radial-gradient(#fff9ba,#ffc16999 30%,transparent 70%); opacity: 0; }
.pedal-station.broken .pedal-spark { animation: spark .4s ease-out; }
@keyframes spark { 0% { opacity: 1; scale: 4; } 100% { opacity: 0; scale: 0; } }
.cockpit-bottomline { position: absolute; bottom: calc(15px + var(--safe-bottom)); left: 43px; right: 43px; display: flex; justify-content: space-between; font-family: var(--mono); color: #687b70; font-size: 7px; letter-spacing: 2px; }
.session-label { font-family: var(--font); letter-spacing: 1.5px; display: flex; align-items: center; gap: 8px; }
.session-label i { width: 4px; height: 4px; border-radius: 50%; background: #9bb386; }

/* Dialogs pause the simulation and all pressure input. */
.modal-scrim { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 25px; background: rgba(7,17,20,.6); backdrop-filter: blur(10px); }
.dialog { position: relative; width: min(470px,100%); max-height: 100%; overflow: auto; padding: 37px; border: 1px solid #aab7a82b; border-radius: 10px; background: linear-gradient(140deg,#26332f,#162220); box-shadow: 0 20px 100px #0005; }
.dialog h2 { margin: 0; font-size: 29px; line-height: 1.4; letter-spacing: -1px; }
.dialog .eyebrow { font-size: 8px; color: var(--orange-bright); margin-bottom: 18px; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; padding: 6px; border: 0; background: transparent; }
.dialog-copy { font-size: 11px; line-height: 1.9; color: #b0beb1; margin: 17px 0 25px; }
.rule-list > div { display: grid; grid-template-columns: 8px 120px 1fr; align-items: center; gap: 8px; padding: 15px 0; border-bottom: 1px solid #b4c3af16; }
.rule-dot { width: 5px; height: 5px; border-radius: 50%; }
.rule-dot.low { background: #bbc5b6; } .rule-dot.safe { background: var(--green); } .rule-dot.danger { background: var(--red); }
.rule-list strong { font-family: var(--mono); font-size: 14px; font-weight: 400; }
.rule-list small { font-size: 9px; color: #aebda9; }
.rule-list > div > span:last-child { font-size: 9px; line-height: 1.6; color: #b6c2b3; }
.help-tip { margin-top: 20px; border-left: 2px solid var(--orange); padding: 3px 0 3px 11px; color: #d3d9c7; line-height: 1.8; font-size: 11px; }
.help-shortcuts { display: flex; gap: 22px; margin: 25px 0 15px; font-size: 9px; color: #96a995; }
.help-shortcuts kbd { margin-right: 4px; font-size: 8px; }
.fine-print { font-size: 8px; color: #7e9280; margin-bottom: 22px; }
.dialog .primary-button { min-height: 47px; font-size: 12px; }
.pause-dialog { width: 380px; padding: 42px; }
.pause-dialog h2 { font-size: 39px; }
.pause-dialog .text-button { display: block; margin: 14px auto 0; }
.text-button { background: none; border: 0; padding: 10px 0; color: #aab8a8; font-size: 10px; letter-spacing: 1px; }
.text-button:hover { color: var(--orange-bright); }
.result-panel { position: absolute; left: 7%; top: 24%; z-index: 30; width: 395px; animation: result-in .4s ease-out; }
.result-panel .eyebrow { font-size: 9px; color: #b4c1b2; margin-bottom: 22px; }
.result-panel .eyebrow > .result-dot { background: var(--red); width: 6px; height: 6px; border-radius: 50%; }
.result-panel h2 { margin: 0; font-size: 49px; line-height: 1.3; letter-spacing: -1px; }
.result-panel h2 > span { color: #ffad89; }
[data-mode="runaway"] #speed-text { color: #ffab89; }
[data-mode="runaway"] .scene-vignette { box-shadow: inset 0 0 140px #af3f252c; }
[data-mode="ready"] .world-caption { display: none; }
.result-reason { margin: 17px 0 26px; font-size: 12px; color: #c8cebb; line-height: 1.8; }
.result-stats { display: grid; grid-template-columns: 1fr 1.25fr 1fr; padding: 20px 0; border-top: 1px solid #bfcdad33; border-bottom: 1px solid #bfcdad22; }
.result-stats > div { border-right: 1px solid #bfcdad22; padding-left: 20px; }
.result-stats > div:first-child { padding-left: 0; }
.result-stats > div:last-child { border: 0; }
.result-stats strong { display: block; font-family: var(--mono); font-size: 33px; font-weight: 400; color: #f1f0df; }
.result-stats span { display: block; font-size: 8px; color: #aebca6; letter-spacing: 1px; margin-top: 6px; }
.result-best { font-size: 10px; color: #bbcca9; margin: 18px 0 23px; }
.result-actions { display: flex; justify-content: space-between; padding-top: 10px; }
@keyframes result-in { from { opacity: 0; translate: 0 15px; } to { opacity: 1; translate: 0 0; } }
#impact-flash { pointer-events: none; position: absolute; inset: 0; z-index: 21; opacity: 0; background: radial-gradient(ellipse,transparent 15%,#d0633955 75%,#ffb578aa); }
#impact-flash.flash { animation: impact .6s ease-out; }
@keyframes impact { 0% { opacity: 1; background-color: #fff3bf88; } 20% { opacity: .6; } 100% { opacity: 0; } }
#windshield-crack { position: absolute; inset: 0; width: 100%; height: 100%; color: #e3ebd885; stroke-width: 1.2; z-index: 3; pointer-events: none; opacity: 0; }
#windshield-crack.visible { opacity: 1; }
.small-toast { position: absolute; bottom: 31%; left: 50%; transform: translateX(-50%); z-index: 90; background: #152820ee; border: 1px solid #b5c79944; padding: 12px 20px; border-radius: 5px; font-size: 12px; color: #deebd0; white-space: nowrap; }
.boot-error { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; background: #14201ff5; text-align: center; }
.boot-error h2 { font-size: 24px; } .boot-error p { max-width: 400px; font-size: 13px; line-height: 1.8; color: #b5c4ae; } .boot-error .primary-button { width: 240px; margin-top: 25px; justify-content: center; }
@media (min-width: 1800px) { .intro { left: 9%; } .topbar { padding: 36px 55px; } }
@media (max-width: 1150px) {
  .topbar { padding: 25px 28px; } .toolbar { gap: 7px; } .brand-name { display: none; } .brand-divider { display: none; }
  .run-stats { gap: 14px; } .micro-label { font-size: 9px; } .run-stats strong { font-size: 22px; } .best-record { margin-right: 6px; }
  .intro { left: 6%; width: 330px; } .intro h1 { font-size: 53px; } .force-meter { left: 46%; width: 32%; } .pedal-station { right: 7%; }
  .speed-cluster { left: 26%; width: 160px; } .steering-wrap { left: 27%; width: 380px; height: 380px; bottom: -205px; }
  #speed-text { font-size: 68px; } .trip-info { left: 6%; } .world-caption { left: 28px; }
}
@media (max-height: 750px) and (min-width: 761px) {
  .topbar { padding-top: 22px; } .intro { top: 20%; } .intro .eyebrow { margin-bottom: 16px; } .intro h1 { font-size: 47px; }
  .intro-copy { margin: 16px 0; font-size: 11px; } .intro-range { margin-bottom: 18px; } .intro .primary-button { min-height: 46px; }
  .intro-control { margin-top: 12px; font-size: 9px; } .cockpit { min-height: 178px; } .force-meter { bottom: 35px; } .force-heading { font-size: 9px; }
  .force-readout { height: 54px; } #force-num { font-size: 46px; } .force-footer { display: none; } .speed-cluster { bottom: 82px; }
  #speed-text { font-size: 61px; } .steering-wrap { width: 340px; height: 340px; bottom: -197px; } .trip-info { bottom: 35px; }
  .pedal-station { bottom: 32px; transform: scale(.87); transform-origin: bottom center; } .world-caption { display: none; }
  .drive-status { top: 93px; } [data-mode="ready"] .drive-status { bottom: 32%; } .result-panel { top: 20%; width: 345px; } .result-panel h2 { font-size: 39px; }
  .result-panel .eyebrow { margin-bottom: 15px; } .result-reason { margin: 13px 0 15px; } .result-stats { padding: 13px 0; } .result-best { margin: 14px 0; }
}
@media (max-width: 760px) {
  .topbar { padding: max(20px,env(safe-area-inset-top)) 21px 15px; gap: 10px; flex-wrap: wrap; }
  .brand { gap: 9px; } .brand > svg { width: 20px; } .brand-number { font-size: 24px; } .brand-number > span { font-size: 15px; }
  .brand-name, .brand-divider, .fullscreen-button, .best-record { display: none; } .toolbar { gap: 7px; }
  .icon-button { width: 34px; height: 34px; } .icon-button svg { width: 16px; }
  .run-stats { top: 87px; left: 23px; transform: none; gap: 14px; } .run-stats > div { gap: 4px; } .micro-label { font-size: 8px; }
  .run-stats strong { font-size: 23px; } .stat-unit { font-size: 8px; } .stats-divider { height: 16px; }
  .drive-status { top: 134px; font-size: 9px; padding: 7px 12px; }
  [data-mode="ready"] .drive-status { right: 23px; bottom: 36%; top: auto; font-size: 8px; letter-spacing: 0; }
  .intro { left: 8%; top: 19%; width: 84%; } .intro .eyebrow { font-size: 8px; letter-spacing: 1.7px; margin-bottom: 22px; }
  .intro h1 { font-size: 50px; line-height: 1.27; letter-spacing: -1.5px; }
  .intro-copy { font-size: 11px; margin: 17px 0 23px; color: #d0d6c8; line-height: 1.9; }
  .intro-range { width: 252px; margin-bottom: 21px; } .intro-range > span { font-size: 18px; } .intro-range > div > span { font-size: 8px; }
  .intro .primary-button { width: 252px; min-height: 48px; font-size: 13px; }
  .intro-control { font-size: 9px; gap: 5px; margin-top: 14px; } .touch-copy { display: none; }
  .scene-vignette::after { background: linear-gradient(90deg,#122222dd,#15262599 44%,#17282422); }
  .world-caption { display: none; } .cockpit { height: 27%; max-height: 225px; min-height: 201px; }
  .dashboard-shell { inset: 0 -10% -20px; border-radius: 40% 30% 0 0 / 7% 9% 0 0; }
  .car-bonnet { left: 2%; right: 0; } .air-vent { display: none; }
  .trip-info { display: none; } .steering-wrap { width: 260px; height: 260px; bottom: -212px; left: 19%; opacity: .9; }
  .speed-cluster { left: 8%; transform: none; top: -65px; bottom: auto; width: 117px; }
  .speed-topline { font-size: 6px; letter-spacing: 1.2px; } .cruise-limit { font-size: 6px; padding: 1px 2px; }
  #speed-text { font-size: 44px; letter-spacing: -1px; line-height: 1.15; } .speed-value { gap: 5px; } .speed-unit { font-size: 7px; }
  .speed-ticks { height: 2px; width: 110px; } .speed-led { width: 3px; height: 3px; }
  .force-meter { left: 7%; width: 57%; bottom: calc(48px + var(--safe-bottom)); }
  .force-heading { font-size: 9px; letter-spacing: 1px; } .sensor-label { font-size: 5px; letter-spacing: .5px; }
  .force-readout { height: 59px; } #force-num { font-size: 47px; } .force-readout > span { font-size: 10px; }
  .force-message { font-size: 7px; gap: 3px; } .force-message i { display: none; } .force-footer { display: none; }
  .pressure-scale { height: 17px; font-size: 8px; } .pressure-scale .scale-max { font-size: 6px; }
  .pressure-track { height: 8px; } .pressure-legend { font-size: 7px; letter-spacing: .5px; margin-top: 10px; }
  .pedal-station { right: 7%; bottom: calc(39px + var(--safe-bottom)); width: 78px; height: 139px; }
  .pedal-rod { left: 31px; top: 0; } .brake-pedal { width: 78px; height: 101px; top: 15px; padding: 15px 10px 10px; }
  .pedal-grooves { gap: 5px; } .pedal-grooves i { height: 5px; } .pedal-label { font-size: 8px; margin-top: 11px; }
  .pedal-control { left: -16px; top: 130px; width: 107px; gap: 4px; } .pedal-control > span { font-size: 7px; } .pedal-control kbd { font-size: 7px; padding: 2px 3px; }
  .cockpit-bottomline { left: 25px; right: 25px; font-size: 6px; letter-spacing: 1px; bottom: calc(13px + var(--safe-bottom)); }
  .session-label { font-size: 7px; letter-spacing: .5px; } .event-toast { top: 23%; padding: 12px 15px; min-width: 245px; gap: 10px; }
  .event-toast strong { font-size: 12px; } .event-toast div > span { font-size: 9px; } .event-symbol { font-size: 26px; }
  .result-panel { top: 21%; left: 8%; width: 84%; } .result-panel h2 { font-size: 41px; } .result-panel .eyebrow { font-size: 8px; margin-bottom: 18px; }
  .result-reason { font-size: 11px; margin: 14px 0 20px; } .result-stats { padding: 17px 0; } .result-stats strong { font-size: 29px; } .result-stats span { font-size: 7px; letter-spacing: .5px; }
  .result-stats > div { padding-left: 15px; } .result-best { font-size: 9px; margin: 17px 0; } .result-panel .primary-button { min-height: 48px; font-size: 13px; }
  .dialog { padding: 30px 24px; } .dialog h2 { font-size: 25px; } .rule-list > div { grid-template-columns: 5px 111px 1fr; gap: 7px; } .rule-list strong { font-size: 13px; }
  .help-shortcuts { gap: 12px; } .modal-scrim { padding: 22px; } .small-toast { font-size: 10px; bottom: 32%; max-width: 90%; white-space: normal; }
}
@media (max-width: 760px) and (max-height: 750px) {
  .intro { top: 17%; } .intro h1 { font-size: 39px; } .intro .eyebrow { margin-bottom: 14px; font-size: 7px; }
  .intro-copy { font-size: 10px; margin: 12px 0 16px; } .intro-range { margin-bottom: 16px; } .intro-control { margin-top: 10px; }
  .intro .primary-button { min-height: 42px; } .cockpit { min-height: 173px; }
  .force-meter { bottom: 35px; } .force-readout { height: 51px; } #force-num { font-size: 41px; } .pedal-station { bottom: 30px; transform: scale(.88); transform-origin: bottom right; }
  .drive-status { top: 122px; } [data-mode="ready"] .drive-status { display: none; } .speed-cluster { top: -56px; }
  .result-panel { top: 20%; } .result-panel h2 { font-size: 34px; } .result-stats { padding: 12px 0; } .result-reason { margin: 12px 0; } .result-best { margin: 12px 0; } .result-panel .eyebrow { margin-bottom: 12px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .topbar { padding: 13px 24px; } .brand-name, .brand-divider, .best-record { display: none; } .brand-number { font-size: 22px; } .brand > svg { width: 20px; } .icon-button { width: 29px; height: 29px; }
  .run-stats { top: 20px; left: 50%; transform: translateX(-50%); } .run-stats strong { font-size: 19px; } .toolbar { gap: 6px; } .micro-label { font-size: 8px; } .drive-status { top: 63px; padding: 5px 10px; font-size: 8px; }
  .intro { top: 23%; left: 7%; width: 285px; } .intro .eyebrow { font-size: 7px; margin-bottom: 10px; } .intro h1 { font-size: 33px; line-height: 1.18; } .intro h1 br { display: none; }
  .intro-copy { font-size: 9px; line-height: 1.7; margin: 11px 0 12px; } .intro-range { margin-bottom: 10px; width: 230px; } .intro-range > span { font-size: 15px; } .intro-range > div > span { font-size: 7px; }
  .intro .primary-button { width: 230px; min-height: 37px; font-size: 11px; } .intro-control { font-size: 8px; margin-top: 10px; } .intro-control kbd { font-size: 7px; }
  .cockpit { min-height: 121px; height: 29%; } .force-meter { left: 48%; width: 29%; bottom: 28px; } .force-readout { height: 36px; margin-top: 0; } #force-num { font-size: 32px; } .force-heading { font-size: 8px; } .sensor-label { font-size: 5px; }
  .force-readout > span { font-size: 9px; } .force-message { font-size: 7px; } .pressure-scale { height: 14px; font-size: 7px; } .pressure-track { height: 6px; } .pressure-legend { margin-top: 5px; font-size: 6px; }
  .force-footer { display: none; } .speed-cluster { bottom: 65px; top: auto; left: 26%; width: 130px; transform: translateX(-50%); } #speed-text { font-size: 41px; } .speed-unit { font-size: 7px; } .speed-topline { font-size: 6px; }
  .steering-wrap { width: 240px; height: 240px; bottom: -130px; left: 26%; } .trip-info { display: none; } .pedal-station { right: 8%; bottom: 20px; transform: scale(.65); transform-origin: bottom right; width: 103px; height: 150px; }
  .brake-pedal { width: 103px; height: 109px; } .pedal-control { top: 140px; } .world-caption,[data-mode="ready"] .drive-status { display: none; } .cockpit-bottomline { bottom: 8px; font-size: 5px; }
  .result-panel { top: 22%; left: 7%; width: 305px; } .result-panel h2 { font-size: 29px; } .result-panel h2 br { display: none; } .result-panel .eyebrow { margin-bottom: 10px; font-size: 7px; }
  .result-reason { font-size: 9px; margin: 9px 0; } .result-stats { padding: 8px 0; } .result-stats strong { font-size: 25px; } .result-stats span { font-size: 6px; } .result-best { font-size: 8px; margin: 10px 0; }
  .result-panel .primary-button { min-height: 36px; font-size: 11px; } .result-actions { padding-top: 2px; } .result-actions .text-button { font-size: 8px; } .event-toast { top: 23%; transform: translateX(-50%) scale(.85); }
  .dialog { max-height: 90dvh; } .pause-dialog { padding: 25px; width: 350px; } .pause-dialog h2 { font-size: 29px; } .pause-dialog h2 br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The supplied cockpit and pedal are the foreground, with live readings on the cleared screens. */
.photo-cockpit { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.cockpit-photo { position: absolute; width: 100%; max-width: none; height: calc(100vw * .271); bottom: 0; left: 0; display: block; filter: saturate(.78) brightness(.88); transform-origin: 24% 100%; }
.dashboard-shell { inset: auto 0 0; height: 60px; background: #111b20; border-radius: 0; box-shadow: none; }
.dashboard-seam, .car-bonnet, .air-vent, .cockpit-bottomline { display: none; }
.force-meter { z-index: 3; left: 45.8%; bottom: 17px; width: 24.5%; }
.force-heading { font-size: 11px; letter-spacing: 1.5px; }
.sensor-label { font-size: 6px; letter-spacing: 1px; }
.force-readout { height: 55px; margin-top: 1px; }
#force-num { font-size: 45px; }
.force-readout > span { font-size: 11px; }
.force-message { font-size: 10px; }
.pressure-scale { height: 17px; font-size: 10px; }
.pressure-scale .scale-max { font-size: 7px; }
.pressure-track { height: 7px; }
.pressure-legend { font-size: 9px; margin-top: 7px; }
.force-footer { display: none; }
.speed-cluster { z-index: 3; left: 22.8%; bottom: 17px; width: 164px; }
#speed-text { font-size: 62px; }
.speed-topline { font-size: 7px; }
.speed-ticks { width: 130px; height: 2px; }
.trip-info { z-index: 3; left: 11.8%; bottom: 24px; }
.gear-indicator { font-size: 19px; }
.gear-indicator > span { display: none; }
.lane-map { width: 44px; height: 47px; margin-top: 3px; }
.lane-car { width: 8px; height: 14px; left: 6px; }
.other-car { height: 11px; bottom: 31px; }
.trip-label { font-size: 6px; margin-top: 3px; }
.pedal-station { z-index: 4; right: 7.5%; bottom: 29px; width: 143px; height: 139px; }
.brake-pedal { width: 143px; height: 108px; top: 25px; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 10px; filter: drop-shadow(0 10px 5px #0008); transform: rotateX(13deg) rotateZ(-3deg); }
.brake-pedal.pressing { box-shadow: none; filter: drop-shadow(0 3px 4px #0008) drop-shadow(0 0 7px #ff8b3444); transform: rotateX(34deg) rotateZ(-3deg) translateY(8px); }
.pedal-image { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: saturate(.7) brightness(.9); }
.pedal-rod { left: 110px; top: 7px; height: 60px; transform: rotate(27deg); width: 13px; }
.pedal-control { left: 11px; top: 136px; width: 120px; }
.pedal-station.broken .brake-pedal { box-shadow: none; transform: translate(5px,21px) rotateZ(25deg) rotateX(24deg); }
.pedal-spark { top: 26px; left: 111px; }
@media (min-width: 1700px) {
  .force-meter { bottom: 26px; } .force-readout { height: 62px; } #force-num { font-size: 50px; }
  .force-heading { font-size: 10px; } .pressure-scale { font-size: 9px; } .force-message { font-size: 10px; }
  .pressure-track { height: 9px; } .pressure-legend { font-size: 8px; }
  .speed-cluster { bottom: 29px; } #speed-text { font-size: 75px; }
  .pedal-station { bottom: 39px; transform: scale(1.15); }
}
@media (max-width: 1150px) and (min-width: 761px) {
  .force-meter { left: 45.5%; bottom: 9px; width: 25%; } .force-readout { height: 37px; } #force-num { font-size: 33px; } .force-message { font-size: 7px; }
  .force-heading { font-size: 7px; } .sensor-label { font-size: 5px; } .pressure-scale { height: 13px; font-size: 7px; } .pressure-track { height: 6px; } .pressure-legend { font-size: 6px; margin-top: 5px; }
  .speed-cluster { left: 24%; bottom: 10px; width: 145px; } #speed-text { font-size: 49px; }
  .trip-info { left: 11.5%; bottom: 13px; } .pedal-station { right: 7%; bottom: 13px; transform: scale(.82); transform-origin: bottom right; }
}
@media (max-width: 760px) {
  .cockpit-photo { width: 880px; height: 196px; left: calc(36% - 440px); bottom: 80px; }
  .dashboard-shell { height: 84px; }
  .force-meter { left: 7%; width: 57%; bottom: calc(43px + var(--safe-bottom)); }
  .force-heading { font-size: 9px; } .sensor-label { font-size: 5px; letter-spacing: .5px; }
  .force-readout { height: 55px; } #force-num { font-size: 45px; } .force-message { font-size: 7px; } .pressure-scale { height: 17px; font-size: 8px; }
  .pressure-track { height: 8px; } .pressure-legend { font-size: 7px; margin-top: 9px; }
  .speed-cluster { left: 8%; bottom: auto; top: -64px; width: 117px; } #speed-text { font-size: 44px; } .speed-ticks { width: 104px; } .speed-topline { font-size: 6px; }
  .pedal-station { right: 4%; bottom: calc(35px + var(--safe-bottom)); width: 103px; height: 133px; }
  .brake-pedal { width: 103px; height: 99px; top: 32px; } .pedal-rod { left: 76px; top: 11px; width: 11px; }
  .pedal-control { left: -1px; top: 128px; width: 107px; } .pedal-spark { left: 82px; top: 29px; }
  .trip-info { display: none; }
}
@media (max-width: 760px) and (max-height: 750px) {
  .force-meter { bottom: 26px; } .force-readout { height: 49px; } #force-num { font-size: 40px; }
  .pedal-station { bottom: 25px; transform: scale(.88); } .speed-cluster { top: -54px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .cockpit-photo { width: 100%; height: calc(100vw * .271); bottom: 0; left: 0; }
  .force-meter { left: 45.5%; bottom: 8px; width: 25%; }
  .force-heading { font-size: 6px; } .sensor-label { display: none; } .force-readout { height: 30px; } #force-num { font-size: 26px; } .force-message { font-size: 6px; }
  .pressure-scale { height: 12px; font-size: 6px; } .pressure-track { height: 5px; } .pressure-legend { font-size: 5px; margin-top: 4px; }
  .speed-cluster { bottom: 14px; top: auto; left: 24%; width: 110px; } #speed-text { font-size: 38px; }
  .pedal-station { right: 7%; bottom: 8px; transform: scale(.65); width: 143px; height: 139px; }
  .brake-pedal { width: 143px; height: 108px; top: 25px; } .pedal-rod { left: 110px; top: 7px; } .pedal-control { top: 136px; left: 11px; }
}


