:root {
  --night: #02040a;
  --deep-blue: #071128;
  --mid-blue: #112849;
  --sky-blue: #73a3d8;
  --ice-blue: #b7cde7;
  --paper: #f3ead5;
  --paper-dark: #ddcba5;
  --ivory: #fbf7eb;
  --gold: #e7cb7d;
  --gold-light: #f7e8b5;
  --rose: #d8a8a1;
  --ink: #24211b;
  --display: "Bodoni 72", Didot, "Times New Roman", "Songti SC", STSong, serif;
  --body: "Avenir Next", Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  --hand: "Segoe Print", "Bradley Hand", "Kaiti SC", KaiTi, cursive;
  --soft: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar: 76px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

.mobile-start-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: rgba(255, 246, 213, 0.9);
  border: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(83, 117, 164, 0.2), transparent 28%),
    #02050b;
  cursor: pointer;
}

body.audio-gate-open .mobile-start-gate {
  display: grid;
}

body.audio-gate-dismissed .mobile-start-gate {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-start-gate {
    display: grid;
  }
}

.mobile-start-note {
  display: grid;
  width: 66px;
  height: 66px;
  place-content: center;
  color: #f0d98f;
  font-family: Georgia, serif;
  font-size: 28px;
  border: 1px solid rgba(240, 217, 143, 0.46);
  border-radius: 50%;
  box-shadow:
    0 0 24px rgba(240, 217, 143, 0.18),
    inset 0 0 18px rgba(240, 217, 143, 0.08);
}

.mobile-start-gate > span:last-child {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.24em;
}

html {
  background: var(--night);
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 18%, rgba(43, 75, 126, 0.24), transparent 32%),
    linear-gradient(145deg, #02040a, #071128 52%, #02050c);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

::selection {
  color: var(--night);
  background: var(--gold);
}

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

.hidden {
  display: none !important;
}

#universe-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.74;
  transition: opacity 1.8s ease;
}

body.is-intro #universe-canvas {
  opacity: 0.09;
}

.space-haze {
  position: fixed;
  z-index: 0;
  width: 75vw;
  height: 75vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.38;
}

.haze-one {
  top: -39vw;
  right: -20vw;
  background:
    radial-gradient(circle at 46% 48%, rgba(89, 137, 198, 0.35), transparent 39%),
    radial-gradient(circle at 68% 36%, rgba(228, 200, 122, 0.13), transparent 18%);
  animation: hazeDrift 27s ease-in-out infinite alternate;
}

.haze-two {
  bottom: -47vw;
  left: -28vw;
  background:
    radial-gradient(circle at 48% 52%, rgba(38, 75, 133, 0.32), transparent 45%),
    radial-gradient(circle at 57% 34%, rgba(221, 162, 157, 0.08), transparent 22%);
  animation: hazeDrift 34s ease-in-out -9s infinite alternate-reverse;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.74' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.cloud-bank {
  position: fixed;
  z-index: 0;
  width: 52vw;
  min-width: 360px;
  height: 18vw;
  min-height: 100px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.08;
  filter: blur(30px);
  background:
    radial-gradient(ellipse at 25% 65%, #c0d5ec, transparent 41%),
    radial-gradient(ellipse at 50% 55%, #edf4fc, transparent 45%),
    radial-gradient(ellipse at 72% 70%, #9fb9d5, transparent 37%);
}

.cloud-left {
  left: -15%;
  bottom: 13%;
  animation: cloudDrift 23s ease-in-out infinite alternate;
}

.cloud-right {
  top: 18%;
  right: -16%;
  animation: cloudDrift 31s ease-in-out -9s infinite alternate-reverse;
}

.butterfly {
  position: fixed;
  z-index: 4;
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 9px rgba(231, 203, 125, 0.38));
}

.butterfly-one {
  top: 17%;
  right: 8%;
  animation: butterflyFlyOne 21s ease-in-out infinite;
}

.butterfly-two {
  left: 6%;
  bottom: 17%;
  opacity: 0.64;
  transform: scale(0.72);
  animation: butterflyFlyTwo 27s ease-in-out -8s infinite;
}

.wing {
  position: absolute;
  top: 2px;
  width: 18px;
  height: 24px;
  border: 1px solid rgba(247, 232, 181, 0.82);
  background: linear-gradient(145deg, rgba(231, 203, 125, 0.2), rgba(115, 163, 216, 0.14));
}

.wing::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(247, 232, 181, 0.3);
  border-radius: inherit;
}

.wing-left {
  right: 50%;
  border-radius: 90% 14% 70% 24%;
  transform-origin: right center;
  animation: wingFlutterLeft 1.15s ease-in-out infinite;
}

.wing-right {
  left: 50%;
  border-radius: 14% 90% 24% 70%;
  transform-origin: left center;
  animation: wingFlutterRight 1.15s ease-in-out infinite;
}

.butterfly-body {
  position: absolute;
  top: 7px;
  left: calc(50% - 1px);
  width: 2px;
  height: 20px;
  border-radius: 999px;
  background: var(--gold-light);
}

.butterfly-body::before,
.butterfly-body::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--gold-light);
}

.butterfly-body::before {
  right: 0;
  transform: rotate(33deg);
}

.butterfly-body::after {
  left: 0;
  transform: rotate(-33deg);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(100px, 1fr);
  align-items: center;
  min-height: var(--topbar);
  padding: 12px clamp(18px, 3.5vw, 56px);
  pointer-events: none;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
}

.site-signature {
  color: rgba(247, 232, 181, 0.74);
  font-family: var(--display);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.back-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(247, 247, 244, 0.18);
  border-radius: 50%;
  color: rgba(251, 247, 235, 0.72);
  background: rgba(3, 7, 16, 0.38);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition:
    opacity 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.back-button:hover {
  border-color: rgba(231, 203, 125, 0.65);
  transform: translateX(-2px);
}

.back-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.progress-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(251, 247, 235, 0.09);
  border-radius: 999px;
  background: rgba(3, 7, 16, 0.34);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.progress-nav button {
  position: relative;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.progress-nav button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(251, 247, 235, 0.26);
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    background 0.3s ease;
}

.progress-nav button:hover::after {
  background: rgba(251, 247, 235, 0.65);
}

.progress-nav button.is-current::after {
  width: 18px;
  height: 18px;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(231, 203, 125, 0.35);
}

.progress-nav button.is-complete::after {
  background: rgba(115, 163, 216, 0.78);
}

.progress-nav button:disabled {
  cursor: default;
  opacity: 0.22;
}

.sound-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 76px;
  height: 39px;
  padding: 0 13px;
  border: 1px solid rgba(251, 247, 235, 0.15);
  border-radius: 999px;
  color: rgba(251, 247, 235, 0.66);
  background: rgba(3, 7, 16, 0.38);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.1em;
  pointer-events: auto;
}

.sound-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 13px;
}

.sound-bars i {
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
  animation: soundBar 1.15s ease-in-out infinite;
}

.sound-bars i:nth-child(2) {
  height: 12px;
  animation-delay: -0.34s;
}

.sound-bars i:nth-child(3) {
  height: 8px;
  animation-delay: -0.68s;
}

.sound-toggle[aria-pressed="false"] .sound-bars i {
  height: 2px;
  animation-play-state: paused;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 203, 125, 0.3) transparent;
  transition:
    opacity 0.85s var(--soft),
    transform 0.85s var(--soft),
    visibility 0s linear 0.85s;
}

.stage.is-active {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 10, 0.13), transparent 20%, transparent 80%, rgba(2, 4, 10, 0.35));
}

h1,
h2,
h3,
p {
  margin-top: 0;
  text-wrap: pretty;
}

.eyebrow {
  margin-bottom: 17px;
  color: rgba(231, 203, 125, 0.82);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.27em;
  line-height: 1.7;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  display: block;
  width: 37px;
  height: 1px;
  margin-top: 13px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.main-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  min-height: 50px;
  padding: 12px 21px 12px 26px;
  border: 1px solid rgba(231, 203, 125, 0.74);
  border-radius: 2px;
  color: var(--ivory);
  background: rgba(5, 12, 27, 0.65);
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.14em;
  transition:
    color 0.35s ease,
    background 0.35s ease,
    transform 0.35s var(--soft),
    box-shadow 0.35s ease;
}

.main-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(247, 232, 181, 0.22) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--soft);
}

.main-button:hover {
  color: var(--night);
  background: var(--gold);
  box-shadow: 0 14px 35px rgba(231, 203, 125, 0.17);
  transform: translateY(-2px);
}

.main-button:hover::before {
  transform: translateX(120%);
}

.main-button i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(231, 203, 125, 0.35);
  border-radius: 50%;
  color: var(--gold-light);
  font-style: normal;
  font-size: 11px;
}

.main-button:hover i {
  color: var(--night);
  border-color: rgba(2, 4, 10, 0.3);
}

.text-link {
  display: block;
  margin-top: 12px;
  padding: 5px 0;
  border: 0;
  color: rgba(251, 247, 235, 0.36);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.text-link:hover {
  color: var(--gold-light);
}

/* Intro candle */
.intro-stage {
  align-items: center;
  justify-content: center;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 51%, rgba(215, 167, 91, 0.07), transparent 15%),
    linear-gradient(90deg, rgba(1, 2, 5, 0.92), rgba(3, 5, 10, 0.82), rgba(1, 2, 5, 0.95));
  transition:
    background 2.1s ease,
    opacity 0.85s var(--soft);
}

.intro-stage::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 10%, rgba(0, 0, 0, 0.3) 35%, rgba(0, 0, 0, 0.72) 76%),
    linear-gradient(180deg, #010204, #03050b 74%, #010204);
}

.intro-room {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.9;
}

.room-window {
  position: absolute;
  top: 17%;
  left: 9%;
  width: 18%;
  height: 32%;
  border: 1px solid rgba(105, 134, 173, 0.055);
  background: linear-gradient(145deg, rgba(20, 39, 67, 0.12), transparent);
  box-shadow: inset 0 0 80px rgba(31, 55, 88, 0.08);
}

.room-window::before,
.room-window::after {
  content: "";
  position: absolute;
  background: rgba(125, 151, 182, 0.06);
}

.room-window::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.room-window::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.room-shadow {
  position: absolute;
  border-radius: 50%;
  background: rgba(1, 2, 4, 0.72);
  filter: blur(40px);
}

.room-shadow-one {
  bottom: -16%;
  left: -8%;
  width: 54%;
  height: 52%;
}

.room-shadow-two {
  right: -10%;
  bottom: -11%;
  width: 52%;
  height: 45%;
}

.intro-cake-ghost {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 390px;
  height: 160px;
  border-radius: 50% 50% 12px 12px;
  opacity: 0;
  background: radial-gradient(ellipse, rgba(231, 203, 125, 0.28), transparent 68%);
  filter: blur(34px);
  transform: translateX(-50%) scale(0.3);
  transition:
    opacity 1.4s ease,
    transform 1.9s var(--soft);
}

.arrival-candle {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 118px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  animation:
    candleArrive 1.8s var(--soft) both,
    candleSway 3.2s 1.8s ease-in-out infinite;
  transition:
    opacity 0.65s ease,
    transform 1.25s var(--soft);
}

