:root{
  --ink:#241F1C;
  --paper:#F3E6CE;
  --paper-pale:#FBF2DF;
  --paper-deep:#E7D4B2;
  --line:#CBB795;
  --ochre:#D08B45;
  --terra:#C0452C;
  --green:#12513F;
  --sky:#8FB6C2;
  --magenta:#C22E63;
  --amber:#E9A93C;
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  --display:'Big Shoulders','Archivo',sans-serif;
  --text:'Archivo',Arial,sans-serif;
  --mono:'Chivo Mono','Courier New',monospace;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#2a211a;color:var(--ink);font-family:var(--text);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none}
body{position:fixed;inset:0}
#stage,#stage canvas{position:fixed;inset:0;display:block}
.hidden{display:none!important}
button{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}

.plate{
  position:relative;
  background-color:var(--paper);
  background-image:var(--grain);
  border:2px solid var(--ink);
  border-radius:9px;
}
.lbl{font-size:8px;letter-spacing:.16em;font-weight:700;color:#6b563d;text-transform:uppercase;display:block}
kbd{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:20px;height:20px;padding:0 5px;
  background:var(--paper-pale);border:1.5px solid var(--ink);border-bottom-width:3px;border-radius:4px;
  font-family:var(--mono);font-size:9.5px;font-weight:700;line-height:1;color:var(--ink);
}

/* ---------------- HUD ---------------- */
#hud{position:fixed;inset:0;pointer-events:none;z-index:10}
#hud > *{pointer-events:none}
#hud button,#hud .plate{pointer-events:auto}
#hud .plate:not(#routeCard):not(#speedPlate):not(#mapPlate):not(#guide):not(#challenge){pointer-events:none}

.hud-top{
  position:absolute;top:13px;left:14px;right:14px;
  display:flex;align-items:flex-start;gap:12px;
}
#routeCard{width:314px;padding:9px 12px 10px;flex:0 0 auto}
.rc-head{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  font-size:9px;letter-spacing:.16em;font-weight:700;
  padding-bottom:6px;border-bottom:2px solid var(--ink);
}
.rc-head span:last-child{color:var(--terra);letter-spacing:.11em}
.rc-next{padding:7px 0 8px;border-bottom:1px solid var(--line)}
.rc-next b{
  display:block;font-family:var(--display);font-weight:800;font-size:23px;
  line-height:.92;letter-spacing:.015em;margin:2px 0 1px;
}
.rc-next #nextDist{font-family:var(--mono);font-size:11px;font-weight:700;color:var(--green);letter-spacing:.02em}
.rc-stats{display:flex;gap:16px;padding-top:7px}
.rc-stats div{display:flex;flex-direction:column;gap:1px}
.rc-stats b{font-family:var(--mono);font-size:12px;letter-spacing:.01em}
.rc-foot{
  margin-top:8px;background:var(--green);color:var(--paper);
  border-radius:3px;padding:4px 7px;font-size:8px;letter-spacing:.13em;font-weight:700;
}

#compassWrap{
  position:absolute;left:50%;top:13px;transform:translateX(-50%);
  width:372px;height:58px;padding:2px 12px 0;display:flex;align-items:center;overflow:hidden;
}
#compassCanvas{width:100%;height:44px;display:block}
.compass-needle{
  position:absolute;left:50%;top:3px;width:0;height:0;transform:translateX(-50%);
  border-left:6px solid transparent;border-right:6px solid transparent;border-top:9px solid var(--magenta);
}
.compass-val{
  position:absolute;right:10px;bottom:2px;font-family:var(--mono);font-size:8px;font-weight:700;
  letter-spacing:.08em;color:#6b563d;
}
.hud-buttons{margin-left:auto;display:flex;gap:8px;align-items:flex-start}
.pill{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  background-color:var(--paper);background-image:var(--grain);
  border:2px solid var(--ink);border-radius:999px;
  padding:8px 14px;font-size:9.5px;font-weight:700;letter-spacing:.13em;
  cursor:pointer;text-transform:uppercase;line-height:1;
}
.pill .chev{color:var(--magenta);font-size:13px;line-height:.8;letter-spacing:-.1em}
.pill:hover{background-color:var(--paper-pale)}
.pill:active{transform:translateY(1px)}
.pill.wide{width:100%;border-radius:8px;padding:11px 12px;font-size:10px}
.pill.danger .chev{color:var(--terra)}

#guide{
  position:absolute;left:50%;top:80px;transform:translateX(-50%);
  display:flex;align-items:center;gap:8px;padding:5px 12px 5px 10px;border-radius:999px;
  border-width:1.5px;
}
.guide-arrow{font-size:10px;color:var(--magenta);display:inline-block;transition:transform .12s linear}
.guide-copy{display:flex;align-items:baseline;gap:8px}
.guide-copy b{font-size:8.5px;letter-spacing:.13em}
.guide-copy i{font-family:var(--mono);font-style:normal;font-size:10.5px;font-weight:700;color:var(--green)}
#guide.challenge-on{display:none}

