/* ═══════════════════════════════════════════════════════════════
   TRAIL FINDER — Design System
   Theme: Forest Canopy meets Editorial Outdoor
   Fonts: Fraunces (display) + DM Sans (body)
═══════════════════════════════════════════════════════════════ */

:root {
  /* Forest Canopy Palette */
  --forest-deep:    #1A3C28;
  --forest-mid:     #2E7D4F;
  --forest-light:   #7FC8A0;
  --forest-pale:    #D4EDE1;
  --forest-cream:   #F4F1E8;

  /* Accent */
  --amber:          #E8A020;
  --amber-light:    #FFF0CC;
  --rust:           #C0522A;
  --sky:            #4A90C4;

  /* Difficulty Colors */
  --easy:           #2E7D4F;
  --moderate:       #D4A017;
  --challenging:    #C0522A;
  --strenuous:      #8B1A1A;

  /* Neutrals */
  --bg:             #F4F1E8;
  --bg-card:        #FFFFFF;
  --bg-elevated:    #FAFAF7;
  --border:         #E0DDD4;
  --border-strong:  #C8C4B8;
  --text-primary:   #1A2018;
  --text-secondary: #4A5240;
  --text-muted:     #7A8070;
  --text-inverse:   #FFFFFF;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(26,60,40,0.08), 0 1px 2px rgba(26,60,40,0.06);
  --shadow-md:  0 4px 12px rgba(26,60,40,0.10), 0 2px 6px rgba(26,60,40,0.08);
  --shadow-lg:  0 12px 32px rgba(26,60,40,0.14), 0 4px 12px rgba(26,60,40,0.10);
  --shadow-xl:  0 24px 64px rgba(26,60,40,0.18);

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg:             #0F1F14;
  --bg-card:        #162A1C;
  --bg-elevated:    #1C3524;
  --border:         #2A4030;
  --border-strong:  #3A5040;
  --text-primary:   #E8F0E4;
  --text-secondary: #A8C0A0;
  --text-muted:     #6A8870;
  --forest-pale:    #1C3524;
  --forest-cream:   #162A1C;
  --amber-light:    #2A2010;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.5);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--forest-mid); }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--forest-deep);
  border-bottom: 1px solid rgba(127,200,160,0.15);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.brand-icon svg { width: 20px; height: 20px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--forest-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-btn svg { width: 16px; height: 16px; }

.nav-btn:hover {
  background: rgba(127,200,160,0.15);
  color: var(--forest-light);
}

.nav-btn.active {
  background: rgba(127,200,160,0.2);
  color: #FFFFFF;
}

.saved-count {
  background: var(--amber);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(127,200,160,0.3);
  background: transparent;
  color: var(--forest-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover { background: rgba(127,200,160,0.15); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   VIEWS
═══════════════════════════════════════════════════════════════ */
.app-main { min-height: calc(100vh - 64px); }

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

/* ═══════════════════════════════════════════════════════════════
   HERO SEARCH
═══════════════════════════════════════════════════════════════ */
.hero-search {
  position: relative;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
  background: var(--forest-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(46,125,79,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(127,200,160,0.15) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237FC8A0' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  color: #FFFFFF;
  margin-bottom: 0.5rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--forest-light);
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.search-bar {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 1rem 3rem 1rem 3rem;
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.95);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
}

.search-bar input:focus {
  border-color: var(--forest-light);
  background: #FFFFFF;
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover { color: var(--text-primary); }
.search-clear svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════════════════════ */
.filter-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.filter-scroll {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar { display: none; }

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.filter-label svg { width: 11px; height: 11px; }

.filter-group select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  min-width: 140px;
}

.filter-group select:focus { border-color: var(--forest-mid); }

.filter-reset {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-top: 1.1rem;
}

.filter-reset:hover { border-color: var(--rust); color: var(--rust); }
.filter-reset svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════════════════════ */
.stats-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.quick-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.qf-btn {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.qf-btn:hover { border-color: var(--forest-mid); color: var(--forest-mid); }
.qf-btn.active { background: var(--forest-mid); border-color: var(--forest-mid); color: white; }

/* ═══════════════════════════════════════════════════════════════
   WALK CARDS
═══════════════════════════════════════════════════════════════ */
.walks-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.walk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.3s ease both;
}

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

.walk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--forest-light);
}

.walk-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--forest-deep), var(--forest-mid));
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.walk-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.walk-card:hover .walk-card-image img { transform: scale(1.05); }

.walk-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest-mid) 100%);
}

.walk-card-image-placeholder svg {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,0.3);
}

.walk-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.badge-difficulty {
  color: white;
}

.badge-easy    { background: rgba(46,125,79,0.9); }
.badge-moderate { background: rgba(212,160,23,0.9); }
.badge-challenging { background: rgba(192,82,42,0.9); }
.badge-strenuous { background: rgba(139,26,26,0.9); }

.badge-circular {
  background: rgba(255,255,255,0.85);
  color: var(--forest-deep);
}

