@font-face { font-family: "Cabin Sketch"; font-weight: 400; font-display: swap; src: url("fonts/cabin-sketch-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cabin Sketch"; font-weight: 700; font-display: swap; src: url("fonts/cabin-sketch-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Patrick Hand"; font-weight: 400; font-display: swap; src: url("fonts/patrick-hand-latin-400-normal.woff2") format("woff2"); }

:root {
  --ink: #1f1f24;
  --ink-soft: #55565f;
  --paper: #f4f1ea;
  --paper-2: #fbfaf6;
  --accent: #ff6b35;
  --tape: rgba(120, 170, 255, .55);
  --night: 0;
  --road-h: 100px;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --sketch: "Cabin Sketch", "Patrick Hand", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--hand);
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scroll-space { height: 1000vh; }
.paper-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .28  0 0 0 0 .25  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.sky { position: absolute; inset: 0; background: var(--paper); }
.sky-wash { position: absolute; inset: 0; opacity: .55; }
.sun, .moon { position: absolute; left: 0; top: 0; will-change: transform; }
.sun svg, .moon svg { display: block; overflow: visible; }
.sun svg { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.layer { position: absolute; left: 0; bottom: 0; will-change: transform; }
.layer svg { display: block; overflow: visible; }
#clouds { top: 0; bottom: auto; }
#far, #mid, #near { bottom: calc(var(--road-h) + 14px); }

.ground { height: 100%; }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: var(--road-h); background: var(--paper-2); border-top: 2.5px solid var(--ink); }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; border-top: 1.5px solid var(--ink-soft); opacity: .6; }
.road-line { position: absolute; left: 0; right: 0; top: 52%; height: 4px; background: repeating-linear-gradient(90deg, var(--ink) 0 38px, transparent 38px 92px); opacity: .8; }
.road-edge { position: absolute; left: 0; right: 0; bottom: 6px; height: 10px; background: repeating-linear-gradient(115deg, transparent 0 9px, rgba(31,31,36,.35) 9px 10.5px); }
.landmark { position: absolute; bottom: calc(var(--road-h) - 2px); }
.landmark > svg { display: block; overflow: visible; }

/* Night */
.night { position: absolute; inset: 0; background: #10132f; opacity: calc(var(--night) * .72); mix-blend-mode: multiply; pointer-events: none; }
.stars { position: absolute; inset: 0 0 35% 0; opacity: var(--night); pointer-events: none; }
.stars span { position: absolute; color: #fdf6d8; font: 700 14px var(--hand); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.8) rotate(20deg); } }
.moon { opacity: var(--night); }
#glow { opacity: var(--night); pointer-events: none; }
#glow .lamp { position: absolute; bottom: calc(var(--road-h) + 136px); width: 160px; height: 160px; margin-left: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, .85) 0 8%, rgba(255, 200, 90, .25) 30%, transparent 68%); }
#glow .warm { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 92, .55), transparent 70%); }
#glow .bulb { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 10px 4px rgba(255, 210, 100, .7); animation: twinkle 2.4s ease-in-out infinite; }

/* ---------- Rider ---------- */
.rider { position: absolute; left: 0; bottom: calc(var(--road-h) - 62px); width: 240px; z-index: 4; will-change: transform; cursor: pointer; }
.rider svg { width: 100%; overflow: visible; display: block; }
.rider .ink { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rider .tyre { fill: none; stroke: var(--ink); stroke-width: 7; }
.rider .tread { fill: none; stroke: var(--paper-2); stroke-width: 2; stroke-dasharray: 3 7; }
.rider .scarf { transform-origin: 136px 36px; animation: flap .28s ease-in-out infinite alternate; animation-play-state: paused; }
.rider.moving .scarf { animation-play-state: running; }
@keyframes flap { from { transform: skewY(-6deg) scaleX(.94); } to { transform: skewY(5deg) scaleX(1.06); } }
.beam {
  position: absolute; left: 0; bottom: 0; width: 520px; height: 180px; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 0% 50%, rgba(255, 236, 170, .75), rgba(255, 236, 170, .18) 45%, transparent 70%);
  clip-path: polygon(0 44%, 100% 0, 100% 100%, 0 56%);
  opacity: var(--night); will-change: transform; mix-blend-mode: screen;
}
.speedlines { position: absolute; left: 0; bottom: calc(var(--road-h) + 30px); width: 160px; height: 90px; z-index: 3; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.speedlines i { position: absolute; height: 2px; background: var(--ink); border-radius: 2px; animation: dash .35s linear infinite; }
@keyframes dash { from { transform: translateX(40px); opacity: 0; } 40% { opacity: 1; } to { transform: translateX(-60px); opacity: 0; } }
.puff { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border: 2px solid var(--ink-soft); border-radius: 50%; background: rgba(251, 250, 246, .7); z-index: 3; pointer-events: none; will-change: transform, opacity; }

.thought {
  position: absolute; left: 46%; bottom: calc(100% + 18px); width: 270px; padding: 12px 16px; z-index: 5;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: 26px 30px 24px 32px;
  opacity: 0; transform: translateY(10px) scale(.92); transform-origin: bottom left; transition: opacity .35s, transform .35s; pointer-events: none;
}
.thought.show { opacity: 1; transform: none; }
.thought::before, .thought::after { content: ""; position: absolute; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 50%; }
.thought::before { width: 16px; height: 16px; left: 18px; bottom: -22px; }
.thought::after { width: 9px; height: 9px; left: 8px; bottom: -36px; }
.thought p { margin: 0; font-size: 17px; line-height: 1.25; }
.thought small { display: block; margin-top: 4px; color: var(--accent); font-size: 14px; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 18px; padding: 12px 20px; pointer-events: none; }
.hud > * { pointer-events: auto; }
/* Brand: an Indian number plate */
.plate { display: inline-flex; align-items: stretch; margin-top: 4px; background: #fff; border: 2.5px solid var(--ink); border-radius: 7px; overflow: hidden; text-decoration: none; box-shadow: 2px 3px 0 rgba(31,31,36,.18); transform: rotate(-2deg); transition: transform .2s; }
.plate:hover, .plate:focus-visible { transform: rotate(0) scale(1.04); }
.plate .ind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 3px 6px; background: #2a4fb5; color: #fff; font: 700 10px/1 var(--hand); letter-spacing: .5px; }
.plate .ind i { width: 10px; height: 10px; border: 1.6px solid #fff; border-radius: 50%; }
.plate b { font: 700 21px/1 var(--sketch); letter-spacing: 2.5px; padding: 7px 11px 5px; color: var(--ink); }
.route { position: relative; flex: 1; height: 30px; max-width: 620px; margin: 10px auto 0; }
.route-track { position: absolute; left: 0; right: 0; top: 11px; border-top: 2px dashed var(--ink); opacity: .55; }
.route-fill { position: absolute; left: 0; top: 10px; height: 4px; width: 0; background: var(--accent); border-radius: 4px; }
.route-bike { position: absolute; top: -10px; left: 0; margin-left: -14px; z-index: 1; pointer-events: none; }
.route-bike svg { display: block; }
.route button { position: absolute; top: 4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-2); cursor: pointer; padding: 0; }
.route button.done { background: var(--ink); }
.route button span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.route button:hover span, .route button:focus-visible span, .route button.current span { opacity: 1; }
.hud-buttons { display: flex; gap: 8px; margin-left: auto; }
.sq {
  position: relative; display: grid; place-items: center; min-width: 50px; height: 50px; padding: 0 12px;
  background: var(--paper-2); border: 2px solid var(--ink); cursor: pointer; text-decoration: none; font-size: 17px;
  clip-path: polygon(0 4%, 8% 0, 20% 3%, 34% 0, 50% 2%, 66% 0, 80% 3%, 92% 0, 100% 4%, 100% 100%, 0 100%);
  border-top: 0;
}
.sq:hover { background: #fff; transform: translateY(1px); }
.sq svg { width: 24px; height: 24px; }
.sq .badge { position: absolute; right: 3px; bottom: 2px; font-size: 12px; color: var(--accent); }

/* Speedometer */
.speedo { position: fixed; z-index: 20; right: 18px; bottom: 14px; width: 128px; pointer-events: none; }
.speedo svg { width: 100%; display: block; overflow: visible; }
.speedo .needle { transition: transform .12s linear; transform-origin: 64px 64px; }

/* ---------- Hero ---------- */
.hero { position: absolute; left: 0; right: 0; top: 11vh; text-align: center; padding: 0 16px; z-index: 5; pointer-events: none; will-change: opacity, transform; }
.hero .eyebrow { font-size: 22px; margin: 0; color: var(--ink-soft); }
.hero h1 { font: 700 clamp(56px, 11vw, 140px)/0.9 var(--sketch); margin: 4px 0 0; letter-spacing: 2px; }
.hero h1 span { color: var(--accent); }
.hero .role { font-size: clamp(20px, 2.6vw, 30px); margin: 10px 0 2px; letter-spacing: 3px; color: var(--ink-soft); }
.hero .role b { color: var(--ink); font-weight: 400; }
.doodles { position: absolute; inset: 0; z-index: 5; pointer-events: none; will-change: opacity; }
.doodles span { position: absolute; font-size: 26px; color: var(--ink-soft); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(8deg); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translate(-50%, 140%);
  display: flex; gap: 14px; align-items: center; min-width: 300px; max-width: calc(100vw - 32px);
  padding: 14px 26px; background: var(--paper-2);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.18));
  clip-path: polygon(0 8%, 3% 0, 6% 6%, 10% 1%, 15% 5%, 22% 0, 30% 4%, 38% 0, 46% 5%, 55% 1%, 63% 5%, 72% 0, 80% 4%, 88% 1%, 94% 6%, 97% 0, 100% 8%, 98% 50%, 100% 92%, 96% 100%, 90% 95%, 82% 100%, 74% 96%, 66% 100%, 56% 95%, 46% 100%, 36% 96%, 26% 100%, 16% 95%, 8% 100%, 3% 95%, 0 92%, 2% 50%);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.2);
}
.toast.show { transform: translate(-50%, 0); }
.toast .box { width: 30px; height: 30px; border: 2.5px solid var(--ink); border-radius: 4px; flex: none; display: grid; place-items: center; font-size: 22px; color: var(--accent); }
.toast h4 { margin: 0; font: 700 21px var(--sketch); letter-spacing: 1px; }
.toast p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.toast button { background: none; border: 0; padding: 0 2px; cursor: pointer; border-bottom: 2px dashed var(--ink); color: var(--ink); }

/* ---------- Panels ---------- */
.panel {
  position: fixed; z-index: 25; top: 74px; right: 20px; width: min(360px, calc(100vw - 32px)); max-height: calc(100svh - 110px); overflow: auto;
  background: var(--paper-2); border: 2px solid var(--ink); padding: 16px 20px; box-shadow: 5px 5px 0 rgba(31,31,36,.18);
  transform: translateY(-10px) rotate(-1deg); opacity: 0; pointer-events: none; transition: .25s;
}
.panel.open { opacity: 1; transform: none; pointer-events: auto; }
.panel h3 { font: 700 24px var(--sketch); margin: 0 0 8px; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1.5px dashed rgba(31,31,36,.25); align-items: flex-start; }
.panel li .box { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 3px; flex: none; display: grid; place-items: center; color: var(--accent); font-size: 18px; margin-top: 2px; }
.panel li b { display: block; font: 700 17px var(--sketch); letter-spacing: .5px; }
.panel li small { color: var(--ink-soft); font-size: 15px; }
.panel li.locked { opacity: .55; }

/* ---------- Cards (taped notes) ---------- */
.cards { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.card {
  position: absolute; top: 86px; right: 5vw; width: min(450px, calc(100vw - 32px));
  max-height: calc(100svh - var(--road-h) - 250px); overflow: auto;
  background: var(--paper-2) repeating-linear-gradient(transparent 0 29px, rgba(90, 140, 220, .16) 29px 30px);
  border: 2px solid var(--ink); padding: 22px 24px 18px;
  box-shadow: 6px 7px 0 rgba(31, 31, 36, .14);
  opacity: 0; transform: translateY(26px) rotate(2.5deg); transition: opacity .35s, transform .5s cubic-bezier(.2,.9,.3,1.25);
  pointer-events: none;
}
.card.active { opacity: 1; transform: rotate(-.8deg); pointer-events: auto; }
.card::before, .card::after { content: ""; position: absolute; width: 90px; height: 26px; background: var(--tape); top: -2px; }
.card::before { left: -18px; transform: rotate(-35deg) translateY(8px); }
.card::after { right: -18px; transform: rotate(35deg) translateY(8px); }
.card .when { font-size: 16px; color: var(--accent); margin: 0 0 2px; letter-spacing: 1px; text-transform: uppercase; }
.card h2 { margin: 0; font: 700 32px/1.05 var(--sketch); }
.card .sub { margin: 4px 0 10px; color: var(--ink-soft); font-size: 19px; }
.card p { line-height: 1.35; margin: 0 0 8px; }
.card ul { margin: 8px 0; padding-left: 20px; line-height: 1.3; font-size: 17.5px; }
.card li { margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { font-size: 15px; padding: 1px 10px; border: 1.8px solid var(--ink); border-radius: 14px 10px 16px 9px; background: #fff; }
.stats { display: flex; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.stats div { flex: 1; min-width: 96px; border: 2px dashed var(--ink); border-radius: 6px; padding: 6px 10px; background: rgba(255,255,255,.7); }
.stats b { display: block; font: 700 30px/1.1 var(--sketch); color: var(--accent); }
.stats span { font-size: 15px; line-height: 1.15; color: var(--ink-soft); display: block; }
.skillset { margin-bottom: 8px; }
.skillset h3 { font-size: 16px; text-transform: uppercase; margin: 0; color: var(--ink-soft); letter-spacing: 1px; font-weight: 400; }
.card.mini { width: min(380px, calc(100vw - 32px)); left: auto; right: 5vw; top: 86px; }
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.btn { text-decoration: none; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 18px 12px 20px 10px; background: #fff; font-size: 18px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn:hover { transform: rotate(-2deg) scale(1.03); }
.again { background: none; border: 0; cursor: pointer; padding: 6px 0; text-decoration: underline wavy; font-size: 17px; }

/* In-world HTML (clothesline posters, chalkboard) */
.poster {
  position: absolute; width: 190px; padding: 10px 12px 12px; background: var(--paper-2); border: 2px solid var(--ink);
  text-decoration: none; transform-origin: 50% -14px; transform: rotate(calc(var(--swing, 0) * 1deg));
  box-shadow: 3px 4px 0 rgba(31,31,36,.12); cursor: pointer;
}
.poster::before { content: ""; position: absolute; left: 50%; top: -18px; width: 12px; height: 26px; margin-left: -6px; background: #c8a46a; border: 2px solid var(--ink); border-radius: 3px; }
.poster h3 { margin: 0 0 4px; font: 700 22px/1 var(--sketch); text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.poster p { margin: 6px 0; font-size: 15px; line-height: 1.2; }
.poster .chips span { font-size: 13px; padding: 0 7px; }
.poster:hover { box-shadow: 4px 5px 0 var(--accent); }
.poster .go { display: block; text-align: right; font-size: 14px; color: var(--accent); }
.chalk { position: absolute; padding: 12px 16px; background: #2f3a33; border: 8px solid #8a6a43; color: #f1f1e6; font: 18px/1.3 var(--hand); width: 210px; }
.chalk h4 { margin: 0 0 6px; font: 700 22px var(--sketch); text-align: center; color: #ffe08a; }
.chalk div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(241,241,230,.35); }

.steam { animation: steam 2.2s ease-in-out infinite; }
.steam.s2 { animation-delay: -1.1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 50% { opacity: .7; } 100% { opacity: 0; transform: translateY(-10px); } }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--paper); transition: opacity .6s ease, transform .6s ease; overflow: auto; }
.intro.gone { opacity: 0; transform: translateY(-24px); pointer-events: none; }
.intro-card { position: relative; width: 100%; max-width: 540px; padding: 30px 32px 26px; border: 2px solid var(--ink); background: var(--paper-2) repeating-linear-gradient(transparent 0 29px, rgba(90, 140, 220, .16) 29px 30px); box-shadow: 6px 7px 0 rgba(31, 31, 36, .14); transform: rotate(-1deg); }
.intro-card::before, .intro-card::after { content: ""; position: absolute; top: -2px; width: 96px; height: 26px; background: var(--tape); }
.intro-card::before { left: -20px; transform: rotate(-35deg) translateY(8px); }
.intro-card::after { right: -20px; transform: rotate(35deg) translateY(8px); }
.intro-eyebrow { margin: 0; color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase; font-size: 16px; }
.intro h2 { margin: 2px 0 10px; font: 700 44px/1 var(--sketch); text-wrap: balance; }
.intro p { line-height: 1.4; margin: 0 0 12px; }
.intro blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--accent); font-size: 24px; line-height: 1.25; }
.intro cite { display: block; margin-top: 6px; font-size: 16px; font-style: normal; color: var(--ink-soft); }
.intro cite::before { content: "— "; }
.fuel { display: flex; align-items: center; gap: 16px; margin: 18px 0 16px; }
.fuel svg { width: 140px; flex: none; overflow: visible; }
.fuel b { font: 700 18px var(--sketch); letter-spacing: 2px; }
.fuel p { margin: 2px 0 0; color: var(--ink-soft); min-height: 1.4em; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; opacity: .3; pointer-events: none; transition: opacity .4s; }
.intro-actions.ready { opacity: 1; pointer-events: auto; }
.intro-actions .btn { cursor: pointer; font-family: var(--hand); }
.intro-actions .btn:focus-visible, .sq:focus-visible, .poster:focus-visible, .btn:focus-visible { outline: 3px dashed var(--accent); outline-offset: 3px; }

/* Living scenery */
.blades { transform-box: view-box; animation: spin 5s linear infinite; }
.kite { transform-box: view-box; animation: kite 3.4s ease-in-out infinite alternate; }
@keyframes kite { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
.balloon { animation: balloon 7s ease-in-out infinite; }
@keyframes balloon { 50% { transform: translateY(-18px); } }
.plane { animation: plane 6s ease-in infinite; opacity: 0; }
@keyframes plane { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(260px, -120px) rotate(-8deg); opacity: 0; } }
.led { animation: led 1.4s steps(2, jump-none) infinite; }
@keyframes led { 50% { opacity: .25; } }
.wave { animation: wave 1.8s ease-out infinite; opacity: 0; }
@keyframes wave { 30% { opacity: 1; } 100% { opacity: 0; } }
.cap { transform-box: fill-box; transform-origin: center; animation: toss 3.2s ease-in-out infinite; }
@keyframes toss { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-70px) rotate(200deg); } }
.rg { transition: opacity .9s; }
.rg.off { opacity: 0; }
.flag { transform-box: fill-box; transform-origin: top center; animation: flutter 1.1s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: skewX(-8deg) scaleY(.94); } to { transform: skewX(9deg) scaleY(1.04); } }
.fire { transform-box: fill-box; transform-origin: bottom center; animation: fire .35s ease-in-out infinite alternate; }
@keyframes fire { from { transform: scale(.92, .9) skewX(-4deg); } to { transform: scale(1.06, 1.08) skewX(4deg); } }
.bob { animation: bob-boat 2.6s ease-in-out infinite; }
@keyframes bob-boat { 50% { transform: translateY(2px) rotate(1deg); } }
.tail { transform-box: view-box; animation: swish 1.6s ease-in-out infinite alternate; }
@keyframes swish { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
.zzz text { animation: zzz 2.4s ease-in-out infinite; }
.zzz text:nth-child(2) { animation-delay: .4s; } .zzz text:nth-child(3) { animation-delay: .8s; }
@keyframes zzz { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.landmark .bubble { position: absolute; right: -36px; top: -34px; font: 20px var(--sketch); background: var(--paper-2); border: 2px solid var(--ink); border-radius: 14px 14px 14px 2px; padding: 0 10px; opacity: 0; transform: scale(.6); transition: .25s; }
.landmark .bubble.show { opacity: 1; transform: rotate(-6deg); }
.flock { position: absolute; left: 0; top: 14%; width: 120px; animation: fly 30s linear infinite; pointer-events: none; }
.flock.f2 { top: 26%; width: 90px; animation-duration: 38s; animation-delay: -17s; }
.flock svg { display: block; width: 100%; overflow: visible; }
.flock path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: flapw .5s ease-in-out infinite alternate; }
.flock path:nth-child(2n) { animation-delay: -.25s; }
@keyframes flapw { to { transform: scaleY(-.5); } }
@keyframes fly { from { transform: translateX(110vw); } to { transform: translateX(-30vw) translateY(-40px); } }
.vehicle { position: absolute; left: 0; bottom: calc(var(--road-h) - 22px); z-index: 3; transform-origin: bottom left; will-change: transform; pointer-events: none; }
.vehicle svg { display: block; overflow: visible; }
.vehicle .w { animation: spin .5s linear infinite reverse; }
.vehicle .bubble { position: absolute; left: 10px; top: -34px; font: 18px var(--sketch); background: var(--paper-2); border: 2px solid var(--ink); border-radius: 14px 14px 14px 2px; padding: 0 10px; white-space: nowrap; opacity: 0; transform: scale(.6); transition: .25s; }
.vehicle .bubble.show { opacity: 1; transform: rotate(-5deg); }
.wave-hand { transform-box: view-box; transform-origin: 88px 28px; animation: wavehand .5s ease-in-out infinite alternate; }
@keyframes wavehand { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
#front { bottom: -4px; z-index: 5; pointer-events: none; }
.haze { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: background .4s; }
.weather { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.moon { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --road-h: 76px; }
  .hud { padding: 8px 12px; gap: 8px; }
  .plate b { font-size: 16px; letter-spacing: 1.5px; padding: 6px 8px 4px; }
  .plate .ind { padding: 2px 4px; font-size: 8px; }
  .route button span { display: none; }
  .route { position: absolute; left: 16px; right: 16px; top: 58px; margin: 0; max-width: none; height: 22px; }
  .route button { width: 12px; height: 12px; margin-left: -6px; top: 6px; }
  .sq { min-width: 42px; height: 42px; padding: 0 8px; font-size: 15px; }
  .card { top: 94px; left: 12px; right: 12px; width: auto; max-height: calc(100svh - var(--road-h) - 210px); padding: 18px 16px 14px; }
  .card.mini { left: 12px; right: 12px; width: auto; top: 94px; bottom: auto; }
  .card h2 { font-size: 27px; }
  .stats b { font-size: 23px; }
  .stats div { min-width: 80px; padding: 5px 8px; }
  .card ul { font-size: 16.5px; }
  .landmark { transform: scale(.6); transform-origin: bottom left; }
  .rider { width: 160px; bottom: calc(var(--road-h) - 42px); }
  .thought { width: min(230px, calc(100vw - 120px)); left: 40%; }
  .speedo { display: none; }
  .hero { top: 16vh; }
  .toast { min-width: 0; left: auto; right: 8px; bottom: 10px; max-width: calc(100vw - 168px); padding: 8px 14px; gap: 10px; transform: translateY(150%); }
  .toast.show { transform: none; }
  .toast h4 { font-size: 16px; }
  .toast p { font-size: 14px; line-height: 1.2; }
  .toast .box { width: 22px; height: 22px; font-size: 16px; }
  .intro-card { padding: 24px 20px 20px; }
  .intro h2 { font-size: 34px; }
  .intro blockquote { font-size: 20px; }
  .fuel svg { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: opacity .2s; }
  .stars span, .doodles span, .sun svg, .speedlines i, #glow .bulb, .blades, .kite, .bob, .balloon, .flag, .fire, .plane, .led, .wave, .cap, .tail, .flock, .flock path, .vehicle .w, .wave-hand { animation: none; }
  .rider .scarf { animation: none; }
}
