:root {
  --bg: #07011a;
  --ink: #fff6f0;
  --mute: #d7c2d8;
  --rose: #ff6b9d;
  --gold: #ffd39a;
  --lilac: #c77dff;
  --paper: #fff4e8;
  --paper-ink: #4a2b3a;
  --yes: #ff4d7a;
  --font-display: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", cursive;
  --font-letter: "ZCOOL XiaoWei", "Kaiti SC", "STKaiti", "KaiTi", "PingFang SC", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Serif SC", "Songti SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

button {
  font-family: inherit;
  touch-action: manipulation;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

#fx {
  z-index: 8;
}

.aurora {
  position: fixed;
  inset: -30%;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 18% 22%, rgba(199, 125, 255, 0.38), transparent 55%),
    radial-gradient(ellipse 45% 35% at 82% 12%, rgba(255, 107, 157, 0.32), transparent 55%),
    radial-gradient(ellipse 55% 45% at 50% 100%, rgba(76, 201, 240, 0.16), transparent 55%),
    radial-gradient(ellipse 30% 30% at 70% 70%, rgba(255, 211, 154, 0.08), transparent 50%);
  filter: blur(28px);
  animation: aurora 16s ease-in-out infinite alternate;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(4, 0, 16, 0.72) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

#cursor-glow {
  position: fixed;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 80;
  background: radial-gradient(circle, #fff 0 18%, rgba(255, 180, 210, 0.7) 32%, transparent 70%);
  mix-blend-mode: screen;
  transform: translate(-100px, -100px);
}

.trail-heart {
  position: fixed;
  pointer-events: none;
  z-index: 70;
  font-size: 12px;
  color: #ff8fab;
  animation: trail-up 0.9s ease-out forwards;
  text-shadow: 0 0 10px #ff6b9d;
}

@keyframes aurora {
  from { transform: translate3d(-3%, 2%, 0) rotate(-4deg) scale(1); }
  to { transform: translate3d(4%, -3%, 0) rotate(5deg) scale(1.08); }
}

@keyframes trail-up {
  to {
    transform: translateY(-28px) scale(0.4);
    opacity: 0;
  }
}

.music-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 4, 28, 0.45);
  color: var(--ink);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.music-eq {
  display: flex;
  gap: 2px;
  height: 12px;
  align-items: flex-end;
}

.music-eq i {
  width: 2px;
  height: 4px;
  background: var(--gold);
  animation: eq 0.8s ease-in-out infinite;
}

.music-eq i:nth-child(2) { animation-delay: 0.15s; }
.music-eq i:nth-child(3) { animation-delay: 0.3s; }

.music-btn.is-off .music-eq i {
  animation: none;
  height: 3px;
  opacity: 0.4;
}

.music-label {
  font-size: 12px;
  letter-spacing: 0.12em;
}

@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 12px; }
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  filter: blur(8px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
}

.scene.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  filter: none;
}

.scene.is-leaving {
  opacity: 0;
  transform: scale(1.03);
  filter: blur(10px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  letter-spacing: 0.42em;
  font-size: 12px;
  text-indent: 0.42em;
}

.hero-name,
.scene h2,
.celebrate-title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 18px;
}

.hero-name {
  font-size: clamp(52px, 10vw, 108px);
  background: linear-gradient(120deg, #fff, #ffd6e8 40%, #ffd39a 70%, #fff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 10px 28px rgba(255, 107, 157, 0.35));
}

.scene h2 {
  font-size: clamp(32px, 6vw, 58px);
}

.lead {
  margin: 0 0 28px;
  color: var(--mute);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 2;
}

.lead.small {
  font-size: 15px;
  max-width: 36em;
}

.hint {
  margin: 18px 0 0;
  color: rgba(255, 246, 240, 0.45);
  font-size: 13px;
}

.envelope-hint {
  position: relative;
  z-index: 2;
}

.mail-shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -18px;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 70%);
  filter: blur(4px);
}

.gate-card,
.question-card,
.celebrate-copy,
.stars-copy,
.heart-caption {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

#scene-gate,
#scene-envelope {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gate-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 560px);
  height: min(72vw, 560px);
  margin: calc(min(72vw, 560px) / -2) 0 0 calc(min(72vw, 560px) / -2);
  border-radius: 50%;
  border: 1px dashed rgba(255, 211, 154, 0.22);
  animation: spin 48s linear infinite;
}

.gate-orbit::before,
.gate-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, transparent 70%);
}

