:root {
  color-scheme: light;
  --ink: #1f2922;
  --muted: #6b756d;
  --paper: #f6f4ed;
  --panel: #fffdf8;
  --line: #dddcd3;
  --forest: #35704b;
  --forest-dark: #204b32;
  --accent: #dc6b43;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.map-panel {
  height: 100dvh;
  width: 100%;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(34px, 3vw, 45px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin-bottom: 16px;
  max-width: 310px;
}

.intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 26px;
  max-width: 310px;
}

.layer-card {
  background: #edf1e7;
  border: 1px solid #d9dfd2;
  border-radius: 4px;
  margin-bottom: 28px;
  padding: 16px;
}

.switch-row {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
}

.layer-symbol {
  align-items: center;
  background: var(--forest-dark);
  border-radius: 50%;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.layer-symbol svg {
  fill: #dce7cd;
  height: 21px;
  width: 21px;
}

.switch-copy strong,
.switch-copy small {
  display: block;
}

.switch-copy strong {
  font-size: 13px;
}

.switch-copy small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.switch-row input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch {
  background: #aeb8ad;
  border-radius: 20px;
  height: 22px;
  padding: 3px;
  transition: background 160ms ease;
  width: 38px;
}

.switch::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px #20332644;
  content: "";
  display: block;
  height: 16px;
  transition: transform 160ms ease;
  width: 16px;
}

.switch-row input:checked + .switch {
  background: var(--forest);
}

.switch-row input:checked + .switch::after {
  transform: translateX(16px);
}

.switch-row input:focus-visible + .switch {
  outline: 3px solid #dc6b4377;
  outline-offset: 2px;
}

.opacity-control {
  align-items: center;
  border-top: 1px solid #d4dbcf;
  display: grid;
  font-size: 10px;
  grid-template-columns: 1fr auto;
  margin-top: 14px;
  padding-top: 12px;
}

.opacity-control output {
  color: var(--forest-dark);
  font-weight: 700;
}

.opacity-control input {
  accent-color: var(--forest);
  grid-column: 1 / -1;
  margin: 8px 0 0;
  width: 100%;
}

.places-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.places-heading .eyebrow {
  margin-bottom: 4px;
}

h2 {
  font-family: "DM Serif Display", serif;
  font-size: 25px;
  font-weight: 400;
  margin-bottom: 0;
}

.count {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 11px;
  height: 27px;
  justify-content: center;
  width: 27px;
}

.places-list {
  margin: 0 -8px;
  min-height: 0;
  overflow: auto;
  padding: 4px 8px 14px;
}

.place-card {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  padding: 15px 4px;
  text-align: left;
  transition: padding 160ms ease, background 160ms ease;
  width: 100%;
}

.place-card:hover,
.place-card:focus-visible,
.place-card.active {
  background: #f3f0e7;
  outline: none;
  padding-left: 10px;
  padding-right: 10px;
}

.place-color {
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #26302722;
  height: 14px;
  width: 14px;
}

.place-card strong,
.place-card small {
  display: block;
}

.place-card strong {
  font-size: 13px;
  margin-bottom: 4px;
}

.place-card small {
  color: var(--muted);
  font-size: 10px;
}

.place-arrow {
  color: #9da39d;
  font-size: 18px;
}

.loading-message,
.error-message {
  color: var(--muted);
  font-size: 12px;
  padding: 18px 4px;
}

.error-message {
  color: #9a3f2b;
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  color: #929890;
  font-size: 10px;
  padding-top: 14px;
}

.sidebar-footer a {
  color: var(--forest-dark);
  font-weight: 600;
  margin-left: 4px;
}

.map-panel,
#map {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.map-panel {
  background: #d8ddce;
  position: relative;
}

.leaflet-container {
  background: #d8ddce;
  font-family: "DM Sans", sans-serif;
}

.desaturated-tiles {
  filter: saturate(0.2);
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 5px 20px #26372b29 !important;
  margin-left: 20px !important;
  margin-top: 20px !important;
}

