/* ============================================
   KANSAI TRIP 2026 — STYLE SYSTEM
   Art Direction: Seto Inland Sea + Japanese Minimalism
   Palette: Calm ocean blues, warm sand neutrals, indigo ink
   ============================================ */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;700&family=Noto+Sans+TC:wght@300;400;500;600&display=swap');

/* ---- DESIGN TOKENS ---- */
:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Noto Serif TC', 'Georgia', serif;
  --font-body: 'Noto Sans TC', 'Helvetica Neue', sans-serif;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
}

/* ---- LIGHT MODE (Warm Sand + Ocean Blue) ---- */
:root, [data-theme='light'] {
  --color-bg: #f5f3ef;
  --color-surface: #faf9f6;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ede9e3;
  --color-surface-offset-2: #e5e0d8;
  --color-surface-dynamic: #d9d4cb;
  --color-divider: #d0cac1;
  --color-border: #c8c2b8;

  --color-text: #1a1814;
  --color-text-muted: #6b6760;
  --color-text-faint: #a8a49e;
  --color-text-inverse: #f5f3ef;

  /* Primary: Deep Ocean Teal */
  --color-primary: #1b6b7a;
  --color-primary-hover: #135261;
  --color-primary-active: #0d3d48;
  --color-primary-highlight: #ccdde0;
  --color-primary-soft: #e4eff1;

  /* Accent: Indigo Ink */
  --color-accent: #2d4b8e;
  --color-accent-hover: #1e3572;
  --color-accent-soft: #dde3f3;

  /* Warm: Awaji Sunset */
  --color-warm: #c4631a;
  --color-warm-hover: #a3521a;
  --color-warm-soft: #fae3d0;

  /* Backup badge: Soft Sage */
  --color-backup: #4a7c59;
  --color-backup-soft: #d8ece0;

  /* Shadows (warm-toned) */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);
}

/* ---- DARK MODE ---- */
[data-theme='dark'] {
  --color-bg: #151412;
  --color-surface: #1a1917;
  --color-surface-2: #1f1e1b;
  --color-surface-offset: #1c1b18;
  --color-surface-offset-2: #22211e;
  --color-surface-dynamic: #2c2b28;
  --color-divider: #252420;
  --color-border: #363430;

  --color-text: #cac8c4;
  --color-text-muted: #7a7874;
  --color-text-faint: #52504c;
  --color-text-inverse: #1a1917;

  --color-primary: #5ba8b8;
  --color-primary-hover: #3d8ea0;
  --color-primary-active: #2a7080;
  --color-primary-highlight: #253438;
  --color-primary-soft: #1e2e31;

  --color-accent: #7b9be0;
  --color-accent-hover: #5980cf;
  --color-accent-soft: #232840;

  --color-warm: #e8884a;
  --color-warm-hover: #d46e2e;
  --color-warm-soft: #3a2618;

  --color-backup: #6fb880;
  --color-backup-soft: #1d3025;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #151412;
    --color-surface: #1a1917;
    --color-surface-2: #1f1e1b;
    --color-surface-offset: #1c1b18;
    --color-surface-offset-2: #22211e;
    --color-surface-dynamic: #2c2b28;
    --color-divider: #252420;
    --color-border: #363430;
    --color-text: #cac8c4;
    --color-text-muted: #7a7874;
    --color-text-faint: #52504c;
    --color-text-inverse: #1a1917;
    --color-primary: #5ba8b8;
    --color-primary-hover: #3d8ea0;
    --color-primary-active: #2a7080;
    --color-primary-highlight: #253438;
    --color-primary-soft: #1e2e31;
    --color-accent: #7b9be0;
    --color-accent-hover: #5980cf;
    --color-accent-soft: #232840;
    --color-warm: #e8884a;
    --color-warm-hover: #d46e2e;
    --color-warm-soft: #3a2618;
    --color-backup: #6fb880;
    --color-backup-soft: #1d3025;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
  }
}

