/* Build 746: MM stays private; OM is the opt-in discovery layer. */

html body main.app-shell section.map-stage .map-scope-switch {
  display: none !important;
}

html body main.app-shell section.map-stage.map-focus .map-scope-switch {
  position: absolute !important;
  z-index: 718 !important;
  top: 82px !important;
  left: clamp(18px, 3vw, 28px) !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(44px, 1fr) !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  gap: 2px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(203, 246, 237, 0.28) !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(8, 60, 70, 0.96), rgba(4, 38, 52, 0.96)) !important;
  box-shadow: 0 8px 20px rgba(2, 29, 41, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(10px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.06) !important;
}

html body main.app-shell section.map-stage.map-focus:is(.map-interacting, .map-zooming) .map-scope-switch {
  background: linear-gradient(145deg, rgba(8, 60, 70, 0.96), rgba(4, 38, 52, 0.96)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body main.app-shell section.map-stage.map-focus .map-scope-switch button {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  width: 100% !important;
  min-width: 44px !important;
  height: 100% !important;
  min-height: 44px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: rgba(228, 248, 244, 0.7) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.7rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.035em !important;
  cursor: pointer !important;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease !important;
}

html body main.app-shell section.map-stage.map-focus .map-scope-switch button.active,
html body main.app-shell section.map-stage.map-focus .map-scope-switch button[aria-pressed="true"] {
  color: #063b45 !important;
  background: linear-gradient(145deg, #a4efd8, #6bd8c1) !important;
  box-shadow: 0 2px 8px rgba(3, 82, 78, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

html body main.app-shell section.map-stage.map-focus .map-scope-switch button:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: -3px !important;
}

html body main.app-shell section.map-stage .our-map-discovery-bar[hidden] {
  display: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-discovery-bar:not([hidden]) {
  position: absolute !important;
  z-index: 710 !important;
  top: 144px !important;
  left: 50% !important;
  box-sizing: border-box !important;
  display: grid !important;
  width: min(680px, calc(100% - 36px)) !important;
  gap: 10px !important;
  padding: 14px 15px 12px !important;
  border: 1px solid rgba(215, 255, 245, 0.38) !important;
  border-radius: 21px !important;
  color: #eafff9 !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(81, 222, 184, 0.19), transparent 38%),
    linear-gradient(145deg, rgba(7, 56, 69, 0.97), rgba(3, 31, 45, 0.96)) !important;
  box-shadow: 0 16px 38px rgba(1, 27, 40, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
  backdrop-filter: blur(15px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(15px) saturate(1.08) !important;
  transform: translateX(-50%) !important;
}

html body .our-map-discovery-copy {
  display: grid !important;
  gap: 2px !important;
}

html body .our-map-discovery-copy > span {
  color: #83ead1 !important;
  font-size: 0.61rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

html body .our-map-discovery-copy > span em {
  margin-left: 6px !important;
  padding: 3px 6px !important;
  border: 1px solid rgba(143, 239, 213, 0.26) !important;
  border-radius: 999px !important;
  color: #c8fff0 !important;
  font-size: 0.52rem !important;
  font-style: normal !important;
  letter-spacing: 0.07em !important;
  background: rgba(95, 222, 189, 0.1) !important;
}

html body .our-map-discovery-copy strong {
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}

html body .our-map-discovery-copy small {
  color: rgba(225, 249, 243, 0.72) !important;
  font-size: 0.68rem !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

html body .our-map-filters {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  overflow-x: auto !important;
  padding: 1px 1px 3px !important;
  scrollbar-width: none !important;
}

html body .our-map-filters::-webkit-scrollbar {
  display: none !important;
}

html body .our-map-filters button {
  min-width: max-content !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(220, 255, 247, 0.18) !important;
  border-radius: 999px !important;
  color: rgba(235, 255, 250, 0.78) !important;
  background: rgba(255, 255, 255, 0.065) !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

html body .our-map-filters button[aria-pressed="true"] {
  border-color: rgba(131, 234, 209, 0.55) !important;
  color: #073b45 !important;
  background: linear-gradient(145deg, #b5f6de, #73dfc8) !important;
  box-shadow: 0 5px 13px rgba(0, 24, 35, 0.18) !important;
}

html body .our-map-filters button:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

html body .our-map-spot-count {
  margin: 0 !important;
  color: rgba(221, 247, 240, 0.63) !important;
  font-size: 0.59rem !important;
  font-weight: 760 !important;
  text-align: right !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode :is(.map-chapter-selector, #activeTripBar) {
  display: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode #map :is(.maplibregl-canvas, .leaflet-tile) {
  filter: saturate(0.88) contrast(0.98) brightness(1.06) !important;
}

html body main.app-shell section.map-stage.map-focus .mymappi-our-map-pin-icon {
  z-index: 2 !important;
  overflow: visible !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-place-pin {
  --our-map-pin-color: var(--marker-color, #0aa7b8);
  position: relative !important;
  display: block !important;
  width: 30px !important;
  height: 45px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  filter: drop-shadow(0 8px 9px rgba(1, 29, 41, 0.25)) !important;
  cursor: pointer !important;
  transform-origin: 50% 90% !important;
  transition: transform 180ms ease, filter 180ms ease !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-place-pin::before {
  position: absolute !important;
  z-index: -1 !important;
  right: 3px !important;
  bottom: 0 !important;
  left: 3px !important;
  height: 8px !important;
  content: "" !important;
  border-radius: 50% !important;
  background: color-mix(in srgb, var(--our-map-pin-color) 24%, transparent) !important;
  filter: blur(3px) !important;
  animation: mymappiOurMapPinPulse 2.8s ease-in-out infinite !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-place-pin .memory-pin-svg {
  display: block !important;
  width: 30px !important;
  height: 45px !important;
  overflow: visible !important;
  transform: none !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-place-pin :is(.memory-pin-body, .memory-pin-rim, .memory-pin-inner, .memory-pin-shine, .memory-pin-center, .memory-pin-core, .memory-pin-symbol) {
  display: block !important;
  transform: none !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-place-pin .memory-pin-symbol {
  fill: #ffffff !important;
  stroke: rgba(4, 41, 49, 0.36) !important;
  stroke-width: 0.7px !important;
  paint-order: stroke fill !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-pin-label {
  position: absolute !important;
  z-index: 8 !important;
  top: -3px !important;
  right: -6px !important;
  display: grid !important;
  min-width: 18px !important;
  height: 14px !important;
  place-items: center !important;
  padding: 0 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-radius: 999px !important;
  color: #063b45 !important;
  background: linear-gradient(145deg, #d4fff0, #78e6ca) !important;
  box-shadow: 0 3px 8px rgba(1, 31, 42, 0.2) !important;
  font-size: 0.37rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
}

html body main.app-shell section.map-stage.map-focus .our-map-pin-label.has-story-stack {
  min-width: 17px !important;
  color: #ffffff !important;
  background: linear-gradient(145deg, #ff886c, #e85151) !important;
}

html body main.app-shell section.map-stage.map-focus .mymappi-our-map-pin-icon:hover .our-map-place-pin,
html body main.app-shell section.map-stage.map-focus .mymappi-our-map-pin-icon:focus-within .our-map-place-pin {
  filter: drop-shadow(0 10px 11px rgba(1, 29, 41, 0.32)) saturate(1.08) !important;
  transform: translateY(-3px) scale(1.05) !important;
}

html body .our-map-popup-kicker,
html body .our-map-popup-private {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  border-radius: 999px !important;
  font-weight: 850 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .maplibregl-popup.mymappi-our-map-popup-shell {
  z-index: 735 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell .maplibregl-popup-content-wrapper {
  overflow: hidden !important;
  border: 1px solid rgba(165, 218, 204, 0.72) !important;
  border-radius: 18px !important;
  color: #153f46 !important;
  background: rgba(251, 255, 253, 0.985) !important;
  box-shadow: 0 20px 46px rgba(0, 34, 48, 0.3), inset 0 1px 0 #ffffff !important;
  backdrop-filter: blur(18px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.05) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell .maplibregl-popup-content {
  box-sizing: border-box !important;
  width: min(286px, calc(100vw - 42px)) !important;
  max-height: min(54vh, 430px) !important;
  overflow: auto !important;
  padding: 16px !important;
  border: 1px solid rgba(165, 218, 204, 0.72) !important;
  border-radius: 18px !important;
  color: #153f46 !important;
  background: rgba(251, 255, 253, 0.985) !important;
  box-shadow: 0 20px 46px rgba(0, 34, 48, 0.3), inset 0 1px 0 #ffffff !important;
  overscroll-behavior: contain !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell .maplibregl-popup-close-button {
  z-index: 2 !important;
  width: 30px !important;
  height: 30px !important;
  margin: 7px !important;
  border-radius: 999px !important;
  color: #215c61 !important;
  background: rgba(232, 248, 242, 0.94) !important;
  font-size: 1.05rem !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: rgba(251, 255, 253, 0.985) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: rgba(251, 255, 253, 0.985) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: rgba(251, 255, 253, 0.985) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .mymappi-our-map-popup-shell.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: rgba(251, 255, 253, 0.985) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode:has(.mymappi-our-map-popup-shell) .our-map-discovery-bar:not([hidden]) {
  opacity: 0.22 !important;
  pointer-events: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode:has(.mymappi-our-map-popup-shell) #locationBanner {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode:has(.mymappi-our-map-popup-shell) .map-navigation-gadget {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body .our-map-popup-kicker {
  margin-bottom: 7px !important;
  padding: 4px 8px !important;
  color: #087667 !important;
  background: #e6f8f2 !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup {
  color: #153f46 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup h3 {
  padding-right: 30px !important;
  color: #0b3440 !important;
  line-height: 1.16 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .popup-meta {
  color: #587277 !important;
  line-height: 1.35 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .popup-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .popup-route {
  border: 1px solid transparent !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #08a38a, #19b9c1) !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .popup-route.subtle {
  border-color: rgba(12, 123, 111, 0.2) !important;
  color: #0a6f68 !important;
  background: #eaf7f3 !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .our-map-provider-link {
  grid-column: 1 / -1 !important;
}

html body .our-map-popup-private {
  margin: 4px 0 9px !important;
  color: #51747a !important;
  font-size: 0.62rem !important;
}

html body .our-map-popup-why {
  margin: 7px 0 !important;
  padding: 8px 9px !important;
  border: 1px solid rgba(12, 142, 122, 0.13) !important;
  border-radius: 11px !important;
  color: #365f65 !important;
  background: #f2faf7 !important;
  font-size: 0.69rem !important;
  line-height: 1.35 !important;
}

html body .our-map-popup-why strong {
  display: block !important;
  margin-bottom: 2px !important;
  color: #087667 !important;
  font-size: 0.57rem !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

html body .our-map-story-stack-count {
  display: inline-flex !important;
  margin: 1px 0 6px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  color: #974437 !important;
  background: #fff0ea !important;
  font-size: 0.59rem !important;
  font-weight: 850 !important;
}

html body .our-map-provider-link {
  display: inline-grid !important;
  min-height: 34px !important;
  place-items: center !important;
  padding: 0 10px !important;
  border: 1px solid rgba(7, 83, 91, 0.15) !important;
  border-radius: 9px !important;
  color: #0a716b !important;
  background: #f4faf8 !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

html body .our-map-provider-credit {
  display: block !important;
  margin-top: 7px !important;
  color: #71868a !important;
  font-size: 0.53rem !important;
  text-align: center !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-hot-zone {
  animation: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-hot-zone-label-icon {
  overflow: visible !important;
}

html body .our-map-hotspot-button {
  opacity: var(--mappi-hotspot-opacity, 1) !important;
  transition: none !important;
  display: grid !important;
  place-items: center !important;
  width: 106px !important;
  min-width: 106px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  touch-action: manipulation;
}

html body .our-map-hotspot-button:focus-visible {
  outline: 3px solid #075764 !important;
  outline-offset: 2px !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-hot-zone-label {
  display: inline-flex !important;
  min-width: 44px !important;
  min-height: 28px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 9px !important;
  border: 1px solid #df998a !important;
  border-radius: 999px !important;
  color: #853e32 !important;
  background: #fff0e8 !important;
  box-shadow: 0 3px 9px rgba(99, 57, 45, 0.14) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

html body .our-map-hot-zone-label svg {
  width: 14px !important;
  height: 14px !important;
  fill: #bc6150 !important;
  flex: 0 0 14px !important;
}

html body .map-popup-surface-open .our-map-hot-zone-label-icon {
  visibility: hidden !important;
  pointer-events: none !important;
}

html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-popup .popup-edit {
  display: grid !important;
  width: 100% !important;
  min-height: 42px !important;
  place-items: center !important;
  margin-top: 10px !important;
  padding: 0 14px !important;
  border-radius: 11px !important;
  color: #ffffff !important;
  background: linear-gradient(112deg, #06324c, #0c8e7a) !important;
}

html body main.app-shell section.map-stage.memory-editor-active :is(.map-scope-switch, .our-map-discovery-bar),
html body:has(.active-trip-dialog[open]) .app-shell :is(.map-scope-switch, .our-map-discovery-bar),
html body:has(.trip-entry-dialog[open]) .app-shell :is(.map-scope-switch, .our-map-discovery-bar),
html body:has(.trip-import-dialog[open]) .app-shell :is(.map-scope-switch, .our-map-discovery-bar) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes mymappiOurMapPinPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.82); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  html body main.app-shell section.map-stage.map-focus .map-scope-switch {
    position: fixed !important;
    top: calc(72px + env(safe-area-inset-top)) !important;
    left: max(14px, env(safe-area-inset-left)) !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }

  html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-discovery-bar:not([hidden]) {
    position: fixed !important;
    top: calc(128px + env(safe-area-inset-top)) !important;
    width: calc(100vw - 24px) !important;
    gap: 8px !important;
    padding: 12px !important;
    border-radius: 19px !important;
  }

  html body .our-map-discovery-copy strong {
    font-size: 0.91rem !important;
  }

  html body .our-map-discovery-copy small {
    font-size: 0.63rem !important;
  }

  html body .our-map-filters button {
    min-height: 36px !important;
  }
}

@media (max-height: 700px) and (max-width: 720px) {
  html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-discovery-bar:not([hidden]) {
    gap: 6px !important;
    padding-block: 9px !important;
  }

  html body .our-map-discovery-copy small,
  html body .our-map-spot-count {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body main.app-shell section.map-stage.map-focus .map-scope-switch button,
  html body main.app-shell section.map-stage.map-focus .our-map-place-pin,
  html body main.app-shell section.map-stage.map-focus .our-map-place-pin::before,
  html body main.app-shell section.map-stage.map-focus.our-map-mode .our-map-hot-zone {
    transition: none !important;
    animation: none !important;
  }
}
