/* ---------- reset & base (carried over from save-the-groom) ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #2a0d10;
  font-family: 'Nunito', sans-serif;
  overscroll-behavior: none;
  /* allows normal single-tap immediately (no 300ms delay) while
     suppressing Safari's double-tap-to-zoom gesture; .phone below goes
     further (touch-action: none) since it also owns pan/swipe gestures */
  touch-action: manipulation;
}
img { max-width: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* block iOS's long-press "Save Image" / callout on everything — every
   sprite here is a div background-image, never an <img>, so there is
   nothing for Safari to offer to save in the first place; this is the
   belt-and-suspenders layer. */
img, .sprite, .phone, .phone * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

:root {
  --cream: #fdf3e2;
  --cream-dim: #f2e2c4;
  --maroon: #6e1220;
  --maroon-deep: #4a0c15;
  --red: #b3122a;
  --pink: #ff5f8f;
  --marigold: #f2a93b;
  --gold: #d9ab5c;
  --gold-bright: #ecc888;
  --green: #4caf6a;
  --green-dim: #3a8f54;
  --serif: 'Playfair Display', Georgia, serif;
  --script: 'Caveat', cursive;

  /* the ONE place to swap the confirm-screen card art (currently the
     road-trip themed card: marigold garland + blank heart sign across the
     top ~22%, gold road drawing with the two cars along the bottom ~26%,
     blank middle for the text box). Change this single line only —
     .card-confirm's layout doesn't need to change unless the new art's
     own proportions move. */
  --card-confirm-img: url('assets/opt/card-goa.webp');
}

/* ---------- phone frame ---------- */
.phone {
  position: relative;
  overflow: hidden;
  background: #000;
  container-type: inline-size;
  container-name: phone;
  touch-action: none;
}
html.frame-desktop, html.frame-desktop body { height: 100%; }
html.frame-desktop body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 20%, #4a1a1c 0%, #2a0d10 60%, #180608 100%);
}
html.frame-desktop .phone {
  width: min(430px, 88vh);
  aspect-ratio: 9 / 16;
  border-radius: 46px;
  border: 12px solid #241210;
  box-shadow:
    0 40px 90px rgba(0,0,0,.55),
    0 0 0 2px rgba(255,255,255,.05) inset;
}
html.frame-mobile .phone {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.stage { position: absolute; inset: 0; overflow: hidden; }

/* ---------- background ---------- */
/* only ever actually visible on screen 6 now — screens 1-5 are covered by
   the drive video (see .drive-video), which is only hidden once
   goToConfirm() runs */
.bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-image: url('assets/opt/backdrop-beach.webp');
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  z-index: 1;
}
.bg-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,4,6,.55) 0%, rgba(20,4,6,.05) 22%, rgba(20,4,6,0) 42%, rgba(20,4,6,.18) 74%, rgba(20,4,6,.6) 100%);
  pointer-events: none;
  z-index: 2;
}

.kicker {
  position: absolute;
  top: max(10px, 3cqw); left: max(10px, 3cqw);
  z-index: 50;
  display: flex; align-items: center; gap: .4em;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(110, 18, 32, .68), rgba(74, 12, 21, .68));
  padding: .4em 1em .4em .8em;
  border-radius: 999px;
  border: 1px solid rgba(217, 171, 92, .55);
  box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06) inset;
  backdrop-filter: blur(4px);
}
.kicker-chevron { font-size: 4cqw; line-height: 1; color: var(--gold-bright); font-weight: 700; }
.kicker-text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 3cqw;
  letter-spacing: .01em;
}

.sound-toggle {
  position: absolute;
  top: max(10px, 3cqw); right: max(10px, 3cqw);
  z-index: 50;
  width: 9cqw; height: 9cqw;
  min-width: 34px; min-height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(110, 18, 32, .68), rgba(74, 12, 21, .68));
  border-radius: 999px;
  border: 1px solid rgba(217, 171, 92, .55);
  box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06) inset;
  backdrop-filter: blur(4px);
}
.sound-toggle:active { transform: scale(.93); }
.sound-note { font-size: 4cqw; line-height: 1; color: var(--gold-bright); position: relative; }
.sound-slash {
  position: absolute;
  left: 50%; top: 50%;
  width: 130%; height: 1.6px;
  background: var(--cream);
  transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
  transform-origin: center;
  transition: transform .15s ease;
  border-radius: 2px;
}
.sound-toggle.muted .sound-slash { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1); }

/* ================= GAME (states 1-4) ================= */
.game { position: absolute; inset: 0; z-index: 10; transition: opacity .25s ease; }
.game.hidden { opacity: 0; pointer-events: none; }

