/* MA-Trip animations */
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
/* Direction-aware screen transitions (RTL: forward = enter from left, back = enter from right).
   ⚠️ NO `filter: blur(...)` and NO `scale(...)` here — both kept the screen
   promoted to a GPU compositor layer for the lifetime of the mount (because
   `animation: ... both` freezes the `to` state forever, including filter:
   blur(0) which still triggers an offscreen pass on iOS). Result: every screen
   stacked another full-screen GPU layer and navigation stuttered visibly.
   Pure transform+opacity composites in WebKit without a layer hint. */
@keyframes screen-in-fwd {
  from { opacity: 0; transform: translate3d(-4%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes screen-in-back {
  from { opacity: 0; transform: translate3d(4%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.ma-screen-anim { animation: screen-in-fwd .26s cubic-bezier(.2,.85,.2,1) both; }
.ma-screen-anim[data-dir="back"] { animation-name: screen-in-back; }

/* iOS removes the legacy 300ms tap-delay on any element that explicitly opts
   into `touch-action: manipulation`. Applied to every clickable surface so
   taps feel instant instead of feeling "stuck" for a third of a second. */
[data-nav],
button,
[role="button"],
input[type="button"],
input[type="submit"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@keyframes fab-pop {
  0%   { transform: scale(.6) rotate(-12deg); opacity: 0; }
  55%  { transform: scale(1.1) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.ma-fab {
  animation: fab-pop .42s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
}
.ma-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,.55), transparent 55%);
  mix-blend-mode: screen; opacity: .9;
}
.ma-fab::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 180deg at 50% 50%, rgba(255,255,255,0) 0deg, rgba(255,255,255,.35) 80deg, rgba(255,255,255,0) 160deg);
  opacity: 0; transition: opacity .4s ease; animation: fab-orbit 6s linear infinite;
}
.ma-fab:hover::before { opacity: 1; }
@keyframes fab-orbit { to { transform: rotate(360deg); } }
.ma-fab:active { transform: scale(.92); transition: transform .08s ease; }

/* MA-Trip — design tokens blending three influences */
:root {
  /* Warm marketplace palette (Airbnb-inspired, original tones) */
  --coral: #FF4E64;
  --coral-press: #E5354B;
  --coral-soft: #FFE4E7;

  /* Action color (Apple-inspired pill blue, original tone) */
  --action: #0A66D6;
  --action-press: #0852B5;
  --action-on-dark: #4FA3FF;

  /* Ink + surface */
  --ink: #1a1a1c;
  --body: #3f3f44;
  /* Bumped from #6a6a72 / #969aa3 to clear WCAG 1.4.3 at small font sizes (11-12px). */
  --muted: #5a5a62;
  --muted-soft: #767680;
  --hairline: #e5e5ea;
  --hairline-soft: #f0f0f3;

  --canvas: #ffffff;
  --parchment: #f7f5f2;
  --surface-soft: #f4f4f6;

  /* Dark cinematic (Runway-inspired, original) */
  --void: #050507;
  --shadow: #0d0d10;
  --pane: #18181c;
  --pane-2: #1f1f24;
  --slate: #7a818c;
  --slate-2: #9aa0a9;
  --line-dark: #26262c;

  /* Type */
  --font: "Heebo", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font); }
body { background: #ececef; }

/* ─────────── photo placeholders — mood gradients, no drawn SVG ─────────── */
.ph { position: relative; overflow: hidden; isolation: isolate; }
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 50% 100%, rgba(0,0,0,.35), transparent 70%);
  pointer-events: none;
}
.ph .ph-label {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--mono);
  font-size: 9px; letter-spacing: .04em;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  z-index: 2;
}
.ph-lisbon {
  background:
    linear-gradient(180deg, #ff8a5b 0%, #c9446a 45%, #3a2546 100%),
    radial-gradient(60% 40% at 30% 70%, #ffba7a, transparent 70%);
}
.ph-azulejo {
  background:
    linear-gradient(180deg, #6fa0c8 0%, #2d4d70 100%),
    radial-gradient(40% 30% at 70% 30%, #b9d3e6, transparent 70%);
}
.ph-cafe {
  background:
    linear-gradient(180deg, #2a1810 0%, #5a3318 60%, #b87844 100%),
    radial-gradient(35% 25% at 75% 40%, #ffd699, transparent 70%);
}
.ph-cliff {
  background:
    linear-gradient(180deg, #1f3a5e 0%, #2e6586 45%, #d4b683 100%),
    radial-gradient(60% 40% at 50% 20%, #87b9d4, transparent 70%);
}
.ph-night {
  background:
    linear-gradient(180deg, #050b1a 0%, #14254a 100%),
    radial-gradient(20% 20% at 25% 55%, #ffb45c, transparent 70%),
    radial-gradient(15% 15% at 75% 70%, #f9d56e, transparent 70%);
}
.ph-vine {
  background:
    linear-gradient(180deg, #4a6b3a 0%, #8aa657 50%, #d9c87a 100%),
    radial-gradient(40% 30% at 50% 10%, #c3da9c, transparent 70%);
}
.ph-pasteis {
  background:
    linear-gradient(180deg, #e9c46a 0%, #c97b3a 60%, #5a2a1a 100%),
    radial-gradient(50% 35% at 30% 35%, #fff1bd, transparent 70%);
}
.ph-beach {
  background:
    linear-gradient(180deg, #fef3d8 0%, #7ed4d1 45%, #2a8c8f 100%),
    radial-gradient(50% 30% at 50% 90%, #fff5dc 0%, transparent 70%);
}

/* ─────────── Thailand-inspired gradient placeholders ─────────── */
/* Phuket / Krabi turquoise + palm shadow */
.ph-thai-beach {
  background:
    linear-gradient(180deg, #fde9b8 0%, #4ec5c2 35%, #1a6e8f 100%),
    radial-gradient(60% 30% at 20% 85%, rgba(0,0,0,.18), transparent 60%),
    radial-gradient(40% 25% at 80% 75%, rgba(0,0,0,.12), transparent 60%);
}
/* Bangkok / Chiang Mai temple gold + ruby */
.ph-thai-temple {
  background:
    linear-gradient(180deg, #ffd57a 0%, #e0973a 45%, #9e2a3b 100%),
    radial-gradient(40% 30% at 50% 80%, #4a1424, transparent 70%);
}
/* Khao Sok / Chiang Rai jungle green */
.ph-thai-jungle {
  background:
    linear-gradient(180deg, #d5e89a 0%, #4f9a55 55%, #1e3d27 100%),
    radial-gradient(40% 25% at 50% 25%, #f6f3c2, transparent 70%);
}
/* Phi Phi / Railay sunset pink-amber */
.ph-thai-sunset {
  background:
    linear-gradient(180deg, #fff1c1 0%, #ff8e75 35%, #c64b78 70%, #3e1a4a 100%),
    radial-gradient(35% 20% at 30% 35%, #fff7d1, transparent 70%);
}
/* Krabi night market neon */
.ph-thai-market {
  background:
    linear-gradient(180deg, #1a0f2a 0%, #4a1d63 50%, #c43f5e 100%),
    radial-gradient(20% 18% at 25% 60%, #ffcf73, transparent 70%),
    radial-gradient(18% 16% at 75% 70%, #74e0c5, transparent 70%);
}
/* Pad thai / street food warm tones */
.ph-thai-food {
  background:
    linear-gradient(180deg, #ffe2a8 0%, #f0913f 55%, #6e2716 100%),
    radial-gradient(45% 30% at 30% 35%, #fff3c8, transparent 70%);
}

/* Subtle Thai-inspired hero accent stripe (coral → amber → gold → teal) */
.thai-accent { position: relative; }
.thai-accent::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral) 0%, #f6a345 33%, #ffd166 66%, #2a8c8f 100%);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

/* ─────────── shared ─────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* RTL list bullets and number alignment */
[dir="rtl"] { unicode-bidi: isolate; }

/* Apple-style pill button reset */
button { font-family: inherit; cursor: pointer; }

/* For text that should always read left-to-right inside RTL (dates, prices) */
.ltr-inline { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ─────────── Liquid Glass ─────────── */
:root {
  --glass-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --glass-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lg-light {
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(251,246,236,0.80) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 0.5px solid rgba(0,0,0,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -0.5px 0 rgba(0,0,0,0.03),
    0 1px 2px rgba(0,0,0,0.04),
    0 8px 24px -8px rgba(0,0,0,0.10);
  transition: transform .22s var(--glass-ease), box-shadow .22s var(--glass-ease), border-color .22s ease, background .22s ease;
}
.lg-light:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 2px 4px rgba(0,0,0,.06), 0 14px 32px -8px rgba(0,0,0,.14); }
.lg-light:active { transform: translateY(0) scale(0.985); transition-duration: .08s; box-shadow: inset 0 1.5px 3px rgba(0,0,0,0.10), 0 0.5px 1px rgba(0,0,0,0.10); }

.lg-dark {
  background: linear-gradient(180deg, rgba(40,40,46,0.78) 0%, rgba(20,20,24,0.86) 100%);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border: 0.5px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -0.5px 0 rgba(0,0,0,0.30),
    0 1px 2px rgba(0,0,0,0.30),
    0 12px 28px -8px rgba(0,0,0,0.45);
  color: #fff;
  transition: transform .22s var(--glass-ease), box-shadow .22s var(--glass-ease);
}
.lg-dark:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 16px 36px -8px rgba(0,0,0,.55); }
.lg-dark:active { transform: translateY(0) scale(.985); transition-duration: .08s; }

.lg-coral {
  background: linear-gradient(180deg, #ff7a8b 0%, var(--coral) 100%);
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    inset 0 -0.5px 0 rgba(0,0,0,0.10),
    0 1px 2px rgba(0,0,0,0.10),
    0 8px 22px -4px rgba(255,78,100,0.50),
    0 14px 36px -10px rgba(255,78,100,0.38);
  transition: transform .22s var(--glass-ease), box-shadow .22s var(--glass-ease);
}
.lg-coral:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 12px 28px -4px rgba(255,78,100,.6), 0 18px 44px -10px rgba(255,78,100,.45); }
.lg-coral:active { transform: translateY(0) scale(0.985); transition-duration: .08s; box-shadow: inset 0 1.5px 3px rgba(0,0,0,0.18); }

.lg-action {
  background: linear-gradient(180deg, #2d83ee 0%, var(--action) 100%);
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    inset 0 -0.5px 0 rgba(0,0,0,0.10),
    0 1px 2px rgba(0,0,0,0.10),
    0 8px 22px -4px rgba(10,102,214,0.50),
    0 14px 36px -10px rgba(10,102,214,0.38);
  transition: transform .22s var(--glass-ease), box-shadow .22s var(--glass-ease);
}
.lg-action:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 12px 28px -4px rgba(10,102,214,.6), 0 18px 44px -10px rgba(10,102,214,.45); }
.lg-action:active { transform: translateY(0) scale(0.985); transition-duration: .08s; box-shadow: inset 0 1.5px 3px rgba(0,0,0,0.18); }

.lg-light.is-active {
  border-color: rgba(255,78,100,0.65);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,228,231,0.65) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 0 0 1px rgba(255,78,100,0.10),
    0 18px 40px -10px rgba(255,78,100,0.30);
}

.lg-tabbar {
  background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(251,246,236,0.74) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-top: 0.5px solid rgba(0,0,0,0.08);
  box-shadow: 0 -8px 24px -10px rgba(0,0,0,0.08);
}
.lg-tabbar-dark {
  background: linear-gradient(180deg, rgba(20,20,24,0.80) 0%, rgba(8,8,12,0.90) 100%);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  border-top: 0.5px solid rgba(255,255,255,0.10);
}

/* Round Liquid Glass — for CircleIcon back buttons, FAB+, etc */
.lg-circle {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(245,240,230,0.80) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 0.5px solid rgba(0,0,0,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -0.5px 0 rgba(0,0,0,0.04),
    0 1px 2px rgba(0,0,0,0.04),
    0 6px 18px -4px rgba(0,0,0,0.16);
  transition: transform .22s var(--glass-ease), box-shadow .22s var(--glass-ease);
}
.lg-circle:hover { transform: translateY(-1px) scale(1.02); }
.lg-circle:active { transform: translateY(0) scale(0.96); transition-duration: .08s; }
.lg-circle-dark {
  background: linear-gradient(180deg, rgba(60,60,68,0.65) 0%, rgba(20,20,24,0.80) 100%);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border: 0.5px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 4px 14px -2px rgba(0,0,0,0.4);
}

/* Filter chips */
.lg-chip {
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,244,236,0.78) 100%);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 0.5px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.95), 0 1px 2px rgba(0,0,0,0.04);
  transition: all .18s var(--glass-ease);
}
.lg-chip.is-active {
  background: linear-gradient(180deg, #ff7a8b 0%, var(--coral) 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    0 8px 18px -4px rgba(255,78,100,0.45);
}

/* ═══════════════════════════════════════════════════════════════════
   LIQUID GLASS v2 — Apple iOS 26 / visionOS tier
   Specular shine, refractive edges, aurora mesh, bento, magnetic FAB
   ═══════════════════════════════════════════════════════════════════ */

/* Specular shine sweep — animated highlight crossing glass surface */
.lg-coral, .lg-action, .lg-light, .lg-circle {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.lg-coral::before, .lg-action::before, .lg-light::before, .lg-circle::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,.45) 50%,
    rgba(255,255,255,0) 70%,
    transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
  transition: left .85s cubic-bezier(.2,.85,.2,1);
}
.lg-coral:hover::before, .lg-action:hover::before, .lg-light:hover::before, .lg-circle:hover::before {
  left: 160%;
}

/* Inner refraction halo — top-inside arc that catches "light" */
.lg-coral::after, .lg-action::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(140% 80% at 50% -20%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 55%);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
}

/* Aurora — animated multi-color mesh for hero backgrounds */
.aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.aurora::before, .aurora::after {
  content: "";
  position: absolute;
  width: 65vmax; height: 65vmax;
  border-radius: 50%;
  /* 50px is perceptually identical to 80px at .55 opacity but ~40% less
     compositing cost — Safari iOS applies the filter per layer without
     caching, so multiple aurora layers across InsightSlider cards were
     stacking budget. */
  filter: blur(50px);
  opacity: .55;
  will-change: transform;
}
.aurora::before {
  background: radial-gradient(circle at 30% 30%, #ff7a8b 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, #ffb277 0%, transparent 65%);
  top: -25%; left: -20%;
  animation: aurora-drift-a 22s ease-in-out infinite alternate;
}
.aurora::after {
  background: radial-gradient(circle at 50% 50%, #6bb6e0 0%, transparent 60%),
              radial-gradient(circle at 30% 70%, #c87ad6 0%, transparent 65%);
  bottom: -30%; right: -20%;
  animation: aurora-drift-b 28s ease-in-out infinite alternate;
}
@keyframes aurora-drift-a {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(8%, 6%, 0) rotate(40deg) scale(1.1); }
  100% { transform: translate3d(-4%, 10%, 0) rotate(-20deg) scale(.95); }
}
@keyframes aurora-drift-b {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-10%, -4%, 0) rotate(-30deg) scale(1.08); }
  100% { transform: translate3d(6%, -8%, 0) rotate(20deg) scale(.92); }
}
.aurora-soft::before, .aurora-soft::after { opacity: .35; filter: blur(100px); }

/* Bento hero card — large frosted panel with depth */
.lg-bento {
  position: relative;
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.92) 0%, rgba(252,248,240,.78) 60%, rgba(247,240,232,.72) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 0.5px solid rgba(255,255,255,.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(0,0,0,.04),
    0 2px 4px rgba(0,0,0,.04),
    0 18px 40px -16px rgba(0,0,0,.18),
    0 30px 80px -30px rgba(255,78,100,.16);
  overflow: hidden;
  transition: transform .35s var(--glass-ease), box-shadow .35s var(--glass-ease);
}
.lg-bento:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 6px 12px rgba(0,0,0,.06),
    0 26px 56px -18px rgba(0,0,0,.22),
    0 40px 100px -30px rgba(255,78,100,.25);
}
.lg-bento::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 60% at 50% -20%, rgba(255,255,255,.7) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

/* Display type ramp — premium headlines */
.display-xl {
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  background: linear-gradient(180deg, #1a1a1c 0%, #3a3a44 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.display-lg {
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--coral);
}
.num-tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Skeleton shimmer — for loading states */
.skel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(0,0,0,.04) 0%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.04) 100%);
  border-radius: 10px;
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skel-shine 1.4s ease-in-out infinite;
}
@keyframes skel-shine { to { transform: translateX(100%); } }

/* Focus ring — premium accessibility, double-layered so it survives on any background */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Colored glass buttons get a white halo so the coral ring is visible on coral bg */
.lg-coral:focus-visible, .lg-action:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--coral),
    inset 0 1px 0 rgba(255,255,255,0.36),
    inset 0 -0.5px 0 rgba(0,0,0,0.10);
}
[data-nav]:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Press feedback for any data-nav element — physical-feeling */
[data-nav] { transition: transform .14s var(--glass-bounce); -webkit-tap-highlight-color: transparent; }
[data-nav]:active { transform: scale(.96); }

/* Pulse — subtle live indicator (e.g. "now syncing") */
@keyframes pulse-soft {
  0%, 100% { opacity: .6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: #34c759;
  box-shadow: 0 0 0 0 rgba(52,199,89,.5);
  animation: pulse-soft 2s ease-in-out infinite, pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(52,199,89,.6); }
  100% { box-shadow: 0 0 0 14px rgba(52,199,89,0); }
}

/* Lift card — generic premium card hover lift (use sparingly) */
.lift {
  transition: transform .28s var(--glass-ease), box-shadow .28s var(--glass-ease);
}
.lift:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -16px rgba(0,0,0,.18); }
.lift:active { transform: translateY(-1px) scale(.995); transition-duration: .1s; }

/* Hairline divider with center fade */
.hr-fade {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.12) 50%, transparent 100%);
  border: none;
  margin: 14px 0;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM SHEETS — EditSheet / ConfirmSheet / ActionSheet
   Spring entrance, drag handle, glass inputs, focus halos
   ═══════════════════════════════════════════════════════════════════ */

@keyframes sheet-backdrop-in {
  from { background: rgba(0,0,0,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
  to   { background: rgba(0,0,0,.42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
@keyframes sheet-slide-up {
  from { transform: translateY(20%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes sheet-pop-in {
  from { transform: scale(.92); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  to   { transform: scale(1); }
}

.ma-sheet-backdrop {
  animation: sheet-backdrop-in .28s var(--glass-ease) forwards;
}
.ma-sheet-slide {
  animation: sheet-slide-up .42s cubic-bezier(.2,.9,.2,1.05);
  will-change: transform, opacity;
}
.ma-sheet-pop {
  animation: sheet-pop-in .36s cubic-bezier(.34, 1.56, .64, 1);
}

/* Drag handle (iOS-style 36px nub at sheet top) */
.ma-sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(0,0,0,.18);
  margin: 8px auto 4px;
}

/* Sheet shell — heavy glass + larger radius for that premium feel */
.lg-sheet {
  background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(252,247,238,0.94) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 0.5px solid rgba(255,255,255,.7);
  border-radius: 26px 26px 18px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -0.5px 0 rgba(0,0,0,0.04),
    0 -2px 4px rgba(0,0,0,.03),
    0 -20px 60px -10px rgba(0,0,0,.22);
}

/* Premium input field — pill with depth, focus halo */
.ma-field {
  position: relative;
  display: flex; flex-direction: column;
  gap: 6px;
}
.ma-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-inline-start: 4px;
  transition: color .2s ease;
}
.ma-field.is-focused .ma-field-label { color: var(--coral); }
.ma-field-input {
  width: 100%;
  padding: 16px 16px;
  font-size: 17px;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
  border: 0.5px solid rgba(0,0,0,.10);
  border-radius: 14px;
  outline: none;
  direction: rtl;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -0.5px 0 rgba(0,0,0,.04),
    0 1px 2px rgba(0,0,0,.02);
  transition:
    border-color .22s var(--glass-ease),
    box-shadow .22s var(--glass-ease),
    transform .22s var(--glass-ease),
    background .22s ease;
}
.ma-field-input:focus,
.ma-field-input:focus-visible {
  border-color: var(--coral);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 0 0 4px rgba(255,78,100,.14),
    0 4px 14px -3px rgba(255,78,100,.18);
  outline: none;
}
.ma-field-input::placeholder { color: var(--muted-soft); font-weight: 400; }
textarea.ma-field-input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.ma-field-input {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(0% + 16px) 24px, calc(0% + 22px) 24px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-inline-start: 36px;
}

/* Big primary CTA in sheets */
.ma-sheet-cta {
  width: 100%;
  padding: 17px 22px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: -.012em;
}

/* Pull-to-refresh indicator — slim coral bar that scales with drag distance */
.ma-ptr-indicator {
  position: absolute;
  top: var(--safe-top, 0px);
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  width: 64px;
  height: 4px;
  border-radius: 0 0 9999px 9999px;
  background: linear-gradient(180deg, var(--coral) 0%, #ff8095 100%);
  opacity: 0;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 6px 14px -3px rgba(255, 78, 100, .55);
}
.ma-ptr-indicator.ready {
  background: linear-gradient(180deg, #34c759 0%, #5cd97e 100%);
  box-shadow: 0 6px 14px -3px rgba(52, 199, 89, .55);
}

/* ═══════════════════════════════════════════════════════════════════
   POLISH LAYER — Stagger, press, count-flash, heart-pop, shimmer
   Applied selectively via class. All paths respect prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

/* Stagger fade-in-up for newly-mounted list items. Set `--i` on each child
   to its index for a cascading entrance. */
@keyframes ma-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ma-list-stagger > * {
  animation: ma-fade-up .42s cubic-bezier(.2,.85,.2,1) both;
  animation-delay: calc(var(--i, 0) * 32ms);
  /* will-change dropped — was promoting a GPU layer per child for the
     entire screen lifetime. Modern WebKit composites translateY+opacity
     keyframes without the hint and frees memory between renders. */
}

/* Card press — spring scale on tap for tappable tiles. Use alongside
   data-nav for instant interactive feedback. */
.ma-tile-press {
  transition: transform .14s cubic-bezier(.2,.85,.2,1), box-shadow .14s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ma-tile-press:active {
  transform: scale(.965);
}

/* Number / count flash — apply briefly when a metric changes to draw the eye.
   Toggle via JS by adding the class for ~400ms after a mutation. */
@keyframes ma-count-flash {
  0%   { transform: scale(1); color: var(--coral); }
  35%  { transform: scale(1.06); color: var(--coral-press, var(--coral)); }
  100% { transform: scale(1); color: inherit; }
}
.ma-count-flash {
  animation: ma-count-flash .55s cubic-bezier(.34,1.56,.64,1);
  display: inline-block;
  transform-origin: center;
}

/* Heart-like pop — wraps the heart icon when toggled liked. */
@keyframes ma-heart-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.32); }
  65%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
.ma-heart-pop {
  animation: ma-heart-pop .42s cubic-bezier(.34,1.56,.64,1);
  display: inline-flex;
}

/* Subtle shimmer for text/badges that represent live/syncing state. */
@keyframes ma-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ma-shimmer-text {
  background: linear-gradient(90deg, var(--muted) 25%, var(--ink) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ma-shimmer 2.6s linear infinite;
}

/* Sync badge — gentle breathing dot for "syncing" status. */
@keyframes ma-pulse-dot {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.35); opacity: 1; }
}
.ma-sync-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: #34c759;
  animation: ma-pulse-dot 1.6s ease-in-out infinite;
}
.ma-sync-dot.pending { background: #ff9500; }
.ma-sync-dot.error   { background: #ff3b30; animation: none; }
.ma-sync-dot.idle    { background: var(--muted-soft); animation: none; }

/* Toast exit — pairs with toast-in for a clean dismiss. */
@keyframes ma-toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.96); }
}
.ma-toast-leave {
  animation: ma-toast-out .2s ease-in forwards;
}

/* Liquid-Glass circle press treatment — emphasizes the corner radius. */
.lg-circle.ma-tile-press:active { transform: scale(.9); }

/* Focus ring polish — circular elements get round focus. */
.lg-circle:focus-visible,
[style*="border-radius: 9999"]:focus-visible {
  border-radius: 9999px !important;
}

/* Spring chip — lighter card-press for small interactive chips
   (filter chips, day picker, etc.). */
.ma-chip-press {
  transition: transform .12s cubic-bezier(.34,1.56,.64,1), background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.ma-chip-press:active { transform: scale(.93); }

/* List dividers — softer hairline that doesn't feel like a hard separator. */
.ma-hair {
  border-color: var(--hairline-soft, rgba(0,0,0,.05));
}

/* ═══════════════════════════════════════════════════════════════════
   SCREEN BACKGROUNDS — Hero photo on top, dissolves into canvas
   Applied via className on the screen root. The ::before holds the
   image so the existing content sits naturally above it without
   restructuring the JSX tree.
   ═══════════════════════════════════════════════════════════════════ */

.ma-bg-screen {
  isolation: isolate;
  /* Force full viewport coverage — !important overrides per-screen inline
     `minHeight: "100%"`. */
  min-height: 100vh !important;
  min-height: 100dvh !important;
  /* Paint bg image directly on the root via background-image longhand —
     !important beats the inline `background: var(--canvas)` shorthand
     (which would otherwise reset background-image to none and leave a
     white gap below the content). Cover + center 75% biases the photo
     away from the sky toward the action. */
  background-image: var(--ma-bg-url) !important;
  background-size: cover !important;
  background-position: center 75% !important;
  background-repeat: no-repeat !important;
}
/* Single bg across all screens — bg-home (beach + airplane heart) is
   the brand image. Per-class names kept so future per-screen overrides
   stay easy. */
.ma-bg-home,
.ma-bg-memories,
.ma-bg-planning {
  --ma-bg-url: url("assets/bg-home.jpg?v=69");
}

/* Hero card readability when sitting over the bg image — slight scrim
   blends with the photo without obscuring it. */
.ma-bg-screen .lg-bento,
.ma-bg-screen .lg-light {
  position: relative;
  z-index: 1;
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .aurora::before, .aurora::after { animation: none; }
  .ma-screen-anim { filter: none !important; }
  .ma-list-stagger > * { animation: none; opacity: 1; transform: none; }
  .ma-shimmer-text {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--ink);
    animation: none;
  }
}