.leaflet-control-zoom a {
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.leaflet-control-attribution {
  background: #fffdf8dd !important;
  color: #687069 !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a {
  color: var(--forest-dark) !important;
}

.camp-marker {
  background: transparent;
  border: 0;
}

.camp-pin {
  align-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 3px 9px #17241a55;
  display: flex;
  height: 34px;
  justify-content: center;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
  width: 34px;
}

.camp-pin::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.leaflet-marker-icon:hover .camp-pin,
.camp-marker.selected .camp-pin {
  transform: rotate(-45deg) scale(1.18);
}

.leaflet-popup-content-wrapper {
  border-radius: 3px;
  box-shadow: 0 8px 28px #25332933;
}

.leaflet-popup-content {
  margin: 14px 16px;
}

.popup-eyebrow {
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.leaflet-popup-content strong {
  display: block;
  font-family: "DM Serif Display", serif;
  font-size: 19px;
  font-weight: 400;
  margin: 3px 0 6px;
}

.leaflet-popup-content small {
  color: var(--muted);
}

.trail-popup {
  min-width: 240px;
}

.trail-popup > strong {
  align-items: center;
  display: flex;
  gap: 8px;
}

.trail-popup > strong i {
  border-radius: 3px;
  display: inline-block;
  height: 5px;
  width: 25px;
}

.trail-popup dl {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 1fr;
  margin: 12px 0;
}

.trail-popup dl div {
  border-bottom: 1px solid var(--line);
  padding: 7px 3px;
}

.trail-popup dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trail-popup dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  margin: 3px 0 0;
}

.trail-popup > a {
  color: var(--forest-dark);
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.trail-popup > a:hover {
  text-decoration: underline;
}

.map-key,
.trail-key,
.map-status,
.mobile-places-button {
  background: #fffdf8ed;
  border: 1px solid #deddd3;
  box-shadow: 0 4px 18px #2f3b3224;
  position: absolute;
  z-index: 800;
}

.map-key {
  bottom: 28px;
  display: grid;
  font-size: 10px;
  font-weight: 600;
  gap: 7px;
  left: 20px;
  padding: 9px 12px;
  text-transform: uppercase;
}

.map-key span {
  align-items: center;
  display: flex;
  gap: 8px;
}

.forest-swatch {
  border: 1px solid #245c3b;
  display: inline-block;
  height: 12px;
  width: 18px;
}

.forest-swatch.domain {
  background: #4d8b58;
}

.forest-swatch.communal {
  background: #71a970;
  border-color: #467b4e;
}

.boundary-swatch {
  border-top: 3px dotted #c9473b;
  display: inline-block;
  height: 3px;
  width: 18px;
}

.point-swatch {
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #26302744;
  display: inline-block;
  height: 11px;
  margin-left: 3px;
  margin-right: 4px;
  width: 11px;
}

.point-swatch.fireplace {
  background: #39734f;
}

.point-swatch.picnic {
  background: #d4a129;
}

.trail-swatch {
  background: linear-gradient(
    90deg,
    #2667a8 0 12.5%,
    #d07a18 12.5% 25%,
    #744c9e 25% 37.5%,
    #c03d59 37.5% 50%,
    #168a96 50% 62.5%,
    #9b6b27 62.5% 75%,
    #d04f9a 75% 87.5%,
    #4d5fc1 87.5%
  );
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #26302755;
  display: inline-block;
  height: 8px;
  width: 22px;
}

.trail-key {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
  right: 14px;
  top: 14px;
}

.trail-key strong {
  border-bottom: 1px solid var(--line);
  font-family: "DM Serif Display", serif;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 2px;
  padding-bottom: 6px;
}

.trail-key span {
  align-items: center;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  gap: 8px;
  text-transform: uppercase;
}

.trail-key i {
  background: var(--trail-color);
  border-radius: 3px;
  display: inline-block;
  height: 4px;
  width: 22px;
}

.map-status {
  color: #943f2d;
  font-size: 11px;
  left: 50%;
  padding: 10px 14px;
  top: 18px;
  transform: translateX(-50%);
}

.mobile-places-button {
  border-radius: 20px;
  color: var(--ink);
  display: none;
  font-size: 12px;
  font-weight: 700;
  left: 50%;
  padding: 9px 16px;
  top: 14px;
  transform: translateX(-50%);
}

@media (max-width: 780px) {
  .map-key {
    bottom: 20px;
    left: 12px;
  }

  .leaflet-control-zoom {
    margin-left: 12px !important;
    margin-top: 14px !important;
  }
}
