/* TinyTrails — warm, happy travel vibes */

:root {
  --bg: #f5f9f5;
  --bg-soft: #f9fdf8;
  --surface: #ffffff;
  --ink: #2b3a2f;
  --ink-soft: #5a6b62;
  --muted: #8a9b91;
  --coral: #7fa878;
  --coral-soft: #d4dcc8;
  --sky: #4fb6d4;
  --sky-soft: #d5edf5;
  --sun: #a8b898;
  --sun-soft: #dce5d4;
  --leaf: #7fa878;
  --leaf-soft: #d4dcc8;
  --rose: #6e9574;
  --line: #e0e6dc;
  --shadow: 0 6px 24px rgba(47, 75, 61, 0.06);
  --shadow-lift: 0 12px 36px rgba(47, 75, 61, 0.10);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "ss02" on;
}
a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Decorative top gradient */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 280px;
  background: radial-gradient(ellipse 80% 100% at 20% 0%, var(--sun-soft) 0%, transparent 55%),
              radial-gradient(ellipse 70% 100% at 80% 0%, var(--leaf-soft) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* Header */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 8px;
}
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
}
.nav-links a:hover { color: var(--coral); text-decoration: none; }

/* Centred hero logo */
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.hero-logo-img {
  /* logo_thumb.png: 275×154px with alpha channel — renders cleanly on any background */
  height: 100px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Hero */
.hero {
  max-width: 1180px;
  margin: 8px auto 20px;
  padding: 24px 22px 16px;
  text-align: center;
}
.hero h1 {
  font-size: 44px;
  letter-spacing: -0.025em;
  margin: 8px 0 14px;
  font-weight: 800;
  line-height: 1.1;
}
.hero h1 .accent { color: var(--coral); }
.hero .quote {
  max-width: 580px;
  margin: 0 auto 26px;
  font-size: 17px;
  color: var(--ink-soft);
  font-style: italic;
  position: relative;
}
.hero .quote::before, .hero .quote::after {
  content: "❝";
  color: var(--coral-soft);
  font-size: 24px;
  vertical-align: -4px;
  margin: 0 6px;
}
.hero .quote::after { content: "❞"; }

.positioning-statement {
  max-width: 640px;
  margin: 20px auto 26px;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 500;
}
.positioning-statement strong {
  color: var(--coral);
  font-weight: 700;
}
.positioning-statement em {
  color: var(--coral);
  font-style: italic;
  font-weight: 600;
}

.city-selector {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 10px 14px 10px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.city-selector label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}
.city-selector select {
  border: none;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237fa878' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.city-selector select:focus { box-shadow: 0 0 0 3px var(--leaf-soft); }
.attraction-search-input {
  border: none;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  min-width: 200px;
  transition: box-shadow 0.15s ease;
}
.attraction-search-input:focus { box-shadow: 0 0 0 3px var(--leaf-soft); }
.attraction-search-input::placeholder { color: var(--muted); }

/* City banner */
.city-banner {
  max-width: 1180px;
  margin: 0 auto 22px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.city-stat {
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  box-shadow: none;
  font-size: 12px;
}
.city-stat .k {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  display: none;
}
.city-stat .v {
  font-size: 12px;
  font-weight: 500;
  margin-top: 0;
  color: var(--ink);
  line-height: 1.2;
}
.city-stat.advisory .v { color: var(--coral); }

/* City verdict one-liner strip */
.city-verdict-strip {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 22px;
}
.cvs-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.cvs-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
}
.cvs-pill.yes   { background: var(--leaf-soft); color: #2d6a3d; }
.cvs-pill.maybe { background: var(--sun-soft);  color: #8a5a16; }
.cvs-pill.no    { background: var(--coral-soft); color: #9b3a24; }
.cvs-text {
  flex: 1;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}
.cvs-stats {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Controls */
.controls {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--coral-soft); }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }
/* Download city button */
.download-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose) 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(127, 168, 120, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.download-city-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(127, 168, 120, 0.4);
}

/* Share city button */
.share-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.share-city-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}

/* Results count */
.results-meta {
  max-width: 1180px;
  margin: 0 auto 12px;
  padding: 0 22px;
  font-size: 13px;
  color: var(--ink-soft);
}
.results-meta strong { color: var(--ink); }

/* Split View Layout */
.split-container {
  max-width: 100%;
  margin: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 35fr 8px 65fr;
  gap: 0;
  height: calc(100vh - 500px);
  min-height: 600px;
}
.attractions-panel {
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
/* List view container (id="grid" kept for JS compat) */
.attractions-panel .grid {
  max-width: none;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Compact list items */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.list-item:last-child { border-bottom: none; }

/* Verdict-based color tints — left stripe + tinted background */
.list-item.li-yes   { background: rgba(107, 178, 107, 0.18); box-shadow: inset 5px 0 0 #4a9e5c; }
.list-item.li-maybe { background: rgba(210, 160,   0, 0.15); box-shadow: inset 5px 0 0 #c47f00; }
.list-item.li-no    { background: rgba(216,  80,  56, 0.14); box-shadow: inset 5px 0 0 #c94030; }

/* Hover — richer tint, stripe stays */
.list-item.li-yes:hover   { background: rgba(107, 178, 107, 0.30); box-shadow: inset 5px 0 0 #4a9e5c; }
.list-item.li-maybe:hover { background: rgba(210, 160,   0, 0.26); box-shadow: inset 5px 0 0 #c47f00; }
.list-item.li-no:hover    { background: rgba(216,  80,  56, 0.25); box-shadow: inset 5px 0 0 #c94030; }

/* Cross-highlight — verdict-specific colour, stronger ring */
.list-item.li-yes.li-highlighted   { background: rgba(107, 178, 107, 0.40) !important; box-shadow: inset 5px 0 0 #4a9e5c, 0 0 0 2px #4a9e5c !important; }
.list-item.li-maybe.li-highlighted { background: rgba(210, 160,   0, 0.36) !important; box-shadow: inset 5px 0 0 #c47f00, 0 0 0 2px #c47f00 !important; }
.list-item.li-no.li-highlighted    { background: rgba(216,  80,  56, 0.34) !important; box-shadow: inset 5px 0 0 #c94030, 0 0 0 2px #c94030 !important; }

.li-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.li-dot.yes   { background: #4a9e5c; color: #fff; }
.li-dot.maybe { background: #c47f00; color: #fff; }
.li-dot.no    { background: #c94030; color: #fff; }

.li-body {
  flex: 1;
  min-width: 0;
}
.li-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.li-cat-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 5px;
}
.li-reasoning {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.4;
}

.li-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.li-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.li-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
}
.li-badge.yes   { background: #4a9e5c; color: #fff; }
.li-badge.maybe { background: #c47f00; color: #fff; }
.li-badge.no    { background: #c94030; color: #fff; }
.divider {
  background: var(--line);
  cursor: col-resize;
  border-left: 1px solid var(--coral);
  border-right: 1px solid var(--coral);
  transition: background 0.2s;
}
.divider:hover {
  background: var(--coral);
}
.map-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.map-panel #map {
  width: 100%;
  height: 100%;
}

/* Legacy .card styles kept for any modal references; .grid now used as list container */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Empty state */
.empty {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 22px;
  text-align: center;
  color: var(--ink-soft);
}

/* Map */
.map-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 50px;
}
#map {
  width: 100%;
  height: 620px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 0;
}
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  padding: 4px;
}
.leaflet-popup-content {
  margin: 10px 14px;
  font-family: inherit;
  font-size: 13px;
}
.leaflet-popup-content h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--ink);
}
.leaflet-popup-content .pop-meta { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.leaflet-popup-content .pop-verdict {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.leaflet-popup-content .pop-verdict.yes   { background: #4a9e5c; color: #fff; }
.leaflet-popup-content .pop-verdict.maybe { background: #c47f00; color: #fff; }
.leaflet-popup-content .pop-verdict.no    { background: #c94030; color: #fff; }
.leaflet-popup-content button {
  margin-top: 8px;
  background: var(--ink);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 30, 35, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 22px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 24px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 30px 24px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  animation: pop 0.22s ease;
}
@keyframes pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal .close {
  position: absolute;
  top: 16px; right: 18px;
  background: var(--bg-soft);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink-soft);
}
.modal .close:hover { background: var(--coral-soft); color: var(--coral); }
.modal h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.015em; }
.modal .modal-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.modal .modal-verdict-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
/* Baby score display — replaces generic star ratings */
.baby-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.baby-score-glyphs {
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
}
.bs-full  { opacity: 1; }
.bs-half  { opacity: 0.55; }
.bs-empty { opacity: 0.18; font-size: 22px; }
.baby-score-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--coral);
}
.baby-score-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--leaf-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.baby-score-disclaimer {
  font-size: 11.5px;
  color: var(--muted);
  margin: -8px 0 16px;
  font-style: italic;
}

/* List score icon */
.li-score { color: var(--coral); }
.li-score-icon { font-size: 11px; }

/* Factor stars — switch to green */
.modal .factor .factor-stars {
  color: var(--coral);
  font-size: 14px;
  letter-spacing: 1px;
}
.modal .factor .factor-stars .num { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* Legacy big-stars — kept for any remaining references */
.modal .big-stars { font-size: 22px; color: var(--coral); letter-spacing: 2px; }
.modal .big-stars .num { color: var(--ink-soft); font-size: 14px; margin-left: 6px; font-weight: 600; }
.modal .modal-verdict {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.modal .modal-verdict.yes   { background: #4a9e5c; color: #fff; }
.modal .modal-verdict.maybe { background: #c47f00; color: #fff; }
.modal .modal-verdict.no    { background: #c94030; color: #fff; }
.modal .modal-liner {
  background: var(--bg-soft);
  border-left: 3px solid var(--leaf);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14.5px;
  color: var(--ink);
  font-style: italic;
}
.modal-verdict-para {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 20px;
}
.modal .factors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
.modal .factor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.modal .factor:last-child { border-bottom: none; }
.modal .factor .label-wrap { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.modal .factor .factor-icon { font-size: 16px; }
/* Context factors (advisory, wildlife, etc.) — muted to signal they don't drive verdict */
.modal .factor.factor-context { opacity: 0.7; }
.modal .factor.factor-context .label-wrap { color: var(--ink-soft); }
.modal .factor .factor-stars {
  color: var(--sun);
  font-size: 14px;
  letter-spacing: 1px;
}
.modal .factor .factor-stars .num { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* About page */
.about-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 22px 60px;
}
.about-hero {
  background: linear-gradient(135deg, var(--leaf-soft) 0%, var(--sun-soft) 100%);
  border-radius: var(--radius-lg);
  padding: 36px 32px 30px;
  margin-bottom: 24px;
  text-align: center;
}
.about-hero h1 {
  font-size: 36px;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  font-weight: 800;
}
.about-hero p {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
}
.about-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.about-section h2 {
  font-size: 20px;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}
.about-section p {
  font-size: 15.5px;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.65;
}
.about-section p:last-child { margin-bottom: 0; }
.signoff {
  text-align: center;
  font-style: italic;
  color: var(--coral);
  font-weight: 600;
  margin-top: 14px !important;
}

.email-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.email-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  background: var(--bg-soft);
}
.email-form input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.email-form button {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose) 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(127, 168, 120, 0.35);
}
.email-form button:hover { transform: translateY(-1px); }

/* Advisories Footer */
.advisories-footer {
  max-width: 100%;
  margin: 32px auto 0;
  padding: 36px 28px 44px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.advisories-header {
  max-width: 1180px;
  margin: 0 auto 22px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.advisories-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.advisories-sub {
  font-size: 12px;
  color: var(--muted);
}

.advisories-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Advisory cards */
.adv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adv-card-icon {
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1;
}
.adv-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.adv-card-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
}
.adv-card-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Footer */
footer {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 22px 22px 30px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: var(--ink-soft); margin-right: 16px; }
footer a:hover { color: var(--coral); text-decoration: none; }
footer .made-with {
  font-size: 12px;
  color: var(--muted);
}

/* Query Form Modal */
.query-form-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.query-form-container label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.query-form-container input,
.query-form-container textarea,
.query-form-container select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-soft);
}
.query-form-container input:focus,
.query-form-container textarea:focus,
.query-form-container select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--leaf-soft);
}
.query-form-container textarea {
  min-height: 100px;
  resize: vertical;
}
.query-form-container button {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.query-form-container button:hover {
  transform: translateY(-2px);
}
.form-success {
  background: var(--leaf-soft);
  color: #2d6a3d;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
}
.query-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose) 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(127, 168, 120, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.query-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127, 168, 120, 0.35);
}

/* Newsletter strip */
.newsletter-strip {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 22px;
}
.ns-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--leaf-soft) 0%, var(--sun-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.ns-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ns-icon { font-size: 26px; flex-shrink: 0; }
.ns-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.ns-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.ns-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ns-input {
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  outline: none;
  background: white;
  min-width: 200px;
  transition: border-color 0.15s;
  font-family: inherit;
}
.ns-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--leaf-soft); }
.ns-btn {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--coral) 0%, var(--rose) 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(127, 168, 120, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ns-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(127, 168, 120, 0.4); }
.ns-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.ns-dismiss:hover { color: var(--ink); background: rgba(0,0,0,0.06); }
.ns-success {
  padding: 12px 20px;
  background: white;
  border-radius: var(--radius-lg);
  color: #2d6a3d;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--line);
}
@media (max-width: 760px) {
  .ns-inner { flex-direction: column; align-items: flex-start; }
  .ns-right { width: 100%; }
  .ns-input { min-width: 0; flex: 1; }
}

/* ── Responsive: Tablet (≤1024px) ────────────────────────────────── */
@media (max-width: 1024px) {
  .split-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    padding: 14px;
  }
  .divider { display: none; }
  .map-panel {
    margin-top: 14px;
    height: 450px;
  }
  .map-panel #map { height: 100%; }
}

/* ── Responsive: Mobile (≤640px) ─────────────────────────────────── */
@media (max-width: 640px) {

  /* Prevent any overflowing element from creating horizontal scroll */
  body { overflow-x: hidden; }

  /* Nav */
  .nav {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-logo-img { height: 70px; }
  .nav-links { gap: 12px; font-size: 12.5px; justify-content: center; }

  /* Hero — scale down heading to prevent horizontal overflow */
  .hero {
    padding: 14px 16px 12px;
    margin-bottom: 10px;
    overflow: hidden;
  }
  .hero h1 {
    font-size: 26px;
    letter-spacing: -0.02em;
    margin: 6px 0 10px;
  }
  .hero .quote {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .positioning-statement { font-size: 13px; margin: 0 auto 14px; }

  /* City selector — fix display:inline-flex → flex so width:100% works */
  .city-selector {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }
  .city-selector label { font-size: 12px; }
  .city-selector select { width: 100%; font-size: 14px; }
  .attraction-search-input { min-width: 0; width: 100%; }

  /* Verdict strip */
  .city-verdict-strip { padding: 0 12px; }
  .cvs-inner {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    gap: 8px;
  }
  .cvs-stats { display: none; }
  .cvs-text { font-size: 13px; }

  /* Newsletter */
  .newsletter-strip { padding: 0 12px; }

  /* Controls — only filter chips + download/share buttons on mobile (sort moves below map) */
  .controls {
    padding: 0 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .chip-row { gap: 6px; }
  .chip { padding: 8px 12px; font-size: 12.5px; }
  /* Override the inline style="display:flex" div so buttons wrap cleanly */
  .controls > div[style] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100%;
  }
  .download-city-btn,
  .share-city-btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
    font-size: 12.5px;
    padding: 8px 10px;
  }
  /* Sort bar between map and list — hidden on desktop, shown on mobile via JS move */
  .mobile-sort-wrap {
    display: none;
  }
  .mobile-sort-wrap.active {
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
  .mobile-sort-wrap #sortSelect {
    width: 100%;
  }

  /* Results meta */
  .results-meta { padding: 0 12px; font-size: 12px; }

  /* Split view — map on top (compact), list below (natural page scroll) */
  .split-container {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    gap: 0;
  }
  .map-panel {
    display: block;
    order: -1;          /* always renders above the list */
    height: 240px;
    margin-bottom: 10px;
    margin-top: 0;
    border-radius: var(--radius-md);
    flex-shrink: 0;
  }
  .map-panel.map-visible { display: block; }
  .map-panel #map { height: 100%; }
  /* Attractions panel — remove fixed overflow scroll; page scrolls naturally on mobile */
  .attractions-panel {
    overflow-y: visible;
    height: auto;
    max-height: none;
    border-radius: var(--radius-md);
  }

  /* Map toggle button — hidden on mobile (map is always visible) */
  .map-toggle-btn { display: none !important; }

  /* List items — compact touch targets on mobile */
  .list-item { padding: 7px 10px; gap: 7px; }
  .li-name { font-size: 13px; }
  .li-reasoning { display: none; }
  .li-dot { width: 24px; height: 24px; font-size: 11px; }

  /* Modal — full screen on mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    padding: 20px 18px 28px;
    width: 100%;
    max-width: 100%;
    animation: slideup 0.25s ease;
  }
  @keyframes slideup {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal h2 { font-size: 20px; padding-right: 32px; }
  .modal .factors-grid { grid-template-columns: 1fr; gap: 0; }
  .modal .big-stars { font-size: 18px; }

  /* Footer */
  footer { flex-direction: column; align-items: center; text-align: center; gap: 8px; }

  /* Advisory cards — 3 columns on tablet */
  .advisories-footer { padding: 24px 16px 32px; }
  .advisories-header { flex-direction: column; gap: 4px; }
  .advisories-container { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .adv-card { padding: 16px 16px 18px; }
  .adv-card-desc { font-size: 12px; }
}

/* Advisory cards — 1 column on mobile (fully vertical) */
@media (max-width: 480px) {
  .advisories-container { grid-template-columns: 1fr; }
}

/* Advisory cards — 3 columns on medium screens (tablet landscape) */
@media (min-width: 641px) and (max-width: 900px) {
  .advisories-container { grid-template-columns: repeat(3, 1fr); }
}

/* Map toggle hidden on desktop */
.map-toggle-btn { display: none; }

