/* ---- Reset & base -------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 9:16 aspect ratio used to letterbox the stage on wide screens */
  --aspect: 9 / 16;
}

html, body {
  height: 100%;
  background: #000;            /* letterbox bars on desktop */
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;   /* stop rubber-band bounce past the ends */
}

/* ---- App: the 9:16 phone frame (positioning context for overlays) -------- */
.app {
  position: relative;
  margin: 0 auto;
  width: 100%;
  height: 100dvh;             /* dvh accounts for mobile browser chrome */
  height: 100svh;
  overflow: hidden;
}

/* On wide screens, constrain the frame to a portrait 9:16 column */
@media (min-aspect-ratio: 9 / 16) {
  .app {
    aspect-ratio: var(--aspect);
    height: 100dvh;
    height: 100svh;
    width: auto;
    max-width: 100vw;
  }
}

/* ---- Stage: the scroll container fills the frame ------------------------- */
.stage {
  position: absolute;
  inset: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;      /* one section locks per swipe */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;              /* Firefox */
}
.stage::-webkit-scrollbar { display: none; }   /* Chrome/Safari */

/* ---- Section: one full-screen video panel -------------------------------- */
.section {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;   /* never skip past a section in one flick */
  overflow: hidden;
}

.section__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* videos are native 9:16, so no crop */
  background: #000;
}

/* Bottom scrim so overlay text stays legible over bright map areas */
.section__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.35) 22%,
    rgba(0, 0, 0, 0) 45%
  );
}

/* ---- Overlay: bottom-anchored title + subtitle --------------------------- */
.section__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 24px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
}