.gate-orbit::before {
  width: 10px;
  height: 10px;
  top: -5px;
  left: 50%;
  box-shadow: 0 0 18px #ffd39a;
}

.gate-orbit::after {
  width: 7px;
  height: 7px;
  bottom: 18%;
  right: 6%;
  box-shadow: 0 0 14px #c77dff;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-glow,
.btn-ghost,
.btn-yes,
.btn-mini {
  appearance: none;
  border: 0;
  position: relative;
  padding: 14px 32px;
  border-radius: 999px;
  color: #2a1020;
  background: linear-gradient(180deg, #ffe6c7, #ffb3c6);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 10px 30px rgba(255, 77, 122, 0.35),
    0 0 40px rgba(255, 211, 154, 0.25);
  font-size: 16px;
  letter-spacing: 0.18em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-120%);
  animation: sweep 2.8s ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
  .btn-glow:hover,
  .btn-yes:hover,
  .btn-ghost:hover,
  .btn-mini:hover {
    transform: translateY(-2px) scale(1.03);
  }

  #btn-after-letter:hover,
  #btn-after-heart:hover {
    transform: translateX(-50%) translateY(-2px);
  }
}

@keyframes sweep {
  40%, 100% { transform: translateX(120%); }
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 211, 154, 0.45);
  box-shadow: 0 0 24px rgba(199, 125, 255, 0.2);
  letter-spacing: 0.2em;
}

.scene-kicker {
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.28em;
  font-size: 13px;
}

.mail {
  position: relative;
  width: min(78vw, 360px);
  height: 250px;
  perspective: 900px;
}

.mail-body {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: mail-float 4.5s ease-in-out infinite;
}

.mail.is-open .mail-body {
  animation: none;
}

@keyframes mail-float {
  0%, 100% { transform: translateY(0) rotateX(6deg); }
  50% { transform: translateY(-14px) rotateX(2deg); }
}

.mail-pocket,
.mail-front,
.mail-flap,
.mini-letter {
  position: absolute;
  left: 0;
  width: 100%;
}

.mail-pocket {
  bottom: 0;
  height: 70%;
  background: linear-gradient(180deg, #6b2148, #3a1028);
  clip-path: polygon(0 28%, 50% 0, 100% 28%, 100% 100%, 0 100%);
  box-shadow: inset 0 12px 20px rgba(0, 0, 0, 0.25);
}

.mail-front {
  bottom: 0;
  height: 62%;
  background: linear-gradient(180deg, #9a3d64, #5a1d3a);
  clip-path: polygon(0 0, 50% 42%, 100% 0, 100% 100%, 0 100%);
  z-index: 4;
}

.mail-flap {
  top: 0;
  height: 58%;
  background: linear-gradient(180deg, #c45c82, #7a2a4c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  z-index: 6;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mail.is-open .mail-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.mini-letter {
  top: 38px;
  height: 170px;
  background: var(--paper);
  border-radius: 4px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 24px;
  color: var(--paper-ink);
  transform: translateY(18px);
  transition: transform 1s 0.25s ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.mail.is-open .mini-letter {
  transform: translateY(-70px);
}

.mini-to {
  font-family: var(--font-letter);
  font-size: 16px;
}

.mini-line,
.mini-line.short {
  height: 2px;
  width: 78%;
  background: rgba(74, 43, 58, 0.18);
}

.mini-line.short { width: 46%; }

.mini-heart {
  color: #d24a73;
  align-self: flex-end;
}

.seal {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 8;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border: 0;
  border-radius: 50%;
  color: #ffe1c4;
  font-family: var(--font-display);
  font-size: 30px;
  background:
    radial-gradient(circle at 32% 28%, #ff8a8a, #9b1d3a 62%, #5a1024);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.35),
    inset 0 3px 8px rgba(255, 255, 255, 0.28),
    0 0 0 6px rgba(140, 24, 48, 0.28);
  animation: seal-pulse 2.2s ease-in-out infinite;
}

.seal span {
  display: block;
  transform: translateY(1px);
}

.mail.is-open .seal {
  animation: none;
  transform: scale(0.2) rotate(20deg);
  opacity: 0;
  pointer-events: none;
  transition: 0.5s ease;
}

@keyframes seal-pulse {
  0%, 100% { box-shadow: 0 10px 18px rgba(0,0,0,.35), inset 0 3px 8px rgba(255,255,255,.28), 0 0 0 6px rgba(140,24,48,.28); }
  50% { box-shadow: 0 10px 18px rgba(0,0,0,.35), inset 0 3px 8px rgba(255,255,255,.28), 0 0 0 10px rgba(255,107,157,.18); }
}

.moon {
  position: absolute;
  top: 8%;
  right: 10%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7e8, #e7c58a 55%, #b9894a);
  box-shadow: 0 0 50px rgba(255, 211, 154, 0.45), 0 0 120px rgba(255, 211, 154, 0.2);
}

.moon::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(120, 80, 40, 0.12);
  top: 22px;
  left: 18px;
}

.letter-paper {
  width: min(92vw, 560px);
  max-height: min(72dvh, 640px);
  overflow: auto;
  padding: 36px 34px 28px;
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.97), rgba(255, 236, 220, 0.95)),
    repeating-linear-gradient(transparent 0 28px, rgba(180, 120, 100, 0.12) 28px 29px);
  color: var(--paper-ink);
  border-radius: 8px 18px 10px 8px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  transform: rotate(-0.6deg);
  text-align: left;
  z-index: 2;
}

.letter-paper h2 {
  font-family: var(--font-letter);
  font-size: 28px;
  margin: 0 0 12px;
  color: #5a2438;
}

.letter-date {
  margin: 0 0 8px;
  color: #a07878;
  font-size: 12px;
  letter-spacing: 0.2em;
}

.typed {
  margin: 0;
  min-height: 12em;
  font-family: var(--font-letter);
  font-size: 18px;
  line-height: 2.05;
  white-space: pre-wrap;
}

.caret {
  color: #d24a73;
  animation: blink 1s steps(1) infinite;
}

.letter-sign {
  margin: 18px 0 0;
  text-align: right;
  font-family: var(--font-display);
  font-size: 22px;
  color: #8a3a52;
}

@keyframes blink {
  50% { opacity: 0; }
}

#btn-after-letter,
#btn-after-heart,
#btn-skip-letter {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 12;
}

.btn-skip {
  appearance: none;
  border: 1px solid rgba(255, 211, 154, 0.35);
  background: rgba(12, 4, 28, 0.55);
  color: rgba(255, 246, 240, 0.8);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.16em;
  backdrop-filter: blur(10px);
}

#scene-letter {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: max(56px, calc(env(safe-area-inset-top) + 48px));
  padding-bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));
}