.candle-stick {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 73px;
  border-radius: 4px 4px 2px 2px;
  background: repeating-linear-gradient(-44deg, #e8d9b7 0 6px, #8796aa 6px 12px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.65),
    0 0 12px rgba(244, 213, 125, 0.08);
  transform: translateX(-50%);
}

.candle-wick {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 2px;
  height: 10px;
  background: #241a14;
  transform: translateX(-50%);
}

.candle-flame {
  position: absolute;
  top: -42px;
  left: 50%;
  width: 18px;
  height: 32px;
  border-radius: 60% 40% 56% 44% / 70% 46% 54% 30%;
  background: linear-gradient(180deg, #fffbe5, #f6d574 48%, #e7963c);
  box-shadow:
    0 0 12px rgba(255, 221, 121, 0.85),
    0 0 36px rgba(230, 163, 67, 0.67),
    0 0 90px rgba(230, 163, 67, 0.27);
  transform: translateX(-50%) rotate(3deg);
  transform-origin: 50% 100%;
  animation: flameDance 0.74s ease-in-out infinite alternate;
  transition:
    opacity 0.7s ease,
    transform 0.85s ease;
}

.flame-core {
  position: absolute;
  right: 4px;
  bottom: 3px;
  left: 4px;
  height: 12px;
  border-radius: 50%;
  background: #fffde9;
  filter: blur(2px);
}

.flame-smoke {
  position: absolute;
  top: -48px;
  left: 50%;
  width: 12px;
  height: 40px;
  border-left: 1px solid rgba(208, 217, 225, 0.35);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
}

.intro-glow {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 231, 159, 0.17), rgba(220, 158, 67, 0.05) 36%, transparent 68%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  animation: introGlowPulse 4s ease-in-out infinite;
  transition:
    width 1.6s var(--soft),
    height 1.6s var(--soft),
    opacity 0.7s ease;
}

.intro-copy {
  position: absolute;
  z-index: 4;
  top: calc(50% + 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-copy > p {
  margin-bottom: 18px;
  color: rgba(244, 239, 225, 0.35);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.09em;
}

.intro-touch {
  min-width: 118px;
  padding: 9px 13px;
  border: 1px solid rgba(244, 235, 209, 0.2);
  border-radius: 999px;
  color: rgba(244, 235, 209, 0.64);
  background: rgba(4, 7, 12, 0.38);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.1em;
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}

.intro-touch:hover {
  color: var(--gold-light);
  border-color: rgba(231, 203, 125, 0.62);
}

.intro-touch i {
  margin-left: 6px;
  color: var(--gold);
  font-style: normal;
}

body.intro-kindled .intro-stage {
  background:
    radial-gradient(circle at 50% 51%, rgba(229, 189, 106, 0.24), transparent 27%),
    radial-gradient(circle at 50% 60%, rgba(54, 82, 119, 0.16), transparent 54%),
    linear-gradient(90deg, #040811, #081325, #03070f);
}

body.intro-kindled .intro-stage::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 23%, rgba(0, 0, 0, 0.08) 43%, rgba(0, 0, 0, 0.48) 80%),
    linear-gradient(180deg, rgba(1, 3, 8, 0.15), transparent 30%, rgba(1, 3, 8, 0.15));
}

body.intro-kindled .arrival-candle {
  opacity: 0;
  transform: translate(-50%, -58%) scale(2.4);
  animation-play-state: paused;
}

body.intro-kindled .intro-glow {
  width: 92vw;
  height: 92vw;
  opacity: 0.76;
}

body.intro-kindled .intro-cake-ghost {
  opacity: 1;
  transform: translateX(-50%) scale(1.25);
}

body.intro-kindled .intro-copy {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.5s ease;
}

/* Cake and blow */
.cake-stage {
  align-items: center;
  justify-content: center;
  gap: clamp(35px, 8vw, 125px);
  min-height: 100%;
  padding: calc(var(--topbar) + 28px) clamp(25px, 8vw, 130px) 50px;
}

.cake-copy {
  position: relative;
  z-index: 4;
  width: min(44vw, 520px);
  animation: riseIn 1s 0.2s var(--soft) both;
}

.cake-copy h2,
.wish-paper h2,
.memories-heading h2,
.door-copy h2,
.constellation-heading h2,
.gift-heading h2,
.letter-heading h2 {
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.cake-copy h2 em,
.door-copy h2 em {
  color: var(--gold);
  font-weight: 400;
}

.cake-lead {
  max-width: 400px;
  margin-bottom: 27px;
  color: rgba(251, 247, 235, 0.6);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.95;
}

.illustrated-cake {
  position: relative;
  z-index: 3;
  width: min(42vw, 510px);
  height: min(48vw, 520px);
  min-height: 390px;
  animation: riseIn 1.1s 0.35s var(--soft) both;
}

.cake-aura {
  position: absolute;
  top: 47%;
  left: 50%;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 203, 125, 0.19), rgba(76, 118, 174, 0.06) 37%, transparent 65%);
  filter: blur(12px);
  transform: translate(-50%, -50%);
  animation: auraBreathe 4.5s ease-in-out infinite;
}

.cake-candles {
  position: absolute;
  z-index: 7;
  top: 21%;
  left: 50%;
  display: flex;
  align-items: flex-end;
  gap: 43px;
  transform: translateX(-50%);
}

.cake-candle {
  position: relative;
  display: block;
  width: 10px;
  height: 45px;
  border-radius: 3px 3px 1px 1px;
  background: repeating-linear-gradient(-45deg, #f1e4c3 0 5px, #7f9ab8 5px 10px);
  box-shadow: 0 9px 12px rgba(0, 0, 0, 0.25);
}

.cake-candle::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 9px;
  background: #241913;
  transform: translateX(-50%);
}

.cake-candle:nth-child(2) {
  height: 56px;
}

.cake-candle:nth-child(3) {
  height: 41px;
}

.cake-flame {
  position: absolute;
  top: -33px;
  left: 50%;
  width: 15px;
  height: 25px;
  border-radius: 60% 40% 55% 45% / 72% 44% 56% 28%;
  background: linear-gradient(#fffce8, #f7d778 45%, #e59a43);
  box-shadow:
    0 0 11px rgba(255, 225, 135, 0.9),
    0 0 30px rgba(230, 163, 67, 0.52);
  transform: translateX(-50%);
  animation: flameDance 0.75s ease-in-out infinite alternate;
  transition:
    opacity 0.5s ease,
    transform 0.65s ease;
}

.cake-smoke {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 11px;
  height: 30px;
  border-left: 1px solid rgba(218, 224, 231, 0.5);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
}

.illustrated-cake.is-out .cake-flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.2);
}

.illustrated-cake.is-out .cake-smoke {
  animation: smokeUp 2s ease-out both;
}

.cake-layer {
  position: absolute;
  left: 50%;
  overflow: hidden;
  border: 1px solid rgba(251, 248, 235, 0.34);
  box-shadow:
    inset -24px 0 35px rgba(7, 24, 53, 0.35),
    inset 10px 0 24px rgba(255, 251, 232, 0.11);
  transform: translateX(-50%);
}

