:root {
  color-scheme: dark;
  --font-main: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --bg: #071512;
  --sidebar-bg: #0f1e1a;
  --surface: #172923;
  --surface-hover: #20362f;
  --surface-card: #12231e;
  --border: rgba(231, 239, 232, 0.09);
  --border-strong: rgba(231, 239, 232, 0.18);
  --text: #f7f4eb;
  --text-dim: #a9b8b0;
  --text-faint: #71877d;
  --accent-blue: #62c9a5;
  --accent-blue-hover: #7bd8b8;
  --heading-accent: #f0cc84;
  --province-fill: #15352f;
  --province-stroke: rgba(217, 235, 225, 0.42);
  --province-hover: #235249;
  --province-selected: #ec7653;
  --district-fill: rgba(34, 197, 94, 0.06);
  --district-stroke: rgba(251, 191, 36, 0.7);
  --poi-fill: #ef5b48;
  --poi-hover: #f2cb7c;
  --label-fill: #e2e8f0;
  --label-shadow: 0 1px 4px rgba(0,0,0,0.9);
  --poi-label-shadow: 0 1px 3px rgba(0,0,0,0.95);
  --badge-hist-bg: #451a03; --badge-hist-text: #fde68a;
  --badge-nat-bg: #064e3b; --badge-nat-text: #a7f3d0;
  --shadow-soft: 0 8px 28px -14px rgba(0, 0, 0, 0.65);
  --shadow-strong: 0 22px 48px -18px rgba(0, 0, 0, 0.78);
  --error-bg: #2d1a1a; --error-border: #7f1d1d; --error-text: #fca5a5;
  --glass-bg: rgba(12, 31, 26, 0.82);
  --glass-border: rgba(235, 244, 237, 0.14);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #dfeae4;
  --sidebar-bg: #fbfaf6;
  --surface: #f0f1eb;
  --surface-hover: #e7ebe4;
  --surface-card: #fffefa;
  --border: #e2e1d8;
  --border-strong: #cbcfc4;
  --text: #17322b;
  --text-dim: #5f716a;
  --text-faint: #85928c;
  --accent-blue: #168b6c;
  --accent-blue-hover: #0f7359;
  --heading-accent: #9d5a29;
  --province-fill: #9bc5b2;
  --province-stroke: rgba(255, 254, 247, 0.9);
  --province-hover: #72ad95;
  --province-selected: #df6241;
  --district-fill: rgba(16, 185, 129, 0.08);
  --district-stroke: #b45309;
  --poi-fill: #d94c3b;
  --poi-hover: #8c4f28;
  --label-fill: #1e293b;
  --label-shadow: 0 1px 3px rgba(255,255,255,0.95);
  --poi-label-shadow: 0 1px 3px rgba(255,255,255,0.95);
  --badge-hist-bg: #ffedd5; --badge-hist-text: #9a3412;
  --badge-nat-bg: #dcfce7; --badge-nat-text: #166534;
  --shadow-soft: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 10px 25px -4px rgba(15, 23, 42, 0.12);
  --error-bg: #fee2e2; --error-border: #fca5a5; --error-text: #991b1b;
  --glass-bg: rgba(255, 254, 248, 0.86);
  --glass-border: rgba(36, 62, 54, 0.12);
}

