/* Today's Memory: photo-led, localized contrast, and a compact premium caption. */
html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory > .memory-day-topline,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory > .memory-day-topline {
  display: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-main,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-main {
  isolation: isolate !important;
  min-height: clamp(300px, 40vw, 420px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(226, 255, 247, 0.24) !important;
  border-radius: 30px !important;
  background: #dceee9 !important;
  box-shadow: 0 24px 58px rgba(4, 54, 62, 0.17), 0 0 0 1px rgba(255, 255, 255, 0.16) inset !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-main::after,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-main::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(300px, 40vw, 420px) !important;
  border-radius: inherit !important;
  background: #dceee9 !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo::after,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo::after {
  position: absolute !important;
  z-index: 2 !important;
  inset: auto 4% 2% !important;
  width: auto !important;
  height: 38% !important;
  content: "" !important;
  border-radius: 26px !important;
  background: radial-gradient(ellipse at 50% 100%, rgba(2, 28, 36, 0.5), rgba(2, 34, 41, 0.16) 58%, transparent 78%) !important;
  filter: blur(9px) !important;
  opacity: 0.76 !important;
  pointer-events: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo-frame,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(300px, 40vw, 420px) !important;
  object-fit: cover !important;
  object-position: var(--today-photo-position, center center) !important;
  opacity: 1 !important;
  transform: scale(1.012) !important;
  animation: today-photo-arrive 900ms cubic-bezier(0.22, 1, 0.36, 1) both, today-photo-drift 5.4s ease-out both !important;
  transition: opacity 520ms ease, transform 5.4s ease-out !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo.is-switching-photo .today-memory-photo-frame,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-photo.is-switching-photo .today-memory-photo-frame {
  opacity: 0 !important;
  transform: scale(1.035) !important;
}

@keyframes today-photo-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes today-photo-drift {
  from { transform: scale(1.012) translate3d(0, 0, 0); }
  to { transform: scale(1.035) translate3d(var(--today-photo-pan-x, 0%), var(--today-photo-pan-y, 0%), 0); }
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo-label,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-photo-label {
  position: absolute !important;
  top: 17px !important;
  left: 17px !important;
  z-index: 6 !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  gap: 8px !important;
  padding: 7px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  border-radius: 999px !important;
  color: #f8fffc !important;
  font-size: 0.76rem !important;
  font-weight: 880 !important;
  line-height: 1 !important;
  background: rgba(3, 40, 51, 0.48) !important;
  box-shadow: 0 8px 22px rgba(2, 27, 35, 0.13) !important;
  backdrop-filter: blur(12px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.08) !important;
  pointer-events: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo-label-pin {
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  flex: 0 0 auto !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% 50% 50% 0 !important;
  background: #ff6b6b !important;
  transform: rotate(-45deg) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-count,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-photo-count {
  top: 17px !important;
  right: 17px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 6 !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  color: #f8fffc !important;
  background: rgba(3, 40, 51, 0.48) !important;
  box-shadow: 0 8px 22px rgba(2, 27, 35, 0.13) !important;
  backdrop-filter: blur(12px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.08) !important;
  overflow: hidden !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-count i,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-photo-count i {
  position: absolute !important;
  right: 5px !important;
  bottom: 3px !important;
  left: 5px !important;
  display: block !important;
  height: 2px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-count i::after,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-photo-count i::after {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  content: "" !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #66e3ca, #ffffff) !important;
  transform-origin: left center !important;
  animation: today-photo-progress 5s linear both !important;
}

@keyframes today-photo-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-dots,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-photo-dots {
  top: 27px !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  z-index: 6 !important;
  transform: translateX(-50%) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo {
  touch-action: pan-y pinch-zoom !important;
}

/* Keep the memory switcher on its own row so it never covers the photo label. */
html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-footer,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-footer {
  top: 60px !important;
  right: 18px !important;
  bottom: auto !important;
  left: 18px !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy {
  position: absolute !important;
  right: auto !important;
  bottom: clamp(14px, 2.2vw, 20px) !important;
  left: 50% !important;
  z-index: 5 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "title" "meta" "note" "action" !important;
  align-items: center !important;
  justify-items: center !important;
  width: min(510px, calc(100% - 34px)) !important;
  max-width: min(510px, calc(100% - 34px)) !important;
  padding: 10px 14px 11px !important;
  gap: 3px !important;
  overflow: hidden !important;
  border: 1px solid rgba(228, 255, 247, 0.14) !important;
  border-radius: 19px !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(3, 39, 51, 0.58), rgba(5, 83, 77, 0.48)) !important;
  box-shadow: 0 10px 25px rgba(1, 25, 32, 0.15) !important;
  text-align: center !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18) !important;
  transform: translateX(-50%) !important;
  backdrop-filter: blur(12px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.06) !important;
  pointer-events: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-title,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-title {
  grid-area: title !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(1.08rem, 2vw, 1.45rem) !important;
  font-weight: 930 !important;
  line-height: 1.06 !important;
  text-align: center !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-meta-row,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-meta-row {
  grid-area: meta !important;
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  justify-self: center !important;
  text-align: center !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-meta-row > small,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-meta-row > small {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  gap: 4px 7px !important;
  color: rgba(238, 255, 250, 0.84) !important;
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-mood-chip,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-mood-chip {
  min-height: 19px !important;
  padding: 3px 7px !important;
  font-size: 0.6rem !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy > p,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy > p {
  grid-area: note !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.76rem !important;
  font-weight: 560 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-note,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-note {
  grid-area: note !important;
  display: -webkit-box !important;
  width: fit-content !important;
  max-width: 100% !important;
  max-height: 1.35em !important;
  overflow: hidden !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font: inherit !important;
  font-size: 0.76rem !important;
  font-weight: 560 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
  pointer-events: auto !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-note.is-expanded,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-note.is-expanded {
  max-height: 6.5em !important;
  white-space: normal !important;
  -webkit-line-clamp: 4 !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button {
  position: relative !important;
  grid-area: action !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 14px 8px 13px !important;
  gap: 7px !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 999px !important;
  color: #12343d !important;
  font-size: 0.74rem !important;
  font-weight: 920 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 18px rgba(0, 24, 30, 0.13) !important;
  justify-self: center !important;
  pointer-events: auto !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button::before,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button::before {
  width: 9px !important;
  height: 9px !important;
  content: "" !important;
  border-radius: 50% 50% 50% 0 !important;
  background: #ff6b6b !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.11) !important;
  transform: rotate(-45deg) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button.is-relive-launching::before,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button.is-relive-launching::before {
  animation: today-relive-pin 680ms ease-out both !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button.is-relive-launching,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button.is-relive-launching {
  transform: translateY(-1px) scale(1.025) !important;
}

@keyframes today-relive-pin {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.28); }
  65% { box-shadow: 0 0 0 9px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.11); }
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-copy,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-copy {
  border-color: rgba(255, 255, 255, 0.48) !important;
  background: linear-gradient(135deg, rgba(250, 255, 252, 0.88), rgba(224, 246, 240, 0.8)) !important;
  box-shadow: 0 10px 25px rgba(1, 25, 32, 0.12) !important;
  text-shadow: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-title,
html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-meta-row > small,
html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-note,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-title,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-meta-row > small,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-dark .today-memory-note {
  color: #123d46 !important;
  text-shadow: none !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-light .today-memory-copy,
html body main.app-shell section.map-stage.home-focus #homeMemoryOfDay .today-memory-main.caption-over-light .today-memory-copy {
  background: linear-gradient(135deg, rgba(2, 32, 43, 0.68), rgba(4, 74, 70, 0.58)) !important;
}

@media (max-width: 720px) {
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay { scroll-margin-bottom: calc(112px + env(safe-area-inset-bottom)) !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-main,
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo,
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-photo-frame {
    min-height: 330px !important;
    height: 330px !important;
    border-radius: 24px !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo-label {
    top: 13px !important; left: 13px !important; min-height: 31px !important; padding: 6px 10px !important; font-size: 0.68rem !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-count {
    top: 13px !important; right: 13px !important; min-height: 31px !important; padding: 6px 10px !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-dots { top: 22px !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-footer {
    top: 54px !important;
    right: 12px !important;
    left: 12px !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy {
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    padding: 9px 11px 10px !important;
    gap: 3px !important;
    border-radius: 17px !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-title { font-size: clamp(1rem, 4.7vw, 1.25rem) !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy .today-memory-meta-row > small { font-size: 0.64rem !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-copy > p { font-size: 0.69rem !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-note { font-size: 0.69rem !important; }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory .today-memory-relive-button { min-height: 36px !important; padding: 7px 11px !important; font-size: 0.68rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo-frame {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-photo-count i::after,
  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-relive-button::before {
    animation: none !important;
  }
}
