:root {
  color-scheme: dark;
  --black: #050507;
  --black-soft: #0b0a0e;
  --ink: #121116;
  --white: #f6f2f4;
  --white-soft: rgba(246, 242, 244, 0.72);
  --white-faint: rgba(246, 242, 244, 0.13);
  --pink: #f07a9d;
  --rose: #c33f68;
  --rose-soft: rgba(240, 122, 157, 0.16);
  --paper: #f3f1f2;
  --paper-ink: #201b1d;
  --serif: "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-x: clamp(24px, 7vw, 88px);
  --content: 760px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  scroll-behavior: smooth;
}

html.is-cinematic {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  height: 100svh;
  overflow: hidden;
}

body.is-cinematic {
  overscroll-behavior: none;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 5px;
}

#star-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.68;
}

main {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.4s ease;
}

main.is-open {
  opacity: 1;
}

.gift-cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  place-items: center;
  overflow: hidden;
  background: #000;
  transition: opacity 1.2s ease, visibility 1.2s;
}

.gift-cover::before {
  position: absolute;
  width: min(68vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(240, 122, 157, 0.07);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 120px rgba(195, 63, 104, 0.05) inset;
}

.gift-cover.is-dismissed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cover-stage {
  position: absolute;
  z-index: 1;
  width: min(86vw, 420px);
  text-align: center;
  transition: opacity 0.9s ease, transform 0.9s var(--ease), visibility 0.9s;
}

.cover-stage--loading.is-complete {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
}

.cover-stage--ready {
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
}

.cover-stage--ready.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.loading-label,
.loading-number,
.cover-kicker,
.eyebrow,
.chapter-index {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.love-loader {
  position: relative;
  width: 100%;
  height: 2px;
  margin: 28px 0 16px;
  background: rgba(255, 255, 255, 0.12);
}

.love-loader__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #8f2749, var(--pink));
  box-shadow: 0 0 22px rgba(240, 122, 157, 0.48);
}

.love-loader__heart {
  position: absolute;
  top: 50%;
  left: 0;
  color: var(--pink);
  font-size: 14px;
  filter: drop-shadow(0 0 7px rgba(240, 122, 157, 0.7));
  transform: translate(-50%, -50%);
}

.cover-kicker {
  color: var(--pink);
}

.cover-stage h1 {
  margin: 20px 0 30px;
  font-family: var(--serif);
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 500;
  letter-spacing: 0;
}

.birthday-gate {
  width: min(100%, 390px);
  margin: 0 auto;
}

.birthday-gate__line {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--serif);
  font-size: 14px;
}

.date-picker {
  display: grid;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 9px;
}

.date-picker label {
  display: grid;
  gap: 7px;
}

.date-picker label > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
  text-align: left;
}

