:root{
  --graphite:#14161a;
  --bone:#eceae4;
  --orange:#ff5c1a;
  --teal:#2ad6c4;
  --steel:#4a5560;
  --mist:#8f9aa3;
  --pale:#c9d3d9;
  --hair:rgba(236,234,228,.18);
  --hud-h:112px;
  --pad:clamp(12px,2.2vw,26px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%;overflow:hidden;background:#0d0f12}
body{
  font-family:'Archivo',system-ui,sans-serif;
  color:var(--bone);
  -webkit-user-select:none;user-select:none;
  touch-action:none;
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
canvas#scene{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0}

#grain{
  position:fixed;inset:0;z-index:2;pointer-events:none;opacity:.5;
  background-image:radial-gradient(rgba(20,22,26,.11) .7px,transparent .8px);
  background-size:4px 4px;
  mix-blend-mode:multiply;
}

/* ---------- top bar ---------- */
#topbar{
  position:fixed;z-index:5;top:0;left:0;right:0;
  display:flex;justify-content:space-between;align-items:flex-start;
  padding:calc(10px + env(safe-area-inset-top)) var(--pad) 0;
  pointer-events:none;
  opacity:0;transition:opacity .35s ease;
}
body.driving #topbar,body.paused #topbar{opacity:1}
.brand{display:flex;gap:10px;align-items:center}
.brand .emblem{width:26px;height:31px;color:var(--bone);filter:drop-shadow(0 1px 0 rgba(0,0,0,.25))}
.brand-txt{display:flex;flex-direction:column;gap:3px}
.brand-txt b{font-family:'Staatliches',sans-serif;font-weight:400;letter-spacing:.16em;font-size:15px;line-height:1}
.brand-txt span{font-family:'Archivo',sans-serif;font-size:8.5px;letter-spacing:.22em;color:rgba(236,234,228,.6)}
#topreadout{display:flex;gap:14px;align-items:flex-start}
.tr{display:flex;flex-direction:column;gap:3px;min-width:52px;text-align:right}
.tr .k{font-size:7.5px;letter-spacing:.18em;color:rgba(236,234,228,.5)}
.tr .v{font-family:'Martian Mono',monospace;font-size:11px;letter-spacing:.06em;color:var(--bone)}
.tr:nth-child(3) .v{color:var(--teal)}
.tr:nth-child(4) .v{color:var(--orange)}

/* ---------- hud ---------- */
#hud{
  position:fixed;z-index:6;left:0;right:0;bottom:0;
  padding:0 8px calc(8px + env(safe-area-inset-bottom));
  opacity:0;transform:translateY(18px);transition:opacity .35s ease,transform .35s ease;
  pointer-events:none;
}
body.driving #hud{opacity:1;transform:none;pointer-events:auto}
body.paused #hud{opacity:0;transform:none}
body.menu #hud{opacity:0;transform:none;transition:none}
.hud-strip{
  display:grid;
  grid-template-columns:1.5fr 1.05fr .8fr 1.12fr .74fr 1.15fr 1.0fr 1.3fr;
  gap:5px;align-items:stretch;
  height:var(--hud-h);
  max-width:1500px;margin:0 auto;
}
.panel{
  position:relative;
  background:rgba(20,22,26,.9);
  border:1px solid var(--hair);
  padding:9px 10px 7px;
  min-width:0;height:100%;
  display:flex;flex-direction:column;justify-content:flex-end;
  overflow:hidden;
}
.panel::before,.panel::after{content:"";position:absolute;width:5px;height:5px;border:0 solid rgba(236,234,228,.42)}
.panel::before{top:2px;left:2px;border-top-width:1px;border-left-width:1px}
.panel::after{bottom:2px;right:2px;border-bottom-width:1px;border-right-width:1px}
.cap{
  font-family:'Archivo',sans-serif;font-size:7.5px;letter-spacing:.24em;
  color:rgba(236,234,228,.55);
  margin-top:5px;white-space:nowrap;
}
.p-speed{justify-content:space-between}
.speed-row{display:flex;align-items:baseline;gap:7px;line-height:.85}
.speed-num{
  font-family:'Martian Mono',monospace;font-weight:300;
  font-size:clamp(38px,4.65vw,62px);letter-spacing:-.045em;
  font-variant-numeric:tabular-nums;color:var(--bone);line-height:.86;
}
.speed-unit{font-family:'Martian Mono',monospace;font-size:9px;letter-spacing:.14em;color:rgba(236,234,228,.55);padding-bottom:4px}
.p-batt{justify-content:flex-end}
.batt-row{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.batt-pct{font-family:'Martian Mono',monospace;font-size:19px;letter-spacing:-.02em;color:var(--teal)}
.batt-kw{font-family:'Martian Mono',monospace;font-size:8px;letter-spacing:.03em;color:rgba(236,234,228,.5)}
.batt-bar{height:5px;background:rgba(236,234,228,.12);position:relative;overflow:hidden}
.batt-bar i{position:absolute;inset:0;width:100%;background:var(--teal);transform-origin:left center;transition:transform .18s linear}
.p-g{justify-content:flex-end;align-items:stretch}
.gbox{width:100%;max-height:62px;flex:1;min-height:42px;display:block}
.g-read{position:absolute;right:8px;bottom:22px;font-family:'Martian Mono',monospace;font-size:8px;color:rgba(236,234,228,.62)}
.p-dmg .dmg-wrap{display:flex;gap:8px;align-items:center;flex:1;min-height:0}
.car-schem{height:64px;width:auto;max-width:38px;flex:0 0 auto}
.dz{transition:fill .18s linear}
.dmg-read{display:flex;flex-direction:column;gap:2px;min-width:0}
.dmg-read span{font-family:'Martian Mono',monospace;font-size:19px;color:var(--bone);letter-spacing:-.03em}
.dmg-read em{font-family:'Archivo',sans-serif;font-style:normal;font-size:7.5px;letter-spacing:.14em;color:rgba(236,234,228,.5);white-space:nowrap}
.p-tyre{justify-content:flex-end}
.tyres{display:grid;grid-template-columns:1fr 1fr;gap:4px 7px;flex:1;align-content:center}
.tyre{display:flex;align-items:center;gap:4px}
.tyre i{display:block;height:7px;flex:1;background:rgba(236,234,228,.16);position:relative;overflow:hidden}
.tyre i::after{content:"";position:absolute;inset:0;background:var(--bone);transform-origin:left;transform:scaleX(var(--w,1))}
.tyre b{font-family:'Martian Mono',monospace;font-weight:400;font-size:6.5px;letter-spacing:.05em;color:rgba(236,234,228,.45)}
.p-odo{justify-content:flex-end}
.odo-read{display:flex;align-items:baseline;gap:4px}
.odo-read span{font-family:'Martian Mono',monospace;font-size:18px;letter-spacing:-.03em;color:var(--bone);font-variant-numeric:tabular-nums}
.odo-read em{font-family:'Martian Mono',monospace;font-style:normal;font-size:7px;color:rgba(236,234,228,.5);letter-spacing:.08em}
.odo-trip{display:flex;justify-content:space-between;gap:6px;margin-top:4px}
.odo-trip span{font-size:7px;letter-spacing:.13em;color:rgba(236,234,228,.45)}
.odo-trip b{font-family:'Martian Mono',monospace;font-weight:400;font-size:8px;color:var(--teal);letter-spacing:0}
.p-map{justify-content:flex-end;padding:5px 6px 4px}
#minimap{width:100%;height:auto;max-height:74px;display:block;flex:1}
#mapCar{transition:transform .08s linear}
.p-acts{justify-content:flex-end}
.acts{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:3px;flex:1;min-height:0}
.glyphbtn{
  border:1px solid rgba(236,234,228,.3);
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;min-height:0;
  color:var(--bone);background:rgba(236,234,228,.03);
  transition:border-color .15s,background .15s;
}
.glyphbtn svg{width:62%;height:62%}
.glyphbtn:hover,.glyphbtn:active{border-color:var(--orange);background:rgba(255,92,26,.12)}
.p-acts .cap{text-align:center}

/* impact flash */
#hud.flash .panel{background:rgba(255,92,26,.32);border-color:rgba(255,92,26,.7)}
#hud.flash .p-dmg .dz{stroke:rgba(255,92,26,.8)}
#hud.flash .car-schem path{stroke:var(--orange)}

/* ---------- touch controls ---------- */
#touch{
  position:fixed;z-index:7;left:0;right:0;
  bottom:calc(var(--hud-h) + 12px + env(safe-area-inset-bottom));
  display:none;justify-content:space-between;align-items:flex-end;
  padding:0 16px;pointer-events:none;
}
body.touch.driving #touch{display:flex}
.steer{display:flex;gap:10px}
.pedals{display:flex;gap:8px;align-items:flex-end}
.tbtn{
  pointer-events:auto;touch-action:none;
  width:64px;height:64px;border-radius:2px;
  border:1px solid rgba(236,234,228,.34);
  background:rgba(20,22,26,.55);
  color:var(--bone);
  display:flex;align-items:center;justify-content:center;
  font-family:'Archivo',sans-serif;font-size:9px;letter-spacing:.12em;
  backdrop-filter:blur(2px);
  transition:background .08s,border-color .08s,transform .08s;
}
.tbtn svg{width:26px;height:26px}
.tbtn.small{width:48px;height:48px;font-size:7px}
.tbtn.brake{width:56px;height:56px}
.tbtn.gas{width:70px;height:70px;background:rgba(42,214,196,.12);border-color:rgba(42,214,196,.55)}
.tbtn.on{background:rgba(255,92,26,.28);border-color:var(--orange);transform:translateY(1px)}