/* ============================================
   LAYOUT
   ============================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  z-index: 1000;
  border-radius: var(--radius-md);
}
.skip-link:focus { top: var(--space-2); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.5);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-logo {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-logo-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.site-logo-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid transparent;
}

.btn-icon:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-border) l c h / 0.4);
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero {
  background: linear-gradient(
    160deg,
    var(--color-primary-soft) 0%,
    var(--color-surface) 60%
  );
  padding: var(--space-8) var(--space-4) var(--space-6);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.15;
}

.hero-dates {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.trip-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.trip-stat {
  text-align: center;
}

.trip-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.trip-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   DAY NAVIGATION TABS
   ============================================ */
.day-nav-container {
  position: sticky;
  top: 57px;
  z-index: 90;
  background: var(--color-surface);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.4);
  box-shadow: var(--shadow-sm);
}

.day-nav {
  max-width: var(--content-default);
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 var(--space-2);
}

.day-nav::-webkit-scrollbar { display: none; }

.day-tab {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  min-width: 64px;
  border-radius: 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-interactive), border-color var(--transition-interactive);
}

.day-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.day-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.day-tab-number {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.day-tab-date {
  font-size: 0.65rem;
  opacity: 0.8;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.day-panel {
  display: none;
  animation: fadeSlideIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.day-panel.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DAY HEADER
   ============================================ */
.day-header {
  margin-bottom: var(--space-6);
}

.day-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.day-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

.day-location-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
  white-space: nowrap;
}

.day-summary {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 65ch;
}

/* ============================================
   TRANSPORT INFO BAR
   ============================================ */
.transport-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.transport-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

.transport-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.transport-text span {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--color-primary-highlight),
    var(--color-divider)
  );
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  z-index: 1;
  transition: transform var(--transition-interactive);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  background: var(--color-primary);
}

.timeline-item.highlight .timeline-dot {
  background: var(--color-primary);
  width: 16px;
  height: 16px;
  left: -27px;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.timeline-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive);
}

.timeline-card:hover { box-shadow: var(--shadow-md); }

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.timeline-card-header:hover {
  background: var(--color-surface-offset);
}

.timeline-card-left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.timeline-time {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 2px;
  min-width: 42px;
}

.timeline-title-area {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.timeline-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  line-height: 1.4;
}

.timeline-chevron {
  color: var(--color-text-faint);
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
}

.timeline-item.expanded .timeline-chevron {
  transform: rotate(180deg);
}

.timeline-card-body {
  display: none;
  padding: 0 var(--space-4) var(--space-4);
  border-top: 1px solid oklch(from var(--color-divider) l c h / 0.5);
}

.timeline-item.expanded .timeline-card-body {
  display: block;
  animation: fadeSlideIn 200ms ease both;
}

.timeline-detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-3);
}

.timeline-detail ul {
  list-style: none;
  margin-top: var(--space-2);
}

.timeline-detail ul li {
  padding: var(--space-1) 0;
  padding-left: var(--space-4);
  position: relative;
  max-width: 100%;
}

.timeline-detail ul li::before {
  content: '•';
  position: absolute;
  left: var(--space-2);
  color: var(--color-primary);
  font-weight: 700;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
}

.map-link:hover {
  background: var(--color-primary-highlight);
  color: var(--color-primary-active);
}

.booking-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-warm);
  background: var(--color-warm-soft);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
}

/* ============================================
   SECTION CARDS (Restaurants, Backup)
   ============================================ */
.section-card {
  margin-bottom: var(--space-6);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.section-card-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 16px;
  flex-shrink: 0;
}

.section-card-icon.food { background: var(--color-warm-soft); }
.section-card-icon.backup { background: var(--color-backup-soft); }
.section-card-icon.tip { background: var(--color-primary-soft); }

.section-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
}

/* Restaurant Cards */
.restaurant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .restaurant-grid { grid-template-columns: repeat(2, 1fr); }
}

