/* =====================================================================================
   Kiri Services – passenger web app (also the Android passenger app via the TWA)
   One file, in this order:
     1. Tokens (palette, radii, type, elevation, motion: durations, eases, linear() springs)
     2. Base
     3. Components (map screen, sheet, buttons, home, sheets, modals, splash, auth, business)
     4. Ambient light ("lagoon caustics")
     5. "Water" motion recipes (surface, sink, fx show/hide, liquid press + ripple, tide, droplet,
        cascade, rolling digits) + per-component enter/exit
     6. View transitions
     7. Every screen size
     8. html.lite (low-end phones) and prefers-reduced-motion (always last)
   Same token names and values as the shared spec (kiri-tokens.css / Motion.kt).
   ===================================================================================== */

/* Plus Jakarta Sans comes from Google Fonts (index.html). A local()-only @font-face used to sit here:
   phones don't have the font installed, and for weight 800 Chrome picked that empty face over
   Google's, so the big headings fell back to Roboto and looked squished (owner, 2026-11-24). */

/* =================== 1. TOKENS =================== */
:root {
  color-scheme: dark;

  /* Palette (canonical) */
  --kiri-night: #0A0C12;
  --kiri-night-deep: #07080C;
  --biz-night: #0B0D11;
  --surface-glass: rgba(24, 27, 35, .82);
  --surface-raised: rgba(30, 33, 42, .94);
  --surface-solid: #1C1F26;
  --line: rgba(255, 255, 255, .09);
  --stroke: rgba(255, 255, 255, .14);
  --stroke-strong: rgba(255, 255, 255, .24);
  --text: #F4F4F6;
  --label2: rgba(235, 235, 245, .70);
  --label3: rgba(235, 235, 245, .62);
  --label-disabled: rgba(235, 235, 245, .38);
  --kiri-yellow: #FFD60A;
  --kiri-yellow-deep: #E8B800;
  --kiri-yellow-hover: #FFE04D;
  --yellow-light: #FFE566;
  --yellow-ink: #FFE9A6;
  --on-yellow: #111111;
  --gold: #D8B65E;
  --green: #30D158;
  --green-deep: #24AA48;
  --green-text: #5BE07F;
  --orange: #FF9F0A;
  --orange-text: #FFB340;
  --red: #FF453A;          /* fills and icons */
  --red-text: #FF6961;     /* text on dark */
  --sign-red: #FF3B30;
  --blue: #0A84FF;
  --link: #0A84FF;
  --cyan: #64D2FF;
  --cyan-text: #8EDCFF;
  --grey: #8E8E93;
  --grad-yellow: linear-gradient(180deg, #FFD60A, #E8B800);
  --grad-yellow-hover: linear-gradient(180deg, #FFE04D, #E8B800);
  --grad-green: linear-gradient(180deg, #30D158, #24AA48);
  --grad-red: linear-gradient(180deg, #FF453A, #D9302A);
  --grad-gold: linear-gradient(180deg, #E4C77A, #C9A54E);
  --glass-tint: radial-gradient(120% 80% at 20% 0%, rgba(92, 70, 255, .08), transparent 60%);

  /* Accent: kiri yellow, muted gold for verified businesses (.home.biz, body.biz-mode) */
  --accent: var(--kiri-yellow);
  --accent-grad: var(--grad-yellow);

  /* Legacy aliases (kept so older rules/inline styles keep working) */
  --bg: var(--kiri-night);
  --white: #FFFFFF;
  --yellow: var(--kiri-yellow);
  --yellow2: var(--kiri-yellow-deep);
  --glass-border: var(--stroke);
  --well: rgba(10, 12, 16, .45);

  /* Radii */
  --r-xs: 6px; --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-xl: 28px; --r-sheet: 36px; --r-pill: 999px;

  /* Elevation */
  --elev-1: 0 6px 16px rgba(0, 0, 0, .35);
  --elev-2: 0 10px 30px rgba(0, 0, 0, .45);
  --elev-3: 0 30px 70px rgba(0, 0, 0, .45);
  --glow-yellow: 0 10px 30px rgba(255, 214, 10, .20);

  /* Sizes */
  --cta-h: 56px;
  --input-h: 52px;
  --hit: 44px;

  /* Type */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-num: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; /* tabular figures */

  /* Motion: durations (exit = .65 x enter) */
  --dur-0: 100ms;
  --dur-1: 180ms;
  --dur-2: 320ms;
  --dur-3: 480ms;
  --dur-4: 700ms;
  --dur-hero: 900ms;
  --dur-ambient-a: 30s;
  --dur-ambient-b: 38s;

  /* Motion: easing */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-sine: cubic-bezier(.37, 0, .63, 1);
  --ease: var(--ease-out); /* legacy alias */

  /* Motion: springs (cubic-bezier fallbacks; linear() versions below when supported) */
  --spring-soft: cubic-bezier(.22, 1.12, .36, 1);
  --spring-bouncy: cubic-bezier(.34, 1.4, .64, 1);
  --spring-press: cubic-bezier(.3, 1.5, .6, 1);
  --spring: var(--spring-bouncy); /* legacy alias */

  /* Motion: stagger + distances */
  --stagger: 40ms;
  --stagger-cap: 240ms;
  --stagger-letter: 80ms;
  --stagger-word: 25ms;
  --rise: 20px;
  --rise-sm: 8px;
  --rise-lg: 40px;
  --slide-x: 28px;
  --blur-in: 6px;
  --blur-in-lg: 12px;
  --scale-in: .96;
  --press-scale: .965;
  --press-scale-card: .98;
  --sheet-off: calc(100% + 16px);   /* how far a tide sheet sits below the screen */

  /* Safe areas + layout */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --side-w: min(400px, 44vw);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-soft: linear(0, .06 2.5%, .23 6%, .5 11%, .76 17%, .92 23%, 1.01 30%, 1.03 36%, 1.02 45%, 1.005 58%, .999 72%, 1);
    --spring-bouncy: linear(0, .08 2.5%, .3 6%, .64 11%, .95 17%, 1.1 23%, 1.12 27%, 1.08 33%, 1 41%, .97 48%, .985 56%, 1.005 66%, 1.002 78%, 1);
    --spring-press: linear(0, .52 9%, .93 18%, 1.07 28%, 1.03 40%, .99 55%, 1);
  }
}
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

/* =================== 2. BASE =================== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--kiri-night); color: var(--text);
  font-family: var(--font); overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible { outline: none; }

#map { position: fixed; inset: 0; }
.mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right { bottom: var(--map-bottom, 0px) !important; transition: bottom var(--dur-2) var(--ease-out); }
.mapboxgl-ctrl-bottom-left { left: var(--map-left, 0px) !important; transition: bottom var(--dur-2) var(--ease-out), left var(--dur-2) var(--ease-out); }

/* Map-screen material: the home's surface floating over the map (no backdrop blur: blurring the
   live map every frame is what made phones stutter). */
.glass { background: var(--glass-tint), var(--surface-raised); border: 1px solid var(--stroke); box-shadow: var(--elev-2); }

/* =================== 3. COMPONENTS =================== */
/* ---- Top bar ---- */
.top { position: fixed; left: calc(var(--sal) + 14px); right: calc(var(--sar) + 14px); top: calc(var(--sat) + 10px); z-index: 5; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.map-mode { height: 50px; padding: 0 16px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; color: var(--white); white-space: nowrap; transition: border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.map-mode.on { color: var(--kiri-yellow); border-color: rgba(255, 214, 10, .55); background: linear-gradient(160deg, rgba(255, 214, 10, .20), rgba(255, 214, 10, .06)), var(--surface-raised); }
.circle { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; }
.circle.small { width: 46px; height: 46px; }
.search { margin-top: 12px; height: 54px; border-radius: var(--r-pill); display: flex; align-items: center; gap: 10px; padding: 0 8px 0 20px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; -webkit-appearance: none; }
.search input::placeholder { color: var(--label3); }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 50%; color: var(--label2); font-size: 16px; flex: none; }
.results { margin-top: 8px; border-radius: var(--r-lg); padding: 6px 0; overflow-y: auto; overscroll-behavior: contain;
  max-height: 50vh; max-height: calc(100dvh - var(--kb, 0px) - var(--sat) - 160px); transform-origin: 50% 0; }
.result { display: block; width: 100%; text-align: left; padding: 11px 20px; }
.result:active { background: rgba(255, 255, 255, .06); }
.result b { display: block; font-size: 16px; }
.result small { color: var(--label3); font-size: 13px; }
.osm-credit { color: var(--label3); font-size: 12px; text-align: center; margin: 8px 0 4px; }

/* ---- Centre pin ---- */
.pin { position: fixed; left: 50%; width: 160px; margin-left: -80px; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; }
/* Contract: JS may position with --pin-x/--pin-y (px of the pin's top-left centre line) + class pin-xy
   instead of style.top/left, so the pin glides with the camera instead of teleporting. */
.pin.pin-xy { left: 0; top: 0; transform: translate3d(var(--pin-x, 50vw), var(--pin-y, 50vh), 0);
  transition: transform var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft); }
.pin-label { background: var(--surface-raised); border: 1px solid var(--stroke); border-radius: var(--r-pill); padding: 7px 16px;
  font-weight: 700; font-size: 15px; margin-bottom: 10px; box-shadow: var(--elev-1); white-space: nowrap; }
.pin-ball { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; position: relative; z-index: 1; }
.pin-ball span { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-yellow); position: relative; }
/* Pickup -> drop-off: the green layer crossfades over the yellow one */
.pin-ball span::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--grad-green); opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out); }
.pin-ball span::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #111; }
.pin.drop .pin-ball span::before { opacity: 1; }
.pin.drop .pin-label { border-color: rgba(48, 209, 88, .6); }
.pin-stick { width: 3px; height: 26px; background: #fff; border-radius: 2px; }
.pin-dot { width: 10px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, .5); }
.pin-ring { position: absolute; bottom: -24px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 214, 10, .25); opacity: 0; pointer-events: none; }
/* The pin lifts while the map moves and settles with a spring when it stops */
.pin-label, .pin-ball, .pin-stick { transition: transform var(--dur-2) var(--ease-out); }
.pin-dot { transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
.pin.lift .pin-label, .pin.lift .pin-ball, .pin.lift .pin-stick { transform: translate3d(0, -12px, 0); }
.pin.lift .pin-dot { transform: scale(1.6); opacity: .35; }
.pin:not(.lift) :is(.pin-label, .pin-ball, .pin-stick) { transition: transform var(--dur-3) var(--spring-bouncy); }
/* Touchdown: one ripple from the tip when the map stops (JS restarts class "touchdown") */
.pin.touchdown:not(.waiting) #ring1 { animation: kTouch 700ms var(--ease-out); }
.pin.waiting .pin-ring { animation: kPulse 2s var(--ease-out) infinite; }
.pin.waiting #ring2 { animation-delay: 1s; }

/* ---- Bottom sheet (#panel) ---- */
.sheet { position: fixed; left: calc(var(--sal) + 10px); right: calc(var(--sar) + 10px); bottom: calc(var(--sab) + 12px); z-index: 4;
  border-radius: var(--r-sheet); padding: 18px; max-height: calc(100% - var(--sat) - 150px); overflow-y: auto; overscroll-behavior: contain;
  --sheet-from: 0 48px; }
.status { display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; margin: 0 auto 14px; padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; border: 1px solid transparent; overflow: hidden; }
.status i { width: 8px; height: 8px; border-radius: 50%; display: block; flex: none; }
.status span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 { margin: 0 0 12px; text-align: center; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.22; }
.message { margin: -4px 0 14px; text-align: center; color: var(--label2); font-size: 14.5px; line-height: 1.45; }
.fare { position: relative; isolation: isolate; text-align: center; color: var(--kiri-yellow); font-family: var(--font-num);
  font-size: clamp(42px, 15vw, 64px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.well { background: var(--well); border: 1px solid rgba(255, 255, 255, .07); border-radius: 20px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.grow b { font-size: 16.5px; font-weight: 700; line-height: 1.28; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow b.dim { color: var(--label2); }
.lbl { color: var(--label3); font-size: 11.5px; font-weight: 800; letter-spacing: .09em; }
.lbl.pad { display: block; padding: 4px 4px 8px; }
.hint { color: var(--label3); font-size: 12.5px; }
#pickupHint, #dropHint { white-space: normal; line-height: 1.35; }
.badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.badge.yellow { background: rgba(255, 214, 10, .16); border: 1px solid rgba(255, 214, 10, .4); }
.badge.green { background: rgba(48, 209, 88, .2); border: 1px solid rgba(48, 209, 88, .5); }
.badge.blue { background: rgba(10, 132, 255, .18); border: 1px solid rgba(10, 132, 255, .45); }
#pickupRow[role=button], #dropRow { cursor: pointer; }
.row.live { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
#dropRow.live { border-color: rgba(48, 209, 88, .5); box-shadow: inset 0 0 0 1px rgba(48, 209, 88, .25); }
.change { position: relative; color: var(--link); font-weight: 700; font-size: 14.5px; padding: 6px 8px; flex: none; }

/* Now / Schedule: a droplet thumb slides between the halves (thumb = .seg::before, see §5) */
.seg { position: relative; isolation: isolate; display: flex; height: 46px; padding: 5px; border-radius: 16px; margin-bottom: 14px; }
.seg button { position: relative; z-index: 1; flex: 1; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--label2); }
.seg button.on { background: var(--accent-grad); color: var(--on-yellow); }

.time { position: relative; padding: 14px 16px; cursor: pointer; }
.time b { font-size: 16.5px; font-weight: 700; }
.time .link { color: var(--link); font-size: 14.5px; font-weight: 700; padding: 6px 8px; flex: none; }

/* ---- iOS-style Drum-Wheel Time Picker (#timeSheet) ---- */
.time-modal { z-index: 42; }
.time-modal .modal-card { padding: 20px 20px 22px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tp-head h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.tp-preview { padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255, 214, 10, .16);
  border: 1px solid rgba(255, 214, 10, .45); color: var(--kiri-yellow); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.tp-sub { color: var(--label2); font-size: 14.5px; line-height: 1.45; margin: 0 0 16px !important; }
.ios-wheels { position: relative; display: flex; align-items: center; height: 220px; border-radius: 22px;
  background: rgba(10, 12, 18, .72); border: 1px solid rgba(255, 255, 255, .10); padding: 0 8px; margin-bottom: 6px; overflow: hidden; user-select: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.35) 16%, #000 34%, #000 66%, rgba(0,0,0,.35) 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.35) 16%, #000 34%, #000 66%, rgba(0,0,0,.35) 84%, transparent 100%); }
.ios-wheel-bar { position: absolute; left: 8px; right: 8px; top: 50%; height: 44px; translate: 0 -50%;
  border-radius: 13px; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 214, 10, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); pointer-events: none; z-index: 0; }
.ios-wheel { position: relative; z-index: 1; height: 220px; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 88px 0; }
.ios-wheel::-webkit-scrollbar { display: none; }
.ios-wheel-day { flex: 1.75; min-width: 0; }
.ios-wheel-num { flex: .75; min-width: 0; }
.ios-wheel-ampm { flex: .75; min-width: 0; }
.ios-wheel-sep { position: relative; z-index: 1; font-weight: 800; font-size: 20px; color: var(--white); padding: 0 1px 2px; pointer-events: none; }
.ios-wheel-item { height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 6px;
  scroll-snap-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(235, 235, 245, .42); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 140ms var(--ease-out), font-weight 140ms var(--ease-out); }
.ios-wheel-day .ios-wheel-item { justify-content: flex-start; padding-left: 14px; }
.ios-wheel-item.on { color: var(--white); font-size: 18px; font-weight: 800; }
.ios-wheel-item.near { color: rgba(235, 235, 245, .72); font-size: 16.5px; }
.tp-warn { margin: 12px 2px 0 !important; padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(255, 159, 10, .14); border: 1px solid rgba(255, 159, 10, .42); color: var(--orange-text) !important;
  font-size: 13.5px; font-weight: 700; text-align: center; }
#tpConfirm { margin-top: 16px; }
#tpNow { margin-top: 10px; }
.input { width: 100%; height: var(--input-h); border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08);
  padding: 0 16px; font-size: 16px; outline: none; transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.input::placeholder { color: var(--label3); }
.input:focus { border-color: rgba(255, 214, 10, .6); box-shadow: 0 0 0 4px rgba(255, 214, 10, .12); }
.input.invalid { border-color: rgba(255, 105, 97, .75); box-shadow: 0 0 0 4px rgba(255, 69, 58, .18); }
.taken { margin: 0 4px 14px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 159, 10, .10); border: 1px solid rgba(255, 159, 10, .24); color: var(--label2); font-size: 13px; line-height: 1.45; }
.taken b { color: var(--orange-text); }

.loc { display: flex; gap: 12px; padding: 12px; margin-bottom: 12px; border-color: rgba(10, 132, 255, .35); }
.loc .grow b { white-space: normal; }
.loc-text { color: var(--label2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.loc-text b { font-size: 13px; color: var(--white); }
.loc-btn { align-self: flex-start; margin-top: 8px; min-height: var(--hit); padding: 8px 18px; border-radius: var(--r-pill); background: var(--blue); color: #fff;
  font-weight: 700; font-size: 15px; }
/* While ordering, the location card is a single line so the map and pin stay visible. */
.loc.compact { align-items: center; padding: 10px 12px; }
.loc.compact .loc-text { display: none; }
.loc.compact .grow { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.loc.compact .grow b { font-size: 15px; white-space: normal; }
.loc.compact .loc-btn { margin-top: 0; align-self: center; flex: none; padding: 8px 14px; font-size: 14px; }
.loc.compact .badge { width: 34px; height: 34px; }

.note-link { position: relative; color: var(--link); font-size: 15px; min-height: var(--hit); padding: 4px 4px 0; }
#note { margin-top: 2px; }

.car { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 8px; margin-bottom: 12px; }
.car img { width: clamp(84px, 30vw, 132px); height: auto; aspect-ratio: 3 / 2; object-fit: contain; flex: none; background: #fff; border-radius: 14px; padding: 4px; }
.car img.photo { object-fit: cover; border-radius: var(--r-sm); padding: 0; }
.car-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.plate { background: #F7F7F2; color: #111; border: 2px solid #1C1C1E; border-radius: var(--r-xs); padding: 2px 10px; max-width: 100%;
  font: 700 clamp(14px, 4.2vw, 18px) ui-monospace, Menlo, monospace; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-info b { margin-top: 6px; font-size: 15px; max-width: 100%; overflow-wrap: anywhere; }
.car-info small { color: var(--label3); font-size: 13px; }
.car-driver { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; }
.car-driver img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, .25); flex: none; }

.foot { margin: 10px 0 0; text-align: center; color: var(--label3); font-size: 13px; }
#footnote a { color: var(--accent); font-weight: 700; text-decoration: none; }
.step-back { position: relative; display: block; margin: 6px auto 0; min-height: var(--hit); color: var(--label2); font-weight: 700; font-size: 15px; padding: 6px 18px; }
.est-cancel { position: relative; display: block; width: max-content; margin: -2px 0 6px auto; padding: 7px 14px; border-radius: var(--r-pill); font-weight: 800; font-size: 14px;
  color: var(--white); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
/* Small visuals, big fingers: invisible 44px+ hit areas */
:is(.icon-btn, .est-cancel, .change, .place .del, .bh-link)::before { content: ""; position: absolute; inset: -8px; }

/* Step by step: pickup -> confirm */
.stepper { display: flex; gap: 6px; list-style: none; margin: -2px 0 12px; padding: 0; }
.stepper li { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06); color: var(--label3); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.stepper i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: rgba(255, 255, 255, .12); color: var(--white); flex: none;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), scale var(--dur-3) var(--spring-bouncy); }
.stepper li.on { background: rgba(255, 214, 10, .16); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 214, 10, .45); }
.stepper li.on i { background: var(--accent); color: var(--on-yellow); scale: 1.08; }
.stepper li.done { color: var(--green-text); }
.stepper li.done i { background: var(--green); color: #0b2a14; font-size: 0; }
.stepper li.done i::after { content: "✓"; font-size: 12px; }

/* ---- Buttons ---- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  height: var(--cta-h); border-radius: var(--r-pill); font-size: 19px; font-weight: 700; margin-top: 14px; }
.btn.yellow { background: var(--accent-grad); color: var(--on-yellow); box-shadow: var(--glow-yellow); }
/* Disabled: a grey layer fades over the gradient (gradients can't transition) */
.btn.yellow::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #3D3F48; opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out); }
.btn.yellow:disabled { color: var(--label-disabled); box-shadow: none; cursor: default; }
.btn.yellow:disabled::before { opacity: 1; }
.btn.glass-btn { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); margin-top: 10px; }
.btn.glass-btn.skip { color: var(--white); }
.btn.red { color: var(--red-text); }
.btn.yellow, .btn-go { --ripple: rgba(255, 255, 255, .45); }
.pill-btn { position: relative; min-height: var(--hit); padding: 9px 16px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; font-size: 15px; }
.pill-btn.wide { display: block; width: 100%; padding: 14px; margin-top: 12px; font-size: 16px; }
.pill-btn.danger { color: var(--red-text); margin-top: 26px; }
.small-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 14px; flex: none; white-space: nowrap; }

/* ---- Toast: a droplet ---- */
.toast { position: fixed; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 40px);
  top: calc(var(--sat) + 140px); z-index: 30; overflow: hidden; touch-action: none;
  background: var(--glass-tint), var(--surface-raised); border: 1px solid var(--stroke); border-radius: var(--r-lg); padding: 12px 18px 14px;
  font-size: 15px; text-align: center; box-shadow: var(--elev-2); }
/* Lifetime line along the bottom (JS sets --toast-ms to the toast's lifetime) */
.toast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); opacity: .55;
  transform-origin: 0 50%; animation: kToastLife var(--toast-ms, 3500ms) linear both; }
.toast.again { animation: kBump var(--dur-2) var(--spring-bouncy); }
.toast.again::after { animation-name: kToastLife2; }
.toast.dragging { transition: none !important; }

/* ---- Map markers ---- */
.marker-pickup { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.marker-pickup::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle, #111 0 30%, var(--kiri-yellow) 32%); }
.marker-taxi { width: 44px; height: 44px; border-radius: 50%; background: var(--grad-yellow);
  border: 3px solid #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .55); }
.marker-taxi > svg { transition: rotate .6s var(--ease-out); rotate: var(--bearing, 0deg); }
/* While the taxi is on its way: a soft ring that grows as it gets close (JS sets --amp 1..1.8) */
.marker-taxi.coming::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(255, 214, 10, .7);
  pointer-events: none; animation: kTaxiRing 2s var(--ease-out) infinite; }
.marker-drop-wrap { width: 40px; height: 46px; display: grid; place-items: start center; pointer-events: none; }
.marker-drop { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--green);
  border: 3px solid #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.marker-drop svg { transform: rotate(45deg); }
.me { width: 22px; height: 22px; position: relative; pointer-events: none; }
.me-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.me-halo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(10, 132, 255, .18); border: 1px solid rgba(10, 132, 255, .35); }

/* =================== HOME =================== */
.home { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background: var(--kiri-night); transform-origin: 50% 40%; }
.home-scroll { position: relative; z-index: 1; flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: grid; align-content: start; grid-template-columns: minmax(0, 1fr);
  padding: calc(var(--sat) + 22px) calc(var(--sar) + 18px) calc(var(--sab) + 120px) calc(var(--sal) + 18px); }
/* Tabs share one grid cell, so the outgoing and incoming tab can cross without a jump */
.tab { grid-area: 1 / 1; width: 100%; max-width: 560px; justify-self: center; min-width: 0; }
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.home-logo { height: 34px; width: auto; flex: none; }
.head-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-avatar { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-yellow); color: var(--on-yellow);
  font-weight: 800; font-size: 19px; overflow: hidden; display: grid; place-items: center; flex: none; }