:root[data-theme="turquoise"] {
  color-scheme: dark;
  --bg: #03191e;
  --sidebar-bg: #052429;
  --surface: #0b3338;
  --surface-hover: #10434a;
  --surface-card: #082c31;
  --border: rgba(151, 244, 235, 0.1);
  --border-strong: rgba(151, 244, 235, 0.22);
  --text: #edfffd;
  --text-dim: #9bc9c5;
  --text-faint: #66958f;
  --accent-blue: #2dd4bf;
  --accent-blue-hover: #5eead4;
  --heading-accent: #67e8f9;
  --province-fill: #0b4a50;
  --province-stroke: rgba(153, 246, 236, 0.46);
  --province-hover: #12636b;
  --province-selected: #ff896f;
  --district-fill: rgba(34, 211, 238, 0.08);
  --district-stroke: #5eead4;
  --poi-fill: #ff7968;
  --poi-hover: #fde68a;
  --label-fill: #d9fffb;
  --label-shadow: 0 1px 4px rgba(0,0,0,0.92);
  --poi-label-shadow: 0 1px 3px rgba(0,0,0,0.95);
  --badge-hist-bg: #4b2a20;
  --badge-hist-text: #ffd6a3;
  --badge-nat-bg: #063f3b;
  --badge-nat-text: #83f5df;
  --shadow-soft: 0 8px 28px -14px rgba(0, 10, 12, 0.78);
  --shadow-strong: 0 22px 48px -18px rgba(0, 8, 10, 0.88);
  --error-bg: #3b2023;
  --error-border: #9f3e49;
  --error-text: #ffb4bd;
  --glass-bg: rgba(4, 38, 43, 0.84);
  --glass-border: rgba(151, 244, 235, 0.16);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; height: 100dvh;
  font-family: var(--font-main);
  background: var(--bg); color: var(--text); overflow: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

#app { display: grid; grid-template-columns: 1fr 380px; height: 100%; height: 100dvh; }
#map-wrap { position: relative; min-width: 0; height: 100%; }
#map { width: 100%; height: 100%; display: block; background: var(--bg); }
.map-bg { fill: var(--bg); }

/* --- Harita Vektör Stilleri --- */
.province {
  fill: var(--province-fill);
  stroke: var(--province-stroke);
  stroke-width: 0.6;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.2s ease;
  outline: none;
}
.province:hover {
  fill: var(--province-hover);
  stroke: rgba(255, 255, 255, 0.5);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.25));
}
.province:focus-visible {
  fill: var(--province-hover);
  stroke: var(--accent-blue);
  stroke-width: 2;
}
.province.selected {
  fill: var(--province-selected);
  stroke: #ffffff;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.45));
}

.district {
  fill: var(--district-fill);
  stroke: var(--district-stroke);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.poi {
  fill: var(--poi-fill);
  stroke: #ffffff;
  cursor: pointer;
  outline: none;
  vector-effect: non-scaling-stroke;
  stroke-width: 1.4;
  transition: transform 0.2s ease, fill 0.15s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.poi:hover {
  fill: var(--poi-hover);
  stroke-width: 2;
}
.poi:focus-visible {
  stroke: var(--accent-blue);
  stroke-width: 3;
}
.poi.active {
  fill: var(--poi-hover);
  stroke: #ffffff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8));
}

.poi-label {
  fill: #ffffff;
  pointer-events: none;
  text-shadow: var(--poi-label-shadow);
  font-weight: 600;
  font-family: var(--font-main);
  letter-spacing: -0.01em;
}

.province-label {
  fill: var(--label-fill);
  pointer-events: none;
  text-anchor: middle;
  font-weight: 500;
  font-family: var(--font-main);
  text-shadow: var(--label-shadow);
  letter-spacing: 0.02em;
}

.district-label {
  fill: var(--district-stroke);
  pointer-events: none;
  text-anchor: middle;
  font-family: var(--font-main);
  text-shadow: var(--poi-label-shadow);
  font-weight: 500;
}

/* --- Kenar Çubuğu (Sidebar) --- */
#sidebar {
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  min-height: 0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
#sidebar header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#sidebar header h1 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
#sidebar header p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 400;
}
.header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: scale(1.05);
}
.icon-btn:focus-visible { outline: 2px solid var(--accent-blue); }

.action-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.action-chip:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.action-chip:focus-visible { outline: 2px solid var(--accent-blue); }
.action-chip.active {
  background: var(--badge-hist-bg);
  color: var(--badge-hist-text);
  border-color: var(--heading-accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.province-meta {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-dim);
  margin: 6px 0 8px;
}

#sidebar .content {
  padding: 16px 20px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scroll-behavior: smooth;
}
#sidebar .content::-webkit-scrollbar { width: 5px; }
#sidebar .content::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.hint {
  background: var(--surface);
  border-left: 3px solid var(--accent-blue);
  padding: 11px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
}
.hint b { color: var(--heading-accent); font-weight: 600; }

/* --- Arama --- */
.search-wrap {
  position: relative;
  padding: 12px 20px 0;
  flex-shrink: 0;
}
.search-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.search-wrap input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: var(--sidebar-bg);
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-results {
  position: absolute;
  left: 20px;
  right: 20px;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  z-index: 30;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}