.restaurant-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive);
}

.restaurant-card:hover { box-shadow: var(--shadow-md); }

.restaurant-meal {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-warm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.restaurant-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.restaurant-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.restaurant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.tag {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-border) l c h / 0.3);
}

.restaurant-map-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.restaurant-map-link:hover { color: var(--color-primary-hover); }

/* Backup / Alternative Items */
.backup-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.backup-item {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-backup) l c h / 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}

.backup-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-backup);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.backup-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-backup);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.backup-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.backup-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Tip Items */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tip-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.3);
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.tip-emoji {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.5;
}

.tip-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.tip-text strong { color: var(--color-text); font-weight: 600; }

/* ============================================
   MAP SECTION
   ============================================ */
.map-section {
  margin-bottom: var(--space-6);
}

.map-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.map-pins-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

@media (min-width: 480px) {
  .map-pins-grid { grid-template-columns: repeat(3, 1fr); }
}

.map-pin-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-interactive);
}

.map-pin-btn:hover {
  background: var(--color-primary-soft);
  border-color: oklch(from var(--color-primary) l c h / 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.map-pin-icon {
  font-size: 18px;
}

.map-pin-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.map-pin-type {
  font-size: 0.65rem;
  color: var(--color-text-faint);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: var(--space-12);
  padding: var(--space-8) var(--space-4);
  border-top: 1px solid oklch(from var(--color-border) l c h / 0.4);
  text-align: center;
}

.footer-text {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================
   BOTTOM NAVIGATION (Mobile)
   ============================================ */
.bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: var(--color-surface);
    border-top: 1px solid oklch(from var(--color-border) l c h / 0.5);
    padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom));
    gap: var(--space-2);
    justify-content: space-around;
  }

  .main-content {
    padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom));
  }
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-faint);
  font-size: 0.6rem;
  font-weight: 500;
  min-width: 56px;
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.bottom-nav-btn.active {
  color: var(--color-primary);
}

.bottom-nav-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* ============================================
   WEATHER/INFO BANNER
   ============================================ */
.info-banner {
  background: var(--color-primary-soft);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.info-banner-icon { font-size: 20px; flex-shrink: 0; }

.info-banner-content {}

.info-banner-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.info-banner-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   VIEW TOGGLES (Itinerary / Map / Info)
   ============================================ */
.view-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.view-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
}

.view-tab-btn.active {
  background: var(--color-surface-2);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.view-tab-btn:hover:not(.active) {
  color: var(--color-text);
  background: var(--color-surface-dynamic);
}

.view-panel { display: none; }
.view-panel.active { display: block; }

/* ============================================
   OVERVIEW PAGE
   ============================================ */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.overview-day-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-interactive);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  -webkit-tap-highlight-color: transparent;
}

.overview-day-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: oklch(from var(--color-primary) l c h / 0.3);
}

.overview-day-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding-top: 2px;
}

.overview-day-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.overview-day-label {
  font-size: 0.6rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overview-day-divider {
  width: 1px;
  align-self: stretch;
  background: oklch(from var(--color-border) l c h / 0.4);
  flex-shrink: 0;
}

.overview-day-content {
  flex: 1;
  min-width: 0;
}

.overview-day-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}

.overview-day-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.overview-day-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.highlight-tag {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
}

.overview-day-arrow {
  color: var(--color-text-faint);
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform var(--transition-interactive), color var(--transition-interactive);
}

.overview-day-card:hover .overview-day-arrow {
  transform: translateX(3px);
  color: var(--color-primary);
}

/* ============================================
   TRIP INFO SECTION
   ============================================ */
.trip-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .trip-info-grid { grid-template-columns: repeat(2, 1fr); }
}

.info-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.info-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.info-card-title-icon { font-size: 16px; }

.info-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid oklch(from var(--color-divider) l c h / 0.4);
  font-size: var(--text-xs);
}