#challenge{
  position:absolute;left:50%;top:80px;transform:translateX(-50%);
  width:min(88vw,382px);padding:8px 12px 9px;border-width:2.5px;
}
.ch-head{display:flex;justify-content:space-between;gap:10px;font-size:9px;letter-spacing:.14em;font-weight:700;text-transform:uppercase}
.ch-head span:last-child{color:var(--terra)}
.ch-main{display:flex;align-items:center;gap:14px;margin-top:1px}
.ch-main b{font-family:var(--display);font-weight:800;font-size:40px;line-height:.9;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.ch-bar{flex:1;height:8px;border:1.5px solid var(--ink);border-radius:4px;overflow:hidden;background:var(--paper-deep)}
.ch-bar i{display:block;height:100%;width:0%;background:var(--amber);border-right:1.5px solid var(--ink)}
.ch-note{display:flex;align-items:center;gap:7px;font-size:8px;letter-spacing:.13em;color:#6b563d;margin-top:1px}
.ch-arrow{display:inline-block;color:var(--magenta);font-size:9px;line-height:1;transition:transform .1s linear}

#toast{
  position:absolute;left:50%;top:25%;transform:translateX(-50%) translateY(-8px);
  padding:8px 20px 9px;border-radius:8px;
  font-family:var(--display);font-weight:800;font-size:22px;letter-spacing:.06em;
  opacity:0;transition:opacity .28s ease,transform .28s ease;white-space:nowrap;text-align:center;
  border-width:2.5px;max-width:92vw;overflow:hidden;text-overflow:ellipsis;
}
#toast::before{content:"\00BB";color:var(--magenta);margin-right:10px}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

#speedPlate{
  position:absolute;left:14px;right:14px;bottom:12px;height:112px;
  padding:7px 12px 9px;display:flex;flex-direction:column;
}
.rev{display:flex;gap:2px;height:9px;margin-bottom:6px;flex:0 0 auto}
.rev i{flex:1;background:#D2BEA0;border-radius:1.5px;transition:background .05s linear}
.rev i.on{background:var(--amber)}
.rev i.hot{background:var(--terra)}
.rev i.dead{background:#D2BEA0}
.sp-row{display:flex;align-items:center;gap:14px;flex:1;min-height:0}
.gearTile{
  width:64px;height:64px;flex:0 0 auto;border:2px solid var(--ink);border-radius:8px;
  background-color:var(--green);background-image:var(--grain);color:var(--paper);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
}
.gearTile span{font-size:7.5px;letter-spacing:.18em;font-weight:700;opacity:.9}
.gearTile b{font-family:var(--display);font-weight:800;font-size:35px;line-height:.9}
.speedWindow{
  display:flex;align-items:baseline;gap:9px;flex:0 0 auto;
  padding-right:16px;border-right:1px solid var(--line);min-width:236px;
}
.speedWindow b{
  font-family:var(--display);font-weight:800;font-size:clamp(48px,5.4vw,78px);
  line-height:.78;letter-spacing:.01em;font-variant-numeric:tabular-nums;
  display:inline-block;text-align:right;min-width:2.9ch;
}
.speedWindow .unit{font-size:10px;font-weight:700;letter-spacing:.18em;color:var(--terra)}
.sp-meta{display:flex;gap:26px;flex:1 1 auto;min-width:0}
.sp-meta div{display:flex;flex-direction:column;gap:2px;min-width:0}
.sp-meta b{font-family:var(--mono);font-size:12px;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-keys{
  margin-left:auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;
  font-size:8px;letter-spacing:.07em;color:#5b4934;font-weight:700;
}
.sp-keys span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.sp-keys kbd{height:17px;min-width:17px;font-size:8px;border-bottom-width:2px}

#mapPlate{
  position:absolute;right:14px;bottom:136px;width:206px;padding:6px;z-index:2;
}
.map-head{display:flex;justify-content:space-between;gap:6px;font-size:7.5px;letter-spacing:.11em;font-weight:700;padding:0 2px 4px;border-bottom:1.5px solid var(--ink);margin-bottom:5px}
.map-head span:last-child{color:var(--terra);font-family:var(--mono);letter-spacing:.03em}
#mapCanvas{width:100%;height:auto;display:block;border:1.5px solid var(--ink);border-radius:4px;background:var(--paper)}

#touchCtl{position:absolute;left:0;right:0;bottom:132px;display:none;justify-content:space-between;padding:0 14px;z-index:12}
body.touch #touchCtl{display:flex}
body.touch #mapPlate{display:none}
.tc-side{display:flex;align-items:flex-end;gap:10px}
.tc-side button{
  width:64px;height:64px;border-radius:50%;
  background-color:var(--paper);background-image:var(--grain);
  border:2px solid var(--ink);color:var(--ink);
  font-family:var(--display);font-weight:800;font-size:25px;line-height:1;
  display:flex;align-items:center;justify-content:center;touch-action:none;
}
.tc-side button:active,.tc-side button.on{background:var(--amber)}
.tc-side .tc-gas{background:var(--green);color:var(--paper);font-size:13px;letter-spacing:.06em;width:74px;height:74px}
.tc-side .tc-gas:active,.tc-side .tc-gas.on{background:#1d6b53}
.tc-side .tc-brake{font-size:11px;letter-spacing:.05em;width:68px;height:68px}
.tc-side .tc-small{width:58px;height:58px;font-size:8.5px;letter-spacing:.08em;border-color:var(--terra);color:var(--terra)}

/* ---------------- title ---------------- */
.screen{position:fixed;inset:0;z-index:30}
#title{pointer-events:auto}
.title-band{
  position:absolute;top:0;left:0;right:0;height:29px;
  background-color:var(--paper);background-image:var(--grain);
  border-bottom:2px solid var(--ink);
  display:flex;align-items:center;gap:12px;padding:0 14px;
  font-size:8.5px;font-weight:700;letter-spacing:.16em;
}
.band-mark{width:9px;height:9px;background:var(--ochre);border:1.5px solid var(--ink);flex:0 0 auto}
.band-mid{margin-left:auto;margin-right:auto;color:var(--terra);letter-spacing:.18em}
.title-lockup{position:absolute;left:4vw;bottom:6vh;max-width:min(780px,90vw);color:var(--paper)}
.km-tick{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.12em}
.km-tick i{display:block;width:5px;height:24px;background:var(--ochre);border:1.5px solid var(--ink)}
.km-tick span{text-shadow:0 1px 2px rgba(36,31,28,.55)}
.title-lockup h1{
  margin:0;font-family:var(--display);font-weight:800;
  font-size:clamp(58px,9.4vw,142px);line-height:.78;letter-spacing:.012em;
  color:var(--paper);
  -webkit-text-stroke:2.5px var(--ink);
  paint-order:stroke fill;
  text-shadow:5px 6px 0 rgba(36,31,28,.36);
}
.title-lockup h1 em{font-style:normal;display:block;color:var(--paper)}
.title-chevrons{display:flex;gap:5px;margin-top:2px;line-height:.55;color:var(--magenta);font-family:var(--display);font-weight:900;font-size:42px}
.title-chevrons span{-webkit-text-stroke:1.5px var(--ink);paint-order:stroke fill;text-shadow:3px 3px 0 rgba(36,31,28,.3)}
.title-rule{height:3px;background:var(--terra);width:100%;margin:8px 0 10px;border-top:1px solid rgba(36,31,28,.4)}
.tagline{margin:0;font-size:9.5px;font-weight:700;letter-spacing:.16em;text-shadow:0 1px 2px rgba(36,31,28,.7)}
.start-chip{
  display:inline-flex;align-items:center;gap:12px;margin-top:16px;
  background-color:var(--paper);background-image:var(--grain);
  border:2px solid var(--ink);border-radius:999px;
  padding:12px 26px;cursor:pointer;
  font-family:var(--display);font-weight:800;font-size:23px;letter-spacing:.05em;color:var(--ink);
  box-shadow:5px 5px 0 rgba(36,31,28,.55);
}
.start-chip span{color:var(--magenta);font-size:26px;line-height:.7}
.start-chip:hover{background-color:var(--paper-pale)}
.start-chip:active{transform:translate(2px,2px);box-shadow:3px 3px 0 rgba(36,31,28,.55)}
.start-chip.small{font-size:19px;padding:9px 20px;margin-top:12px;box-shadow:4px 4px 0 rgba(36,31,28,.45)}
.start-hint{margin:9px 0 0;font-size:8.5px;letter-spacing:.16em;font-weight:700;text-shadow:0 1px 2px rgba(36,31,28,.7)}
.controls-card{
  position:absolute;right:4vw;top:8vh;width:294px;padding:0 14px 12px;z-index:2;
}
.cc-head{
  margin:0 -14px 9px;padding:7px 14px;
  background-color:var(--green);background-image:var(--grain);color:var(--paper);
  font-size:10px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  border-bottom:2px solid var(--ink);border-radius:7px 7px 0 0;
}
.cc-list{list-style:none;margin:0;padding:0}
.cc-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid #D6C4A2;font-size:9px;font-weight:700;letter-spacing:.09em}
.chips{display:inline-flex;gap:4px}
.cc-note{margin:9px 0 0;font-size:8.5px;line-height:1.5;letter-spacing:.05em;color:#5b4636;font-weight:600}
.cc-touch{margin:7px 0 0;padding:5px 7px;background:var(--paper-deep);border-radius:4px;font-size:8px;line-height:1.4;letter-spacing:.04em;color:#4f3d2a;display:none;font-weight:600}
body.touch .cc-touch{display:block}
.cc-save{display:flex;gap:18px;border-top:2px solid var(--ink);margin-top:10px;padding-top:8px}
.cc-save div{display:flex;flex-direction:column;gap:1px}
.cc-save span{font-size:7.5px;letter-spacing:.14em;font-weight:700;color:#6b563d}
.cc-save b{font-family:var(--mono);font-size:12px;color:var(--green)}
.car-badge{
  position:absolute;right:4vw;bottom:6vh;padding:8px 14px;display:flex;flex-direction:column;gap:1px;
  border-left:7px solid var(--magenta);
}
.car-badge span{font-size:7.5px;letter-spacing:.16em;font-weight:700;color:#6b563d}
.car-badge b{font-family:var(--display);font-weight:800;font-size:19px;letter-spacing:.03em;line-height:.95}
.car-badge i{font-style:normal;font-size:7.5px;font-weight:700;letter-spacing:.12em;color:var(--terra)}
.title-note{position:absolute;left:4vw;bottom:1.4vh;margin:0;font-size:7.5px;letter-spacing:.13em;font-weight:600;color:var(--paper);text-shadow:0 1px 2px rgba(36,31,28,.9);opacity:.9}

/* ---------------- pause + results ---------------- */
#pause,#results{display:flex;align-items:center;justify-content:center;padding:16px;z-index:40}
.card{
  width:min(92vw,412px);max-height:92vh;overflow:auto;padding:18px;
  border-width:2.5px;border-radius:12px;
  box-shadow:10px 10px 0 var(--ink);
}
.wide-card{width:min(94vw,556px)}
.card-head{
  display:flex;justify-content:space-between;align-items:center;
  margin:-18px -18px 13px;padding:8px 16px;
  background-color:var(--ink);background-image:var(--grain);color:var(--paper);
  font-size:9.5px;font-weight:700;letter-spacing:.22em;border-radius:9px 9px 0 0;
}
.card-chev{color:var(--amber);font-size:16px;line-height:1}
.card h2{margin:0 0 4px;font-family:var(--display);font-weight:800;font-size:42px;line-height:.86;letter-spacing:.02em}
#results .card h2{font-size:46px}
.card-sub{margin:0 0 12px;font-size:8.5px;font-weight:700;letter-spacing:.15em;color:#6b563d}
.card-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-top:1.5px solid var(--ink);border-bottom:1.5px solid var(--ink);padding:9px 0;margin-bottom:4px}
.card-stats span{display:block;font-size:7.5px;letter-spacing:.14em;font-weight:700;color:#6b563d}
.card-stats b{font-family:var(--mono);font-size:14px;color:var(--green)}
.card-controls{display:flex;flex-wrap:wrap;gap:6px 13px;margin-top:12px;font-size:8px;font-weight:700;letter-spacing:.05em;color:#57452f}
.card-controls span{display:inline-flex;align-items:center;gap:4px}
.card-controls kbd{height:17px;min-width:17px;font-size:8px;border-bottom-width:2px}
.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px 16px;border-top:1.5px solid var(--ink);border-bottom:1.5px solid var(--ink);padding:10px 0;margin:4px 0 10px}
.result-grid span{display:block;font-size:8px;letter-spacing:.14em;font-weight:700;color:#6b563d}
.result-grid b{font-family:var(--display);font-weight:800;font-size:31px;line-height:.95}
.board{margin:0 0 6px}
.board-head{display:flex;justify-content:space-between;font-size:8px;font-weight:700;letter-spacing:.14em;border-bottom:2px solid var(--ink);padding-bottom:4px}
#boardList{list-style:none;margin:0;padding:0}
#boardList li{display:flex;justify-content:space-between;gap:10px;padding:4px 0;font-size:9.5px;border-bottom:1px solid #D8C6A4}
#boardList li span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#boardList li b{font-family:var(--mono);font-size:10px;white-space:nowrap}
#boardList li.mine{color:var(--green)}
#boardList li a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--terra)}
#boardList .board-empty{justify-content:center;color:#7a6449;font-size:8.5px;letter-spacing:.12em;border-bottom:none;padding:10px 0}

/* ---------------- boot ---------------- */
.boot{position:fixed;inset:0;z-index:90;background:#2a211a;display:flex;align-items:center;justify-content:center;transition:opacity .45s ease}
.boot.gone{opacity:0;pointer-events:none}
.boot-card{
  background-color:var(--paper);background-image:var(--grain);
  border:2.5px solid var(--ink);border-radius:10px;padding:20px 30px 18px;
  display:flex;flex-direction:column;gap:3px;text-align:center;
  box-shadow:9px 9px 0 var(--ink);
}
.boot-kicker{font-size:8px;font-weight:700;letter-spacing:.2em;color:#6b563d}
.boot-card b{font-family:var(--display);font-weight:800;font-size:32px;letter-spacing:.03em;line-height:1}
.boot-card i{font-family:var(--mono);font-style:normal;font-size:8px;letter-spacing:.14em;color:var(--terra)}

/* ---------------- responsive ---------------- */
@media (max-width:1100px){
  #routeCard{width:282px}
  .sp-keys{display:none}
  .sp-meta{gap:18px}
  #compassWrap{width:330px}
}
@media (max-width:900px){
  #compassWrap{display:none}
  #mapPlate{display:none}
  .hud-top{top:10px;left:10px;right:10px}
  #routeCard{width:min(62vw,300px);padding:8px 10px 9px}
  .rc-next b{font-size:21px}
  .rc-foot{font-size:7.5px}
  #speedPlate{left:10px;right:10px;bottom:10px;height:104px}
  #touchCtl{bottom:120px}
  .title-lockup{left:5vw;bottom:6vh;max-width:92vw}
  .controls-card{right:3vw;top:4.5vh;width:262px}
  .car-badge{display:none}
}
@media (max-width:700px){
  #guide{top:148px}
  #challenge{top:148px}
}
@media (max-width:760px){
  .rc-stats{gap:12px}
  .rc-stats div:nth-child(3){display:none}
  .speedWindow{min-width:0;padding-right:11px}
  .speedWindow b{font-size:clamp(44px,9vw,62px)}
  .sp-meta{gap:12px}
  .sp-meta div:nth-child(2){display:none}
  .gearTile{width:54px;height:54px}
  .gearTile b{font-size:29px}
  #speedPlate{height:96px;padding:6px 10px 8px}
  .guide-copy b{display:none}
  .title-lockup h1{font-size:clamp(54px,12vw,110px)}
  .tagline{display:none}
  .controls-card{top:40px;left:10px;right:10px;width:auto;max-height:45vh;overflow:auto}
  .cc-list{display:grid;grid-template-columns:1fr 1fr;column-gap:14px}
  .car-badge{display:none}
  .title-note{display:none}
}
@media (max-width:560px){
  #routeCard{width:calc(100vw - 150px)}
  .rc-head span:last-child{font-size:7.5px}
  .rc-next b{font-size:18px}
  .rc-stats{padding-top:5px}
  .rc-stats b{font-size:10.5px}
  .rc-foot{display:none}
  .hud-buttons{flex-direction:column;gap:6px}
  .pill{padding:7px 10px;font-size:8px}
  #speedPlate{height:92px}
  .speedWindow .unit{font-size:8px}
  .speedWindow b{font-size:clamp(40px,11vw,54px)}
  .sp-meta{display:none}
  #challenge{top:148px;width:94vw}
  #guide{top:148px}
  .title-lockup{bottom:5vh}
  .title-lockup h1{font-size:clamp(48px,14vw,80px)}
  .start-chip{font-size:19px;padding:10px 20px;margin-top:12px}
  .start-hint{font-size:7.5px}
  .title-band{height:25px;font-size:7.5px}
  .controls-card{top:32px;max-height:38vh}
  .cc-note{display:none}
  .cc-save{gap:12px}
  .tc-side button{width:58px;height:58px}
  .tc-side .tc-gas{width:68px;height:68px}
  .tc-side .tc-brake{width:62px;height:62px}
  .tc-side .tc-small{width:52px;height:52px}
  #touchCtl{bottom:110px}
  .card{padding:15px}
  .card-head{margin:-15px -15px 12px;padding:7px 14px}
}
@media (max-height:560px){
  #mapPlate{display:none}
  .title-lockup{bottom:4vh}
  .title-lockup h1{font-size:clamp(46px,8.5vh,84px)}
  .tagline{display:none}
  .controls-card{top:36px;max-height:52vh;overflow:auto}
  .car-badge{display:none}
  .title-note{display:none}
  #speedPlate{height:90px;bottom:8px}
  .rev{height:7px}
  #touchCtl{bottom:106px}
  #challenge,#guide{top:64px}
  #challenge .ch-main b{font-size:32px}
}
@media (max-height:430px) and (orientation:landscape){
  .title-lockup h1{font-size:clamp(42px,16vh,76px)}
  .km-tick,.title-chevrons{display:none}
  .start-chip{margin-top:9px;padding:8px 18px;font-size:17px}
  .start-hint{display:none}
  .controls-card{width:240px;padding:0 12px 9px;max-height:78vh}
  .cc-head{margin:0 -12px 7px;padding:5px 12px}
  .cc-list li{padding:3px 0}
  .cc-note{display:none}
  .cc-touch{display:block}
  .car-badge,.title-note{display:none}
  .title-band{height:22px}
  #routeCard{width:250px}
  .rc-foot{display:none}
  .rc-stats div:nth-child(3){display:none}
  #speedPlate{height:84px}
  .gearTile{width:48px;height:48px}
  .rev{height:6px}
  #touchCtl{bottom:98px}
  .tc-side button{width:54px;height:54px}
  .tc-side .tc-gas{width:62px;height:62px}
}

/* ---------------- car view ---------------- */
.title-actions{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin-top:16px}
.title-actions .start-chip{margin-top:0}
.view-chip{
  display:inline-flex;align-items:center;gap:9px;
  background-color:var(--paper-pale);background-image:var(--grain);
  border:2px solid var(--ink);border-radius:999px;
  padding:10px 19px;cursor:pointer;
  font-family:var(--display);font-weight:800;font-size:18px;letter-spacing:.04em;color:var(--ink);
  box-shadow:4px 4px 0 rgba(36,31,28,.45);
}
.view-chip span{color:var(--magenta);font-size:20px;line-height:.7}
.view-chip:hover{background-color:var(--paper)}
.view-chip:active{transform:translate(2px,2px);box-shadow:2px 2px 0 rgba(36,31,28,.45)}
#garage{pointer-events:none;z-index:35}
#garage .plate,#garage .start-chip{pointer-events:auto}
.garage-head{
  position:absolute;top:18px;left:50%;transform:translateX(-50%);
  padding:9px 16px;display:flex;align-items:center;gap:22px;white-space:nowrap;
}
.gh-title{display:flex;flex-direction:column;gap:1px}
.gh-title span{font-size:8px;letter-spacing:.16em;font-weight:700;color:#6b563d}
.gh-title b{font-family:var(--display);font-weight:800;font-size:24px;line-height:.9;letter-spacing:.02em}
.gh-meta{font-size:8px;letter-spacing:.12em;font-weight:700;color:var(--terra);border-left:1px solid var(--line);padding-left:20px}
.garage-foot{
  position:absolute;left:16px;right:16px;bottom:16px;
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;
}
.garage-hint{padding:9px 14px;display:flex;flex-direction:column;gap:2px}
.garage-hint b{font-family:var(--display);font-weight:800;font-size:20px;line-height:1;letter-spacing:.04em}
.garage-hint span{font-size:8px;letter-spacing:.13em;color:#6b563d;font-weight:700}
#garage .start-chip.small{margin:0}
@media (max-width:900px){
  #hud.challenge-live #routeCard{display:none}
}
@media (max-width:560px){
  .title-actions{gap:8px}
  .view-chip{font-size:15px;padding:8px 14px}
  .garage-head{top:10px;left:10px;right:10px;transform:none;white-space:normal;gap:10px;flex-wrap:wrap}
  .gh-title b{font-size:20px}
  .gh-meta{border-left:none;padding-left:0;font-size:7px}
  .garage-foot{left:10px;right:10px;bottom:10px;gap:8px}
  .garage-hint{padding:7px 10px}
  .garage-hint b{font-size:16px}
  .garage-hint span{font-size:7px}
}
@media (max-height:430px) and (orientation:landscape){
  .title-actions{margin-top:9px;gap:8px}
  .start-chip{padding:8px 18px;font-size:17px}
  .view-chip{font-size:14px;padding:7px 13px}
  .garage-head{top:8px;padding:6px 12px}
  .gh-title b{font-size:18px}
  .gh-meta{display:none}
  .garage-foot{bottom:8px;left:10px;right:10px}
  .garage-hint b{font-size:15px}
  .garage-hint span{font-size:7px}
}
