:root {
  --green-950: #08251b;
  --green-900: #0f3d2e;
  --green-800: #14503a;
  --green-700: #1e5b3a;
  --leaf: #2f7d4f;
  --leaf-bright: #3f9a63;
  --mint: #dcefe4;
  --mint-2: #eef6ef;
  --cream: #f7f5ef;
  --paper: #fdfcf8;
  --ink: #13231c;
  --muted: #5b6f63;
  --muted-2: #7b8c80;
  --line: #dfe5dc;
  --amber: #8a6a1f;
  --shadow-sm: 0 1px 2px rgba(15, 61, 46, 0.06), 0 6px 18px rgba(15, 61, 46, 0.05);
  --shadow-lg: 0 24px 70px rgba(8, 37, 27, 0.2), 0 3px 10px rgba(8, 37, 27, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --topbar-h: 66px;
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--green-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--leaf);
}

:focus-visible {
  outline: 2.5px solid var(--leaf-bright);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--topbar-h);
  padding: 0 22px;
  background: rgba(247, 245, 239, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-900);
  text-decoration: none;
}

.brand:hover {
  color: var(--green-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--leaf);
  flex: none;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--green-900);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.topbar-btn:hover {
  background: var(--mint-2);
  border-color: #c8d9cc;
}

.topbar-btn:active {
  transform: translateY(1px);
}

.topbar-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(380px, 438px) minmax(0, 1fr);
  height: calc(100dvh - var(--topbar-h));
  min-height: 0;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 30px 24px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(140% 80% at 0% 0%, rgba(220, 239, 228, 0.55), transparent 60%),
    var(--cream);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #c6d4c8 transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #c6d4c8;
  border-radius: 99px;
}

.intro {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--leaf);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.1vw, 45px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--green-950);
}

.intro h1 em {
  color: var(--leaf);
  font-style: italic;
  font-weight: 400;
}

.lead {
  max-width: 34ch;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
}

.stats dt {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  color: var(--green-900);
}

/* ---------- Search ---------- */

.search-row {
  position: relative;
  margin-bottom: 13px;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus-within {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(63, 154, 99, 0.16);
}

.search svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: none;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

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

.search input::-webkit-search-cancel-button {
  display: none;
}

.search kbd {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--cream);
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-900);
  transform: translateY(-50%);
}

.clear-search svg {
  width: 15px;
  height: 15px;
}

.search:has(+ .clear-search:not([hidden])) kbd {
  display: none;
}

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter .filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.filter .filter-count {
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(19, 35, 28, 0.06);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.filter:hover {
  border-color: #c8d9cc;
  background: var(--paper);
  color: var(--green-900);
}

.filter[aria-pressed="true"] {
  border-color: var(--green-900);
  background: var(--green-900);
  color: #fff;
}

.filter[aria-pressed="true"] .filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ---------- List ---------- */

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.list-head button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--leaf);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.place-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.place-card {
  --c: var(--leaf);
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 0.13s ease, border-color 0.13s ease, box-shadow 0.13s ease;
}

.place-card:hover {
  background: rgba(255, 255, 255, 0.7);
}

.place-card.is-active {
  background: var(--paper);
  border-color: #ccdccc;
  box-shadow: var(--shadow-sm);
}

.place-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent);
}

.place-body {
  min-width: 0;
}

.place-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.place-name {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--green-950);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-area {
  flex: none;
  color: var(--muted-2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.place-meta {
  display: block;
  margin-top: 1px;
  color: var(--c);
  font-size: 10.5px;
  font-weight: 600;
}

.place-snippet {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.place-chevron {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 0.13s ease, transform 0.13s ease;
}

.place-card:hover .place-chevron,
.place-card.is-active .place-chevron {
  opacity: 1;
}

.place-card:hover .place-chevron {
  transform: translateX(2px);
}

.empty {
  padding: 26px 14px 20px;
  border: 1px dashed #c9d6ca;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.empty p {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--green-900);
}

.empty span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.empty button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.sidebar-footer p {
  margin: 0 0 3px;
}

.footer-small {
  opacity: 0.8;
}

/* ---------- Map ---------- */

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e9ede6;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e9ede6;
  font-family: var(--font-body);
}

.leaflet-container {
  font-family: var(--font-body);
}

.leaflet-control-attribution {
  padding: 3px 7px !important;
  border-radius: 7px 0 0 0;
  background: rgba(253, 252, 248, 0.88) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  backdrop-filter: blur(6px);
}

.leaflet-control-attribution a {
  color: var(--green-800);
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  border-bottom-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--green-900) !important;
  font-size: 18px !important;
  line-height: 34px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--mint-2) !important;
}

.leaflet-control-scale-line {
  border-color: rgba(19, 35, 28, 0.45) !important;
  border-top: 0 !important;
  background: rgba(253, 252, 248, 0.75);
  color: var(--green-950);
  font-size: 9px;
}

.map-overlay {
  position: absolute;
  z-index: 500;
  pointer-events: none;
}

.map-overlay-top {
  top: 14px;
  left: 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-width: 310px;
  padding: 9px 12px;
  border: 1px solid rgba(223, 229, 220, 0.9);
  border-radius: 12px;
  background: rgba(253, 252, 248, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}

.legend-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #c2410c;
}

.legend-count {
  color: var(--muted-2);
  font-weight: 500;
}