.info-item:last-child { border-bottom: none; }

.info-item-label { color: var(--color-text-muted); }
.info-item-value { color: var(--color-text); font-weight: 500; text-align: right; }

/* ============================================
   SWIPE HINT
   ============================================ */
.swipe-hint {
  display: none;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding: var(--space-2);
  margin-bottom: var(--space-4);
  animation: pulse 2s ease-in-out 1s 3;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 640px) {
  .swipe-hint { display: block; }
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 480px) {
  .trip-stats { gap: var(--space-4); }
  .hero { padding: var(--space-6) var(--space-4) var(--space-4); }
  .hero-title { font-size: clamp(1.5rem, 1.2rem + 2vw, 2rem); }
}

@media (min-width: 768px) {
  .restaurant-grid { grid-template-columns: repeat(2, 1fr); }
  .map-pins-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   MAP EMBED (iframe + chip list)
   ============================================ */

.map-embed-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-3);
  background: var(--color-surface-offset);
}

.map-embed {
  display: block;
  width: 100%;
  height: 320px;
  border: none;
  filter: none;
}

@media (min-width: 600px) {
  .map-embed { height: 400px; }
}

[data-theme='dark'] .map-embed {
  filter: invert(0.9) hue-rotate(175deg) saturate(0.85);
}

.map-open-full {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-inverse);
  background: oklch(0.2 0.01 200 / 0.82);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--transition-interactive);
  white-space: nowrap;
}

.map-open-full:hover {
  background: oklch(0.15 0.01 200 / 0.95);
  color: var(--color-text-inverse);
}

/* ── Location chip list ── */
.map-chips-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.map-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-interactive);
  -webkit-tap-highlight-color: transparent;
}

.map-chip:hover {
  background: var(--color-primary-soft);
  border-color: oklch(from var(--color-primary) l c h / 0.3);
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.map-chip-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  line-height: 1;
}

.map-chip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.map-chip-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.map-chip-type {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.map-chip-ext {
  flex-shrink: 0;
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}

.map-chip:hover .map-chip-ext {
  color: var(--color-primary);
}

/* Map chip active state (clicked) */
.map-chip.active {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.map-chip.active .map-chip-name,
.map-chip.active .map-chip-type {
  color: #fff;
}
.map-chip.active .map-chip-ext {
  stroke: rgba(255,255,255,0.8);
}

/* ── Leaflet Map ─────────────────────────────────────────────────────────── */
.leaflet-map {
  height: 340px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  /* Contain Leaflet's internal z-index stack so it never bleeds above the sticky tab bars */
  isolation: isolate;
  z-index: 0;
  position: relative;
}
/* Force all Leaflet internal layers to stay within the map's stacking context */
.leaflet-map .leaflet-pane,
.leaflet-map .leaflet-control-container {
  z-index: 1 !important;
}
.leaflet-map .leaflet-control-zoom {
  z-index: 2 !important;
}
@media (min-width: 600px) {
  .leaflet-map { height: 400px; }
}

/* Custom pin marker */
.lf-marker {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--color-primary, #1b6b7a);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
.lf-marker-active {
  background: var(--color-accent, #2d4b8e);
  transform: rotate(-45deg) scale(1.3);
}

/* Leaflet popup style override */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content {
  margin: 10px 14px !important;
  line-height: 1.5 !important;
}

/* Dark mode tile inversion for Leaflet */
[data-theme='dark'] .leaflet-map .leaflet-tile {
  filter: invert(0.9) hue-rotate(175deg) saturate(0.85) brightness(0.9);
}
[data-theme='dark'] .leaflet-popup-content-wrapper,
[data-theme='dark'] .leaflet-popup-tip {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* ── Timeline card images ───────────────────────────────────────────────── */
.tl-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  display: block;
  background: var(--color-surface-offset);
}
@media (min-width: 600px) {
  .tl-img { height: 220px; }
}
