.map-topline, .map-lens-tools, .lens-settings, .lens-scale, .map-expand, .lens-toggle {
  display: flex;
  align-items: center;
}
.map-topline { gap: 6px 14px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.map-topline .map-switch { margin: 0; }
.map-expand, .lens-toggle { gap: 6px; min-height: 38px; font-size: .875rem; font-weight: 600; }
.map-expand { color: var(--pine); padding-inline: 4px; }
.map-expand:hover { text-decoration: underline; text-underline-offset: 4px; }
.map-expand .icon, .lens-toggle .icon { width: 17px; height: 17px; }
.lens-map {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  width: 100%;
  background: #edf1e7;
  box-shadow: 0 0 0 1px #d4dcca;
}
.lens-map > img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.lens-map.lens-active, .viewer-board.lens-active .picture-scroll { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.lens-map.lens-active, .viewer-board.lens-active #picture-large { cursor: crosshair; }
.lens-map:focus-visible, .viewer-board.lens-active .picture-scroll:focus-visible { outline: 2px solid #987444; outline-offset: -2px; }
.map-glass {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  border-radius: 50%;
  background-color: #f5f6ef;
  background-repeat: no-repeat;
  pointer-events: none;
  will-change: transform;
  user-select: none;
  outline: 1px solid #48594e;
  box-shadow: 0 0 0 4px #fffdf4, 0 0 0 5px #263e349c, 0 7px 17px #132e294d;
}
.map-lens-tools { flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 11px 0 7px; }
.lens-settings { gap: 13px; }
.lens-toggle { padding: 4px 11px; border-radius: 3px; border: 1px solid #9baa95; color: #34503c; background: #fcfcf7; white-space: nowrap; }
.lens-toggle[aria-pressed="true"] { color: #f5f3e6; border-color: #224b3c; background: #244b3d; }
#lens-state { font-size: .78rem; opacity: .86; font-weight: 400; }
.lens-scale { gap: 6px; color: #495c49; font-size: .875rem; white-space: nowrap; }
.lens-scale .select-wrap { display: inline-flex; }
.lens-scale select { min-height: 38px; border: 1px solid #b4c0ac; border-radius: 3px; padding: 3px 26px 3px 8px; font: 600 .9rem var(--sans); background: #fcfcf7; color: var(--pine); }
.lens-scale .select-wrap .icon { width: 12px; right: 8px; }
.lens-scale select:disabled { opacity: .55; }
#map-lens-hint { color: #465a49; font-size: .86rem; line-height: 1.6; }
.map-figure:has(.lens-map) figcaption { margin-top: 3px; }
.viewer-board { display: flex; flex-direction: column; position: relative; min-height: 0; min-width: 0; flex: 1; overflow: hidden; }
#map-viewer-tools { flex: none; padding-inline: 19px; border-bottom: 1px solid var(--rule); background: #fafaf5; }
#map-viewer-tools .map-lens-tools { padding-block: 7px; }
.viewer.location-viewer { width: min(96vw, 1530px); height: min(92dvh, 1080px); }
@media (max-width: 720px) {
  .viewer.location-viewer { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .lens-settings { gap: 10px; }
  #map-viewer-tools { padding-inline: 12px; }
  .map-expand { min-height: 39px; }
}
@media (max-width: 430px) {
  .map-lens-tools { align-items: flex-start; flex-direction: column; }
  .lens-toggle, .lens-scale select, .map-expand { min-height: 41px; }
  .lens-scale select { font-size: 1rem; }
  #map-lens-hint { font-size: .825rem; }
  .map-topline { column-gap: 5px; }
  .map-topline .map-switch button { padding-inline: 8px; }
}