.walk-card-save {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text-muted);
}

.walk-card-save:hover { background: white; color: var(--amber); transform: scale(1.1); }
.walk-card-save.saved { color: var(--amber); background: var(--amber-light); }
.walk-card-save svg { width: 15px; height: 15px; }

.walk-card-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.walk-card-region {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--forest-mid);
}

.walk-card-name {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.walk-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.walk-card-stats {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.walk-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.walk-stat svg { width: 13px; height: 13px; color: var(--forest-mid); }
.walk-stat strong { color: var(--text-primary); font-weight: 600; }

.walk-card-footer {
  padding: 0.6rem 1.1rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.walk-num {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.walk-effort-bar {
  display: flex;
  gap: 2px;
  align-items: center;
}

.effort-pip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.effort-pip.filled { background: var(--forest-mid); }
.effort-pip.filled.hard { background: var(--amber); }
.effort-pip.filled.very-hard { background: var(--rust); }

/* ═══════════════════════════════════════════════════════════════
   LOAD MORE
═══════════════════════════════════════════════════════════════ */
.load-more-wrap {
  text-align: center;
  padding: 1rem 1.5rem 3rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 2px solid var(--forest-mid);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--forest-mid);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.load-more-btn:hover {
  background: var(--forest-mid);
  color: white;
}

.load-more-btn svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   MAP VIEW
═══════════════════════════════════════════════════════════════ */
.map-layout {
  display: flex;
  height: calc(100vh - 64px);
}

.map-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-slow);
}

.map-sidebar.collapsed { width: 0; overflow: hidden; }

.map-sidebar-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.map-sidebar-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.map-count {
  background: var(--forest-pale);
  color: var(--forest-deep);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.map-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.map-search svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

.map-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
}

.map-filter-row {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.map-filter-row select {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  outline: none;
}

.map-walk-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.map-walk-item {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
  margin-bottom: 0.25rem;
}

.map-walk-item:hover { background: var(--forest-pale); border-color: var(--forest-light); }
.map-walk-item.active { background: var(--forest-pale); border-color: var(--forest-mid); }

.map-walk-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.map-walk-item-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.map-container {
  flex: 1;
  position: relative;
}

#leafletMap {
  width: 100%;
  height: 100%;
}

.map-sidebar-toggle {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  width: 36px;
  height: 36px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.map-sidebar-toggle:hover { background: var(--forest-pale); color: var(--forest-deep); }
.map-sidebar-toggle svg { width: 16px; height: 16px; }

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 260px !important;
}

.map-popup {
  padding: 1rem;
}

.map-popup-name {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.map-popup-region {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest-mid);
  margin-bottom: 0.5rem;
}

.map-popup-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.map-popup-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: var(--forest-mid);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition);
}

.map-popup-btn:hover { background: var(--forest-deep); }

/* ═══════════════════════════════════════════════════════════════
   PLANNER VIEW
═══════════════════════════════════════════════════════════════ */
.planner-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.planner-header {
  margin-bottom: 2rem;
}

.planner-header h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.planner-header h2 svg { width: 24px; height: 24px; color: var(--forest-mid); }
.planner-header p { color: var(--text-muted); }

.planner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.planner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.planner-card.full-width { grid-column: 1 / -1; }

.planner-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.planner-card-header svg { width: 18px; height: 18px; color: var(--forest-mid); }
.planner-card-header h3 { font-size: 1rem; color: var(--text-primary); }

/* Walk Search in Planner */
.planner-walk-search { position: relative; }

.planner-walk-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.planner-walk-search input:focus { border-color: var(--forest-mid); }

.planner-walk-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.planner-walk-results.open { display: block; }

.planner-result-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.planner-result-item:last-child { border-bottom: none; }
.planner-result-item:hover { background: var(--forest-pale); }

.planner-result-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.planner-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Selected Walk Card */
.selected-walk-card {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--forest-pale);
  border: 1px solid var(--forest-light);
  border-radius: var(--radius-md);
}

.selected-walk-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--forest-deep);
  margin-bottom: 0.5rem;
}

.selected-walk-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.selected-walk-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.selected-walk-stat svg { width: 14px; height: 14px; color: var(--forest-mid); }
.selected-walk-stat strong { color: var(--text-primary); }

/* Packing List */
.packing-categories { display: flex; flex-direction: column; gap: 1rem; }

.packing-category-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--forest-mid);
  margin-bottom: 0.5rem;
}

.packing-items { display: flex; flex-direction: column; gap: 0.35rem; }

.packing-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.3rem 0;
}

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

.packing-item label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
}

.packing-item input:checked + label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.planner-action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.planner-action-btn:hover { border-color: var(--forest-mid); color: var(--forest-mid); }
.planner-action-btn svg { width: 13px; height: 13px; }