.home-avatar img, .acct-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.home-avatar.has-img, .acct-avatar.has-img { background: none; }
.hello { text-align: left; font-size: clamp(26px, 8vw, 34px); font-weight: 800; letter-spacing: -.03em; margin: 26px 0 18px; }
.home-notice { margin: -6px 0 16px; padding: 12px 14px; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(255, 214, 10, .18), rgba(255, 214, 10, .07));
  border: 1px solid rgba(255, 214, 10, .4); color: var(--yellow-ink); font-weight: 700; font-size: 15px; line-height: 1.35; }
.ios-card { margin: 0 0 16px; padding: 16px; border-color: rgba(255, 214, 10, .35);
  background: linear-gradient(155deg, rgba(255, 214, 10, .11), rgba(255, 214, 10, .02)), var(--surface-glass); }
.ios-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ios-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .04em; background: rgba(255, 214, 10, .16);
  color: var(--kiri-yellow); border: 1px solid rgba(255, 214, 10, .4); }
.ios-close { width: 44px; height: 44px; margin: -10px -10px -10px 0; border-radius: 50%;
  display: grid; place-items: center; color: var(--label2); font-size: 16px; flex: none; }
.ios-close:active { background: rgba(255, 255, 255, .1); }
.ios-card b { display: block; font-size: 18px; line-height: 1.25; }
.ios-card-sub { margin: 6px 0 12px; color: var(--label2); font-size: 14px; line-height: 1.45; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ios-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--text); }
.ios-steps li b { display: inline; font-size: inherit; color: var(--kiri-yellow); }
.ios-step-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: var(--kiri-yellow); }
.ios-notify-btn { margin-top: 2px; height: 48px; font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .ios-close:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
}
.where { position: relative; display: flex; align-items: center; height: 60px; border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(46, 50, 60, .92), rgba(34, 37, 45, .92)); border: 1px solid rgba(255, 255, 255, .12); padding: 0 6px 0 0; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.where-btn { flex: 1; min-width: 0; height: 100%; border-radius: var(--r-xl); display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 20px; font-weight: 700; text-align: left; }
.where-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where-btn svg { flex: none; }
.when-chip { position: relative; display: flex; align-items: center; gap: 7px; height: 46px; padding: 0 16px; border-radius: 23px; flex: none; max-width: 48%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; }
.when-chip svg { flex: none; }
.when-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.when-chip input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.home-h2 { font-size: 19px; margin: 26px 2px 12px; letter-spacing: -.01em; }
.home-h2.first { margin-top: 0; }
.action-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.action-pill {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  min-height: 152px; padding: 20px 18px;
  border-radius: var(--r-lg); background: var(--surface-glass); border: 1px solid var(--line); color: var(--text);
  cursor: pointer; min-width: 0; transition: transform 160ms ease, background-color 180ms ease, border-color 180ms ease;
}
.action-pill.on {
  background: linear-gradient(160deg, rgba(255, 214, 10, .24), rgba(255, 214, 10, .06)), var(--surface-glass);
  border-color: rgba(255, 214, 10, .52);
}
.action-pill:active { transform: scale(.97); }
.action-pill svg { flex: none; width: 38px; height: 38px; margin-bottom: auto; }
.ap-text { display: flex; flex-direction: column; min-width: 0; width: 100%; gap: 2px; margin-top: 14px; }
.ap-text b { font-size: 21px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-text small { font-size: 13.5px; color: var(--label2); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.qp-modal-card { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.qp-modal-sub { margin: -4px 0 6px; font-size: 14px; color: var(--label2); }
.where[hidden] { display: none !important; }
.hello + .tiles, #homeRegular > .tiles:first-of-type { margin-top: 4px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 16px 14px; min-height: 124px; min-width: 0;
  border-radius: var(--r-lg); background: var(--surface-glass); border: 1px solid var(--line); }
.tile svg { margin-bottom: auto; flex: none; }
.tile b { font-size: 17px; margin-top: 12px; line-height: 1.15; overflow-wrap: anywhere; }
.tile small { color: var(--label3); font-size: 13px; }
.tile.on { background: linear-gradient(160deg, rgba(255, 214, 10, .22), rgba(255, 214, 10, .05)), var(--surface-glass); border-color: rgba(255, 214, 10, .5); }
.tile.closed { opacity: .45; }
.tile.qp-tile { min-height: 76px; padding: 11px 12px; gap: 2px; border-radius: 20px; border: 1px solid var(--line); }
.tile.qp-tile svg { width: 20px; height: 20px; margin-bottom: 0; }
.tile.qp-tile b { font-size: 14px; margin-top: 5px; }
.tile.qp-tile small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fare-card { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 18px 16px 18px 20px; border-radius: var(--r-xl); text-align: left;
  background: var(--grad-yellow); color: var(--on-yellow); box-shadow: var(--glow-yellow); --ripple: rgba(255, 255, 255, .45); }
.fare-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fare-text small { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fare-text b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.fare-text span { font-size: 14px; font-weight: 600; }
.fare-go { width: 52px; height: 52px; border-radius: 50%; background: #17150E; display: grid; place-items: center; flex: none; }
.places { margin-top: 16px; border-radius: var(--r-lg); background: var(--surface-glass); border: 1px solid var(--line); overflow: hidden; }
.places:empty { display: none; }
.place { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; text-align: left; border-top: 1px solid rgba(255, 255, 255, .07); }
.place:first-child { border-top: 0; }
.place-ic { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .07); display: grid; place-items: center; flex: none; }
.place .grow b { font-size: 16.5px; white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.place .grow small { color: var(--label3); font-size: 13.5px; white-space: normal; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.place .chev { color: var(--label3); font-size: 22px; }
.place .del { position: relative; color: var(--red-text); font-size: 14px; font-weight: 700; padding: 12px 8px; }
.places.rides { margin: 0 0 18px; border-color: rgba(255, 214, 10, .4);
  background: linear-gradient(160deg, rgba(255, 214, 10, .10), rgba(255, 214, 10, .02)), var(--surface-glass); }
.ride-row .grow small { white-space: normal; }
.ride-row.live .place-ic { background: rgba(48, 209, 88, .22); }
.ride-row.booked .place-ic { background: rgba(255, 214, 10, .18); }
.home-side-h { display: none; }
.home.biz .home-side { display: none; }

/* Tab bar with a droplet indicator (.ink, moved by :has() in §5 — no JS needed) */
.tabbar { position: absolute; left: 0; right: 0; margin-inline: auto; bottom: calc(var(--sab) + 14px); width: min(520px, calc(100% - 24px)); z-index: 2;
  display: grid; --tabs: 3; grid-template-columns: repeat(var(--tabs), minmax(0, 1fr)); padding: 6px; border-radius: var(--r-sheet);
  background: #1B1E27; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 12px 30px rgba(0, 0, 0, .52);
  --ink-pad: 6px; --ink-gap: 0px; --ink-sq: 1.16 .84; }
.tabbtn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 7px; min-height: var(--hit);
  border-radius: 28px; color: var(--label2); font-size: 13px; font-weight: 700; min-width: 0; }
.tabbtn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbtn.on { background: rgba(255, 255, 255, .12); color: var(--accent); }
.tabbar .ink { display: none; }
.tab-title { text-align: left; font-size: 32px; font-weight: 800; margin: 8px 0 18px; }
.card { border-radius: var(--r-lg); background: var(--surface-glass); border: 1px solid var(--line); padding: 16px; }
.acct { display: flex; align-items: center; gap: 14px; }
.acct-avatar { position: relative; width: 56px; height: 56px; padding: 0; border-radius: 50%; background: var(--grad-yellow); color: var(--on-yellow);
  font-weight: 800; font-size: 22px; display: grid; place-items: center; overflow: hidden; flex: none; }
.acct .grow b { font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
.acct .grow small { color: var(--label3); font-size: 14px; overflow-wrap: anywhere; }
.google-box { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.google-box small { color: var(--label2); font-size: 14px; line-height: 1.4; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; margin-top: 8px; border-radius: var(--r-pill);
  background: #fff; color: #1F1F1F; font-weight: 700; font-size: 16px; --ripple: rgba(0, 0, 0, .12); }
.fineprint { text-align: center; color: var(--label3); font-size: 13px; margin-top: 22px; line-height: 1.6; }
.fineprint a { color: var(--label2); }
.activity { display: flex; flex-direction: column; gap: 10px; }
.act { display: flex; gap: 14px; align-items: flex-start; }
.act .grow b { font-size: 16px; white-space: normal; }
.act .grow small { color: var(--label3); font-size: 13px; white-space: normal; }
.act .amt { font-weight: 800; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.act-status { display: inline-block; width: max-content; margin-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); }
.act.open { cursor: pointer; border-color: rgba(255, 214, 10, .35); }
.act-open { align-self: center; min-height: 40px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--accent-grad); color: var(--on-yellow);
  font-weight: 800; font-size: 14px; flex: none; --ripple: rgba(255, 255, 255, .45); }
.empty { color: var(--label2); text-align: center; padding: 30px 10px; }
/* Loading placeholders (JS: <div class="skel"></div> x3) */
.skel { position: relative; overflow: hidden; height: 84px; border-radius: var(--r-lg); background: var(--surface-glass); border: 1px solid var(--line); }
.skel::after { content: ""; position: absolute; inset: 0; translate: -100% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: kShimmer 1.4s var(--ease-in-out) infinite; }

/* ---- Bell + notifications ---- */
.bell-pill { position: relative; height: 46px; min-width: 46px; padding: 0 14px; border-radius: 23px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: var(--white); }
.bell-pill svg { flex: none; transform-origin: 50% 10%; }
.bell-pill.has { background: rgba(255, 214, 10, .16); border-color: rgba(255, 214, 10, .5); color: var(--kiri-yellow);
  background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.bell-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--on-yellow); font-size: 12px; font-weight: 800;
  display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.bell-count.bump { animation: kBump var(--dur-2) var(--spring-bouncy); }
.bell-pill.has svg, .bell-pill.ring svg { animation: kBellRing 2.4s 1; }

/* Place search + notifications: full-screen tide sheets */
.place-sheet { position: fixed; inset: 0; z-index: 18; background: var(--kiri-night); display: flex; flex-direction: column;
  padding: calc(var(--sat) + 14px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); }
.ps-top { display: flex; align-items: center; gap: 12px; max-width: 560px; width: 100%; margin: 0 auto; min-width: 0; }
.ps-top h2 { font-size: 24px; margin: 0; min-width: 0; }
.ps-search { max-width: 560px; width: 100%; margin: 14px auto 0; }
.ps-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; max-width: 560px; width: 100%; margin: 10px auto 0; }
.ps-group { color: var(--label3); font-size: 13px; font-weight: 700; margin: 16px 4px 6px; }
.notice-sheet { z-index: 19; }
.notice-sheet .ps-top h2 { flex: 1; min-width: 0; font-size: clamp(19px, 5.5vw, 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-list { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.notice { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, .08); text-align: left; width: 100%; }
.notice.unread { border-color: rgba(255, 214, 10, .45); background: linear-gradient(90deg, rgba(255, 214, 10, .10), var(--surface-solid) 60%); }
.notice .n-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; grid-row: span 3; font-size: 20px; background: rgba(255, 255, 255, .07); }
.notice b { font-size: 16px; }
.notice span.n-body { color: var(--label2); font-size: 14px; line-height: 1.35; }
.notice small { color: var(--label3); font-size: 12px; }
.notice.unread small::before { content: "● "; color: var(--kiri-yellow); }
.notice-clear { margin: 14px auto 0; max-width: 560px; }
.notice-sheet .empty { padding: 40px 10px; }

/* ---- Modals: tide sheets on phones, centred cards on wide screens ---- */
.modal { position: fixed; inset: 0; z-index: 25; display: flex; align-items: flex-end; justify-content: center;
  padding: 10px calc(var(--sar) + 10px) 0 calc(var(--sal) + 10px);
  background: rgba(4, 5, 8, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(560px, 100%); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, .12); border-bottom: 0; box-shadow: var(--elev-3);
  padding: 14px 20px calc(var(--sab) + 18px); max-height: calc(100dvh - var(--sat) - 20px); overflow-y: auto; overscroll-behavior: contain; }
.modal-card h2 { margin: 0 0 8px; font-size: 24px; }
.modal-card p { color: var(--label2); margin: 0 0 12px; line-height: 1.45; }
.modal-card.dragging { transition: none !important; }
/* Drag handle (phones). JS dragSheet moves the card; release springs back or closes. */
.grab { display: block; width: 36px; height: 5px; border-radius: 3px; margin: 0 auto 14px; background: var(--stroke-strong); touch-action: none; position: relative; }
.grab::before { content: ""; position: absolute; inset: -14px -40px; }
.fare-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.fare-table td { padding: 11px 0; border-top: 1px solid var(--line); }
.fare-table td + td { text-align: right; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
/* Are-you-sure: always a centred card */
.confirm-modal { z-index: 45; align-items: center; padding-bottom: 10px; }
.confirm-modal .modal-card { text-align: center; max-width: 440px; border-radius: var(--r-xl); border-bottom: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; }
.confirm-modal .btn.glass-btn { margin-top: 10px; }
/* Alerts + location prompt */
.perm-modal { z-index: 44; }
.pm-icon { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 214, 10, .14); border: 1px solid rgba(255, 214, 10, .45); color: var(--kiri-yellow); animation: kBellRing 2.4s var(--ease-in-out) infinite; }
.perm-modal p { color: var(--label2); }
.pm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 14px 0 16px; text-align: left; }
.pm-row { min-width: 0; }
.pm-row small { overflow-wrap: anywhere; }
.perm-modal .modal-card { max-height: calc(100dvh - var(--sat) - var(--sab) - 24px); overflow-y: auto; overscroll-behavior: contain; }
.pm-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.pm-row .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pm-row .grow > b { font-size: 16px; }
.pm-row small b { font-size: inherit; color: var(--label2); white-space: normal; } /* long settings paths must wrap on phones */
.pm-row small { color: var(--label3); font-size: 13px; line-height: 1.35; }
.pm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red, #FF453A); flex: none; box-shadow: 0 0 0 4px rgba(255, 69, 58, .18); }
.pm-row.ok .pm-dot { background: #30D158; box-shadow: 0 0 0 4px rgba(48, 209, 88, .18); }
.pm-state { font-size: 13px; font-weight: 700; color: var(--red-text, #FF6961); white-space: nowrap; }
.pm-row.ok .pm-state { color: #30D158; }
#pmStay { margin-top: 10px; font-size: 15px; }
/* Trip receipt (paper look) + live fare */
.receipt-modal .modal-card { text-align: left; }
.rc-paper { background: #F7F5EF; color: #1A1A1A; border-radius: 18px; padding: 18px 18px 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.rc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rc-brand { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.rc-no { font-size: 12.5px; color: #6C6C70; font-weight: 600; }
.rc-paper h2 { font-size: 19px; margin: 6px 0 2px; color: #1A1A1A; }
.rc-when, .rc-route { margin: 2px 0; font-size: 14px; color: #3A3A3C; line-height: 1.35; overflow-wrap: anywhere; }
.rc-lines { margin: 12px 0 0; border-top: 1px dashed rgba(0, 0, 0, .25); padding-top: 10px; display: grid; gap: 6px; }
.rc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.rc-line span:first-child { color: #3A3A3C; }
.rc-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(0, 0, 0, .25); font-size: 16px; font-weight: 700; }
.rc-total b { font-size: 26px; font-variant-numeric: tabular-nums; }
.rc-pay { margin-top: 10px; }
.rc-pay[hidden] { display: none; }
.rc-pay .rc-line:last-child span { color: #111; font-weight: 700; }
.rc-foot { margin: 12px 0 0; font-size: 12.5px; color: #6C6C70; line-height: 1.4; }
/* The dialog's own "p { light grey }" must not reach the white paper. */
#receiptSheet .rc-paper p.rc-when, #receiptSheet .rc-paper p.rc-route { color: #3A3A3C; text-align: left; }
#receiptSheet .rc-paper p.rc-foot { color: #6C6C70; text-align: left; }
#receiptSheet .rc-paper h2 { color: #1A1A1A; text-align: left; }
.receipt-modal .btn.glass-btn { margin-top: 10px; }
.tab-sub { color: var(--label2); margin: -6px 0 14px; font-size: 15px; }
.act.receipt { cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit; }
.act.receipt .amt { color: var(--accent); font-weight: 800; }
.act.receipt:hover { border-color: var(--stroke-strong); }
.act-status.rc { color: var(--accent); }
.act-note { color: var(--label3); font-size: 13.5px; margin: 0 2px 10px; }
.live-meta { color: var(--label2); font-variant-numeric: tabular-nums; }
@media print {
  body > *:not(#receiptSheet) { display: none !important; }
  #receiptSheet { position: static; background: none; display: block; }
  #receiptSheet .btn { display: none; }
  .rc-paper { box-shadow: none; }
}
/* "Keep kiri open" reminder during a ride on phones that can't get alerts */
.stay-banner { position: fixed; z-index: 24; left: 50%; translate: -50% 0; top: calc(var(--sat) + 74px); width: min(520px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.35;
  background: rgba(255, 214, 10, .14); border: 1px solid rgba(255, 214, 10, .5); color: var(--kiri-yellow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out); }
.stay-banner[hidden] { display: flex; opacity: 0; translate: -50% -10px; visibility: hidden; }
.stay-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--kiri-yellow); flex: none; animation: kPulse 1.8s var(--ease-out) infinite; }
.cf-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 69, 58, .16); border: 1px solid rgba(255, 69, 58, .45); color: var(--red-text); font-size: 30px; font-weight: 800; }
.avatar-modal { z-index: 40; }

/* =================== Loading screen (lagoon night) =================== */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--kiri-night-deep); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px; overflow: hidden; isolation: isolate;
  transition: opacity 450ms var(--ease-out), scale 450ms var(--ease-out), visibility 0s linear 0s; }
.splash.gone { opacity: 0; scale: 1.03; visibility: hidden; pointer-events: none;
  transition: opacity 450ms var(--ease-out), scale 450ms var(--ease-out), visibility 0s linear 450ms; }
/* kiri wordmark: letters rise once (80 ms apart), then the word breathes */
.sp-word { display: flex; align-items: flex-end; animation: kBreathe 2.4s var(--ease-in-out) 1.1s infinite alternate; }
.sp-clip { display: flex; gap: 0; overflow: hidden; padding: 6px 4px 14px; }
.sp-l { display: block; fill: #FFFFFF; margin: 0 3px; animation: kLetterIn 700ms var(--ease-out) calc(150ms + var(--i, 0) * var(--stagger-letter)) both; }
.splash.gone .sp-l { animation: kLetterOut 360ms var(--ease-in) calc(var(--i, 0) * 40ms) both; }
.sp-track { position: relative; display: block; width: 120px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.sp-bar { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--kiri-yellow); transform-origin: 0 50%;
  animation: kBarFill 900ms var(--ease-out) .35s both; }
.sp-track::after { content: ""; position: absolute; inset: 0; translate: -100% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: kShimmer 2.4s var(--ease-in-out) 1.3s infinite; }

/* =================== No internet / something went wrong =================== */
.offline { position: fixed; inset: 0; z-index: 120; background: rgba(10, 11, 14, .97); display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: calc(var(--sat) + 20px) calc(var(--sar) + 18px) calc(var(--sab) + 20px) calc(var(--sal) + 18px); }
.off-card { width: min(460px, 100%); text-align: center; margin: auto; }
.off-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: rgba(255, 214, 10, .12);
  border: 1px solid rgba(255, 214, 10, .35); display: grid; place-items: center; }
.off-card h2 { font-size: 28px; margin: 0 0 10px; letter-spacing: -.02em; }
.off-card p { color: rgba(235, 235, 245, .78); font-size: 17px; line-height: 1.45; margin: 0 0 18px; }
.off-card p b { color: #fff; }
.off-call { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 18px;
  border-radius: var(--r-pill); margin: 0 0 18px; background: var(--grad-yellow); color: var(--on-yellow); font-weight: 800; font-size: 20px; text-decoration: none; --ripple: rgba(255, 255, 255, .45); }
.off-reload { margin: -6px 0 18px; }
.off-staff { font-size: 16px !important; }
.off-card small { color: rgba(235, 235, 245, .5); font-size: 13px; }

/* =================== Sign in: separate full pages =================== */
.auth { position: fixed; inset: 0; bottom: var(--kb, 0px); z-index: 30; overflow: hidden; isolation: isolate; background: var(--kiri-night-deep); }
.auth-page { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto;
  padding: calc(var(--sat) + 18px) calc(var(--sar) + 22px) calc(var(--sab) + 18px) calc(var(--sal) + 22px); overflow-y: auto; overscroll-behavior: contain; }
.auth-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 0; }
.auth-word .sp-l { fill: #FFFFFF; }
.auth-track { margin: 14px 0 34px; background: rgba(255, 255, 255, .12); }
/* Sign-in wordmark loops like the original: letters rise in, hold, slide out the top; the word pops and the bar fills each cycle */
.auth-word { animation: kAuthPop 3.2s var(--ease-in-out) infinite; }
.auth-word .sp-l { animation: kAuthRise 3.2s cubic-bezier(.22, 1, .36, 1) calc(var(--i, 0) * 70ms) infinite both; }
.auth-track .sp-bar { animation: kAuthBar 3.2s var(--ease-in-out) infinite; }
.auth-track::after { animation: none; }
@keyframes kAuthRise { 0% { translate: 0 115%; } 14%, 84% { translate: 0 0; } 96%, 100% { translate: 0 -115%; } }
@keyframes kAuthPop { 0%, 30% { scale: 1; } 36% { scale: 1.06; } 42%, 100% { scale: 1; } }
@keyframes kAuthBar { 0%, 26% { scale: 0 1; opacity: 1; } 78% { scale: 1 1; opacity: 1; } 88%, 100% { scale: 1 1; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .auth-word, .auth-word .sp-l, .auth-track .sp-bar { animation: none; } }
.auth-hero h1, .auth-body h1 { font-size: clamp(28px, 8vw, 34px); letter-spacing: -.03em; margin: 0 0 8px; text-align: inherit; }
.auth-hero p { color: var(--label2); font-size: 17px; line-height: 1.45; margin: 0; max-width: 32ch; }
.auth-actions { padding-top: 22px; }
.auth-google { position: relative; width: 100%; height: var(--cta-h); display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: var(--r-pill);
  background: #fff; color: #1F1F1F; font-size: 18px; font-weight: 700; --ripple: rgba(0, 0, 0, .12); }
.auth-guest { width: 100%; height: var(--cta-h); border-radius: var(--r-pill); background: transparent; border: 2px solid rgba(255, 255, 255, .28); font-size: 18px; font-weight: 700; }
.auth-business { width: 100%; height: 52px; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--r-pill);
  background: rgba(255, 214, 10, .1); border: 1.5px solid rgba(255, 214, 10, .45); color: var(--kiri-yellow); font-size: 16px; font-weight: 800; }
.auth-note { color: var(--label3); font-size: 14px; line-height: 1.4; text-align: center; margin: 9px 6px 0; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--label3); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }
.auth-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.auth-back { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .09); display: grid; place-items: center; }
.auth-step { color: var(--label3); font-size: 14px; font-weight: 700; }
.auth-body { flex: 1; padding-top: 22px; }
.auth-sub { color: var(--label2); font-size: 16px; line-height: 1.45; margin: 0 0 22px; }
.g-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 22px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.g-chip img { width: 38px; height: 38px; border-radius: 50%; background: #2A2E37; object-fit: cover; flex: none; }
.g-chip span { display: flex; flex-direction: column; min-width: 0; }
.g-chip small { color: var(--label3); font-size: 12px; }
.g-chip b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field { display: block; margin-bottom: 20px; }
.field-label { display: block; font-size: 15px; font-weight: 700; margin: 0 2px 8px; }
.input.big { height: var(--cta-h); font-size: 18px; border-radius: var(--r-md); }
.phone { display: flex; gap: 8px; }
.phone .cc { width: 92px; flex: none; text-align: center; }
.phone .cc.big { width: 98px; }
.phone .input:not(.cc) { min-width: 0; }
.field-help { display: block; color: var(--label3); font-size: 13px; line-height: 1.4; margin: 8px 2px 0; }
.error { color: var(--red-text); font-size: 14px; margin: 4px 0 0; }
.opt { color: var(--label3); font-weight: 500; }
.auth-bottom { position: sticky; bottom: calc(-1 * (var(--sab) + 18px)); padding: 14px 0 calc(var(--sab) + 18px);
  margin-bottom: calc(-1 * (var(--sab) + 18px)); background: linear-gradient(180deg, rgba(7, 8, 12, 0), rgba(7, 8, 12, .92) 30%); }
.auth-bottom .btn { margin-top: 0; }
/* Business sign-up: formal, gold accent, no consumer extras */
#welcomeForm.biz h1 { letter-spacing: -.02em; }
#welcomeForm.biz .btn.yellow { background: var(--grad-gold, linear-gradient(180deg, #E4C77A, #C9A44A)); color: #16130A; }
#welcomeForm.biz .input:focus { border-color: rgba(216, 182, 94, .7); box-shadow: 0 0 0 3px rgba(216, 182, 94, .18); }
#welcomeForm.biz .g-chip { border-color: rgba(216, 182, 94, .3); }
.biz-perks { list-style: none; margin: 0 0 22px; padding: 14px 16px; display: grid; gap: 8px; border-radius: var(--r-md);
  background: rgba(216, 182, 94, .07); border: 1px solid rgba(216, 182, 94, .25); }
.biz-perks li { position: relative; padding-left: 26px; color: var(--label2); font-size: 15px; line-height: 1.35; }
.biz-perks li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 14px; height: 8px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); rotate: -45deg; }
.biz-types { display: flex; flex-wrap: wrap; gap: 8px; }
.biz-types button { min-height: 44px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  color: var(--label2); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out); }
.biz-types button:active { scale: .97; }
.biz-types button.on { color: #16130A; background: var(--gold); border-color: var(--gold); }
.biz-types.shake { animation: kShake 420ms ease-out; }
#welcomeForm.biz .auth-body { padding-bottom: 64px; } /* room above the taller sticky footer (button + fine print) */
#welcomeForm.biz .auth-bottom { background: linear-gradient(180deg, rgba(7, 8, 12, 0), rgba(7, 8, 12, .97) 18%, #07080C 40%); }
.biz-fine { display: block; margin-top: 10px; color: var(--label3); font-size: 12.5px; line-height: 1.4; text-align: center; }

/* =================== Profile picture =================== */
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px; margin: 6px 0 4px; padding: 4px; }
.av-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.av-strip::-webkit-scrollbar { display: none; }
.av-strip .av-opt { flex: none; width: 66px; }
.av-opt { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 0; overflow: hidden; border: 3px solid transparent; background: rgba(255, 255, 255, .08);
  display: grid; place-items: center; }
.av-opt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.av-opt.av-none:has(img) { background: none; }
.av-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 214, 10, .25); }
.av-up { border: 2px dashed rgba(255, 255, 255, .3); color: var(--label2); font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; }
.av-up svg { display: block; margin: 0 auto 2px; }
.av-up.on { border-style: solid; }
.av-none { color: var(--on-yellow); background: var(--grad-yellow); font-size: 24px; font-weight: 800; }
/* Computers: no sideways swiping, so the pictures wrap into rows that scroll with the wheel. */
@media (hover: hover) and (pointer: fine) {
  .av-strip { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; max-height: 236px; scrollbar-width: thin; padding-right: 6px; }
  .av-strip::-webkit-scrollbar { display: block; width: 8px; }
  .av-strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 4px; }
  .av-opt { cursor: pointer; }
  .av-opt:hover { scale: 1.06; border-color: rgba(255, 255, 255, .35); }
  .av-opt.on:hover { border-color: var(--accent); }
  .btn.yellow:not(:disabled):hover, .act-open:hover { background: var(--grad-yellow-hover); }
  .place:hover, .result:hover, .notice:hover { background-color: rgba(255, 255, 255, .04); }
  .tile:hover, .card.act.open:hover { border-color: var(--stroke-strong); }
  .pill-btn:hover, .glass-btn:hover, .bell-pill:hover, .auth-guest:hover { border-color: var(--stroke-strong); }
}

/* =================== Business accounts =================== */
.biz-box { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.biz-box small { color: var(--label2); font-size: 14px; line-height: 1.4; }
.biz-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: .04em;
  background: rgba(255, 214, 10, .16); color: var(--kiri-yellow); border: 1px solid rgba(255, 214, 10, .45); width: max-content; max-width: 100%; }
.biz-badge.pending { background: rgba(255, 159, 10, .14); color: var(--orange-text); border-color: rgba(255, 159, 10, .4); }
.biz-badge.no { background: rgba(255, 69, 58, .12); color: var(--red-text); border-color: rgba(255, 69, 58, .4); }
.hello-badge { margin: -10px 0 16px; }

/* Verified business home: graphite, soft steel light, muted gold accent. Desktop-first. */
.home.biz, body.biz-mode { --accent: var(--gold); --accent-grad: var(--grad-gold); }
.home.biz { background: var(--biz-night); }
.home.biz .tile, .home.biz .places, .home.biz .card { background: rgba(20, 23, 29, .86); border-color: rgba(255, 255, 255, .08); }
.home.biz .places.rides { border-color: rgba(216, 182, 94, .4); background: linear-gradient(160deg, rgba(216, 182, 94, .10), rgba(216, 182, 94, .02)), rgba(20, 23, 29, .86); }
.home.biz .bell-pill.has { background: rgba(216, 182, 94, .14); border-color: rgba(216, 182, 94, .5); color: var(--gold); }
.home.biz .stepper li.on, body.biz-mode .stepper li.on { background: rgba(216, 182, 94, .16); box-shadow: inset 0 0 0 1px rgba(216, 182, 94, .45); }
.bh-head { margin: 26px 2px 22px; }
.bh-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.bh-name { font-size: clamp(26px, 7vw, 32px); letter-spacing: -.02em; font-weight: 800; margin: 8px 0 4px; line-height: 1.15; text-align: left; overflow-wrap: anywhere; }
.bh-greet { color: var(--label2); font-size: 16px; margin: 0; }
.bh-label { color: var(--label3); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bh { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bh-main, .bh-side { min-width: 0; }
.bh-site { padding: 18px 18px 20px; border-radius: var(--r-lg); }
.bh-site-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bh-link { position: relative; color: var(--gold); font-size: 15px; font-weight: 700; padding: 6px 12px; margin: -6px -8px -6px 0; border-radius: 10px;
  transition: background-color var(--dur-1) var(--ease-out); }
.bh-site-main { display: flex; align-items: flex-start; gap: 14px; }
.bh-site-ic { width: 46px; height: 46px; flex: none; border-radius: var(--r-sm); display: grid; place-items: center;
  background: rgba(216, 182, 94, .12); color: var(--gold); border: 1px solid rgba(216, 182, 94, .3); }
.bh-site-main .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bh-site-main b { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; overflow: visible; text-overflow: clip; }
.bh-site-main small { color: var(--label2); font-size: 14px; line-height: 1.45; }
.bh-site.unset { border-style: dashed; border-color: rgba(216, 182, 94, .45); }
.bh-site.unset b { color: var(--label2); }
.bh-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.bh-primary, .bh-secondary { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border-radius: var(--r-md); }
.bh-primary { padding: 18px 20px; background: #F3F1EC; color: #121418; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); --ripple: rgba(0, 0, 0, .1); }
.bh-secondary { padding: 16px 18px; background: rgba(20, 23, 29, .86); border: 1px solid rgba(255, 255, 255, .12); color: #fff; }
.bh-primary .grow, .bh-secondary .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bh-primary b { font-size: 19px; }
.bh-primary small { color: #4A4F59; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-secondary b { font-size: 17px; }
.bh-secondary small { color: var(--label3); font-size: 14px; }
.bh-secondary svg, .bh-primary svg { flex: none; }
.bh-secondary svg { color: var(--gold); }
.home.biz .home-h2 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--label3); }
.home.biz .places .place { cursor: pointer; }
.home.biz .places .place:focus-visible, .bh-primary:focus-visible, .bh-secondary:focus-visible, .bh-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bh-side #myRidesWrap .home-h2.first { margin-top: 0; }
.bh-empty { display: flex; flex-direction: column; gap: 8px; border-radius: var(--r-lg); }
.bh-empty p { margin: 0; color: var(--label2); font-size: 14px; line-height: 1.5; }
@media (hover: hover) and (pointer: fine) {
  .bh-link:hover { background: rgba(216, 182, 94, .1); }
  .bh-primary:hover { background: #FFFFFF; }
  .bh-secondary:hover { border-color: rgba(216, 182, 94, .5); background-color: rgba(28, 32, 40, .92); }
  .home.biz .places .place:hover { background: rgba(255, 255, 255, .04); }
}

/* =================== 4. AMBIENT LIGHT ("lagoon caustics") =================== */
/* Two soft colour fields drift behind home, sign-in and the loading screen (transform only;
   no blend modes). A third, very faint caustic layer shimmers on the loading and sign-in screens. */
.home::before, .home::after, .auth::before, .auth::after, .splash::before, .splash::after {
  content: ""; position: absolute; inset: -20%; z-index: -2; pointer-events: none; will-change: transform; contain: strict;
  transition: opacity 900ms var(--ease-out); }
.home::before, .home::after { z-index: -1; }
.home::before, .auth::before {
  background:
    radial-gradient(closest-side at 28% 32%, rgba(92, 70, 255, .40), transparent 70%),
    radial-gradient(closest-side at 72% 62%, rgba(0, 168, 160, .26), transparent 70%),
    radial-gradient(closest-side at 50% 90%, rgba(30, 60, 140, .32), transparent 70%);
  animation: kiriDriftA var(--dur-ambient-a) var(--ease-in-out) infinite alternate; }
.home::after, .auth::after {
  background:
    radial-gradient(closest-side at 75% 20%, rgba(200, 40, 140, .22), transparent 70%),
    radial-gradient(closest-side at 22% 78%, rgba(255, 214, 10, .10), transparent 70%),
    radial-gradient(closest-side at 55% 45%, rgba(10, 132, 255, .16), transparent 70%);
  animation: kiriDriftB var(--dur-ambient-b) var(--ease-in-out) infinite alternate; }
/* Kiri Services' own splash glow: teal and aqua lagoon light; it fades out as the app appears */
.splash::before {
  background:
    radial-gradient(closest-side at 28% 30%, rgba(0, 150, 170, .42), transparent 70%),
    radial-gradient(closest-side at 75% 72%, rgba(20, 110, 255, .32), transparent 70%);
  animation: kiriDriftA var(--dur-ambient-a) var(--ease-in-out) infinite alternate; }
.splash::after {
  background:
    radial-gradient(closest-side at 80% 18%, rgba(60, 220, 200, .20), transparent 70%),
    radial-gradient(closest-side at 20% 85%, rgba(255, 214, 10, .10), transparent 70%);
  animation: kiriDriftB var(--dur-ambient-b) var(--ease-in-out) infinite alternate; }
.splash.gone::before, .splash.gone::after { opacity: 0; }
.home.biz::before {
  background:
    radial-gradient(closest-side at 20% 15%, rgba(120, 140, 170, .20), transparent 70%),
    radial-gradient(closest-side at 85% 80%, rgba(70, 90, 120, .18), transparent 70%);
  animation-duration: 60s; }
.home.biz::after { background: radial-gradient(closest-side at 70% 10%, rgba(216, 182, 94, .10), transparent 70%); animation-duration: 80s; }
.caustic { position: absolute; top: -240px; left: -240px; right: 0; bottom: 0; z-index: -1; pointer-events: none; opacity: .6; will-change: transform;
  background: repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .035) 0 2px, transparent 3px 46px); background-size: 240px 240px;
  animation: kCaustic 24s linear infinite; }
/* Light streaks */
.streaks { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.streaks i { position: absolute; left: 0; width: 55vmax; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--c, rgba(255, 214, 10, .9)) 55%, rgba(255, 255, 255, .95) 70%, transparent);
  box-shadow: 0 0 18px 2px var(--g, rgba(255, 214, 10, .35));
  transform: translate3d(-60vmax, 0, 0) rotate(-18deg); animation: kStreak var(--d, 7s) linear var(--delay, 0s) infinite; will-change: transform, opacity; }
.streaks i:nth-child(1) { top: 12%; --d: 7.5s; --delay: 0s; }
.streaks i:nth-child(2) { top: 30%; --d: 9s; --delay: 2.2s; --c: rgba(124, 104, 255, .95); --g: rgba(124, 104, 255, .45); }
.streaks i:nth-child(3) { top: 48%; --d: 6.5s; --delay: 4.1s; --c: rgba(48, 216, 200, .9); --g: rgba(48, 216, 200, .4); height: 1.5px; }
.streaks i:nth-child(4) { top: 64%; --d: 8.5s; --delay: 1.2s; --c: rgba(230, 70, 170, .9); --g: rgba(230, 70, 170, .4); }
.streaks i:nth-child(5) { top: 80%; --d: 10s; --delay: 5.5s; height: 3px; }
.streaks i:nth-child(6) { top: 22%; --d: 11s; --delay: 6.8s; --c: rgba(10, 132, 255, .9); --g: rgba(10, 132, 255, .4); height: 1.5px; }
.streaks i:nth-child(7) { top: 92%; --d: 8s; --delay: 3.3s; --c: rgba(124, 104, 255, .9); --g: rgba(124, 104, 255, .4); }
.splash .streaks i:nth-child(1) { --c: rgba(120, 240, 230, .95); --g: rgba(120, 240, 230, .45); --delay: -1s; }
.splash .streaks i:nth-child(2) { --c: rgba(70, 170, 255, .95); --g: rgba(70, 170, 255, .45); --delay: -3s; }
.splash .streaks i:nth-child(3) { --c: rgba(255, 255, 255, .9); --g: rgba(255, 255, 255, .35); --delay: -.5s; }
.splash .streaks i:nth-child(4) { --c: rgba(48, 216, 200, .9); --g: rgba(48, 216, 200, .4); --delay: -4s; }
.splash .streaks i:nth-child(5) { --c: rgba(255, 214, 10, .9); --g: rgba(255, 214, 10, .35); --delay: -2s; }
.splash .streaks i:nth-child(6) { --c: rgba(120, 200, 255, .9); --g: rgba(120, 200, 255, .4); --delay: -6s; }
.splash .streaks i:nth-child(7) { --c: rgba(48, 216, 200, .9); --g: rgba(48, 216, 200, .4); --delay: -2.6s; }
/* Pause every ambient loop when the tab/app is in the background (JS toggles html.paused) */
html.paused :is(.home, .auth, .splash)::before, html.paused :is(.home, .auth, .splash)::after,
html.paused .caustic, html.paused .streaks i, html.paused .sp-word, html.paused .sp-track::after { animation-play-state: paused; }

/* =================== 5. "WATER" MOTION =================== */
/* ---- Keyframes (one canonical set) ---- */
@keyframes kSurface { from { opacity: 0; translate: 0 var(--rise); scale: .985; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes kSurfaceSm { from { opacity: 0; translate: 0 var(--rise-sm); } to { opacity: 1; translate: 0 0; } }
@keyframes kSink { to { opacity: 0; translate: 0 -6px; scale: .98; } }
@keyframes kFadeIn { from { opacity: 0; } }
@keyframes kFadeOut { to { opacity: 0; } }
@keyframes kSheetIn { from { opacity: 0; translate: var(--sheet-from); scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes kCardPop { from { opacity: 0; translate: 0 var(--rise); scale: var(--scale-in); } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes kPop { 0% { scale: .97; } 45% { scale: 1.03; } 100% { scale: 1; } }
@keyframes kBump { 0% { scale: 1; } 40% { scale: 1.18; } 100% { scale: 1; } }
@keyframes kSettle { 0% { scale: 1; } 45% { scale: 1.04; } 100% { scale: 1; } }
@keyframes kRipple { 0% { scale: 0; opacity: 1; } 100% { scale: 1; opacity: 0; } }
@keyframes kRing { from { scale: .6; opacity: .5; } to { scale: 2.2; opacity: 0; } }
@keyframes kGlow { from { box-shadow: 0 0 0 0 rgba(255, 214, 10, .35); } to { box-shadow: 0 0 0 10px rgba(255, 214, 10, 0); } }
@keyframes kPulse { from { scale: .6; opacity: .7; } to { scale: 2.4; opacity: 0; } }
@keyframes kTouch { from { scale: .4; opacity: .5; } to { scale: 2; opacity: 0; } }
@keyframes kTaxiRing { from { scale: 1; opacity: .8; } to { scale: calc(1.4 * var(--amp, 1)); opacity: 0; } }
@keyframes kMarkerIn { from { opacity: 0; translate: 0 -14px; scale: .6; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes kMarkerOut { to { opacity: 0; translate: 0 -8px; scale: .6; } }
@keyframes kLetterIn { from { translate: 0 115%; } to { translate: 0 0; } }
@keyframes kLetterOut { from { translate: 0 0; } to { translate: 0 -115%; } }
@keyframes kLetter { from { opacity: 0; translate: 0 .35em; } to { opacity: 1; translate: 0 0; } }
@keyframes kLabelUp { from { opacity: 0; translate: 0 40%; } to { opacity: 1; translate: 0 0; } }
@keyframes kBreathe { from { scale: 1; } to { scale: 1.025; } }
@keyframes kBarFill { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes kShimmer { 0% { translate: -100% 0; } 60%, 100% { translate: 100% 0; } }
@keyframes kToastLife { from { scale: 1 1; } to { scale: 0 1; } }
@keyframes kToastLife2 { from { scale: 1 1; } to { scale: 0 1; } }
@keyframes kShake { 0% { translate: 0 0; } 15% { translate: -8px 0; } 35% { translate: 6px 0; } 55% { translate: -4px 0; } 75% { translate: 2px 0; } 100% { translate: 0 0; } }
@keyframes kBellRing {
  0% { rotate: 0deg; animation-timing-function: var(--ease-in-out); } 10% { rotate: 14deg; animation-timing-function: var(--ease-in-out); }
  20% { rotate: -12deg; animation-timing-function: var(--ease-in-out); } 30% { rotate: 8deg; animation-timing-function: var(--ease-in-out); }
  40% { rotate: -5deg; animation-timing-function: var(--ease-in-out); } 50% { rotate: 2deg; animation-timing-function: var(--ease-in-out); }
  60%, 100% { rotate: 0deg; } }
@keyframes kInk0 { 45% { scale: var(--ink-sq); } }
@keyframes kInk1 { 45% { scale: var(--ink-sq); } }
@keyframes kInk2 { 45% { scale: var(--ink-sq); } }
@keyframes kInk3 { 45% { scale: var(--ink-sq); } }
@keyframes kSeg0 { 45% { scale: 1.08 .9; } }
@keyframes kSeg1 { 45% { scale: 1.08 .9; } }
@keyframes kiriDriftA {
  0% { transform: translate3d(-6%, -4%, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(5%, 6%, 0) rotate(25deg) scale(1.12); }
  100% { transform: translate3d(-3%, 8%, 0) rotate(-15deg) scale(1.05); } }
@keyframes kiriDriftB {
  0% { transform: translate3d(6%, 4%, 0) rotate(0deg) scale(1.05); }
  50% { transform: translate3d(-7%, -5%, 0) rotate(-30deg) scale(1); }
  100% { transform: translate3d(4%, -8%, 0) rotate(20deg) scale(1.15); } }
@keyframes kCaustic { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(240px, 120px, 0); } }
@keyframes kStreak {
  0% { transform: translate3d(-60vmax, 18vmax, 0) rotate(-18deg); opacity: 0; }
  12% { opacity: .85; } 70% { opacity: .6; }
  100% { transform: translate3d(140vw, -26vmax, 0) rotate(-18deg); opacity: 0; } }

/* ---- Recipes (reusable classes) ---- */
/* Surface: entrance. Cascade with style="--i:N". */
.fx-in { animation: kSurface var(--dur-3) var(--spring-soft) backwards; animation-delay: min(calc(var(--i, 0) * var(--stagger)), var(--stagger-cap)); }
.fx-in-sm { animation: kSurfaceSm var(--dur-2) var(--spring-soft) backwards; animation-delay: min(calc(var(--i, 0) * var(--stagger)), var(--stagger-cap)); }
/* Sink: exit. JS adds .fx-out, waits for animationend, then removes/hides. */
.fx-out { animation: kSink var(--dur-1) var(--ease-in) forwards !important; pointer-events: none !important; }
/* Keyed lists: a brand-new row also glows once; a removed row sinks (then JS collapses + removes it). */
.row-new { animation: kSurfaceSm var(--dur-3) var(--spring-soft) backwards, kGlow 900ms var(--ease-out); }
.row-out { animation: kSink var(--dur-1) var(--ease-in) forwards; pointer-events: none; }
.marker-out { animation: kMarkerOut var(--dur-1) var(--ease-in) forwards !important; pointer-events: none; }
.shake { animation: kShake 420ms var(--ease-out); }
/* Title letters (JS wraps each letter in <span style="--i:N">) */
.split-in > span { display: inline-block; white-space: pre; animation: kLetter var(--dur-3) var(--spring-soft) backwards; animation-delay: calc(var(--i, 0) * var(--stagger-word)); }
/* Status pill: label slides up when it changes (JS restarts class "changed"); colours glide */
.status { transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.status span { transition: color var(--dur-2) var(--ease-out); }
.status i { transition: background-color var(--dur-2) var(--ease-out); }
.status.changed span { animation: kLabelUp var(--dur-2) var(--ease-out); }
/* Final fare: count-up settles with a bounce, one yellow ring expands behind it */
.fare.settle { animation: kSettle var(--dur-3) var(--spring-bouncy); }
.fare.celebrate::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 1.6em; aspect-ratio: 1; border-radius: 50%;
  translate: -50% -50%; background: radial-gradient(circle, rgba(255, 214, 10, .35), transparent 70%); pointer-events: none;
  animation: kRing var(--dur-hero) var(--ease-out) both; }

/* Rolling digits (kiriMotion.roll): <span class="roll"><span class="d"><span class="col"><span>0</span>…<span>9</span></span></span><span class="ch">.</span>…</span>
   JS sets --n (0-9) on each .col; the column glides with a wet (masked) edge. */
.roll { display: inline-flex; align-items: flex-start; font-variant-numeric: tabular-nums; line-height: 1; --roll-h: 1.1em; }
.roll .d { position: relative; display: inline-block; height: var(--roll-h); overflow: clip; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.roll .col { display: flex; flex-direction: column; translate: 0 calc(-1 * var(--roll-h) * var(--n, 0)); transition: translate var(--dur-3) var(--spring-soft); }
.roll .col > span { display: block; height: var(--roll-h); line-height: var(--roll-h); text-align: center; }
.roll .ch { display: inline-block; height: var(--roll-h); line-height: var(--roll-h); animation: kFadeIn var(--dur-1) var(--ease-out); }

/* Liquid press + ripple.
   Everything tappable below presses with a spring; JS (one delegated pointerdown) appends
   <span class="ripple" style="--x:…px;--y:…px;--d:…px"> to the nearest LIQUID element and removes it on animationend. */
:where(.liquid, .btn, .tile, .place, .fare-card, .pill-btn, .tabbtn, .seg button, .circle, .where-btn, .when-chip, .act-open, .result, .notice,
  .bh-primary, .bh-secondary, .auth-google, .auth-guest, .auth-business, .google-btn, .off-call, .bell-pill, .home-avatar, .acct-avatar,
  .row[role=button], .av-opt, .loc-btn, .auth-back, .act.open) {
  position: relative; isolation: isolate; overflow: hidden;
  --press-dur: 420ms; --press-ease: var(--spring-press);
  transition: scale var(--press-dur) var(--press-ease), background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
:where(.liquid, .btn, .tile, .place, .fare-card, .pill-btn, .tabbtn, .seg button, .circle, .where-btn, .when-chip, .act-open, .result, .notice,
  .bh-primary, .bh-secondary, .auth-google, .auth-guest, .auth-business, .google-btn, .off-call, .bell-pill, .home-avatar, .acct-avatar,
  .row[role=button], .av-opt, .loc-btn, .auth-back, .act.open):active:not(:disabled) {
  --press-dur: var(--dur-0); --press-ease: var(--ease-out); scale: var(--press-scale); }
/* Cards and rows press a little less */
:where(.tile, .place, .fare-card, .result, .notice, .row[role=button], .bh-primary, .bh-secondary, .card.liquid, .act.open) { --press-scale: var(--press-scale-card); }
/* Small text controls with invisible hit areas: press only (a ripple would be clipped) */
:where(.icon-btn, .note-link, .step-back, .est-cancel, .change, .del, .bh-link) {
  --press-dur: 420ms; --press-ease: var(--spring-press);
  transition: scale var(--press-dur) var(--press-ease), color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
:where(.icon-btn, .note-link, .step-back, .est-cancel, .change, .del, .bh-link):active { --press-dur: var(--dur-0); --press-ease: var(--ease-out); scale: .94; }
.ripple { position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: var(--d, 200%); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  z-index: -1; pointer-events: none; scale: 0; opacity: 0;
  background: radial-gradient(circle, var(--ripple, rgba(255, 255, 255, .22)) 0 40%, transparent 70%);
  animation: kRipple 550ms var(--ease-out) forwards; }
.btn.pop { animation: kPop 420ms var(--spring-press); }

/* Droplet indicators: tab bar ink and Now/Schedule thumb (pure CSS via :has; JS only toggles .on) */
@supports selector(:has(a)) {
  .tabbar .ink { display: block; position: absolute; z-index: 0; left: var(--ink-pad); top: var(--ink-pad); pointer-events: none;
    width: calc((100% - 2 * var(--ink-pad) - (var(--tabs) - 1) * var(--ink-gap)) / var(--tabs)); height: calc(100% - 2 * var(--ink-pad));
    border-radius: 28px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    translate: calc(var(--idx, 0) * (100% + var(--ink-gap))) 0;
    transition: translate var(--dur-3) var(--spring-soft); animation: kInk0 var(--dur-3) var(--ease-out); }
  .tabbar:has(> .tabbtn:nth-child(2).on) { --idx: 1; }
  .tabbar:has(> .tabbtn:nth-child(3).on) { --idx: 2; }
  .tabbar:has(> .tabbtn:nth-child(2).on) .ink { animation-name: kInk1; }
  .tabbar:has(> .tabbtn:nth-child(3).on) .ink { animation-name: kInk2; }
  .tabbar:has(> .tabbtn:nth-child(4).on) { --idx: 3; }
  .tabbar:has(> .tabbtn:nth-child(4).on) .ink { animation-name: kInk3; }
  .tabbar:has(.ink) .tabbtn.on { background: none; }
  .seg::before { content: ""; position: absolute; z-index: 0; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: var(--r-md);
    background: var(--accent-grad); box-shadow: 0 4px 14px rgba(255, 214, 10, .18); pointer-events: none;
    translate: calc(var(--idx, 0) * 100%) 0; transition: translate var(--dur-3) var(--spring-soft); animation: kSeg0 var(--dur-3) var(--ease-out); }
  .seg:not(:has(> button.on))::before { opacity: 0; }
  .seg:has(> button:nth-child(2).on) { --idx: 1; }
  .seg:has(> button:nth-child(2).on)::before { animation-name: kSeg1; }
  .seg button.on { background: none; }
}

/* Cascades: lists and the home surface in, 40 ms apart, capped at 240 ms */
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > * { animation: kSurfaceSm var(--dur-2) var(--spring-soft) backwards;
  animation-delay: min(calc(var(--i, 0) * var(--stagger)), var(--stagger-cap)); }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(2) { --i: 1; }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(3) { --i: 2; }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(4) { --i: 3; }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(5) { --i: 4; }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(6) { --i: 5; }
:is(.places, .activity, .ps-list, .notice-list, .results, #myRides) > :nth-child(n+7) { --i: 6; }
.ps-list > .places { animation: none; }
.ps-list .places > * { animation-duration: 150ms; }
.home-head, .hello, .bh-head, .home-notice, .where, .tiles .tile, .fare-card, .bh-site, .bh-actions, .home-side-h {
  animation: kSurface var(--dur-3) var(--spring-soft) backwards; animation-delay: min(calc(var(--i, 0) * var(--stagger)), var(--stagger-cap)); }
.hello, .bh-head { --i: 1; } .home-notice { --i: 2; } .where, .bh-site { --i: 2; } .bh-actions { --i: 3; }
.tiles .tile:nth-child(1) { --i: 3; } .tiles .tile:nth-child(2) { --i: 4; } .tiles .tile:nth-child(3) { --i: 5; } .fare-card { --i: 6; }
.tabbar { animation: kSurface var(--dur-3) var(--spring-soft) 120ms backwards; }
.auth-actions { animation: kSurface var(--dur-3) var(--spring-soft) 160ms backwards; }
/* Top bar buttons cascade in on the map (JS adds .enter to #top with the panel's .enter) */
.top { animation: kFadeIn var(--dur-2) var(--ease-out) backwards; }
.top.enter .top-row > *, .top.enter > .search { animation: kSurfaceSm var(--dur-3) var(--spring-soft) backwards; }
.top.enter #locate { animation-delay: var(--stagger); }
.top.enter > .search { animation-delay: calc(2 * var(--stagger)); }
/* Map markers drop in softly */
.marker-pickup, .marker-taxi, .marker-drop { animation: kMarkerIn var(--dur-3) var(--spring-bouncy) backwards; }
/* Panel: tide in when the map opens; children re-surface between steps */
.sheet { transition: translate var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out); }
.sheet.enter { animation: kSheetIn var(--dur-3) var(--spring-soft) backwards; }
.sheet.swap > :not(.status):not(.sheet-actions) { animation: kSurfaceSm var(--dur-2) var(--spring-soft) backwards; }
/* While search results are open, the panel slides away (JS toggles .away instead of visibility) */
.sheet.away { translate: 0 calc(100% + 24px + var(--sab)); pointer-events: none; transition: translate var(--dur-2) var(--ease-in), opacity var(--dur-2) var(--ease-in); }
.offline:not([hidden]) .off-card { animation: kCardPop var(--dur-3) var(--spring-soft) 60ms backwards; }

/* ---- Show / hide with an exit: .fx (out of flow or small) and .fx-inline (rows inside the panel) ----
   JS just toggles [hidden]; transitions outrank display:none !important, so the hide animates.
   Older browsers fall back to the instant toggle. */
.fx { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft),
  scale var(--press-dur, var(--dur-3)) var(--press-ease, var(--spring-soft)),
  background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.fx[hidden] { opacity: 0; translate: 0 -6px; scale: .98; pointer-events: none;
  transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.fx-inline { overflow: clip; overflow-clip-margin: 6px; transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft),
  scale var(--press-dur, var(--dur-3)) var(--press-ease, var(--spring-soft)),
  background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.fx-inline[hidden] { opacity: 0; translate: 0 -4px; pointer-events: none; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }

/* Components with their own tide/droplet show-hide */
.home { transition: opacity var(--dur-3) var(--ease-out), scale var(--dur-3) var(--spring-soft), border-radius var(--dur-3) var(--ease-out); }
.home[hidden] { opacity: 0; pointer-events: none; transition-duration: var(--dur-2); }
.home-scroll, .home .tabbar { transition: opacity var(--dur-3) var(--ease-out); }
/* Full-screen sheet open: the home recedes behind it (scale + radius + dim; transform/opacity only) */
body:has(> .place-sheet:not([hidden])) > .home:not([hidden]) { scale: .94; border-radius: var(--r-xl); }
body:has(> .place-sheet:not([hidden])) > .home:not([hidden]) :is(.home-scroll, .tabbar) { opacity: .45; }
.tab { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft); }
.tab[hidden] { opacity: 0; translate: calc(-1 * var(--slide-x)) 0; pointer-events: none; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.home[data-dir=back] .tab[hidden] { translate: var(--slide-x) 0; }
.place-sheet { transition: translate var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out); }
.place-sheet[hidden] { translate: 0 var(--sheet-off); pointer-events: none; transition: translate var(--dur-2) var(--ease-in), opacity var(--dur-2) var(--ease-in); }
.place-sheet.dragging { transition: none !important; }
.modal { transition: opacity var(--dur-2) var(--ease-out); }
.modal[hidden] { opacity: 0; pointer-events: none; }
.modal-card { transition: translate var(--dur-3) var(--spring-soft), scale var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out); }
.modal[hidden] .modal-card { translate: 0 var(--sheet-off); transition: translate var(--dur-2) var(--ease-in), opacity var(--dur-2) var(--ease-in); }
.confirm-modal[hidden] .modal-card { translate: none; scale: var(--scale-in); opacity: 0; transition: scale var(--dur-1) var(--ease-in), opacity var(--dur-1) var(--ease-in); }
.toast { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-bouncy), scale var(--dur-3) var(--spring-bouncy); }
.toast[hidden] { opacity: 0; translate: 0 -12px; scale: .96; pointer-events: none; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.bell-count { transition: scale var(--dur-2) var(--spring-bouncy), opacity var(--dur-2) var(--ease-out); }
.bell-count[hidden] { scale: .4; opacity: 0; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.results { transition: opacity var(--dur-2) var(--ease-out), scale var(--dur-2) var(--spring-soft); }
.results[hidden] { opacity: 0; scale: 1 .96; pointer-events: none; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.pin { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-bouncy); }
.pin[hidden] { opacity: 0; translate: 0 -40px; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.pin.pin-xy[hidden] { transition: transform var(--dur-3) var(--spring-soft), opacity var(--dur-1) var(--ease-in), translate var(--dur-1) var(--ease-in); }
.auth { transition: opacity 450ms var(--ease-out); }
.auth[hidden] { opacity: 0; pointer-events: none; }
.auth-page { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft); }
.auth-page[hidden] { opacity: 0; translate: calc(-1 * var(--slide-x)) 0; pointer-events: none; transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
.auth[data-dir=back] .auth-page[hidden] { translate: var(--slide-x) 0; }
.offline { transition: opacity var(--dur-3) var(--ease-out); }
.offline[hidden] { opacity: 0; pointer-events: none; transition-duration: var(--dur-2); }

/* Where allow-discrete works (Chrome 117+, Safari 17.4+), keep the element displayed until its exit ends. */
@supports (transition-behavior: allow-discrete) {
  .fx { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft),
    scale var(--press-dur, var(--dur-3)) var(--press-ease, var(--spring-soft)),
    background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out),
    display var(--dur-3) allow-discrete, overlay var(--dur-3) allow-discrete; }
  .fx[hidden] { transition-duration: var(--dur-1); transition-timing-function: var(--ease-in); }
  .fx-inline { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft),
    scale var(--press-dur, var(--dur-3)) var(--press-ease, var(--spring-soft)),
    background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out),
    height var(--dur-3) var(--spring-soft), margin-top var(--dur-3) var(--spring-soft), margin-bottom var(--dur-3) var(--spring-soft),
    padding-top var(--dur-3) var(--spring-soft), padding-bottom var(--dur-3) var(--spring-soft), display var(--dur-3) allow-discrete; }
  .fx-inline[hidden] { transition-duration: var(--dur-1), var(--dur-1), var(--dur-1), var(--dur-1), var(--dur-1), var(--dur-1), var(--dur-1),
    var(--dur-2), var(--dur-2), var(--dur-2), var(--dur-2), var(--dur-2), var(--dur-2); transition-timing-function: var(--ease-in); }
  .home { transition: opacity var(--dur-3) var(--ease-out), scale var(--dur-3) var(--spring-soft), border-radius var(--dur-3) var(--ease-out), display var(--dur-3) allow-discrete; }
  .home[hidden] { transition-duration: var(--dur-2); }
  .tab { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft), display var(--dur-3) allow-discrete; }
  .tab[hidden] { transition-duration: var(--dur-1); }
  .place-sheet { transition: translate var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out), display var(--dur-3) allow-discrete; }
  .place-sheet[hidden] { transition: translate var(--dur-2) var(--ease-in), opacity var(--dur-2) var(--ease-in), display var(--dur-2) allow-discrete; }
  .modal { transition: opacity var(--dur-2) var(--ease-out), display var(--dur-3) allow-discrete, overlay var(--dur-3) allow-discrete; }
  .modal[hidden] { transition-duration: var(--dur-2); }
  .toast { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-bouncy), scale var(--dur-3) var(--spring-bouncy),
    display var(--dur-3) allow-discrete; }
  .toast[hidden] { transition-duration: var(--dur-1); }
  .bell-count { transition: scale var(--dur-2) var(--spring-bouncy), opacity var(--dur-2) var(--ease-out), display var(--dur-2) allow-discrete; }
  .bell-count[hidden] { transition-duration: var(--dur-1); }
  .results { transition: opacity var(--dur-2) var(--ease-out), scale var(--dur-2) var(--spring-soft), display var(--dur-2) allow-discrete; }
  .results[hidden] { transition-duration: var(--dur-1); }
  .pin { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-bouncy), display var(--dur-3) allow-discrete; }
  .pin.pin-xy { transition: transform var(--dur-3) var(--spring-soft), opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-bouncy), display var(--dur-3) allow-discrete; }
  .pin[hidden], .pin.pin-xy[hidden] { transition-duration: var(--dur-3), var(--dur-1), var(--dur-1), var(--dur-1); }
  .pin:not(.pin-xy)[hidden] { transition-duration: var(--dur-1); }
  .auth { transition: opacity 450ms var(--ease-out), display 450ms allow-discrete; }
  .auth-page { transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-3) var(--spring-soft), display var(--dur-3) allow-discrete; }
  .auth-page[hidden] { transition-duration: var(--dur-1); }
  .offline { transition: opacity var(--dur-3) var(--ease-out), display var(--dur-3) allow-discrete; }
  .offline[hidden] { transition-duration: var(--dur-2); }
}
@supports (interpolate-size: allow-keywords) {
  .fx-inline[hidden] { height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}
/* Smooth start-up (owner: animations stuttered while loading). html.covered = the splash or welcome
   screen is over the app. Underneath, nobody can see the panel, so its rows appear instantly instead
   of animating their height/margins (size animations re-lay-out the page every frame and stole time
   from the visible animations); the hidden home glow pauses and the map isn't composited. Every
   animation you can see is unchanged. */
html.covered #panel .fx-inline, html.covered #panel .fx-inline *,
html.covered .mapboxgl-ctrl-bottom-left, html.covered .mapboxgl-ctrl-bottom-right { transition: none !important; }
html.covered .home::before, html.covered .home::after { animation-play-state: paused; }
html.covered #map canvas { visibility: hidden; }

/* First frame of every appearance (the "from" of each enter transition) */
@starting-style {
  .fx:not([hidden]) { opacity: 0; translate: 0 10px; scale: .98; }
  .fx-inline:not([hidden]) { opacity: 0; translate: 0 6px; }
  .home:not([hidden]) { opacity: 0; }
  .tab:not([hidden]) { opacity: 0; translate: var(--slide-x) 0; }
  .home[data-dir=back] .tab:not([hidden]) { translate: calc(-1 * var(--slide-x)) 0; }
  .place-sheet:not([hidden]) { translate: 0 var(--sheet-off); }
  .modal:not([hidden]) { opacity: 0; }
  .modal:not([hidden]) .modal-card { translate: 0 var(--sheet-off); }
  .confirm-modal:not([hidden]) .modal-card { translate: none; opacity: 0; scale: var(--scale-in); }
  .toast:not([hidden]) { opacity: 0; translate: 0 -16px; scale: .6 .9; }
  .bell-count:not([hidden]) { opacity: 0; scale: .4; }
  .results:not([hidden]) { opacity: 0; scale: 1 .96; }
  .pin:not([hidden]) { opacity: 0; translate: 0 -40px; }
  .auth:not([hidden]) { opacity: 0; }
  .auth-page:not([hidden]) { opacity: 0; translate: var(--slide-x) 0; }
  .auth[data-dir=back] .auth-page:not([hidden]) { translate: calc(-1 * var(--slide-x)) 0; }
  .offline:not([hidden]) { opacity: 0; }
}
@supports (interpolate-size: allow-keywords) {
  @starting-style {
    .fx-inline:not([hidden]) { height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
  }
}

/* =================== 7. EVERY SCREEN SIZE =================== */
/* Short phones (most Android browsers are 650–740 px tall): tighter panel, hints on one line */
@media (max-height: 620px) {
  .sheet { padding: 14px; }
  .status { margin-bottom: 10px; }
  .row { padding: 9px 12px; margin-bottom: 8px; }
  .seg { margin-bottom: 8px; }
  #pickupHint, #dropHint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn { height: 52px; margin-top: 10px; }
  .foot { margin-top: 8px; font-size: 12px; }
}
@media (max-height: 680px) { .auth-word { zoom: .78; } .auth-track { margin: 10px 0 22px; } .auth-hero h1 { font-size: 28px; } }
/* Very short (phones sideways): everything compact, hints hidden */
@media (max-height: 500px) {
  .hint { display: none; }
  .sheet { padding: 12px; border-radius: 26px; }
  .status { margin-bottom: 8px; padding: 5px 12px; }
  h1 { font-size: 22px; }
  .message { font-size: 14px; margin: 4px 0 8px; }
  .fare { font-size: 46px; margin-bottom: 6px; }
  .car img { width: 96px; }
  .btn { height: 48px; font-size: 17px; margin-top: 8px; }
  .top { top: calc(var(--sat) + 8px); }
  .circle { width: 48px; height: 48px; }
  .search { height: 46px; margin-top: 8px; }
  .home-scroll { padding-top: calc(var(--sat) + 12px); padding-bottom: calc(var(--sab) + 86px); }
  .hello { font-size: 26px; margin: 12px 0 12px; }
  .home-h2 { margin: 16px 2px 8px; }
  .tile { min-height: 92px; padding: 12px; }
  .fare-card { margin-top: 12px; padding: 12px 14px 12px 18px; }
  .tabbar { bottom: calc(var(--sab) + 8px); padding: 4px; --ink-pad: 4px; }
  .tabbtn { padding: 5px 0 4px; font-size: 12px; }
  .tabbtn svg { width: 22px; height: 22px; }
  .toast { top: calc(var(--sat) + 70px); }
  .off-icon { width: 56px; height: 56px; margin-bottom: 10px; }
  .off-card h2 { font-size: 22px; }
  .off-call { min-height: 52px; margin-bottom: 12px; }
  .stepper { margin-bottom: 8px; }
  .stepper li { padding: 5px 4px; font-size: 12px; }
}

/* Phones (owner: "fonts are too big, make it smaller so things can fit") – one step smaller so tile
   labels, the fare card and list rows stay on one or two lines in portrait. */
@media (max-width: 480px) {
  .hello { font-size: 25px; margin: 14px 0 14px; letter-spacing: -.01em; }
  .action-pill { min-height: 138px; padding: 18px 16px; }
  .action-pill svg { width: 34px; height: 34px; }
  .ap-text { margin-top: 12px; }
  .ap-text b { font-size: 19px; }
  .ap-text small { font-size: 12.5px; }
  .tiles { gap: 8px; }
  .tile { min-height: 96px; padding: 12px 11px; }
  .tile svg { width: 24px; height: 24px; }
  .tile b { font-size: 15px; margin-top: 8px; }
  .tile small { font-size: 12px; }
  .tile.qp-tile { min-height: 76px; padding: 11px 12px; }
  .tile.qp-tile svg { width: 20px; height: 20px; }
  .tile.qp-tile b { font-size: 14px; margin-top: 5px; }
  .tile.qp-tile small { font-size: 11.5px; }
  .fare-card { margin-top: 14px; padding: 15px 14px 15px 16px; }
  .fare-text small { font-size: 11px; }
  .fare-text b { font-size: 20px; }
  .fare-text span { font-size: 12.5px; }
  .fare-go { width: 44px; height: 44px; }
  .fare-go svg { width: 22px; height: 22px; }
  .place { gap: 12px; padding: 12px 14px; min-height: 58px; }
  .place-ic { width: 38px; height: 38px; }
  .place .grow b { font-size: 15px; }
  .place .grow small { font-size: 12.5px; }
  .tab-title { font-size: 26px; margin: 6px 0 12px; }
  .home-h2 { font-size: 16px; }
  .tabbtn { font-size: 12px; }
  .tabbtn svg { width: 22px; height: 22px; }
  .act .grow b, .act b { font-size: 15px; }
  .act small { font-size: 12.5px; }
}

/* Small phones (iPhone SE, 360 px Androids) */
@media (max-width: 380px) {
  .tile { padding: 11px 9px; }
  .tile b { font-size: 14px; }
  .fare-text b { font-size: 18px; }
  .small-pill .sp-txt { display: none; }
  .small-pill { padding: 8px 12px; }
}
@media (max-width: 360px) {
  .where-btn { font-size: 17px; padding: 0 12px; gap: 8px; }
  .when-chip { padding: 0 12px; }
  .when-chip span { max-width: 9ch; }
  .home-scroll { padding-left: calc(var(--sal) + 14px); padding-right: calc(var(--sar) + 14px); }
  .sheet { left: calc(var(--sal) + 8px); right: calc(var(--sar) + 8px); padding: 14px; }
  .btn { font-size: 17px; }
  .bell-pill { padding: 0 10px; }
  .phone .cc, .phone .cc.big { width: 80px; }
}
/* Fold covers / 280–340 px */
@media (max-width: 340px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > :nth-child(3) { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
  .tiles > :nth-child(3) svg { margin-bottom: 0; }
  .tiles > :nth-child(3) b { margin-top: 0; }
  .tile { min-height: 104px; }
  .stepper li { font-size: 0; gap: 0; }
  .stepper li.on { font-size: 12px; gap: 6px; }
  .fare-card { padding: 14px 12px 14px 16px; }
  .fare-text b { font-size: 21px; }
  .fare-go { width: 44px; height: 44px; }
  .when-chip svg { display: none; }
  .where-btn svg { width: 22px; height: 22px; }
  .ps-top h2 { font-size: 20px; }
  .car { flex-wrap: wrap; justify-content: center; }
  .car-info { align-items: center; text-align: center; }
  .auth-page { padding-left: calc(var(--sal) + 16px); padding-right: calc(var(--sar) + 16px); }
  .auth-hero { flex: 1 0 auto; padding-bottom: 12px; }
  .auth-word { zoom: .72; }
  .auth-track { margin: 8px 0 14px; }
  .auth-hero h1 { font-size: 26px; margin-bottom: 6px; }
  .auth-hero p { font-size: 15px; line-height: 1.38; }
  .auth-actions { padding-top: 12px; }
  .auth-or { margin: 12px 0; }
  .auth-business { margin-top: 12px; }
}

/* Tablets (portrait) and up: centred sheet + top bar; modals become centred cards */
@media (min-width: 600px) {
  .sheet { left: 0; right: 0; margin-inline: auto; width: calc(100% - 20px); max-width: 520px; }
  .top { left: 0; right: 0; margin-inline: auto; width: calc(100% - 28px); max-width: 560px; }
}
@media (min-width: 600px), (orientation: landscape) and (max-height: 620px) {
  .modal { align-items: center; padding: calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px); }
  .modal-card { border-radius: var(--r-xl); border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 22px 22px 20px; max-height: calc(100dvh - var(--sat) - var(--sab) - 32px); }
  .modal .grab { display: none; }
  .modal[hidden] .modal-card { translate: none; scale: var(--scale-in); opacity: 0;
    transition: scale var(--dur-1) var(--ease-in), opacity var(--dur-1) var(--ease-in); }
  @starting-style {
    .modal:not([hidden]) .modal-card { translate: none; opacity: 0; scale: var(--scale-in); }
  }
}

/* Wide screens (laptops, desktops, tablets sideways) and phones sideways: the ride panel becomes a
   column on the left, the map beside it. Must match SIDE_MQ in app.js exactly. */
@media (min-width: 900px), (orientation: landscape) and (max-height: 620px) {
  .sheet { left: calc(var(--sal) + 12px); right: auto; width: var(--side-w); max-width: none; margin: 0;
    top: auto; bottom: calc(var(--sab) + 12px); max-height: calc(100% - var(--sat) - var(--sab) - 24px); --sheet-from: -32px 0; }
  .sheet.away { translate: calc(-100% - 24px - var(--sal)) 0; }
  .top { left: calc(var(--sal) + 24px + var(--side-w)); right: calc(var(--sar) + 12px); width: auto; max-width: 560px; margin: 0; }
  .toast { left: var(--map-left, 0px); max-width: min(520px, calc(100% - var(--map-left, 0px) - 40px)); }
  body:has(> .home:not([hidden])) > .toast { left: 0; max-width: min(520px, calc(100% - 40px)); }
  .tab { max-width: 640px; }
  /* When the panel has to scroll, its buttons stay in view at the bottom */
  .sheet-actions { position: sticky; bottom: -18px; z-index: 2; margin: 0 -18px -18px; padding: 4px 18px 18px;
    background: linear-gradient(180deg, rgba(30, 33, 42, 0), rgba(30, 33, 42, .98) 22%); }
  .sheet-actions .btn.glass-btn { background: #30333C; }
}
@media (max-height: 620px) {
  .sheet-actions { position: sticky; bottom: -14px; z-index: 2; margin: 0 -14px -14px; padding: 4px 14px 14px;
    background: linear-gradient(180deg, rgba(30, 33, 42, 0), rgba(30, 33, 42, .98) 22%); }
  .sheet-actions .btn.glass-btn { background: #30333C; }
}
@media (max-height: 500px) { .sheet-actions { bottom: -12px; margin: 0 -12px -12px; padding: 4px 12px 12px; } }
@media (min-width: 1200px) { :root { --side-w: 420px; } }

/* Phones sideways (touch, or narrow): the tab bar becomes a rail on the left; sign-in goes two-column.
   Laptops with short windows (1280x600) are not phones, so they keep the normal layout. */
@media (orientation: landscape) and (max-height: 620px) and (pointer: coarse), (orientation: landscape) and (max-height: 620px) and (max-width: 950px) {
  .tabbar { left: calc(var(--sal) + 10px); right: auto; margin: 0; top: 50%; bottom: auto; translate: 0 -50%; width: 84px;
    grid-template-columns: 1fr; gap: 4px; padding: 6px; border-radius: 30px; --ink-pad: 6px; --ink-gap: 4px; --ink-sq: .86 1.14; }
  .tabbar .ink { width: calc(100% - 2 * var(--ink-pad)); height: calc((100% - 2 * var(--ink-pad) - (var(--tabs) - 1) * var(--ink-gap)) / var(--tabs));
    translate: 0 calc(var(--idx, 0) * (100% + var(--ink-gap))); border-radius: 24px; }
  .tabbtn { padding: 10px 0 8px; border-radius: 24px; }
  .tabbar { animation: kFadeIn var(--dur-3) var(--ease-out) 120ms backwards; }
  .home-scroll { padding-left: calc(var(--sal) + 112px); padding-bottom: calc(var(--sab) + 20px); }
  #stepChoose:not([hidden]) { position: relative; flex-direction: row; align-items: center; gap: 36px; max-width: 900px; padding-top: calc(var(--sat) + 64px); }
  #stepChoose .auth-lang { position: absolute; top: calc(var(--sat) + 12px); right: calc(var(--sar) + 16px); width: auto; margin: 0; }
  #stepChoose .auth-hero { flex: 1; }
  #stepChoose .auth-actions { flex: 1; padding-top: 0; }
  .auth-word { zoom: .7; }
  .auth-track { margin: 8px 0 16px; }
  .auth-hero h1, .auth-body h1 { font-size: 26px; }
  .auth-hero p { font-size: 15px; }
  .auth-body { padding-top: 8px; }
  .auth-sub { margin-bottom: 14px; }
  .field { margin-bottom: 14px; }
  .toast { top: calc(var(--sat) + 16px); }
}
/* Laptops with short windows: side panel, bottom tab bar, a tighter home */
@media (min-width: 900px) and (max-height: 700px) and (pointer: fine) {
  .home-scroll { padding-top: calc(var(--sat) + 16px); padding-bottom: calc(var(--sab) + 96px); }
  .hello { margin: 16px 0 14px; }
  .home-h2 { margin: 18px 2px 10px; }
  .tile { min-height: 100px; }
  .fare-card { margin-top: 14px; }
  .auth-word { zoom: .8; }
}
/* Big screens: sign-in in a comfortable column */
@media (min-width: 900px) and (min-height: 621px) {
  .auth-page { max-width: 560px; }
}

/* Passenger home on laptops/desktops: two columns (greeting, rides, where-to, suggestions | places) */
@media (min-width: 1100px) {
  .home:not(.biz) #tabHome { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .home:not(.biz) #tabHome > .home-head { grid-column: 1 / -1; }
  .home:not(.biz) #tabHome > .home-lead { grid-column: 1; min-width: 0; }
  .home:not(.biz) #tabHome > .home-side { grid-column: 2; grid-row: 2; min-width: 0; padding-top: 26px; }
  .home:not(.biz) .home-side:has(> .places:empty) { display: none; }
  .home:not(.biz) .home-side-h { display: block; margin-top: 4px; }
  .home:not(.biz) .home-side .places { margin-top: 0; }
  .home:not(.biz) #tabHome .hello { font-size: 40px; }
}

/* Business home on desktop and wide tablets: two columns, side rail navigation */
@media (min-width: 900px) {
  .home.biz .tab { max-width: 1120px; }
  .home.biz .bh { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
  .home.biz .bh-side { position: sticky; top: 0; }
  .home.biz .bh-name { font-size: 38px; }
  .home.biz .bh-head { margin-top: 30px; }
  .home.biz .bh-site-main b { font-size: 22px; }
  .home.biz .tabbar { left: calc(var(--sal) + 16px); right: auto; margin: 0; top: 50%; bottom: auto; translate: 0 -50%; width: 84px;
    grid-template-columns: 1fr; gap: 4px; padding: 6px; border-radius: 30px; animation: none; --ink-pad: 6px; --ink-gap: 4px; --ink-sq: .86 1.14; }
  .home.biz .tabbar .ink { width: calc(100% - 2 * var(--ink-pad)); height: calc((100% - 2 * var(--ink-pad) - (var(--tabs) - 1) * var(--ink-gap)) / var(--tabs));
    translate: 0 calc(var(--idx, 0) * (100% + var(--ink-gap))); border-radius: 24px; }
  .home.biz .tabbtn { padding: 10px 0 8px; border-radius: 24px; }
  .home.biz .home-scroll { padding-left: calc(var(--sal) + 124px); padding-right: calc(var(--sar) + 32px); padding-bottom: 40px; }
  .home.biz #myRidesWrap .home-h2.first { margin-top: 0; }
}
@media (min-width: 900px) and (max-width: 1099px) { .home.biz .bh { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; } }
/* Ultrawide: cap the content, let the light breathe */
@media (min-width: 1600px) {
  .home:not(.biz) #tabHome, .home.biz .tab { max-width: 1200px; }
  :root { --side-w: 440px; }
}

/* =================== 8. LOW-END PHONES + REDUCED MOTION =================== */
/* html.lite is set by app.js on slow devices: no backdrop blur, no blur in entrances, quieter ambient. */
html.lite { --blur-in: 0px; --blur-in-lg: 0px; }
html.lite .modal { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(4, 5, 8, .72); }
html.lite :is(.home, .auth, .splash)::before, html.lite :is(.home, .auth, .splash)::after { opacity: .5; }
html.lite .caustic { display: none; }
html.lite .streaks i:nth-child(n+4) { display: none; }
html.lite.scrolling .home::before, html.lite.scrolling .home::after { animation-play-state: paused; }
html.lite body:has(> .place-sheet:not([hidden])) > .home:not([hidden]) { scale: 1; border-radius: 0; }
html.lite .sp-track::after, html.lite .skel::after { animation: none; }

/* =================== Calm motion (owner: "keep the animations to a minimal, it is stuttery when
   navigating") – on for the website and the installed web app (html.calm in index.html).
   Screens, tabs, sheets and panel rows just fade quickly; nothing slides, bounces, blurs, staggers or
   grows/shrinks in height (size animations re-lay-out the page every frame). The ambient glow stays
   still and backdrop blur is off. Kept: the one-time kiri logo on the splash and sign-in screens,
   the tab-bar ink, button press feedback and map movement. */
html.calm {
  --dur-1: 1ms; --dur-2: 140ms; --dur-3: 170ms; --dur-4: 200ms; --dur-hero: 220ms;
  --spring-soft: var(--ease-out); --spring-bouncy: var(--ease-out);
  --rise: 0px; --rise-sm: 0px; --rise-lg: 0px; --slide-x: 0px; --blur-in: 0px; --blur-in-lg: 0px;
  --stagger: 0ms; --stagger-cap: 0ms; --stagger-word: 0ms; --sheet-off: 0px; --scale-in: 1;
}
html.calm :is(.home, .auth, .splash)::before, html.calm :is(.home, .auth, .splash)::after { animation: none !important; }
html.calm .caustic, html.calm .streaks { display: none; }
html.calm .fx-inline { transition: opacity var(--dur-2) var(--ease-out), display var(--dur-2) allow-discrete !important; }
html.calm .fx-inline[hidden] { translate: none; }
@starting-style { html.calm .fx-inline:not([hidden]) { translate: none; } }
html.calm .modal, html.calm .stay-banner { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.calm .modal { background: rgba(4, 5, 8, .72); }
html.calm body:has(> .place-sheet:not([hidden])) > .home:not([hidden]) { scale: 1; border-radius: 0; }
html.calm .ripple { display: none; }
html.calm .skel::after { animation: none; }
html.calm .sheet.away { translate: none; opacity: 0; }

/* Reduced motion: 150 ms opacity-only fades. State changes stay legible, nothing travels. */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 1ms; --dur-2: 150ms; --dur-3: 150ms; --dur-4: 150ms; --dur-hero: 150ms;
    --spring-soft: linear; --spring-bouncy: linear; --spring-press: linear;
    --rise: 0px; --rise-sm: 0px; --rise-lg: 0px; --slide-x: 0px; --blur-in: 0px; --blur-in-lg: 0px; --stagger: 0ms;
    --sheet-off: 0px; --scale-in: 1; }
  :is(.home, .auth, .splash)::before, :is(.home, .auth, .splash)::after, .streaks i, .caustic { animation-play-state: paused !important; }
  .caustic, .streaks { display: none; }
  *, *::before, *::after { animation-iteration-count: 1 !important; transition-delay: 0s !important; }
  .sp-l, .splash.gone .sp-l, .sp-word, .sp-bar, .sp-track::after, .skel::after, .marker-taxi.coming::before, .pin .pin-ring { animation: none !important; }
  .sp-bar { scale: 1 1; }
  .splash.gone { scale: 1; }
  .ripple { display: none; }
  .sheet.away { translate: none; opacity: 0; }
  .pin[hidden] { translate: none; }
  @starting-style {
    .pin:not([hidden]), .toast:not([hidden]) { translate: none; scale: 1; }
    .confirm-modal:not([hidden]) .modal-card { filter: none; }
  }
  body:has(> .place-sheet:not([hidden])) > .home:not([hidden]) { scale: 1; border-radius: 0; }
  .place-sheet[hidden] { opacity: 0; }
  @starting-style { .place-sheet:not([hidden]) { opacity: 0; } }
}


/* =================== Readable spacing (owner: text looked squished) ===================
   Plus Jakarta Sans at 800 with negative tracking packs letters too tightly; body text used the
   browser's default leading. Neutral tracking on headings, a little air on body text, roomier lines. */
body { line-height: 1.42; letter-spacing: .005em; }
h1, h2, .hello, .tab-title, .auth-hero h1, .auth-body h1, .off-card h2, .bh-name, .rc-brand, #welcomeForm.biz h1 { letter-spacing: 0; line-height: 1.2; }
.fare-text b { letter-spacing: 0; line-height: 1.22; }
.fare { letter-spacing: -.01em; }
.home-h2 { letter-spacing: 0; }
.tile b { line-height: 1.25; }
.tile small, .place small, .act small, .field-help, .auth-note, .loc-text, .taken { line-height: 1.45; }
.message, .modal-card p, .auth-sub, .auth-hero p, .ios-card-sub, .google-box small, .biz-box small { line-height: 1.5; }
.fare-text small, .fare-text span { line-height: 1.45; }
.tabbtn { letter-spacing: .01em; }

/* Language picker */
.lang-card { display: flex; align-items: center; gap: 12px; }
.lang-card .grow { display: flex; flex-direction: column; min-width: 0; }
.lang-card b { font-size: 16.5px; }
.lang-card small { color: var(--label3); font-size: 13px; margin-top: 2px; }
.lang-pick { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--stroke); flex-shrink: 0; }
.lang-pick button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent;
  color: var(--label2); font: 700 13px/1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out); }
.lang-pick button.on { background: var(--kiri-yellow); color: var(--on-yellow); }
.auth-lang { display: flex; justify-content: flex-end; width: 100%; margin-bottom: 6px; }

/* =================== 9. FLIGHT TRACKER + COOK ISLANDS DISCOVER =================== */
.home.biz .home-discover { display: none !important; }
.home-discover { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.discover-block {
  border-radius: 28px;
  background: var(--surface-glass);
  border: 1px solid var(--line);
  padding: 20px;
  min-width: 0;
  overflow-x: clip;
}
.disc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.disc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.disc-actions .small-pill { min-height: 40px; height: 40px; padding: 0 14px; font-size: 13.5px; }
.disc-title { margin: 0; font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; min-width: 0; }
.disc-refresh {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .06); color: var(--label2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: transform 160ms cubic-bezier(.22, 1.2, .36, 1), background-color 180ms ease, color 180ms ease;
}
.disc-refresh:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.disc-refresh:active { transform: scale(.93); }
.disc-refresh.spin svg { animation: kSpin .7s linear infinite; }
@keyframes kSpin { to { transform: rotate(360deg); } }

@keyframes kDiscIn {
  from { opacity: 0; transform: translateY(12px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.flt-tabs {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  padding: 5px; border-radius: 16px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); margin-bottom: 16px;
}
.flt-ink {
  position: absolute; inset: 5px auto 5px 5px;
  width: calc((100% - 10px - 12px) / 3);
  border-radius: 12px; background: var(--yellow); z-index: 0; pointer-events: none;
  transition: transform 280ms cubic-bezier(.22, 1.15, .36, 1);
  transform: translateX(calc(var(--flt-idx, 0) * (100% + 6px)));
}
.flt-tab {
  position: relative; z-index: 1; overflow: hidden;
  min-height: 44px; border: 0; border-radius: 12px; background: transparent;
  color: var(--label2); font: 700 14px/1 var(--font); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 8px; min-width: 0; white-space: nowrap;
  transition: color 200ms ease, transform 160ms ease;
}
.flt-tab:active { transform: scale(.96); }
.flt-tab.on { background: transparent; color: var(--on-yellow); }
.flt-cnt {
  font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: inherit; flex-shrink: 0;
}
.flt-tab.on .flt-cnt { background: rgba(17, 17, 17, .14); }

.flt-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.flt-row {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  border-radius: 20px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  min-width: 0;
  animation: kDiscIn 320ms cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease, border-color 180ms ease;
}
.flt-row:hover { transform: translateY(-2px); border-color: rgba(255, 214, 10, .28); background: rgba(255, 255, 255, .07); }
.flt-row:active { transform: scale(.985); }
.flt-card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.flt-iata {
  flex-shrink: 0; width: 52px; padding: 11px 0; border-radius: 14px; text-align: center;
  background: rgba(255, 214, 10, .12); border: 1px solid rgba(255, 214, 10, .28);
  color: var(--yellow); font: 800 15px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.flt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flt-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.flt-time { font-size: 18px; font-weight: 800; color: var(--yellow); font-variant-numeric: tabular-nums; line-height: 1.15; }
.flt-route { font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flt-status {
  flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: var(--label2); white-space: nowrap;
}
.flt-status.estimated, .flt-status.landed { background: rgba(91, 224, 127, .15); color: #5BE07F; }
.flt-status.delayed { background: rgba(255, 214, 10, .18); color: var(--yellow); }
.flt-status.cancelled { background: rgba(255, 105, 97, .18); color: #FF6961; }
.flt-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px solid var(--line); min-width: 0;
}
.flt-airline-wrap {
  display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0;
}
.flt-logo {
  width: 28px; height: 28px; padding: 3px; border-radius: 8px;
  background: #FFFFFF; object-fit: contain; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.flt-sub {
  font-size: 13px; color: var(--label2); line-height: 1.35; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.flt-taxi {
  flex-shrink: 0; min-height: 36px; border: 1px solid rgba(255, 214, 10, .35); background: rgba(255, 214, 10, .14);
  color: var(--yellow); border-radius: 999px; padding: 8px 15px;
  font: 700 13.5px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform 160ms cubic-bezier(.22, 1.2, .36, 1), background-color 180ms ease, color 180ms ease;
}
.flt-taxi:hover { background: var(--yellow); color: var(--on-yellow); }
.flt-taxi:active { transform: scale(.93); }

.news-block { padding: 20px 0 18px; }
.news-block .disc-head { padding: 0 20px; }
.news-shelf {
  display: flex; align-items: stretch; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px; padding: 6px 20px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.news-shelf::-webkit-scrollbar { display: none; }
.news-card {
  flex: 0 0 calc(100% - 22px); max-width: 320px; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  padding: 18px; min-height: 360px; border-radius: 24px;
  background: rgba(255, 255, 255, .055); border: 1px solid var(--line);
  text-decoration: none; color: inherit; min-width: 0;
  animation: kDiscIn 320ms cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease, border-color 180ms ease;
}
.news-card:hover { background: rgba(255, 255, 255, .09); transform: translateY(-3px); border-color: rgba(255, 214, 10, .28); }
.news-card:active { transform: scale(.975); }
.news-top { min-width: 0; }
.news-cat {
  display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--yellow);
}
.news-headline {
  margin: 8px 0 0; font-size: 18.5px; font-weight: 800; color: var(--text); line-height: 1.28;
  min-height: calc(1.28em * 3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-media { width: 100%; height: 185px; border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.news-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 280ms ease, transform 380ms cubic-bezier(.22, 1, .36, 1);
}
.news-thumb.loaded, .news-all-thumb.loaded { opacity: 1; }
.news-card:hover .news-thumb { transform: scale(1.045); }
html.lite .news-media, html.lite .news-all-thumb { display: none; }
html.lite .news-card { min-height: 204px; }
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.news-src { font-size: 13px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.news-read {
  flex-shrink: 0; background: var(--yellow); color: var(--on-yellow); border-radius: 999px;
  padding: 7px 16px; font: 800 13px/1 var(--font); white-space: nowrap;
  transition: transform 160ms cubic-bezier(.22, 1.2, .36, 1), background-color 180ms ease;
}
.news-read:active { transform: scale(.93); }
.news-dots { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 10px 20px 2px; flex-wrap: wrap; }
.news-dot {
  width: 7px; height: 7px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255, 255, 255, .26); cursor: pointer;
  transition: width 260ms cubic-bezier(.22, 1.2, .36, 1), background-color 200ms ease, transform 160ms ease;
}
.news-dot:active { transform: scale(.85); }
.news-dot.on { width: 22px; background: var(--yellow); }
.news-nav { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 20px 0; }
.news-arrow {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .09); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 160ms cubic-bezier(.22, 1.2, .36, 1), background-color 180ms ease;
}
.news-arrow:hover { background: rgba(255, 255, 255, .18); }
.news-arrow:active { transform: scale(.93); }
.news-all-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 6px; }
.news-all-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 20px; background: rgba(255, 255, 255, .055); border: 1px solid var(--line);
  text-decoration: none; color: inherit; min-width: 0;
  animation: kDiscIn 320ms cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease, border-color 180ms ease;
}
.news-all-item:hover { background: rgba(255, 255, 255, .09); transform: translateY(-2px); border-color: rgba(255, 214, 10, .28); }
.news-all-item:active { transform: scale(.985); }
.news-all-thumb {
  width: 112px; height: 84px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: rgba(255, 255, 255, .06);
  opacity: 0; transition: opacity 280ms ease, transform 380ms cubic-bezier(.22, 1, .36, 1);
}
.news-all-item:hover .news-all-thumb { transform: scale(1.045); }

/* Island Weather (Rarotonga & Aitutaki + 7-day forecast) */
.wx-tabs {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  padding: 5px; border-radius: 16px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); margin-bottom: 14px;
}
.wx-ink {
  position: absolute; inset: 5px auto 5px 5px;
  width: calc((100% - 10px - 6px) / 2);
  border-radius: 12px; background: var(--yellow); z-index: 0; pointer-events: none;
  transition: transform 280ms cubic-bezier(.22, 1.15, .36, 1);
  transform: translateX(calc(var(--wx-idx, 0) * (100% + 6px)));
}
.wx-tab {
  position: relative; z-index: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent;
  color: var(--label2); font: 700 14px/1 var(--font); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  transition: color 200ms ease, transform 160ms ease;
}
.wx-tab:active { transform: scale(.96); }
.wx-tab.on { color: var(--on-yellow); }

.wx-now {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  padding: 16px; border-radius: 22px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  margin-bottom: 14px; animation: kDiscIn 320ms cubic-bezier(.22, 1, .36, 1) backwards;
}
.wx-now-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.wx-ic-wrap {
  width: 78px; height: 78px; border-radius: 22px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
}
.wx-temp { font-size: 38px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.wx-cond { font-size: 16px; font-weight: 700; color: var(--label2); margin-top: 5px; }
.wx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wx-stat {
  display: flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 8px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--label2);
  white-space: nowrap; text-align: center; min-width: 0;
}

.wx-week {
  display: flex; align-items: stretch; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wx-week::-webkit-scrollbar { display: none; }
.wx-day {
  flex: 0 0 128px; height: 214px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 3px;
  padding: 13px 10px 12px; border-radius: 20px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  text-align: center;
  animation: kDiscIn 320ms cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 38ms);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), border-color 180ms ease;
}
.wx-day:hover { transform: translateY(-2px); border-color: rgba(255, 214, 10, .28); }
.wx-day-name { font-size: 13.5px; font-weight: 800; color: var(--text); line-height: 1.2; }
.wx-day-ic { display: grid; place-items: center; width: 54px; height: 54px; flex: none; }
.wx-day-cond {
  font-size: 11.5px; font-weight: 600; color: var(--label2); line-height: 1.2; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wx-day-temps { font-size: 14.5px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.wx-day-min { color: var(--label3); font-weight: 600; }
.wx-day-meta {
  width: 100%; margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.wx-day-rain { font-size: 11.5px; font-weight: 700; color: #5BE07F; line-height: 1.25; }
.wx-day-rain.dry { color: var(--label3); font-weight: 600; }
.wx-day-extra {
  font-size: 11px; font-weight: 600; color: var(--label2); line-height: 1.25;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.wx-dots { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 12px 4px 2px; flex-wrap: wrap; }
.wx-dot {
  width: 7px; height: 7px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255, 255, 255, .26); cursor: pointer;
  transition: width 260ms cubic-bezier(.22, 1.2, .36, 1), background-color 200ms ease, transform 160ms ease;
}
.wx-dot:active { transform: scale(.85); }
.wx-dot.on { width: 22px; background: var(--yellow); }

html.lite .flt-row, html.lite .news-card, html.lite .news-all-item, html.lite .wx-now, html.lite .wx-day { animation: none; }
html.lite .flt-row:hover, html.lite .news-card:hover, html.lite .news-all-item:hover, html.lite .wx-day:hover { transform: none; }
html.lite .news-card:hover .news-thumb, html.lite .news-all-item:hover .news-all-thumb { transform: none; }
html.lite .news-thumb, html.lite .news-all-thumb { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .flt-row, .news-card, .news-all-item, .wx-now, .wx-day { animation: none !important; }
  .flt-ink, .wx-ink, .news-dot, .news-thumb, .news-all-thumb, .flt-row, .news-card, .news-all-item, .wx-day { transition: none !important; }
  .news-thumb, .news-all-thumb { opacity: 1 !important; }
}
.news-all-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.news-all-title {
  margin: 0; font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.disc-more { margin-top: 14px; }
.disc-empty { margin: 4px 0; font-size: 14px; color: var(--label3); }

@media (max-width: 480px) {
  .discover-block { padding: 16px; border-radius: 24px; }
  .disc-title { font-size: 20px; }
  .flt-tabs { gap: 4px; padding: 4px; }
  .flt-ink {
    inset: 4px auto 4px 4px;
    width: calc((100% - 8px - 8px) / 3);
    transform: translateX(calc(var(--flt-idx, 0) * (100% + 4px)));
  }
  .flt-tab { min-height: 40px; padding: 0 3px; gap: 4px; font-size: 12px; }
  .flt-cnt { font-size: 10.5px; padding: 2px 5px; }
  .wx-tabs { gap: 4px; padding: 4px; }
  .wx-ink {
    inset: 4px auto 4px 4px;
    width: calc((100% - 8px - 4px) / 2);
    transform: translateX(calc(var(--wx-idx, 0) * (100% + 4px)));
  }
  .wx-tab { min-height: 40px; font-size: 13.5px; }
  .news-block { padding: 16px 0; }
  .news-block .disc-head { padding: 0 16px; }
  .news-shelf { scroll-padding-inline: 16px; padding: 6px 16px 10px; gap: 12px; }
  .news-card { flex: 0 0 calc(100% - 20px); max-width: none; }
  .news-dots { padding: 10px 16px 2px; }
  .news-nav { padding: 6px 16px 0; }
  .news-all-list { padding: 4px 16px 6px; }
}
@media (max-width: 360px) {
  .flt-tab { font-size: 11px; gap: 3px; }
  .flt-cnt { font-size: 10px; padding: 1px 4px; }
  .ap-text b { font-size: 17.5px; }
}
@media (min-width: 640px) {
  .wx-now { flex-direction: row; align-items: center; justify-content: space-between; padding: 18px 20px; }
  .wx-stats { min-width: 280px; }
}
@media (min-width: 900px) {
  .flt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .wx-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; overflow: visible; }
  .wx-day { flex: none; height: 218px; }
  .wx-dots { display: none; }
}
@media (min-width: 960px) {
  .home:not(.biz) #tabHome > .home-discover {
    grid-column: 1 / -1; grid-row: 3;
    display: flex; flex-direction: column; gap: 26px;
    margin-top: 26px;
  }
  .discover-block { padding: 24px; }
  .news-block { padding: 24px 0 20px; }
  .news-block .disc-head { padding: 0 24px; }
  .news-shelf { scroll-padding-inline: 24px; padding: 6px 24px 12px; gap: 16px; }
  .news-nav { padding: 8px 24px 0; }
  .news-all-list { padding: 4px 24px 6px; }
  .news-all-thumb { width: 152px; height: 104px; }
  .disc-title { font-size: 24px; }
  .news-card { flex: 0 0 328px; max-width: none; min-height: 386px; }
  .news-media { height: 200px; }
}