.date-picker select {
  width: 100%;
  height: 48px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.date-picker select:focus {
  border-color: rgba(240, 122, 157, 0.7);
  background: rgba(240, 122, 157, 0.07);
}

.birthday-gate .open-gift {
  width: 100%;
}

.birthday-gate__message {
  min-height: 20px;
  margin: 13px 0 0;
  color: #ff9ab8;
  font-size: 12px;
  line-height: 1.6;
}

.birthday-gate.has-error {
  animation: gate-denied 0.42s ease;
}

.birthday-gate.has-error .date-picker select {
  border-color: rgba(240, 78, 116, 0.62);
}

@keyframes gate-denied {
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.open-gift {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 20px 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s var(--ease);
}

.open-gift:hover {
  border-color: rgba(240, 122, 157, 0.62);
  background: rgba(240, 122, 157, 0.08);
  transform: translateY(-2px);
}

.open-gift__mark {
  color: var(--pink);
  font-size: 18px;
}

.music-control {
  position: fixed;
  z-index: 50;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(7, 7, 9, 0.7);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.story-control {
  position: fixed;
  z-index: 50;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  place-items: center;
  background: rgba(7, 7, 9, 0.7);
  color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 12px;
}

.story-control[hidden] {
  display: none;
}

.music-control__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: opacity 0.3s ease;
}

.music-control__bars {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  height: 8px;
  align-items: end;
  gap: 1px;
}

.music-control__bars i {
  width: 1px;
  height: 4px;
  background: var(--pink);
  animation: music-bar 0.9s ease-in-out infinite alternate;
}

.music-control__bars i:nth-child(2) { animation-delay: -0.35s; }
.music-control__bars i:nth-child(3) { animation-delay: -0.6s; }
.music-control.is-paused .music-control__bars i { animation-play-state: paused; height: 2px; }

@keyframes music-bar {
  to { height: 8px; }
}

.chapter {
  position: relative;
  min-height: 100svh;
  padding: max(96px, 12vh) var(--page-x);
}

.chapter-heading {
  width: min(100%, var(--content));
  margin: 0 auto clamp(72px, 14vh, 160px);
}

.chapter-heading h2 {
  max-width: 620px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 58px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--pink);
}

.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(28px) scale(0.99);
  transition: opacity 1.2s var(--ease) var(--delay, 0ms), filter 1.2s ease var(--delay, 0ms), transform 1.2s var(--ease) var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.opening {
  display: grid;
  min-height: 125svh;
  place-items: center;
  text-align: center;
}

.chapter-index {
  position: absolute;
  top: max(28px, calc(env(safe-area-inset-top) + 16px));
  left: var(--page-x);
}

.opening__content {
  width: min(100%, 680px);
}

.cinema-line {
  margin: 0 0 22px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(18px, 4.8vw, 24px);
}

.opening__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 14vw, 92px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 0 60px rgba(240, 122, 157, 0.15);
}

.opening__title::after {
  display: block;
  width: 34px;
  height: 1px;
  margin: 28px auto;
  background: var(--pink);
  content: "";
}

.opening__note {
  max-width: 540px;
  margin: 0 auto;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(17px, 4.3vw, 21px);
  line-height: 2;
}

.scroll-cue {
  position: absolute;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px));
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.38);
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.scroll-cue span::after {
  display: block;
  width: 100%;
  height: 55%;
  background: var(--pink);
  content: "";
  animation: scroll-cue 2s ease-in-out infinite;
}

.scroll-cue small {
  font-size: 10px;
  letter-spacing: 0.12em;
}

@keyframes scroll-cue {
  0% { transform: translateY(-110%); }
  60%, 100% { transform: translateY(210%); }
}

.letter {
  padding-bottom: 22vh;
  background: linear-gradient(180deg, transparent, rgba(195, 63, 104, 0.025) 42%, transparent);
}

.letter__body,
.letter__closing {
  width: min(100%, 680px);
  margin-right: auto;
  margin-left: auto;
  font-family: var(--serif);
}

.letter__body p {
  margin: 0 0 clamp(64px, 12vh, 130px);
  color: rgba(246, 242, 244, 0.82);
  font-size: clamp(19px, 4.6vw, 27px);
  line-height: 2.05;
}

.letter__body p:nth-child(3),
.letter__body p:nth-child(5),
.letter__body p:nth-child(6) {
  color: var(--white);
  font-size: clamp(22px, 5.4vw, 32px);
}

.letter__closing {
  margin-top: 12vh;
  color: var(--pink);
  font-size: clamp(22px, 5.5vw, 30px);
  line-height: 1.8;
  text-align: right;
}

.people {
  min-height: 210svh;
}

.portrait-story {
  position: relative;
  display: grid;
  width: min(100%, 920px);
  margin: 0 auto 22vh;
  grid-template-columns: minmax(0, 1fr) minmax(32px, 0.28fr) minmax(0, 1fr);
  align-items: center;
}

.portrait {
  width: 100%;
  margin: 0;
}

.portrait--hers {
  margin-top: 28vh;
}

.portrait__media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.portrait__media::before {
  max-width: 170px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.28);
  content: attr(data-empty);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.portrait__media.has-image::before { display: none; }

.portrait__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait figcaption {
  margin-top: 18px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(16px, 4vw, 20px);
}

.portrait--hers figcaption { text-align: right; }

.portrait-story__thread {
  display: grid;
  height: 80%;
  place-items: center;
}

.portrait-story__thread i {
  position: relative;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, var(--rose), transparent);
  box-shadow: 0 0 18px rgba(240, 122, 157, 0.26);
}