/* ---------- toast ---------- */
#toast{
  position:fixed;z-index:9;left:50%;bottom:calc(var(--hud-h) + 26px + env(safe-area-inset-bottom));
  transform:translate(-50%,10px);
  background:rgba(20,22,26,.94);border:1px solid var(--hair);border-left:2px solid var(--orange);
  padding:8px 14px;font-size:10.5px;letter-spacing:.08em;
  opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;white-space:nowrap;
  max-width:92vw;overflow:hidden;text-overflow:ellipsis;
}
#toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- screens ---------- */
.screen{
  position:fixed;inset:0;z-index:20;display:none;
  background:
    radial-gradient(120% 90% at 50% 40%,rgba(20,22,26,.15),rgba(20,22,26,.72) 78%),
    linear-gradient(180deg,rgba(20,22,26,.35),rgba(20,22,26,.62));
}
.screen.open{display:block;animation:fadeIn .35s ease both}
#titleScreen{background:linear-gradient(100deg,rgba(20,22,26,.86) 0%,rgba(20,22,26,.66) 34%,rgba(20,22,26,.16) 70%,rgba(20,22,26,.32) 100%)}
#garageScreen{background:linear-gradient(96deg,rgba(20,22,26,.93) 0%,rgba(20,22,26,.8) 38%,rgba(20,22,26,.16) 72%,rgba(20,22,26,.34) 100%)}
#pauseScreen{background:linear-gradient(96deg,rgba(20,22,26,.85) 0%,rgba(20,22,26,.55) 46%,rgba(20,22,26,.35) 100%)}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.screen::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(rgba(236,234,228,.09) .6px,transparent .7px);
  background-size:5px 5px;opacity:.35;
}
.screen-inner{position:absolute;inset:0;padding:calc(26px + env(safe-area-inset-top)) var(--pad) calc(24px + env(safe-area-inset-bottom));}
.screen-inner::before{content:"";position:absolute;inset:12px;border:1px solid rgba(236,234,228,.14);pointer-events:none}
.screen-inner::after{content:"";position:absolute;inset:12px;pointer-events:none;
  background:
    linear-gradient(rgba(255,92,26,.75),rgba(255,92,26,.75)) 0 0/18px 1px no-repeat,
    linear-gradient(rgba(255,92,26,.75),rgba(255,92,26,.75)) 0 0/1px 18px no-repeat,
    linear-gradient(rgba(255,92,26,.75),rgba(255,92,26,.75)) 100% 100%/18px 1px no-repeat,
    linear-gradient(rgba(255,92,26,.75),rgba(255,92,26,.75)) 100% 100%/1px 18px no-repeat;
}
.kicker{font-family:'Archivo',sans-serif;font-size:9px;letter-spacing:.32em;color:var(--orange);margin-bottom:12px}
h1,h2{font-family:'Staatliches',sans-serif;font-weight:400;margin:0;line-height:.8;letter-spacing:.02em}
h1 span{display:block;font-size:clamp(58px,10.4vw,132px);line-height:.8}
h2{font-size:clamp(40px,6vw,72px);letter-spacing:.05em}
.tagline{font-family:'Archivo',sans-serif;font-size:11px;letter-spacing:.06em;color:rgba(236,234,228,.7);margin:22px 0 0;max-width:36ch;line-height:1.6}

