/* Stable grouped pins and sharper animated zoom. */
html body .app-shell .map-stage.map-focus .maplibregl-canvas {
  filter: none !important;
  image-rendering: auto;
}

html body .app-shell .map-stage.map-focus.map-zooming .maplibregl-canvas {
  filter: none !important;
  image-rendering: crisp-edges;
}

html body .app-shell .map-stage.map-focus .maplibregl-marker:has(.memory-cluster-marker),
html body .app-shell .map-stage.map-focus .leaflet-marker-icon:has(.memory-cluster-marker),
html body .app-shell .map-stage.map-focus .leaflet-div-icon:has(.memory-cluster-marker) {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  overflow: visible !important;
  contain: layout style;
}

html body .app-shell .map-stage.map-focus .memory-cluster-marker,
html body .app-shell .map-stage.map-focus .memory-cluster-marker.constellation-cluster {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow:
    0 5px 12px rgba(6, 46, 58, 0.16),
    0 0 0 2px color-mix(in srgb, var(--marker-color, #18a978) 12%, transparent) !important;
  opacity: 1 !important;
  filter: none !important;
  animation: none !important;
  backface-visibility: hidden !important;
  transform: translateZ(0) scale(1) !important;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  will-change: transform, opacity;
}

html body .app-shell .map-stage.map-focus.memory-blooming .memory-cluster-marker,
html body .app-shell .map-stage.map-focus.memory-blooming .memory-cluster-marker.constellation-cluster,
html body .app-shell .map-stage.map-focus.memory-zoom-story .memory-cluster-marker,
html body .app-shell .map-stage.map-focus.memory-zoom-story .memory-cluster-marker.constellation-cluster {
  filter: none !important;
  animation: none !important;
  opacity: 1 !important;
  transform: translateZ(0) scale(1) !important;
}

html body .app-shell .map-stage.map-focus .memory-cluster-marker .cluster-count,
html body .app-shell .map-stage.map-focus .memory-cluster-marker.constellation-cluster .cluster-count {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 3px rgba(0, 28, 38, 0.24) !important;
  opacity: 1 !important;
  transform: translateZ(0) scale(1) !important;
  transition: opacity 160ms ease, transform 180ms ease !important;
}

html body .app-shell .map-stage.map-focus.map-zooming .memory-cluster-marker,
html body .app-shell .map-stage.map-focus.map-interacting .memory-cluster-marker {
  animation: none !important;
  filter: none !important;
  opacity: 1 !important;
  transform: translateZ(0) scale(1) !important;
}

html body .app-shell .map-stage.map-focus.map-zooming .mymappi-memory-pin-icon,
html body .app-shell .map-stage.map-focus.map-zooming .mymappi-pin-only,
html body .app-shell .map-stage.map-focus.map-zooming .memory-pin-svg {
  filter: none !important;
  animation: none !important;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.map-focus .memory-cluster-marker,
  html body .app-shell .map-stage.map-focus .memory-cluster-marker .cluster-count {
    transition: none !important;
  }
}
