/* Web search sits opposite the Explorer; results unfold down from the pill. */
.public-map-search--dock {
  --search-top: calc(var(--ara-top-nav-height, 64px) + 20px);
  position: fixed; z-index: 80; top: var(--search-top); right: 20px; left: auto; bottom: auto;
  width: min(400px, calc(100vw - 480px)); max-width: none;
  transform: none; pointer-events: auto; box-shadow: none;
  font-family: 'ARA Instrument Sans', sans-serif;
}
body[data-always-explorer] .public-map-search--dock { width: min(400px, calc(100vw - 480px)); }
@media (min-width: 768px) {
  body[data-always-explorer]:not(.mobile-public-map):not([data-collection-embed]):not(.map-controls-entered) .public-map-search--dock,
  body[data-always-explorer]:not(.mobile-public-map):not([data-collection-embed]):not(.map-controls-entered) .side-panel {
    visibility: hidden;
  }
}
@media (min-width: 1880px) { .public-map-search--dock { --search-top: 12px; } }
.public-map-search--dock #mapSearch {
  width: 100%; height: 56px; padding: 0 22px 0 52px; border-radius: 999px;
  border: 1px solid var(--ara-map-glass-border); background: var(--ara-map-glass-background);
  backdrop-filter: blur(var(--ara-map-glass-blur)); -webkit-backdrop-filter: blur(var(--ara-map-glass-blur));
  color: #f8fafc; font: 450 16px/1.3 'ARA Instrument Sans', sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); outline: none;
  transition: border-radius .4s cubic-bezier(.22,1,.36,1), border-color .2s ease, box-shadow .2s ease;
}
.public-map-search--dock #mapSearch::placeholder { color: #c3cfdd; opacity: 1; }
.public-map-search--dock #mapSearch:focus { border-color: rgba(147,197,253,.65); box-shadow: 0 0 0 3px rgba(147,197,253,.12), 0 10px 30px rgba(0,0,0,.2); }
.public-map-search--dock .material-symbols-rounded { left: 20px; z-index: 1; color: #f8fafc; font-size: 22px; pointer-events: none; }
.public-map-search--dock .group:focus-within > .material-symbols-rounded { color: #f8fafc; }
.public-map-search--dock #searchResults {
  position: absolute; top: calc(100% + 7px); bottom: auto; left: auto; right: 0; margin: 0;
  --search-photo-height: 0px; --search-photo-gap: 0px;
  display: flex; flex-direction: column; width: 100%; padding: 4px; gap: 0;
  max-height: none; overflow: hidden;
  border: 1px solid var(--ara-map-glass-border); border-radius: 14px;
  background: var(--ara-map-glass-background); backdrop-filter: blur(var(--ara-map-glass-blur));
  -webkit-backdrop-filter: blur(var(--ara-map-glass-blur)); box-shadow: 0 18px 50px rgba(0,0,0,.3);
  transform-origin: top right;
  animation: ara-map-search-reveal .42s cubic-bezier(.22,1,.36,1) both;
}
.public-map-search--dock #searchResults.hidden { display: none; }
.public-map-search--dock #searchResults.has-photo {
  --search-photo-height: min(180px, 24dvh);
  --search-photo-gap: 12px;
}
.public-map-search__list {
  position: relative; flex-shrink: 0; min-height: 0; padding: 3px; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; scroll-padding-block: 3px;
  scrollbar-width: thin; scrollbar-color: #49617b transparent;
}
.public-map-search__highlight {
  position: absolute; left: 3px; right: 3px; top: 0; height: 0; pointer-events: none;
  border-radius: 10px; background: rgba(255,255,255,.08); opacity: 0;
  transition: transform .4s cubic-bezier(.22,1,.36,1), height .4s cubic-bezier(.22,1,.36,1), opacity .3s;
}
.public-map-search__highlight.is-visible { opacity: 1; }
.public-map-search--dock .search-result-item {
  position: relative; box-sizing: border-box; width: 100%; height: 68px; padding: 12px 13px; gap: 0; justify-content: center; text-align: left;
  scroll-snap-align: start; border: 0; border-radius: 10px;
  background: transparent; color: #f8fafc;
}
.public-map-search--dock .search-result-item:hover, .public-map-search--dock .search-result-item.is-active { background: transparent; }
.public-map-search--dock .search-result-item > div:first-child { font: 500 15px/1.3 'ARA Instrument Sans', sans-serif; letter-spacing: -.01em; color: #f8fafc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-map-search--dock .search-result-item > div:last-child {
  max-width: 100%; margin-top: 4px; font: 400 12.5px/1.4 'ARA Instrument Sans', sans-serif; color: #c3cfdd;
  white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis;
}
.public-map-search--dock .search-result-item > div { transition: transform .4s cubic-bezier(.22,1,.36,1), color .3s; }
.public-map-search--dock .search-result-item.is-active > div { transform: translateX(2px); }
.public-map-search--dock .search-result-item.is-active > div:last-child { color: #e0e7ee; }
.public-map-search__scroll-hint {
  height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  margin: 0 3px; padding: 0 10px; border-top: 1px solid rgba(255,255,255,.08);
  color: #c3cfdd; font-size: 11px; line-height: 1;
}
.public-map-search__scroll-hint[hidden] { display: none; }
.public-map-search__visual {
  position: relative; flex-shrink: 0; min-width: 0; height: var(--search-photo-height); margin-top: var(--search-photo-gap);
  overflow: hidden; border-radius: 10px; background: #233649; opacity: 0; transform: translateY(-4px);
  transition: height .42s cubic-bezier(.22,1,.36,1), margin-top .42s cubic-bezier(.22,1,.36,1), opacity .25s ease, transform .42s cubic-bezier(.22,1,.36,1);
}
.public-map-search--dock #searchResults.has-photo .public-map-search__visual { opacity: 1; transform: translateY(0); }
.public-map-search__preview-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.045);
  transition: opacity .5s ease, transform .85s cubic-bezier(.22,1,.36,1);
}
.public-map-search__preview-image.is-selected { opacity: 1; transform: scale(1); }
.public-map-search--dock.public-map-search--legacy #searchResults {
  display: block; width: 100%; padding: 4px; overflow-y: auto;
  max-height: min(348px, calc(100dvh - var(--search-top) - 92px));
}
.public-map-search--dock.public-map-search--legacy #searchResults.hidden { display: none; }
.public-map-search--dock.public-map-search--legacy .search-result-item:hover { background: rgba(255,255,255,.08); }
.public-map-search__empty { padding: 20px; color: #d5dde7; font-size: 14px; line-height: 1.5; }
.public-map-search__status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-collection-embed] .public-map-search--dock { --search-top: 16px; right: 16px; width: min(400px, calc(100vw - 400px)); }
.public-map-search--dock.is-revealing .search-result-item > div {
  animation: ara-map-search-row .34s cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(70ms + var(--search-row, 0) * 22ms);
}
@media (max-width: 767px) {
  body .public-map-search--dock, body[data-always-explorer] .public-map-search--dock, body[data-collection-embed] .public-map-search--dock {
    left: 16px; right: 16px; width: calc(100% - 32px);
  }
  .public-map-search--dock #mapSearch { font-size: 15px; }
}
@keyframes ara-map-search-reveal {
  from { opacity: 0; transform: translateY(-10px) scale(.975); clip-path: inset(0 0 100% 0 round 14px); }
  45% { opacity: 1; }
  to { opacity: 1; transform: translateY(0) scale(1); clip-path: inset(0 0 0 0 round 14px); }
}
@keyframes ara-map-search-row { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  body[data-always-explorer] .public-map-search--dock { animation: none; }
  body[data-always-explorer] .side-panel { transition-duration: .01ms !important; }
  .public-map-search--dock #searchResults, .public-map-search--dock.is-revealing .search-result-item > div { animation: none; }
  .public-map-search--dock #mapSearch, .public-map-search__highlight, .public-map-search--dock .search-result-item > div, .public-map-search__preview-image, .public-map-search__visual, .public-map-search__list { transition-duration: .01ms; }
}

