:root {
  color-scheme: light;
  --paper: rgba(252, 250, 244, 0.92);
  --paper-border: rgba(45, 63, 54, 0.16);
  --ink: #14261d;
  --muted: #5e6d65;
  --green: #2f7d44;
  --green-fill: #63b57d;
  --blue: #1659a7;
  --blue-fill: #61a6ff;
  --orange: #b75a19;
  --orange-fill: #ffad61;
  --rust: #914117;
  --rust-fill: #e58b52;
  --shadow: 0 18px 48px rgba(15, 26, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(153, 199, 173, 0.22), transparent 32%),
    linear-gradient(180deg, #eef3ec 0%, #e3ece6 100%);
}

#map {
  width: 100vw;
  height: 100vh;
}

.panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  width: min(292px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--paper-border);
  border-radius: 16px;
  background: var(--paper);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  gap: 6px;
}

.filter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(20, 38, 29, 0.08);
}

.filter input {
  margin: 0;
  accent-color: var(--ink);
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid transparent;
}

.swatch-public-campsite {
  background: var(--green-fill);
  border-color: var(--green);
}

.swatch-public-rest-site {
  background: var(--blue-fill);
  border-color: var(--blue);
}

.swatch-private-paid-campsite {
  background: var(--rust-fill);
  border-color: var(--rust);
}

.swatch-private-paid-camping {
  background: var(--orange-fill);
  border-color: var(--orange);
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.popup a {
  color: inherit;
}

.leaflet-control-layers {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

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

.popup {
  min-width: 220px;
}

.popup h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.2;
}

.popup dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  font-size: 13px;
}

.popup dt {
  font-weight: 700;
}

.popup dd {
  margin: 0;
}

.popup-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.popup-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 720px) {
  .panel {
    width: min(272px, calc(100vw - 24px));
    top: 12px;
    left: 12px;
    padding: 8px;
  }

  .filter {
    padding: 7px 9px;
  }

  .filter-label {
    gap: 8px;
    font-size: 12px;
  }

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