.search-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: none;
  color: var(--text);
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--border);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item:focus-visible {
  background: var(--surface-hover);
  outline: none;
}
.search-item .type {
  font-size: 10px;
  color: var(--text-faint);
  margin-left: auto;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* --- Filtre chip'leri --- */
.filter-row {
  display: flex;
  gap: 8px;
  padding: 10px 20px 0;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.chip:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 1px; }
.chip.active.historical {
  background: var(--badge-hist-bg);
  color: var(--badge-hist-text);
  border-color: var(--heading-accent);
  font-weight: 600;
}
.chip.active.natural {
  background: var(--badge-nat-bg);
  color: var(--badge-nat-text);
  border-color: #10b981;
  font-weight: 600;
}

/* --- Harita üstü kontroller (Glassmorphism) --- */
#zoom-ctrl {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
#zoom-ctrl button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
#zoom-ctrl button:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong);
}
#zoom-ctrl button:focus-visible { outline: 2px solid var(--accent-blue); }

#legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 11.5px;
  color: var(--text-dim);
  z-index: 10;
  line-height: 2;
  box-shadow: var(--shadow-soft);
}
#legend .row { display: flex; align-items: center; gap: 9px; font-weight: 500; }
#legend .swatch { width: 13px; height: 13px; border-radius: 4px; flex-shrink: 0; }
#legend .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid #fff; }
.legend-province { background: var(--province-fill); border: 1px solid var(--province-stroke); }
.legend-selected { background: var(--province-selected); }
.legend-district { background: var(--district-fill); border: 1px solid var(--district-stroke); }
.legend-poi { background: var(--poi-fill); }

/* --- POI kartları --- */
.poi-card {
  background: var(--surface-card);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.poi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  border-color: var(--border-strong);
}
.poi-card .img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.poi-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.poi-card:hover img {
  transform: scale(1.03);
}
.poi-card .no-img {
  color: var(--text-faint);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  width: 100%;
  text-align: center;
  padding: 12px;
  background: var(--surface);
}
.poi-card .no-img span:first-child { font-size: 28px; opacity: 0.7; }
.poi-card .body { padding: 14px 16px 16px; }
.poi-card h3 {
  margin: 0 0 6px 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--heading-accent);
}
.poi-card .meta {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.badge {
  background: var(--surface);
  color: var(--text);
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.historical { background: var(--badge-hist-bg); color: var(--badge-hist-text); border-color: transparent; }
.badge.natural { background: var(--badge-nat-bg); color: var(--badge-nat-text); border-color: transparent; }
.poi-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.18s ease;
}
.fav-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  color: #fbbf24;
  transform: scale(1.1);
}
.fav-btn:focus-visible { outline: 2px solid var(--accent-blue); }
.fav-btn.active { color: #fbbf24; border-color: #fbbf24; }

.directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: #1d4ed8;
  color: #eff6ff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}
.directions-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}
.directions-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }

.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-faint);
  font-size: 13px;
}
.empty .icon {
  font-size: 46px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.district-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.district-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
}

.info-box {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.info-box h4 {
  margin: 0 0 6px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--heading-accent);
}
.info-box p {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.action-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
}
.action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}
.action-btn:focus-visible { outline: 2px solid var(--accent-blue); }

.nearby-item { position: relative; }
.distance-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(253, 230, 138, 0.3);
}

#loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 0.98;
  z-index: 50;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-strong);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  padding: 12px 22px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 85%;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.error-msg {
  color: var(--error-text);
  padding: 20px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 12px;
  font-size: 13px;
  margin: 24px;
  max-width: 520px;
}
.error-msg h2 { margin-top: 0; font-size: 17px; }
.error-msg code { background: rgba(0,0,0,0.25); padding: 2px 6px; border-radius: 4px; }
.retry-btn {
  margin-top: 14px;
  background: #991b1b;
  color: #fee2e2;
  border: none;
  padding: 9px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.15s ease;
}
.retry-btn:hover { background: #b91c1c; }

@media (max-width: 900px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: 48dvh 52dvh;
    height: 100%;
    height: 100dvh;
  }
  #sidebar { height: 100%; border-left: none; border-top: 1px solid var(--border); }
  .header-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .header-actions::-webkit-scrollbar { height: 4px; }
  .header-actions::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
  .action-chip { flex-shrink: 0; white-space: nowrap; }
  #legend { display: none; }
}

