@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap');
:root{font-family:'Barlow',Arial,sans-serif;color:#16313a;--orange:#ef6b40;--ink:#18323b;--cream:#edf3f3;--heading:'Barlow Condensed','Arial Narrow',Impact,sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#b7d2dd}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid var(--orange);outline-offset:5px}button{border:0}button:disabled{cursor:wait}#game{display:block;width:100vw;height:100dvh;position:fixed;inset:0;touch-action:none}#vignette{pointer-events:none;position:fixed;inset:0;background:linear-gradient(90deg,rgba(220,232,235,.93) 0%,rgba(220,232,235,.6) 24%,transparent 58%),linear-gradient(0deg,rgba(8,30,40,.2),transparent 28%);transition:opacity 1s}body.racing #vignette{opacity:0}header{position:fixed;top:0;left:0;right:0;padding:30px 42px;display:flex;align-items:center;justify-content:space-between;z-index:4}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-size:28px;font-family:var(--heading);font-weight:800;letter-spacing:1px;line-height:1}.brand svg{width:38px;height:36px}.brand small{display:block;font:600 9px 'Barlow',sans-serif;letter-spacing:2.1px;margin-top:7px}.light{font-weight:500}.header-right{display:flex;gap:20px;align-items:center}.weather{font-size:11px;letter-spacing:1.5px;font-weight:700;display:flex;align-items:center;gap:10px}.weather svg{width:21px;height:21px}.weather span{opacity:.35;margin:0 4px}.icon-button{background:#edf4f357;border:1px solid #19323a33;color:var(--ink);border-radius:50%;width:40px;height:40px;display:grid;place-items:center;font-size:18px}.icon-button svg{width:19px;height:19px}#lights.off svg{opacity:.38}#civilian.on{background:#16191b;color:#edf3f3;border-color:#16191b}.panel{position:fixed;left:7.4%;z-index:2}.intro{top:50%;transform:translateY(-45%);width:470px}.eyebrow{font-size:11px;letter-spacing:2.5px;font-weight:700;display:flex;align-items:center;gap:10px}.eyebrow>span:first-child{background:var(--orange);width:20px;height:2px}.eyebrow i{font-style:normal;font-size:10px;letter-spacing:1px;margin-left:10px;border:1px solid #16313a50;padding:3px 7px}h1{font-family:var(--heading);font-weight:800;line-height:.91;font-size:clamp(64px,6.9vw,108px);letter-spacing:-1.5px;margin:24px 0 25px}h1 em{font-style:normal;color:var(--orange)}.intro-copy{line-height:1.8;font-size:15px;color:#415a62;margin-bottom:28px}.route-facts{display:flex;margin:0 0 29px;gap:28px}.route-facts>div{display:flex;flex-direction:column;border-right:1px solid #17323c28;padding-right:28px}.route-facts>div:last-child{border:0;padding-right:0}.route-facts strong{font:600 30px var(--heading);white-space:nowrap}.route-facts span{font-size:9px;font-weight:600;letter-spacing:1.6px;margin-top:4px}.primary{background:var(--orange);color:#fff;font-size:12px;font-weight:700;letter-spacing:1.8px;min-height:54px;padding:0 27px;display:flex;align-items:center;justify-content:space-between;gap:50px;transition:background .2s,transform .2s}.primary:hover{background:#dc582f;transform:translateY(-2px)}.primary>span{font-size:19px;font-weight:400}.intro>.primary{width:264px}.menu-options{display:flex;gap:18px;align-items:center;margin-top:18px}.menu-options>button{padding:0;background:none;color:#2b4650;font-size:12px}.menu-options>button span{border:1px solid #2b465060;border-radius:50%;padding:0 4px;margin-left:4px;font-size:10px}.menu-options>span{font-size:9px;letter-spacing:1px;opacity:.6}.map-panel{position:fixed;right:40px;bottom:72px;width:253px;padding:16px 17px 12px;background:#16303bd9;color:#e1ecef;backdrop-filter:blur(14px);border:1px solid #ffffff20;z-index:3}.map-heading{font-size:10px;letter-spacing:1.4px;font-weight:700}.map-heading>span{display:block;font-size:8px;letter-spacing:1.5px;color:#afc5cd;margin-top:5px}.map-panel canvas{width:100%;height:154px;display:block;margin:6px 0 0}.map-footer{display:flex;justify-content:space-between;align-items:center;font-size:8px;letter-spacing:.9px;color:#b9ccd3}.map-footer i{display:inline-block;background:var(--orange);width:5px;height:5px;margin-right:5px}footer{position:fixed;bottom:26px;left:42px;right:42px;display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.5px;color:var(--ink);z-index:3}footer b{margin-left:24px;font-weight:600}#race-hud{position:fixed;left:42px;top:120px;z-index:2}.timing{background:#16303be8;backdrop-filter:blur(12px);color:#e9f0f1;padding:21px 24px 18px;width:285px;border-top:2px solid var(--orange)}.timing .eyebrow{font-size:9px;justify-content:space-between;letter-spacing:1.6px}.timing .eyebrow>span:first-child{background:none;width:auto;height:auto;font-size:8px;color:#a4bbc5}#timer{font:600 55px var(--heading);font-variant-numeric:tabular-nums;line-height:1.3;margin:7px 0}#timer>span{font-size:32px;color:#aec5cf}.timing-bottom{display:flex;justify-content:space-between;gap:10px;font-size:8px;letter-spacing:1px;color:#acc4cb}.timing-bottom b{color:#e8f0f1;font-weight:500;margin-left:4px}#split{color:#edb394}.progress{height:2px;background:#ffffff25;margin-top:20px}#progress-fill{height:100%;width:0;background:var(--orange);transition:width .2s}.checkpoint-label{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.4px;margin-top:9px;color:#b8ccd4}#driving-hud{position:fixed;bottom:40px;left:42px;z-index:3}.speed{position:relative;display:flex;align-items:center;color:#17343d;gap:14px;text-shadow:0 1px 20px #d9e7e8}.speed>span{font:600 85px var(--heading);line-height:1;font-variant-numeric:tabular-nums;min-width:100px}.speed>div{font-weight:700;font-size:12px;letter-spacing:2px}.speed small{display:block;font-size:8px;margin-top:8px;letter-spacing:1.4px;opacity:.7}.speed>svg{position:absolute;bottom:-12px;width:210px;height:8px}.driving-tips{display:flex;gap:18px;margin-top:36px;font-size:8px;font-weight:600;letter-spacing:1px}kbd{font:500 10px 'Barlow',sans-serif;display:inline-grid;place-items:center;height:21px;min-width:21px;border:1px solid #19313a50;background:#ecf3f180;border-radius:3px;margin-right:4px}.driving-tips kbd+kbd{margin-left:-2px}#countdown{position:fixed;inset:0;display:grid;place-items:center;font:800 150px var(--heading);color:#fff;text-shadow:0 5px 60px #173b5070;z-index:5;pointer-events:none}#toast{margin-top:14px;font-size:12px;font-weight:600;max-width:285px;background:#e9f1f2e6;padding:12px 17px;opacity:0;transition:opacity .25s}#toast.visible{opacity:1}.hidden{display:none!important}.overlay{position:fixed;inset:0;background:#10273080;backdrop-filter:blur(10px);display:grid;place-items:center;z-index:10;padding:20px}.dialog{background:#edf3f3;padding:36px 40px;max-width:490px;width:100%;box-shadow:0 24px 100px #10253240;border-top:3px solid var(--orange)}h2{font:700 49px var(--heading);margin:14px 0 22px;line-height:1}.dialog p{font-size:14px;line-height:1.7;color:#48606a}.dialog .help-row{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #18323b20;font-size:13px;align-items:center}.dialog .help-row>span:last-child{font-size:11px;color:#48606a}.dialog .result-time{font:600 75px var(--heading);line-height:1.2;color:var(--orange);font-variant-numeric:tabular-nums}.dialog .result-stats{display:flex;gap:32px;margin:20px 0 26px}.result-stats strong{display:block;font:600 24px var(--heading)}.result-stats small{font-size:9px;letter-spacing:1px;color:#48606a}.dialog-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.secondary{background:transparent;border:1px solid #18323b40;padding:15px 20px;font-size:11px;font-weight:600;letter-spacing:1px;color:var(--ink)}#touch-controls{display:none;position:fixed;bottom:18px;left:18px;right:18px;justify-content:space-between;z-index:4;pointer-events:none}#touch-controls>div{display:flex;gap:10px}#touch-controls button{touch-action:none;pointer-events:auto;background:#16303bbf;color:#fff;width:60px;height:60px;border:1px solid #ffffff60;font-size:11px;font-weight:700;border-radius:8px;user-select:none}#touch-controls button[data-control=throttle]{background:#ef6b40cc}#loading{position:fixed;inset:0;z-index:20;background:#dce8ec;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:26px}#loading>.brand{font-size:44px;gap:0}#loading>span{font-size:10px;letter-spacing:3px}.loading-line{width:180px;height:2px;background:#18323b20;position:relative;overflow:hidden}.loading-line:after{content:'';position:absolute;background:var(--orange);height:100%;width:40%;animation:load 1.2s infinite}@keyframes load{from{left:-40%}to{left:100%}}@media(min-width:1600px){.intro{left:9%}.map-panel{width:285px}.map-panel canvas{height:180px}}@media(max-width:900px){header{padding:22px 25px}.panel{left:6%}.intro{width:390px}.map-panel{right:24px;width:205px;bottom:63px}.map-panel canvas{height:125px}footer{left:25px;right:25px}footer span:last-child{font-size:8px}#race-hud{left:25px;top:100px}#driving-hud{left:25px;bottom:28px}.driving-tips{gap:9px}.weather{font-size:9px}.header-right{gap:12px}}@media(max-width:600px){header{padding:19px 20px}.brand{font-size:25px}.brand svg{width:30px}.brand small{font-size:7px;letter-spacing:1.6px}.weather{font-size:10px;letter-spacing:0}.weather span,.weather svg{display:none}.header-right{gap:9px}.icon-button{width:33px;height:33px}.intro{top:44%;transform:translateY(-35%);width:88%;left:7%}h1{font-size:73px;margin:20px 0}.intro-copy{font-size:13px;line-height:1.65;margin-bottom:20px}.eyebrow{font-size:9px}.route-facts{gap:20px;margin-bottom:22px}.route-facts>div{padding-right:20px}.route-facts strong{font-size:25px}.route-facts span{font-size:8px}.intro>.primary{min-height:50px;width:240px}.menu-options>span{font-size:8px}.map-panel{width:150px;right:18px;bottom:29px;padding:12px}.map-panel canvas{height:92px}.map-heading{font-size:8px}.map-heading>span{font-size:6px}.map-footer{font-size:6px}.map-footer>span:last-child{display:none}footer{bottom:20px;left:20px;font-size:7px;width:140px;line-height:1.7}footer span:last-child{display:none}#vignette{background:linear-gradient(90deg,#dae7eade,rgba(220,232,235,.55) 60%,#dae7ea25)}body.racing .map-panel{bottom:100px;width:138px}#race-hud{left:18px;top:89px}.timing{width:219px;padding:16px 18px}#timer{font-size:44px}.timing .eyebrow{font-size:8px;letter-spacing:1px}.timing .eyebrow>span:first-child{font-size:7px}.timing-bottom{font-size:7px;letter-spacing:.5px}#driving-hud{left:20px;bottom:112px}.speed>span{font-size:64px;min-width:75px}.speed>div{font-size:10px}.speed>svg{width:155px}.driving-tips{display:none}body.racing #touch-controls{display:flex}.dialog{padding:28px}h2{font-size:42px}.dialog .result-time{font-size:64px}#toast{max-width:219px;font-size:11px}}@media(pointer:coarse){body.racing #touch-controls{display:flex}.driving-tips{display:none}#driving-hud{bottom:110px}body.racing .map-panel{bottom:110px}}@media(max-height:600px) and (min-width:601px){header{padding:15px 25px}.intro{top:51%;transform:translateY(-40%)}h1{font-size:67px;margin:15px 0}.intro-copy{margin:10px 0;font-size:12px}.route-facts{margin:15px 0;gap:20px}.route-facts strong{font-size:23px}.primary{min-height:45px}.menu-options{margin-top:12px}footer{bottom:15px}.map-panel{bottom:40px}.timing{padding:14px 20px}#race-hud{top:80px}#timer{font-size:40px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

#touch-controls #touch-recover{position:absolute;bottom:74px;left:50%;transform:translateX(-50%);width:105px;height:32px;font-size:9px;letter-spacing:1px;background:#16303b9e}

#touch-controls #touch-wheelie {
  position: absolute;
  right: 0;
  bottom: 70px;
  height: 40px;
  background: #16303bd9;
}
#touch-controls #touch-wheelie:active {
  background: #ef6b40;
}
.driving-tips kbd:last-child {
  padding-inline: 4px;
}

