#background-map-control {
  position: fixed;
  bottom: 24px;
  left: 12px;
  z-index: 13;
}
nav #nearest-water {
  background: #e4f4fb;
  color: #12506b;
}
nav #nearest-green {
  background: #173d36;
  color: #fff;
}
@media (min-width: 701px) {
  nav {
    max-width: calc(100vw - 100px);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
@media (max-width: 700px) {
  body nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
#background-map-toggle {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #c4d2cc;
  border-radius: 16px;
  background: #fff;
  color: #173d36;
  box-shadow: 0 5px 18px #173d3626;
  cursor: pointer;
}
#background-map-toggle[aria-expanded="true"] {
  background: #175b49;
  color: #fff;
}
#background-map-options {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: calc(100vw - 48px);
  display: grid;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #c4d2cc;
  border-radius: 16px;
  background: #fff;
  color: #173d36;
  box-shadow: 0 5px 18px #173d3626;
  font-size: 11px;
  font-weight: 700;
}
#background-map-options button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #c4d2cc;
  background: #fff;
  color: #173d36;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
#background-map-options button[aria-pressed="true"] {
  background: #175b49;
  color: #fff;
  border-color: #175b49;
}
#background-map-options button[aria-pressed="true"]::after {
  content: " ✓";
}
#background-map-options button:focus-visible,
#background-map-toggle:focus-visible {
  outline: 2px solid #175b49;
  outline-offset: 2px;
}
body.esri-background .base-map canvas {
  filter: none;
}
/* Detail sheets occupy this corner; restore the selector when closed. */
body:has(#sheet:not([hidden])) #background-map-control {
  visibility: hidden;
}