@media (max-width: 480px) {
  #sidebar header { padding: 12px 16px 10px; }
  #sidebar .content { padding: 12px 16px 24px; }
  .search-wrap { padding: 10px 16px 0; }
  .filter-row { padding: 8px 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
}

/* ================================================================
   2026 visual refresh — modern travel atlas
   ================================================================ */

#app { grid-template-columns: minmax(0, 1fr) 420px; }

#map-wrap {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 46%, rgba(56, 132, 107, 0.2), transparent 45%),
    linear-gradient(145deg, #06110f 0%, var(--bg) 48%, #091a17 100%);
}
:root[data-theme="light"] #map-wrap {
  background:
    radial-gradient(circle at 52% 46%, rgba(255,255,255,0.58), transparent 42%),
    linear-gradient(145deg, #d7e7df 0%, var(--bg) 48%, #cedfd7 100%);
}
:root[data-theme="turquoise"] #map-wrap {
  background:
    radial-gradient(circle at 52% 46%, rgba(45, 212, 191, 0.2), transparent 44%),
    linear-gradient(145deg, #021216 0%, var(--bg) 48%, #052b30 100%);
}
#map { background: transparent; }
.map-bg { fill: transparent; }

.province {
  stroke-width: 0.75;
  transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
}
.province:hover {
  stroke: rgba(236, 247, 240, 0.88);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.22));
}
:root[data-theme="light"] .province:hover { stroke: #fffdf7; }
.province.selected {
  stroke: rgba(255,255,255,0.95);
  filter: drop-shadow(0 0 14px rgba(236, 118, 83, 0.42));
}
.province-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
  paint-order: stroke;
  stroke: rgba(4, 17, 14, 0.66);
  stroke-width: 2.8px;
  stroke-linejoin: round;
  text-shadow: none;
}
:root[data-theme="light"] .province-label {
  stroke: rgba(239, 246, 241, 0.82);
  stroke-width: 3px;
}
.poi {
  stroke-width: 1.8;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.42));
}

.map-kicker {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 9;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  color: var(--text-dim);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.map-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(98, 201, 165, 0.13);
}

#sidebar {
  position: relative;
  z-index: 15;
  border-left-color: var(--border);
  box-shadow: -22px 0 60px rgba(2, 13, 10, 0.22);
}
#sidebar header {
  padding: 24px 24px 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(98,201,165,0.09), transparent 42%),
    var(--sidebar-bg);
}
.header-top { align-items: center; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px 14px 14px 5px;
  background: linear-gradient(145deg, var(--province-selected), #d95839);
  color: #fffaf3;
  box-shadow: 0 10px 22px -10px rgba(236, 118, 83, 0.78);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
:root[data-theme="turquoise"] .brand-mark {
  background: linear-gradient(145deg, #31d7c5, #087f8c);
  color: #eafffc;
  box-shadow: 0 10px 24px -10px rgba(45, 212, 191, 0.72);
}
.brand-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-blue);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
#sidebar header h1 {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.035em;
}
#sidebar header p {
  margin: 12px 0 0;
  max-width: 310px;
  font-size: 11.5px;
  line-height: 1.55;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
}
.header-actions { gap: 7px; margin-top: 18px; }
.action-chip {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.action-chip:hover { transform: translateY(-2px); }

.search-wrap { padding: 16px 24px 0; }
.search-field { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-54%);
  z-index: 2;
  color: var(--accent-blue);
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
}
.search-wrap input {
  height: 48px;
  padding: 0 40px 0 45px;
  border-radius: 14px;
  border-color: var(--border-strong);
  background: var(--surface-card);
  font-size: 12.5px;
  box-shadow: 0 9px 26px -20px rgba(0,0,0,0.7);
}
.search-wrap input:focus { background: var(--surface-card); }
.search-clear {
  position: absolute;
  right: 11px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-faint);
  cursor: pointer;
}
.search-results { left: 24px; right: 24px; border-radius: 15px; }

