/* Match the menu palette; anchor to the measured header from the first frame. */
html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open,
html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open {
  position: fixed !important;
  top: var(--pin-search-top, calc(env(safe-area-inset-top, 0px) + 88px)) !important;
  bottom: auto !important;
  max-height: var(--pin-search-max-height, calc(100dvh - 180px)) !important;
  transform: none !important;
  animation: none !important;
  transition: opacity 120ms ease !important;
}
html.pin-search-scroll-locked,
html body.pin-search-scroll-locked,
html body.pin-search-scroll-locked main.app-shell section.map-stage,
html body.pin-search-scroll-locked #memoryLanePage {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
html body #pinSearchPanel,
html body #pinSearchResults {
  overscroll-behavior: contain !important;
  overflow-anchor: none;
}
html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open {
  color: #f9fcff !important;
  background: var(--mymappi-action-navy, #00243f) !important;
  border: 1px solid #36586e !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 48px rgba(0, 24, 43, .24) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-heading-copy > span {
  color: #b8d0dd !important; font-weight: 650 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-heading-copy > strong {
  color: #fff !important; font-weight: 750 !important;
  white-space: normal !important; overflow-wrap: anywhere;
}
html body main.app-shell section.map-stage #pinSearchPanel #pinSearchCloseButton {
  width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important;
  background: transparent !important; color: #fff !important;
  border: 1px solid #48667b !important; border-radius: 50% !important;
  box-shadow: none !important; transform: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel #pinSearchCloseButton :is(span, svg) {
  display: grid !important; place-items: center; width: 20px !important; height: 20px !important;
  color: #fff !important; padding: 0 !important; margin: 0 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-box {
  background: #0a2e46 !important; border: 1px solid #48667b !important;
  border-radius: 16px !important; box-shadow: none !important;
  grid-template-columns: 20px minmax(0, 1fr) max-content !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-box:focus-within {
  border-color: #75d9c3 !important; box-shadow: 0 0 0 2px #75d9c330 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-box input {
  color: #fff !important; background: transparent !important; caret-color: #75d9c3 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-box input::placeholder { color: #b8d0dd !important; opacity: 1 !important; }
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-box > svg { color: #b8d0dd !important; }
html body main.app-shell section.map-stage #pinSearchPanel #pinSearchGoButton.pin-search-go-button {
  color: #00243f !important; background: #75d9c3 !important;
  border: 1px solid #75d9c3 !important; border-radius: 12px !important; box-shadow: none !important;
  width: auto !important; min-width: 64px !important; max-width: none !important;
  padding-inline: 12px !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-go-button:disabled { opacity: .65 !important; }
/* Honor the renderer's empty/public scope state above older touch display:grid
   rules. Remove the unused grid track too, not just the control. */
html body main.app-shell section.map-stage #pinSearchPanel label.pin-search-chapter-filter[hidden] {
  display: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open:not(.has-chapter-filter) {
  grid-template-rows: max-content max-content minmax(0, 1fr) !important;
}
html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel:not(.has-chapter-filter) .pin-search-results {
  grid-row: 3 !important;
}
/* One quiet label and one native picker; no nested card or outer focus halo. */
html body main.app-shell section.map-stage #pinSearchPanel label.pin-search-chapter-filter,
html body main.app-shell section.map-stage #pinSearchPanel label.pin-search-chapter-filter:is(:hover, :focus-within, .is-filtered) {
  grid-template-columns: max-content minmax(0, 1fr) !important;
  align-items: center !important;
  justify-self: start !important;
  box-sizing: border-box !important;
  width: min(100%, 480px) !important;
  min-width: 0 !important;
  min-height: 44px !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-chapter-copy > strong {
  color: #b8d0dd !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
}
/* Keep the changing scope description accessible without repeating the
   selected option as a second visible line. */
html body main.app-shell section.map-stage #pinSearchPanel #pinSearchChapterScopeText {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; white-space: nowrap !important;
  clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
  border: 0 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel label.pin-search-chapter-filter > .map-chapter-selector {
  position: relative !important;
  min-height: 44px !important;
  background: transparent !important;
  border: 0 !important; box-shadow: none !important; outline: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel #mapChapterSelector {
  box-sizing: border-box !important;
  width: 100% !important; min-width: 0 !important; min-height: 44px !important;
  padding: 8px 34px 8px 12px !important;
  font-size: max(16px, .9rem) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  text-overflow: ellipsis !important;
  color: #fff !important; background: #0a2e46 !important;
  border: 1px solid #48667b !important; border-radius: 12px !important;
  box-shadow: none !important;
  outline: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel #mapChapterSelector:focus-visible {
  outline: 2px solid #75d9c3 !important;
  outline-offset: -3px !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result {
  color: #f9fcff !important; background: #0a2e46 !important;
  border: 1px solid #2b4c61 !important; border-radius: 16px !important; box-shadow: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result:is(:hover, .is-search-active, .is-selected) {
  background: #103b50 !important; border-color: #75d9c3 !important;
  box-shadow: inset 3px 0 0 #75d9c3 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result > span:nth-child(2) > strong { color: #fff !important; }
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result > span:nth-child(2) > small,
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result-distance { color: #c4d8e3 !important; }
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-result-type {
  color: #abeddd !important; background: #174658 !important; border-color: #365f70 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-section-label { color: #b8d0dd !important; }
html body main.app-shell section.map-stage #pinSearchPanel .pin-search-section-label > small {
  color: #00243f !important; background: #75d9c3 !important; box-shadow: none !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .search-empty-state {
  color: #c4d8e3 !important; background: #0a2e46 !important; border: 1px solid #36586e !important;
  border-radius: 16px !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .search-empty-state strong { color: #fff !important; }
/* An invitation is supporting copy, not another card. Real empty/error
   results keep their distinct boundary and recovery actions. */
html body main.app-shell section.map-stage #pinSearchPanel .search-empty-state.pin-search-welcome-state {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #2b4c61 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 14px 2px 4px !important;
  gap: 5px !important;
  line-height: 1.5 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .search-empty-state:is(.pin-search-failure-state, .is-error) {
  border-color: #b59a63 !important;
}
html body main.app-shell section.map-stage #pinSearchPanel .search-empty-state:is(.pin-search-failure-state, .is-error) strong { color: #ffe0a3 !important; }
html body main.app-shell section.map-stage #pinSearchPanel :is(button, select):focus-visible {
  outline: 2px solid #75d9c3 !important; outline-offset: -3px !important;
}
@media (max-width: 720px) {
  html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open { border-radius: 22px !important; }
}
@media (orientation: landscape) and (max-height: 520px) {
  html body main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open,
  html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open {
    width: min(760px, calc(100vw - 2 * max(16px, env(safe-area-inset-left), env(safe-area-inset-right)))) !important;
    max-width: none !important;
    left: 50% !important;
    right: auto !important;
    /* The keyboard-aware code still owns top and available height. */
    transform: translateX(-50%) !important;
    border-radius: 20px !important;
  }
}
/* Keep a usable results window above a landscape keyboard, without hiding
   the header or shrinking the input, submit, close or scope touch targets. */
html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel.pin-search-panel.open {
  padding-block: 8px !important;
}
html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel .pin-search-box {
  min-height: 46px !important;
  padding: 0 6px !important;
}
html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel .pin-search-box input,
html body.keyboard-open main.app-shell section.map-stage #pinSearchPanel #pinSearchGoButton {
  height: 44px !important;
  min-height: 44px !important;
  padding-block: 4px !important;
}