.cake-top {
  bottom: 211px;
  width: 205px;
  height: 76px;
  border-radius: 11px 11px 14px 14px;
  background: linear-gradient(120deg, #1c365b, #486d95 52%, #152c50);
}

.cake-middle {
  bottom: 126px;
  width: 286px;
  height: 93px;
  border-radius: 10px 10px 13px 13px;
  background: linear-gradient(120deg, #17345c, #3b6490 52%, #112b50);
}

.cake-bottom {
  bottom: 34px;
  width: 362px;
  height: 112px;
  border-radius: 10px 10px 17px 17px;
  background: linear-gradient(120deg, #102a4f, #2e5681 52%, #0a203f);
}

.cake-icing {
  position: absolute;
  top: -1px;
  left: -2%;
  width: 104%;
  height: 28px;
  border-radius: 50% 50% 45% 45%;
  background:
    radial-gradient(circle at 8% 42%, #fbf2db 0 12px, transparent 13px),
    radial-gradient(circle at 28% 73%, #fbf2db 0 16px, transparent 17px),
    radial-gradient(circle at 50% 47%, #fbf2db 0 14px, transparent 15px),
    radial-gradient(circle at 70% 72%, #fbf2db 0 17px, transparent 18px),
    radial-gradient(circle at 91% 42%, #fbf2db 0 12px, transparent 13px),
    linear-gradient(#fff7e3, #ded0b4);
}

.cake-star {
  position: absolute;
  top: 37px;
  right: 26px;
  color: var(--gold);
  font-style: normal;
  text-shadow: 0 0 10px rgba(231, 203, 125, 0.6);
}

.cake-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f7f0db;
  box-shadow: 0 0 8px rgba(251, 247, 235, 0.44);
}

.dot-one {
  bottom: 25px;
  left: 22%;
}

.dot-two {
  right: 25%;
  bottom: 33px;
}

.cake-moon {
  position: absolute;
  bottom: 17px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(247, 232, 181, 0.54);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 21px;
  transform: translateX(-50%);
}

.cake-dish {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 407px;
  height: 31px;
  border-radius: 50%;
  background: linear-gradient(rgba(220, 229, 240, 0.48), rgba(27, 41, 62, 0.84));
  box-shadow:
    0 8px 0 rgba(1, 4, 10, 0.5),
    0 20px 40px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}

.blow-copy {
  animation: riseIn 0.7s var(--soft) both;
}

.blow-copy .main-button {
  --blow-angle: 0deg;
  min-width: 228px;
}

.blow-progress {
  position: absolute;
  z-index: -2;
  inset: -1px;
  background: conic-gradient(rgba(231, 203, 125, 0.82) var(--blow-angle), transparent 0);
  opacity: 0.38;
}

.blow-copy .main-button.is-holding .blow-progress {
  opacity: 0.8;
}

.blow-copy .main-button.is-complete {
  color: var(--night);
  border-color: var(--gold);
  background: var(--gold);
}

/* Wish */
.wish-stage {
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: calc(var(--topbar) + 25px) 22px 50px;
}

.wish-stage::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(55, 89, 138, 0.16), transparent 43%),
    linear-gradient(180deg, rgba(2, 4, 10, 0.05), transparent 80%);
}

.wish-orbit {
  position: absolute;
  width: min(72vw, 850px);
  aspect-ratio: 1.8;
  border: 1px solid rgba(115, 163, 216, 0.13);
  border-radius: 50%;
  transform: rotate(-10deg);
  pointer-events: none;
}

.wish-orbit::before {
  content: "✦";
  position: absolute;
  top: 12%;
  right: 12%;
  color: rgba(231, 203, 125, 0.7);
  font-size: 12px;
}

.wish-paper {
  position: relative;
  z-index: 3;
  width: min(620px, 92vw);
  padding: clamp(31px, 5vw, 57px) clamp(23px, 5vw, 58px) 30px;
  border: 1px solid rgba(231, 203, 125, 0.2);
  background:
    linear-gradient(145deg, rgba(8, 18, 38, 0.89), rgba(3, 8, 19, 0.78)),
    radial-gradient(circle at 50% 0%, rgba(115, 163, 216, 0.13), transparent 46%);
  box-shadow:
    inset 0 0 0 5px rgba(251, 247, 235, 0.02),
    0 30px 85px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(15px);
  text-align: center;
  animation: riseIn 1s var(--soft) both;
}

.wish-paper::before,
.wish-paper::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.wish-paper::before {
  top: 11px;
  left: 11px;
  border-top: 1px solid rgba(231, 203, 125, 0.4);
  border-left: 1px solid rgba(231, 203, 125, 0.4);
}

.wish-paper::after {
  right: 11px;
  bottom: 11px;
  border-right: 1px solid rgba(231, 203, 125, 0.4);
  border-bottom: 1px solid rgba(231, 203, 125, 0.4);
}

.wish-hands {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border: 1px solid rgba(231, 203, 125, 0.38);
  border-radius: 50%;
  color: var(--gold);
  box-shadow:
    0 0 35px rgba(231, 203, 125, 0.12),
    inset 0 0 22px rgba(231, 203, 125, 0.05);
  font-family: var(--display);
  font-size: 17px;
}

.wish-paper .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.wish-paper h2 {
  margin-bottom: 13px;
  font-size: clamp(42px, 5vw, 66px);
}

.wish-copy {
  margin: 0 auto 22px;
  color: rgba(251, 247, 235, 0.58);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.9;
}

#wish-input {
  display: block;
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 15px 17px;
  border: 1px solid rgba(251, 247, 235, 0.14);
  border-radius: 1px;
  color: var(--ivory);
  background: rgba(1, 5, 13, 0.3);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.75;
  text-align: center;
}

#wish-input::placeholder {
  color: rgba(251, 247, 235, 0.27);
}

#wish-input:focus {
  border-color: rgba(231, 203, 125, 0.52);
  background: rgba(1, 5, 13, 0.45);
  outline: none;
}

.wish-paper .main-button {
  margin-top: 18px;
}

.privacy-note {
  margin: 11px 0 0;
  color: rgba(251, 247, 235, 0.26);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.mic-result {
  min-height: 22px;
  margin-top: 14px;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.7;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mic-result.is-visible {
  opacity: 1;
}

.mic-result.is-error {
  color: rgba(251, 247, 235, 0.48);
  font-size: 12px;
}

/* Memory planets */
.memories-stage {
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: calc(var(--topbar) + 17px) 0 28px;
}

.memories-heading {
  position: relative;
  z-index: 5;
  width: min(820px, 88vw);
  margin-bottom: 7px;
  text-align: center;
}

.memories-heading .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.memories-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(38px, 4.1vw, 60px);
}

.memories-heading > p:last-child {
  margin: 0;
  color: rgba(251, 247, 235, 0.43);
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.7;
}

.memory-carousel {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 420px;
}

.memory-track {
  display: flex;
  gap: 24px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px calc(50vw - 160px) 16px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.memory-track::-webkit-scrollbar {
  display: none;
}

.carousel-arrow {
  position: absolute;
  z-index: 10;
  top: 48%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(231, 203, 125, 0.3);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(3, 8, 18, 0.55);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
  transform: translateY(-50%);
}

.carousel-arrow:hover:not(:disabled) {
  color: var(--night);
  border-color: var(--gold);
  background: var(--gold);
}

.carousel-arrow:disabled {
  cursor: default;
  opacity: 0.2;
}

.carousel-prev {
  left: clamp(17px, 4vw, 64px);
}

.carousel-next {
  right: clamp(17px, 4vw, 64px);
}

.memory-card {
  position: relative;
  flex: 0 0 clamp(278px, 25vw, 330px);
  height: 390px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  animation: riseIn 0.65s var(--soft) both;
}

.memory-planet {
  position: absolute;
  z-index: 1;
  bottom: 40px;
  left: 50%;
  width: 245px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 43% 30%, rgba(143, 184, 225, 0.75), rgba(38, 79, 129, 0.84) 31%, rgba(9, 26, 52, 0.94) 68%),
    #102848;
  box-shadow:
    inset -22px -12px 30px rgba(0, 0, 0, 0.38),
    0 22px 48px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}

.memory-planet::before {
  content: "";
  position: absolute;
  top: 49%;
  left: -23px;
  width: calc(100% + 46px);
  height: 33px;
  border: 8px solid rgba(231, 203, 125, 0.25);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.memory-planet::after {
  content: "";
  position: absolute;
  top: 21%;
  left: 26%;
  width: 53px;
  height: 15px;
  border-radius: 50%;
  background: rgba(231, 203, 125, 0.13);
  box-shadow:
    80px 19px 0 rgba(4, 22, 46, 0.19),
    -22px 30px 0 rgba(4, 22, 46, 0.16);
  transform: rotate(-11deg);
}

.memory-photo {
  position: absolute;
  z-index: 3;
  top: 2px;
  left: 50%;
  width: 245px;
  height: 286px;
  padding: 8px 8px 31px;
  color: var(--ink);
  background: #f5eedf;
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(84, 66, 40, 0.14);
  transform: translateX(-50%) rotate(var(--tilt, -2deg));
  transition:
    transform 0.45s var(--soft),
    box-shadow 0.45s ease;
}

.memory-photo.has-preview {
  background-image: var(--memory-preview);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.memory-card:hover .memory-photo {
  box-shadow:
    0 24px 45px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(231, 203, 125, 0.1);
  transform: translateX(-50%) translateY(-8px) rotate(calc(var(--tilt, -2deg) * -0.4));
}

.memory-photo::after {
  content: "";
  position: absolute;
  inset: 8px 8px 31px;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 250, 235, 0.16), transparent 35%, rgba(11, 20, 33, 0.12));
  mix-blend-mode: overlay;
}

.memory-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.98);
}

.memory-photo .photo-placeholder {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 73% 24%, var(--scene-glow, rgba(231, 203, 125, 0.58)) 0 9%, transparent 10%),
    radial-gradient(ellipse at 48% 73%, var(--scene-ground, #385e81) 0 32%, transparent 33%),
    linear-gradient(155deg, #07132a, #1a3b61 54%, #6b859f);
}

.photo-placeholder::before {
  content: "✦";
  position: absolute;
  top: 21%;
  left: 21%;
  color: rgba(251, 247, 235, 0.81);
  font-size: 15px;
  text-shadow:
    118px 45px 0 rgba(231, 203, 125, 0.55),
    51px 97px 0 rgba(251, 247, 235, 0.46),
    158px 126px 0 rgba(251, 247, 235, 0.34);
}

.photo-placeholder::after {
  content: attr(data-mark);
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(251, 247, 235, 0.32);
  font-family: var(--display);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.15em;
}

.memory-card-caption {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  padding: 0 11px 3px;
}

.memory-card-caption strong {
  display: block;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.memory-card-caption small {
  display: block;
  margin-top: 4px;
  color: rgba(251, 247, 235, 0.36);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.memory-card-caption span {
  color: rgba(231, 203, 125, 0.6);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.memory-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(740px, 90vw);
  min-height: 99px;
  margin-top: -6px;
}

.memory-progress {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 160px;
  color: rgba(251, 247, 235, 0.45);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.memory-progress i {
  flex: 1;
  height: 1px;
  overflow: hidden;
  background: rgba(251, 247, 235, 0.14);
}

.memory-progress b {
  display: block;
  width: 6.66%;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.memory-footer > p {
  margin: 7px 0 11px;
  color: rgba(251, 247, 235, 0.25);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.door-unlock {
  animation: riseIn 0.55s var(--soft) both;
}

/* Door */
.door-stage {
  align-items: center;
  justify-content: center;
  gap: clamp(38px, 10vw, 160px);
  min-height: 100%;
  padding: calc(var(--topbar) + 25px) 8vw 50px;
}

.door-stage::before {
  background:
    radial-gradient(circle at 70% 50%, rgba(60, 101, 153, 0.15), transparent 35%),
    linear-gradient(90deg, rgba(2, 4, 10, 0.08), transparent, rgba(2, 4, 10, 0.25));
}

.door-copy {
  position: relative;
  z-index: 4;
  width: min(41vw, 490px);
  animation: riseIn 1s 0.1s var(--soft) both;
}

.door-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(51px, 6vw, 91px);
}

.door-en {
  color: rgba(231, 203, 125, 0.48);
  font-family: var(--display);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.17em;
}

.cosmic-door {
  position: relative;
  z-index: 3;
  width: min(290px, 51vw);
  height: min(490px, 62vh);
  min-height: 350px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
  animation: riseIn 1.1s 0.2s var(--soft) both;
}

.door-frame {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid rgba(231, 203, 125, 0.48);
  border-radius: 50% 50% 4px 4px / 33% 33% 3% 3%;
  background:
    linear-gradient(90deg, rgba(7, 21, 43, 0.98), rgba(19, 49, 81, 0.96) 50%, rgba(7, 21, 43, 0.98));
  box-shadow:
    inset 0 0 0 10px rgba(231, 203, 125, 0.04),
    inset 0 0 70px rgba(1, 6, 14, 0.88),
    0 30px 75px rgba(0, 0, 0, 0.46);
  transition:
    transform 1.15s var(--soft),
    box-shadow 0.8s ease;
}

.door-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(231, 203, 125, 0.15);
  border-radius: 50% 50% 2px 2px / 33% 33% 2% 2%;
}

.door-frame::after {
  content: "";
  position: absolute;
  top: 21%;
  right: 30%;
  bottom: 9%;
  left: 30%;
  border: 1px solid rgba(231, 203, 125, 0.12);
  border-radius: 50% 50% 0 0 / 31% 31% 0 0;
}

.door-light {
  position: absolute;
  z-index: -1;
  top: 18%;
  right: -22%;
  bottom: 8%;
  left: -22%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(231, 203, 125, 0.22), rgba(74, 118, 172, 0.1) 35%, transparent 67%);
  filter: blur(18px);
  animation: auraBreathe 4s ease-in-out infinite;
}

.door-handle {
  position: absolute;
  z-index: 5;
  top: 57%;
  right: 17%;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(231, 203, 125, 0.58);
}

.door-stars {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 12%;
  left: 0;
  color: rgba(231, 203, 125, 0.55);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-align: center;
}

.cosmic-door:hover .door-frame {
  box-shadow:
    inset 0 0 0 10px rgba(231, 203, 125, 0.06),
    inset 0 0 45px rgba(1, 6, 14, 0.68),
    0 30px 80px rgba(0, 0, 0, 0.48),
    0 0 55px rgba(115, 163, 216, 0.16);
}

.cosmic-door.is-opening .door-frame {
  transform: rotateY(-72deg);
  transform-origin: left center;
  box-shadow:
    inset 0 0 0 10px rgba(231, 203, 125, 0.1),
    inset 0 0 60px rgba(1, 6, 14, 0.92),
    0 20px 70px rgba(0, 0, 0, 0.4);
}

.door-hint {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  color: rgba(251, 247, 235, 0.3);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Sagittarius */
.stars-stage {
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: calc(var(--topbar) + 16px) clamp(16px, 4vw, 66px) 28px;
}

.constellation-heading {
  position: relative;
  z-index: 5;
  max-width: 810px;
  text-align: center;
}

.constellation-heading .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.constellation-heading h2 {
  margin-bottom: 9px;
  font-size: clamp(39px, 4.3vw, 63px);
}

.constellation-heading > p:last-child {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(251, 247, 235, 0.45);
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.8;
}

.sagittarius-sky {
  position: relative;
  z-index: 3;
  width: min(1060px, 96vw);
  min-height: 400px;
  flex: 1;
}

.sagittarius-lines {
  position: absolute;
  inset: 5% 0;
  width: 100%;
  height: 90%;
  overflow: visible;
  opacity: 0.2;
  pointer-events: none;
}

.sagittarius-lines polyline,
.sagittarius-lines line,
.sagittarius-lines path {
  fill: none;
  stroke: rgba(169, 196, 224, 0.9);
  stroke-width: 0.8;
  stroke-dasharray: 3 8;
}

.sagittarius-star {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(247, 232, 181, 0.88);
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.sagittarius-star::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 163, 216, 0.15), transparent 68%);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.sagittarius-star:hover::before {
  opacity: 1;
  transform: scale(1.3);
}

.sagittarius-star .star-core {
  position: relative;
  z-index: 2;
  font-size: var(--star-size, 20px);
  line-height: 1;
  text-shadow:
    0 0 8px rgba(247, 232, 181, 0.8),
    0 0 24px rgba(115, 163, 216, 0.4);
  animation: starPulse var(--star-speed, 3.5s) ease-in-out infinite;
  transition:
    transform 0.35s var(--soft),
    color 0.35s ease;
}

.sagittarius-star:hover .star-core {
  transform: scale(1.45) rotate(12deg);
}

.sagittarius-star.is-found {
  color: var(--gold-light);
}

.sagittarius-star.is-found .star-core {
  transform: scale(1.35);
}

.sagittarius-star.is-found::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(231, 203, 125, 0.3);
  border-radius: 50%;
  animation: starRing 1.1s ease-out;
}

.star-quote {
  position: absolute;
  z-index: 8;
  top: 44%;
  left: 50%;
  width: min(610px, 84vw);
  padding: 20px 25px;
  color: var(--ivory);
  background: radial-gradient(ellipse, rgba(5, 14, 31, 0.91), rgba(5, 14, 31, 0.4) 62%, transparent 100%);
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.75;
  text-align: center;
  text-shadow: 0 0 20px rgba(115, 163, 216, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.94);
}

.star-quote.is-visible {
  animation: quoteAppear 3.2s var(--soft) both;
}

.star-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(760px, 94vw);
  min-height: 110px;
  padding-top: 10px;
  border-top: 1px solid rgba(231, 203, 125, 0.14);
  text-align: center;
}

.star-footer > p:first-child {
  margin-bottom: 9px;
  color: rgba(251, 247, 235, 0.42);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.gift-message {
  margin-bottom: 10px;
  color: rgba(247, 232, 181, 0.84);
  font-family: var(--display);
  font-size: 16px;
  animation: riseIn 0.6s var(--soft) both;
}

/* Gift */
.gift-stage {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: calc(var(--topbar) + 20px) 22px 42px;
  text-align: center;
}

.gift-heading {
  position: relative;
  z-index: 4;
}

.gift-heading .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.gift-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(44px, 5vw, 68px);
}

.gift-heading > p:last-child {
  margin-bottom: 4px;
  color: rgba(251, 247, 235, 0.48);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.8;
}

.gift-box {
  position: relative;
  z-index: 3;
  width: min(310px, 70vw);
  height: 330px;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
  filter: drop-shadow(0 28px 35px rgba(0, 0, 0, 0.45));
}

.gift-glow {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 430px;
  max-width: 90vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 203, 125, 0.19), rgba(115, 163, 216, 0.08) 37%, transparent 68%);
  filter: blur(14px);
  transform: translate(-50%, -50%);
  animation: auraBreathe 4s ease-in-out infinite;
}

.gift-lid {
  position: absolute;
  z-index: 4;
  top: 46px;
  left: 50%;
  width: 265px;
  height: 75px;
  border: 1px solid rgba(231, 203, 125, 0.48);
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255, 249, 227, 0.15), transparent 45%),
    linear-gradient(110deg, #17365c, #315d87 50%, #102d52);
  box-shadow: inset -22px 0 28px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  transform-origin: 12% 100%;
  transition: transform 0.9s var(--soft);
}

.gift-body {
  position: absolute;
  top: 113px;
  left: 50%;
  width: 236px;
  height: 178px;
  overflow: visible;
  border: 1px solid rgba(231, 203, 125, 0.38);
  border-radius: 3px 3px 9px 9px;
  background:
    linear-gradient(145deg, rgba(255, 250, 234, 0.12), transparent 45%),
    linear-gradient(110deg, #15345a, #2f5a84 50%, #0d294d);
  box-shadow:
    inset -25px 0 35px rgba(0, 0, 0, 0.28),
    0 15px 25px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.gift-vertical-ribbon {
  position: absolute;
  top: -5px;
  bottom: 0;
  left: 50%;
  width: 39px;
  background: linear-gradient(90deg, rgba(231, 203, 125, 0.19), rgba(247, 232, 181, 0.54), rgba(231, 203, 125, 0.19));
  transform: translateX(-50%);
}

.gift-spark {
  position: absolute;
  top: 55%;
  left: 50%;
  color: var(--gold-light);
  font-size: 20px;
  text-shadow: 0 0 18px currentColor;
  transform: translate(-50%, -50%);
}

.ribbon {
  position: absolute;
  display: block;
  border: 2px solid rgba(231, 203, 125, 0.65);
  border-radius: 50%;
}

.bow-left {
  top: -55px;
  left: 75px;
  width: 62px;
  height: 55px;
  transform: rotate(24deg);
}

.bow-right {
  top: -55px;
  right: 75px;
  width: 62px;
  height: 55px;
  transform: rotate(-24deg);
}

.bow-knot {
  top: -32px;
  left: 50%;
  width: 33px;
  height: 33px;
  background: rgba(231, 203, 125, 0.16);
  transform: translateX(-50%);
}

.gift-letter-peek {
  position: absolute;
  z-index: 2;
  top: 127px;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 184px;
  height: 170px;
  border: 1px solid rgba(114, 88, 49, 0.3);
  color: rgba(57, 45, 29, 0.72);
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(112, 86, 49, 0.05) 24px),
    var(--paper);
  font-family: var(--hand);
  font-size: 16px;
  opacity: 0;
  transform: translate(-50%, 30px) scale(0.78);
  transition:
    transform 0.9s var(--soft),
    opacity 0.65s ease;
}

.gift-letter-peek i {
  margin-top: 10px;
  color: #a98549;
  font-style: normal;
}

.gift-box.is-open .gift-lid {
  transform: translateX(-50%) translateY(-105px) rotateX(35deg) rotateZ(-8deg);
}

.gift-box.is-open .gift-letter-peek {
  opacity: 1;
  transform: translate(-50%, -116px) rotate(-3deg) scale(1);
}

.gift-box.is-open .gift-glow {
  opacity: 0.82;
}

.gift-hint {
  position: relative;
  z-index: 5;
  margin: -7px 0 10px;
  color: rgba(251, 247, 235, 0.32);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.gift-open-letter {
  animation: riseIn 0.55s var(--soft) both;
}

/* Letter */
.letter-stage {
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: calc(var(--topbar) + 17px) 22px 40px;
}

.letter-heading {
  position: relative;
  z-index: 4;
  text-align: center;
}

.letter-heading .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.letter-heading h2 {
  margin-bottom: 17px;
  font-size: clamp(40px, 4.4vw, 63px);
}

.letter-paper {
  position: relative;
  z-index: 3;
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: clamp(40px, 6.2vw, 76px) clamp(28px, 7vw, 84px) 45px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(155, 124, 70, 0.09), transparent 29%),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(91, 68, 37, 0.038) 31px),
    var(--paper);
  box-shadow:
    0 27px 70px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(112, 84, 43, 0.24),
    inset 0 0 65px rgba(91, 66, 31, 0.07);
  font-family: var(--display);
  animation: paperUnfold 1s var(--soft) both;
}

.letter-paper::before {
  content: "";
  position: absolute;
  inset: 13px;
  pointer-events: none;
  border: 1px solid rgba(128, 96, 50, 0.2);
}

.paper-fold {
  position: absolute;
  top: 17px;
  width: 48px;
  height: 48px;
  opacity: 0.22;
}

.paper-fold::before,
.paper-fold::after {
  content: "";
  position: absolute;
  background: #8d713f;
}

.paper-fold::before {
  width: 100%;
  height: 1px;
}

.paper-fold::after {
  width: 1px;
  height: 100%;
}

.fold-one {
  left: 22px;
}

.fold-two {
  right: 22px;
  transform: rotate(90deg);
}

.letter-to {
  margin-bottom: 28px;
  font-family: var(--hand);
  font-size: 22px;
}

.letter-content p {
  margin-bottom: 20px;
  font-size: clamp(15px, 1.55vw, 18px);
  line-height: 2.04;
}

.letter-end {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(106, 81, 45, 0.2);
}

.letter-end > p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.9;
}

