/* ═════════════════════════════════════════════════════════════════════════════
   SHADCN / VERCEL INSPIRED TRAVEL DESIGN SYSTEM
   Clean, typography-driven, subtle borders, high contrast, consumer-grade travel feel
   ═════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');

:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadcn Dark Neutral Base (Zinc/Slate) */
  --background: #09090b;
  --foreground: #fafafa;
  --card: #09090b;
  --card-foreground: #fafafa;
  --card-border: rgba(255, 255, 255, 0.09);
  --popover: #09090b;
  --popover-foreground: #fafafa;
  
  --primary: #fafafa;
  --primary-foreground: #09090b;
  
  --secondary: #18181b;
  --secondary-foreground: #fafafa;
  --secondary-hover: #27272a;
  
  --muted: #18181b;
  --muted-foreground: #a1a1aa;
  --muted-dim: #71717a;
  
  --accent: #27272a;
  --accent-foreground: #fafafa;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --input: rgba(255, 255, 255, 0.12);
  --ring: rgba(250, 250, 250, 0.2);

  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --header-h: 60px;
}

[data-theme="light"] {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --card-border: rgba(0, 0, 0, 0.08);
  
  --primary: #09090b;
  --primary-foreground: #ffffff;
  
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --secondary-hover: #e4e4e7;
  
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --muted-dim: #a1a1aa;
  
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --input: rgba(0, 0, 0, 0.12);
  --ring: rgba(9, 9, 11, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Universal Link Reset — Never let browser default blue links appear */
a, a:visited, a:active {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER NAVIGATION (SHADCN / VERCEL STYLE) ──────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.85);
}

.header-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 10px #3b82f6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── BUTTONS (SHADCN VARIANTS) ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-default {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-default:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--secondary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn-ghost:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.btn-google {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.btn-google:active {
  transform: scale(0.99);
}
[data-theme="dark"] .btn-google {
  background: #18181b;
  color: #f4f4f5;
  border-color: #27272a;
}
[data-theme="dark"] .btn-google:hover {
  background: #27272a;
  border-color: #3f3f46;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

/* ── HERO & SEARCH SECTION ────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px;
}

.hero-section {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted-foreground);
  font-weight: 400;
  line-height: 1.6;
}

/* ── SEARCH PILL (VERCEL / AIRBNB FUSION) ──────────────────── */
.search-bar-wrap {
  max-width: 700px;
  margin: 0 auto 40px;
  background: var(--secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar-wrap:focus-within {
  border-color: var(--foreground);
  box-shadow: 0 0 0 1px var(--foreground);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.9375rem;
}

.search-input::placeholder {
  color: var(--muted-dim);
}

/* ── CATEGORY PILLS ───────────────────────────────────────── */
.category-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pill-item {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.pill-item:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
}

.pill-item.active {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* ── TRAVEL CARDS (LIFESTYLE & SERVICE CENTRIC) ───────────── */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.trip-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
  cursor: pointer;
}

.trip-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.trip-thumb-wrap {
  width: 100%;
  height: 210px;
  position: relative;
  overflow: hidden;
  background: var(--secondary);
}

.trip-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.trip-card:hover .trip-thumb {
  transform: scale(1.03);
}

.trip-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.trip-duration-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trip-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.trip-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--foreground);
}

.trip-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.trip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.trip-author {
  font-size: 0.8125rem;
  color: var(--muted-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── MODALS ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.modal-overlay.active,
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.auth-modal-card {
  position: relative;
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 34px 28px 26px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .auth-modal-card,
.modal-overlay.open .auth-modal-card {
  transform: translateY(0) scale(1);
}

[data-theme="light"] .auth-modal-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-foreground);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

[data-theme="light"] .auth-modal-close {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #555;
}

.auth-modal-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.auth-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--foreground);
}

.auth-modal-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.45;
  margin-bottom: 22px;
}

.auth-google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.auth-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.auth-modal-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .auth-modal-line {
  background: rgba(0, 0, 0, 0.08);
}

.auth-modal-divider span {
  font-size: 0.72rem;
  color: var(--muted-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-quick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

[data-theme="light"] .auth-quick-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.auth-quick-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.auth-quick-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.auth-quick-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-quick-info {
  display: flex;
  flex-direction: column;
}

.auth-quick-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.auth-quick-email {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  line-height: 1.2;
}

.auth-quick-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--foreground);
  font-weight: 500;
}

[data-theme="light"] .auth-quick-pill {
  background: rgba(0, 0, 0, 0.06);
}

.auth-modal-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted-dim);
}

.input-field {
  width: 100%;
  height: 38px;
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  margin-bottom: 14px;
}

.input-field:focus {
  border-color: var(--foreground);
}

/* ── ANIMATIONS & TRANSITIONS ─────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── RESPONSIVE MEDIA QUERIES (MOBILE OPTIMIZATION) ──────── */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .brand-wrap span {
    display: none;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.8125rem;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    padding: 0 8px;
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
  }

  .search-bar-wrap {
    padding: 6px 6px 6px 14px;
    margin-bottom: 28px;
  }

  .travel-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .container {
    padding: 24px 16px;
  }
}