.letter-paper {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.constellation {
  position: absolute;
  inset: 12% 4% 8%;
  z-index: 1;
}

.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.constellation-lines line {
  stroke: rgba(255, 211, 154, 0.0);
  stroke-width: 0.35;
  filter: drop-shadow(0 0 4px #ffd39a);
}

.constellation-lines.is-lit line {
  stroke: rgba(255, 211, 154, 0.75);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: line-draw 1.2s ease forwards;
}

@keyframes line-draw {
  to { stroke-dashoffset: 0; }
}

.sky-star {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 2;
}

.sky-star i {
  display: block;
  width: 12px;
  height: 12px;
  margin: 16px auto 0;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 22px #c77dff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sky-star.is-on i {
  transform: scale(1.55);
  background: #ffe6b8;
  box-shadow: 0 0 12px #ffd39a, 0 0 28px #ff6b9d, 0 0 46px #fff;
}

.sky-star::before,
.sky-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.sky-star::before {
  width: 18px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.sky-star::after {
  width: 1px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.stars-copy {
  position: absolute;
  top: 6%;
  z-index: 3;
  pointer-events: none;
}

.star-progress {
  color: var(--gold);
  letter-spacing: 0.3em;
}

.reason-card {
  position: absolute;
  z-index: 5;
  width: min(88vw, 360px);
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: rgba(18, 6, 36, 0.78);
  border: 1px solid rgba(255, 211, 154, 0.28);
  backdrop-filter: blur(16px);
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.reason-card[hidden] {
  display: none;
}

.reason-index {
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 0.3em;
  font-size: 11px;
}

.reason-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-letter);
  font-size: 22px;
}

.reason-card p {
  margin: 0 0 16px;
  color: var(--mute);
  line-height: 1.8;
}

.btn-mini {
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.heart-name {
  position: relative;
  z-index: 3;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 54px);
  color: #ffe4f0;
  text-shadow: 0 0 18px #ff6b9d, 0 0 40px rgba(255, 77, 122, 0.8);
  animation: heart-glow 1.15s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
}

.heart-caption {
  position: absolute;
  top: 7%;
}

@keyframes heart-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.choice-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  margin-top: 8px;
}

.btn-yes {
  background: linear-gradient(180deg, #ffd1dc, #ff4d7a);
  color: #fff;
  letter-spacing: 0.4em;
  min-width: 96px;
  z-index: 2;
}

.btn-no {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 246, 240, 0.7);
  border-radius: 999px;
  padding: 12px 22px;
  letter-spacing: 0.12em;
  position: relative;
  z-index: 3;
  transition: transform 0.18s ease, left 0.18s ease, top 0.18s ease;
}

.btn-no.is-runaway {
  position: fixed;
}

.no-whisper {
  min-height: 1.5em;
  color: #ffb3c6;
  font-size: 14px;
}

.celebrate-title em {
  font-style: normal;
  background: linear-gradient(120deg, #fff, #ffd39a, #ff6b9d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.together-timer {
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.lantern {
  position: fixed;
  z-index: 7;
  pointer-events: none;
  width: 28px;
  height: 36px;
  border-radius: 40% 40% 45% 45%;
  background: radial-gradient(circle at 40% 30%, #ffe7b3, #ff7b54 70%);
  box-shadow: 0 0 18px rgba(255, 160, 80, 0.7);
  animation: lantern-up 7s linear forwards;
}

.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 1px;
  height: 12px;
  background: rgba(255, 220, 170, 0.7);
}

@keyframes lantern-up {
  to {
    transform: translateY(-110vh) rotate(12deg);
    opacity: 0.15;
  }
}

.petal {
  position: fixed;
  z-index: 7;
  pointer-events: none;
  width: 14px;
  height: 10px;
  background: radial-gradient(circle at 30% 30%, #ffd6e0, #ff6b9d);
  border-radius: 70% 10% 70% 10%;
  animation: petal-fall linear forwards;
}

@keyframes petal-fall {
  to {
    transform: translateY(110vh) rotate(240deg);
    opacity: 0.2;
  }
}

@media (hover: hover) and (pointer: fine) {
  html, body, button { cursor: none; }
}

@media (hover: none), (pointer: coarse) {
  html, body, button, .sky-star { cursor: auto; }
  #cursor-glow, .trail-heart { display: none !important; }
}

@media (max-width: 820px) {
  .eyebrow {
    letter-spacing: 0.16em;
    text-indent: 0;
    font-size: 11px;
    padding-right: 72px;
  }

  .hero-name {
    font-size: clamp(42px, 16vw, 72px);
  }

  .scene h2 {
    font-size: clamp(26px, 7.4vw, 36px);
  }

  .lead {
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 22px;
  }

  .btn-glow,
  .btn-ghost,
  .btn-yes {
    min-height: 48px;
    padding: 12px 28px;
    width: min(100%, 280px);
  }

  .choice-row {
    flex-direction: column;
    min-height: 120px;
    gap: 14px;
  }

  .btn-yes,
  .btn-no {
    width: min(100%, 220px);
    min-height: 48px;
  }

  .mail {
    width: min(88vw, 340px);
    height: 230px;
  }

  .seal {
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
  }

  .moon {
    width: 48px;
    height: 48px;
    top: max(12px, env(safe-area-inset-top));
    right: 16px;
    opacity: 0.7;
  }

  .letter-paper {
    width: 100%;
    max-height: none;
    flex: 1;
    min-height: 0;
    padding: 22px 18px 18px;
    transform: none;
  }

  .letter-paper h2 { font-size: 22px; }
  .typed {
    font-size: 16px;
    min-height: 4em;
    line-height: 1.9;
  }

  .scene-kicker {
    top: max(52px, calc(env(safe-area-inset-top) + 36px));
    font-size: 12px;
    letter-spacing: 0.16em;
    padding: 0 16px;
  }

  .stars-copy {
    top: max(48px, calc(env(safe-area-inset-top) + 32px));
    padding: 0 8px;
  }

  .stars-copy h2 { font-size: 22px; margin-bottom: 6px; }
  .stars-copy .lead { font-size: 13px; margin-bottom: 6px; }
  .constellation { inset: 30% 0 10%; }

  .sky-star {
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
  }

  .reason-card {
    left: 12px !important;
    right: 12px !important;
    width: auto;
    top: auto !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    transform: none !important;
  }

  .heart-caption {
    top: max(52px, calc(env(safe-area-inset-top) + 36px));
    padding: 0 12px;
  }

  .heart-caption h2 { font-size: 22px; }
  .heart-caption .lead { display: none; }

  .grain { display: none; }
  .aurora { filter: blur(18px); }
  .scene.is-leaving { filter: none; }

  .celebrate-copy { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.2s !important;
  }
}