/* Weather Guide */
.weather-season-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.season-tab {
  flex: 1;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.season-tab:hover { border-color: var(--forest-mid); color: var(--forest-mid); }
.season-tab.active { background: var(--forest-mid); border-color: var(--forest-mid); color: white; }

.season-content { font-size: 0.85rem; }

.season-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.season-item:last-child { border-bottom: none; }
.season-item-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.season-item-text { color: var(--text-secondary); line-height: 1.4; }
.season-item-text strong { color: var(--text-primary); display: block; margin-bottom: 0.1rem; }

/* Effort Calculator */
.effort-calc { display: flex; flex-direction: column; gap: 0.75rem; }

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calc-row label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.calc-row input, .calc-row select {
  width: 140px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.calc-row input:focus, .calc-row select:focus { border-color: var(--forest-mid); }

.calc-results {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--forest-pale);
  border-radius: var(--radius-md);
  border: 1px solid var(--forest-light);
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

.calc-result-row:not(:last-child) { border-bottom: 1px solid var(--forest-light); }
.calc-result-label { color: var(--text-secondary); }
.calc-result-value { font-weight: 700; color: var(--forest-deep); }

/* Elevation */
.elevation-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 0;
}

#elevationCanvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.elevation-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.elev-stat {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.6rem;
  background: var(--forest-pale);
  border-radius: var(--radius-sm);
}

.elev-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--forest-deep);
  font-family: 'Fraunces', serif;
}

.elev-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Transport */
.transport-tip {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--amber-light);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.transport-tip svg { width: 16px; height: 16px; color: var(--amber); flex-shrink: 0; margin-top: 0.1rem; }

.london-termini h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.termini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.terminus-badge {
  padding: 0.3rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Safety List */
.safety-list { display: flex; flex-direction: column; gap: 0.4rem; }

.safety-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.safety-item:last-child { border-bottom: none; }
.safety-icon { font-size: 1rem; flex-shrink: 0; }
.safety-text { color: var(--text-secondary); line-height: 1.4; }
.safety-text strong { color: var(--text-primary); display: block; }

/* Walk Stats Overview */
.walk-stats-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.stat-box {
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-box-value {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--forest-mid);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-box-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   SAVED VIEW
═══════════════════════════════════════════════════════════════ */
.saved-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.saved-header {
  margin-bottom: 2rem;
}

.saved-header h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.saved-header h2 svg { width: 24px; height: 24px; color: var(--amber); }
.saved-header p { color: var(--text-muted); }

.saved-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.saved-empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  opacity: 0.3;
}

.saved-empty h3 {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.saved-empty p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--forest-mid);
  color: white;
  border: none;
  border-radius: var(--radius-xl);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.cta-btn:hover { background: var(--forest-deep); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.modal-close:hover { background: white; color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }

/* Modal Body */
.modal-hero {
  height: 220px;
  background: linear-gradient(135deg, var(--forest-deep), var(--forest-mid));
  position: relative;
  overflow: hidden;
}

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

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,60,40,0.8) 0%, transparent 60%);
}

.modal-hero-badges {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.modal-body-content {
  padding: 1.5rem;
}

.modal-region {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest-mid);
  margin-bottom: 0.4rem;
}

.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.modal-stat-value {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--forest-mid);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.modal-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-effort-section {
  margin-bottom: 1.5rem;
}

.modal-effort-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-effort-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 0.3rem;
}

.modal-effort-pip {
  height: 10px;
  flex: 1;
  border-radius: 3px;
  background: var(--border);
  transition: background var(--transition);
}

.modal-effort-pip.filled { background: var(--forest-mid); }
.modal-effort-pip.filled.hard { background: var(--amber); }
.modal-effort-pip.filled.very-hard { background: var(--rust); }

.modal-effort-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.modal-btn svg { width: 15px; height: 15px; }

.modal-btn-primary {
  background: var(--forest-mid);
  color: white;
  border: none;
}

.modal-btn-primary:hover { background: var(--forest-deep); }

.modal-btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.modal-btn-secondary:hover { border-color: var(--forest-mid); color: var(--forest-mid); }

.modal-btn-save {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
}

.modal-btn-save:hover { background: var(--amber-light); }
.modal-btn-save.saved { background: var(--amber-light); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .planner-grid { grid-template-columns: 1fr; }
  .modal-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .map-sidebar { width: 280px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 1rem; gap: 0.75rem; }
  .brand-sub { display: none; }
  .nav-btn span { display: none; }
  .nav-btn { padding: 0.45rem 0.6rem; }
  .hero-search { padding: 2.5rem 1rem 2rem; }
  .filter-scroll { padding: 0.75rem 1rem; }
  .walks-grid { padding: 1rem; grid-template-columns: 1fr; }
  .map-layout { flex-direction: column; }
  .map-sidebar { width: 100%; height: 40vh; border-right: none; border-bottom: 1px solid var(--border); }
  .map-container { flex: 1; }
  .planner-layout { padding: 1rem; }
  .modal-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── UTILITY ─── */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* No results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.no-results svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

.no-results h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }