/* ──────────────────────────────────────────────────────
   DayHop Mood-First Design System
   Warm palette overlay of the global app
   ────────────────────────────────────────────────────── */

/* Scoped CSS custom properties — only affect #mood-onboarding */
#mood-onboarding {
  --mood-amber: #D4A574;
  --mood-terra: #C67B5C;
  --mood-coral: #E8735A;
  --mood-navy: #1B2838;
  --mood-cream: #FBF7F2;
  --mood-parchment: #F5EFE6;
  --mood-shadow: rgba(27, 40, 56, 0.15);
}

/* ── Full-Screen Mood Overlay ── */
#mood-onboarding {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--mood-navy);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#mood-onboarding.hiding {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

#mood-onboarding.hidden {
  display: none !important;
}

/* Background gradient per mood */
#mood-onboarding[data-mood="Energized"] .mood-bg { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%); }
#mood-onboarding[data-mood="Lazy"] .mood-bg { background: linear-gradient(135deg, #1a1a2e 0%, #2d2d2d 50%, #1a1a2e 100%); }
#mood-onboarding[data-mood="Romantic"] .mood-bg { background: linear-gradient(135deg, #1a1a2e 0%, #3d1c2e 50%, #1a0a0e 100%); }
#mood-onboarding[data-mood="Curious"] .mood-bg { background: linear-gradient(135deg, #0d1117 0%, #1b2838 40%, #152a3a 100%); }
#mood-onboarding[data-mood="Hungry"] .mood-bg { background: linear-gradient(135deg, #1a0a00 0%, #2d1200 50%, #1a0a00 100%); }
#mood-onboarding[data-mood="Adventurous"] .mood-bg { background: linear-gradient(135deg, #0a1628 0%, #1b3a2e 50%, #0d2818 100%); }

.mood-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d1117 0%, #1b2838 50%, #0f1c2e 100%);
  transition: background 1s ease;
}

/* ── Step containers ── */
.mood-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow-y: auto;
}

.mood-step.active {
  opacity: 1;
  transform: none;
  pointer-events: all;
  /* Note: do NOT add position:relative here — inset:0 with no explicit
     height causes height to collapse to 0, making content invisible.
     The absolutely-positioned .mood-bg inside uses .mood-step (absolute)
     as its containing block, not .mood-step.active. */
}

/* ── Skip button ── */
.mood-skip {
  position: absolute;
  top: 1.1rem;
  right: 1rem;
  background: rgba(255,107,74,0.92);
  border: none;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(255,107,74,0.45);
  letter-spacing: 0.01em;
}
.mood-skip:hover { background: #ff5533; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255,107,74,0.55); color: #fff; }

/* ── Step 1: Mood Selector ── */
.mood-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.mood-subhead {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 2.5rem;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 700px;
}

@media (max-width: 480px) {
  .mood-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 380px;
  }
}

.mood-card {
  position: relative;
  aspect-ratio: 0.9;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mood-card:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.mood-card:active {
  transform: scale(0.96);
}

.mood-card.selected {
  border-color: var(--mood-amber);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.3), 0 16px 40px rgba(0,0,0,0.4);
  transform: scale(1.06) translateY(-4px);
}

.mood-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.mood-card:hover .mood-card-bg { transform: scale(1.05); }

.mood-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.75) 100%);
}

.mood-card-label {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.mood-card-emoji {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
}

/* ── Step 2: Context Layer ── */
.context-form {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.context-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.context-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.context-chip {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.context-chip:hover {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.35);
  color: rgba(255,255,255,0.9);
}

.context-chip.selected {
  background: rgba(212, 165, 116, 0.2);
  border-color: var(--mood-amber);
  color: white;
  transform: scale(1.04);
}

.context-back-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
  margin-bottom: -0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.context-back-btn:hover { color: rgba(255,255,255,0.8); }

/* ── CTA Button ── */
.mood-cta {
  background: linear-gradient(135deg, var(--mood-amber), var(--mood-terra));
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.35);
  margin-top: 0.5rem;
  width: 100%;
  max-width: 320px;
}

.mood-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(212, 165, 116, 0.45);
}

.mood-cta:active { transform: scale(0.97); }
.mood-cta:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Step 3: Location ── */
.location-headline { margin-bottom: 1.5rem; }
.location-btns { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 420px; }

.location-detect-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(212, 165, 116, 0.12);
  border: 1.5px solid rgba(212, 165, 116, 0.35);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}
.location-detect-btn:hover { background: rgba(212, 165, 116, 0.2); border-color: var(--mood-amber); }
.location-detect-btn .ldb-icon { font-size: 1.4rem; }
.location-detect-btn .ldb-title { font-weight: 600; display: block; font-size: 0.95rem; }
.location-detect-btn .ldb-sub { font-size: 0.8rem; color: rgba(255,255,255,0.5); display: block; margin-top: 0.15rem; }

.location-divider {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.location-divider::before, .location-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.location-city-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.location-city-input::placeholder { color: rgba(255,255,255,0.3); }
.location-city-input:focus { border-color: var(--mood-amber); background: rgba(255,255,255,0.09); }

.location-suggestions {
  background: #1e2a38;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  width: 100%;
  max-width: 420px;
}
.location-suggestions.show { display: block; }
.location-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.location-suggestion-item:hover { background: rgba(255,255,255,0.06); }

/* ── Step 4: Loading ── */
.mood-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.mood-loading-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mood-amber), var(--mood-terra));
  animation: orbPulse 1.5s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(212,165,116,0.4); }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 0 20px rgba(212,165,116,0); }
}

.mood-loading-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  color: white;
  animation: loadingFade 2s ease-in-out infinite;
}

@keyframes loadingFade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.mood-loading-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

/* ── Step 5: Itinerary Result ── */
.mood-itinerary-result {
  width: 100%;
  max-width: 640px;
  padding: 0 0.5rem;
}

.mood-itinerary-header {
  text-align: center;
  margin-bottom: 2rem;
}

.mood-itinerary-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.3);
  color: var(--mood-amber);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 1rem;
}

.mood-itinerary-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.mood-itinerary-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

/* Act cards - progressive reveal */
.mood-act {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.mood-act.revealed {
  opacity: 1;
  transform: translateY(0);
}

.mood-act-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mood-amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.mood-act-place {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.mood-act-photo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.mood-act-info { flex: 1; min-width: 0; }

.mood-act-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: white;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mood-act-rating {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.25rem;
}

.mood-act-vibe {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}
.mood-act-vibe.chill { background: rgba(62,207,180,0.12); color: #3ECFB4; border: 1px solid rgba(62,207,180,0.25); }
.mood-act-vibe.moderate { background: rgba(244,185,66,0.12); color: #F4B942; border: 1px solid rgba(244,185,66,0.25); }
.mood-act-vibe.active { background: rgba(255,107,74,0.12); color: #FF6B4A; border: 1px solid rgba(255,107,74,0.25); }

.mood-act-why {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  border-left: 2px solid rgba(212,165,116,0.4);
  padding-left: 0.9rem;
  margin-bottom: 0.75rem;
}

.mood-act-tip {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

.mood-act-tip strong { color: rgba(255,255,255,0.65); }

.mood-transit {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  margin: -0.25rem 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* CTA row at bottom of itinerary */
.mood-itinerary-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
  padding-bottom: 2rem;
}

.mood-explore-btn {
  background: linear-gradient(135deg, var(--mood-amber), var(--mood-terra));
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(212,165,116,0.35);
  width: 100%;
  max-width: 360px;
}
.mood-explore-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(212,165,116,0.45); }
.mood-explore-btn:active { transform: scale(0.97); }

.mood-try-again {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  padding: 0.7rem 2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.mood-try-again:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }

/* ── Progress dots ── */
.mood-progress {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 5;
}

.mood-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.mood-progress-dots-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mood-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.mood-progress-dot.active {
  background: var(--mood-amber);
  width: 20px;
  border-radius: 3px;
}

/* ── Skip Quiz — Explore Directly ── */

    /* One-liner above mood grid */
    .mood-one-liner {
      text-align: center;
      color: rgba(255,255,255,0.65);
      font-size: 0.9rem;
      font-weight: 500;
      margin: 0.75rem auto 1.25rem;
      letter-spacing: 0.01em;
    }

    /* City search + location button wrapper */
    .mood-city-search-wrap {
      padding: 0.25rem 0;
      margin-bottom: 0.25rem;
    }

    /* Location button */
    .mood-explore-location-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      width: 100%;
      padding: 0.75rem 1rem;
      background: rgba(62, 207, 180, 0.1);
      border: 1px solid rgba(62, 207, 180, 0.3);
      border-radius: 12px;
      color: #3ECFB4;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      margin-top: 0.5rem;
    }
    .mood-explore-location-btn:hover {
      background: rgba(62, 207, 180, 0.18);
      border-color: rgba(62, 207, 180, 0.5);
    }

    .mood-skip-explore {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
}

.mood-skip-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: rgba(255,255,255,0.3);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mood-skip-divider::before,
.mood-skip-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.mood-skip-explore-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.35);
  border-radius: 12px;
  color: var(--mood-amber);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.mood-skip-explore-btn:hover {
  background: rgba(212, 165, 116, 0.2);
  border-color: rgba(212, 165, 116, 0.5);
  transform: translateY(-1px);
}

.mood-skip-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.mood-skip-city {
  padding: 0.35rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  color: rgba(255,255,255,0.55);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mood-skip-city:hover {
  background: rgba(212, 165, 116, 0.15);
  color: var(--mood-amber);
  border-color: rgba(212, 165, 116, 0.3);
}

/* ── Warm global overrides (applied when mood overlay is gone) ── */
body.mood-done {
  --coral: #E8735A;
  --amber: #D4A574;
}

/* Typography for itinerary narrative sections in main app */
.itinerary-narrative-text,
.stop-description,
.day-narrative {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

/* ── Saved Banner (post-quiz success) ── */
.mood-saved-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.3);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.25rem;
  animation: fadeBannerIn 0.5s ease forwards;
}
.mood-saved-check {
  font-size: 1rem;
  color: #2ed573;
  flex-shrink: 0;
}
@keyframes fadeBannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Secondary explore button (outline style) */
.mood-explore-btn-secondary {
  background: rgba(212,165,116,0.12) !important;
  border: 1px solid rgba(212,165,116,0.4) !important;
  color: var(--mood-amber) !important;
  box-shadow: none !important;
}
.mood-explore-btn-secondary:hover {
  background: rgba(212,165,116,0.22) !important;
  box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════════
   MY ITINERARY PANEL — Warm Premium Theme (Split-View)
   ══════════════════════════════════════════════════════════ */

/* ── Panel container ── */
#my-itinerary-panel {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #FAF8F5;
  display: none;
  flex-direction: column;
  color: #1A1A1A;
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
}
#my-itinerary-panel.open { display: flex; }

/* ── Top bar ── */
.mi-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  min-height: 56px;
}
.mi-topbar-center { flex: 1; text-align: center; }
.mi-topbar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1A1A1A;
}
.mi-close-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #555; flex-shrink: 0;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.mi-close-btn:hover { background: rgba(0,0,0,0.1); }
.mi-map-pill {
  background: #FAF8F5;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem; font-weight: 600;
  color: #444; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all 0.2s;
}
.mi-map-pill:hover { background: #f0ede8; border-color: rgba(0,0,0,0.22); }
.mi-map-pill.map-active { background: #FF6B4A; border-color: #FF6B4A; color: #fff; }
@media (min-width: 769px) { .mi-map-pill { display: none; } }

/* ── Split layout ── */
.mi-split {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ── List pane ── */
.mi-list-pane {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem 6rem;
  min-width: 0;
  background: #FAF8F5;
}
@media (min-width: 769px) {
  .mi-list-pane {
    flex: 0 0 58%;
    max-width: 680px;
    border-right: 1px solid rgba(0,0,0,0.07);
  }
}

/* ── Map pane ── */
.mi-map-pane {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9050;
  background: #fff;
  flex-direction: column;
}
@media (min-width: 769px) {
  .mi-map-pane {
    display: flex !important;
    position: relative;
    flex: 1;
    inset: auto;
    z-index: auto;
  }
}
.mi-map-pane.mobile-open { display: flex; }
.mi-map-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.mi-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-height: 52px;
}
#mi-map-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#mi-map { flex: 1; min-height: 0; }
.mi-map-done-btn {
  display: none;
  margin: 0.75rem 1rem;
  width: calc(100% - 2rem);
  background: #1A1A1A; color: #fff; border: none;
  border-radius: 12px; padding: 0.85rem;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; flex-shrink: 0;
}
@media (max-width: 768px) {
  .mi-map-pane.mobile-open .mi-map-done-btn { display: block; }
}

/* ── Map day tab pills ── */
.mi-map-day-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
  overflow: hidden;
}
.mi-map-day-btn {
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #FAF8F5;
  font-size: 0.76rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.mi-map-day-btn.active { background: #FF6B4A; border-color: #FF6B4A; color: #fff; }

/* ── Optimize route button ── */
.mi-optimize-btn {
  background: linear-gradient(135deg, #FF6B4A, #E85A39);
  color: #fff; border: none;
  border-radius: 100px; padding: 0.4rem 0.9rem;
  font-size: 0.8rem; font-weight: 700; font-family: 'DM Sans', sans-serif;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(255,107,74,0.3);
}
.mi-optimize-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,74,0.4); }
.mi-optimize-btn:active { transform: translateY(0); }

/* ── Hero banner (top of list pane) ── */
.mi-hero {
  position: relative; border-radius: 16px; overflow: hidden;
  margin-bottom: 1.25rem; height: 140px;
  background: linear-gradient(135deg, #FFE8D6, #FFDDD3);
}
.mi-hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; opacity: 0.8;
}
.mi-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.08) 60%, transparent 100%);
}
.mi-hero-text { position: absolute; bottom: 0.85rem; left: 1rem; right: 1rem; color: #fff; }
.mi-hero-eyebrow {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 0.15rem;
}
.mi-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 3.5vw, 1.4rem); font-weight: 700; line-height: 1.2;
}
.mi-hero-sub { font-size: 0.76rem; color: rgba(255,255,255,0.7); margin-top: 0.15rem; }

