/* Home 1.0: reliable loading, consistent rhythm, and calmer hierarchy. */
html body .app-shell .map-stage.home-focus .hero-copy,
html body .app-shell .map-stage.home-focus .home-dashboard {
  width: min(1120px, calc(100% - 48px)) !important;
  margin-inline: auto !important;
}

html body .app-shell .map-stage.home-focus .hero-copy {
  padding-inline: 0 !important;
}

html body .app-shell .map-stage.home-focus .home-memory-pulse {
  gap: 10px !important;
}

html body .app-shell .map-stage.home-focus .home-memory-pulse .home-stat {
  border-color: rgba(12, 88, 83, 0.07) !important;
  background: rgba(251, 255, 252, 0.55) !important;
  box-shadow: 0 5px 15px rgba(8, 62, 66, 0.035) !important;
}

html body .app-shell .map-stage.home-focus .home-mappi-moment.is-context-visible {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: min(520px, calc(100% - 20px)) !important;
  min-height: 34px !important;
  margin: 13px auto 0 !important;
  padding: 8px 14px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(16, 112, 99, 0.08) !important;
  border-radius: 999px !important;
  color: #426c70 !important;
  background: rgba(251, 255, 252, 0.46) !important;
  box-shadow: none !important;
  font-size: 0.74rem !important;
  font-weight: 720 !important;
  letter-spacing: 0 !important;
}

html body .app-shell .map-stage.home-focus .home-dashboard {
  display: grid !important;
  align-content: start !important;
  gap: clamp(38px, 5vw, 64px) !important;
  padding-bottom: 156px !important;
}

html body .app-shell .map-stage.home-focus .home-dashboard > .home-section {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

html body .app-shell .map-stage.home-focus .home-action-section {
  margin-top: -17px !important;
  margin-bottom: -6px !important;
}

html body .app-shell .map-stage.home-focus .home-section-heading {
  width: 100% !important;
  margin: 0 0 16px !important;
}

html body .app-shell .map-stage.home-focus .home-section-heading > strong {
  max-width: 520px !important;
  margin-inline: auto !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-card.has-today-memory {
  box-shadow:
    0 24px 54px rgba(4, 52, 58, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.36) inset !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-photo::after {
  background: linear-gradient(180deg, transparent 52%, rgba(2, 29, 35, 0.08) 68%, rgba(2, 29, 35, 0.46) 100%) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-copy {
  max-width: min(430px, calc(100% - 32px)) !important;
  border-color: rgba(216, 255, 244, 0.15) !important;
  background: linear-gradient(145deg, rgba(5, 61, 62, 0.78), rgba(5, 43, 56, 0.72)) !important;
  box-shadow: 0 14px 34px rgba(2, 28, 35, 0.16) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08) !important;
  backdrop-filter: blur(14px) saturate(1.08) !important;
}

html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-note {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

html body .app-shell .map-stage.home-focus #homeJourney .life-chapter-fallback-art {
  display: grid !important;
  height: 100% !important;
  place-content: center !important;
  justify-items: center !important;
  gap: 7px !important;
  color: #ecfff8 !important;
  background:
    radial-gradient(circle at 72% 22%, color-mix(in srgb, var(--chapter-accent) 40%, transparent), transparent 34%),
    linear-gradient(145deg, #0b746e, #164f68) !important;
}

html body .app-shell .map-stage.home-focus #homeJourney .life-chapter-fallback-art strong {
  font-size: 1.8rem !important;
  font-weight: 860 !important;
}

html body .app-shell .map-stage.home-focus #homeJourney .life-chapter-fallback-art small {
  color: rgba(236, 255, 248, 0.7) !important;
  font-size: 0.66rem !important;
  font-weight: 760 !important;
}

html body .app-shell .map-stage.home-focus #homeJourney .life-chapter-preview-row:empty {
  display: none !important;
}

html body .app-shell .map-stage.home-focus #homeTimelineStrip .recent-memory-card-shelf {
  align-items: stretch !important;
}

html body .app-shell .map-stage.home-focus #homeTimelineStrip .recent-memory-shelf-card {
  min-height: 280px !important;
}

