/* Parchment controls, shaded relief and saddle-brown survey marks. */
.map-frame {
  --map-accent: #8c4b2d;
  --map-ink: #302b24;
  --map-glass: rgba(253, 250, 241, 0.96);
  --map-stroke: #aa9f89;
  background: #d1d5bf;
  border: 1px solid #beb7a4;
  color: var(--map-ink);
  border-radius: 2px;
  isolation: isolate;
}
.map-frame #atlas-map {
  background: #d8dcc9;
  color: var(--map-ink);
  font-family: var(--body);
}
.map-toolbar {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.map-frame .map-mode {
  position: relative;
  top: auto;
  left: auto;
}
.map-frame .map-chip,
.map-frame .map-actions button {
  background: var(--map-glass);
  color: #393127;
  border: 1px solid var(--map-stroke);
  border-radius: 2px;
  box-shadow: 0 2px 8px #352a1720;
}
.map-frame .map-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 7px 10px;
  gap: 7px;
  font: 650 12px/1 var(--body);
}
.map-frame .map-chip svg:first-child {
  color: #6d614d;
}
.map-frame .map-chip:focus-visible,
.map-frame .map-actions button:focus-visible,
.map-frame .layer-menu button:focus-visible,
.map-frame .map-inspected :is(button, a):focus-visible {
  outline: 2px solid var(--map-accent);
  outline-offset: 2px;
}
.map-frame .map-chip:hover,
.map-frame .map-actions button:hover,
.map-frame .layer-menu button:hover {
  background: #ece7d9;
  color: #332b22;
  border-color: #99765b;
}
.map-frame .map-chip[aria-expanded='true'] {
  border-color: var(--map-accent);
}
.map-frame .layer-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  min-width: 160px;
  padding: 4px;
  border-radius: 2px;
  border: 1px solid var(--map-stroke);
  background: #fbf7ec;
  box-shadow: 0 6px 20px #41352530;
}
.map-frame .layer-menu button {
  width: 100%;
  min-height: 35px;
  padding: 9px;
  text-align: left;
  color: #504837;
  border-radius: 1px;
  font: 600 12px/1.25 var(--body);
}
.map-frame .layer-menu button[aria-pressed='true'] {
  color: var(--map-accent);
  background: #efe6d7;
}
.map-frame .map-actions {
  right: 14px;
  top: 14px;
  gap: 6px;
}
.map-frame .map-actions button {
  width: 35px;
  height: 35px;
}
.map-frame .zoom-pair button:first-child {
  border-radius: 3px 3px 0 0;
}
.map-frame .zoom-pair button:last-child {
  border-radius: 0 0 3px 3px;
}
.map-frame .map-key {
  gap: 11px;
  padding: 8px 10px;
  left: 14px;
  bottom: 17px;
  background: var(--map-glass);
  border: 1px solid var(--map-stroke);
  border-radius: 2px;
  color: #393127;
  box-shadow: 0 2px 8px #352a1720;
}
.map-frame .map-key b {
  color: #6c6657;
  font-weight: 500;
}
.map-frame .map-key .grade {
  color: #433a2e;
}
.map-frame .map-key .grade i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.map-frame .map-key .grade.easy i {
  border: 1px solid #807b6c;
  background: #ffffff;
}
.map-frame .map-key .grade.medium i {
  background: #4296ff;
}
.map-frame .map-key .grade.hard i {
  background: #ff812e;
}
.map-frame .map-mark > span {
  border: 1.5px solid #fff9e9;
  background: #4f5d4e;
  border-radius: 50%;
  color: #fffcf2;
  box-shadow:
    0 0 0 2px #75685266,
    0 2px 5px #403b3849;
  transition:
    color 0.14s ease,
    background-color 0.14s ease,
    box-shadow 0.16s ease;
}
.map-frame .map-mark.cluster > span {
  border-color: #fff5d9;
}
.map-frame .map-mark.cluster small {
  right: -8px;
  top: -6px;
  min-width: 17px;
  padding: 0 3px;
  border-radius: 2px;
  border: 1px solid #fff4df;
  background: var(--map-accent);
  color: #fffaf0;
  font: 600 9px/15px var(--mono);
}
.map-frame .map-mark.is-hot > span,
.map-frame .map-mark:hover > span,
.map-frame .map-mark:focus-visible > span {
  color: #372c22;
  background: var(--hot, var(--map-accent));
  border-color: #544734;
  box-shadow:
    0 0 0 1px var(--hot, var(--map-accent)),
    0 0 0 4px #fbf1dca6;
}
.map-frame .geo-label {
  font: 650 11px/1.2 var(--body) !important;
  letter-spacing: 0.005em;
  color: #34382b;
  text-shadow:
    0 1px 2px #fff3d9,
    1px 0 2px #fff3d9,
    -1px 0 2px #fff3d9;
}
.map-frame .geo-label.country {
  font: 500 10px/1.2 var(--mono) !important;
  color: #77644c;
  letter-spacing: 0.14em;
}
.map-frame .geo-label.water {
  font: 500 10px/1.2 var(--mono) !important;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #4b7377;
  text-shadow: 0 1px 2px #d9e9de;
}
.map-frame .leaflet-control-scale-line {
  color: #484b38;
  border-color: #696d57;
  background: #fcf7e6bb;
  text-shadow: 0 1px 2px #faf7e8;
}
.map-frame .leaflet-control-attribution {
  color: #4e5346 !important;
  background: #fff9e8d9 !important;
  padding: 2px 5px;
  font-size: 9px !important;
}
.map-frame .leaflet-control-attribution a {
  color: #48554f !important;
}
.map-frame .leaflet-tooltip {
  color: #40392c;
  border: 1px solid #ab9e86;
  border-radius: 2px;
  background: #fcf8ec;
  box-shadow: 0 3px 10px #4d392638;
}
.map-frame .leaflet-tooltip-top::before {
  border-top-color: #a9997c;
}
.map-frame .leaflet-popup-content-wrapper,
.map-frame .leaflet-popup-tip {
  background: #fbf6ea;
  color: #39352a;
}
.map-frame .leaflet-popup-content-wrapper {
  border: 1px solid #a89b83;
  border-radius: 4px;
}
.map-frame .leaflet-popup-close-button {
  color: #554c3c !important;
}
.map-frame .leaflet-popup-content {
  margin: 15px 18px 12px 13px;
}
.map-frame .cluster-pop {
  font: 600 13px/1.4 var(--body);
}
.map-frame .cluster-items {
  scrollbar-color: #bdb49d #f3eddf;
}
.map-frame .cluster-items a {
  border-color: #d6ccba;
  color: #554a3d;
  min-height: 35px;
  font-size: 12px;
}
.map-frame .cluster-items a:where(:hover, :focus-visible),
.map-frame .cluster-zoom {
  color: var(--map-accent);
}
.map-frame .map-inspected {
  position: absolute;
  z-index: 2;
  bottom: 63px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 29px);
  padding: 7px 8px 8px 10px;
  background: #fdf8edf5;
  border: 1px solid #ad9d81;
  border-left: 3px solid var(--map-accent);
  border-radius: 2px;
  box-shadow: 0 5px 14px #4e382d2e;
}
.map-inspected > div {
  min-width: 0;
}
.map-inspected .map-preview-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #706653;
  font: 500 9px/1.4 var(--mono);
  text-transform: uppercase;
}
.map-inspected strong {
  display: block;
  font: 750 14px/1.2 var(--body);
  color: #40372c;
}
.map-inspected .map-open-trail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--map-accent);
  font: 700 12px/1.2 var(--body);
  white-space: nowrap;
}
.map-inspected button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  color: #5b503d;
}
.map-position {
  display: none;
}
html.has-expanded-map {
  overflow: hidden;
}
dialog.map-focus-dialog[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #d7dcc7;
  overflow: hidden;
  color: #40372c;
}
.map-focus-dialog::backdrop {
  background: #d7dcc7;
}
.map-focus-dialog .map-frame.is-expanded {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.map-focus-dialog .map-mode {
  top: auto;
  left: auto;
}
.map-focus-dialog .map-toolbar {
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
}
.map-focus-dialog .map-actions {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}
.map-focus-dialog .map-position {
  display: block;
  position: absolute;
  z-index: 2;
  pointer-events: none;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(49px, env(safe-area-inset-bottom));
  padding: 5px 7px;
  color: #655944;
  background: #fbf7e9ed;
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 690px) {
  .map-toolbar {
    left: 8px;
    top: 8px;
    gap: 4px;
  }
  .map-frame .map-actions {
    right: 8px;
    top: 8px;
    gap: 5px;
  }
  .map-frame .map-mode {
    top: auto;
    left: auto;
  }
  .map-frame .map-chip {
    font-size: 11px;
    min-height: 37px;
    padding: 6px 8px;
    gap: 4px;
  }
  .map-frame .map-actions button {
    width: 37px;
    height: 37px;
  }
  .map-frame .map-key {
    gap: 8px;
    padding: 6px 8px;
    left: 8px;
  }
  .map-frame .map-key b {
    font-size: 7px;
  }
  .map-frame .map-inspected {
    left: 8px;
    bottom: 57px;
    max-width: calc(100% - 16px);
    gap: 7px;
  }
  .map-inspected strong {
    font-size: 12px;
  }
  .map-inspected .map-open-trail {
    font-size: 11px;
  }
  .map-focus-dialog .map-position {
    bottom: 51px;
    right: 8px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-frame .map-mark > span {
    transition: none;
  }
}

.map-frame .geo-label.country {
  font:
    500 11px/1.2 Georgia,
    serif !important;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.map-frame .geo-label.water,
.map-frame .geo-label.range {
  font:
    italic 13px/1.2 Georgia,
    serif !important;
  text-transform: none;
  letter-spacing: 0.04em;
}
.map-frame .geo-label.range {
  color: #546541;
}
.map-frame .geo-label.local {
  font-weight: 500 !important;
  font-size: 11px !important;
}
.map-frame .geo-label.local.peak {
  color: #64533d;
}
.map-frame .geo-label.local.hut {
  color: #774b36;
}
.map-frame .map-mark.cluster small {
  border-radius: 12px;
}
.map-frame .map-mark > span {
  border-width: 2px;
}
.map-frame .map-chip:active,
.map-frame .map-actions button:active {
  background: #e3d9c3;
}