/* the drive itself — a GSAP-scrubbed video, full-bleed behind everything
   else in .game. object-fit:cover crops left/right on a real phone
   (narrower than the clip's 9:16) rather than letterboxing. */
.drive-video {
  position: absolute;
  inset: 0;
  z-index: 5; /* stage-level: above .bg/.bg-vignette, below .game's chrome and the .screen overlays */
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
  transition: opacity .3s ease;
}
.drive-video.hidden { opacity: 0; }

/* two fixed signboards over the video's roadside greenery — opacity is
   driven every frame by video currentTime in app.js (fade in / hold /
   fade out), not a discrete GSAP tween, since it's a continuous function
   of the scrub position rather than a one-shot transition. */
.signboard {
  position: absolute;
  width: 27%;
  aspect-ratio: 328 / 456;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 6px 10px rgba(20,4,4,.35));
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.signboard-a {
  left: 10%; top: 34%;
  background-image: url('assets/opt/parts/obs-sign-tall.webp');
}
.signboard-b {
  right: 8%; top: 52%;
  aspect-ratio: 288 / 378;
  background-image: url('assets/opt/parts/obs-sign-short.webp');
}
.signboard-text {
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  width: 76%;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 2.1cqw;
  color: #5c3517;
  line-height: 1.08;
  white-space: normal; /* up to 2 lines — see fitSignText() in app.js */
  overflow-wrap: break-word;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  left: 6%; right: 6%; top: 8.5%;
  z-index: 30;
  display: flex; flex-direction: column; gap: 1.6cqw;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.hud.show { opacity: 1; transform: translateY(0); }
.hud-row { display: flex; align-items: center; gap: 2cqw; }
.hud-label {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 2.5cqw;
  letter-spacing: .1em;
  color: var(--cream);
  text-shadow: 0 2px 5px rgba(0,0,0,.5);
  width: 24cqw;
  flex-shrink: 0;
  white-space: nowrap;
}
.hud-track {
  flex: 1;
  height: 4.4cqw;
  background: rgba(20,4,6,.5);
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
}
.hud-fill { height: 100%; width: 0%; border-radius: 999px; transition: background .3s ease; }
.fuel-fill { background: linear-gradient(180deg, #86e0a1 0%, var(--green) 55%, var(--green-dim) 100%); }
.fuel-fill.low { background: linear-gradient(180deg, #ff8f8f 0%, var(--red) 55%, #7a0d1c 100%); }
.distance-fill { background: linear-gradient(180deg, #ff9fbb 0%, var(--pink) 55%, #d63e6f 100%); }
.hud-value {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 2.6cqw;
  color: var(--cream);
  text-shadow: 0 2px 5px rgba(0,0,0,.5);
  width: 13cqw;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

/* ---------- headline ---------- */
.headline {
  position: absolute;
  left: 0; right: 0; top: 14%;
  z-index: 25;
  text-align: center;
  padding: 0 6%;
  pointer-events: none;
}
.headline::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 130%; height: 230%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(20,4,6,.5) 0%, rgba(20,4,6,.24) 45%, rgba(20,4,6,0) 75%);
  z-index: -1;
}
.h-name {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 9.5cqw;
  line-height: 1.08;
  overflow-wrap: break-word;
  color: var(--red);
  text-shadow: 0 0 2px rgba(255,255,255,.6), 0 3px 10px rgba(0,0,0,.4);
}
.h-sub {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 5.4cqw;
  color: var(--cream);
  margin-top: .3em;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

/* ---------- press cue (pre-first-press pill) ---------- */
.press-cue {
  position: absolute;
  left: 50%; top: 44%;
  transform: translateX(-50%);
  z-index: 26;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.cue-pill {
  background: var(--cream);
  color: var(--maroon-deep);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 4cqw;
  line-height: 1.15;
  padding: .5em .9em;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  white-space: nowrap;
}
.press-cue.hide { opacity: 0; transform: translateX(-50%) translateY(6px); }

/* ---------- pedal ----------
   Visible circle is a fixed 34% of the frame width; the button itself
   (the actual hit target) is that circle plus 24px of invisible padding
   on every side, so a slightly-off tap still registers. The label lives
   in its own sibling below the button, out of the tap target, so the
   hit area stays close to the circle instead of stretching down to cover
   the text too. */
.pedal-hitbox {
  position: absolute;
  left: 50%; top: 86%;
  transform: translate(-50%, -50%);
  z-index: 40;
  width: calc(34cqw + 48px); height: calc(34cqw + 48px);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  -webkit-appearance: none;
}
.pedal-visual {
  width: 34cqw; height: 34cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ff7fa3, var(--pink) 55%, #c73763 100%);
  border: 3px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 22px rgba(0,0,0,.45), 0 0 0 2px rgba(179,18,42,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pedal-hitbox.pressed .pedal-visual {
  transform: scale(.92);
  box-shadow: 0 4px 10px rgba(0,0,0,.4), 0 0 0 2px rgba(179,18,42,.4);
}
.pedal-icon {
  width: 52%; height: 52%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}
.pedal-label {
  position: absolute;
  left: 50%; top: calc(86% + 17cqw + 10px);
  transform: translateX(-50%);
  z-index: 40;
  pointer-events: none;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 2.6cqw;
  letter-spacing: .06em;
  color: var(--cream);
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
  white-space: nowrap;
}

/* ---------- generic screen (reveal & confirm) ---------- */
.screen {
  position: absolute; inset: 0;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.screen.show { opacity: 1; pointer-events: auto; }

/* ---------- screen 5 reveal ---------- */
.reveal-headline {
  position: absolute;
  left: 0; right: 0; top: 7%;
  text-align: center;
  padding: 0 6%;
  z-index: 20;
}
.rh-line1 {
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 7.4cqw;
  color: var(--red);
  text-shadow: 0 0 2px rgba(255,255,255,.5), 0 3px 14px rgba(0,0,0,.5);
}
.rh-line2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 7cqw;
  color: var(--cream);
  margin-top: .1em;
  text-shadow: 0 3px 14px rgba(0,0,0,.6), 0 0 22px rgba(0,0,0,.35);
}
/* dims the frozen last-frame video for text legibility — darker bands top
   and bottom (under the headline and the subline/tap-hint), lighter in
   the middle where the stalled car itself sits */
.reveal-dim {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(10,4,6,.55) 0%,
    rgba(10,4,6,.2) 20%,
    rgba(10,4,6,.22) 55%,
    rgba(10,4,6,.6) 75%,
    rgba(10,4,6,.62) 100%);
}

/* sits below the scene image (never over the cars' faces) */
.reveal-subline {
  position: absolute;
  left: 0; right: 0; top: 67%;
  text-align: center;
  padding: 0 8%;
  z-index: 20;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 3.6cqw;
  color: var(--cream-dim);
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.card {
  position: absolute;
  filter: drop-shadow(0 20px 28px rgba(20,4,4,.5));
}
.card-text {
  position: absolute;
  left: 15%; right: 15%; top: 19%; bottom: 32%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .3em;
  text-align: center;
  color: var(--maroon-deep);
}
.card-text > div {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  white-space: nowrap;
}
.ct-names {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 7cqw;
  line-height: 1.08;
}
.ct-names .amp { font-style: italic; font-weight: 600; color: var(--red); padding: 0 .05em; }
.ct-date {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 4.2cqw;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: .15em;
}
.ct-rule { display: flex; align-items: center; justify-content: center; gap: .5em; width: 60%; margin: .2em 0; }
.rule-heart { width: 3.2cqw; flex-shrink: 0; }
.ct-city {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.6cqw;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon-deep);
}
.ct-tag {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.9cqw;
  letter-spacing: .06em;
  color: #a8712c;
  margin-top: .35em;
  line-height: 1.4;
  white-space: normal !important;
}

.tap-hint {
  position: absolute;
  left: 50%; bottom: 4%;
  transform: translateX(-50%);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 3cqw;
  color: var(--cream-dim);
  opacity: .85;
  z-index: 20;
  animation: hintPulse 1.6s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100%{opacity:.5} 50%{opacity:.95} }

/* ---------- screen 6 confirm (verbatim from the tug) ---------- */
.screen-confirm { background: rgba(20, 5, 7, .42); }
.confirm-scroll {
  position: absolute; inset: 0;
  z-index: 10;
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 16cqw 6cqw 4cqw;
  gap: .7cqw;
}
.confirm-eyebrow {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2.6cqw;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: .9;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.confirm-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 11.5cqw;
  line-height: 1.05;
  color: var(--cream);
  margin: .08em 0 0;
  text-shadow: 0 0 18px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.5);
}
.gold-divider { display: flex; align-items: center; justify-content: center; gap: .6em; width: 46%; margin: .1em 0; }
.gold-line { flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); }
.divider-heart { width: 3.6cqw; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.confirm-subtag {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2.5cqw;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.card-confirm {
  position: relative;
  width: 80%;
  aspect-ratio: 1024 / 1536; /* card-goa.png's native ratio */
  background-image: var(--card-confirm-img);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transform: none;
  flex-shrink: 0;
  margin-top: 1.6cqw;
}
/* text box = x 13-87%, y 15-81% of the card image (inside the scroll's
   inner rule, clear of the hibiscus corners and the palm-tree emblem) */
.card-confirm .card-text { left: 13%; right: 13%; top: 15%; bottom: 19%; gap: .22em; }
.card-confirm .ct-names { font-size: 6.4cqw; line-height: 1.05; }
.card-confirm .ct-date { font-size: 3.6cqw; }
.card-confirm .rule-heart { width: 2.6cqw; }
.card-confirm .ct-city { font-size: 3.2cqw; }
.card-confirm .ct-tag { font-size: 1.85cqw; }

.btn-calendar {
  width: 90%;
  margin-top: 2.4cqw;
  padding: 3.8cqw 0;
  background: linear-gradient(180deg, #9c2036, var(--maroon-deep) 70%);
  color: var(--cream);
  border: 2px solid var(--gold);
  font-size: 4.4cqw;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0,0,0,.45), 0 0 0 1.5px rgba(255,255,255,.1) inset;
  display: flex; align-items: center; justify-content: center; gap: .55em;
  flex-shrink: 0;
}
.btn-cal-icon { width: 1.1em; height: 1.1em; color: var(--gold-bright); flex-shrink: 0; }
.btn-cal-label { font-family: var(--serif); font-weight: 700; }
.btn-cal-chevron { font-size: 1.3em; color: var(--gold-bright); line-height: 1; }
.btn-calendar:active { transform: scale(.97); }

.second-tap-divider { display: flex; flex-direction: column; align-items: center; gap: .3em; margin-top: .6cqw; }
.stl-row { display: flex; align-items: center; justify-content: center; gap: .7em; width: 60%; }
.stl-row .gold-line { height: 1px; }
.stl-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2.5cqw;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}
.stl-sub {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 2.9cqw;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.share-row {
  width: 92%;
  margin-top: 1.5cqw;
  background: rgba(253, 243, 226, .97);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 2.8cqw 3cqw;
  display: flex; align-items: center; gap: 2.8cqw;
  box-shadow: 0 10px 22px rgba(0,0,0,.4);
  flex-shrink: 0;
}
.share-avatar-wrap { position: relative; flex-shrink: 0; width: 20cqw; }
.share-avatar {
  width: 20cqw; height: 20cqw;
  object-fit: cover;
  border-radius: 22%;
  display: block;
  box-shadow: 0 0 0 2px var(--marigold);
}
.share-speed { position: absolute; top: -8%; left: -22%; width: 11cqw; transform: rotate(-15deg) scaleX(-1); opacity: .85; }
.share-heart { position: absolute; top: 8%; right: -14%; width: 5.5cqw; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.share-text { flex: 1; font-family: var(--script); font-weight: 700; font-size: 5.4cqw; line-height: 1.15; color: var(--maroon-deep); }
.share-btns { display: flex; flex-direction: column; gap: 1.6cqw; }
.share-btn-col { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.btn-icon {
  width: 8cqw; height: 8cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9c2036, var(--maroon-deep));
  color: var(--cream);
  font-size: 3.6cqw;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.btn-icon:active { transform: scale(.92); }
.share-btn-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2cqw;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--maroon);
}

.confirm-footer { display: flex; flex-direction: column; align-items: center; gap: .5em; margin-top: 1.4cqw; padding-bottom: 2cqw; }
.footer-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2.6cqw;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.toast {
  position: absolute;
  left: 50%; bottom: 6%;
  transform: translate(-50%, 20px);
  background: rgba(20,5,7,.9);
  color: var(--cream);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 3.2cqw;
  padding: .7em 1.3em;
  border-radius: 999px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- loading screen ---------- */
.loading-screen {
  position: absolute; inset: 0;
  z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4cqw;
  background: radial-gradient(circle at 50% 30%, #6e1220 0%, #3c0c14 65%, #240709 100%);
  transition: opacity .4s ease, visibility .4s ease;
}
.loading-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 6.5cqw;
  color: var(--gold-bright);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.loading-track {
  width: 52%;
  height: 2.2cqw;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(217,171,92,.55);
  border-radius: 999px;
  overflow: hidden;
}
.loading-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width .15s ease;
}
.loading-pct {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 3.2cqw;
  color: var(--cream-dim);
  letter-spacing: .08em;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .obstacle, .jeep, .car { transition: none; }
}