.letter-signature {
  margin-top: 24px !important;
  font-family: var(--hand);
  font-size: 20px !important;
  text-align: right;
}

.letter-date {
  margin-top: 4px !important;
  color: rgba(62, 50, 34, 0.53);
  font-size: 10px !important;
  letter-spacing: 0.08em;
  text-align: right;
}

.finale-button {
  display: flex;
  margin: 32px 0 0 auto;
  color: var(--ink);
  border-color: rgba(72, 57, 34, 0.48);
  background: transparent;
}

.finale-button i {
  color: #735d39;
  border-color: rgba(72, 57, 34, 0.3);
}

.finale-button:hover {
  color: var(--ivory);
  border-color: var(--night);
  background: var(--night);
}

/* Infinite fireworks finale */
.finale-stage {
  overflow: hidden;
  min-height: 100%;
  padding: 0;
  background:
    radial-gradient(ellipse at 50% 92%, rgba(12, 41, 79, 0.6), transparent 37%),
    radial-gradient(ellipse at 50% 35%, rgba(7, 20, 47, 0.38), transparent 55%),
    linear-gradient(180deg, #01030a, #061024 58%, #020714);
}

.finale-stage::before {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(1, 3, 9, 0.25), transparent 24%, transparent 72%, rgba(1, 4, 12, 0.66)),
    radial-gradient(ellipse at 50% 92%, rgba(70, 111, 154, 0.18), transparent 28%);
}

#fireworks-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.firework-glow {
  position: absolute;
  z-index: 0;
  bottom: -26%;
  width: 55%;
  height: 38%;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.2;
  background: radial-gradient(ellipse, rgba(189, 120, 99, 0.72), rgba(38, 83, 134, 0.34), transparent 68%);
  animation: waterGlow 7s ease-in-out infinite alternate;
}

.firework-glow-left {
  left: -18%;
}

.firework-glow-right {
  right: -18%;
  animation-delay: -3.5s;
}

.finale-title {
  position: absolute;
  z-index: 8;
  top: calc(var(--topbar) + 32px);
  right: 0;
  left: 0;
  text-align: center;
  pointer-events: none;
  animation: riseIn 1.2s 0.3s var(--soft) both;
}

.finale-title p {
  margin-bottom: 0;
  color: rgba(251, 247, 235, 0.8);
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: 0.34em;
  text-shadow: 0 0 22px rgba(231, 203, 125, 0.22);
}

.finale-title h2 {
  margin: 1px 0 0;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: clamp(54px, 8vw, 105px);
  font-weight: 400;
  line-height: 1;
  text-shadow:
    0 0 30px rgba(231, 203, 125, 0.22),
    0 8px 30px rgba(0, 0, 0, 0.35);
}

.letter-dots {
  position: absolute;
  z-index: 7;
  top: 49%;
  left: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.letter-dot {
  position: absolute;
  width: var(--dot-size, 3px);
  height: var(--dot-size, 3px);
  border-radius: 50%;
  background: var(--dot-color, var(--gold-light));
  box-shadow: 0 0 12px currentColor;
  opacity: 0;
  animation: letterDot 5.8s var(--dot-delay, 0s) ease-out both;
}

.finale-signature {
  position: absolute;
  z-index: 8;
  right: clamp(24px, 4vw, 62px);
  bottom: clamp(25px, 4vh, 48px);
  margin: 0;
  color: rgba(247, 232, 181, 0.76);
  font-family: var(--display);
  font-size: clamp(11px, 1.1vw, 15px);
  font-style: italic;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.replay-button {
  position: absolute;
  z-index: 9;
  bottom: clamp(22px, 4vh, 44px);
  left: clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 0;
  color: rgba(251, 247, 235, 0.26);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.replay-button:hover {
  color: rgba(251, 247, 235, 0.75);
}

.toast {
  position: fixed;
  z-index: 90;
  bottom: 26px;
  left: 50%;
  min-width: 180px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 18px;
  border: 1px solid rgba(231, 203, 125, 0.24);
  border-radius: 999px;
  color: rgba(251, 247, 235, 0.8);
  background: rgba(2, 7, 17, 0.84);
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(13px);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Motion */
@keyframes candleArrive {
  from {
    opacity: 0;
    transform: translate(-50%, 65%) rotate(12deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
  }
}

@keyframes candleSway {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-1.7deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(1.7deg);
  }
}

@keyframes flameDance {
  from {
    transform: translateX(-50%) rotate(-5deg) scaleY(0.93);
  }
  to {
    transform: translateX(-50%) rotate(6deg) scaleY(1.09);
  }
}

@keyframes introGlowPulse {
  50% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

@keyframes smokeUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.4);
  }
  22% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -46px) translateX(11px) scale(1.4);
  }
}

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

@keyframes hazeDrift {
  to {
    transform: translate3d(4vw, 3vh, 0) rotate(9deg) scale(1.08);
  }
}

@keyframes cloudDrift {
  to {
    transform: translateX(8vw) translateY(-2vh) scale(1.06);
  }
}

@keyframes auraBreathe {
  50% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes wingFlutterLeft {
  50% {
    transform: rotateY(57deg);
  }
}

@keyframes wingFlutterRight {
  50% {
    transform: rotateY(-57deg);
  }
}

@keyframes butterflyFlyOne {
  0%,
  100% {
    transform: translate(0, 0) rotate(-7deg);
  }
  36% {
    transform: translate(-8vw, 7vh) rotate(8deg);
  }
  72% {
    transform: translate(-16vw, -4vh) rotate(-4deg);
  }
}

@keyframes butterflyFlyTwo {
  0%,
  100% {
    transform: translate(0, 0) scale(0.72) rotate(6deg);
  }
  42% {
    transform: translate(9vw, -13vh) scale(0.72) rotate(-8deg);
  }
  78% {
    transform: translate(5vw, -3vh) scale(0.72) rotate(4deg);
  }
}

@keyframes soundBar {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes starPulse {
  0%,
  100% {
    opacity: 0.57;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes starRing {
  from {
    opacity: 1;
    transform: scale(0.35);
  }
  to {
    opacity: 0;
    transform: scale(1.85);
  }
}

@keyframes quoteAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    filter: blur(5px);
  }
  14%,
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(1.025);
    filter: blur(2px);
  }
}

@keyframes paperUnfold {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.92) rotateX(-5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}

@keyframes letterDot {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3);
  }
  14% {
    opacity: 0.86;
  }
  54% {
    opacity: 0.8;
    transform: translate(var(--dot-x), var(--dot-y)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dot-x) * 1.24), calc(var(--dot-y) * 1.24)) scale(0.1);
  }
}

@keyframes waterGlow {
  to {
    opacity: 0.33;
    transform: translateY(-4%) scale(1.08);
  }
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --topbar: 66px;
  }

  .topbar {
    grid-template-columns: 1fr auto 54px;
    gap: 10px;
    padding: 9px 14px;
  }

  .brand-area {
    gap: 9px;
  }

  .site-signature {
    font-size: 10px;
  }

  .progress-nav button {
    width: 18px;
  }

  .progress-nav button.is-current::after {
    width: 12px;
    height: 12px;
  }

  .sound-toggle {
    min-width: 39px;
    width: 39px;
    height: 39px;
    padding: 0;
    justify-content: center;
  }

  .sound-word {
    display: none;
  }

  .cake-stage {
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding-top: calc(var(--topbar) + 28px);
  }

  .cake-copy {
    width: min(560px, 91vw);
    text-align: center;
  }

  .cake-copy .eyebrow::after {
    margin-right: auto;
    margin-left: auto;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }

  .cake-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .cake-copy h2 {
    margin-top: 12px;
    font-size: clamp(40px, 9vw, 57px);
  }

  .illustrated-cake {
    width: min(460px, 92vw);
    height: 390px;
    min-height: 0;
    margin-top: -19px;
    transform: scale(0.88);
    transform-origin: 50% 37%;
  }

  .door-stage {
    flex-direction: column;
    justify-content: flex-start;
    gap: 7px;
    padding-top: calc(var(--topbar) + 34px);
    text-align: center;
  }

  .door-copy {
    width: min(560px, 90vw);
  }

  .door-copy .eyebrow::after {
    margin-right: auto;
    margin-left: auto;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }

  .door-copy h2 {
    font-size: clamp(48px, 12vw, 69px);
  }

  .cosmic-door {
    height: 380px;
  }

  .door-hint {
    display: none;
  }

  .memory-track {
    padding-right: calc(50vw - 148px);
    padding-left: calc(50vw - 148px);
  }
}