/* Short windows keep complete result rows; restore photos when space returns. */
.public-map-search--dock.is-short #searchResults.has-photo { --search-photo-height: 0px; --search-photo-gap: 0px; }
/* Web map controls and phone sheet; Capacitor uses its own HTML and gestures. */
body:not(.mobile-public-map) #layerToggle, body:not(.mobile-public-map) #locateMeBtn {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: var(--ara-map-glass-background); border: 1px solid var(--ara-map-glass-border);
  backdrop-filter: blur(var(--ara-map-glass-blur)); -webkit-backdrop-filter: blur(var(--ara-map-glass-blur));
  box-shadow: 0 6px 20px #0003;
}
.map-sheet-toolbar, .map-explorer-launcher, .map-search-toggle { display: none; }
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  body:not(.mobile-public-map) { --map-sheet-half: calc(var(--map-viewport-height, 100dvh) * .5); }
  body:not(.mobile-public-map) #sidePanel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: var(--map-sheet-half); max-height: calc(var(--map-viewport-height, 100dvh) - 76px - env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom); border-radius: 24px 24px 0 0;
    transform: translateY(calc(100% + 12px)); will-change: transform;
    transition: height .34s cubic-bezier(.22,1,.36,1), transform .34s cubic-bezier(.22,1,.36,1);
    z-index: 100;
  }
  body:not(.mobile-public-map) #sidePanel.open { transform: translateY(0); }
  body:not(.mobile-public-map) #sidePanel[data-sheet="full"] { height: calc(var(--map-viewport-height, 100dvh) - 76px - env(safe-area-inset-top)); }
  body:not(.mobile-public-map) #sidePanel[data-sheet="closed"] { height: 0; }
  body:not(.mobile-public-map) #sidePanel.is-dragging { transition: none; }
  .map-sheet-toolbar {
    --map-sheet-action-width: 40px;
    display: flex; position: relative; flex: 0 0 36px; align-items: stretch;
    padding-inline: max(2px, env(safe-area-inset-left), env(safe-area-inset-right));
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .map-sheet-toolbar button {
    display: grid; place-items: center; min-width: var(--map-sheet-action-width);
    padding: 0; border: 0; border-radius: 8px; background: transparent;
    color: #f8fafc; cursor: pointer;
  }
  .map-sheet-toolbar button:disabled { opacity: .4; cursor: default; }
  .map-sheet-toolbar .material-symbols-rounded { font-size: 20px; line-height: 1; }
  .map-sheet-toolbar .map-sheet-handle {
    flex: 1; touch-action: none;
    padding-inline-start: min(calc(3 * var(--map-sheet-action-width)), 40%);
  }
  .map-sheet-handle > span { width: 32px; height: 3px; background: #c3cfdd; opacity: .65; border-radius: 4px; }
  #sidePanel #panelContent {
    min-height: 0; overscroll-behavior: contain; touch-action: pan-y; scroll-behavior: auto;
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    padding-bottom: var(--map-panel-content-bottom-padding, 18px);
  }
  #sidePanel #panelContent > .relative { padding-top: 16px; }
  #sidePanel #panelContent > .px-4 { padding-top: 12px; }
  #sidePanel #panelContent > .px-4:not(.map-explorer-list, .map-explorer-header) { padding-right: 16px; }
  #sidePanel .panel-scroll-cue { display: none; }
  .map-explorer-launcher {
    position: fixed; z-index: 110; left: 50%; transform: translateX(-50%);
    bottom: var(--map-tools-bottom, calc(16px + env(safe-area-inset-bottom)));
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 20px; white-space: nowrap; border-radius: 999px;
    color: #f8fafc; font: 500 15px 'ARA Instrument Sans',sans-serif;
    background: var(--ara-map-glass-background); border: 1px solid var(--ara-map-glass-border);
    backdrop-filter: blur(var(--ara-map-glass-blur)); -webkit-backdrop-filter: blur(var(--ara-map-glass-blur)); box-shadow: 0 8px 28px #0004;
  }
  .map-explorer-launcher[hidden] { display: none; }
  body .public-map-search--dock, body[data-always-explorer] .public-map-search--dock, body[data-collection-embed] .public-map-search--dock {
    --search-top: calc(max(8px,env(safe-area-inset-top)) + 66px);
    left: auto; right: 12px; width: 44px; height: 44px;
    transition: width .36s cubic-bezier(.22,1,.36,1);
  }
  body .public-map-search--dock.is-mobile-open { width: calc(100% - 24px); }
  .public-map-search--dock > .group { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s; }
  .public-map-search--dock.is-mobile-open > .group { opacity: 1; visibility: visible; pointer-events: auto; }
  .public-map-search--dock #mapSearch { height: 44px; font-size: 16px; padding-left: 44px; padding-right: 48px; }
  .public-map-search--dock > .group > .material-symbols-rounded { left: 15px; font-size: 20px; }
  .map-search-toggle { position: absolute; right: 0; top: 0; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #f8fafc; background: var(--ara-map-glass-background); border: 1px solid var(--ara-map-glass-border); backdrop-filter: blur(var(--ara-map-glass-blur)); }
  .public-map-search--dock .map-search-toggle .material-symbols-rounded { position: static; font-size: 22px; color: #f8fafc; }
  .public-map-search--dock.is-mobile-open .map-search-toggle { background: transparent; border-color: transparent; backdrop-filter: none; }
  .public-map-search--dock #searchResults.has-photo { --search-photo-height: min(120px,18dvh); }
  body.map-keyboard-open .ara-nav { visibility: hidden; }
  body.map-keyboard-open .public-map-search--dock { --search-top: 8px; }
  .public-map-search--dock.is-short #searchResults.has-photo { --search-photo-height: 0px; --search-photo-gap: 0px; }
  body:not(.mobile-public-map) #layerToggle, body:not(.mobile-public-map) #locateMeBtn {
    position: fixed; right: 12px; left: auto;
  }
  body:not(.mobile-public-map) #layerToggle { top: calc(max(8px,env(safe-area-inset-top)) + 120px) !important; }
  body:not(.mobile-public-map) #locateMeBtn { top: calc(max(8px,env(safe-area-inset-top)) + 170px) !important; bottom: auto; z-index: 40; }
  #sidePanel #panelContent > .px-4:not(.map-explorer-header) > .flex:first-child { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  #sidePanel #panelContent > .px-4:not(.map-explorer-header) > .flex:first-child button { min-height: 40px; min-width: 44px; }
  #sidePanel .map-tree-heading > div { min-width: 0; }
  #sidePanel .map-tree-heading h2 { overflow-wrap: anywhere; }
  #sidePanel .map-tree-taxonomy { display: block; font-size: 15px; line-height: 1.5; }
  #sidePanel [data-fly-tree-id] { min-height: 44px; }
  .leaflet-control-attribution { font-size: 9px; line-height: 1.25; }
  .public-map-search--dock #mapSearch::-webkit-search-cancel-button { filter: grayscale(1) brightness(2); }
  .map-sheet-toolbar button:focus-visible, .map-explorer-launcher:focus-visible, .map-search-toggle:focus-visible { outline: 2px solid #93c5fd; outline-offset: -3px; }
}
@media (prefers-reduced-motion: reduce) {
  #sidePanel, .public-map-search--dock, .public-map-search--dock > .group { transition-duration: .01ms !important; }
}
/* Keep the Explorer, navigation and search in one row on smaller desktops.
   Wide monitors retain the original centered 1000px navigation. */
@media (min-width: 1200px) and (max-width: 1879px) {
  body[data-always-explorer]:not([data-collection-embed]) {
    --map-desktop-explorer-width: clamp(320px, 24vw, 400px);
    --map-desktop-search-width: clamp(240px, 20vw, 400px);
  }

  body[data-always-explorer]:not([data-collection-embed]) .side-panel {
    top: 12px;
    left: 16px;
    width: var(--map-desktop-explorer-width);
  }

  body[data-always-explorer]:not([data-collection-embed]) .public-map-search--dock {
    --search-top: 12px;
    right: 16px;
    width: var(--map-desktop-search-width);
  }

  body[data-always-explorer]:not([data-collection-embed]) .ara-nav--map .ara-nav__bar {
    margin-left: calc(var(--map-desktop-explorer-width) + 32px);
    width: calc(100% - var(--map-desktop-explorer-width) - var(--map-desktop-search-width) - 64px);
    padding: 0 12px;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: 56px;
    top: 12px;
    border-radius: 999px;
    transition: none;
  }

  body[data-always-explorer]:not([data-collection-embed]) .ara-nav--map .ara-nav__brand {
    gap: 0;
  }

  body[data-always-explorer]:not([data-collection-embed]) .ara-nav--map .ara-nav__wordmark {
    display: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    body[data-always-explorer]:not([data-collection-embed], .map-controls-entered) .ara-nav--map.is-compact .ara-nav__bar::before {
      animation: map-nav-reveal .36s cubic-bezier(.22,1,.36,1);
      transition: none;
    }

    body[data-always-explorer]:not([data-collection-embed], .map-controls-entered) .ara-nav--map.is-compact .ara-nav__bar > * {
      animation: map-nav-labels .20s ease-out .12s backwards;
    }
  }

  body[data-always-explorer] .ara-nav--map .ara-nav__categories {
    justify-content: center;
    gap: 0;
  }

  body[data-always-explorer] .ara-nav--map .ara-nav__trigger {
    padding: 0 8px;
    font-size: 14px !important;
  }

  body[data-always-explorer] .ara-nav--map .ara-nav__account {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  body[data-always-explorer] .ara-nav--map #araTopAccountText {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* Let the Explorer heading breathe when its dock is narrower. */
  body[data-always-explorer] #panelContent > .px-4 > .flex:first-child {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@keyframes map-nav-reveal {
  from { transform: scaleX(.04); }
  to { transform: scaleX(1); }
}

@keyframes map-nav-labels {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Web-only map controls. */
.web-map-chrome {
  --map-credits-height: 0px;
  --map-credits-left-clearance: 12px;
  --map-bottom-clearance: max(env(safe-area-inset-bottom), var(--map-credits-height));
  --map-tools-bottom: calc(var(--map-bottom-clearance) + 12px);
  --map-tools-right: calc(20px + env(safe-area-inset-right));
}
.web-map-chrome:has(#sidePanel.open) { --map-credits-left-clearance: 432px; }
.web-map-chrome[data-collection-embed]:has(#sidePanel.open) { --map-credits-left-clearance: 338px; }
.web-map-chrome .map-tools {
  position: fixed; right: var(--map-tools-right); bottom: var(--map-tools-bottom);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; width: 44px;
}
.web-map-chrome .map-tools #layerToggle, .web-map-chrome .map-tools #locateMeBtn {
  position: static !important; inset: auto !important; margin: 0 !important; flex-shrink: 0;
}
.web-map-chrome .map-tools .leaflet-control-zoom { display: contents !important; }
.web-map-chrome .map-tools .leaflet-control-zoom a {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 1px solid var(--ara-map-glass-border); border-radius: 50%; background: var(--ara-map-glass-background);
  backdrop-filter: blur(var(--ara-map-glass-blur)); -webkit-backdrop-filter: blur(var(--ara-map-glass-blur));
  box-shadow: 0 6px 20px #0003; color: #f8fafc; font: 400 24px/1 'ARA Instrument Sans',sans-serif;
  text-decoration: none; cursor: pointer; transition: transform .2s, border-color .2s, color .2s;
}
.web-map-chrome .map-tools .leaflet-control-zoom a span { font: inherit; }
.web-map-chrome .map-tools .leaflet-control-zoom a:hover { border-color: #93c5fd80; }
.web-map-chrome .map-tools .leaflet-control-zoom a:active { transform: scale(.95); }
.web-map-chrome .map-tools .leaflet-control-zoom a.leaflet-disabled { color: #94a3b8; cursor: default; }
.web-map-chrome .map-tools :focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .web-map-chrome { --map-tools-right: calc(12px + env(safe-area-inset-right)); }
  .web-map-chrome .map-tools .leaflet-control-zoom { display: none !important; }
  .web-map-chrome #sidePanel.open {
    bottom: var(--map-bottom-clearance);
    padding-bottom: 0;
    max-height: calc(var(--map-viewport-height, 100dvh) - 76px - env(safe-area-inset-top) - var(--map-bottom-clearance));
  }
  .web-map-chrome #sidePanel[data-sheet="half"] {
    height: calc(var(--map-sheet-half) - var(--map-credits-height));
  }
  .web-map-chrome .map-tools {
    top: calc(max(8px,env(safe-area-inset-top)) + 120px); bottom: auto;
    display: flex; flex-direction: column; gap: 8px; width: 44px;
  }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) {
    display: flex; flex-direction: column;
    padding-bottom: var(--map-panel-content-bottom-padding, 15px);
  }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child { flex-shrink: 0; }
  .web-map-chrome #panelContent > .map-explorer-list { flex: 1; min-height: 0; height: auto !important; }
  .web-map-chrome:has(#sidePanel[data-sheet="full"]) .map-tools, .web-map-chrome.map-keyboard-open .map-tools { display: none; }
  .web-map-chrome .map-explorer-launcher {
    padding-inline: 16px; gap: 8px; font-size: 14px;
  }
}
@media (max-width: 767px) and (max-height: 464px), (max-width: 1000px) and (max-height: 464px) and (pointer: coarse) {
  .web-map-chrome:has(#sidePanel[data-sheet="half"]) .map-tools {
    top: max(calc(64px + env(safe-area-inset-top)), calc(var(--map-sheet-half) - 104px));
    right: calc(var(--map-tools-right) + 52px);
  }
}
@media (prefers-reduced-motion: reduce) { .web-map-chrome .map-tools .leaflet-control-zoom a { transition: none; } }

/* Persistent radar layers fade out as the fix arrives, rather than disappearing. */
.web-map-chrome #locateMeBtn {
  isolation: isolate; overflow: visible;
  transition: color .45s ease, border-color .45s ease, box-shadow .45s ease;
}
.web-map-chrome #locateMeBtn.locating, .web-map-chrome #locateMeBtn.active {
  animation: none; color: #dbeafe; border-color: var(--ara-map-glass-border);
  box-shadow: 0 6px 20px #0003;
}
.web-map-chrome #locateMeBtn::before, .web-map-chrome #locateMeBtn::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none; opacity: 0;
  transition: opacity .5s ease; animation-play-state: paused;
}
.web-map-chrome #locateMeBtn::before {
  inset: 4px; background: conic-gradient(transparent 0deg 230deg, #60a5fa08 260deg, #93c5fd66 360deg);
  animation: ara-location-sweep 1.5s linear infinite paused;
}
.web-map-chrome #locateMeBtn::after {
  inset: 8px; border: 0; background: radial-gradient(circle, #93c5fd1f, transparent 70%);
  animation: ara-location-breathe 1.8s ease-in-out infinite paused;
}
.web-map-chrome #locateMeBtn.locating::before, .web-map-chrome #locateMeBtn.locating::after { opacity: 1; animation-play-state: running; }
.web-map-chrome #locateMeBtn > span { position: relative; z-index: 1; transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1); }
.web-map-chrome #locateMeBtn.locating > span { opacity: .8; transform: scale(.92); }
.web-map-chrome .user-location-dot {
  width: 12px; height: 12px; top: 2px; left: 2px; background: #3b82f6;
  border: 2px solid #f8fafc; box-shadow: 0 0 0 4px #151e3233, 0 2px 6px #0004;
  animation: ara-location-arrive .45s cubic-bezier(.22,1,.36,1) both;
}
.web-map-chrome .user-location-dot::before, .web-map-chrome .user-location-dot::after { content: none; }
.web-map-chrome .user-location-accuracy { filter: drop-shadow(0 0 1px #f8fafc80); pointer-events: none; animation: ara-location-area-arrive .5s ease both; }
.map-location-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes ara-location-sweep { to { transform: rotate(360deg); } }
@keyframes ara-location-breathe { 0%,100% { transform: scale(.7); } 50% { transform: scale(1.15); } }
@keyframes ara-location-arrive { from { opacity: 0; transform: scale(.65); } to { opacity: 1; transform: scale(1); } }
@keyframes ara-location-area-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .web-map-chrome #locateMeBtn::before, .web-map-chrome #locateMeBtn::after,
  .web-map-chrome .user-location-dot, .web-map-chrome .user-location-accuracy { animation: none; }
  .web-map-chrome #locateMeBtn, .web-map-chrome #locateMeBtn::before,
  .web-map-chrome #locateMeBtn::after, .web-map-chrome #locateMeBtn > span { transition: none; }
}

/* Same travelling glass highlight and easing as nav menus and search results. */
.web-map-chrome [data-explorer-tree-list] { position: relative; isolation: isolate; }
.web-map-chrome .map-explorer-hover {
  position: absolute; top: 0; inset-inline: var(--map-tree-row-inset); height: 0; margin: 0 !important;
  z-index: 0; pointer-events: none; border-radius: 10px; background: rgba(255,255,255,.08); opacity: 0;
  transition: transform .4s cubic-bezier(.22,1,.36,1), height .4s cubic-bezier(.22,1,.36,1), opacity .3s;
}
.web-map-chrome .map-explorer-hover.is-visible { opacity: 1; }
.web-map-chrome .map-explorer-tree { position: relative; z-index: 1; border-radius: 10px; }
.web-map-chrome .map-explorer-tree:hover { background: transparent; }
.web-map-chrome .map-explorer-tree__copy, .web-map-chrome .map-explorer-tree__arrow {
  transition: transform .4s cubic-bezier(.22,1,.36,1), color .3s;
}
.web-map-chrome .map-explorer-tree__species { transition: color .3s; }
.web-map-chrome .map-explorer-tree.is-preview .map-explorer-tree__copy,
.web-map-chrome .map-explorer-tree.is-preview .map-explorer-tree__arrow { transform: translateX(2px); }
.web-map-chrome .map-explorer-tree.is-preview .map-explorer-tree__name { color: #f8fafc; }
.web-map-chrome .map-explorer-tree.is-preview .map-explorer-tree__species { color: #c3cfdd; }
.web-map-chrome .map-explorer-tree.is-preview .map-explorer-tree__arrow { color: #c3cfdd; }
.web-map-chrome .map-explorer-tree:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  .web-map-chrome .map-explorer-hover, .web-map-chrome .map-explorer-tree__copy,
  .web-map-chrome .map-explorer-tree__arrow, .web-map-chrome .map-explorer-tree__species { transition: none; }
}
/* Explorer and Nearby share the same content rhythm and row highlight. */
.web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) { display: flex; flex-direction: column; min-height: 0; }
.web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child { flex-shrink: 0; padding-inline-end: var(--map-explorer-inset); }
.web-map-chrome #panelContent > .map-explorer-list { flex: 1; min-height: 0; height: auto !important; }
.map-nearby-shortcut {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.045);
  color: #e2e8f0; text-align: left; font-family: inherit; font-weight: 500; font-size: 13px; line-height: 1.4; cursor: pointer;
  transition: background .3s, border-color .3s;
}
.map-nearby-shortcut:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.map-nearby-shortcut > :first-child { font-size: 19px; color: #93c5fd; }
.map-nearby-shortcut > :last-child { margin-left: auto; font-size: 17px; color: #94a3b8; }
.map-nearby-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.web-map-chrome #sidePanel #panelContent:has(> .map-nearby-panel) { overflow: hidden; padding-bottom: 0; }
.map-nearby-header { position: relative; flex-shrink: 0; padding: 12px var(--map-explorer-inset) 14px; }
.map-panel-back { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 5px; margin-left: -5px; border: 0; border-radius: 8px; background: transparent; color: #c3cfdd; font: inherit; font-size: 12px; cursor: pointer; }
.map-panel-back:hover { color: #f8fafc; background: rgba(255,255,255,.05); }
.map-panel-back .material-symbols-rounded { font-size: 18px; }
.map-nearby-title { padding-right: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-nearby-title h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.map-nearby-refresh { position: absolute; top: 51px; inset-inline-end: var(--map-explorer-inset); display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: rgba(255,255,255,.06); color: #c3cfdd; cursor: pointer; }
.map-nearby-refresh:disabled { opacity: .5; cursor: wait; }
.map-nearby-refresh .material-symbols-rounded { font-size: 19px; }
.map-nearby-header p { padding-right: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0 0; color: #a8b6c7; font-size: 11px; }
.map-nearby-count { margin-left: auto; color: #c3cfdd; }
.map-nearby-list { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-block: 4px 15px; }
.map-nearby-tree { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 9px; margin-bottom: 4px; border: 0; background: transparent; text-align: left; color: #e2e8f0; font: inherit; cursor: pointer; }
.map-nearby-pin { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 30px; }
.map-nearby-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.map-nearby-copy .map-explorer-tree__name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-nearby-copy .map-explorer-tree__species { color: #94a3b8; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-nearby-distance { flex-shrink: 0; border-radius: 999px; padding: 4px 6px; background: rgba(255,255,255,.06); color: #c3cfdd; font-size: 10px; }
.map-nearby-tree .map-explorer-tree__arrow { font-size: 16px; color: #64748b; }
.map-nearby-message { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-block: 28px; text-align: center; color: #c3cfdd; }
.map-nearby-message > .material-symbols-rounded { font-size: 28px; color: #94a3b8; }
.map-nearby-message strong { font-size: 14px; font-weight: 500; color: #e2e8f0; }
.map-nearby-message p { max-width: 270px; margin: 0; font-size: 12px; line-height: 1.5; }
.map-nearby-retry { min-height: 44px; margin-top: 4px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #e2e8f0; background: rgba(255,255,255,.07); font: inherit; font-size: 12px; cursor: pointer; }
.map-nearby-pulse { display: flex; align-items: center; gap: 5px; height: 28px; }
.map-nearby-pulse i { width: 6px; height: 6px; border-radius: 50%; background: #93c5fd; animation: map-nearby-wait 1.2s ease-in-out infinite alternate; }
.map-nearby-pulse i:nth-child(2) { animation-delay: .15s; }
.map-nearby-pulse i:nth-child(3) { animation-delay: .3s; }
.map-nearby-panel :focus-visible, .map-nearby-shortcut:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
@keyframes map-nearby-wait { from { opacity: .25; transform: translateY(2px); } to { opacity: 1; transform: translateY(-2px); } }
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .map-nearby-header { padding-top: 4px; padding-bottom: 6px; }
  .map-nearby-refresh { top: 44px; }
  .map-nearby-refresh, .map-panel-back { min-height: 44px; }
  .map-nearby-refresh { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .map-nearby-pulse i { animation: none; } }

.web-map-chrome .map-detail-back { min-height: 44px; border-radius: 8px; }

@media (max-width: 360px) {
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child { padding-top: 6px; padding-bottom: 4px; }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child h2 { font-size: 17px; line-height: 24px; flex-basis: 100%; }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child > .flex:first-child { gap: 4px; margin-bottom: 0; }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child > .flex:first-child > .flex { gap: 4px; }
  .web-map-chrome #sidePanel #panelContent:has(> .map-explorer-list) > :first-child button { min-height: 44px; }
  .web-map-chrome #sidePanel #panelContent > .map-explorer-list { padding-top: 0; }
}
.web-map-chrome .map-detail-back { min-height: 44px; border-radius: 8px; }
.map-record-panel--tree { padding-bottom: 12px; }
.map-preview-identity { min-width: 0; overflow-wrap: anywhere; }
.map-preview-identity h2 {
  color: #f8fafc;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.map-preview-species { margin: 4px 0 0; color: #e3eaf4; font-size: 15px; line-height: 1.4; }
.map-preview-species i { display: block; color: #c2cedd; font-size: 13px; }
.map-preview-link-slot {
  flex: none;
  padding: 4px max(var(--map-explorer-inset), env(safe-area-inset-right))
    var(--map-explorer-inset) max(var(--map-explorer-inset), env(safe-area-inset-left));
}
.map-preview-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #93c5fd38;
  border-radius: 11px;
  background: #233649;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}
.map-preview-link:hover { background: #2c455e; border-color: #93c5fd; }
.map-preview-link:focus-visible { outline: 2px solid #99cfff; outline-offset: 1px; }
.map-preview-link .material-symbols-rounded { font-size: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .map-preview-link .material-symbols-rounded { transition: transform 150ms ease-out; }
  .map-preview-link:focus-visible .material-symbols-rounded { transform: translateX(3px); }
  @media (hover: hover) {
    .map-preview-link:hover .material-symbols-rounded { transform: translateX(3px); }
  }
}
.map-preview-card {
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--ara-map-glass-border);
  border-radius: 14px;
  background: rgb(16 25 42 / 55%);
  color: #e5edf7;
  overflow-wrap: anywhere;
}
.map-preview-card .heritage-heading { margin-bottom: 11px; }
.map-preview-card .heritage-heading > .material-symbols-rounded { color: #facc15; font-size: 19px; }
.map-preview-card .heritage-columns { grid-template-columns: fit-content(43%) minmax(0,1fr); gap: 10px; }
.map-preview-card .heritage-primary { min-width: 0; }
.map-preview-card .heritage-primary:only-child { flex-direction: row; align-items: center; gap: 9px; }
.map-preview-story h3, .map-preview-location h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e5edf7;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
.map-preview-story h3 .material-symbols-rounded, .map-preview-location h3 .material-symbols-rounded { font-size: 19px; }
.map-preview-story h3 .material-symbols-rounded { color: #c4a7f3; }
.map-preview-story p {
  --preview-lines: 4;
  margin-top: 8px;
  color: #d6dfeb;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}
.map-preview-story p.is-truncated {
  max-height: calc(var(--preview-lines) * 1lh);
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black calc(100% - 1lh), transparent);
}
.map-preview-story button {
  display: block;
  min-height: 32px;
  margin-top: 4px;
  border-radius: 4px;
  color: #a5d7fa;
  font-size: 13px;
  font-weight: 600;
}
.map-preview-story button[hidden] { display: none; }
.map-preview-story button:hover { text-decoration: underline; }
.map-preview-facts { display: grid; gap: 4px; font-size: 13px; }
.map-preview-story + .map-preview-facts { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ara-map-glass-border); }
.map-preview-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-preview-facts dt, .map-preview-contributors h3 { color: #b6c4d5; font-size: 12px; font-weight: 400; }
.map-preview-facts dt { display: flex; align-items: center; gap: 6px; }
.map-preview-facts dt .material-symbols-rounded {
  flex: none;
  color: var(--history-field-tone, #9ec6f4);
  font-size: 15px;
}
.map-preview-facts dd { text-align: end; }
.map-preview-facts .history-details__condition dd { color: var(--history-field-tone); }
.map-preview-contributors { padding-block: 10px; background: rgb(16 25 42 / 30%); }
.map-preview-contributors h3 { display: flex; align-items: center; gap: 6px; }
.map-preview-contributors h3 .material-symbols-rounded { color: #9ec6f4; font-size: 15px; }
.map-preview-contributors p { margin-top: 2px; color: #d6dfeb; font-size: 13px; }
.map-preview-location h3 { margin-bottom: 8px; }
.map-preview-location h3 .material-symbols-rounded { color: #a6d8fa; }
.map-preview-location dl { display: grid; gap: 7px; }
.map-preview-location dt { color: #b6c4d5; font-size: 12px; }
.map-preview-location dd { color: #edf3fb; font-size: 14px; line-height: 1.4; user-select: text; }
.map-preview-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
.map-preview-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid rgb(164 195 227 / 25%);
  border-radius: 8px;
  color: #c7e6ff;
  font-size: 12px;
  font-weight: 600;
}
.map-preview-actions .material-symbols-rounded { font-size: 15px; }
.map-preview-actions > :hover { color: white; background: rgb(165 200 236 / 8%); }
.map-preview-copy-status:not(:empty) { display: block; margin-top: 6px; color: #c5dded; font-size: 12px; }
.map-record-panel--tree :is(a, button):focus-visible { outline: 2px solid #99cfff; outline-offset: 1px; }
@media (pointer: coarse) {
  .map-preview-story button, .map-preview-actions > * { min-height: 44px; }
}
.history-details__condition { --history-field-tone: #bac8db; }
.history-details__condition[data-tone="healthy"] { --history-field-tone: #86efac; }
.history-details__condition[data-tone="decline"] { --history-field-tone: #fcd47e; }
.history-details__condition[data-tone="damaged"] { --history-field-tone: #fca5a5; }
.history-details__condition[data-tone="dead"] { --history-field-tone: #c4b2cf; }
.history-details__condition[data-tone="fallen"] { --history-field-tone: #cfbda3; }