.portrait-story__thread i::before,
.portrait-story__thread i::after {
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink);
  content: "";
  transform: translateX(-50%);
}

.portrait-story__thread i::before { top: 26%; }
.portrait-story__thread i::after { bottom: 22%; }

.story-lines {
  display: grid;
  min-height: 105svh;
  place-content: center;
  gap: 13vh;
  text-align: center;
}

.story-lines p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 5.5vw, 38px);
  line-height: 1.7;
}

.story-lines__quiet { color: var(--white-soft); }
.story-lines__answer { color: var(--pink); }

.seasons {
  padding-bottom: 18vh;
}

.season-list {
  width: min(100%, 900px);
  margin: 0 auto;
  border-top: 1px solid var(--white-faint);
}

.season {
  display: grid;
  min-height: 190px;
  padding: 36px 0;
  border-bottom: 1px solid var(--white-faint);
  grid-template-columns: 56px minmax(64px, 0.45fr) 1fr;
  align-items: center;
  gap: 20px;
}

.season__number {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
}

.season h3 {
  margin: 0;
  color: var(--pink);
  font-family: var(--serif);
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 400;
}

.season p {
  margin: 0;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(17px, 4vw, 22px);
  line-height: 1.8;
}

.seasons__promise {
  margin: clamp(90px, 18vh, 190px) auto 0;
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 52px);
  text-align: center;
}

.whispers {
  min-height: 240svh;
  padding: 0;
}

.whispers__sticky,
.photo-universe__sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.whisper-field,
.photo-field {
  position: absolute;
  inset: -10%;
  perspective: 900px;
}

.whisper-card {
  position: absolute;
  z-index: var(--z, 1);
  width: min(62vw, 300px);
  padding: 13px 15px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(13, 12, 16, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  opacity: var(--opacity, 0.6);
  backdrop-filter: blur(10px);
  animation: whisper-float var(--duration, 24s) ease-in-out var(--delay, 0s) infinite alternate;
  will-change: transform;
}

.whisper-card small {
  display: block;
  margin-bottom: 9px;
  color: var(--pink);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.whisper-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--serif);
  font-size: clamp(13px, 3.3vw, 17px);
  line-height: 1.65;
}

.whisper-card.is-highlight {
  border-color: rgba(240, 122, 157, 0.3);
  background: rgba(29, 13, 20, 0.84);
  box-shadow: 0 0 60px rgba(195, 63, 104, 0.14);
}

.whisper-card.is-highlight p {
  color: var(--white);
  font-size: clamp(16px, 4vw, 22px);
}

@keyframes whisper-float {
  from { transform: translate3d(var(--x0), var(--y0), var(--depth)) rotate(var(--r0)) scale(var(--scale)); }
  to { transform: translate3d(var(--x1), var(--y1), var(--depth)) rotate(var(--r1)) scale(calc(var(--scale) + 0.04)); }
}

.whispers__center {
  position: absolute;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(78vw, 620px);
  padding: 42px 18px;
  background: radial-gradient(ellipse, rgba(5, 5, 7, 0.96) 30%, rgba(5, 5, 7, 0.68) 70%, transparent);
  transform: translate(-50%, -50%);
  text-align: center;
}

.whispers__center p {
  margin: 0 0 14px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(16px, 4vw, 21px);
}

.whispers__center h2 {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: clamp(26px, 6vw, 44px);
  font-weight: 500;
  line-height: 1.55;
}