@media (max-width: 620px) {
  :root {
    --topbar: 58px;
  }

  .topbar {
    grid-template-columns: minmax(142px, 1fr) auto 39px;
    gap: 5px;
    padding: 7px 10px;
  }

  .back-button {
    width: 34px;
    height: 34px;
  }

  .site-signature {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .progress-nav {
    padding: 4px 5px;
  }

  .progress-nav button {
    width: 12px;
    height: 24px;
  }

  .progress-nav button::after {
    width: 3px;
    height: 3px;
  }

  .progress-nav button.is-current::after {
    width: 9px;
    height: 9px;
  }

  .butterfly-one {
    top: 23%;
    right: 2%;
    transform: scale(0.72);
  }

  .butterfly-two {
    bottom: 10%;
  }

  .arrival-candle {
    width: 64px;
    height: 104px;
  }

  .intro-copy {
    top: calc(50% + 108px);
  }

  .intro-copy > p {
    max-width: 270px;
    font-size: 10px;
    line-height: 1.8;
  }

  .cake-stage {
    padding-bottom: 25px;
  }

  .cake-copy h2 {
    font-size: clamp(38px, 10.6vw, 48px);
  }

  .cake-lead {
    font-size: 13px;
    line-height: 1.75;
  }

  .illustrated-cake {
    width: 390px;
    max-width: 108vw;
    height: 345px;
    margin-top: -14px;
    transform: scale(0.77);
  }

  .cake-candles {
    top: 23%;
  }

  .wish-stage {
    padding-top: calc(var(--topbar) + 25px);
  }

  .wish-paper {
    width: min(520px, 92vw);
    padding: 27px 19px 23px;
  }

  .wish-paper h2 {
    font-size: 40px;
  }

  .wish-copy {
    font-size: 13px;
  }

  .wish-hands {
    width: 45px;
    height: 45px;
    margin-bottom: 12px;
  }

  .mic-result {
    font-size: 13px;
  }

  .memories-stage {
    padding-top: calc(var(--topbar) + 10px);
  }

  .memories-heading h2 {
    font-size: clamp(35px, 9.5vw, 45px);
  }

  .memories-heading > p:last-child {
    max-width: 340px;
    margin-right: auto;
    margin-left: auto;
    font-size: 10px;
  }

  .memory-carousel {
    min-height: 386px;
  }

  .memory-card {
    flex-basis: 280px;
    height: 370px;
  }

  .memory-photo {
    width: 232px;
    height: 272px;
  }

  .memory-planet {
    width: 226px;
  }

  .carousel-arrow {
    width: 38px;
    height: 38px;
  }

  .memory-track {
    gap: 18px;
    padding-right: calc(50vw - 140px);
    padding-left: calc(50vw - 140px);
  }

  .memory-footer {
    margin-top: -12px;
  }

  .door-stage {
    padding-top: calc(var(--topbar) + 24px);
  }

  .door-copy h2 {
    font-size: 52px;
  }

  .cosmic-door {
    width: 210px;
    height: 330px;
    min-height: 0;
  }

  .door-en {
    font-size: 11px;
  }

  .constellation-heading h2 {
    font-size: 39px;
  }

  .constellation-heading > p:last-child {
    max-width: 350px;
    font-size: 10px;
  }

  .sagittarius-sky {
    min-height: 380px;
  }

  .sagittarius-star {
    width: 49px;
    height: 49px;
  }

  .star-quote {
    font-size: 17px;
  }

  .star-footer {
    padding-top: 7px;
  }

  .gift-stage {
    padding-top: calc(var(--topbar) + 20px);
  }

  .gift-heading h2 {
    font-size: 42px;
  }

  .gift-heading > p:last-child {
    font-size: 12px;
  }

  .gift-box {
    transform: scale(0.86);
    transform-origin: 50% 40%;
    margin-top: -1px;
    margin-bottom: -30px;
  }

  .letter-stage {
    padding-top: calc(var(--topbar) + 11px);
  }

  .letter-heading h2 {
    margin-bottom: 9px;
    font-size: 40px;
  }

  .letter-paper {
    width: 94vw;
    padding: 43px 25px 34px;
  }

  .letter-content p {
    font-size: 15px;
    line-height: 1.9;
  }

  .finale-title {
    top: calc(var(--topbar) + 24px);
  }

  .finale-title p {
    font-size: 20px;
  }

  .finale-title h2 {
    font-size: 58px;
  }

  .letter-dots {
    top: 47%;
  }

  .finale-signature {
    right: 20px;
    bottom: 22px;
    font-size: 10px;
  }

  .replay-button {
    bottom: 18px;
    left: 12px;
    font-size: 8px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .cake-copy h2 {
    font-size: 54px;
  }

  .illustrated-cake {
    transform: scale(0.87);
    transform-origin: 50% 50%;
  }

  .memories-heading {
    margin-bottom: 0;
  }

  .memory-carousel {
    min-height: 390px;
  }

  .memory-card {
    height: 360px;
  }

  .memory-footer {
    margin-top: -9px;
  }

  .door-copy h2 {
    font-size: 70px;
  }

  .star-quote {
    top: 41%;
  }
}

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

  #fireworks-canvas {
    opacity: 0.22;
  }
}

/* =========================================================
   V3 · cosmic cake opening, inline wish, 3D door and gift
   ========================================================= */
body.is-opening #universe-canvas {
  opacity: 0.62;
}

.site-signature,
.door-en,
.finale-signature {
  text-transform: uppercase;
}

.site-signature {
  font-family: var(--display);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.2em;
}

.cake-stage {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  min-height: 100%;
  padding: calc(var(--topbar) + 8px) 18px 34px;
  background:
    radial-gradient(circle at 50% 48%, rgba(42, 76, 126, 0.18), transparent 32%),
    radial-gradient(circle at 50% 50%, rgba(4, 8, 18, 0.02), rgba(1, 3, 8, 0.68) 76%);
  transition: background 2.2s ease;
}

.cake-stage::before {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 18%, rgba(0, 2, 7, 0.3) 45%, rgba(0, 2, 7, 0.66) 87%),
    linear-gradient(180deg, rgba(1, 3, 8, 0.18), transparent 30%, rgba(1, 3, 8, 0.18));
  transition: opacity 2s ease;
}

