/* Living preview: one quiet memory card follows the center of Explore. */
html body .app-shell .map-stage.map-focus .memory-peek-card.center-memory-preview,
html body main.app-shell section.map-stage.map-focus .memory-peek-card.center-memory-preview {
  left: 50% !important;
  right: auto !important;
  bottom: calc(var(--bottom-nav-height, 84px) + 22px) !important;
  grid-template-columns: 62px minmax(0, 1fr) 28px !important;
  gap: 12px !important;
  width: min(390px, calc(100vw - 34px)) !important;
  min-height: 88px !important;
  padding: 10px 12px !important;
  border: 1px solid color-mix(in srgb, var(--peek-accent, #138f8d) 18%, rgba(255, 255, 255, 0.8)) !important;
  border-radius: 22px !important;
  color: #073540 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 253, 0.96), rgba(242, 251, 247, 0.93)) !important;
  box-shadow:
    0 18px 42px rgba(3, 29, 41, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  transform: translateX(-50%) translateY(16px) scale(0.985) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
}

html body .app-shell .map-stage.map-focus .memory-peek-card.center-memory-preview.show,
html body main.app-shell section.map-stage.map-focus .memory-peek-card.center-memory-preview.show {
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

.center-memory-preview-media {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(7, 53, 64, 0.09);
  border-radius: 16px;
  background: linear-gradient(145deg, #dff8ed, #dbeff7);
}

.center-memory-preview-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.center-memory-preview-fallback i {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  background: var(--preview-pin-color, #138f8d);
  transform: rotate(-45deg);
}

.center-memory-preview-fallback i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 999px;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

html body .app-shell .map-stage.map-focus .center-memory-preview .peek-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
  align-content: center !important;
}

.center-memory-preview-kicker {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: rgba(7, 53, 64, 0.52);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.center-memory-preview-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--peek-accent, #138f8d);
}

html body .app-shell .map-stage.map-focus .center-memory-preview .peek-copy strong {
  overflow: hidden !important;
  color: #073540 !important;
  font-size: 0.94rem !important;
  line-height: 1.18 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .map-stage.map-focus .center-memory-preview .peek-copy small {
  overflow: hidden !important;
  color: rgba(7, 53, 64, 0.6) !important;
  font-size: 0.72rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .map-stage.map-focus .center-memory-preview .peek-copy em {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: rgba(7, 53, 64, 0.7) !important;
  font-size: 0.7rem !important;
  font-style: normal !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background: transparent !important;
}

.center-memory-preview-open {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 900;
  background: color-mix(in srgb, var(--peek-accent, #138f8d) 78%, #07516b);
  transition: transform 180ms ease;
}

.center-memory-preview:hover .center-memory-preview-open,
.center-memory-preview:focus-visible .center-memory-preview-open {
  transform: translateX(2px);
}

@media (max-width: 720px) {
  html body .app-shell .map-stage.map-focus .memory-peek-card.center-memory-preview,
  html body main.app-shell section.map-stage.map-focus .memory-peek-card.center-memory-preview {
    left: max(13px, env(safe-area-inset-left)) !important;
    bottom: calc(var(--bottom-nav-height, 84px) + 16px) !important;
    grid-template-columns: 52px minmax(0, 1fr) 24px !important;
    gap: 9px !important;
    width: min(286px, calc(100vw - 112px)) !important;
    min-height: 76px !important;
    padding: 9px 10px !important;
    border-radius: 20px !important;
    transform: translateY(14px) scale(0.985) !important;
  }

  html body .app-shell .map-stage.map-focus .memory-peek-card.center-memory-preview.show,
  html body main.app-shell section.map-stage.map-focus .memory-peek-card.center-memory-preview.show {
    transform: translateY(0) scale(1) !important;
  }

  .center-memory-preview-media {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  html body .app-shell .map-stage.map-focus .center-memory-preview .peek-copy em {
    display: none !important;
  }

  .center-memory-preview-open {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.map-focus .memory-peek-card.center-memory-preview,
  .center-memory-preview-open {
    transition: none !important;
  }
}