/* ── Plain header (fallback when no photo) ── */
.mi-plain-header { margin-bottom: 1.25rem; }
.mi-eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #FF6B4A; margin-bottom: 0.3rem;
}
.mi-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 700;
  color: #1A1A1A; line-height: 1.2; margin-bottom: 0.25rem;
}
.mi-subtitle { font-size: 0.84rem; color: #717171; }

/* ── Personalization line ── */
.mi-personalization {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: #717171; margin-bottom: 1rem;
  background: #fff; border: 1px solid rgba(0,0,0,0.07);
  border-radius: 10px; padding: 0.55rem 0.9rem;
}
.mi-personalization strong { color: #FF6B4A; }

/* ── Success msg ── */
.mi-success-msg {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 10px; padding: 0.6rem 0.9rem;
  font-size: 0.84rem; color: #065F46; margin-bottom: 1.25rem;
}

/* ── Optimize My Day button (in list pane header) ── */
.mi-optimize-day-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.75rem;
  background: linear-gradient(135deg, #FF6B4A, #E85A39);
  border: none; border-radius: 12px; color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; margin-bottom: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(255,107,74,0.25);
}
.mi-optimize-day-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,74,0.35); }

/* ── Day tabs ── */
.mi-day-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(0,0,0,0.07);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.mi-day-tabs::-webkit-scrollbar { display: none; }
.mi-day-tab {
  padding: 0.55rem 1rem;
  border: none; background: none;
  font-family: 'DM Sans', sans-serif; font-size: 0.84rem; font-weight: 600;
  color: #717171; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.mi-day-tab.active { color: #FF6B4A; border-bottom-color: #FF6B4A; }

/* ── Day section heading ── */
.mi-day-section { margin-bottom: 1.5rem; }
.mi-day-heading {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem;
}
.mi-day-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: #1A1A1A;
}
.mi-day-count { font-size: 0.72rem; color: #9CA3AF; }
.mi-day-map-pill {
  margin-left: auto;
  background: #fff; border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px; padding: 0.25rem 0.65rem;
  font-size: 0.73rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.15s;
}
.mi-day-map-pill:hover { background: #f0ede8; }
@media (min-width: 769px) { .mi-day-map-pill { display: none; } }

/* ── Add custom spot button ── */
.mi-add-custom-wrap { margin-bottom: 0.75rem; }
.mi-add-custom-btn {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.7rem 1rem;
  background: #fff; border: 1.5px dashed rgba(255,107,74,0.35);
  border-radius: 12px; color: #FF6B4A;
  font-family: 'DM Sans', sans-serif; font-size: 0.86rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; box-sizing: border-box;
}
.mi-add-custom-btn:hover { background: rgba(255,107,74,0.04); border-color: rgba(255,107,74,0.65); }

/* ── Acts container ── */
.mi-acts-container { display: flex; flex-direction: column; gap: 0; }

/* ── Spot card ── */
.mi-act {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(0,0,0,0.05);
}
.mi-act.revealed { opacity: 1; transform: translateY(0); }
.mi-act:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.09), 0 8px 24px rgba(0,0,0,0.06); }
.mi-act.highlighted {
  box-shadow: 0 0 0 2.5px #FF6B4A, 0 4px 20px rgba(255,107,74,0.15);
  animation: miCardPop 0.3s ease;
}
@keyframes miCardPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.mi-act.custom-act { border-left: 3px solid #7C3AED; }
.mi-act.dragging { opacity: 0.3; transform: scale(0.97); }
.mi-act.drag-over { box-shadow: 0 0 0 2px #FF6B4A; }

/* ── Spot number badge ── */
.mi-spot-number {
  position: absolute; top: 0.65rem; left: 0.65rem; z-index: 5;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: 1.5px solid rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.7rem; font-weight: 700; color: #1A1A1A;
}
.mi-act.custom-act .mi-spot-number { background: #7C3AED; border-color: #7C3AED; color: #fff; }

/* ── Spot photo header ── */
.mi-act-photo-header {
  position: relative; width: 100%; height: 160px;
  background: #F5F0EB; overflow: hidden; flex-shrink: 0;
}
.mi-act-photo-header img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mi-act-photo-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 55%);
}
.mi-act-photo-name {
  position: absolute; bottom: 0.7rem; left: 0.85rem; right: 2.5rem;
  color: #fff; font-family: 'Space Grotesk', sans-serif;
  font-size: 0.97rem; font-weight: 700; line-height: 1.2;
}
.mi-act-photo-rating {
  position: absolute; bottom: 0.4rem; left: 0.85rem;
  color: rgba(255,255,255,0.72); font-size: 0.7rem;
}

/* ── Spot body ── */
.mi-act-body { padding: 0.85rem 1rem; }
.mi-act-no-photo .mi-act-body { padding-top: 1.1rem; }
.mi-act-name-plain {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.96rem; font-weight: 700;
  color: #1A1A1A; margin-bottom: 0.2rem; padding-right: 2rem;
}
.mi-act-address {
  font-size: 0.76rem; color: #9CA3AF; margin-bottom: 0.4rem;
  display: flex; align-items: center; gap: 0.2rem;
}
.mi-act-meta-row {
  display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.5rem;
}

/* ── Vibe tag ── */
.mi-act-vibe {
  display: inline-flex; align-items: center;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 100px;
}
.mi-act-vibe.chill { background: rgba(62,207,180,0.1); color: #0D9488; }
.mi-act-vibe.moderate { background: rgba(244,185,66,0.1); color: #B45309; }
.mi-act-vibe.active { background: rgba(255,107,74,0.1); color: #E85A39; }

/* ── Personal badge ── */
.mi-personal-badge {
  display: inline-flex; align-items: center; gap: 0.22rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 100px;
  background: rgba(124,58,237,0.1); color: #7C3AED;
}

/* ── Time badge ── */
.mi-act-time-badge {
  font-size: 0.72rem; color: #717171; background: #F5F5F5;
  padding: 0.18rem 0.5rem; border-radius: 6px;
}

/* ── Spend ── */
.mi-act-spend { font-size: 0.73rem; color: #9CA3AF; font-family: 'DM Sans', sans-serif; margin-top: 0.3rem; }

/* ── Why / quote ── */
.mi-act-why {
  font-family: 'Playfair Display', Georgia, serif; font-style: italic;
  font-size: 0.82rem; color: #717171; line-height: 1.5;
  border-left: 2px solid #FFD4C8; padding-left: 0.65rem; margin: 0.5rem 0 0.3rem;
}

/* ── Tip ── */
.mi-act-tip {
  background: #FFF9F5; border: 1px solid rgba(255,107,74,0.12);
  border-radius: 8px; padding: 0.45rem 0.65rem;
  font-size: 0.77rem; color: #717171; margin-top: 0.4rem;
}
.mi-act-tip strong { color: #FF6B4A; }

/* ── Notes (custom spot) ── */
.mi-act-notes {
  font-size: 0.77rem; color: #717171; background: #F5F3FF;
  border-radius: 8px; padding: 0.35rem 0.6rem; margin-top: 0.4rem;
}

/* ── Card controls ── */
.mi-act-controls {
  display: flex; align-items: center; gap: 0.45rem;
  margin-top: 0.6rem; flex-wrap: wrap;
}

/* ── Remove button ── */
.mi-act-remove {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 10;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.72rem; color: #717171;
  transition: all 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
@media (max-width: 480px) {
  .mi-act-remove { width: 44px; height: 44px; font-size: 0.82rem; }
}
.mi-act-remove:hover { background: #FF6B4A; color: #fff; border-color: #FF6B4A; }

/* ── Drag handle (hidden per design requirement - no drag reorder) ── */
.mi-drag-handle { display: none; }

/* ── Reorder arrows ── */
.mi-reorder-arrows { display: flex; gap: 0.35rem; }
.mi-arrow-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1); background: #FAF8F5; color: #555;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; cursor: pointer; transition: all 0.15s;
}
@media (max-width: 480px) {
  .mi-arrow-btn { width: 44px; height: 44px; font-size: 0.85rem; }
}
.mi-arrow-btn:hover { background: #FF6B4A; color: #fff; border-color: #FF6B4A; }
.mi-arrow-btn:disabled { opacity: 0.28; cursor: not-allowed; }
.mi-arrow-btn:disabled:hover { background: #FAF8F5; color: #555; border-color: rgba(0,0,0,0.1); }

/* ── Day assignment pill ── */
.mi-add-day-wrap { position: relative; display: inline-flex; }
.mi-add-day-pill {
  font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.55rem; border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.12); background: #FAF8F5; color: #555;
  cursor: pointer; transition: all 0.15s;
}
.mi-add-day-pill:hover { background: #f0ede8; }

/* ── Transit connector ── */
.mi-transit-connector {
  display: flex; align-items: center; justify-content: center;
  padding: 0.45rem 0; position: relative;
}
.mi-transit-connector::before {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,0.08);
}
.mi-transit-pill {
  background: #fff; border: 1px solid rgba(0,0,0,0.1); border-radius: 100px;
  padding: 0.18rem 0.65rem; font-size: 0.7rem; color: #717171;
  white-space: nowrap; z-index: 1; display: inline-flex; align-items: center; gap: 0.25rem;
}
.mi-transit-pill.transit { color: #1D4ED8; border-color: rgba(29,78,216,0.2); background: rgba(29,78,216,0.04); }

/* ── Empty state ── */
.mi-empty { text-align: center; padding: 3rem 1.5rem; }
.mi-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.mi-empty-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 600;
  color: #1A1A1A; margin-bottom: 0.5rem;
}
.mi-empty-sub { font-size: 0.88rem; color: #717171; margin-bottom: 1.5rem; }
.mi-start-btn {
  background: linear-gradient(135deg, #FF6B4A, #E85A39);
  color: white; border: none; padding: 0.9rem 2rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(255,107,74,0.3);
}
.mi-start-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,107,74,0.4); }

/* ── Actions footer ── */
.mi-actions {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-top: 1.5rem; padding-bottom: 2rem; align-items: center;
}
.mi-save-btn {
  width: 100%; max-width: 400px;
  background: #fff; border: 1.5px solid rgba(255,107,74,0.3); color: #FF6B4A;
  padding: 0.85rem 1.5rem; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.mi-save-btn:hover { background: rgba(255,107,74,0.05); border-color: #FF6B4A; }
.mi-share-btn {
  width: 100%; max-width: 400px;
  background: linear-gradient(135deg, #FF6B4A, #E85A39);
  border: none; color: #fff; padding: 0.9rem 1.5rem; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(255,107,74,0.25);
}
.mi-share-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,74,0.35); }
.mi-restart-link {
  font-size: 0.82rem; color: #9CA3AF; cursor: pointer; text-decoration: underline;
}
.mi-restart-link:hover { color: #555; }

/* ── Budget tracker ── */
.mi-budget-bar {
  background: #fff; border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.mi-budget-label { font-size: 0.8rem; color: #717171; flex: 1; }
.mi-budget-amount { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: #1A1A1A; }
.mi-budget-badge {
  font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.55rem;
  border-radius: 100px; background: rgba(16,185,129,0.1); color: #065F46;
}

/* ── Custom spot modal ── */
.mi-modal-overlay {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; padding: 0;
}
.mi-modal-overlay.open { display: flex; }
@media (min-width: 540px) {
  .mi-modal-overlay { align-items: center; padding: 1.5rem; }
}
.mi-modal-sheet {
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 1.75rem 1.5rem 2rem; width: 100%; max-width: 520px;
  position: relative; max-height: 90vh; overflow-y: auto;
}
@media (min-width: 540px) { .mi-modal-sheet { border-radius: 20px; } }
.mi-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(0,0,0,0.06); border: none; border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.95rem; color: #555;
}
.mi-modal-close:hover { background: rgba(0,0,0,0.1); }
.mi-modal-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700;
  color: #1A1A1A; margin-bottom: 0.3rem; padding-right: 2rem;
}
.mi-modal-sub { font-size: 0.84rem; color: #717171; margin-bottom: 1.4rem; }
.mi-field { margin-bottom: 1rem; flex: 1; }
.mi-field-label { display: block; font-size: 0.82rem; font-weight: 600; color: #1A1A1A; margin-bottom: 0.3rem; }
.mi-required { color: #FF6B4A; }
.mi-optional { color: #9CA3AF; font-weight: 400; font-size: 0.74rem; }
.mi-field-input {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid rgba(0,0,0,0.1); border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: #1A1A1A;
  background: #fff; outline: none; box-sizing: border-box; transition: border-color 0.15s;
}
.mi-field-input:focus { border-color: #FF6B4A; }
.mi-field-input::placeholder { color: #C0BDB8; }
.mi-field-textarea { resize: vertical; min-height: 60px; }
select.mi-field-input { appearance: auto; }
.mi-field-row { display: flex; gap: 0.75rem; }
.mi-modal-submit {
  width: 100%; background: linear-gradient(135deg, #FF6B4A, #E85A39);
  color: #fff; border: none; border-radius: 12px; padding: 0.9rem 1.5rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; margin-top: 0.25rem;
  transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 12px rgba(255,107,74,0.3);
}
.mi-modal-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,74,0.4); }

/* ── Toast ── */
.mi-toast {
  position: fixed; bottom: 5rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1A1A1A; color: #fff;
  padding: 0.62rem 1.25rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.87rem; font-weight: 600;
  z-index: 9999; opacity: 0; transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap; pointer-events: none;
}
.mi-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.mi-toast.success { background: #065F46; }
.mi-toast.coral { background: #FF6B4A; }

/* ── Map pins (light theme) ── */
.mi-map-pin {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #FF6B4A, #FF8A6F);
  border: 2.5px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 0.82rem; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.mi-map-pin.custom { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.mi-map-pin.selected { transform: scale(1.25); box-shadow: 0 4px 14px rgba(255,107,74,0.4); }
@keyframes miPinPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.mi-map-pin.pulsing { animation: miPinPulse 0.5s ease; }

/* ── Leaflet overrides for light map theme (scoped to itinerary panel) ── */
.mi-map-pane .leaflet-container { font-family: 'DM Sans', sans-serif; }
#my-itinerary-panel .leaflet-control-zoom a { background: #fff !important; color: #1A1A1A !important; border-color: rgba(0,0,0,0.12) !important; }
#my-itinerary-panel .leaflet-control-zoom a:hover { background: #f5f5f5 !important; }
#my-itinerary-panel .leaflet-control-attribution { background: rgba(255,255,255,0.85) !important; color: #9CA3AF !important; font-size: 0.6rem !important; }
.mi-popup .leaflet-popup-content-wrapper {
  background: #fff; border-radius: 12px; color: #1A1A1A;
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.mi-popup .leaflet-popup-tip { background: #fff; }
.mi-popup .leaflet-popup-content { margin: 8px 12px; font-family: 'DM Sans', sans-serif; color: #1A1A1A; }
.mi-popup .leaflet-popup-close-button { color: #9CA3AF !important; }
.dh-map-popup .leaflet-popup-content-wrapper { background: #fff; border-radius: 12px; color: #1A1A1A; border: 1px solid rgba(0,0,0,0.08); }
.dh-map-popup .leaflet-popup-tip-container { display: none; }
.dh-map-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.dh-map-popup .leaflet-popup-close-button { display: none; }

/* ── Email capture modal (keep dark theme) ── */
#email-capture-overlay {
  position: fixed; inset: 0; z-index: 10100;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; padding: 0 0 1rem;
}
#email-capture-overlay.open { display: flex; }
.email-capture-modal {
  background: linear-gradient(160deg, #1a0d1e 0%, #1b1025 100%);
  border: 1px solid rgba(212,165,116,0.25); border-radius: 20px 20px 16px 16px;
  padding: 1.75rem 1.5rem 1.5rem; width: 100%; max-width: 480px; position: relative;
}
.ec-close-btn { position: absolute; top: 0.75rem; right: 0.9rem; background: none; border: none; color: rgba(255,255,255,0.45); font-size: 1.1rem; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.ec-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 0.35rem; }
.ec-sub { font-family: 'DM Sans', sans-serif; font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 1.25rem; }
.ec-form { display: flex; gap: 0.5rem; }
.ec-input { flex: 1; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 0.75rem 1rem; color: #fff; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none; }
.ec-input:focus { border-color: rgba(212,165,116,0.5); }
.ec-input::placeholder { color: rgba(255,255,255,0.3); }
.ec-submit { background: linear-gradient(135deg, #D4A574, #C67B5C); color: white; border: none; border-radius: 10px; padding: 0.75rem 1.2rem; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform 0.2s; }
.ec-submit:hover { transform: translateY(-1px); }
.ec-dismiss { display: block; text-align: center; margin-top: 0.75rem; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.3); cursor: pointer; }
.ec-dismiss:hover { color: rgba(255,255,255,0.5); }

/* ── Add to Itinerary Pill & Dropdown on Quiz Cards ── */
.mood-act-photo-large {
  width: 100%; height: 160px; border-radius: 14px; background-size: cover;
  background-position: center; flex-shrink: 0; background-color: rgba(255,255,255,0.05);
  position: relative; margin-bottom: 0.85rem;
}
.mood-act-photo-overlay { position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%); }
.mood-add-itin-wrap { position: relative; display: inline-flex; margin-top: 0.85rem; }
.mood-add-itin-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(212,165,116,0.14); border: 1px solid rgba(212,165,116,0.45); color: #D4A574;
  padding: 0.45rem 1rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.mood-add-itin-pill:hover { background: rgba(212,165,116,0.25); border-color: rgba(212,165,116,0.7); transform: translateY(-1px); }
.mood-added-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(46,213,115,0.15); border: 1px solid rgba(46,213,115,0.4); color: #2ed573;
  padding: 0.45rem 1rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.mood-added-badge:hover { background: rgba(46,213,115,0.22); }
.mood-add-chevron { opacity: 0.7; font-size: 0.7rem; }
.mood-add-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
  background: #1a1330; border: 1px solid rgba(212,165,116,0.3);
  border-radius: 12px; padding: 0.35rem; min-width: 130px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); flex-direction: column; gap: 2px;
}
.mood-add-dropdown.open { display: flex; }
.mood-add-dd-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: rgba(255,255,255,0.8); font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; font-weight: 500; padding: 0.55rem 0.9rem;
  border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.mood-add-dd-item:hover { background: rgba(212,165,116,0.15); color: #D4A574; }
.mood-add-dd-item.active { color: #2ed573; font-weight: 700; }
.mood-add-dd-new { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 2px; color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.mood-add-dd-new:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }

/* ── View My Itinerary CTA ── */
.mood-view-itin-cta-top { display: flex; margin-bottom: 1.5rem; }
.mood-view-itin-btn-top {
  flex: 1; background: linear-gradient(135deg, #D4A574, #C67B5C); color: white; border: none;
  padding: 1rem 1.5rem; border-radius: 14px; font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform 0.2s, opacity 0.2s; letter-spacing: 0.01em;
}
.mood-view-itin-btn-top:hover { transform: translateY(-2px); opacity: 0.92; }
.mood-act-place { flex-direction: column !important; gap: 0 !important; }

/* ── Toast for add-to-itinerary feedback ── */
.mood-itin-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px); z-index: 99999;
  background: rgba(26,19,48,0.96); border: 1px solid rgba(46,213,115,0.4); color: #2ed573;
  padding: 0.6rem 1.25rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.mood-itin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Nav My Itinerary Button ── */
.nav-my-itinerary-btn {
  display: flex !important;
  background: linear-gradient(135deg, rgba(255,107,74,0.18), rgba(212,165,116,0.18)) !important;
  border: 1.5px solid rgba(255,107,74,0.55) !important; color: #FF8A6F !important;
  padding: 0.55rem 1.1rem !important; font-size: 0.85rem !important; font-weight: 700 !important;
  box-shadow: 0 2px 12px rgba(255,107,74,0.18) !important;
}
.nav-my-itinerary-btn:hover {
  background: linear-gradient(135deg, rgba(255,107,74,0.28), rgba(212,165,116,0.25)) !important;
  border-color: rgba(255,107,74,0.8) !important; transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(255,107,74,0.3) !important;
}
.nav-my-itinerary-btn.no-itin {
  background: linear-gradient(135deg, rgba(88,166,255,0.15), rgba(62,207,180,0.15)) !important;
  border-color: rgba(88,166,255,0.45) !important; color: #58A6FF !important;
}

/* ── Floating "My Itinerary" CTA ── */
.floating-itin-cta {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 900;
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #FF6B4A, #FF8C42);
  color: #fff;
  padding: 0.75rem 1.4rem 0.75rem 1.2rem;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 28px rgba(255,107,74,0.5);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s, box-shadow 0.2s;
  opacity: 0;
  pointer-events: none;
}
.floating-itin-cta.show { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: all; }
.floating-itin-cta:hover { transform: translateX(-50%) translateY(-3px) !important; box-shadow: 0 12px 40px rgba(255,107,74,0.6) !important; }
/* Orange badge with count */
.floating-itin-cta-badge {
  background: rgba(0,0,0,0.25);
  border-radius: 100px;
  padding: 0.1rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,0.35);
}
@media (min-width: 769px) { .floating-itin-cta { display: none !important; } }

/* ── Bottom nav My Trip tab ── */
#bnav-trip { color: #FF6B4A !important; font-weight: 700 !important; }
#bnav-trip .bottom-nav-icon { font-size: 1.5rem !important; }
#bnav-trip .bottom-nav-label { font-weight: 700 !important; color: #FF6B4A !important; }
#bnav-trip.active { color: #FF6B4A !important; background: rgba(255,107,74,0.1) !important; border-radius: 12px !important; }

/* ── Heart pop animation ── */
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.heart-pop { animation: heartPop 0.4s ease; }

/* ── Confetti burst (canvas overlay) ── */
#mi-confetti-canvas {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; display: none;
}

/* ══════════════════════════════════════════════════════════
   MOBILE OVERHAUL — Safe-area & touch targets (375px–414px)
   ══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  /* Prevent horizontal overflow on all mood screens */
  #mood-onboarding { overflow-x: hidden; }

  /* Mood step — safe-area padding */
  .mood-step {
    padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* Skip button — touch-friendly + safe area */
  .mood-skip {
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mood cards — larger on narrow screens */
  .mood-card { border-radius: 16px; }

  /* Context chips — min touch target */
  .context-chip {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Location buttons — min touch target */
  .location-detect-btn { min-height: 48px; }
  .location-suggestion-item { min-height: 44px; }

  /* CTA buttons — min touch target */
  .mood-cta { min-height: 48px; }
  .mood-explore-btn { min-height: 48px; }

  /* Itinerary panel — safe area aware */
  .mi-list-pane {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  /* Itinerary actions — safe area bottom padding */
  .mi-actions {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }

  /* Modal sheet — safe area */
  .mi-modal-sheet {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(90vh - env(safe-area-inset-top, 0px));
  }

  /* Email capture overlay — safe area */
  #email-capture-overlay {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  /* Toast — above safe area */
  .mi-toast {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  /* Mood progress dots — above safe area */
  .mood-progress {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* Itinerary CTA row — larger buttons on mobile */
  .mood-itinerary-cta-row button {
    min-height: 48px;
  }

  /* Field inputs — prevent iOS zoom */
  .mi-field-input { font-size: 16px; }
  .location-city-input { font-size: 16px; }
  .ec-input { font-size: 16px; }

  /* Mood card label — readable on small screens */
  .mood-card-label { font-size: 0.85rem; }

  /* Map done button — safe area */
  .mi-map-done-btn {
    margin-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 375px) {
  /* iPhone SE — tighter layout */
  .mood-headline { font-size: 1.8rem; }
  .mood-subhead { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .mood-grid { gap: 0.5rem; }
  .mood-card-label { font-size: 0.8rem; }

  /* Itinerary panel — smaller image headers */
  .mi-act-photo-header { height: 130px; }
  .mi-hero { height: 120px; }
}