.cake-stage.is-lit {
  background:
    radial-gradient(circle at 50% 43%, rgba(230, 197, 113, 0.1), transparent 25%),
    radial-gradient(circle at 50% 53%, rgba(55, 87, 131, 0.13), transparent 52%),
    linear-gradient(180deg, #030712, #07152a 52%, #02060e);
}

.cake-stage.is-lit::before {
  opacity: 0.36;
}

.opening-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.opening-stars span {
  position: absolute;
  color: rgba(247, 232, 181, 0.78);
  font-size: 10px;
  text-shadow: 0 0 15px currentColor;
  animation: starPulse 4s ease-in-out infinite;
}

.opening-stars span:nth-child(1) {
  top: 17%;
  left: 13%;
}

.opening-stars span:nth-child(2) {
  top: 28%;
  left: 24%;
  animation-delay: -1s;
}

.opening-stars span:nth-child(3) {
  top: 15%;
  right: 16%;
  font-size: 15px;
  animation-delay: -2s;
}

.opening-stars span:nth-child(4) {
  right: 28%;
  bottom: 22%;
  animation-delay: -2.6s;
}

.opening-stars span:nth-child(5) {
  bottom: 29%;
  left: 16%;
  font-size: 8px;
  animation-delay: -0.7s;
}

.opening-stars span:nth-child(6) {
  top: 45%;
  right: 9%;
  font-size: 8px;
  animation-delay: -3.1s;
}

.cosmic-cake-viewport {
  position: relative;
  z-index: 4;
  flex: 0 0 clamp(410px, 54vh, 515px);
  width: min(610px, 94vw);
  cursor: grab;
  touch-action: pan-y;
  perspective: 1250px;
}

.cosmic-cake-viewport:active {
  cursor: grabbing;
}

.cosmic-dome {
  position: absolute;
  z-index: 0;
  top: 3%;
  left: 50%;
  width: min(410px, 74vw);
  height: min(410px, 74vw);
  overflow: hidden;
  border: 1px solid rgba(174, 200, 232, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 31%, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 63% 24%, rgba(247, 232, 181, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 45%, rgba(201, 218, 242, 0.88) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 56%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 26% 66%, rgba(247, 232, 181, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 31%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(ellipse at 42% 47%, rgba(87, 74, 155, 0.58), rgba(15, 25, 65, 0.76) 38%, rgba(2, 6, 18, 0.95) 73%);
  box-shadow:
    inset 0 0 70px rgba(111, 142, 198, 0.2),
    0 0 55px rgba(71, 111, 167, 0.11);
  opacity: 0.2;
  transform: translateX(-50%);
  transition:
    opacity 2s ease,
    filter 2s ease,
    box-shadow 2s ease;
}

.cosmic-dome::before {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 42% 40%, rgba(187, 167, 237, 0.18), transparent 39%),
    radial-gradient(ellipse at 56% 55%, rgba(80, 113, 179, 0.25), transparent 48%);
  filter: blur(12px);
}

.cosmic-dome::after {
  content: "";
  position: absolute;
  top: 7%;
  left: 9%;
  width: 46%;
  height: 21%;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(-23deg);
}

.cosmic-dome span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    42px 68px 0 rgba(255, 255, 255, 0.72),
    118px 31px 0 rgba(247, 232, 181, 0.7),
    170px 91px 0 rgba(255, 255, 255, 0.62),
    63px 153px 0 rgba(184, 209, 240, 0.78),
    201px 139px 0 rgba(255, 255, 255, 0.66),
    246px 51px 0 rgba(247, 232, 181, 0.64),
    114px 204px 0 rgba(255, 255, 255, 0.55);
}

.cosmic-dome span:nth-child(1) {
  top: 18%;
  left: 18%;
}

.cosmic-dome span:nth-child(2) {
  top: 31%;
  left: 47%;
  transform: scale(0.7);
}

.cosmic-dome span:nth-child(3) {
  top: 53%;
  left: 25%;
  transform: scale(0.55);
}

.cosmic-dome span:nth-child(4) {
  top: 39%;
  right: 22%;
  transform: scale(0.8);
}

.galaxy-orbit {
  position: absolute;
  z-index: 2;
  top: 37%;
  left: 50%;
  width: 86%;
  height: 30%;
  border: 1px solid rgba(213, 225, 242, 0.27);
  border-radius: 50%;
  opacity: 0.24;
  transform: translateX(-50%) rotate(-8deg);
  pointer-events: none;
  transition: opacity 1.8s ease;
}

.galaxy-orbit::before {
  content: "";
  position: absolute;
  top: 18%;
  right: 7%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.orbit-two {
  top: 40%;
  width: 68%;
  height: 22%;
  transform: translateX(-50%) rotate(13deg);
}

.mini-moon {
  position: absolute;
  z-index: 3;
  top: 29%;
  left: 5%;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  opacity: 0.22;
  background: radial-gradient(circle at 38% 34%, #b9c8dc, #475977 65%, #17243c);
  box-shadow: 0 0 13px rgba(192, 211, 235, 0.26);
  transition: opacity 1.4s ease;
}

.cake-light-bloom {
  position: absolute;
  z-index: 1;
  top: 44%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 245, 205, 0.86), rgba(231, 203, 125, 0.23) 25%, transparent 68%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  transition:
    width 2.3s var(--soft),
    height 2.3s var(--soft),
    opacity 1.4s ease;
}

.cake-stage.is-lit .cake-light-bloom {
  width: 84vw;
  height: 84vw;
  opacity: 0.52;
}

.cake-stage.is-lit .cosmic-dome {
  opacity: 1;
  filter: saturate(1.1);
  box-shadow:
    inset 0 0 70px rgba(111, 142, 198, 0.24),
    0 0 70px rgba(105, 141, 190, 0.16);
}

.cake-stage.is-lit .galaxy-orbit,
.cake-stage.is-lit .mini-moon {
  opacity: 0.82;
}

.ignition-candle {
  position: absolute;
  z-index: 12;
  top: 47%;
  left: 50%;
  width: 21px;
  height: 56px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 220px);
}

.cake-stage.is-lighting .ignition-candle {
  animation: zCandlePath 4.2s var(--soft) both;
}

.ignition-stick {
  position: absolute;
  right: 4px;
  bottom: 0;
  width: 8px;
  height: 34px;
  border-radius: 3px;
  background: repeating-linear-gradient(-44deg, #f3e5bf 0 5px, #6f88a8 5px 10px);
  box-shadow: 0 0 10px rgba(226, 193, 109, 0.2);
}

.ignition-flame {
  position: absolute;
  top: -16px;
  left: 3px;
  width: 14px;
  height: 24px;
  border-radius: 58% 42% 60% 40% / 72% 46% 54% 28%;
  background: linear-gradient(#fffce9, #f6d574 48%, #e59840);
  box-shadow:
    0 0 11px rgba(255, 224, 135, 0.9),
    0 0 34px rgba(230, 163, 67, 0.62);
  transform-origin: 50% 100%;
  animation: flameDance 0.72s ease-in-out infinite alternate;
}

.cake-rotator {
  position: absolute;
  z-index: 5;
  bottom: 10px;
  left: 50%;
  width: min(460px, 92vw);
  height: 310px;
  opacity: 0.2;
  filter: brightness(0.28) saturate(0.45);
  transform: translateX(-50%) rotateY(var(--cake-angle, 0deg));
  transform-style: preserve-3d;
  transform-origin: 50% 56%;
  transition:
    opacity 2s ease,
    filter 2s ease,
    transform 0.2s ease-out;
}

.cosmic-cake-viewport.is-dragging .cake-rotator {
  transition: none;
}

.cake-stage.is-lit .cake-rotator {
  opacity: 1;
  filter: brightness(1) saturate(1.08);
}

.cosmic-cake {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.cosmic-cake::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 8%;
  bottom: 2%;
  left: 8%;
  height: 25px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  filter: blur(15px);
}

.single-candle {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 50%;
  width: 11px;
  height: 52px;
  border-radius: 3px 3px 1px 1px;
  background: repeating-linear-gradient(-44deg, #efe2c2 0 5px, #7995b4 5px 10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.single-wick {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 9px;
  background: #261c15;
  transform: translateX(-50%);
}

.single-flame {
  position: absolute;
  top: -33px;
  left: 50%;
  width: 16px;
  height: 26px;
  border-radius: 60% 40% 56% 44% / 72% 46% 54% 28%;
  opacity: 0;
  background: linear-gradient(#fffce8, #f6d576 44%, #e99b42);
  box-shadow:
    0 0 12px rgba(255, 225, 135, 0.92),
    0 0 38px rgba(230, 163, 67, 0.6);
  transform: translateX(-50%);
  animation: flameDance 0.75s ease-in-out infinite alternate;
  transition: opacity 1.1s ease;
}

.cake-stage.is-lit .single-flame {
  opacity: 1;
}

.single-smoke {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 12px;
  height: 31px;
  border-left: 1px solid rgba(220, 227, 235, 0.46);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
}

.cosmic-cake.is-out .single-flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.18);
}

.cosmic-cake.is-out .single-smoke {
  animation: smokeUp 2s ease-out both;
}

.cake-tier-new {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(245, 236, 210, 0.26);
  box-shadow:
    inset -34px 0 42px rgba(7, 17, 48, 0.4),
    inset 12px 0 24px rgba(255, 255, 255, 0.08),
    0 12px 20px rgba(1, 3, 10, 0.22);
}

.tier-new-top {
  z-index: 3;
  bottom: 169px;
  width: 180px;
  height: 76px;
  border-radius: 48% 48% 37% 37% / 25% 25% 58% 58%;
  background:
    radial-gradient(circle at 27% 51%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 43%, rgba(247, 232, 181, 0.72) 0 1px, transparent 2px),
    linear-gradient(120deg, #173261, #514187 48%, #131c4b);
}

.tier-new-middle {
  z-index: 2;
  bottom: 101px;
  width: 266px;
  height: 91px;
  border-radius: 48% 48% 24% 24% / 35% 35% 28% 28%;
  background:
    radial-gradient(circle at 18% 54%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 79% 48%, rgba(247, 232, 181, 0.68) 0 1px, transparent 2px),
    linear-gradient(120deg, #112a58, #3d4c8c 50%, #101d4c);
}

.tier-new-bottom {
  z-index: 1;
  bottom: 22px;
  width: 340px;
  height: 98px;
  border-radius: 48% 48% 17% 17% / 36% 36% 19% 19%;
  background:
    radial-gradient(circle at 25% 51%, rgba(247, 232, 181, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 61%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    linear-gradient(120deg, #0e244a, #2d3e76 48%, #0a173b);
}

.tier-top {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 102%;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 13% 45%, #fff1d0 0 7px, transparent 8px),
    radial-gradient(circle at 32% 62%, #ead5ad 0 9px, transparent 10px),
    radial-gradient(circle at 50% 50%, #fff2d5 0 8px, transparent 9px),
    radial-gradient(circle at 68% 62%, #ead5ad 0 9px, transparent 10px),
    radial-gradient(circle at 87% 43%, #fff1d0 0 7px, transparent 8px),
    linear-gradient(#f5e7c7, #bfae8f);
  transform: translateX(-50%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cake-sprinkles {
  position: absolute;
  top: 37px;
  left: 50%;
  color: rgba(247, 232, 181, 0.68);
  font-size: 8px;
  letter-spacing: 0.36em;
  transform: translateX(-50%);
}

.happy-mid {
  position: absolute;
  bottom: 26px;
  left: 50%;
  color: rgba(255, 242, 201, 0.82);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.cake-moon-new {
  position: absolute;
  right: 21%;
  bottom: 24px;
  color: rgba(247, 232, 181, 0.48);
  font-family: var(--display);
  font-size: 23px;
}

.cosmic-plate {
  position: absolute;
  z-index: 0;
  bottom: 3px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 418px;
  height: 77px;
  border: 1px solid rgba(215, 228, 244, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(213, 228, 246, 0.72), rgba(102, 135, 181, 0.82) 31%, rgba(14, 36, 78, 0.96) 67%);
  box-shadow:
    inset 0 4px 15px rgba(255, 255, 255, 0.18),
    0 13px 28px rgba(0, 0, 0, 0.46);
  transform: translateX(-50%);
}

.cosmic-plate span {
  margin-top: 12px;
  color: rgba(19, 43, 78, 0.7);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.cake-ui {
  position: static;
  z-index: 20;
  width: min(670px, 92vw);
  min-height: 185px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cake-intro-prompt {
  position: relative;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.85s ease 0.5s,
    transform 0.85s var(--soft) 0.5s,
    visibility 0s linear 1.35s;
}

.cake-stage.is-lit .cake-intro-prompt {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.7s, 0.7s, 0s;
}

.cake-ui .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cake-ui h2 {
  margin-bottom: 11px;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 53px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.cake-ui h2 em {
  color: var(--gold);
  font-weight: 400;
}

.cake-intro-prompt > p:not(.eyebrow, .rotate-hint) {
  margin-bottom: 17px;
  color: rgba(251, 247, 235, 0.52);
  font-family: var(--display);
  font-size: 13px;
}

.rotate-hint {
  margin: 10px 0 0;
  color: rgba(251, 247, 235, 0.3);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.skip-lighting {
  position: absolute;
  z-index: 30;
  right: 18px;
  bottom: 16px;
  padding: 7px 11px;
  border: 0;
  color: rgba(251, 247, 235, 0.28);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  letter-spacing: 0.07em;
  transition:
    opacity 0.4s ease,
    color 0.3s ease;
}

.skip-lighting:hover {
  color: var(--gold-light);
}

.cake-stage.is-lit .skip-lighting {
  opacity: 0;
  pointer-events: none;
}

.cake-wish-panel {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  width: min(590px, 92vw);
  padding: 27px 28px 23px;
  border: 1px solid rgba(231, 203, 125, 0.3);
  background:
    linear-gradient(145deg, rgba(8, 18, 38, 0.96), rgba(3, 8, 19, 0.91)),
    radial-gradient(circle at 50% 0%, rgba(115, 163, 216, 0.13), transparent 48%);
  box-shadow:
    inset 0 0 0 5px rgba(251, 247, 235, 0.02),
    0 30px 90px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(17px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.95);
  transition:
    opacity 0.55s ease,
    transform 0.6s var(--soft),
    visibility 0s linear 0.6s;
}

.cake-wish-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(231, 203, 125, 0.14);
  pointer-events: none;
}

.cake-stage.is-wish-open .cake-wish-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}

.panel-close {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: rgba(251, 247, 235, 0.4);
  background: transparent;
  cursor: pointer;
  font-family: var(--body);
  font-size: 20px;
}

.panel-close:hover {
  color: var(--gold-light);
}

.cake-wish-panel .wish-hands {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  font-size: 14px;
}

.cake-wish-panel h2 {
  margin-bottom: 9px;
  font-size: clamp(34px, 4vw, 49px);
}

.cake-wish-panel .wish-copy {
  margin-bottom: 15px;
  font-size: 12px;
  line-height: 1.7;
}

#wish-input {
  min-height: 76px;
  padding: 11px 14px;
  font-size: 13px;
}

.cake-wish-panel .main-button {
  margin-top: 12px;
}

.cake-wish-panel .mic-result {
  margin-top: 9px;
  font-size: 12px;
}

.cake-blow-panel {
  position: relative;
  z-index: 35;
  top: auto;
  left: auto;
  width: min(600px, 92vw);
  padding: 8px 18px 0;
  opacity: 1;
  transform: none;
  text-align: center;
}

.cake-blow-panel .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cake-blow-panel h2 {
  font-size: clamp(32px, 4vw, 53px);
}

.cake-blow-panel > p:not(.eyebrow) {
  margin-bottom: 16px;
  color: rgba(251, 247, 235, 0.55);
  font-family: var(--display);
  font-size: 13px;
}

.cake-blow-panel .text-link {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

/* The cake returns to full visibility while the wish panel is open. */
.cake-stage.is-wish-open .cake-ui,
.cake-stage.is-blow-mode .cake-ui {
  min-height: 0;
}

.cake-stage.is-wish-open .cake-intro-prompt {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cake-stage.is-wish-open .cosmic-cake-viewport {
  filter: none;
  opacity: 0.46;
  transform: none;
}

.cake-stage.is-blow-mode .cake-wish-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cake-stage.is-blow-mode .cake-intro-prompt {
  display: none;
}

.cake-stage.is-blow-mode .cake-blow-panel {
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.cosmic-cake.is-out .single-flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.18);
}

/* Door: centered, with a bright infinite portal behind it. */
.door-stage {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: calc(var(--topbar) + 18px) 20px 35px;
}

.cosmic-door {
  width: min(275px, 57vw);
  height: min(470px, 59vh);
  min-height: 330px;
  order: 1;
}

.door-portal {
  position: absolute;
  z-index: 0;
  inset: 3%;
  overflow: hidden;
  border-radius: 50% 50% 3px 3px / 34% 34% 2% 2%;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255, 251, 220, 0.96), rgba(157, 196, 239, 0.72) 27%, rgba(54, 102, 166, 0.58) 54%, transparent 78%),
    #0b2347;
  filter: blur(1px);
  transform: scale(0.9);
  transition:
    opacity 1.1s ease,
    transform 1.4s var(--soft);
}

.door-portal::before {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.24) 0deg 1deg, transparent 1deg 13deg);
  animation: portalSpin 25s linear infinite;
}

.door-portal i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 12px currentColor;
  animation: portalTravel 3.6s ease-in-out infinite;
}

.door-portal i:nth-child(2) {
  animation-delay: -0.7s;
}

.door-portal i:nth-child(3) {
  animation-delay: -1.4s;
}

.door-portal i:nth-child(4) {
  animation-delay: -2.1s;
}

.door-portal i:nth-child(5) {
  animation-delay: -2.8s;
}

.cosmic-door.is-opening .door-portal {
  opacity: 1;
  transform: scale(1.18);
}

.door-copy {
  position: relative;
  z-index: 5;
  order: 2;
  width: min(680px, 92vw);
  margin-top: 0;
  text-align: center;
}

.door-copy .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.door-copy h2 {
  margin-bottom: 7px;
  font-size: clamp(27px, 2.9vw, 39px);
  line-height: 1.2;
}

.door-en {
  margin: 0;
  color: rgba(231, 203, 125, 0.52);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.door-hint {
  position: static;
  order: 3;
  margin-top: 1px;
  color: rgba(251, 247, 235, 0.26);
  font-size: 8px;
}

/* Gift: a 3D object that can be dragged through a full turn. */
.gift-box {
  touch-action: none;
  transform: none !important;
  transform-origin: 50% 50%;
}

.gift-rotator {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transform: rotateY(var(--gift-angle, 0deg));
  transition: transform 0.18s ease-out;
}

.gift-box.is-dragging .gift-rotator {
  transition: none;
}

.gift-box.is-open {
  cursor: grab;
}

.gift-open-letter {
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

.gift-hint,
.gift-open-letter {
  flex: 0 0 auto;
}

.gift-box.is-open + .gift-hint {
  margin-top: -3px;
  color: rgba(251, 247, 235, 0.42);
}

@keyframes zCandlePath {
  0% {
    opacity: 0;
    transform: translate(-50%, 220px) rotate(-8deg) scale(0.78);
  }
  10% {
    opacity: 1;
  }
  26% {
    opacity: 1;
    transform: translate(calc(-50% - 92px), 115px) rotate(-10deg) scale(0.88);
  }
  45% {
    opacity: 1;
    transform: translate(calc(-50% + 88px), 20px) rotate(9deg) scale(0.9);
  }
  66% {
    opacity: 1;
    transform: translate(calc(-50% - 52px), -82px) rotate(-7deg) scale(0.84);
  }
  86% {
    opacity: 1;
    transform: translate(calc(-50% + 9px), -174px) rotate(3deg) scale(0.62);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + 1px), -193px) rotate(0) scale(0.3);
  }
}

@keyframes portalSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes portalTravel {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 85px) scale(0.2);
  }
  22% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(80px, -110px) scale(1.5);
  }
}

@media (max-width: 900px) {
  .cake-stage {
    padding: calc(var(--topbar) + 5px) 12px 23px;
  }

  .cosmic-cake-viewport {
    flex-basis: clamp(390px, 53vh, 480px);
  }

  .cake-ui {
    min-height: 166px;
  }

  .cosmic-cake-viewport {
    width: min(540px, 96vw);
  }

  .cake-wish-panel {
    top: 49%;
  }

  .door-stage {
    padding-top: calc(var(--topbar) + 13px);
  }

  .door-copy {
    width: 92vw;
  }
}

@media (max-width: 620px) {
  .site-signature {
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .cake-stage {
    padding-top: calc(var(--topbar) + 4px);
    padding-bottom: 17px;
  }

  .cosmic-cake-viewport {
    flex-basis: 405px;
    width: 100%;
  }

  .cosmic-dome {
    top: 2%;
    width: min(340px, 82vw);
    height: min(340px, 82vw);
  }

  .cake-rotator {
    bottom: -5px;
    width: 390px;
    height: 290px;
  }

  .cosmic-plate {
    width: 360px;
  }

  .cake-ui {
    min-height: 169px;
  }

  .cake-ui h2 {
    font-size: clamp(31px, 8.7vw, 42px);
  }

  .cake-intro-prompt > p:not(.eyebrow, .rotate-hint) {
    font-size: 12px;
  }

  .cake-wish-panel {
    top: 48%;
    width: min(390px, 93vw);
    padding: 22px 17px 18px;
  }

  .cake-wish-panel h2 {
    font-size: 36px;
  }

  .cake-wish-panel .wish-copy {
    font-size: 11px;
  }

  .cake-wish-panel .mic-result {
    font-size: 11px;
  }

  .cake-blow-panel {
    width: 93vw;
    padding: 8px;
  }

  .cake-blow-panel h2 {
    font-size: 37px;
  }

  .cosmic-door {
    width: min(220px, 58vw);
    height: min(350px, 43vh);
    min-height: 300px;
  }

  .door-copy h2 {
    font-size: 31px;
  }

  .door-copy .eyebrow {
    display: none;
  }

  .door-hint {
    font-size: 8px;
  }

  .gift-box {
    width: min(310px, 70vw);
  }
}

/* =========================================================
   V4 · Real Three.js cake scene
   ========================================================= */
.cosmic-cake-viewport {
  isolation: isolate;
  overflow: visible;
}

.three-cake-canvas {
  position: absolute;
  inset: -22px -6px -15px;
  z-index: 5;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 55%, transparent 100%);
  transition: opacity 1.2s ease;
}

.cosmic-cake-viewport.three-ready .three-cake-canvas {
  opacity: 1;
}

.three-cake-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  touch-action: pan-y;
}

.three-cake-loading {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  color: rgba(247, 232, 181, 0.52);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 1;
  transform: translate(-50%, -50%);
  transition:
    opacity 0.7s ease,
    visibility 0s linear 0.7s;
  pointer-events: none;
}

.three-cake-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.three-cake-loading p {
  margin: 0;
  white-space: nowrap;
}

.loading-ring {
  width: 37px;
  height: 37px;
  border: 1px solid rgba(151, 191, 236, 0.2);
  border-top-color: rgba(247, 232, 181, 0.82);
  border-radius: 50%;
  animation: portalSpin 1.5s linear infinite;
}

.three-ready .cake-light-bloom {
  z-index: 3;
}

@media (max-width: 900px) {
  .three-cake-canvas {
    inset: -12px -8px -6px;
  }
}

@media (max-width: 620px) {
  .three-cake-canvas {
    inset: -8px -10px -10px;
  }
}

/* =========================================================
   V5 · restrained editorial layout
   ========================================================= */
.topbar {
  min-height: 66px;
}

.site-signature {
  letter-spacing: 0.16em;
}

.sound-toggle {
  min-width: 39px;
  width: 39px;
  padding: 0;
  justify-content: center;
}

.toast,
.toast.is-visible {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 1;
  transform: none;
}

.cake-intro-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cake-ui .cake-intro-prompt .eyebrow {
  margin-bottom: 0;
}

.cake-ui .cake-intro-prompt h2 {
  margin: 0 0 4px;
  font-size: clamp(30px, 3.7vw, 48px);
}

.cake-wish-panel {
  width: min(520px, 92vw);
  padding: 25px 26px 21px;
}

.cake-wish-panel .eyebrow {
  margin-bottom: 0;
}

.cake-wish-panel #wish-input {
  min-height: 92px;
  margin-top: 15px;
}

.mic-result.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cake-blow-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cake-blow-panel .eyebrow {
  margin-bottom: 0;
}

.cake-blow-panel h2 {
  margin: 0 0 7px;
  font-size: clamp(29px, 3.5vw, 44px);
}

.memories-heading {
  margin-bottom: 12px;
}

.memories-heading h2 {
  margin-bottom: 0;
}

.memory-track {
  padding-top: 22px;
}

.memory-footer {
  min-height: 69px;
  gap: 9px;
}

.memory-footer .main-button {
  margin-top: 4px;
}

.memory-photo .photo-placeholder::after {
  display: none;
}

.memory-card-caption {
  padding: 0 14px 4px;
}

.memory-card-caption small {
  margin-top: 2px;
}

.door-stage {
  gap: 3px;
}

.door-copy h2 {
  font-size: clamp(23px, 2.4vw, 32px);
  letter-spacing: 0.05em;
}

.door-copy .eyebrow::after {
  display: none;
}

.constellation-heading {
  min-height: 31px;
}

.constellation-heading .eyebrow {
  margin: 0;
}

.constellation-heading .eyebrow::after {
  display: none;
}

.stars-stage {
  padding-top: calc(var(--topbar) + 12px);
}

.sagittarius-sky {
  min-height: 430px;
}

.star-footer {
  min-height: 64px;
  padding-top: 4px;
  border-top: 0;
}

.star-quote {
  padding: 15px 20px;
  background: rgba(3, 8, 20, 0.58);
  backdrop-filter: blur(8px);
}

.gift-heading {
  position: absolute;
  top: calc(var(--topbar) + 48px);
  left: 50%;
  display: flex;
  justify-content: center;
  margin: 0;
  transform: translateX(-50%);
}

.gift-heading .eyebrow {
  margin: 0;
}

.gift-heading .eyebrow::after {
  display: none;
}

.gift-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.letter-heading .eyebrow {
  margin-bottom: 10px;
}

.letter-heading .eyebrow::after {
  display: none;
}

.letter-end > p:empty {
  display: none;
}

/* Timeline */
.timeline-stage {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  padding: calc(var(--topbar) + 24px) 22px 90px;
  overscroll-behavior: contain;
}

.timeline-stage::before {
  background:
    radial-gradient(circle at 50% 44%, rgba(58, 95, 143, 0.15), transparent 42%),
    linear-gradient(180deg, rgba(2, 4, 10, 0.04), transparent 78%);
}

.timeline-heading {
  position: relative;
  z-index: 3;
  width: min(720px, 92vw);
  text-align: center;
}

.timeline-heading .eyebrow::after {
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.timeline-heading h2 {
  margin: 10px 0 23px;
  font-family: var(--display);
  font-size: clamp(34px, 4.1vw, 54px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.timeline-intro {
  max-width: 660px;
  margin: -5px auto 25px;
  color: rgba(251, 247, 235, 0.52);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.9;
}

.timeline-intro p {
  margin: 0;
}

.timeline-list {
  position: relative;
  z-index: 3;
  width: min(720px, 92vw);
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(231, 203, 125, 0.32) 12%, rgba(115, 163, 216, 0.22) 88%, transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 65px;
  padding: 16px 0 15px;
  border-bottom: 1px solid rgba(251, 247, 235, 0.07);
  animation: riseIn 0.5s var(--soft) both;
}

.timeline-item:nth-child(2) {
  animation-delay: 0.04s;
}

.timeline-item:nth-child(3) {
  animation-delay: 0.08s;
}

.timeline-item:nth-child(4) {
  animation-delay: 0.12s;
}

.timeline-item:nth-child(5) {
  animation-delay: 0.16s;
}

.timeline-item:nth-child(6) {
  animation-delay: 0.2s;
}

.timeline-item:nth-child(7) {
  animation-delay: 0.24s;
}

.timeline-item:nth-child(8) {
  animation-delay: 0.28s;
}

.timeline-index {
  color: rgba(251, 247, 235, 0.28);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.timeline-dot {
  position: relative;
  z-index: 2;
  display: block;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border: 1px solid rgba(231, 203, 125, 0.65);
  border-radius: 50%;
  background: var(--night);
  box-shadow: 0 0 13px rgba(231, 203, 125, 0.2);
}

.timeline-date {
  margin: 0 0 5px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.timeline-item h3 {
  margin: 0;
  color: rgba(251, 247, 235, 0.84);
  font-family: var(--display);
  font-size: clamp(16px, 1.55vw, 19px);
  font-weight: 400;
  line-height: 1.4;
}

.timeline-story {
  max-width: 590px;
  margin: 8px 0 0;
  color: rgba(251, 247, 235, 0.55);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.8;
}

.timeline-future {
  margin-top: 7px;
  border-bottom: 0;
}

.timeline-future .timeline-dot,
.timeline-future-star {
  color: rgba(251, 247, 235, 0.5);
  font-family: var(--display);
}

.timeline-future-star {
  position: relative;
  z-index: 2;
  display: block;
  margin-left: 1px;
  font-size: 15px;
  line-height: 1;
}

.timeline-future h3 {
  color: rgba(251, 247, 235, 0.7);
}

.timeline-continue {
  position: relative;
  z-index: 3;
  margin-top: 19px;
}

@media (max-width: 900px) {
  .timeline-stage {
    justify-content: flex-start;
    padding-top: calc(var(--topbar) + 22px);
    padding-bottom: 75px;
  }

  .timeline-heading h2 {
    margin-bottom: 18px;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 58px;
  }

  .mic-result.sr-only,
  .gift-hint {
    clip-path: inset(50%);
  }

  .cake-wish-panel {
    padding: 21px 17px 18px;
  }

  .cake-blow-panel h2 {
    font-size: 33px;
  }

  .memories-heading h2 {
    font-size: 38px;
    line-height: 1.18;
  }

  .timeline-heading h2 {
    font-size: 35px;
    line-height: 1.22;
  }

  .timeline-list {
    width: 91vw;
  }

  .timeline-list::before {
    left: 49px;
  }

  .timeline-item {
    grid-template-columns: 31px 15px minmax(0, 1fr);
    gap: 9px;
    min-height: 59px;
  }

  .timeline-item h3 {
    font-size: 16px;
  }

  .timeline-intro {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .timeline-story {
    font-size: 12px;
  }

  .timeline-continue {
    margin-top: 14px;
  }

  .constellation-heading {
    min-height: 22px;
  }

  .sagittarius-sky {
    min-height: 430px;
  }
}

/* =========================================================
   V6 · cosmic overture, film strip and refined interactions
   ========================================================= */
:root {
  --butterfly-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg stroke-width='3.8' opacity='.24'%3E%3Cpath d='M16 14C11 8 4.5 7.5 4.5 12c0 4 5.5 6 11.5 4'/%3E%3Cpath d='M16 14c5-6 11.5-6.5 11.5-2 0 4-5.5 6-11.5 4'/%3E%3Cpath d='M16 16c-5 1-9.5 6-6.5 8.5 3 2.5 6-3.5 6.5-6.5'/%3E%3Cpath d='M16 16c5 1 9.5 6 6.5 8.5-3 2.5-6-3.5-6.5-6.5'/%3E%3Cpath d='M16 13v11M16 13l-2.5-4M16 13l2.5-4'/%3E%3C/g%3E%3Cg stroke-width='1.15'%3E%3Cpath d='M16 14C11 8 4.5 7.5 4.5 12c0 4 5.5 6 11.5 4'/%3E%3Cpath d='M16 14c5-6 11.5-6.5 11.5-2 0 4-5.5 6-11.5 4'/%3E%3Cpath d='M16 16c-5 1-9.5 6-6.5 8.5 3 2.5 6-3.5 6.5-6.5'/%3E%3Cpath d='M16 16c5 1 9.5 6 6.5 8.5-3 2.5-6-3.5-6.5-6.5'/%3E%3Cpath d='M16 13v11M16 13l-2.5-4M16 13l2.5-4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 16 14, auto;
}

html,
body,
button,
.stage,
.gift-box,
.wish-star-button,
.sagittarius-star {
  cursor: var(--butterfly-cursor);
}

textarea,
input {
  cursor: text;
}

.topbar {
  grid-template-columns: minmax(130px, auto) minmax(120px, 1fr) auto;
  gap: 18px;
  min-height: 68px;
}

.brand-area {
  justify-self: start;
  gap: 9px;
}

.brand-area .site-signature {
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.right-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 13px;
  pointer-events: auto;
}

.right-tools .sound-toggle {
  justify-self: auto;
}

.right-tools .site-signature {
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-align: right;
}

.global-signature {
  position: fixed;
  z-index: 65;
  right: clamp(18px, 3.5vw, 55px);
  bottom: clamp(16px, 3vh, 34px);
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.04em;
  pointer-events: none;
}

body.is-intro .topbar {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}

body.is-intro .brand-area .back-button,
body.is-intro .progress-nav {
  opacity: 0;
  pointer-events: none;
}

body.is-intro .sound-toggle {
  opacity: 1;
  pointer-events: auto;
}

.sound-toggle.is-awaiting .sound-bars i {
  height: 2px;
  animation-play-state: paused;
}

body.is-intro .brand-area .back-button {
  display: none;
}

body.is-intro .brand-area .site-signature {
  opacity: 1;
}

body.is-intro #universe-canvas,
body.is-intro .space-haze,
body.is-intro .cloud-bank,
body.is-intro .butterfly {
  opacity: 0;
}

body.is-intro .three-cake-canvas {
  visibility: hidden;
  opacity: 0 !important;
}

/* Cosmic overture */
.intro-stage {
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 100%;
  padding: 0;
  background: #010205;
}

.intro-stage::before {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 24%, rgba(0, 0, 0, 0.14) 53%, rgba(0, 0, 0, 0.62) 100%);
}

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.intro-copy {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: auto;
  height: auto;
  text-align: center;
  pointer-events: none;
}

.intro-stage .intro-copy > .intro-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1000px, 94vw);
  margin: 0;
  max-width: 1000px;
  color: #f7e8ae;
  font-family: "Source Han Serif CN", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.7;
  opacity: 0;
  text-align: center;
  text-shadow:
    0 0 7px rgba(247, 232, 174, 0.5),
    0 0 20px rgba(247, 232, 174, 0.3),
    0 0 45px rgba(247, 232, 174, 0.16);
  filter: blur(6px);
  transform: translate(-50%, calc(-50% + 9px));
  animation: none;
  transition:
    opacity 1.1s ease,
    filter 1.1s ease,
    transform 1.1s ease;
}

.intro-stage .intro-copy > .intro-line.is-visible {
  opacity: 1;
  filter:
    blur(0)
    drop-shadow(0 0 6px rgba(255, 239, 175, 0.56))
    drop-shadow(0 0 18px rgba(255, 222, 134, 0.24));
  transform: translate(-50%, -50%);
}

.intro-collision {
  position: absolute;
  z-index: 5;
  top: 49%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.intro-collision.is-visible {
  animation: introFlash 1.25s ease-out both;
}

/* Full-screen Three.js background, no circular mask. */
.three-cake-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  -webkit-mask-image: none;
  mask-image: none;
  mix-blend-mode: normal;
  pointer-events: none;
}

.cosmic-cake-viewport {
  z-index: 8;
  pointer-events: auto;
  perspective: none;
}

.cake-intro-prompt,
.cake-wish-panel,
.cake-blow-panel {
  pointer-events: auto;
}

.cake-ui .cake-intro-prompt h2 {
  font-family: "Times New Roman", Times, serif;
  font-style: normal;
}

.wish-butterfly {
  position: relative;
  display: block;
  width: 46px;
  height: 38px;
  margin: 0 auto 14px;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.5));
}

.wish-butterfly i {
  position: absolute;
  top: 6px;
  width: 20px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.02);
}

.wish-butterfly i:first-child {
  right: 50%;
  border-radius: 90% 12% 70% 20%;
  transform: rotate(-8deg);
}

.wish-butterfly i:nth-child(2) {
  left: 50%;
  border-radius: 12% 90% 20% 70%;
  transform: rotate(8deg);
}

.wish-butterfly b {
  position: absolute;
  top: 9px;
  left: calc(50% - 1px);
  width: 2px;
  height: 23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.wish-butterfly b::before,
.wish-butterfly b::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.9);
}

.wish-butterfly b::before {
  right: 0;
  transform: rotate(38deg);
}

.wish-butterfly b::after {
  left: 0;
  transform: rotate(-38deg);
}

.wish-subtitle {
  margin: 13px 0 5px;
  color: rgba(251, 247, 235, 0.66);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.75;
}

.cake-wish-panel #wish-input {
  margin-top: 12px;
}

.cake-wish-panel.is-submitted .wish-butterfly,
.cake-wish-panel.is-submitted .wish-subtitle,
.cake-wish-panel.is-submitted #wish-input,
.cake-wish-panel.is-submitted #wish-finish {
  display: none;
}

.mic-listening {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 64px;
  height: 28px;
  margin: 4px 0 1px;
  filter: drop-shadow(0 0 10px rgba(231, 203, 125, 0.42));
}

.mic-listening i {
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: var(--gold-light);
  animation: listeningWave 0.9s ease-in-out infinite;
}

.mic-listening i:nth-child(2) {
  height: 20px;
  animation-delay: -0.28s;
}

.mic-listening i:nth-child(3) {
  height: 15px;
  animation-delay: -0.56s;
}

@keyframes listeningWave {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.55);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* 20-frame film strip */
.memories-heading h2 {
  max-width: none;
}

.memory-carousel {
  min-height: 560px;
  padding-block: 8px 12px;
}

.memory-track {
  position: relative;
  gap: 22px;
  min-height: 515px;
  padding: 32px calc(50vw - 160px) 20px;
  background:
    linear-gradient(180deg, rgba(5, 6, 9, 0.88), rgba(17, 15, 14, 0.86)),
    repeating-linear-gradient(90deg, transparent 0 27px, rgba(255, 255, 255, 0.02) 27px 28px);
  border-top: 10px solid #0b0b0d;
  border-bottom: 10px solid #0b0b0d;
  box-shadow:
    inset 0 15px 18px rgba(0, 0, 0, 0.6),
    inset 0 -15px 18px rgba(0, 0, 0, 0.64);
}

.memory-track::before,
.memory-track::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 4;
  height: 8px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 12px, rgba(241, 234, 218, 0.34) 12px 19px, transparent 19px 31px);
}

.memory-track::before {
  top: 5px;
}

.memory-track::after {
  bottom: 5px;
}

.memory-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.memory-card {
  flex-basis: min(320px, 72vw);
  height: auto;
}

.film-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  padding: 8px 8px 0;
  color: var(--ivory);
  background: #111114;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.42);
}

.film-frame::before {
  content: "";
  position: absolute;
  top: -24px;
  right: 4px;
  left: 4px;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(238, 232, 218, 0.28) 0 12px, transparent 12px 24px);
}

.memory-photo {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  padding: 0;
  transform: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(115, 154, 201, 0.2), transparent 34%),
    radial-gradient(ellipse at 50% 78%, rgba(28, 57, 91, 0.48), transparent 55%),
    #050912;
  box-shadow: none;
  opacity: 0.12;
  filter: blur(5px) brightness(0.45) saturate(0.4);
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  transition:
    opacity 0.9s ease,
    filter 0.9s ease,
    transform 0.55s var(--soft);
}

.memory-card:hover .memory-photo {
  transform: none;
  box-shadow: none;
}

.memory-card.is-active .memory-photo {
  opacity: 1;
  filter: blur(0) brightness(1) saturate(0.95);
}

.memory-photo::after {
  inset: 0;
}

.memory-photo img,
.memory-photo .photo-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-photo img {
  opacity: 0;
  transition: opacity 420ms ease;
}

.memory-photo img.is-loaded {
  opacity: 1;
}

.memory-photo.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.07) 46%,
    transparent 64%
  );
  background-size: 220% 100%;
  animation: memoryLoadingSweep 1.2s linear infinite;
}