.measure{position:relative;display:flex;align-items:center;gap:0;margin:18px 0 20px;max-width:360px;color:var(--orange)}
.measure .ticks{flex:1;height:9px;
  background:
    repeating-linear-gradient(90deg,var(--orange) 0 1px,transparent 1px 12px) bottom/100% 5px no-repeat,
    linear-gradient(var(--orange),var(--orange)) bottom/100% 1px no-repeat;
  opacity:.85;
}
.measure .end{width:1px;height:9px;background:var(--orange);display:block}
.measure .dim{position:absolute;right:0;top:14px;font-family:'Martian Mono',monospace;font-size:7.5px;letter-spacing:.15em;color:rgba(255,92,26,.8)}
.measure.small{max-width:300px;margin:14px 0 26px}

.title-inner{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;max-width:720px}
.title-block{max-width:600px}
.plates{display:flex;flex-direction:column;gap:8px;width:min(420px,86vw);margin-top:4px}
.plate{
  position:relative;display:flex;align-items:center;justify-content:space-between;
  width:100%;min-height:56px;padding:0 16px;
  background:var(--bone);color:var(--graphite);
  border:1px solid rgba(20,22,26,.5);
  text-align:left;transition:background .12s,transform .12s,color .12s;
}
.plate::before,.plate::after{content:"";position:absolute;width:6px;height:6px;border:0 solid var(--graphite);opacity:.55}
.plate::before{top:3px;left:3px;border-top-width:1px;border-left-width:1px}
.plate::after{bottom:3px;right:3px;border-bottom-width:1px;border-right-width:1px}
.plate span{font-family:'Staatliches',sans-serif;font-size:19px;letter-spacing:.2em}
.plate em{font-style:normal;font-family:'Archivo',sans-serif;font-size:8px;letter-spacing:.13em;opacity:.55;text-align:right;max-width:12ch;line-height:1.4}
.plate:hover,.plate:active{background:var(--orange);color:#14161a}
.plate:hover::before,.plate:hover::after{opacity:1;border-color:#14161a}
.plate-play{min-height:66px;background:var(--bone)}
.plate-play span{font-size:26px;letter-spacing:.26em}
.plate.compact{min-height:46px}
.plate.compact em{display:none}

.legend{margin-top:clamp(18px,4vh,42px);display:flex;flex-direction:column;gap:6px;max-width:620px}
.legend p{font-size:9.5px;line-height:1.55;color:rgba(236,234,228,.72);margin:0;letter-spacing:.03em}
.legend b{font-family:'Martian Mono',monospace;font-weight:400;font-size:8px;letter-spacing:.14em;color:rgba(236,234,228,.96);margin-right:6px}
.plate-meta{display:flex;gap:18px;margin-top:22px;font-family:'Martian Mono',monospace;font-size:7.5px;letter-spacing:.14em;color:rgba(236,234,228,.42)}
.plate-meta span{position:relative;padding-left:10px}
.plate-meta span::before{content:"";position:absolute;left:0;top:4px;width:4px;height:4px;background:var(--orange)}

/* ---------- garage ---------- */
.garage-inner{display:flex;flex-direction:column;gap:clamp(18px,3vh,34px);max-width:1180px;margin:0 auto;left:0;right:0}
.garage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}
.garage-body{display:flex;flex-direction:column;gap:12px;width:min(470px,44vw)}
.car-list{display:flex;flex-direction:column;gap:7px}
.carItem{
  position:relative;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:12px;
  background:rgba(20,22,26,.72);border:1px solid var(--hair);
  padding:12px 14px;text-align:left;color:var(--bone);
  transition:border-color .14s,background .14s;
}
.carItem:hover{border-color:rgba(236,234,228,.45)}
.carItem.on{border-color:var(--orange);background:rgba(255,92,26,.12)}
.carItem .idx{font-family:'Martian Mono',monospace;font-size:9px;color:rgba(236,234,228,.4)}
.carItem .nm{display:flex;flex-direction:column;gap:3px}
.carItem .nm b{font-family:'Staatliches',sans-serif;font-weight:400;font-size:17px;letter-spacing:.17em}
.carItem .nm span{font-size:8px;letter-spacing:.14em;color:rgba(236,234,228,.45)}
.carItem .dr{font-family:'Martian Mono',monospace;font-size:8px;letter-spacing:.08em;color:var(--teal)}
.garage-side{background:rgba(20,22,26,.68);border:1px solid var(--hair);padding:clamp(12px,1.4vw,18px);max-width:none;width:100%}
.spec-head{display:flex;flex-direction:column;gap:5px;padding-bottom:12px;border-bottom:1px solid var(--hair)}
.spec-head span{font-family:'Staatliches',sans-serif;font-size:26px;letter-spacing:.14em}
.spec-head em{font-style:normal;font-size:8px;letter-spacing:.2em;color:var(--orange)}
.specs{margin:0;padding:8px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:0}
.specs div{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid rgba(236,234,228,.08)}
.specs div:nth-child(odd){padding-right:14px}
.specs div:nth-child(even){padding-left:14px;border-left:1px solid rgba(236,234,228,.08)}
.specs dt{font-size:7.5px;letter-spacing:.14em;color:rgba(236,234,228,.58)}
.specs dd{margin:0;font-family:'Martian Mono',monospace;font-size:9.5px;letter-spacing:.02em;color:var(--bone)}
.garage-actions{display:flex;gap:8px;margin-top:12px}
.garage-actions .plate{flex:1}

/* ---------- garage stage ---------- */
.garage-stage{
  position:absolute;z-index:1;left:auto;right:0;bottom:0;width:52%;height:20%;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:0 clamp(16px,3vw,40px) calc(20px + env(safe-area-inset-bottom));
  pointer-events:none;
  background:linear-gradient(180deg,rgba(20,22,26,0),rgba(20,22,26,.5));
}
.gs-rule{position:relative;height:13px;border-bottom:1px solid rgba(255,92,26,.75);margin-bottom:9px;max-width:100%}
.gs-rule i{position:absolute;left:0;right:0;bottom:0;height:6px;
  background:repeating-linear-gradient(90deg,rgba(255,92,26,.75) 0 1px,transparent 1px 10px);
}
.gs-rule span{position:absolute;right:0;top:-3px;font-family:'Martian Mono',monospace;font-size:7px;letter-spacing:.12em;color:rgba(255,92,26,.9)}
.gs-caption{display:flex;justify-content:space-between;align-items:baseline;gap:14px}
.gs-caption b{font-family:'Staatliches',sans-serif;font-weight:400;font-size:17px;letter-spacing:.18em;color:var(--bone)}
.gs-caption span{font-family:'Archivo',sans-serif;font-size:7px;letter-spacing:.16em;color:rgba(236,234,228,.62);text-align:right}

/* ---------- pause ---------- */
.pause-inner{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;max-width:640px;background:linear-gradient(90deg,rgba(20,22,26,.6),transparent)}
.pause-inner .plates{width:min(420px,86vw)}

/* ---------- veil ---------- */
#veil{
  position:fixed;inset:0;z-index:40;background:#0d0f12;
  display:flex;align-items:center;justify-content:center;
  transition:opacity .6s ease;
}
#veil.off{opacity:0;pointer-events:none}
.veil-in{display:flex;flex-direction:column;align-items:center;gap:14px;color:rgba(236,234,228,.7)}
.veil-in span{font-family:'Martian Mono',monospace;font-size:8.5px;letter-spacing:.3em}
.veil-in i{width:120px;height:1px;background:rgba(236,234,228,.15);position:relative;overflow:hidden}
.veil-in i::after{content:"";position:absolute;inset:0;background:var(--orange);transform-origin:left;animation:veilbar 1.4s ease-in-out infinite}
@keyframes veilbar{0%{transform:scaleX(0)}55%{transform:scaleX(1)}100%{transform:scaleX(1);opacity:0}}