#snow-depth {
  opacity: .83;
  letter-spacing: .095em;
  margin-top: 4px;
}
.map-footer .jump-key {
  color: #c7ebf6;
}
.dialog {
  max-height: 92dvh;
  overflow-y: auto;
}
#rescue-banner {
  margin-top: 9px;
  max-width: 285px;
  padding: 12px 15px;
  border-left: 3px solid #65d9ff;
  background: #15394a;
  color: #e0f6fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
}
#cafe-open {
  position: fixed;
  bottom: 122px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  white-space: nowrap;
}
#cafe-open:disabled {
  background: #193640e8;
  cursor: default;
}
body.walking :is(#race-hud,#driving-hud,.map-panel,#touch-controls,.weather) {
  display: none;
}
body.walking header .brand { color: #fbf4ea; text-shadow: 0 1px 10px #20150d; }
body.walking header .icon-button { color: #fff7e9; background: #251a14b5; border-color: #ffffff63; }
#cafe-walk { position: fixed; inset: 0; z-index: 3; pointer-events: none; color: #f8e9d9; }
.walk-location {
  position: absolute;
  left: 42px;
  top: 110px;
  min-width: 194px;
  padding: 13px 17px;
  display: grid;
  gap: 4px;
  background: #231c17ed;
  border-top: 2px solid #e89f64;
}
.walk-location strong { font: 600 26px var(--heading); }
.walk-location span { font-size: 14px; font-weight: 600; }
.walk-location small { color: #e7c3a3; font-size: 11px; }
.walk-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 100%;
  background: #fff3dc;
  box-shadow: 0 0 0 1px #302117a0;
}
#walk-use, #walk-notice {
  position: absolute;
  bottom: 102px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
#walk-use { pointer-events: auto; gap: 16px; }
#walk-use-label { font-size: 13px; font-weight: 700; }
#walk-use:disabled { background: #33251c; cursor: default; }
#walk-use kbd { color: white; background: #271c1373; }
#walk-notice {
  bottom: 166px;
  margin: 0;
  background: #231c17ef;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
}
.walk-keyboard {
  position: absolute;
  left: 50%;
  bottom: 37px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #231c17e6;
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: .08em;
}
.walk-keyboard kbd { color: #fff5e6; background: #ffffff26; margin-left: 7px; }
.walk-touch { display: none; }
@media (max-width: 600px), (pointer: coarse) {
  .walk-location { top: 86px; left: 20px; }
  .walk-keyboard { display: none; }
  .walk-touch {
    position: absolute;
    display: flex;
    justify-content: space-between;
    left: 18px;
    right: 18px;
    bottom: 20px;
  }
  .walk-touch button {
    pointer-events: auto;
    touch-action: none;
    width: 52px;
    height: 52px;
    margin-right: 4px;
    border: 1px solid #ffffff68;
    border-radius: 6px;
    background: #231c17d9;
    color: #fff1e7;
  }
  #walk-notice { white-space: normal; width: max-content; max-width: 88vw; }
}
.map-footer .cafe-key { color: #efbe85; }
#equipment-name { letter-spacing: .04em; }

.map-footer .lift-key { color: #efab5c; }
#lift-board {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  min-width: 275px;
  padding: 12px 14px;
  background: #163540ef;
  color: #fff2e2;
}
#lift-board strong, #lift-ride strong { font: 700 24px var(--heading); }
#lift-stop { display: block; margin-top: 5px; font-size: 14px; }
#lift-options { display: flex; gap: 8px; margin-top: 8px; }
#lift-options .primary { gap: 8px; min-height: 40px; padding: 0 10px; }
#lift-options kbd { color: #fff5e8; background: #271c1355; }
body.lift-riding :is(#driving-hud,#race-hud,#touch-controls,#lift-board) { display: none; }

#modal .dialog {
  max-height: calc(100dvh - 40px);
  overflow: auto;
}

#trick-score {
  color: #7c3420;
  opacity: 1;
}
#grab-help {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
}
#touch-controls #touch-grabs {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  gap: 4px;
}
#touch-controls #touch-grabs button {
  width: 64px;
  height: 39px;
  font-size: 10px;
  background: #173c4bef;
}
#touch-controls #touch-grabs button:active { background: #a34125; }
@media (max-width: 600px), (pointer: coarse) {
  #grab-help { display: none; }
}
#lift-ride {
  position: fixed;
  top: 108px;
  left: 42px;
  z-index: 3;
  width: 242px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  padding: 12px 15px;
  background: #173c4be8;
  color: #eff6fa;
  border-top: 2px solid #efb26b;
}
#lift-ride b { font-size: 14px; font-variant-numeric: tabular-nums; }
#lift-ride progress { grid-column: 1/-1; width: 100%; height: 7px; accent-color: #efb26b; }
#lift-ride small { color: #d9e1e6; font-size: 12px; }
@media (max-width: 600px) {
  #lift-ride { top: 88px; left: 20px; width: 205px; }
  #lift-options kbd { display: none; }
  .map-footer .lift-key { display: none; }
}