@keyframes memoryLoadingSweep {
  to {
    background-position: -180% 0;
  }
}

.memory-photo img {
  object-fit: cover;
  object-position: center;
  background: #03060c;
}

.memory-photo.has-preview {
  background-image: var(--memory-preview);
  background-position: center;
  background-size: cover;
}

.memory-photo .photo-placeholder::after {
  display: none;
}

.memory-card-caption {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 11px;
}

.memory-card-text {
  min-width: 0;
  width: 100%;
}

.memory-card-caption strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.memory-copy {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: rgba(251, 247, 235, 0.46);
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.memory-card-caption small {
  display: block;
  margin-top: 4px;
  color: rgba(251, 247, 235, 0.36);
  font-size: 8px;
}

.memory-planet {
  display: none;
}

/* Timeline and star-page density */
.timeline-heading h2 {
  max-width: 660px;
  margin-right: auto;
  margin-left: auto;
}

.constellation-heading {
  min-height: 78px;
}

.constellation-heading h2 {
  margin: 9px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
}

.sagittarius-sky {
  min-height: 470px;
}

.sagittarius-star {
  width: 48px;
  height: 48px;
}

.finale-title {
  top: calc(var(--topbar) + 24px);
}

.finale-title h2 {
  margin: 0;
  font-family: "Source Han Serif CN", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, serif;
  font-size: 29.33px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 0 25px rgba(247, 232, 174, 0.2);
}

.finale-title p {
  display: none;
}

@keyframes introLineReveal {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes introFlash {
  0% {
    width: 8px;
    height: 8px;
    opacity: 0.95;
    background: #fff8df;
    box-shadow: 0 0 22px 8px rgba(255, 235, 177, 0.9);
  }
  45% {
    width: 300px;
    height: 300px;
    opacity: 0.82;
    background: rgba(255, 246, 213, 0.78);
    box-shadow: 0 0 150px 90px rgba(248, 226, 161, 0.3);
  }
  100% {
    width: 120vw;
    height: 120vw;
    opacity: 0;
    background: transparent;
    box-shadow: 0 0 200px 80px rgba(248, 226, 161, 0);
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: minmax(105px, auto) minmax(90px, 1fr) auto;
    gap: 8px;
    padding: 9px 12px;
  }

  .right-tools {
    gap: 7px;
  }

  .right-tools .site-signature {
    font-size: 16px;
  }

  .intro-copy {
    gap: 17px;
  }

  .intro-line {
    font-size: 29.33px;
  }

  .memory-track {
    padding-right: calc(50vw - 180px);
    padding-left: calc(50vw - 180px);
  }

  .memory-card {
    flex-basis: min(500px, 86vw);
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: minmax(88px, auto) minmax(78px, 1fr) 39px;
    gap: 6px;
    padding: 7px 9px;
  }

  .brand-area {
    gap: 5px;
  }

  .brand-area .site-signature {
    font-size: 10px;
  }

  .right-tools {
    min-width: 0;
    gap: 5px;
    transform: translateX(-6px);
  }

  .right-tools .site-signature {
    max-width: none;
    font-size: 16px;
    line-height: 1.05;
    white-space: nowrap;
    letter-spacing: -0.04em;
  }

  .progress-nav {
    justify-self: center;
  }

  .progress-nav button {
    width: 10px;
  }

  .intro-copy {
    width: auto;
  }

  .intro-line {
    font-size: 29.33px;
    line-height: 1.55;
    letter-spacing: 0.045em;
  }

  .cosmic-cake-viewport {
    pointer-events: auto;
  }

  .three-cake-canvas {
    inset: 0;
  }

  .memory-carousel {
    min-height: 480px;
  }

  .memory-track {
    min-height: 455px;
    padding-top: 27px;
    padding-right: calc(50vw - 33vw);
    padding-left: calc(50vw - 33vw);
  }

  .memory-card {
    flex-basis: 66vw;
    height: auto;
  }

  .film-frame {
    padding: 6px 6px 0;
  }

  .memory-photo {
    height: auto;
  }

  .memory-card-caption {
    padding: 8px 3px;
  }

  .memory-card-caption strong {
    font-size: 14px;
  }

  .sagittarius-sky {
    min-height: 490px;
  }

  .sagittarius-star {
    width: 44px;
    height: 44px;
  }

  .constellation-heading {
    min-height: 70px;
  }

  .constellation-heading h2 {
    font-size: 30px;
  }
}

/* Three.js gift box */
.gift-box {
  width: min(390px, 88vw);
  height: min(410px, 47vh);
  min-height: 330px;
  margin-top: -2px;
  background: transparent;
  filter: none;
  cursor: grab;
  touch-action: none;
}

.gift-box:active {
  cursor: grabbing;
}

.gift-3d-canvas {
  position: absolute;
  inset: -42px -32px;
  display: block;
  pointer-events: none;
}

.gift-bow-hit {
  position: absolute;
  z-index: 14;
  top: 0;
  left: 50%;
  width: 220px;
  height: 150px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 205, 119, 0.08), transparent 68%);
  cursor: grab;
  transform: translateX(-50%);
  touch-action: none;
}