.section__title {
  font-size: clamp(20px, 6vw, 30px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ffffff;
}

.section__subtitle {
  margin-top: 12px;
  font-size: clamp(12px, 3.6vw, 16px);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ---- Attraction info card ------------------------------------------------ */
.card {
  margin: 0 auto 22px;
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(12, 14, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: left;
}

.card__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.card__stats {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.card__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.card__stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.card__stat-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.card__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.card__btn--primary {
  background: #16a34a;          /* jungle green CTA */
  color: #fff;
}

.card__btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.card__btn--ar {
  background: linear-gradient(135deg, #1a73e8, #1557b0);   /* maps blue */
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

/* ---- Trailer overlay player ---------------------------------------------- */
/* The hidden attribute must win over the display:flex below, or the invisible
   overlay stays on top and swallows scroll/touch events. */
.trailer[hidden] { display: none; }

.trailer {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.trailer.is-open { opacity: 1; }

.trailer__video {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* 9:16 source fills the 9:16 frame */
  background: #000;
}

.trailer__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 41;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
 * AR Directions overlay — camera feed + Live-View chevrons + compass
 * ========================================================================== */
.ar[hidden] { display: none; }

.ar {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ar.is-open { opacity: 1; }

/* Camera feed fills the frame (rear camera is native landscape-of-sensor,
   object-fit:cover crops it to our 9:16 window). */
.ar__cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
/* Hide the (empty) video element when there's no camera stream. */
.ar--nocam .ar__cam { display: none; }

/* Simulated backdrop when no camera: a soft "park path" scene that slowly
   drifts, so the AR arrows still have something to float over. */
.ar__fallback {
  position: absolute;
  inset: 0;
  display: none;
}
.ar--nocam .ar__fallback {
  display: block;
  background:
    linear-gradient(to bottom, #9ed0f5 0%, #cfe9ff 26%, rgba(207,233,255,0) 46%),
    radial-gradient(140% 70% at 50% 128%, #7ba845 0%, #4f7431 42%, #33501f 78%);
  animation: arPan 18s ease-in-out infinite alternate;
}
@keyframes arPan {
  0%   { background-position: 48% 50%, 50% 50%; }
  100% { background-position: 52% 50%, 50% 46%; }
}

/* Faint film grain / vignette to blend overlays with the live camera. */
.ar__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.35) 100%);
}

/* ---- Top bar ------------------------------------------------------------- */
.ar__top {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ar__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.ar__dest {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ar__dest-eyebrow {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.ar__dest-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.ar__badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ea4335;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  align-self: flex-start;
}

/* ---- Floating waypoint: street pill + chevrons --------------------------- */
.ar__waypoint {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Gentle bob so the AR marker feels anchored in 3D space. */
  animation: arFloat 3.4s ease-in-out infinite;
}
@keyframes arFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -8px); }
}

/* Blue rounded street-name pill (like "Davis St" in Live View). */
.ar__pill {
  position: relative;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4c8dff 0%, #1a73e8 100%);
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.5), inset 0 1px 0 rgba(255,255,255,0.35);
}
.ar__pill::after {          /* little downward tail toward the chevrons */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: #1a73e8;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}
.ar__pill-text {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* The stack of three forward chevrons. */
.ar__chevrons {
  display: flex;
  gap: 2px;
  /* Perspective + tilt makes the flat chevrons read as arrows on the ground. */
  transform: translateX(var(--pan, 0px)) perspective(420px) rotateX(46deg);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
}

/* Each chevron is a fat ">" built from two bars, blue with a white core. */
.ar__chevron {
  width: 46px;
  height: 62px;
  background:
    linear-gradient(180deg, #4c8dff, #1a73e8);
  -webkit-mask: var(--chevron-mask);
  mask: var(--chevron-mask);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  opacity: 0.35;
  animation: arChevron 1.4s ease-in-out infinite;
}
/* Chevron shape via mask: a right-pointing arrowhead outline with a hole. */
.ar__chevron {
  --chevron-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  position: relative;
}
/* Draw the chevron with clip-path instead (broader support, crisp edges). */
.ar__chevron {
  -webkit-mask: none;
  mask: none;
  background: none;
  filter: none;
}
.ar__chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #5c97ff, #1a73e8);
  clip-path: polygon(0 0, 42% 0, 100% 50%, 42% 100%, 0 100%, 55% 50%);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
  border-radius: 4px;
}
/* white inner highlight for the 3D "signpost" look from the reference */
.ar__chevron::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: rgba(255, 255, 255, 0.9);
  clip-path: polygon(0 12%, 30% 12%, 78% 50%, 30% 88%, 0 88%, 48% 50%);
}

/* Sequential fade so the arrows appear to "flow" forward. */
.ar__chevron:nth-child(1) { animation-delay: 0s; }
.ar__chevron:nth-child(2) { animation-delay: 0.2s; }
.ar__chevron:nth-child(3) { animation-delay: 0.4s; }
@keyframes arChevron {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* Turn variants rotate the whole chevron stack. */
.ar__chevrons[data-turn="right"]  { transform: translateX(var(--pan,0px)) perspective(420px) rotateX(46deg) rotateZ(32deg); }
.ar__chevrons[data-turn="left"]   { transform: translateX(var(--pan,0px)) perspective(420px) rotateX(46deg) rotateZ(-32deg); }
.ar__chevrons[data-turn="arrive"] { transform: translateX(var(--pan,0px)) perspective(420px) rotateX(46deg) scale(0.9); }

/* On arrival, swap chevrons for a pulsing destination pin feel. */
.ar--arrive .ar__chevrons { opacity: 0.15; }
.ar--arrive .ar__pill { background: linear-gradient(180deg, #34d17a 0%, #16a34a 100%); box-shadow: 0 8px 22px rgba(22,163,74,0.55); }
.ar--arrive .ar__pill::after { background: #16a34a; }

/* ---- Distance ribbon ----------------------------------------------------- */
.ar__distance {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.ar__distance-main { display: flex; align-items: baseline; gap: 3px; }
.ar__distance-num { font-size: 26px; font-weight: 700; color: #fff; line-height: 1; }
.ar__distance-unit { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.75); }
.ar__distance-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
}
/* The live metre counter is tabular so digits don't jitter as it ticks. */
.ar__distance-m { font-variant-numeric: tabular-nums; color: rgba(255,255,255,0.85); }
.ar__distance-dot { opacity: 0.5; }

/* ---- Bottom compass / radar --------------------------------------------- */
.ar__map {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.ar__radar {
  position: relative;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  /* The disc is clipped so the route line reads like a top-down mini-map,
     matching the reference's fan-shaped map at screen bottom. */
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, #f6f7f9 0%, #e9ecef 70%, #dfe3e8 100%);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.35), inset 0 0 0 3px rgba(255,255,255,0.9);
  /* Show only the top fan of the disc (like a heads-up map). */
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 0 62%, transparent 62%);
  mask: radial-gradient(circle at 50% 100%, #000 0 62%, transparent 62%);
}

/* Rotating dial holds the route + waypoints; JS spins it to the heading. */
.ar__radar-dial {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  transition: transform 0.1s linear;
}

/* The blue dotted route running "north" up the map. */
.ar__route-line {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 8px;
  height: 150px;
  transform: translateX(-50%);
  background-image: radial-gradient(#1a73e8 42%, transparent 46%);
  background-size: 8px 16px;
  background-repeat: repeat-y;
}
.ar__waypoint-dot {
  position: absolute;
  left: 50%;
  bottom: 150px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 4px rgba(26,115,232,0.25);
}

/* The guest's position + heading arrow — fixed at the disc's pivot. */
.ar__me {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 24px solid #1a73e8;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(0 2px 3px rgba(0,0,0,0.45));
  z-index: 3;
}

/* Cardinal letters pinned to the disc edges (do not rotate with dial). */
.ar__cardinal {
  position: absolute;
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}
.ar__cardinal--n { top: 82px; left: 50%; transform: translateX(-50%); }
.ar__cardinal--e { top: 58%; right: 26px; transform: translateY(-50%); }
.ar__cardinal--s { display: none; }   /* clipped by the fan; not shown */
.ar__cardinal--w { top: 58%; left: 26px; transform: translateY(-50%); }

.ar__step-label {
  position: relative;
  z-index: 4;
  margin-top: -6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-align: center;
}

/* ---- Status toast -------------------------------------------------------- */
.ar__toast[hidden] { display: none; }
.ar__toast {
  position: absolute;
  left: 50%;
  bottom: calc(230px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 4;
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 12.5px;
  text-align: center;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .ar__waypoint, .ar__chevron, .ar__fallback { animation: none; }
}

/* ---- Scroll hint (first section only) ------------------------------------ */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  font-size: 22px;
  color: rgba(255, 255, 255, 0.5);
  animation: bob 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
}

/* ---- Page dots (right-edge section indicator) ---------------------------- */
.dots {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.dots__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: height 0.3s ease, background 0.3s ease;
}

.dots__dot.is-active {
  height: 20px;               /* active dot elongates into a pill */
  background: #ffffff;
}

/* ---- Dynamic Island voice widget ---------------------------------------- */
.island {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 150px;
  height: 40px;
  padding: 0 16px;
  border-radius: 22px;
  background: rgba(10, 10, 12, 0.92);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  /* spring-like expand */
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

/* Expanded (listening) state */
.island.is-open {
  width: min(320px, calc(100% - 32px));
  height: 118px;
  border-radius: 28px;
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  padding: 14px 20px;
  gap: 8px;
  cursor: default;
}

/* Mic dot */
.island__mic {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;         /* green = ready */
  box-shadow: 0 0 8px #4ade80;
  transition: background 0.3s, box-shadow 0.3s;
}
.island.is-listening .island__mic {
  background: #f87171;         /* red = live */
  box-shadow: 0 0 10px #f87171;
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Collapsed label — hidden when open */
.island__label {
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
}
.island.is-open .island__label { display: none; }

/* Top row inside expanded island: mic dot + status text */
.island__head {
  display: none;
  align-items: center;
  gap: 10px;
}
.island.is-open .island__head { display: flex; }

.island__status {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

/* Waveform — only shown while listening */
.island__wave {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
}
.island.is-listening .island__wave { display: flex; }

.island__wave span {
  width: 4px;
  height: 6px;
  border-radius: 2px;
  background: #f87171;
  animation: wave 0.9s ease-in-out infinite;
}
.island__wave span:nth-child(2) { animation-delay: 0.15s; }
.island__wave span:nth-child(3) { animation-delay: 0.30s; }
.island__wave span:nth-child(4) { animation-delay: 0.45s; }
.island__wave span:nth-child(5) { animation-delay: 0.60s; }
@keyframes wave {
  0%, 100% { height: 6px; }
  50%      { height: 22px; }
}

/* Live transcript line */
.island__transcript {
  display: none;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
  max-height: 36px;
  overflow: hidden;
  text-align: center;
}
.island.is-open .island__transcript { display: block; }

@media (prefers-reduced-motion: reduce) {
  .island,
  .island__wave span,
  .island.is-listening .island__mic { animation: none; transition: none; }
}

/* ---- Live "rides available" ticker --------------------------------------- */
.ticker[hidden] { display: none; }
.ticker {
  position: absolute;
  top: calc(62px + env(safe-area-inset-top));   /* sits just below the island */
  left: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  /* Let scroll/touch pass through the strip — only the button is interactive */
  pointer-events: none;
}

.ticker__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 1.6s ease-in-out infinite;
}

.ticker__msg {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s ease;
}

.ticker__cta {
  flex: 0 0 auto;
  pointer-events: auto;        /* re-enable taps on the button only */
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ---- Schedule + digital-ticket bottom sheet ------------------------------ */
.sheet[hidden] { display: none; }
.sheet {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.sheet.is-open .sheet__backdrop { opacity: 1; }

.sheet__panel {
  position: relative;
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #14161a;
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet.is-open .sheet__panel { transform: translateY(0); }

.sheet__handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.sheet__title {
  font-size: 20px;
  font-weight: 600;
}

.sheet__sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 24px;
}

.slot {
  padding: 12px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.slot.is-selected {
  background: #16a34a;
  border-color: #16a34a;
}

.ticket-input {
  width: 100%;
  margin: 18px 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;              /* 16px avoids iOS zoom-on-focus */
  letter-spacing: 0.1em;
}
.ticket-input::placeholder { color: rgba(255, 255, 255, 0.4); letter-spacing: normal; }

.sheet__primary {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.sheet__primary:disabled { opacity: 0.4; cursor: not-allowed; }

.sheet__ghost {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Confirmed digital pass */
.pass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 8px 0 22px;
  padding: 24px 18px;
  border-radius: 20px;
  background: #fff;
  color: #0a0a0c;
  text-align: center;
}
.pass__check {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 22px;
  margin-bottom: 4px;
}
.pass__ride { font-size: 19px; font-weight: 700; }
.pass__time { font-size: 13px; color: #555; margin-bottom: 12px; }
.pass__qr { line-height: 0; }
.pass__qr svg { border-radius: 8px; }
.pass__meta {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #666;
}

/* ============================ Planner ==================================== */
.planner { position: absolute; inset: 0; z-index: 50; }
.planner[hidden] { display: none; }
.planner__sheet {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: #0b0f14; color: #fff;
  transform: translateY(100%); transition: transform .28s ease;
}
.planner.is-open .planner__sheet { transform: translateY(0); }
.planner__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer;
}
.planner__body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 56px 18px 28px;
}
.planner__title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.planner__lede { font-size: 13px; line-height: 1.5; opacity: .8; margin: 0 0 18px; }
.planner__origins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.planner__origin {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px;
  background: rgba(255,255,255,.05); color: #fff; text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.planner__origin:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.planner__origin-icon { font-size: 26px; }
.planner__origin-label { font-size: 14px; font-weight: 600; }
.planner__intl { font-size: 10px; background: #1e6fd8; padding: 2px 6px; border-radius: 999px; }

.planner__back {
  background: none; border: 0; color: #7fb3ff; font-size: 13px; cursor: pointer;
  padding: 0; margin: 0 0 10px;
}
.planner__subhead { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; opacity: .6; margin: 22px 0 10px; }
.planner__weather {
  display: grid; grid-template-columns: auto 1fr; grid-auto-rows: auto; gap: 2px 12px;
  align-items: center; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #123a5e, #0b6b8a); margin-bottom: 6px;
}
.planner__weather-temp { grid-row: 1 / 3; font-size: 26px; font-weight: 800; }
.planner__weather-main { display: flex; flex-direction: column; font-size: 12px; }
.planner__weather-tip { opacity: .85; margin-top: 2px; line-height: 1.4; }
.planner__weather-upd { grid-column: 2; font-size: 10px; opacity: .55; }
.planner__timeline { list-style: none; margin: 0; padding: 0; }
.planner__leg {
  display: grid; grid-template-columns: 44px 24px 1fr auto; align-items: start;
  gap: 8px; padding: 8px 0; position: relative;
}
.planner__leg::before {
  content: ''; position: absolute; left: 55px; top: 26px; bottom: -8px; width: 2px;
  background: rgba(255,255,255,.18);
}
.planner__leg:last-child::before { display: none; }
.planner__leg--arrive .planner__leg-dot { background: #2ecc71; }
.planner__leg-time { font-size: 12px; opacity: .7; padding-top: 3px; }
.planner__leg-dot {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: grid; place-items: center; font-size: 13px; z-index: 1;
}
.planner__leg-title { font-size: 14px; font-weight: 600; display: block; }
.planner__leg-detail { font-size: 12px; opacity: .65; display: block; }
.planner__leg-dur { font-size: 11px; opacity: .6; white-space: nowrap; padding-top: 3px; }
.planner__gauge { margin-bottom: 10px; }
.planner__gauge-bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.planner__gauge-bar span { display: block; height: 100%; background: linear-gradient(90deg,#2ecc71,#e67e22 70%,#e74c3c); transition: width .6s ease; }
.planner__gauge-meta { font-size: 12px; opacity: .8; margin-top: 6px; }
.planner__pnr {
  display: flex; gap: 10px; align-items: center; font-size: 12px; line-height: 1.4;
  padding: 12px; border-radius: 12px; background: rgba(46,204,113,.12);
  border: 1px solid rgba(46,204,113,.3); margin-bottom: 10px;
}
.planner__pnr-icon { font-size: 18px; white-space: nowrap; }
.planner__toggle {
  width: 100%; padding: 11px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 13px;
}
.planner__drive { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 13px; }
.planner__drive-note { opacity: .7; margin: 4px 0 0; }
.planner__drive-warn { margin: 10px 0 0; color: #ffcf6b; line-height: 1.45; }
.planner__fare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.planner__fare-cell {
  display: flex; flex-direction: column; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.planner__fare-cell--wide { grid-column: 1 / 3; flex-direction: row; flex-wrap: wrap; gap: 8px; background: none; padding: 4px 0 0; }
.planner__fare-val { font-size: 18px; font-weight: 800; }
.planner__fare-lbl { font-size: 11px; opacity: .65; }
.planner__chip { font-size: 11px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.1); }

.planner__alert {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; line-height: 1.45;
  font-size: 13px; background: rgba(231,76,60,.14); border: 1px solid rgba(231,76,60,.4);
}