.wish {
  display: grid;
  min-height: 145svh;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.wish::before {
  position: absolute;
  inset: 20% 0 auto;
  height: 50%;
  background: radial-gradient(ellipse, rgba(195, 63, 104, 0.055), transparent 65%);
  content: "";
  pointer-events: none;
}

.wish__content {
  display: flex;
  width: min(100%, 660px);
  flex-direction: column;
  align-items: center;
}

.wish__content > p {
  margin: 0 0 22px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(18px, 4.5vw, 24px);
}

.wish h2 {
  margin: 4px 0 56px;
  font-family: var(--serif);
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 500;
}

.wish-star {
  position: relative;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.wish-star::before,
.wish-star::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(240, 122, 157, 0.2);
  border-radius: 50%;
  content: "";
  animation: star-ring 2.8s ease-out infinite;
}

.wish-star::after { animation-delay: -1.4s; }

.wish-star span {
  color: #fff4d4;
  font-size: 30px;
  filter: drop-shadow(0 0 14px rgba(255, 240, 190, 0.9));
  animation: star-pulse 2.2s ease-in-out infinite;
}

.wish-star.is-wished {
  pointer-events: none;
  animation: star-rise 2.6s var(--ease) forwards;
}

@keyframes star-ring {
  from { opacity: 0.8; transform: scale(0.6); }
  to { opacity: 0; transform: scale(1.55); }
}

@keyframes star-pulse {
  50% { opacity: 0.66; transform: scale(0.82); }
}

@keyframes star-rise {
  55% { opacity: 1; transform: translateY(-30vh) scale(1.35); }
  to { opacity: 0; transform: translateY(-54vh) scale(0.4); }
}

.wish__answer {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1.2s var(--ease), margin 1.2s var(--ease), opacity 1.2s ease 1s;
}

.wish__answer.is-visible {
  max-height: 260px;
  margin-top: 42px;
  opacity: 1;
}

.wish__answer p {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(18px, 4.5vw, 23px);
  line-height: 1.8;
}

.wish__answer p:last-child { color: var(--pink); }

.final-letter {
  display: grid;
  min-height: 150svh;
  place-items: center;
}

.paper {
  width: min(100%, 700px);
  color: var(--paper-ink);
  transform-origin: center top;
}

.paper.is-visible { animation: paper-open 1.8s var(--ease) both; }

.paper__inner {
  position: relative;
  padding: clamp(42px, 9vw, 88px) clamp(28px, 8vw, 78px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 60px 130px rgba(0, 0, 0, 0.62);
}

.paper__inner::after {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(rgba(0, 0, 0, 0.016) 1px, transparent 1px);
  background-size: 100% 5px;
  content: "";
  pointer-events: none;
}

@keyframes paper-open {
  from { clip-path: inset(48% 2% 48%); opacity: 0; transform: scaleY(0.4); }
  to { clip-path: inset(0); opacity: 1; transform: scaleY(1); }
}

.paper__to {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-size: 18px;
}

.paper h2 {
  margin: 0 0 34px;
  font-family: var(--serif);
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 500;
}

.paper #final-letter-content p,
.paper__promise {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.95;
}

.paper__promise {
  margin-top: 42px;
  color: #8a2949;
  font-size: clamp(19px, 4.6vw, 23px);
}

.paper footer {
  display: flex;
  margin-top: 64px;
  justify-content: space-between;
  color: rgba(32, 27, 29, 0.64);
  font-family: var(--serif);
  font-size: 14px;
}

.photo-universe {
  min-height: 320svh;
  padding: 0;
}

.photo-field {
  inset: 0;
  transition: opacity 1.4s ease, filter 1.4s ease;
}

.floating-photo {
  position: absolute;
  z-index: var(--z);
  width: clamp(110px, var(--size), 330px);
  aspect-ratio: var(--ratio, 3 / 4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  background: #111;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translate3d(var(--from-x), var(--from-y), var(--depth)) rotate(var(--rotation)) scale(0.58);
  transition: opacity 0.9s ease var(--enter-delay), transform 1.2s cubic-bezier(0.2, 1.18, 0.38, 1) var(--enter-delay);
  will-change: transform;
}

.photo-field.is-active .floating-photo {
  opacity: var(--photo-opacity);
  transform: translate3d(var(--x), var(--y), var(--depth)) rotate(var(--rotation)) scale(var(--scale));
  animation: photo-drift var(--drift-duration) ease-in-out var(--enter-delay) infinite alternate;
}

.floating-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-photo::after {
  position: absolute;
  inset: 0;
  border: 5px solid rgba(255, 255, 255, 0.03);
  content: "";
  pointer-events: none;
}

@keyframes photo-drift {
  from { transform: translate3d(var(--x), var(--y), var(--depth)) rotate(var(--rotation)) scale(var(--scale)); }
  to { transform: translate3d(calc(var(--x) + var(--drift-x)), calc(var(--y) + var(--drift-y)), var(--depth)) rotate(calc(var(--rotation) + 2deg)) scale(calc(var(--scale) + 0.035)); }
}

.photo-intro,
.future-copy {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  width: min(84vw, 670px);
  padding: 54px 24px;
  background: radial-gradient(ellipse, rgba(5, 5, 7, 0.98) 28%, rgba(5, 5, 7, 0.86) 58%, transparent 76%);
  transform: translate(-50%, -50%);
  text-align: center;
  transition: opacity 1s ease, visibility 1s;
}

.photo-intro p {
  margin: 0 0 20px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: 18px;
}

.photo-intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 52px);
  font-weight: 500;
  line-height: 1.5;
}

.photo-intro .photo-empty {
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 12px;
}

.photo-intro.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.future-copy {
  visibility: hidden;
  opacity: 0;
}

.future-copy.is-visible {
  visibility: visible;
  opacity: 1;
}

.future-copy > p {
  margin: 0 0 28px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(17px, 4.2vw, 22px);
  line-height: 1.85;
}

.future-copy h3 {
  margin: 0 0 42px;
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 48px);
  font-weight: 500;
  line-height: 1.5;
}