.gift-bow-hit:active {
  cursor: grabbing;
}

.gift-bow-hit:focus-visible {
  outline: 1px solid rgba(231, 203, 125, 0.72);
  outline-offset: 7px;
}

.gift-box.is-open .gift-bow-hit {
  display: none;
}

.gift-3d-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.gift-letter-preview {
  position: absolute;
  z-index: 8;
  top: 40%;
  left: 50%;
  display: block;
  width: min(220px, 56vw);
  aspect-ratio: 1.55;
  border: 1px solid rgba(106, 82, 46, 0.28);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), transparent 46%),
    var(--paper);
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(255, 230, 168, 0.18);
  transform: translate(-50%, 56px) rotate(4deg) scale(0.76);
  transition:
    opacity 0.7s ease,
    transform 1s var(--soft);
}

.gift-letter-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 6px solid rgba(255, 252, 240, 0.56);
  pointer-events: none;
}

.gift-letter-preview::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 12%;
  bottom: 25%;
  left: 12%;
  opacity: 0.16;
  background: repeating-linear-gradient(0deg, #675638 0 1px, transparent 1px 18px);
}

.gift-box.is-open .gift-letter-preview {
  opacity: 1;
  transform: translate(-50%, -106px) rotate(-2deg) scale(1);
}

.letter-fold-line {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 57%;
  clip-path: polygon(0 100%, 50% 22%, 100% 100%);
  border-bottom: 1px solid rgba(112, 83, 42, 0.2);
  background: linear-gradient(160deg, transparent 49%, rgba(117, 89, 48, 0.12) 50%, transparent 51%);
}

.letter-seal {
  position: absolute;
  z-index: 4;
  top: 48%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(245, 229, 175, 0.6);
  border-radius: 50%;
  color: var(--gold-light);
  background: #18355c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  font-style: normal;
  font-size: 11px;
  transform: translate(-50%, -50%);
}

.gift-3d-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(231, 203, 125, 0.14);
  border-top-color: rgba(231, 203, 125, 0.78);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: portalSpin 1.5s linear infinite;
}

.gift-3d-loading.is-hidden {
  display: none;
}

.gift-box.three-ready {
  filter:
    drop-shadow(0 0 22px rgba(115, 163, 216, 0.22))
    drop-shadow(0 0 8px rgba(226, 192, 107, 0.1));
}

@media (max-width: 620px) {
  .gift-box {
    width: 88vw;
    height: 380px;
    min-height: 330px;
    margin-bottom: -6px;
    transform: none !important;
  }

  .gift-3d-canvas {
    inset: -28px -22px;
  }
}

/* Unified butterfly cursor and compact brand */
:root {
  --butterfly-cursor: url("assets/butterfly-line.svg") 16 14, auto;
}

.right-tools .site-signature {
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
}

img.wish-butterfly {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.52));
}