/* ---------- responsive ---------- */
@media (max-width:700px){
  #titleScreen{background:linear-gradient(180deg,rgba(20,22,26,.88) 0%,rgba(20,22,26,.72) 30%,rgba(20,22,26,.24) 54%,rgba(20,22,26,.10) 72%,rgba(20,22,26,.58) 100%)}
  #garageScreen{background:linear-gradient(180deg,rgba(20,22,26,.94) 0%,rgba(20,22,26,.87) 43%,rgba(20,22,26,.24) 55%,rgba(20,22,26,.12) 82%,rgba(20,22,26,.48) 100%)}
  #pauseScreen{background:linear-gradient(180deg,rgba(20,22,26,.9) 0%,rgba(20,22,26,.55) 50%,rgba(20,22,26,.32) 72%,rgba(20,22,26,.44) 100%)}
  .legend{background:linear-gradient(90deg,rgba(20,22,26,.62),rgba(20,22,26,0));padding:10px 12px 10px 10px;border-left:2px solid rgba(255,92,26,.7)}
  .legend p{color:rgba(236,234,228,.9);font-size:9.5px}
  .legend b{color:var(--bone)}
  .tagline{color:rgba(236,234,228,.82)}
  .garage-side{background:rgba(20,22,26,.76)}
  .garage-actions .plate{box-shadow:0 0 0 1px rgba(236,234,228,.25)}
  .garage-stage{display:flex;width:100%;height:18%;background:linear-gradient(180deg,rgba(20,22,26,0),rgba(20,22,26,.62))}
  .gs-caption b{font-size:16px}
}
@media (max-width:900px){
  :root{--hud-h:190px}
  #topbar{padding-top:calc(7px + env(safe-area-inset-top))}
  .brand-txt span{display:none}
  #topreadout{gap:9px}
  .tr{min-width:0}
  .tr .k{font-size:6.5px}
  .tr .v{font-size:9px}
  .tr:nth-child(3){display:none}
  .hud-strip{
    grid-template-columns:repeat(4,1fr);
    gap:4px;
  }
  .p-speed{grid-column:span 2}
  .speed-num{font-size:clamp(44px,13vw,58px)}
  .p-g{grid-column:span 1}
  .p-dmg,.p-tyre,.p-odo,.p-acts{grid-column:span 1;min-height:78px}
  .p-map{display:none}
  .p-batt{grid-column:span 1}
  .cap{font-size:6.5px;letter-spacing:.18em}
  .car-schem{height:46px}
  .dmg-read span{font-size:15px}
  .dmg-read em{font-size:6px}
  .p-odo .odo-read span{font-size:14px}
  .odo-trip{flex-direction:column;gap:1px;margin-top:2px}
  .acts{grid-template-columns:1fr 1fr;gap:2px}
  .glyphbtn{min-height:18px}
  .p-g .g-read{display:none}
  #touch{padding:0 12px}
  .tbtn{width:58px;height:58px}
  .tbtn.gas{width:64px;height:64px}
  .tbtn.brake{width:52px;height:52px}
  .tbtn.small{width:44px;height:44px}
  #toast{bottom:calc(var(--hud-h) + 96px + env(safe-area-inset-bottom));font-size:9.5px;white-space:normal;text-align:center}
  .title-inner{justify-content:flex-start;padding-top:calc(34px + env(safe-area-inset-top))}
  h1 span{font-size:clamp(58px,18vw,96px)}
  .tagline{margin-top:14px;font-size:10px;max-width:30ch}
  .measure{margin:12px 0 16px}
  .legend{margin-top:auto;padding-top:16px}
  .legend p{font-size:8.5px;line-height:1.5}
  .plate{min-height:50px}
  .plate span{font-size:17px}
  .plate em{font-size:7px}
  .plate-meta{display:none}
  .garage-inner{gap:14px}
  .garage-head h2{font-size:44px}
  .garage-body{display:flex;flex-direction:column;width:100%;gap:10px}
  .car-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;overflow:visible;padding-bottom:0}
  .carItem{min-width:0;grid-template-columns:1fr;gap:2px;padding:7px 6px}
  .carItem .idx{display:none}
  .carItem .nm b{font-size:11px;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .carItem .nm span{font-size:6px;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .carItem .dr{font-size:6.5px}
  .garage-side{max-width:none;padding:12px}
  .specs{grid-template-columns:1fr 1fr}
  .spec-head span{font-size:22px}
  .spec-head{padding-bottom:8px}
  .garage-actions{margin-top:10px}
  .plate.compact{min-height:42px}
  .pause-inner{justify-content:center}
}
@media (max-width:520px){
  :root{--hud-h:184px}
  #topreadout .tr:nth-child(4){display:none}
  .speed-unit{display:none}
  h1 span{font-size:clamp(56px,20vw,84px)}
  .title-block{max-width:100%}
  .plates{width:100%}
  .specs dd{font-size:8.5px}
}
@media (min-width:901px){
  .screen-inner{max-width:1180px;margin:0 auto;left:0;right:0}
  .title-inner{max-width:760px;margin:0 auto;left:0;right:0;align-items:flex-start}
}
@media (min-width:901px) and (max-height:700px){
  h1 span{font-size:clamp(48px,8vh,92px)}
  .legend{margin-top:14px}
  .plate{min-height:46px}
}
body.touch #topreadout .tr:nth-child(4){display:flex}