.map-overlay-hint {
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(223, 229, 220, 0.9);
  border-radius: 999px;
  background: rgba(253, 252, 248, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.map-overlay-hint svg {
  width: 14px;
  height: 14px;
  color: var(--leaf);
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--cream);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.map-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--mint);
  border-top-color: var(--leaf);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Detail card ---------- */

.detail {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 700;
  width: min(392px, calc(100% - 32px));
  max-height: calc(100% - 92px);
  padding: 22px 22px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(223, 229, 220, 0.9);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  animation: detail-in 0.24s cubic-bezier(0.22, 0.9, 0.3, 1);
  scrollbar-width: thin;
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mint-2);
  color: var(--green-900);
}

.detail-close:hover {
  background: var(--mint);
}

.detail-close svg {
  width: 16px;
  height: 16px;
}

.detail-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 32px 7px 0;
  color: var(--c);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-cat i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.detail h2 {
  margin: 0 34px 8px 0;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--green-950);
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-stats span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--mint-2);
  color: var(--green-800);
  font-size: 10.5px;
  font-weight: 600;
}

.detail-photo {
  margin: 0 0 12px;
}

.detail-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.detail-photo figcaption {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-align: right;
}

.detail p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.highlights li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-800);
  font-size: 10.5px;
  font-weight: 500;
}

.detail h3 {
  margin: 0 0 8px;
  color: var(--green-950);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stops {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.stop {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1eb;
}

.stop:last-child {
  border-bottom: 0;
}

.stop-modes {
  display: flex;
  gap: 3px;
  flex: none;
}

.mode {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--mc, var(--mint));
  color: var(--mt, var(--green-800));
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mode[data-mode="bus"] {
  --mc: #f3e3c3;
  --mt: #7a5713;
}

.mode[data-mode="tram"] {
  --mc: #f6d9d4;
  --mt: #9a3f31;
}

.mode[data-mode="metro"] {
  --mc: #d9e2f5;
  --mt: #2c4e8a;
}

.mode[data-mode="rail"] {
  --mc: #dfe8d6;
  --mt: #48632f;
}

.stop-info {
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
}

.stop-info strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stop-info small {
  color: var(--muted-2);
  font-size: 10.5px;
}

.stop-empty {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.btn-primary {
  background: var(--green-900);
  color: #fff;
}

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

.btn-ghost {
  border-color: var(--line);
  background: var(--paper);
  color: var(--green-800);
}

.btn-ghost:hover {
  border-color: #c8d9cc;
  background: var(--mint-2);
  color: var(--green-900);
}

.btn:active {
  transform: translateY(1px);
}

.detail-note {
  margin: 10px 0 0 !important;
  color: var(--muted-2) !important;
  font-size: 9.5px !important;
  line-height: 1.45 !important;
}

/* ---------- About dialog ---------- */

.about-dialog {
  width: min(620px, calc(100vw - 30px));
  max-height: min(82dvh, 760px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.about-dialog::backdrop {
  background: rgba(8, 37, 27, 0.45);
  backdrop-filter: blur(4px);
}

.about-inner {
  position: relative;
  padding: 30px 30px 26px;
}

.about-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mint-2);
  color: var(--green-900);
}

.about-close:hover {
  background: var(--mint);
}

.about-close svg {
  width: 17px;
  height: 17px;
}

.about-dialog h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--green-950);
}

.about-dialog h3 {
  margin: 20px 0 7px;
  color: var(--green-900);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about-dialog p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.about-dialog ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.about-dialog li {
  margin-bottom: 6px;
}

.about-meta {
  margin-top: 18px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
  color: var(--muted-2) !important;
}

.noscript {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2000;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green-950);
  color: #fff;
  font-size: 12px;
  box-shadow: var(--shadow-lg);
}

/* ---------- Leaflet additions ---------- */

.zm-tooltip {
  padding: 5px 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(8, 37, 27, 0.92) !important;
  box-shadow: 0 4px 14px rgba(8, 37, 27, 0.2) !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

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

.zm-marker {
  filter: drop-shadow(0 1px 2px rgba(8, 37, 27, 0.35));
}

.zm-polygon {
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: minmax(350px, 400px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-h: 60px;
  }

  body {
    background: var(--cream);
  }

  .topbar {
    padding: 0 14px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text span {
    font-size: 9.5px;
  }

  .topbar-btn {
    padding: 8px;
    font-size: 0;
    gap: 0;
  }

  .topbar-btn svg {
    width: 17px;
    height: 17px;
  }

  .layout {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .map-panel {
    order: -1;
    height: 56dvh;
    min-height: 350px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar {
    overflow: visible;
    padding: 24px 18px 20px;
    border-right: 0;
  }

  .intro h1 {
    font-size: 38px;
  }

  .lead {
    max-width: 46ch;
  }

  .detail {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 72dvh;
    border-radius: 20px;
  }

  .map-overlay-hint {
    display: none;
  }

  .legend {
    max-width: 230px;
  }

  .map-overlay-top {
    top: 10px;
    left: 10px;
  }

  .leaflet-top.leaflet-right {
    top: 4px;
    right: 4px;
  }

  .about-inner {
    padding: 26px 20px 22px;
  }
}

@media (max-width: 520px) {
  .intro h1 {
    font-size: 33px;
  }

  .stats dd {
    font-size: 24px;
  }

  .brand-text span {
    display: none;
  }

  .legend {
    gap: 3px 9px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .detail h2 {
    font-size: 25px;
  }

  .detail {
    max-height: 78dvh;
    padding: 19px 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
