:root {
  --ink: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.7);
  --faint: rgba(246, 241, 232, 0.12);
  --forest-950: #031116;
  --forest-900: #061a21;
  --forest-800: #0a2830;
  --mint: #a9e2ca;
  --mint-bright: #d4f4e4;
  --gold: #f3d69a;
  --glass: rgba(5, 25, 31, 0.62);
  --glass-strong: rgba(4, 20, 25, 0.82);
  --border: rgba(222, 246, 234, 0.16);
  --display: looking-flowers-caps, "Segoe Print", "Bradley Hand", cursive;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-top: max(1.1rem, env(safe-area-inset-top));
  --safe-right: max(1.1rem, env(safe-area-inset-right));
  --safe-bottom: max(1.1rem, env(safe-area-inset-bottom));
  --safe-left: max(1.1rem, env(safe-area-inset-left));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--forest-950);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--forest-950);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--mint-bright);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.scene,
.scene__video,
.scene__wash,
.scene__vignette,
.ambient-lights {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene {
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, #123640 0, transparent 52%),
    var(--forest-950);
}

.scene__video {
  object-fit: cover;
  object-position: center center;
  opacity: 0.7;
  filter: saturate(0.78) contrast(1.02);
  transform: scale(1.015);
}

.scene__wash {
  background:
    linear-gradient(180deg, rgba(3, 17, 22, 0.38) 0%, rgba(3, 17, 22, 0.08) 36%, rgba(3, 17, 22, 0.7) 100%),
    rgba(5, 30, 36, 0.45);
}

.scene__vignette {
  box-shadow:
    inset 0 0 11vw rgba(0, 8, 12, 0.74),
    inset 0 -14vh 18vh rgba(0, 9, 13, 0.4);
}

.ambient-light {
  --size: 5px;
  --x: 50%;
  --y: 50%;
  --delay: 0s;
  --duration: 8s;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 8px 2px rgba(178, 239, 208, 0.55);
  opacity: 0.28;
  animation: drift var(--duration) ease-in-out var(--delay) infinite alternate;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
  pointer-events: none;
}

.site-header button {
  pointer-events: auto;
}

.wordmark,
.nav-button,
.icon-button,
.classic-back,
.classic-read-all {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark__mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(212, 244, 228, 0.45);
  border-radius: 50%;
  color: var(--mint-bright);
  font-family: var(--serif);
  font-size: 1rem;
}

.wordmark__text {
  font-size: 0.7rem;
  font-weight: 650;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 17, 22, 0.32);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nav-button:hover {
  color: var(--ink);
  border-color: rgba(212, 244, 228, 0.35);
  background: rgba(3, 17, 22, 0.55);
}

.main,
.view {
  min-height: 100vh;
  min-height: 100dvh;
}

.view {
  position: relative;
  width: 100%;
  padding: calc(var(--safe-top) + 5.4rem) var(--safe-right) calc(var(--safe-bottom) + 2rem) var(--safe-left);
}

.view.is-entering .reveal-group > *,
.view.is-entering .archive-heading > *,
.view.is-entering .year-card,
.view.is-entering .birthday-intro > * {
  animation: rise-in 700ms cubic-bezier(0.21, 0.78, 0.28, 1) both;
}

.view.is-entering .reveal-group > *:nth-child(2),
.view.is-entering .archive-heading > *:nth-child(2),
.view.is-entering .birthday-intro > *:nth-child(2) {
  animation-delay: 80ms;
}

.view.is-entering .reveal-group > *:nth-child(3),
.view.is-entering .archive-heading > *:nth-child(3),
.view.is-entering .birthday-intro > *:nth-child(3) {
  animation-delay: 160ms;
}

.view.is-entering .reveal-group > *:nth-child(4),
.view.is-entering .birthday-intro > *:nth-child(4) {
  animation-delay: 240ms;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--mint);
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.display-title,
.section-title,
.birthday-intro h1,
.chapter-opening h2,
.note__text,
.finale__after h2,
.ending h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.display-title {
  font-size: clamp(4.6rem, 11vw, 9.5rem);
  line-height: 0.78;
  text-wrap: balance;
}

.view--welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 8rem);
  max-width: 1400px;
  margin: 0 auto;
}