.map-footer span { white-space: nowrap; }
#map-progress { position: absolute; right: 17px; top: 16px; }

.intro>.speedway{width:264px;margin-top:10px;display:flex;justify-content:space-between;align-items:center;background:#edf4f3a8}
.intro>.speedway:hover{background:#fff}
.intro>.speedway>span{font-size:15px}
/* Weather strip: the arrow shows where the wind blows on screen. */
.weather .wind { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.weather #weather-sky, .weather #clock { white-space: nowrap; }
.weather #wind-arrow { display: inline-flex; transition: transform .4s ease-out; }
.weather #wind-arrow svg { display: block; width: 13px; height: 13px; }
.weather em { font-style: normal; }
/* After dark the dark ink would vanish against the sky and the snow. */
body.night :is(.weather, .speed, .driving-tips, #grab-help), body.night.racing .brand { color: #e4eef1; }
body.night .speed { text-shadow: 0 1px 18px #04101a; }
body.night .shifter-caption { color: #e4eef1; text-shadow: 0 1px 12px #04101a; }
body.night .icon-button { color: #e9f2f4; background: #0e1d2599; border-color: #ffffff45; }
body.night :is(.driving-tips, #grab-help) kbd { background: #0e1d2588; border-color: #ffffff55; }
@media (max-width: 600px) {
  /* No room for one line beside the buttons: wind above, sky below. */
  .weather { flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.25; }
  .weather em, .weather #clock, .weather #clock + span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .weather #wind-arrow { transition: none; }
}

/* Gear lever: forward / neutral / reverse, worked with the mouse */
.shifter { position: fixed; right: 312px; bottom: 72px; width: 92px; z-index: 4; user-select: none; touch-action: none; filter: drop-shadow(0 10px 24px #10253255); }
.shifter svg { display: block; width: 100%; height: auto; cursor: grab; }
.shifter.dragging svg { cursor: grabbing; }
.shifter .shifter-label { cursor: pointer; }
.shifter .shifter-label text { font-family: var(--heading); transition: fill .15s; }
.shifter .shifter-label text.active { fill: var(--orange); }
.shifter[data-gear=R] .shifter-label text.active { fill: #ff5a4a; }
.shifter-caption { margin-top: 4px; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; color: #17343d; text-shadow: 0 1px 12px #d9e7e8; }
.shifter.refused { animation: shifter-refuse .3s; }
@keyframes shifter-refuse { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@media (max-width: 900px) { .shifter { right: 244px; bottom: 63px; width: 80px; } }
@media (max-width: 600px), (pointer: coarse) { .shifter { right: 18px; bottom: auto; top: 140px; width: 66px; } }
#replay{display:none;position:fixed;inset:0;pointer-events:none;z-index:6}body.replaying #replay{display:block}#replay:before,#replay:after{content:'';position:absolute;left:0;right:0;height:9vh;background:#0b1519;animation:replay-top .35s ease-out both}#replay:before{top:0}#replay:after{bottom:0;animation-name:replay-bottom}.replay-mark{position:absolute;top:calc(9vh + 20px);left:42px;display:flex;align-items:center;gap:10px;font:700 24px var(--heading);letter-spacing:4px;color:#fff;text-shadow:0 1px 14px #0b151999}.replay-mark i{width:11px;height:11px;border-radius:50%;background:#e5392b;animation:replay-blink 1s steps(2) infinite}.replay-skip{position:absolute;right:42px;bottom:calc(9vh + 18px);font-size:10px;font-weight:600;letter-spacing:1.5px;color:#edf3f3;text-shadow:0 1px 10px #0b151999}body.replaying #race-hud,body.replaying #driving-hud,body.replaying .map-panel,body.replaying header,body.replaying footer,body.replaying #touch-controls,body.replaying #touch-foot{display:none!important}@keyframes replay-top{from{transform:translateY(-100%)}}@keyframes replay-bottom{from{transform:translateY(100%)}}@keyframes replay-blink{50%{opacity:0}}@media(max-width:600px){.replay-mark{left:20px;font-size:19px}.replay-skip{right:20px}}

.sled-choice{display:flex;gap:6px;border:0;padding:0;margin:0 0 14px;min-width:0}
.sled-choice legend{padding:0;margin-bottom:5px;font-size:10px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase}
.sled-choice button{padding:8px 11px;border:1px solid #19313a50;background:#edf4f3a8;color:var(--ink);font-size:12px;font-weight:600}
.sled-choice button[aria-pressed=true]{background:#18323b;color:#edf4f3;border-color:#18323b}
.sled-choice button:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.sled-choice button:disabled{opacity:.50;cursor:not-allowed}
@media(max-height:730px){.intro .intro-copy{margin-bottom:12px}.intro .route-facts{margin-bottom:13px}}