html body .app-shell .map-stage.home-focus .home-loading-card,
html body .app-shell .map-stage.home-focus .home-loading-shelf > span {
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(10, 89, 87, 0.07) !important;
  background: linear-gradient(120deg, rgba(231, 244, 240, 0.78) 22%, rgba(250, 255, 252, 0.96) 38%, rgba(228, 242, 239, 0.78) 54%) !important;
  background-size: 240% 100% !important;
  box-shadow: 0 12px 30px rgba(7, 55, 62, 0.05) !important;
  animation: homeMemoryShimmer 1.55s ease-in-out infinite !important;
}

html body .app-shell .map-stage.home-focus .home-loading-today {
  display: grid !important;
  min-height: 410px !important;
  padding: 18px !important;
  align-content: space-between !important;
  border-radius: 24px !important;
}

html body .app-shell .map-stage.home-focus .home-loading-kicker {
  width: 118px !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: rgba(9, 92, 85, 0.11) !important;
}

html body .app-shell .map-stage.home-focus .home-loading-photo {
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
}

html body .app-shell .map-stage.home-focus .home-loading-copy {
  display: grid !important;
  width: min(420px, 76%) !important;
  padding: 18px !important;
  gap: 10px !important;
  border-radius: 18px !important;
  background: rgba(12, 76, 73, 0.11) !important;
}

html body .app-shell .map-stage.home-focus .home-loading-copy i,
html body .app-shell .map-stage.home-focus .home-loading-echo i {
  display: block !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: rgba(8, 82, 78, 0.12) !important;
}

html body .app-shell .map-stage.home-focus .home-loading-copy i:first-child { width: 62% !important; height: 18px !important; }
html body .app-shell .map-stage.home-focus .home-loading-copy i:nth-child(2) { width: 82% !important; }
html body .app-shell .map-stage.home-focus .home-loading-copy i:last-child { width: 46% !important; }

html body .app-shell .map-stage.home-focus .home-loading-echo {
  display: grid !important;
  min-height: 168px !important;
  padding: 22px !important;
  grid-template-columns: 112px 1fr !important;
  grid-template-rows: repeat(2, auto) !important;
  align-content: center !important;
  gap: 12px 18px !important;
  border-radius: 22px !important;
}

html body .app-shell .map-stage.home-focus .home-loading-echo > span {
  grid-row: 1 / -1 !important;
  border-radius: 16px !important;
  background: rgba(8, 91, 84, 0.12) !important;
}

html body .app-shell .map-stage.home-focus .home-loading-shelf {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

html body .app-shell .map-stage.home-focus .home-loading-shelf > span {
  min-height: 246px !important;
  border-radius: 20px !important;
}

html body .app-shell .map-stage.home-focus .home-loading-recent > span {
  min-height: 210px !important;
}

@keyframes homeMemoryShimmer {
  0% { background-position: 110% 0; }
  100% { background-position: -110% 0; }
}

@media (max-width: 720px) {
  html body .app-shell .map-stage.home-focus .hero-copy,
  html body .app-shell .map-stage.home-focus .home-dashboard {
    width: calc(100% - 20px) !important;
  }

  html body .app-shell .map-stage.home-focus .home-dashboard {
    gap: 34px !important;
    padding-bottom: calc(138px + env(safe-area-inset-bottom)) !important;
  }

  html body .app-shell .map-stage.home-focus .home-action-section {
    margin-top: -12px !important;
    margin-bottom: -2px !important;
  }

  html body .app-shell .map-stage.home-focus .home-mappi-moment.is-context-visible {
    font-size: 0.68rem !important;
  }

  html body .app-shell .map-stage.home-focus #homeMemoryOfDay .today-memory-copy {
    max-width: calc(100% - 24px) !important;
  }

  html body .app-shell .map-stage.home-focus .home-loading-today {
    min-height: 360px !important;
    border-radius: 21px !important;
  }

  html body .app-shell .map-stage.home-focus .home-loading-copy {
    width: 88% !important;
  }

  html body .app-shell .map-stage.home-focus .home-loading-echo {
    grid-template-columns: 82px 1fr !important;
    min-height: 146px !important;
    padding: 17px !important;
  }

  html body .app-shell .map-stage.home-focus .home-loading-shelf {
    grid-auto-flow: column !important;
    grid-auto-columns: min(72vw, 250px) !important;
    grid-template-columns: none !important;
    overflow-x: hidden !important;
  }

  html body .app-shell .map-stage.home-focus .home-loading-shelf > span {
    min-height: 224px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.home-focus .home-loading-card,
  html body .app-shell .map-stage.home-focus .home-loading-shelf > span {
    animation: none !important;
  }
}