.filter-row {
  align-items: center;
  gap: 8px;
  padding: 13px 24px 14px;
  border-bottom: 1px solid var(--border);
}
.filter-label {
  margin-right: auto;
  color: var(--text-faint);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chip {
  min-height: 31px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 650;
}

#sidebar .content { padding: 22px 24px 36px; }
.welcome-block { margin: 0 0 20px; }
.welcome-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--province-selected);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.welcome-block h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(30px, 2.4vw, 37px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.045em;
}
.welcome-block p {
  margin: 11px 0 0;
  max-width: 335px;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.65;
}

#zoom-ctrl { top: 22px; left: 22px; gap: 7px; }
#zoom-ctrl button {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 17px;
  font-weight: 500;
  box-shadow: 0 12px 30px -16px rgba(0,0,0,0.72);
}
#legend {
  bottom: 22px;
  left: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 15px;
  padding: 11px 14px;
  border-radius: 14px;
  line-height: 1.7;
  font-size: 9.5px;
}
#legend .row { gap: 7px; }
#legend .swatch, #legend .dot { width: 9px; height: 9px; }

.poi-card {
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: 0 14px 35px -24px rgba(0,0,0,0.75);
}
.poi-card .img-wrap { height: 196px; }
.poi-card .body { padding: 17px 18px 19px; }
.poi-card h3 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.poi-card p { font-size: 12.5px; line-height: 1.7; }
.badge { border-radius: 8px; }
.fav-btn { border-radius: 11px; }
.directions-btn {
  border-radius: 10px;
  background: var(--accent-blue);
  color: #08251d;
  box-shadow: none;
}
.directions-btn:hover { background: var(--accent-blue-hover); box-shadow: none; }

.info-box {
  border-radius: 16px;
  padding: 16px 17px;
  box-shadow: none;
}
.info-box h4 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.action-btn { border-radius: 10px; }
.district-chip { border-radius: 8px; }
.hint {
  margin: 4px 0 18px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-left: 1px dashed var(--border-strong);
  border-radius: 13px;
  background: transparent;
  font-size: 10.5px;
  line-height: 1.75;
}
.hint b { color: var(--text); }

#loader .spinner { border-top-color: var(--province-selected); }
#toast { border-radius: 13px; }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; grid-template-rows: 46dvh 54dvh; }
  #map-wrap { z-index: 1; }
  #sidebar {
    z-index: 20;
    height: calc(100% + 16px);
    margin-top: -16px;
    border-top: 1px solid var(--border-strong);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 45px rgba(2, 13, 10, 0.28);
  }
  #sidebar header { padding: 21px 20px 15px; border-radius: 24px 24px 0 0; }
  #sidebar header p { margin-top: 9px; }
  .header-actions { margin-top: 14px; }
  .map-kicker { top: 15px; padding: 7px 11px; font-size: 8px; }
  #zoom-ctrl { top: 15px; left: 14px; }
  #zoom-ctrl button { width: 38px; height: 38px; }
  #legend { display: none; }
  .poi { r: 2.8px; stroke-width: 1.2; }
  .poi.active { r: 5px; }
  .province-label, .poi-label, .district-label { display: none; }
  #sidebar .content { padding: 20px 20px 34px; }
  .search-wrap { padding: 14px 20px 0; }
  .filter-row { padding: 11px 20px 13px; }
  .search-results { left: 20px; right: 20px; }
  .welcome-block h2 { font-size: 33px; }
}

@media (max-width: 480px) {
  .map-kicker { display: none; }
  #sidebar header { padding: 20px 18px 14px; }
  .brand-mark { width: 39px; height: 39px; border-radius: 13px 13px 13px 5px; }
  #sidebar header h1 { font-size: 23px; }
  .brand-eyebrow { font-size: 7.5px; }
  .icon-btn { width: 36px; height: 36px; }
  #sidebar .content { padding: 19px 18px 32px; }
  .search-wrap { padding: 13px 18px 0; }
  .filter-row { padding: 11px 18px 12px; }
  .filter-label { display: none; }
  .search-results { left: 18px; right: 18px; }
  .welcome-block h2 { font-size: 31px; }
  .poi-card .img-wrap { height: 180px; }
}