.future-copy__love {
  display: flex;
  margin-top: 52px;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.future-copy__love strong {
  font-family: var(--serif);
  font-size: clamp(23px, 6vw, 38px);
  font-weight: 500;
}

.future-copy__love strong:nth-child(2) {
  color: var(--pink);
  font-size: clamp(34px, 9vw, 58px);
}

.future-copy__love span {
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: 16px;
}

.photo-universe.is-ending .photo-field {
  opacity: 0.35;
  filter: brightness(0.48);
}

.finale {
  display: grid;
  min-height: 140svh;
  padding-bottom: calc(18vh + env(safe-area-inset-bottom));
  place-items: center;
  text-align: center;
}

.finale::after {
  position: absolute;
  inset: auto 0 0;
  height: 45vh;
  background: #000;
  content: "";
}

.finale__content {
  position: relative;
  z-index: 2;
}

.finale__content p {
  margin: 0 0 22px;
  color: var(--white-soft);
  font-family: var(--serif);
  font-size: clamp(18px, 4.5vw, 24px);
}

.finale__content h2 {
  margin: 42px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 10vw, 68px);
  font-weight: 500;
}

.reply {
  display: grid;
  min-height: 115svh;
  padding-bottom: calc(15vh + env(safe-area-inset-bottom));
  place-items: center;
}

.reply__inner {
  width: min(100%, 640px);
}

.reply__inner h2 {
  margin: 18px 0 54px;
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 50px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.reply-form label {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.reply-form textarea {
  display: block;
  width: 100%;
  min-height: 158px;
  max-height: 320px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  outline: 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--white);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
  resize: vertical;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.reply-form textarea:focus {
  border-color: rgba(240, 122, 157, 0.64);
  background: rgba(240, 122, 157, 0.045);
}

.reply-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.reply-submit {
  display: inline-flex;
  min-width: 128px;
  min-height: 48px;
  margin-top: 18px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.reply-submit span:last-child {
  color: var(--pink);
}

.reply-submit:disabled {
  cursor: wait;
  opacity: 0.5;
}

.reply-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--pink);
  font-family: var(--serif);
  font-size: 14px;
}

@media (max-width: 640px) {
  .chapter-heading { margin-bottom: 92px; }

  .portrait-story {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 2px;
  }

  .portrait--mine { transform: translateX(-8px); }
  .portrait--hers { transform: translateX(8px); }

  .portrait figcaption {
    font-size: 14px;
  }

  .season {
    min-height: 168px;
    grid-template-columns: 34px 54px 1fr;
    gap: 12px;
  }

  .whisper-card {
    width: min(68vw, 250px);
  }

  .paper footer {
    flex-direction: column;
    gap: 3px;
    text-align: right;
  }
}

@media (min-width: 900px) {
  .portrait--mine { transform: translateX(-7vw); }
  .portrait--hers { transform: translateX(7vw); }

  .whisper-card {
    width: min(28vw, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    filter: none;
    transform: none;
  }
}