/* --- PLANNER SPECIFIC STYLES --- */
    :root, [data-theme="dark"], html.dark, body.dark, html.theme-dark, body.theme-dark {
      --bg: #09090b;
      --bg-dark: #09090b;
      --background: #09090b;
      --foreground: #fafafa;
      --surface: #121215;
      --surface2: #18181b;
      --surface3: #27272a;
      --border: rgba(255, 255, 255, 0.08);
      --border2: rgba(255, 255, 255, 0.14);
      --text: #fafafa;
      --muted: #a1a1aa;
      --muted2: #71717a;
      --accent: #3b82f6;
      --accent-dim: #2563eb;
      --accent-glow: rgba(59, 130, 246, 0.2);
      --ok: #22c55e;
      --warn: #eab308;
      --danger: #ef4444;
      --danger-dim: #dc2626;
    }

    html, body {
      background-color: var(--bg-dark, #09090b) !important;
      color: var(--foreground, #fafafa) !important;
    }

    [data-theme="light"],
    html[data-theme="light"],
    body[data-theme="light"],
    html.light,
    body.light {
      --bg: #ffffff;
      --bg-dark: #ffffff;
      --background: #ffffff;
      --foreground: #09090b;
      --surface: #f9fafb;
      --surface2: #f4f4f5;
      --surface3: #e4e4e7;
      --border: rgba(0, 0, 0, 0.08);
      --border2: rgba(0, 0, 0, 0.14);
      --text: #09090b;
      --muted: #71717a;
      --muted2: #a1a1aa;
      --accent: #2563eb;
      --accent-dim: #1d4ed8;
      --accent-glow: rgba(37, 99, 235, 0.15);
      --ok: #16a34a;
      --warn: #ca8a04;
      --danger: #dc2626;
      --danger-dim: #b91c1c;
    }

    html[data-theme="light"] body,
    body[data-theme="light"],
    html.light body,
    body.light {
      background-color: #ffffff !important;
      color: #09090b !important;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    html {
      height: 100%;
    }

    body {
      font-family: var(--font-sans, 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
      background: var(--bg);
      color: var(--text);
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    body.app-locked,
    body:has(.two-panel) {
      height: 100dvh;
      overflow: hidden;
    }

    button {
      cursor: pointer;
      font-family: inherit
    }

    input,
    textarea,
    select {
      font-family: inherit;
      font-size: 13px
    }

    ::-webkit-scrollbar {
      width: 6px;
      height: 6px
    }

    ::-webkit-scrollbar-track {
      background: transparent
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border2);
      border-radius: 3px
    }

    /* ── TOPBAR ─────────────────────────────────────────────── */
    .topbar {
      height: 48px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      gap: 0;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 0 12px;
      justify-content: space-between;
      overflow: hidden;
    }

    .topbar-title {
      font-size: .9rem;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      flex-shrink: 0
    }

    .topbar-title .icon {
      font-size: 18px
    }

    .nav-tabs {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 3px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      flex-shrink: 1;
      min-width: 0
    }

    .nav-tab {
      padding: 5px 13px;
      border-radius: 6px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      font-size: 12.5px;
      font-weight: 500;
      transition: all .15s cubic-bezier(0.16, 1, 0.3, 1);
      white-space: nowrap;
      cursor: pointer;
    }

    .nav-tab:hover {
      color: var(--text);
      background: var(--surface3);
    }

    .nav-tab.active {
      background: var(--surface);
      color: var(--text);
      border-color: var(--border);
      box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      flex-shrink: 0
    }

    #mobile-panel-btn {
      display: none;
      align-items: center;
      justify-content: center;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 7px;
      color: var(--text);
      font-size: 18px;
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      margin-left: 6px;
    }

    /* ── VIEWS ──────────────────────────────────────────────── */
    .view {
      flex: 1;
      display: none;
      overflow: hidden;
      min-height: 0
    }

    .view.active {
      display: flex
    }

    .two-panel {
      width: 100%;
      height: 100%
    }

    .view.active.two-panel {
      display: flex
    }

    /* ── LEFT PANEL ─────────────────────────────────────────── */
    .panel {
      width: 360px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      background: var(--surface);
      border-right: 1px solid var(--border);
      position: relative;
      transition: width .2s;
      overflow: visible;
    }

    .panel.collapsed {
      width: 0;
      border-right: none
    }

    .panel.collapsed .panel-inner {
      overflow: hidden;
      pointer-events: none
    }

    .panel.collapsed #planner-panel-toggle {
      transform: translateY(-50%) scaleX(-1)
    }

    #planner-panel-toggle:hover {
      background: var(--surface3);
      color: var(--text)
    }

    .panel-header {
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .panel-header h2 {
      font-size: .85rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .05em
    }

    .panel-body {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden
    }

    .panel-section {
      padding: 12px 14px;
      border-bottom: 1px solid var(--border)
    }

    .panel-section:last-child {
      border-bottom: none
    }

    /* ── MAP CONTAINER ──────────────────────────────────────── */
    .map-wrap {
      flex: 1;
      position: relative;
      min-width: 0
    }

    .map-wrap .leaflet-container {
      width: 100%;
      height: 100%;
      background: var(--bg)
    }

    .leaflet-container {
      background: var(--bg);
      font-family: var(--font-sans);
    }

    [data-theme="dark"] .leaflet-tile-pane {
      filter: invert(100%) hue-rotate(180deg) brightness(88%) contrast(115%) saturate(70%);
    }

    [data-theme="light"] .leaflet-tile-pane {
      filter: saturate(105%) contrast(102%);
    }

    /* ── SHADCN-INSPIRED LEAFLET MAP CONTROLS ── */
    .leaflet-bar {
      border: 1px solid var(--border) !important;
      border-radius: 10px !important;
      box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
      overflow: hidden;
      background: var(--surface) !important;
    }

    .leaflet-bar a,
    .leaflet-bar a:hover {
      background: var(--surface) !important;
      color: var(--text) !important;
      border-bottom: 1px solid var(--border) !important;
      width: 34px !important;
      height: 34px !important;
      line-height: 34px !important;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .leaflet-bar a:last-child {
      border-bottom: none !important;
    }

    .leaflet-bar a:hover {
      background: var(--surface2) !important;
      color: #fff !important;
    }

    /* Modern Popups matching Dashboard */
    .leaflet-popup-content-wrapper {
      background: #121215 !important;
      color: #fafafa !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      border-radius: 14px !important;
      box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6) !important;
      padding: 0 !important;
    }

    [data-theme="light"] .leaflet-popup-content-wrapper {
      background: #ffffff !important;
      color: #09090b !important;
      border: 1px solid rgba(0, 0, 0, 0.1) !important;
      box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.15) !important;
    }

    .leaflet-popup-tip {
      background: #121215 !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    [data-theme="light"] .leaflet-popup-tip {
      background: #ffffff !important;
      border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    .leaflet-popup-content {
      margin: 14px 16px !important;
      line-height: 1.45 !important;
      font-size: 0.85rem !important;
    }

    .leaflet-container a.leaflet-popup-close-button {
      color: var(--muted) !important;
      padding: 6px !important;
      width: 26px !important;
      height: 26px !important;
      top: 8px !important;
      right: 8px !important;
    }

    .leaflet-container a.leaflet-popup-close-button:hover {
      color: var(--text) !important;
    }

    /* Floating Map Toolbar Pill */
    .map-floating-bar {
      position: absolute;
      top: 14px;
      right: 14px;
      z-index: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(18, 18, 21, 0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border);
      padding: 5px 8px;
      border-radius: 9999px;
      box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
    }

    [data-theme="light"] .map-floating-bar {
      background: rgba(255, 255, 255, 0.9);
      box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
    }

    .map-floating-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 9999px;
      font-size: 0.8rem;
      font-weight: 500;
      background: transparent;
      border: 1px solid transparent;
      color: var(--text);
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
      font-family: inherit;
    }

    .map-floating-btn:hover {
      background: var(--surface2);
      border-color: var(--border);
    }

    .map-floating-btn.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    /* ── MAP LAYERS PANEL (SHADCN GLASS) ────────────────────── */
    .map-layers-panel {
      position: absolute;
      top: 54px;
      right: 14px;
      z-index: 550;
      width: 290px;
      background: rgba(18, 18, 21, 0.92);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
      overflow: hidden;
      font-family: var(--font-sans);
      animation: modalFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }

    [data-theme="light"] .map-layers-panel {
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.15);
    }

    .layers-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
    }

    .layers-panel-body {
      padding: 6px;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .layer-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.12s ease;
    }

    .layer-item:hover {
      background: var(--surface2);
    }

    .layer-item-info {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .layer-item-title {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text);
      display: block;
      line-height: 1.2;
    }

    .layer-item-sub {
      font-size: 0.7rem;
      color: var(--muted-foreground);
      display: block;
      line-height: 1.2;
    }

    .layer-item input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: #3b82f6;
      cursor: pointer;
    }

    /* ── ULTRA-MODERN SVG PINPOINT MARKERS ── */
    .modern-pin-wrap {
      position: relative;
      cursor: pointer;
      filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      animation: markerDropIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    .modern-pin-wrap:hover {
      transform: translateY(-4px) scale(1.12);
      z-index: 9999 !important;
    }

    .modern-pin-wrap.selected {
      transform: translateY(-6px) scale(1.18);
      z-index: 10000 !important;
    }

    .pin-pulse-ring {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: 2px solid var(--pin-color, #3b82f6);
      opacity: 0;
      pointer-events: none;
    }

    .modern-pin-wrap.selected .pin-pulse-ring {
      animation: pinPulseRing 1.8s infinite;
    }

    @keyframes pinPulseRing {
      0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.8;
      }
      100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
      }
    }

    @keyframes markerDropIn {
      0% {
        transform: translateY(-24px) scale(0.5);
        opacity: 0;
      }
      100% {
        transform: translateY(0) scale(1);
        opacity: 1;
      }
    }

    /* Route Segment Badge on Map */
    .route-badge-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 11px;
      border-radius: 9999px;
      background: rgba(18, 18, 21, 0.9);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--border);
      color: var(--text);
      font-size: 0.74rem;
      font-weight: 600;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s ease;
      font-family: var(--font-sans);
    }

    [data-theme="light"] .route-badge-pill {
      background: rgba(255, 255, 255, 0.92);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }

    .route-badge-pill:hover {
      background: var(--surface2);
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    }

    .route-badge-pill.route-badge-dimmed {
      opacity: 0.45 !important;
      filter: grayscale(0.4);
      transform: scale(0.95);
      pointer-events: auto;
    }

    .route-badge-pill.route-badge-selected {
      border-color: #38bdf8 !important;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.65) !important;
      transform: scale(1.08);
      background: rgba(14, 165, 233, 0.22) !important;
      z-index: 1000 !important;
    }

    /* ── BUTTONS ────────────────────────────────────────────── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 13px;
      border: 1px solid var(--border2);
      border-radius: 7px;
      background: var(--surface2);
      color: var(--text);
      font-size: 13px;
      font-weight: 500;
      transition: all .12s;
      white-space: nowrap;
    }

    .btn:hover {
      border-color: var(--accent);
      color: var(--accent)
    }

    .btn-primary {
      background: var(--accent-dim);
      border-color: var(--accent-dim);
      color: #fff
    }

    .btn-primary:hover {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff
    }

    .btn-danger {
      border-color: var(--danger-dim)
    }

    .btn-danger:hover {
      background: var(--danger-dim);
      border-color: var(--danger-dim);
      color: #fff
    }

    .btn-sm {
      padding: 4px 10px;
      font-size: 12px;
      border-radius: 5px
    }

    .btn-icon {
      padding: 5px 7px;
      font-size: 14px
    }

    .btn-ghost {
      background: transparent;
      border-color: transparent;
      color: var(--muted)
    }

    .btn-ghost:hover {
      color: var(--text);
      border-color: var(--border2);
      background: var(--surface2)
    }

    /* ── FORM ELEMENTS ──────────────────────────────────────── */
    .field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-bottom: 10px
    }

    .field:last-child {
      margin-bottom: 0
    }

    .field label {
      font-size: 11px;
      color: var(--muted);
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: .04em
    }

    .inp {
      width: 100%;
      padding: 8px 10px;
      font-size: 13px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 6px;
      color: var(--text);
      outline: none;
      transition: border-color .12s;
    }

    .inp:focus {
      border-color: var(--accent)
    }

    .inp::placeholder {
      color: var(--muted2)
    }

    textarea.inp {
      resize: vertical;
      min-height: 72px;
      line-height: 1.5
    }

    select.inp {
      cursor: pointer
    }

    /* ── COLOR SWATCH ───────────────────────────────────────── */
    .color-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap
    }

    .color-swatch {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all .12s;
      flex-shrink: 0;
    }

    .color-swatch.active,
    .color-swatch:hover {
      border-color: #fff;
      transform: scale(1.15)
    }

    .sm-loc-item:last-child {
      border-bottom: none !important
    }

    .sm-loc-item:hover {
      background: var(--surface2) !important
    }

    /* ── TRIP LIST ──────────────────────────────────────────── */
    .trip-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 8px
    }

    .trip-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 9px 10px;
      border-radius: 7px;
      cursor: pointer;
      transition: background .12s;
    }

    .trip-item:hover {
      background: var(--surface2)
    }

    .trip-item.active {
      background: var(--surface2);
      box-shadow: inset 2px 0 0 var(--accent)
    }

    .trip-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0
    }

    .trip-name {
      flex: 1;
      font-size: 13px;
      font-weight: 500;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .trip-count {
      font-size: 11px;
      color: var(--muted2);
      flex-shrink: 0
    }

    /* ── STOP LIST ──────────────────────────────────────────── */
    .stop-list {
      display: flex;
      flex-direction: column;
      padding: 6px 8px
    }

    .stop-card {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      margin-bottom: 4px;
      overflow: hidden;
      transition: border-color .12s;
    }

    .stop-card.selected {
      border-color: var(--accent)
    }

    .stop-card-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      cursor: pointer;
    }

    .stop-card-header:hover {
      background: var(--surface2)
    }

    .stop-num {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
      background: var(--accent-dim);
      color: #fff;
    }

    .stop-card-info {
      flex: 1;
      min-width: 0
    }

    .stop-card-name {
      font-size: 13px;
      font-weight: 500;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .stop-card-date {
      font-size: 11px;
      color: var(--muted);
      margin-top: 1px
    }

    .stop-card-actions {
      display: flex;
      gap: 3px;
      flex-shrink: 0
    }

    .stop-drag-handle {
      color: var(--muted2);
      cursor: grab;
      padding: 4px;
      font-size: 14px
    }

    .stop-card-body {
      padding: 10px;
      border-top: 1px solid var(--border);
      display: none;
      background: var(--surface2)
    }

    .stop-card.expanded .stop-card-body {
      display: block
    }

    /* ── STOP GROUPS ────────────────────────────────────────── */
    .sg-container {
      margin-bottom: 6px
    }

    .sg-header {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 5px 8px 5px 6px;
      border-radius: 8px 8px 8px 8px;
      cursor: pointer;
      user-select: none;
      background: rgba(255, 255, 255, .04);
      border: 1.5px solid rgba(255, 255, 255, .1);
      transition: border-color .15s;
      position: relative;
    }

    .sg-header:hover {
      background: rgba(255, 255, 255, .07)
    }

    .sg-color-bar {
      width: 4px;
      height: 20px;
      border-radius: 2px;
      flex-shrink: 0
    }

    .sg-toggle {
      font-size: 10px;
      color: var(--muted2);
      transition: transform .15s;
      flex-shrink: 0
    }

    .sg-header.collapsed .sg-toggle {
      transform: rotate(-90deg)
    }

    .sg-name-inp {
      flex: 1;
      background: none;
      border: none;
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      outline: none;
      cursor: text;
      min-width: 0;
    }

    .sg-badge {
      font-size: 10px;
      color: var(--muted2);
      background: rgba(255, 255, 255, .06);
      padding: 1px 6px;
      border-radius: 10px;
      flex-shrink: 0;
    }

    .sg-actions {
      display: flex;
      gap: 2px;
      flex-shrink: 0
    }

    .sg-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--muted2);
      font-size: 11px;
      padding: 2px 5px;
      border-radius: 4px;
    }

    .sg-btn:hover {
      background: rgba(255, 255, 255, .08);
      color: var(--text)
    }

    .sg-body {
      padding: 4px 0 0 14px;
      position: relative
    }

    .sg-body::before {
      content: '';
      position: absolute;
      left: 5px;
      top: 0;
      bottom: 8px;
      width: 1.5px;
      background: rgba(255, 255, 255, .1);
      border-radius: 1px;
    }

    .sg-body.collapsed {
      display: none
    }

    .sg-drop-target {
      border: 1.5px dashed rgba(88, 166, 255, .5) !important;
      background: rgba(88, 166, 255, .05) !important
    }

    .insert-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 2px 8px;
      padding: 4px;
      border-radius: 4px;
      border: 1px dashed var(--border2);
      background: transparent;
      color: var(--muted2);
      font-size: 11px;
      gap: 4px;
      cursor: pointer;
      transition: all .12s;
    }

    .insert-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-glow)
    }

    /* ── ROUTE LIST ─────────────────────────────────────────── */
    .route-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 6px;
      background: var(--surface2);
      margin-bottom: 4px;
      cursor: pointer;
      border: 1px solid transparent;
      transition: all 0.2s ease;
      user-select: none;
    }

    .route-item:hover {
      background: var(--surface);
      border-color: var(--border2);
    }

    .route-item.selected {
      background: rgba(56, 189, 248, 0.12) !important;
      border-color: #38bdf8 !important;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    }

    .route-mode-icon {
      font-size: 16px;
      flex-shrink: 0
    }

    .route-info {
      flex: 1;
      font-size: 12px;
      color: var(--muted)
    }

    .route-dist {
      font-size: 11px;
      color: var(--muted2);
      flex-shrink: 0;
      white-space: nowrap
    }

    /* ── STOP CATEGORIES ─────────────────────────────────────── */
    .cat-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 12px;
      font-size: 11px;
      cursor: pointer;
      border: 1px solid var(--border2);
      background: var(--surface2);
      color: var(--muted);
      transition: all .12s;
    }

    .cat-chip:hover {
      border-color: var(--accent);
      color: var(--accent)
    }

    .cat-chip.active {
      background: var(--accent-dim);
      border-color: var(--accent);
      color: #fff
    }

    .stop-cat-badge {
      font-size: 13px;
      line-height: 1
    }

    /* ── CHECKLIST ───────────────────────────────────────────── */
    .check-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 4px 6px;
      border-radius: 5px;
      background: var(--surface2);
      font-size: 12px;
    }

    .check-item input[type=checkbox] {
      accent-color: var(--accent);
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      cursor: pointer
    }

    .check-item label {
      flex: 1;
      cursor: pointer;
      transition: color .12s
    }

    .check-item.done label {
      text-decoration: line-through;
      color: var(--muted2)
    }

    .check-item .remove-check {
      background: none;
      border: none;
      color: var(--muted2);
      cursor: pointer;
      font-size: 12px;
      padding: 0 2px;
      line-height: 1
    }

    .check-item .remove-check:hover {
      color: var(--danger)
    }

    .check-progress {
      font-size: 10px;
      color: var(--muted2);
      margin-left: 4px
    }

    /* ── TRIP STATS BAR ─────────────────────────────────────── */
    .trip-stats {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 14px;
      background: var(--surface3);
      border-bottom: 1px solid var(--border);
      font-size: 11px;
      color: var(--muted);
      flex-wrap: wrap;
    }

    .trip-stats .stat {
      display: flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap
    }

    .trip-stats .stat-icon {
      font-size: 13px
    }

    .trip-stats .stat-val {
      color: var(--text);
      font-weight: 600
    }

    /* ── LIGHTBOX ────────────────────────────────────────────── */
    #lightbox {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .92);
      z-index: 9999;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
    }

    #lightbox.open {
      display: flex
    }

    #lightbox img {
      max-width: 92vw;
      max-height: 90vh;
      border-radius: 8px;
      box-shadow: 0 8px 40px rgba(0, 0, 0, .8);
      object-fit: contain
    }

    #lightbox-close {
      position: absolute;
      top: 14px;
      right: 18px;
      background: rgba(255, 255, 255, .12);
      border: none;
      color: #fff;
      font-size: 20px;
      cursor: pointer;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #lightbox-close:hover, #lightbox-download:hover {
      background: rgba(255,255,255,.25);
    }

    #lightbox-prev,
    #lightbox-next {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(255, 255, 255, .12);
      border: none;
      color: #fff;
      font-size: 22px;
      cursor: pointer;
      border-radius: 50%;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s;
    }

    #lightbox-prev {
      left: 14px
    }

    #lightbox-next {
      right: 14px
    }

    #lightbox-prev:hover,
    #lightbox-next:hover {
      background: rgba(255, 255, 255, .25)
    }

    #lightbox-caption {
      position: absolute;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      color: rgba(255, 255, 255, .7);
      font-size: 12px;
      pointer-events: none;
    }

    /* ── TIMELINE VIEW ───────────────────────────────────────── */
    .timeline-wrap {
      padding: 6px 14px 14px
    }

    .tl-item {
      display: flex;
      gap: 12px;
      padding: 8px 0;
      position: relative
    }

    .tl-item:not(:last-child)::before {
      content: '';
      position: absolute;
      left: 11px;
      top: 28px;
      bottom: 0;
      width: 2px;
      background: var(--border2);
      z-index: 0;
    }

    .tl-dot {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
      z-index: 1;
    }

    .tl-body {
      flex: 1;
      min-width: 0;
      padding-top: 2px
    }

    .tl-title {
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .tl-meta {
      font-size: 11px;
      color: var(--muted);
      margin-top: 1px
    }

    .tl-note {
      font-size: 11px;
      color: var(--muted2);
      margin-top: 3px;
      line-height: 1.5;
      max-height: 44px;
      overflow: hidden
    }

    .tl-checklist {
      margin-top: 4px;
      display: flex;
      flex-direction: column;
      gap: 2px
    }

    .tl-check-item {
      font-size: 10px;
      color: var(--muted2);
      display: flex;
      align-items: center;
      gap: 4px
    }

    .tl-check-item.done {
      text-decoration: line-through;
      opacity: .6
    }

    .tl-thumb {
      width: 44px;
      height: 44px;
      border-radius: 4px;
      object-fit: cover;
      flex-shrink: 0;
      margin-top: 2px
    }

    /* ── ROUTE NOTE ──────────────────────────────────────────── */
    .route-note-text {
      font-size: 10px;
      color: var(--muted2);
      margin-top: 1px;
      font-style: italic
    }

    /* ── PRINT STYLES ────────────────────────────────────────── */
    @media print {
      body>*:not(#print-frame) {
        display: none !important;
      }

      #print-frame {
        display: block !important;
        position: fixed;
        inset: 0;
        background: #fff;
        z-index: 99999;
        overflow: auto;
      }
    }

    #print-frame {
      display: none;
      position: fixed;
      inset: 0;
      background: #fff;
      z-index: 99999;
      overflow: auto;
      color: #111;
      font-family: Georgia, serif;
    }

    .pf-body {
      max-width: 800px;
      margin: 0 auto;
      padding: 32px 24px;
    }

    .pf-trip-title {
      font-size: 26px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .pf-meta {
      font-size: 13px;
      color: #555;
      margin-bottom: 24px;
    }

    .pf-stop {
      break-inside: avoid;
      margin-bottom: 24px;
      padding-bottom: 24px;
      border-bottom: 1px solid #ddd;
    }

    .pf-stop-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px;
    }

    .pf-num {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }

    .pf-stop-title {
      font-size: 16px;
      font-weight: 600;
    }

    .pf-stop-date {
      font-size: 12px;
      color: #666;
      margin-bottom: 4px;
    }

    .pf-stop-note {
      font-size: 13px;
      line-height: 1.6;
      margin-bottom: 8px;
    }

    .pf-checklist {
      padding-left: 20px;
      font-size: 12px;
      line-height: 1.8;
    }

    .pf-route {
      font-size: 12px;
      color: #555;
      margin: 8px 0 8px 0;
      padding: 6px 10px;
      background: #f5f5f5;
      border-radius: 4px;
    }

    .pf-img-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .pf-img-row img {
      width: 120px;
      height: 80px;
      object-fit: cover;
      border-radius: 4px;
    }

    #btn-print-close {
      position: fixed;
      top: 14px;
      right: 18px;
      z-index: 100000;
      background: #222;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 6px 14px;
      cursor: pointer;
      font-size: 13px;
    }

    @media print {
      #btn-print-close {
        display: none !important;
      }
    }

    /* ── BUDGET ──────────────────────────────────────────────── */
    .budget-row {
      display: grid;
      grid-template-columns: auto 1fr 80px 80px 24px;
      align-items: center;
      gap: 6px;
      padding: 4px 0
    }

    .budget-row select {
      font-size: 12px;
      padding: 3px 5px
    }

    .budget-row input[type=text] {
      font-size: 12px
    }

    .budget-row input[type=number] {
      font-size: 12px;
      text-align: right
    }

    .budget-add-btn {
      margin-top: 4px
    }

    .budget-summary {
      display: flex;
      gap: 10px;
      padding: 8px 10px;
      background: var(--surface3);
      border-radius: 6px;
      margin-top: 8px;
      font-size: 12px;
    }

    .budget-summary .bs-col {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1
    }

    .budget-summary .bs-label {
      font-size: 10px;
      color: var(--muted2);
      text-transform: uppercase;
      letter-spacing: .5px
    }

    .budget-summary .bs-val {
      font-size: 14px;
      font-weight: 600
    }

    .budget-summary .bs-val.over {
      color: #f78166
    }

    .budget-summary .bs-val.under {
      color: #3fb950
    }

    .budget-bar-wrap {
      margin-top: 6px;
      height: 5px;
      border-radius: 3px;
      background: var(--border2);
      overflow: hidden
    }

    .budget-bar-fill {
      height: 100%;
      border-radius: 3px;
      background: var(--accent);
      transition: width .3s
    }

    .budget-bar-fill.over {
      background: #f78166
    }

    .trip-budget-badge {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 10px;
      background: var(--surface3);
      color: var(--text)
    }

    /* ── CANVAS VIEW ─────────────────────────────────────────── */
    #view-canvas {
      display: none;
      flex-direction: column;
      overflow: hidden
    }

    #view-canvas.active {
      display: flex
    }

    .canvas-toolbar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      flex-wrap: wrap;
    }

    /* Drawflow dark theme */
    #cv-drawflow-container .drawflow {
      background-color: var(--bg) !important;
      background-image: radial-gradient(circle, rgba(255, 255, 255, .055) 1px, transparent 1px) !important;
      background-size: 26px 26px !important;
    }

    #cv-drawflow-container .drawflow-node {
      background: var(--surface) !important;
      border: 1.5px solid var(--border2) !important;
      border-radius: 10px !important;
      padding: 0 !important;
      min-width: 195px !important;
      box-shadow: 0 3px 12px rgba(0, 0, 0, .45) !important;
      color: var(--text) !important;
    }

    #cv-drawflow-container .drawflow-node.selected {
      border-color: var(--accent) !important;
      box-shadow: 0 0 0 2px rgba(88, 166, 255, .25), 0 3px 12px rgba(0, 0, 0, .45) !important;
    }

    #cv-drawflow-container .drawflow-node .input,
    #cv-drawflow-container .drawflow-node .output {
      width: 10px !important;
      height: 10px !important;
      background: var(--surface2) !important;
      border: 2px solid rgba(88, 166, 255, .5) !important;
      border-radius: 50% !important;
      top: 50% !important;
      margin-top: -5px !important;
    }

    #cv-drawflow-container .drawflow-node .input:hover,
    #cv-drawflow-container .drawflow-node .output:hover {
      background: var(--accent-dim) !important;
      border-color: var(--accent) !important;
    }

    #cv-drawflow-container .connection .main-path {
      stroke-width: 2 !important;
      transition: stroke .15s, stroke-width .15s;
    }

    #cv-drawflow-container .connection .main-path:hover {
      stroke-width: 3 !important
    }

    #cv-drawflow-container svg.connections-svg {
      pointer-events: none
    }

    #cv-drawflow-container .connection {
      pointer-events: all
    }

    /* Stop node inner card */
    .cv-df-stop {
      width: 100%;
      cursor: default
    }

    .cv-df-header {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 7px 10px 6px;
      border-bottom: 1px solid var(--border);
    }

    .cv-df-num {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      font-weight: 700;
      flex-shrink: 0;
      color: #fff;
    }

    .cv-df-name {
      font-size: 12px;
      font-weight: 600;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .cv-df-group-badge {
      font-size: 9px;
      padding: 1px 5px;
      border-radius: 8px;
      flex-shrink: 0;
      white-space: nowrap;
      max-width: 60px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cv-df-body {
      padding: 5px 10px 4px;
      font-size: 11px;
      color: var(--muted2);
      line-height: 1.5
    }

    .cv-df-date {
      margin-bottom: 1px
    }

    .cv-df-note {
      max-height: 28px;
      overflow: hidden;
      font-size: 10px;
      opacity: .8
    }

    .cv-df-progress {
      height: 3px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
      margin: 4px 0 2px
    }

    .cv-df-footer {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 3px 10px 6px;
      font-size: 10px;
      color: var(--muted2);
    }

    .cv-df-thumb {
      width: 28px;
      height: 28px;
      object-fit: cover;
      border-radius: 4px;
      margin-left: auto;
      flex-shrink: 0;
    }

    /* Props panel */
    .cv-props-panel {
      width: 0;
      flex-shrink: 0;
      overflow: hidden;
      background: var(--surface);
      border-left: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      transition: width .18s;
    }

    .cv-props-panel.open {
      width: 290px
    }

    .cv-props-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      font-weight: 600;
      font-size: 13px;
    }

    .cv-props-close {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--muted2);
      font-size: 14px;
      padding: 2px 5px;
      border-radius: 4px;
    }

    .cv-props-close:hover {
      background: var(--surface3);
      color: var(--text)
    }

    .cv-props-body {
      flex: 1;
      overflow-y: auto;
      padding: 10px 12px
    }

    .cv-prop-group {
      margin-bottom: 14px
    }

    .cv-prop-label {
      font-size: 10px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-bottom: 4px;
    }

    .cv-prop-input {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 6px;
      padding: 5px 8px;
      color: var(--text);
      font-size: 12px;
      box-sizing: border-box;
      resize: vertical;
    }

    .cv-prop-input:focus {
      border-color: var(--accent);
      outline: none
    }

    .cv-prop-input.textarea {
      min-height: 70px
    }

    .cv-checklist-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 4px 0;
      border-bottom: 1px solid var(--border);
      font-size: 12px;
    }

    .cv-checklist-item:last-child {
      border-bottom: none
    }

    .cv-checklist-item.done .cv-ci-text {
      text-decoration: line-through;
      color: var(--muted2)
    }

    .cv-checklist-item .cv-ci-del {
      cursor: pointer;
      color: var(--muted2);
      font-size: 10px;
      padding: 1px 3px
    }

    .cv-checklist-item .cv-ci-del:hover {
      color: var(--danger)
    }

    .cv-budget-row {
      display: grid;
      grid-template-columns: 1fr 60px 60px 16px;
      gap: 4px;
      align-items: center;
      margin-bottom: 4px;
      font-size: 11px;
    }

    .cv-budget-row input {
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 4px;
      padding: 3px 5px;
      color: var(--text);
      font-size: 11px;
      width: 100%;
    }

    .cv-budget-row input:focus {
      border-color: var(--accent);
      outline: none
    }

    .cv-budget-del {
      cursor: pointer;
      color: var(--muted2);
      font-size: 10px;
      text-align: center
    }

    .cv-budget-del:hover {
      color: var(--danger)
    }

    .cv-img-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 4px
    }

    .cv-img-thumb {
      width: 58px;
      height: 58px;
      object-fit: cover;
      border-radius: 5px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: border-color .15s;
    }

    .cv-img-thumb:hover {
      border-color: var(--accent)
    }

    .cv-color-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 4px
    }

    .cv-color-dot {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: transform .1s;
      flex-shrink: 0;
    }

    .cv-color-dot:hover,
    .cv-color-dot.active {
      transform: scale(1.2);
      border-color: #fff
    }

    /* ── PANEL RESIZE ────────────────────────────────────────── */
    .panel {
      position: relative
    }

    .panel-resize-handle {
      position: absolute;
      right: -3px;
      top: 0;
      bottom: 0;
      width: 6px;
      cursor: col-resize;
      z-index: 20;
      background: transparent;
      transition: background .15s;
    }

    .panel-resize-handle:hover,
    .panel-resize-handle.dragging {
      background: rgba(88, 166, 255, .35)
    }

    /* ── NEARBY PLACES ───────────────────────────────────────── */
    .nearby-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 4px;
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      cursor: pointer;
      transition: background .1s;
    }

    .nearby-item:hover {
      background: var(--surface3);
      border-radius: 6px
    }

    .nearby-item:last-child {
      border-bottom: none
    }

    .nearby-icon {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--surface3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0
    }

    .nearby-name {
      flex: 1;
      font-weight: 500;
      color: var(--text);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .nearby-dist {
      font-size: 11px;
      color: var(--muted2);
      white-space: nowrap
    }

    .nearby-type {
      font-size: 10px;
      color: var(--muted2);
      margin-top: 1px
    }

    /* ── WEATHER ─────────────────────────────────────────────── */
    .weather-icon {
      font-size: 28px;
      line-height: 1
    }

    .weather-temp {
      font-weight: 700;
      font-size: 16px
    }

    .weather-info {
      display: flex;
      flex-direction: column;
      gap: 2px
    }

    .weather-label {
      font-size: 10px;
      color: var(--muted2);
      text-transform: uppercase;
      letter-spacing: .4px
    }

    /* ── PACKING LIST ────────────────────────────────────────── */
    .pack-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 2px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
    }

    .pack-item:last-child {
      border-bottom: none
    }

    .pack-item input[type=checkbox] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: var(--accent);
      flex-shrink: 0
    }

    .pack-item.done .pack-label {
      text-decoration: line-through;
      color: var(--muted2)
    }

    .pack-label {
      flex: 1;
      color: var(--text)
    }

    .pack-cat {
      font-size: 10px;
      color: var(--muted2);
      background: var(--surface3);
      border-radius: 8px;
      padding: 1px 6px;
      white-space: nowrap
    }

    .pack-del {
      background: none;
      border: none;
      color: var(--muted2);
      font-size: 14px;
      padding: 2px 4px;
      cursor: pointer;
      opacity: 0;
      transition: opacity .12s
    }

    .pack-item:hover .pack-del {
      opacity: 1
    }

    .pack-progress {
      height: 4px;
      border-radius: 2px;
      background: var(--border2);
      margin-top: 6px;
      overflow: hidden
    }

    .pack-progress-fill {
      height: 100%;
      border-radius: 2px;
      background: var(--ok);
      transition: width .3s
    }

    /* ── BUDGET CHART ────────────────────────────────────────── */
    .chart-section {
      padding: 0 0 12px
    }

    .chart-title {
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 8px
    }

    .chart-bar-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 5px;
      font-size: 12px
    }

    .chart-bar-label {
      width: 90px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      color: var(--muted);
      text-align: right;
      flex-shrink: 0
    }

    .chart-bar-track {
      flex: 1;
      height: 16px;
      background: var(--surface3);
      border-radius: 4px;
      overflow: hidden;
      position: relative
    }

    .chart-bar-est {
      height: 100%;
      border-radius: 4px;
      background: var(--accent-dim);
      opacity: .5;
      position: absolute;
      top: 0;
      left: 0
    }

    .chart-bar-act {
      height: 100%;
      border-radius: 4px;
      background: var(--accent);
      position: absolute;
      top: 0;
      left: 0;
      transition: width .4s
    }

    .chart-bar-act.over {
      background: var(--danger)
    }

    .chart-bar-val {
      width: 60px;
      font-size: 11px;
      color: var(--muted);
      text-align: right;
      flex-shrink: 0
    }

    /* ── WIKI IMAGE GRID ─────────────────────────────────────── */
    .wiki-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      margin-top: 8px;
      overflow: hidden
    }

    .wiki-img {
      aspect-ratio: 1;
      object-fit: cover;
      border-radius: 4px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all .12s;
      position: relative;
      display: block;
    }

    .wiki-img.selected {
      border-color: var(--accent)
    }

    .wiki-img:hover {
      opacity: .85
    }

    .wiki-img-wrap {
      position: relative;
      border-radius: 4px;
      overflow: hidden;
      cursor: pointer
    }

    .wiki-img-wrap img {
      width: 100%;
      aspect-ratio: 1;
      object-fit: cover;
      display: block;
      transition: opacity .12s
    }

    .wiki-img-wrap:hover img {
      opacity: .85
    }

    .wiki-img-wrap .wiki-check {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(88, 166, 255, .35);
      opacity: 0;
      transition: opacity .12s;
      font-size: 24px;
    }

    .wiki-img-wrap.selected .wiki-check {
      opacity: 1
    }

    .wiki-img-wrap.selected img {
      border: 2px solid var(--accent)
    }

    .wiki-saved-strip {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 4px
    }

    .wiki-saved-item {
      position: relative;
      width: 60px;
      height: 60px;
      border-radius: 5px;
      overflow: hidden;
      flex-shrink: 0
    }

    .wiki-saved-item img {
      width: 100%;
      height: 100%;
      object-fit: cover
    }

    .wiki-saved-item .remove-wiki {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(0, 0, 0, .75);
      border: none;
      color: #fff;
      font-size: 9px;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      line-height: 1;
    }

    .wiki-saved-item:hover .remove-wiki {
      display: flex
    }

    /* ── IMAGE STRIP ─────────────────────────────────────────── */
    .img-strip {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 6px
    }

    .img-thumb {
      position: relative;
      width: 64px;
      height: 64px;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--border2);
      flex-shrink: 0;
    }

    .img-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover
    }

    .img-thumb .remove-img {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: rgba(0, 0, 0, .7);
      border: none;
      color: #fff;
      font-size: 11px;
      display: none;
      align-items: center;
      justify-content: center;
    }

    .img-thumb:hover .remove-img {
      display: flex
    }

    /* ── EXPERIENCE CARDS ────────────────────────────────────── */
    .exp-group {
      border-bottom: 1px solid var(--border)
    }

    .exp-group-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 14px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      user-select: none;
      background: var(--surface3);
      border-bottom: 1px solid var(--border);
    }

    .exp-group-header:hover {
      background: var(--border)
    }

    .grp-chev {
      color: var(--muted2);
      font-size: 11px;
      transition: transform .15s;
      flex-shrink: 0
    }

    .exp-group-body {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 4px 6px
    }

    .exp-list {
      display: flex;
      flex-direction: column
    }

    .exp-card {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface2);
      overflow: hidden;
      cursor: pointer;
      transition: border-color .12s;
    }

    .exp-card:hover,
    .exp-card.active {
      border-color: var(--accent)
    }

    .exp-card-inner {
      display: flex;
      gap: 10px;
      padding: 10px;
      min-width: 0
    }

    .exp-thumb {
      width: 54px;
      height: 54px;
      border-radius: 6px;
      flex-shrink: 0;
      background: var(--surface3);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--muted2);
      font-size: 20px;
      overflow: hidden;
    }

    .exp-thumb img {
      width: 54px;
      height: 54px;
      object-fit: cover;
      border-radius: 6px;
      display: block;
      flex-shrink: 0
    }

    .exp-thumb img[src=""],
    .exp-thumb img:not([src]) {
      display: none
    }

    .exp-meta {
      flex: 1;
      min-width: 0;
      overflow: hidden
    }

    .exp-title {
      font-size: 13px;
      font-weight: 500;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100%
    }

    .exp-date-city {
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .exp-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 3px;
      margin-top: 5px;
      overflow: hidden
    }

    .tag {
      font-size: 11px;
      padding: 2px 7px;
      border-radius: 10px;
      background: var(--surface3);
      color: var(--muted);
      border: 1px solid var(--border2);
    }

    .tag.match {
      background: rgba(88, 166, 255, .15);
      color: var(--accent);
      border-color: var(--accent-dim)
    }

    /* ── UPLOAD ZONE ─────────────────────────────────────────── */
    .upload-zone {
      border: 2px dashed var(--border2);
      border-radius: 10px;
      padding: 24px;
      text-align: center;
      cursor: pointer;
      transition: all .15s;
      background: var(--surface2);
    }

    .upload-zone:hover,
    .upload-zone.drag-over {
      border-color: var(--accent);
      background: var(--accent-glow)
    }

    .upload-zone .icon {
      font-size: 28px;
      margin-bottom: 8px
    }

    .upload-zone p {
      font-size: 13px;
      color: var(--muted)
    }

    .upload-zone small {
      font-size: 11px;
      color: var(--muted2)
    }

    /* ── IMAGE STAGING OVERLAY ───────────────────────────────── */
    #img-staging {
      position: fixed; inset: 0; z-index: 3000;
      background: var(--bg);
      display: flex; flex-direction: column;
      overflow: hidden;
    }
    #img-staging.hidden { display: none; }
    .staging-topbar {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 16px; border-bottom: 1px solid var(--border2);
      background: var(--surface); flex-shrink: 0; flex-wrap: wrap;
    }
    .staging-topbar h3 { margin: 0; font-size: 15px; flex: 1; min-width: 120px; }
    .staging-grid {
      flex: 1; overflow-y: auto;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 14px; padding: 16px;
      align-content: start;
    }
    .staging-card {
      background: var(--surface2); border-radius: 10px;
      border: 1px solid var(--border2); overflow: hidden;
      display: flex; flex-direction: column;
      position: relative;
    }
    .staging-card-img {
      width: 100%; aspect-ratio: 4/3; object-fit: cover;
      display: block; background: var(--surface);
    }
    .staging-card-body { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
    .staging-card-name { font-size: 11px; color: var(--muted2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .staging-field label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 3px; }
    .staging-tags { display: flex; flex-wrap: wrap; gap: 4px; }
    .staging-tag {
      background: rgba(88,166,255,.15); border: 1px solid rgba(88,166,255,.3);
      color: var(--accent); border-radius: 10px; padding: 2px 7px; font-size: 11px;
      display: flex; align-items: center; gap: 3px;
    }
    .staging-tag-del { cursor: pointer; opacity: .6; font-size: 10px; }
    .staging-tag-del:hover { opacity: 1; }
    .staging-tag-add { display: flex; gap: 5px; margin-top: 4px; }
    .staging-remove-btn {
      position: absolute; top: 6px; right: 6px;
      background: rgba(0,0,0,.55); border: none; color: #fff;
      border-radius: 50%; width: 24px; height: 24px; font-size: 12px;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
    }
    .staging-status { font-size: 11px; color: var(--muted); padding: 6px 0 0; }
    .staging-bottombar {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
      padding: 12px 16px; border-top: 1px solid var(--border2);
      background: var(--surface); flex-shrink: 0;
    }
    .staging-bottombar .exp-sel { flex: 1; min-width: 160px; max-width: 260px; }

    /* ── TIME SLIDER ─────────────────────────────────────────── */
    .time-slider-wrap {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border)
    }

    .time-slider-label {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px
    }

    .time-slider {
      width: 100%;
      accent-color: var(--accent);
      cursor: pointer
    }

    .time-slider-val {
      text-align: center;
      font-size: 12px;
      color: var(--accent);
      font-weight: 500;
      margin-top: 4px
    }

    /* ── FILTER BAR ──────────────────────────────────────────── */
    .filter-bar {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border)
    }

    .filter-row {
      display: flex;
      gap: 6px;
      align-items: center
    }

    .filter-row .inp {
      flex: 1
    }

    /* ── MAP OVERVIEW SIDEBAR ────────────────────────────────── */
    #view-map .panel {
      width: 240px
    }

    .trip-group {
      border-bottom: 1px solid var(--border)
    }

    .trip-group-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
    }

    .trip-group-header:hover {
      background: var(--surface2)
    }

    .trip-group-header .chevron {
      margin-left: auto;
      color: var(--muted2);
      font-size: 12px;
      transition: transform .15s
    }

    .trip-group-header.open .chevron {
      transform: rotate(90deg)
    }

    .trip-group-stops {
      padding: 4px 12px 8px 30px;
      display: none
    }

    .trip-group-header.open+.trip-group-stops {
      display: block
    }

    .trip-stop-row {
      font-size: 12px;
      color: var(--muted);
      padding: 3px 0;
      cursor: pointer
    }

    .trip-stop-row:hover {
      color: var(--text)
    }

    .trip-vis-toggle {
      width: 16px;
      height: 16px;
      border-radius: 3px;
      border: 1px solid var(--border2);
      cursor: pointer;
      flex-shrink: 0
    }

    /* ── MODAL ───────────────────────────────────────────────── */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .7);
      z-index: 9000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open {
      display: flex
    }

    .modal {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 12px;
      max-width: 640px;
      width: 100%;
      max-height: 85vh;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
      display: flex;
      flex-direction: column;
    }

    .modal-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--surface);
      z-index: 1;
      flex-shrink: 0;
    }

    .modal-header h3 {
      font-size: 1rem;
      font-weight: 600
    }

    .modal-body {
      padding: 20px;
      overflow-y: auto;
      overflow-x: hidden;
      flex: 1;
      -webkit-overflow-scrolling: touch
    }

    .modal-footer {
      padding: 12px 20px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      flex-shrink: 0;
      flex-wrap: wrap
    }

    /* ── POPUP ───────────────────────────────────────────────── */
    .leaflet-popup-content-wrapper {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, .5)
    }

    .leaflet-popup-tip {
      background: var(--surface)
    }

    .leaflet-popup-content {
      margin: 0;
      color: var(--text)
    }

    .popup-inner {
      padding: 14px 16px;
      min-width: 200px;
      max-width: 280px
    }

    /* ── Custom stop label (esztétikusabb név a marker felett) ── */
    .leaflet-tooltip {
      background: none !important;
      border: none !important;
      box-shadow: none !important;
      color: #fff !important;
      font-size: 11px !important;
      font-weight: 600 !important;
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.5) !important;
      padding: 0 4px !important;
      margin: 0 !important;
      white-space: nowrap !important;
      text-align: center !important;
      pointer-events: none !important;
    }

    .leaflet-tooltip::before {
      display: none !important;
    }

    .leaflet-tooltip-top {
      margin-top: 0 !important;
    }

    .leaflet-tooltip-top::before {
      display: none !important;
    }

    /* ── OVERVIEW HUB MARKER ─────────────────────────────────── */
    .hub-marker {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      border: 3px solid rgba(255, 255, 255, .35);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
      transition: transform .2s, opacity .3s, box-shadow .2s, filter .3s;
      user-select: none;
      animation: hubAppear .4s cubic-bezier(.34, 1.56, .64, 1) both;
    }

    .hub-marker:not(.dim):hover {
      transform: scale(1.13);
      box-shadow: 0 6px 22px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .12);
    }

    .hub-marker.dim {
      opacity: .28;
      filter: grayscale(.7);
      pointer-events: none
    }

    .hub-marker-name {
      font-size: 10px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 90px;
      text-align: center;
      margin-top: 1px;
      text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
      line-height: 1.2
    }

    .hub-marker-count {
      font-size: 13px;
      font-weight: 700;
      line-height: 1.2;
      text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
      text-align: center
    }

    @keyframes hubAppear {
      from {
        opacity: 0;
        transform: scale(0.4)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    @keyframes markerPopIn {
      0% {
        opacity: 0;
        transform: scale(0.2) translateY(6px)
      }

      70% {
        transform: scale(1.15) translateY(-2px)
      }

      100% {
        opacity: 1;
        transform: scale(1) translateY(0)
      }
    }

    .popup-title {
      font-size: .9rem;
      font-weight: 600;
      margin-bottom: 4px
    }

    .popup-row {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 3px;
      display: flex;
      gap: 6px
    }

    .popup-imgs {
      display: flex;
      gap: 4px;
      margin-top: 8px;
      flex-wrap: wrap
    }

    .popup-imgs img {
      width: 60px;
      height: 60px;
      border-radius: 5px;
      object-fit: cover;
      cursor: pointer
    }

    .popup-actions {
      margin-top: 10px;
      display: flex;
      gap: 6px
    }

    /* ── TOAST ───────────────────────────────────────────────── */
    #toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 9999;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 13px;
      color: var(--text);
      box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
      transform: translateY(20px);
      opacity: 0;
      transition: all .25s;
      pointer-events: none;
      max-width: 300px;
    }

    #toast.show {
      transform: translateY(0);
      opacity: 1
    }

    #toast.ok {
      border-color: var(--ok);
      color: var(--ok)
    }

    #toast.err {
      border-color: var(--danger);
      color: var(--danger)
    }

    /* ── LOADING SPINNER ─────────────────────────────────────── */
    .spinner {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid var(--border2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .6s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* ── ADD MODE INDICATOR ──────────────────────────────────── */
    .add-mode-banner {
      position: absolute;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 500;
      background: var(--accent-dim);
      color: #fff;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 500;
      pointer-events: none;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
      display: none;
    }

    .add-mode-banner.visible {
      display: block
    }

    /* ── EXPERIENCE DETAIL ───────────────────────────────────── */
    .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
      gap: 8px;
      overflow: hidden
    }

    .gallery-item {
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      aspect-ratio: 1;
      min-width: 0;
      width: 100%
    }

    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      max-width: 100%;
      max-height: 100%
    }

    .gallery-item .img-tags {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 4px 6px;
      background: linear-gradient(transparent, rgba(0, 0, 0, .7));
      display: flex;
      gap: 3px;
      flex-wrap: wrap;
    }

    .gallery-item .img-tags .tag {
      font-size: 10px;
      padding: 1px 5px;
      background: rgba(0, 0, 0, .5)
    }

    .gallery-remove-btn {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(0, 0, 0, .75);
      border: none;
      color: #fff;
      font-size: 11px;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      display: flex;
      opacity: 0;
      transition: opacity .15s;
    }

    .gallery-item:hover .gallery-remove-btn {
      opacity: 1
    }

    /* ── EMPTY STATE ─────────────────────────────────────────── */
    .empty-state {
      padding: 32px 16px;
      text-align: center;
      color: var(--muted)
    }

    .empty-state .icon {
      font-size: 32px;
      margin-bottom: 10px
    }

    .empty-state p {
      font-size: 13px
    }

    /* ── INLINE EDIT ─────────────────────────────────────────── */
    .editable {
      cursor: text;
      border-bottom: 1px dashed transparent;
      transition: border-color .12s
    }

    .editable:hover {
      border-color: var(--muted2)
    }

    .editable:focus {
      outline: none;
      border-color: var(--accent)
    }

    /* ── STATUS PILL ─────────────────────────────────────────── */
    .status-pill {
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 10px;
      border: 1px solid var(--border2);
      color: var(--muted2);
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    /* ── VIEW MODES (list / grid / masonry) ──────────────────── */
    .exp-list.exp-view-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 6px;
      padding: 6px;
    }

    .exp-list.exp-view-grid .exp-group {
      grid-column: 1 / -1;
    }

    .exp-list.exp-view-grid .exp-group-body {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 6px;
      padding: 4px 0;
    }

    .exp-list.exp-view-grid .exp-card-inner {
      flex-direction: column;
      padding: 0;
    }

    .exp-list.exp-view-grid .exp-thumb {
      width: 100%;
      height: 120px;
      border-radius: 6px 6px 0 0;
    }

    .exp-list.exp-view-grid .exp-meta {
      padding: 6px 8px 8px;
    }

    .exp-list.exp-view-grid .exp-title {
      font-size: 12px;
    }

    .exp-list.exp-view-masonry {
      column-count: 2;
      column-gap: 8px;
      padding: 6px;
      break-inside: avoid;
    }

    .exp-list.exp-view-masonry .exp-group {
      break-inside: avoid;
      margin-bottom: 8px;
    }

    .exp-list.exp-view-masonry .exp-group-body {
      column-count: 2;
      column-gap: 6px;
      break-inside: avoid;
    }

    .exp-list.exp-view-masonry .exp-card-inner {
      flex-direction: column;
      padding: 0;
      break-inside: avoid;
    }

    .exp-list.exp-view-masonry .exp-thumb {
      width: 100%;
      height: auto;
      aspect-ratio: auto;
      border-radius: 6px 6px 0 0;
      min-height: 80px;
    }

    .exp-list.exp-view-masonry .exp-meta {
      padding: 5px 8px 7px;
    }

    .exp-list.exp-view-masonry .exp-title {
      font-size: 12px;
    }

    /* ── CALENDAR VIEW ──────────────────────────────────────── */
    .exp-list.exp-view-calendar {
      display: block;
    }

    .exp-calendar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      font-weight: 600;
    }

    .exp-calendar-nav {
      display: flex;
      gap: 6px;
    }

    .exp-calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 0;
      font-size: 11px;
    }

    .exp-calendar-cell {
      border-bottom: 1px solid var(--border);
      border-right: 1px solid var(--border);
      min-height: 56px;
      padding: 3px 4px;
      position: relative;
      cursor: pointer;
      transition: background .1s;
    }

    .exp-calendar-cell:nth-child(7n) {
      border-right: none;
    }

    .exp-calendar-cell:hover {
      background: var(--surface2);
    }

    .exp-calendar-cell.other-month {
      color: var(--muted2);
      background: rgba(255, 255, 255, .02);
    }

    .exp-calendar-cell.today {
      background: rgba(88, 166, 255, .12);
    }

    .exp-calendar-day {
      font-size: 10px;
      font-weight: 600;
      margin-bottom: 2px;
    }

    .exp-calendar-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 2px;
    }

    /* ── RESPONSIVE ──────────────────────────────────────────── */
    @media(max-width:700px) {

      /* Topbar */
      .topbar {
        padding: 0 8px;
        gap: 4px
      }

      .topbar-title {
        font-size: 13px
      }

      .topbar-title .icon {
        display: none
      }

      .nav-tab {
        padding: 7px 8px;
        font-size: 11px;
        gap: 3px
      }

      .status-bar {
        display: none
      }

      /* Mobile panel toggle button */
      #mobile-panel-btn {
        display: flex
      }

      /* Panel as fixed overlay over everything */
      .panel {
        width: 85%;
        max-width: 360px;
        position: fixed;
        left: 0;
        top: 48px;
        bottom: 0;
        z-index: 400;
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(.4, 0, .2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .panel.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, .6)
      }

      .map-wrap {
        width: 100% !important;
        flex: 1
      }

      #view-map .panel {
        width: 85%;
        max-width: 360px
      }

      /* Modals: full screen on mobile */
      .modal-overlay {
        align-items: flex-start;
        padding: 0 !important
      }

      .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0;
      }

      .modal-body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100dvh - 56px - 52px);
      }

      /* Touch targets */
      .btn {
        min-height: 38px
      }

      .btn-sm {
        min-height: 32px
      }

      .btn-icon {
        min-width: 36px;
        min-height: 36px
      }

      .inp {
        font-size: 16px !important
      }

      /* prevents iOS zoom on focus */
      select.inp {
        font-size: 16px !important
      }

      textarea.inp {
        font-size: 16px !important
      }

      /* Stop & route cards */
      .stop-card-actions .btn-icon {
        min-width: 40px;
        min-height: 40px
      }

      .route-item {
        flex-wrap: wrap;
        gap: 6px
      }

      .route-dist {
        width: 100%;
        text-align: left;
        padding-left: 28px
      }

      /* Trip list */
      .trip-item {
        padding: 10px 12px
      }

      /* Experience list */
      .exp-card-inner {
        gap: 8px
      }

      .exp-thumb {
        width: 52px;
        height: 52px
      }

      /* Gallery grid */
      .gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px
      }

      .gallery-item {
        min-width: 0
      }

      /* Budget rows */
      .budget-row {
        grid-template-columns: 1fr 1fr;
        gap: 4px
      }

      .budget-row select {
        grid-column: 1/-1
      }

      .budget-row input[type=text] {
        grid-column: 1/-1
      }

      /* Timeline */
      .tl-thumb {
        width: 36px;
        height: 36px
      }

      /* Checklist */
      .check-item {
        padding: 6px 8px
      }

      /* Wiki grid */
      .wiki-grid {
        grid-template-columns: repeat(2, 1fr)
      }

      /* Trip stats */
      .trip-stats {
        font-size: 10px;
        gap: 8px;
        padding: 5px 10px
      }

      .trip-stats .stat-icon {
        font-size: 11px
      }

      /* Lightbox nav */
      #lightbox-prev {
        left: 6px
      }

      #lightbox-next {
        right: 6px
      }

      #lightbox img {
        max-width: 100vw;
        max-height: 85vh
      }

      /* Print frame */
      #print-frame .pf-body {
        padding: 16px 12px
      }

      /* Exp filter bar */
      .filter-bar {
        flex-direction: column;
        gap: 6px
      }

      .filter-row {
        flex-wrap: wrap
      }

      .time-slider-wrap {
        padding: 8px 10px
      }
    }


      /* ═══════════════════════════════════════════════════════════
         TRAVEL WIZARD & LIVE CO-PILOT STYLES
      ════════════════════════════════════════════════════════════ */
      .travel-wizard-overlay {
        position: fixed;
        inset: 0;
        background: rgba(9, 9, 11, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        z-index: 1000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        opacity: 0;
        transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      }

      .travel-wizard-overlay.open {
        display: flex;
        opacity: 1;
      }

      .wizard-window {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 18px;
        width: 100%;
        max-width: 1100px;
        height: 90vh;
        max-height: 820px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
        position: relative;
      }

      .wizard-header {
        padding: 18px 24px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.02);
      }

      .wizard-steps {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .wizard-step-dot {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        background: var(--surface2);
        color: var(--muted);
        border: 1px solid var(--border);
        transition: all 0.2s ease;
      }

      .wizard-step-dot.active {
        background: #3b82f6;
        color: #ffffff;
        border-color: #3b82f6;
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
      }

      .wizard-step-dot.completed {
        background: rgba(16, 185, 129, 0.15);
        color: #10b981;
        border-color: #10b981;
      }

      .wizard-body {
        flex: 1;
        overflow-y: auto;
        padding: 24px;
        position: relative;
      }

      .wizard-footer {
        padding: 16px 24px;
        border-top: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.015);
      }

      /* Step 2 Attraction Cards */
      .wizard-attraction-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
      }

      .wizard-attraction-card {
        background: var(--surface2);
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
        display: flex;
        flex-direction: column;
      }

      .wizard-attraction-card:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
      }

      .wizard-attraction-card.selected {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.05);
        box-shadow: 0 0 0 1px #3b82f6;
      }

      .wizard-attraction-card .check-circle {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.55);
        border: 1.5px solid rgba(255, 255, 255, 0.6);
        color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        z-index: 2;
        transition: all 0.2s;
      }

      .wizard-attraction-card.selected .check-circle {
        background: #3b82f6;
        border-color: #3b82f6;
        color: #ffffff;
      }

      /* Step 4 Animation Screen */
      .wizard-anim-container {
        position: absolute;
        inset: 0;
        background: #000;
        display: flex;
        flex-direction: column;
      }

      .wizard-anim-map {
        flex: 1;
        width: 100%;
        height: 100%;
      }

      .wizard-anim-overlay {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 20px;
        pointer-events: none;
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
      }

      .wizard-anim-hud {
        background: rgba(9, 9, 11, 0.85);
        backdrop-filter: blur(12px);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px 18px;
        color: #fff;
        max-width: 320px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
      }

      .wizard-anim-bottom {
        position: absolute;
        bottom: 24px;
        left: 24px;
        right: 24px;
        z-index: 1000;
        background: rgba(9, 9, 11, 0.85);
        backdrop-filter: blur(12px);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 16px 20px;
        color: #fff;
      }

      .wizard-anim-bar-track {
        height: 5px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        overflow: hidden;
        margin-top: 10px;
      }

      .wizard-anim-bar-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #3b82f6, #10b981);
        border-radius: 6px;
        transition: width 0.1s linear;
      }

      /* Co-Pilot Live Mode Widgets */
      .copilot-active-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(16, 185, 129, 0.15);
        border: 1px solid rgba(16, 185, 129, 0.4);
        color: #10b981;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
      }

      .copilot-ahead {
        background: rgba(16, 185, 129, 0.12);
        border-color: rgba(16, 185, 129, 0.3);
        color: #10b981;
      }

      .copilot-delayed {
        background: rgba(239, 68, 68, 0.12);
        border-color: rgba(239, 68, 68, 0.3);
        color: #ef4444;
      }

      /* ── SMART TRAVEL FEATURES (TRAVELHUB 2.0) ─────────────────── */
      .dress-code-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: rgba(245, 158, 11, 0.12);
        color: #f59e0b;
        border: 1px solid rgba(245, 158, 11, 0.3);
        padding: 2px 7px;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 600;
      }

      .transit-tip-item {
        padding: 8px 12px;
        background: rgba(59, 130, 246, 0.08);
        border: 1px dashed rgba(59, 130, 246, 0.35);
        border-radius: 8px;
        font-size: 0.75rem;
        color: #93c5fd;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .gastro-gap-btn {
        font-size: 0.75rem;
        color: #10b981;
        background: rgba(16, 185, 129, 0.08);
        border: 1px dashed rgba(16, 185, 129, 0.35);
        padding: 4px 12px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        transition: all 0.15s ease;
      }

      .gastro-gap-btn:hover {
        background: rgba(16, 185, 129, 0.18);
        border-color: rgba(16, 185, 129, 0.6);
        color: #34d399;
      }

      .pacing-alert {
        color: #f59e0b;
        background: rgba(245, 158, 11, 0.12);
        border: 1px solid rgba(245, 158, 11, 0.3);
        padding: 3px 8px;
        border-radius: 6px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
      }

      .fab-expense {
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 2500;
        height: 46px;
        padding: 0 18px;
        border-radius: 24px;
        background: linear-gradient(135deg, #10b981, #059669);
        color: #fff;
        border: none;
        font-weight: 700;
        font-size: 0.875rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
        cursor: pointer;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
      }

      .fab-expense:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
      }

      .fab-expense:active {
        transform: translateY(0);
      }

      .fun-fact-card {
        padding: 10px 12px;
        background: rgba(168, 85, 247, 0.08);
        border: 1px solid rgba(168, 85, 247, 0.25);
        border-radius: 8px;
        font-size: 0.78rem;
        color: #e9d5ff;
        line-height: 1.45;
      }

      .glass-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 3000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 16px;
        animation: fadeIn 0.15s ease;
      }

      .glass-modal-overlay.active {
        display: flex;
      }

      .glass-modal-card {
        background: #18181b;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        width: 100%;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
        overflow: hidden;
        position: relative;
        animation: scaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
      }


