/* Populated Today's Memory photo card: one compact keepsake caption.
   This final layer is intentionally scoped to .has-photo so empty and
   no-photo memories retain their existing layouts. */

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory:has(> .today-memory-main.has-photo) {
  padding-bottom: calc(var(--home-today-card-padding, 10px) + 58px) !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo {
  overflow: visible !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-copy,
html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo.caption-over-light .today-memory-copy,
html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo.caption-over-dark .today-memory-copy {
  position: absolute !important;
  right: auto !important;
  bottom: -50px !important;
  left: 50% !important;
  z-index: 7 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  grid-template-rows: auto auto !important;
  grid-template-areas:
    "title action"
    "meta action" !important;
  box-sizing: border-box !important;
  width: min(500px, calc(100% - 28px)) !important;
  max-width: min(500px, calc(100% - 28px)) !important;
  min-height: 74px !important;
  max-height: 80px !important;
  margin: 0 !important;
  padding: 9px 8px 9px 14px !important;
  align-content: center !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 3px 9px !important;
  overflow: hidden !important;
  border: 1px solid rgba(8, 111, 108, 0.18) !important;
  border-radius: 20px !important;
  color: #073744 !important;
  background:
    radial-gradient(circle at 14% -22%, rgba(255, 255, 255, 0.98), transparent 48%),
    linear-gradient(135deg, rgba(255, 252, 244, 0.98), rgba(232, 248, 243, 0.95)) !important;
  box-shadow:
    0 14px 30px rgba(3, 52, 59, 0.14),
    0 2px 8px rgba(10, 109, 115, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  text-align: left !important;
  text-shadow: none !important;
  transform: translateX(-50%) !important;
  backdrop-filter: blur(16px) saturate(1.04) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.04) !important;
  pointer-events: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-copy::before {
  display: none !important;
  content: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-title {
  grid-area: title !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  color: #073744 !important;
  font-size: clamp(1.02rem, 2vw, 1.18rem) !important;
  font-weight: 880 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.018em !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  text-shadow: none !important;
  white-space: nowrap !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-meta-row {
  grid-area: meta !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  justify-self: stretch !important;
  overflow: hidden !important;
  text-align: left !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-meta-row > small {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 6px !important;
  overflow: hidden !important;
  border: 0 !important;
  color: #58767a !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.69rem !important;
  font-weight: 720 !important;
  line-height: 1.1 !important;
  text-align: left !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-place-date {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  flex: 0 1 auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 4px !important;
  overflow: hidden !important;
  color: #58767a !important;
  white-space: nowrap !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-place-text {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo :is(
    .today-memory-meta-separator,
    .today-memory-mood-prefix,
    .today-memory-mood-divider
  ) {
  color: rgba(57, 93, 97, 0.62) !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-mood-chip {
  display: inline-flex !important;
  align-self: center !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: fit-content !important;
  flex: 0 0 auto !important;
  max-width: 100% !important;
  min-height: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 4px !important;
  overflow: hidden !important;
  border: 0 !important;
  color: #315b60 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.61rem !important;
  font-weight: 790 !important;
  line-height: 1 !important;
  text-align: left !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-mood-prefix,
html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-mood-divider {
  display: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-mood-chip::before {
  width: 5px !important;
  height: 5px !important;
  flex: 0 0 5px !important;
  margin-left: 1px !important;
  content: "" !important;
  border-radius: 50% !important;
  background: var(--memory-mood-color, #18a978) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--memory-mood-color, #18a978) 14%, transparent) !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-mood-value {
  overflow: hidden !important;
  color: #176769 !important;
  font-weight: 840 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-note {
  display: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button,
html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button:is(:hover, :focus-visible, :active, .is-relive-launching) {
  grid-area: action !important;
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  display: grid !important;
  grid-template-columns: 20px !important;
  grid-template-rows: 20px !important;
  box-sizing: border-box !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-content: center !important;
  place-items: center !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  background: linear-gradient(145deg, #0b8b7b, #075766) !important;
  box-shadow:
    0 9px 20px rgba(0, 45, 53, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  translate: none !important;
  transform: translateY(-50%) !important;
  animation: none !important;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease !important;
  pointer-events: auto !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button:focus-visible {
  outline: 3px solid rgba(88, 225, 193, 0.5) !important;
  outline-offset: 2px !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button > .today-memory-relive-label {
  display: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button > .today-memory-relive-icon {
  position: static !important;
  inset: auto !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  box-sizing: border-box !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1.08rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  translate: none !important;
  transform: none !important;
  animation: none !important;
}

@media (max-width: 760px) {
  html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
    .today-memory-card.has-today-memory:has(> .today-memory-main.has-photo) {
    padding-bottom: calc(var(--home-today-card-padding, 8px) + 52px) !important;
  }

  html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
    .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-copy {
    bottom: -45px !important;
    width: min(340px, calc(100% - 20px)) !important;
    max-width: min(340px, calc(100% - 20px)) !important;
    min-height: 70px !important;
    max-height: 76px !important;
    padding: 8px 7px 8px 12px !important;
    gap: 2px 7px !important;
    border-radius: 18px !important;
  }

  html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
    .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-title {
    font-size: clamp(0.94rem, 4vw, 1.05rem) !important;
  }

  html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
    .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-meta-row > small {
    font-size: 0.61rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
    .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-relive-button {
    transition: none !important;
  }
}

/* Today's Memory stays photo-led and full bleed. Smart focus only changes the
   object position when a high-confidence subject crop is cached. */
html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-photo {
  overflow: hidden !important;
  background: linear-gradient(145deg, #dceee9, #c9e2de) !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-photo-backdrop {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body main.app-shell section.map-stage.home-focus #homeDashboard #homeMemoryOfDay
  .today-memory-card.has-today-memory > .today-memory-main.has-photo .today-memory-photo-frame {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: var(--today-photo-position, center center) !important;
  background: transparent !important;
  transform: scale(1.012) !important;
  animation: today-photo-arrive 620ms ease-out both !important;
  transition: opacity 360ms ease !important;
}

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