.welcome-copy {
  position: relative;
  z-index: 2;
  padding-left: clamp(0rem, 5vw, 4rem);
}

.welcome-copy__body,
.archive-heading > p:last-child,
.birthday-intro__copy {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.button-row--center {
  justify-content: center;
}

.button {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--forest-950);
  background: var(--mint-bright);
  box-shadow: 0 10px 35px rgba(107, 202, 161, 0.15);
}

.button--primary:hover {
  box-shadow: 0 13px 42px rgba(107, 202, 161, 0.26);
}

.button--quiet {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(3, 17, 22, 0.28);
  backdrop-filter: blur(8px);
}

.button--compact {
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
}

.welcome-orbit {
  position: relative;
  width: min(36vw, 29rem);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.welcome-number {
  position: relative;
  z-index: 2;
  color: rgba(235, 255, 245, 0.94);
  font-family: var(--serif);
  font-size: clamp(8rem, 15vw, 13rem);
  font-weight: 400;
  letter-spacing: -0.1em;
  text-shadow: 0 0 45px rgba(163, 234, 201, 0.25);
  transform: translateX(-0.06em);
}

.orbit {
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(202, 244, 224, 0.18);
  border-radius: 50%;
  animation: orbit-pulse 5s ease-in-out infinite;
}

.orbit--two {
  inset: 15%;
  border-style: dashed;
  animation-delay: -1.8s;
  animation-duration: 7s;
}

.orbit::after,
.orbit--two::before {
  content: "";
  position: absolute;
  top: 12%;
  right: 12%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 14px 4px rgba(184, 245, 216, 0.55);
}

.view--archive {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

.archive-heading {
  max-width: 46rem;
}

.section-title {
  font-size: clamp(3.25rem, 7vw, 6.4rem);
  line-height: 0.92;
}

.section-title--large {
  max-width: 950px;
  font-size: clamp(4rem, 9vw, 8rem);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: clamp(2rem, 5vh, 4rem);
}

.year-card {
  position: relative;
  display: grid;
  min-height: 15rem;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 1.5rem;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  color: var(--ink);
  text-align: left;
  background:
    radial-gradient(circle at 85% 15%, rgba(169, 226, 202, 0.14), transparent 34%),
    var(--glass);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.year-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 244, 228, 0.35);
  background:
    radial-gradient(circle at 85% 15%, rgba(169, 226, 202, 0.2), transparent 38%),
    rgba(5, 25, 31, 0.78);
}

.year-card--current::before {
  content: "Current";
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  color: var(--mint-bright);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.year-card__age {
  font-family: var(--serif);
  font-size: clamp(5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: -0.08em;
}

.year-card__content {
  padding-bottom: 0.1rem;
}

.year-card__year {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--mint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.year-card__title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.year-card__description {
  display: block;
  max-width: 31rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.45;
}

.archive-future {
  align-self: center;
  margin: 2rem 0 0;
  color: rgba(246, 241, 232, 0.48);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-future span {
  margin-right: 0.4rem;
  color: var(--mint);
}

.view--birthday {
  display: grid;
  place-items: center;
}

.birthday-intro {
  width: min(100%, 1050px);
  text-align: center;
}

.birthday-intro__copy {
  margin: 1.8rem auto 2.2rem;
  text-wrap: balance;
}

.experience {
  display: grid;
  width: min(100%, 1300px);
  min-height: min(730px, calc(100dvh - 9rem));
  grid-template-columns: 15.5rem minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.8rem;
  background: rgba(3, 17, 22, 0.42);
  box-shadow: 0 30px 80px rgba(0, 8, 12, 0.32);
  backdrop-filter: blur(18px);
}

.chapter-rail {
  padding: 2rem 1.15rem;
  border-right: 1px solid var(--border);
  background: rgba(2, 14, 18, 0.24);
}

.chapter-rail__label {
  margin: 0 0 1rem 0.8rem;
  color: rgba(246, 241, 232, 0.42);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.chapter-button {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  color: rgba(246, 241, 232, 0.54);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.chapter-button:hover,
.chapter-button.is-active {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(198, 239, 219, 0.07);
}

.chapter-button.is-complete {
  color: rgba(212, 244, 228, 0.72);
}

.chapter-button__number {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid rgba(212, 244, 228, 0.18);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.78rem;
}

.chapter-button.is-complete .chapter-button__number {
  color: var(--forest-950);
  background: var(--mint);
}

.chapter-button__name {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.15;
}

.story-stage {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr auto;
  padding: 1.5rem clamp(1.3rem, 4vw, 3.5rem) 1.6rem;
}

.story-stage__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-button {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(3, 17, 22, 0.2);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  background: rgba(212, 244, 228, 0.09);
  transform: translateY(-1px);
}

.progress-copy {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(246, 241, 232, 0.55);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progress-track {
  width: clamp(5rem, 11vw, 9rem);
  height: 2px;
  overflow: hidden;
  background: rgba(246, 241, 232, 0.14);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mint-bright);
  transition: width 500ms ease;
}

.story-card {
  position: relative;
  display: grid;
  min-height: 25rem;
  place-items: center;
  text-align: center;
}

.chapter-opening,
.note,
.finale,
.ending {
  width: min(100%, 760px);
}

.chapter-opening__number {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  margin: 0 auto 1.3rem;
  border: 1px solid rgba(212, 244, 228, 0.28);
  border-radius: 50%;
  color: var(--mint-bright);
  font-family: var(--serif);
  font-size: 1rem;
}

.chapter-opening h2 {
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.92;
}

.chapter-opening > p:last-of-type {
  max-width: 38rem;
  margin: 1.4rem auto 1.8rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.55;
  text-wrap: balance;
}

.note {
  animation: note-in 580ms cubic-bezier(0.18, 0.75, 0.27, 1) both;
}

.note__chapter,
.note__number {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.note__chapter {
  color: var(--mint);
}

.note__number {
  margin-top: 0.6rem;
  color: rgba(246, 241, 232, 0.4);
}

.note__text {
  margin: 1.45rem auto 0;
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 0.98;
  text-wrap: balance;
}

.note__actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.spark-picker {
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);
  overflow:hidden;
  width: 100%;
}

.spark {
  position: relative;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.spark::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(212, 244, 228, 0.55);
  box-shadow: 0 0 9px 2px rgba(169, 226, 202, 0.35);
  transform: translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.spark:hover::before,
.spark.is-current::before {
  width: 9px;
  height: 9px;
  background: var(--mint-bright);
  box-shadow: 0 0 14px 4px rgba(169, 226, 202, 0.55);
}

.spark.is-seen::before {
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(243, 214, 154, 0.38);
}

.spark.is-locked {
  cursor: not-allowed;
  opacity: 0.28;
}

.spark.is-locked::before {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(212, 244, 228, 0.55);
}

.finale__line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 1;
  text-wrap: balance;
  animation: note-in 700ms ease both;
}

.finale__after {
  animation: finale-in 900ms cubic-bezier(0.15, 0.85, 0.22, 1) both;
}

.finale__after h2 {
  color: var(--mint-bright);
  font-size: clamp(4.5rem, 10vw, 9rem);
  line-height: 0.78;
  text-shadow: 0 0 45px rgba(169, 226, 202, 0.22);
}

.finale__after > p:not(.eyebrow) {
  margin: 1.6rem 0 2rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.experience.is-finale {
  border-color: rgba(243, 214, 154, 0.28);
  box-shadow: 0 25px 100px rgba(126, 178, 139, 0.12);
}

.experience.is-finale .ambient-light {
  animation-duration: 2s;
}

.ending h2 {
  font-size: clamp(4rem, 9vw, 8rem);
  line-height: 0.82;
}

.ending > p:not(.eyebrow) {
  max-width: 42rem;
  margin: 1.6rem auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.65;
}

.ending__heart {
  margin-top: 1.5rem;
  color: var(--mint-bright);
  font-size: 1.35rem;
  text-shadow: 0 0 18px rgba(169, 226, 202, 0.6);
  animation: heartbeat 2.4s ease-in-out infinite;
}

.view--classic {
  display: grid;
  place-items: center;
  text-align: center;
}

.classic-back {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 4.7rem);
  left: var(--safe-left);
  padding: 0.5rem;
  color: rgba(246, 241, 232, 0.68);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.classic-read-all {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 4.7rem);
  right: var(--safe-right);
  padding: 0.5rem;
  color: rgba(246, 241, 232, 0.68);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.classic-stage {
  display: grid;
  width: min(100%, 920px);
  min-height: 65vh;
  place-content: center;
  padding: 2rem;
  border: 0;
  color: var(--ink);
  text-align: center;
  background: transparent;
  cursor: pointer;
}

.classic-kicker {
  min-height: 1.2rem;
  color: var(--mint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.classic-text {
  display: block;
  margin-top: 1rem;
  white-space: pre-line;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5.5vw, 5rem);
  line-height: 1.05;
  text-wrap: balance;
  animation: note-in 520ms ease both;
}

.classic-hint {
  margin-top: 2.4rem;
  color: rgba(246, 241, 232, 0.42);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.classic-progress {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(246, 241, 232, 0.5);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.memory-dialog {
  width: min(calc(100% - 2rem), 780px);
  max-height: min(84dvh, 850px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(212, 244, 228, 0.24);
  border-radius: 1.5rem;
  color: var(--ink);
  background: rgba(4, 20, 25, 0.96);
  box-shadow: 0 35px 100px rgba(0, 5, 8, 0.6);
}

.memory-dialog::backdrop {
  background: rgba(0, 8, 12, 0.72);
  backdrop-filter: blur(8px);
}

.memory-dialog__topline {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.2rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--border);
  background: rgba(4, 20, 25, 0.96);
}

.memory-dialog__topline .eyebrow {
  margin-bottom: 0.45rem;
}

.memory-dialog__topline h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 400;
  line-height: 1;
}

.memory-dialog__content {
  max-height: calc(min(84dvh, 850px) - 7.8rem);
  padding: 1rem clamp(1.2rem, 4vw, 2.4rem) 2.5rem;
  overflow-y: auto;
}

.memory-group {
  padding: 1.2rem 0;
}

.memory-group + .memory-group {
  border-top: 1px solid var(--border);
}

.memory-group h3 {
  margin: 0 0 0.8rem;
  color: var(--mint);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.memory-group ol {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.4rem;
}

.memory-group li {
  padding-left: 0.4rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.45;
}

.memory-group li::marker {
  color: rgba(169, 226, 202, 0.65);
  font-size: 0.75em;
}

noscript {
  position: fixed;
  z-index: 50;
  inset: 1rem;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: var(--ink);
  text-align: center;
  background: var(--forest-950);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes note-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes finale-in {
  0% { opacity: 0; transform: scale(0.86); filter: blur(8px); }
  65% { opacity: 1; transform: scale(1.025); filter: blur(0); }
  100% { transform: scale(1); }
}

@keyframes drift {
  0% { transform: translate3d(-10px, 7px, 0) scale(0.75); opacity: 0.15; }
  55% { opacity: 0.55; }
  100% { transform: translate3d(13px, -18px, 0) scale(1.2); opacity: 0.22; }
}

@keyframes orbit-pulse {
  0%, 100% { transform: scale(0.98) rotate(0deg); opacity: 0.55; }
  50% { transform: scale(1.03) rotate(4deg); opacity: 0.95; }
}

@keyframes heartbeat {
  0%, 14%, 100% { transform: scale(1); }
  7% { transform: scale(1.14); }
}

@media (max-width: 850px) {
  .view--welcome {
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
  }

  .welcome-copy {
    padding-left: 0;
  }

  .welcome-copy__body {
    margin-right: auto;
    margin-left: auto;
  }

  .welcome-copy .button-row {
    justify-content: center;
  }

  .welcome-orbit {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(78vw, 32rem);
    opacity: 0.14;
    transform: translate(-50%, -50%);
  }

  .display-title {
    font-size: clamp(4.7rem, 18vw, 8rem);
  }

  .experience {
    grid-template-columns: 1fr;
  }

  .chapter-rail {
    order: 2;
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid var(--border);
    border-right: 0;
    overflow-x: auto;
  }

  .chapter-rail__label {
    display: none;
  }

  .chapter-list {
    flex-direction: row;
    width: max-content;
  }

  .chapter-button {
    width: auto;
    min-width: 9rem;
    grid-template-columns: 1.6rem 1fr;
    padding: 0.65rem 0.7rem;
  }

  .chapter-button__number {
    width: 1.5rem;
    height: 1.5rem;
  }

  .story-stage {
    min-height: 0;
  }
}

@media (max-width: 650px) {
  .wordmark__text {
    display: none;
  }

  .view {
    padding-top: calc(var(--safe-top) + 4.8rem);
  }

  .view--archive {
    justify-content: flex-start;
  }

  .archive-heading {
    text-align: center;
  }

  .archive-heading > p:last-child {
    margin-right: auto;
    margin-left: auto;
  }

  .year-grid {
    grid-template-columns: 1fr;
  }

  .year-card {
    min-height: 12rem;
  }

  .view--birthday {
    align-items: start;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
  }

  .birthday-intro {
    padding: 8vh var(--safe-right) var(--safe-bottom) var(--safe-left);
  }

  .birthday-intro .section-title {
    font-size: clamp(4rem, 19vw, 6.5rem);
  }

  .experience {
    min-height: calc(100dvh - var(--safe-top) - 4.8rem);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 1.5rem 1.5rem 0 0;
  }

  .story-stage {
    min-height: calc(100dvh - var(--safe-top) - 11rem);
    padding: 1.15rem 1.15rem 1rem;
  }

  .story-card {
    min-height: 22rem;
  }

  .chapter-opening h2 {
    font-size: clamp(3.3rem, 16vw, 5rem);
  }

  .note__text {
    font-size: clamp(2.7rem, 12vw, 4.5rem);
  }

  .finale__after h2 {
    font-size: clamp(4.2rem, 18vw, 6rem);
  }

  .ending h2 {
    font-size: clamp(4rem, 17vw, 6rem);
  }

  .classic-stage {
    min-height: 75vh;
    padding: 1.2rem;
  }

  .classic-text {
    font-size: clamp(2.15rem, 11vw, 3.5rem);
  }
}

@media (max-width: 420px) {
  .nav-button {
    padding: 0.65rem 0.78rem;
  }

  .welcome-copy__body br {
    display: none;
  }

  .button-row {
    flex-direction: column;
  }

  .button-row .button {
    width: 100%;
  }

  .year-card {
    grid-template-columns: 4.2rem 1fr;
    gap: 1rem;
    padding: 1.2rem;
  }

  .year-card__age {
    font-size: 4.7rem;
  }

  .progress-track {
    width: 4.5rem;
  }
}

@media (min-width: 1300px) and (min-aspect-ratio: 16/10) {
  .scene__video {
    opacity: 0.58;
    filter: saturate(0.72) contrast(1.04) blur(0.25px);
  }

  .scene__wash {
    background:
      radial-gradient(ellipse at center, rgba(5, 30, 36, 0.1) 0, rgba(3, 17, 22, 0.44) 74%),
      rgba(5, 30, 36, 0.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .scene__video {
    display: none;
  }
}
