:root {
  color-scheme: dark;
  --night: #0b1026;
  --violet: #2a1b4d;
  --pink: #ffb6d5;
  --gold: #ffd98a;
  --lavender: #c9b6ff;
  --ink: #f9f0f4;
  --muted: #bbb5d0;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  font-family: 'PingFang SC', -apple-system, sans-serif;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  position: fixed;
  inset: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 80% 60%, #48316544, transparent 60%), linear-gradient(165deg, var(--night) 15%, var(--violet));
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body, button { font-family: 'PingFang SC', -apple-system, sans-serif; }
button { color: inherit; font-size: inherit; border: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, article:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
p, h1, h2, figure { margin: 0; }
h1, h2 { font-weight: 400; }
#sky, .vignette, #film { position: absolute; inset: 0; width: 100%; height: 100vh; height: 100dvh; }
#sky { pointer-events: none; }
.vignette { pointer-events: none; background: radial-gradient(ellipse, transparent 38%, #080c2040); }
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 22px) max(20px, env(safe-area-inset-right)) var(--safe-bottom) max(20px, env(safe-area-inset-left));
  opacity: 0;
  transition: opacity 600ms ease;
}
.scene.active { opacity: 1; }
#film.transitioning { pointer-events: none; }
.eyebrow { font-size: 11px; letter-spacing: 0.25em; color: var(--lavender); }
.muted { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; }
.tiny { font-size: 11px; color: var(--muted); }
.music-toggle {
  position: fixed;
  z-index: 10;
  top: var(--safe-top);
  right: max(18px, env(safe-area-inset-right));
  width: 36px;
  height: 36px;
  border: 1px solid #c9b6ff40;
  border-radius: 50%;
  background: #10152b88;
  color: var(--lavender);
  font-size: 20px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.music-toggle.muted { opacity: 0.6; }
.music-toggle.muted::after { content: ''; position: absolute; width: 20px; height: 1px; background: var(--lavender); transform: rotate(-45deg); top: 17px; left: 7px; }
.unlock-content { width: min(100%, 310px); text-align: center; }
.orbit-seal { width: 60px; height: 60px; margin: 0 auto 22px; display: grid; place-items: center; border: 1px solid #c9b6ff36; border-radius: 50%; transform: rotate(-25deg); box-shadow: 0 0 42px #c9b6ff0b; position: relative; }
.orbit-seal::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); position: absolute; top: 11px; right: 2px; box-shadow: 0 0 12px var(--gold); }
.orbit-seal span { color: var(--gold); font-size: 27px; }
.recipient { color: var(--pink); margin-bottom: 16px; }
.unlock-title { white-space: pre-line; font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 29px; line-height: 1.65; letter-spacing: 0.13em; margin-bottom: 20px; }
.passcode-dots { display: flex; justify-content: center; gap: 18px; margin: 25px 0 0; height: 14px; }
.passcode-dot { width: 12px; height: 12px; border: 1px solid #ffb6d580; border-radius: 50%; transition: background 150ms, box-shadow 150ms; }
.passcode-dot.filled { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 14px #ffb6d580; }
.passcode-dots.wrong { animation: shake 400ms ease; }
.passcode-hint { opacity: 0; height: 35px; padding-top: 12px; font-size: 11px; color: var(--gold); transition: opacity 400ms; }
.passcode-hint.visible { opacity: 1; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; width: 258px; margin: 0 auto; transition: opacity 600ms, transform 600ms; }
.keypad button { height: 50px; font-size: 23px; font-weight: 300; background: #c9b6ff07; border: 1px solid #c9b6ff22; border-radius: 15px; transition: background 150ms, transform 150ms; }
.keypad button:active { background: #ffb6d52b; transform: scale(0.92); }
.keypad button[data-key='backspace'] { border-color: transparent; background: transparent; font-size: 21px; color: var(--muted); }
.unlock-footnote { margin-top: 25px; font-size: 9px; letter-spacing: 0.12em; color: #bbb5d080; }
.unlocked .keypad { opacity: 0; transform: translateY(14px); pointer-events: none; }
.unlocked .passcode-dot { opacity: 0; }
.primary-button { min-height: 48px; padding: 14px 23px; border: 1px solid #ffb6d556; border-radius: 99px; background: linear-gradient(120deg, #ffb6d51f, #c9b6ff16); font-size: 14px; letter-spacing: 0.07em; box-shadow: 0 5px 30px #090e251f; transition: transform 180ms, background 180ms; }
.primary-button:active { transform: scale(0.96); background: #ffb6d533; }
.text-button { background: transparent; padding: 12px 16px; color: var(--lavender); font-size: 12px; letter-spacing: 0.08em; min-height: 44px; }
.sky-scene { justify-content: flex-start; }
.sky-eyebrow { margin-top: 8vh; opacity: 0.6; }
.sky-caption { position: absolute; top: 71%; width: 100%; text-align: center; padding: 0 14px; }
.sky-caption h2 { font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: clamp(19px, 5.2vw, 25px); letter-spacing: 0.1em; min-height: 40px; }
.sky-caption .text-button { margin-top: 18px; }
.breathe { animation: breathe 2.5s ease-in-out infinite; }
.scene-mark { position: absolute; bottom: var(--safe-bottom); font-size: 9px; letter-spacing: 0.25em; color: #c9b6ff55; }
.letter-scene { padding: calc(var(--safe-top) + 40px) max(18px, env(safe-area-inset-right)) calc(var(--safe-bottom) + 10px) max(18px, env(safe-area-inset-left)); }
.letter-paper { position: relative; z-index: 1; width: 100%; max-width: 560px; height: 100%; min-height: 0; padding: 22px 22px 12px; border: 1px solid #e5d4eb29; border-radius: 5px 22px 5px 22px; background: #201c3ce8; box-shadow: 0 20px 80px #050a2438, inset 0 1px 0 #ffffff0a; display: flex; flex-direction: column; }
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .letter-paper { background: linear-gradient(145deg, #302641a6, #181b37b8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
}
.letter-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #c9b6ff26; padding-bottom: 16px; margin-bottom: 20px; color: var(--gold); }
.letter-heading .eyebrow { font-size: 10px; }
.letter-scroll { overflow-y: auto; overflow-x: hidden; min-height: 0; flex: 1; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: #c9b6ff50 transparent; font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 16px; line-height: 2.1; letter-spacing: 0.035em; color: #f2e5ed; }
.letter-scroll::-webkit-scrollbar { width: 2px; }
.letter-scroll::-webkit-scrollbar-thumb { background: #c9b6ff50; }
.salutation { color: var(--pink); margin-bottom: 22px; }
#letter-paragraphs p { margin-bottom: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cursor { display: inline-block; width: 2px; height: 1em; background: var(--gold); margin-left: 4px; vertical-align: -2px; animation: blink 1s steps(2, start) infinite; }
.letter-signature { text-align: right; margin: 28px 0; color: var(--pink); animation: reveal 900ms both; }
.letter-signature time { font-family: 'PingFang SC', -apple-system, sans-serif; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
#go-wish { display: block; margin: 25px auto 14px; animation: reveal 900ms both; }
.letter-hint { text-align: center; padding-top: 12px; font-size: 9px; color: #bbb5d0a0; letter-spacing: 0.1em; }
.warm-cup { position: absolute; z-index: 3; bottom: calc(var(--safe-bottom) + 52px); right: 33px; width: 80px; opacity: 0; pointer-events: none; }
.warm-cup.show { animation: cup-appear 4s both; }
.cup-shape { height: 51px; width: 50px; border-radius: 5px 5px 20px 20px; background: linear-gradient(110deg, #ffdc9a, #d98a50); box-shadow: 0 0 35px #ffaa5d40; position: relative; margin-left: 8px; }
.cup-shape::after { content: ''; position: absolute; right: -15px; top: 8px; width: 20px; height: 24px; border: 5px solid #eeb678; border-radius: 50%; z-index: -1; }
.warm-cup > span { display: block; color: var(--gold); font-size: 9px; margin-top: 9px; }
.steam { display: flex; gap: 9px; padding-left: 18px; height: 35px; }
.steam i { display: block; width: 3px; height: 26px; background: linear-gradient(transparent, #ffe9cf); border-radius: 50%; filter: blur(2px); animation: steam 1.7s ease-in-out infinite; }
.steam i:nth-child(2) { animation-delay: -0.6s; }
.steam i:nth-child(3) { animation-delay: -1.2s; }
.cheers { position: absolute; z-index: 4; inset: 0; pointer-events: none; display: none; }
.cheers.show { display: block; }
.coffee { position: absolute; top: 46%; width: 47px; height: 64px; background: linear-gradient(100deg, #fff9ef, #d9d5d0); border-radius: 4px 4px 12px 12px; box-shadow: 0 8px 30px #090c2844; }
.coffee::before { content: ''; position: absolute; left: -4px; top: -5px; width: 55px; height: 10px; border-radius: 5px 5px 2px 2px; background: #fff8ef; }
.coffee::after { content: '♡'; position: absolute; left: 0; top: 22px; width: 100%; height: 26px; background: #ae8469; text-align: center; line-height: 26px; color: #fff4df; }
.coffee-left { left: calc(50% - 50px); animation: cheers-left 1.6s both; }
.coffee-right { right: calc(50% - 50px); animation: cheers-right 1.6s both; }
.cheers-spark { position: absolute; width: 100px; height: 100px; left: calc(50% - 50px); top: calc(46% - 50px); color: var(--gold); animation: cheers-spark 1.6s both; }
.cheers-spark i { position: absolute; left: 44px; top: 44px; font-style: normal; font-size: 12px; transform: rotate(calc(var(--i) * 45deg)) translateY(-40px); }
.memories-scene { --memory-height: min(62vh, calc(100vh - var(--safe-top) - var(--safe-bottom) - 190px)); --memory-width: min(70vw, 300px, calc((var(--memory-height) - 56px) * 0.75 + 20px)); overflow: hidden; text-align: center; }
@supports (height: 100dvh) {
  .memories-scene { --memory-height: min(62dvh, calc(100dvh - var(--safe-top) - var(--safe-bottom) - 190px)); }
}
.memories-eyebrow { position: absolute; top: calc(var(--safe-top) + 16px); }
.memories-count { position: absolute; top: calc(var(--safe-top) + 46px); right: max(24px, env(safe-area-inset-right)); font-size: 11px; letter-spacing: 0.12em; color: var(--lavender); font-variant-numeric: tabular-nums; }
.memories-stage { position: absolute; top: calc(var(--safe-top) + 56px); bottom: calc(var(--safe-bottom) + 120px); left: 0; right: 0; pointer-events: none; }
.memory-slot { position: absolute; top: 50%; left: 50%; width: var(--memory-width); transform: translate(-50%, -50%); }
.memory-card { position: relative; width: 100%; padding: 10px 10px 46px; background: #fff7e9; box-shadow: 0 8px 25px #050a2445, 0 1px 4px #050a2426; transform: translate(var(--x), var(--y)) rotate(var(--angle)); animation: memory-fall 1300ms cubic-bezier(.2,.8,.3,1) both paused; }
.memory-card.covered { filter: brightness(.82); }
.memory-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.memory-card figcaption { position: absolute; bottom: 5px; left: 10px; right: 10px; height: 36px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; text-overflow: ellipsis; font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 13px; line-height: 18px; color: #3a2e40; }
.memory-slot.retiring { animation: memory-retire 300ms ease both paused; }
.memory-stars { position: absolute; inset: -12px; transform: translate(var(--x), var(--y)) rotate(var(--angle)); color: var(--gold); animation: memory-sparkle 900ms ease-out both paused; }
.memory-stars i { position: absolute; font-style: normal; font-size: 17px; text-shadow: 0 0 12px #ffd98a99; }
.memory-stars i:nth-child(1) { top: 0; left: 16%; }
.memory-stars i:nth-child(2) { top: 5%; right: 3%; }
.memory-stars i:nth-child(3) { top: 49%; right: -4px; }
.memory-stars i:nth-child(4) { bottom: 0; right: 15%; }
.memory-stars i:nth-child(5) { bottom: 8%; left: 0; }
.memory-stars i:nth-child(6) { top: 37%; left: -6px; }
.memories-hint { position: absolute; bottom: calc(var(--safe-bottom) + 58px); color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }
.memories-ending { position: absolute; bottom: calc(var(--safe-bottom) + 28px); left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); display: grid; grid-template-rows: 22px 48px; justify-items: center; gap: 14px; }
.memories-ending p { grid-row: 1; font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 13px; line-height: 22px; color: var(--lavender); }
.memories-ending button { grid-row: 2; }
.memories-ending > * { animation: memory-reveal 600ms ease both paused; }
.cake-scene { text-align: center; }
.cake-scene > .eyebrow { margin-bottom: 28px; font-size: 10px; }
.cake-scene h2 { font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: clamp(19px, 5vw, 25px); letter-spacing: 0.05em; min-height: 64px; }
.cake { display: block; flex-shrink: 0; position: relative; background: transparent; width: 290px; height: 270px; padding: 0; margin: 0 0 28px; }
.cake-halo { position: absolute; inset: 0 -30px -20px; border-radius: 50%; background: radial-gradient(ellipse, #ffbc7820, transparent 65%); transition: opacity 1s; }
.cake.blown .cake-halo { opacity: 0.2; }
.cake-tier { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50% / 15%; box-shadow: inset -14px 0 22px #aa6d7226; }
.cake-tier::before { content: ''; position: absolute; inset: 0 0 auto; height: 28%; background: #fff3db; border-radius: 50%; border-bottom: 2px solid #f8d9ce; }
.tier-top { width: 166px; height: 75px; background: linear-gradient(#ffe8d4, #f5c7c8); top: 117px; z-index: 2; }
.tier-bottom { width: 236px; height: 86px; background: linear-gradient(#ffd6de, #e6a9c1); top: 171px; z-index: 1; }
.cake-tier i { position: absolute; top: 18%; width: 21px; height: 30px; border-radius: 0 0 14px 14px; background: #fff1dc; }
.cake-tier i:nth-child(1) { left: 6%; height: 24px; }
.cake-tier i:nth-child(2) { left: 23%; height: 35px; }
.cake-tier i:nth-child(3) { left: 43%; }
.cake-tier i:nth-child(4) { left: 63%; height: 38px; }
.cake-tier i:nth-child(5) { left: 81%; height: 24px; }
.tier-bottom i:nth-child(6) { left: 14%; height: 36px; }
.tier-bottom i:nth-child(7) { left: 73%; height: 32px; }
.tier-top::after { content: '✧   ♡   ✧'; position: absolute; bottom: 9px; left: 0; width: 100%; color: #bd768b; font-size: 14px; letter-spacing: 9px; }
.cake-plate { position: absolute; width: 277px; height: 32px; border-radius: 50%; background: linear-gradient(#e5d7f0, #9c83b5); bottom: 0; left: 6px; box-shadow: 0 15px 35px #05091f50; }
.candles { position: absolute; top: 68px; left: 50%; transform: translateX(-50%); display: flex; gap: 29px; z-index: 3; }
.candle { position: relative; width: 11px; height: 64px; border-radius: 3px; background: repeating-linear-gradient(30deg, #f8d6e1 0, #f8d6e1 7px, #be8fbd 7px, #be8fbd 11px); }
.candle:nth-child(2) { transform: translateY(-7px); }
.flame { position: absolute; width: 15px; height: 27px; background: radial-gradient(ellipse at 50% 75%, #fffde3 12%, #ffdb80 48%, #ff9d52 75%); border-radius: 60% 40% 50% 50%; left: -2px; top: -30px; box-shadow: 0 0 17px #ffc26b, 0 0 45px #ffb65666; transform-origin: center bottom; animation: flame 1.2s ease-in-out infinite alternate; }
.candle:nth-child(2) .flame { animation-delay: -0.4s; }
.candle:nth-child(3) .flame { animation-delay: -0.8s; }
.candle.out .flame { opacity: 0; transition: opacity 150ms; }
.smoke { opacity: 0; position: absolute; width: 7px; height: 34px; top: -30px; left: 3px; border-radius: 50%; background: linear-gradient(transparent, #eee8ea9c); filter: blur(3px); }
.candle.out .smoke { animation: smoke 1.8s ease-out both; }
.cake-star { position: absolute; color: var(--gold); font-size: 20px; animation: breathe 3s infinite; }
.star-one { top: 79px; left: 14px; }
.star-two { top: 24px; right: 19px; color: var(--lavender); font-size: 28px; animation-delay: -1s; }
.wish-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 100px; }
.wish-controls .tiny { font-size: 10px; letter-spacing: 0; }
.finale-scene { text-align: center; }
.finale-content { width: 100%; max-width: 540px; margin-top: -35px; pointer-events: none; text-shadow: 0 2px 18px var(--night); }
.finale-content .eyebrow { color: #e8d3df; font-size: 10px; margin-bottom: 24px; }
.finale-content h1 { font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: clamp(36px, 10vw, 50px); letter-spacing: 0.14em; margin-left: 0.14em; }
.birthday-name { font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 28px; letter-spacing: 0.28em; margin: 16px 0 0 0.28em; color: var(--gold); text-shadow: 0 0 25px #ffd98a7a, 0 0 70px #ffb6d54d; }
.finale-rule { color: var(--gold); display: flex; gap: 18px; align-items: center; justify-content: center; margin: 28px auto; font-size: 12px; }
.finale-rule::before, .finale-rule::after { content: ''; height: 1px; width: 50px; background: linear-gradient(90deg, transparent, #ffd98a66); }
.finale-rule::after { transform: rotate(180deg); }
#reunion-line, #together-line { font-size: 12px; line-height: 2.4; letter-spacing: 0.06em; color: #e0d2e6; }
.day-count { display: flex; align-items: baseline; justify-content: center; gap: 12px; color: var(--gold); margin: 12px 0 22px; }
.day-count strong { font-size: clamp(66px, 18vw, 88px); font-weight: 200; line-height: 1.2; letter-spacing: 0.025em; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px #ffd98a33; }
.day-count span { font-size: 14px; }
.forever-line { font-family: 'Songti SC', 'STSong', 'Noto Serif SC', serif; font-size: 17px; letter-spacing: 0.08em; color: var(--pink); }
.finale-reveal { opacity: 0; transform: translateY(12px); transition: opacity 1.2s ease, transform 1.2s ease; }
.finale-reveal.visible { opacity: 1; transform: translateY(0); }
.replay { position: absolute; bottom: calc(var(--safe-bottom) + 20px); font-size: 11px; color: #c9b6ff99; }
.finale-tap-hint { position: absolute; bottom: var(--safe-bottom); font-size: 9px; color: #c9b6ff66; letter-spacing: 0.1em; pointer-events: none; }
.is-hidden *, .is-hidden *::before, .is-hidden *::after { animation-play-state: paused !important; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@keyframes breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes blink { to { opacity: 0; } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes memory-fall { 0% { transform: translate(var(--x), -110vh) rotate(var(--start-angle)); } 80% { transform: translate(var(--x), var(--y)) rotate(var(--swing-angle)); } 100% { transform: translate(var(--x), var(--y)) rotate(var(--angle)); } }
@keyframes memory-retire { from { opacity: 1; } to { opacity: 0; } }
@keyframes memory-sparkle { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes memory-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes cup-appear { 0%, 100% { opacity: 0; transform: translateY(15px); } 15%, 85% { opacity: 1; transform: translateY(0); } }
@keyframes steam { 0% { opacity: 0; transform: translate(0, 6px) rotate(10deg); } 40% { opacity: 0.7; } 100% { opacity: 0; transform: translate(5px, -13px) rotate(-15deg); } }
@keyframes cheers-left { 0% { opacity: 0; transform: translateX(-130px) rotate(-20deg); } 40%, 60% { opacity: 1; transform: translateX(3px) rotate(14deg); } 100% { opacity: 0; transform: translateX(-28px) translateY(15px); } }
@keyframes cheers-right { 0% { opacity: 0; transform: translateX(130px) rotate(20deg); } 40%, 60% { opacity: 1; transform: translateX(-3px) rotate(-14deg); } 100% { opacity: 0; transform: translateX(28px) translateY(15px); } }
@keyframes cheers-spark { 0%, 38% { opacity: 0; transform: scale(0.3); } 48% { opacity: 1; } 100% { opacity: 0; transform: scale(1.7) translateY(-20px); } }
@keyframes flame { from { transform: rotate(-7deg) scale(0.94, 1); } to { transform: rotate(7deg) scale(1.05, 0.94); } }
@keyframes smoke { 0% { opacity: 0; } 20% { opacity: 0.6; } 100% { opacity: 0; transform: translate(12px, -70px) scale(2, 1.5); } }
@media (max-height: 720px) {
  .orbit-seal { width: 42px; height: 42px; margin-bottom: 14px; }
  .orbit-seal::after { top: 5px; }
  .recipient { margin-bottom: 11px; }
  .unlock-title { font-size: 25px; line-height: 1.55; margin-bottom: 15px; }
  .passcode-dots { margin-top: 21px; }
  .keypad { gap: 7px 16px; }
  .keypad button { height: 44px; }
  .unlock-footnote { margin-top: 20px; }
  .cake-scene > .eyebrow { margin-bottom: 22px; }
  .cake { margin-bottom: 15px; transform: scale(0.92); height: 270px; margin-top: -15px; }
  .cake-scene h2 { min-height: 52px; }
  .finale-content .eyebrow { margin-bottom: 18px; }
  .finale-rule { margin: 19px auto; }
  .day-count { margin-bottom: 16px; }
}
@media (max-height: 570px) {
  .orbit-seal, .unlock-footnote { display: none; }
  .unlock-title { font-size: 21px; }
  .keypad button { height: 38px; }
  .cake { transform: scale(0.72); margin-top: -40px; margin-bottom: -28px; }
  .cake-scene > .eyebrow { margin-bottom: 15px; }
  .letter-paper { padding: 15px 17px 8px; }
  .birthday-name { font-size: 23px; }
  .finale-content h1 { font-size: 30px; }
  .finale-content .eyebrow { margin-bottom: 10px; }
  .finale-rule { margin: 12px auto; }
  .day-count strong { font-size: 58px; }
  .forever-line { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .breathe, .flame, .cake-star, .steam i { animation: none; }
  .memory-card { animation-name: memory-reveal; animation-duration: 400ms; }
  .memory-stars { display: none; }
  .finale-reveal { transform: none; }
}
.finale-scene { justify-content: flex-start; overflow-y: auto; touch-action: pan-y; }
.finale-content { flex-shrink: 0; margin-top: auto; }
.finale-voice { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; margin-top: 18px; visibility: hidden; }
.finale-voice.visible { visibility: visible; }
.finale-voice .primary-button { font-size: 12px; }
.finale-scene .replay { position: static; flex-shrink: 0; }
.finale-scene .finale-tap-hint { position: static; flex-shrink: 0; margin-bottom: auto; line-height: 14px; }
.voice-overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: var(--safe-top) 20px var(--safe-bottom); background: #080c20c9; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.voice-card { width: min(100%, 390px); max-height: 100%; overflow-y: auto; touch-action: pan-y; padding: 28px 22px 14px; border: 1px solid #c9b6ff40; border-radius: 24px; background: linear-gradient(150deg, #302641ee, #181b37ee); text-align: center; box-shadow: 0 20px 80px #050a2466; }
.voice-card h2 { color: var(--pink); font-family: 'Songti SC', 'STSong', serif; font-size: 21px; }
.voice-status { margin: 18px 0; color: var(--muted); font-size: 13px; line-height: 1.8; min-height: 46px; }
.voice-ring { --progress: 0deg; --level: 1; position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 18px auto; border-radius: 50%; background: conic-gradient(var(--gold) var(--progress), #c9b6ff30 0); transform: scale(var(--level)); box-shadow: 0 0 35px #ffb6d520; }
.voice-ring::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #24223d; }
.voice-symbol { position: relative; color: var(--pink); font-size: 34px; }
.voice-time { font-size: 13px; color: var(--lavender); font-variant-numeric: tabular-nums; min-height: 20px; }
.voice-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.voice-actions .primary-button { width: 100%; margin-top: 8px; }
.record-button { width: 66px; height: 66px; border: 1px solid #ffb6d577; border-radius: 50%; background: #ffb6d51a; color: var(--pink); font-size: 28px; }
.record-button.recording { color: var(--gold); border-color: #ffd98a77; }
.voice-close { margin-top: 12px; }
.voice-card button:disabled, .inbox-panel button:disabled { opacity: 0.45; }
.inbox-scene { padding-top: calc(var(--safe-top) + 12px); }
.inbox-panel { width: min(100%, 560px); max-height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; border: 1px solid #c9b6ff30; border-radius: 22px; padding: 18px; background: #181b37de; }
.inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.inbox-heading h1 { font-family: 'Songti SC', 'STSong', serif; font-size: 23px; color: var(--pink); }
.inbox-panel .muted { line-height: 1.8; font-size: 12px; }
.inbox-message { display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 4px; padding: 12px 0; border-bottom: 1px solid #c9b6ff24; }
.inbox-message-time { grid-column: 1 / -1; color: var(--lavender); font-size: 13px; }
.inbox-message .text-button { padding: 10px; letter-spacing: 0; }
.inbox-surprise { margin-top: 28px; padding-top: 20px; border-top: 1px solid #c9b6ff30; }
.inbox-surprise h2 { font-family: 'Songti SC', 'STSong', serif; font-size: 20px; color: var(--gold); margin-bottom: 12px; }
.inbox-actions { display: flex; flex-direction: column; align-items: stretch; margin-top: 14px; gap: 5px; }
#inbox-exit { display: block; margin: 18px auto 0; }
@media (max-height: 720px) {
  .finale-scene { padding-top: var(--safe-top); }
  .finale-content .eyebrow { margin-bottom: 10px; }
  .finale-rule { margin: 12px auto; }
  .birthday-name { margin-top: 10px; }
  .day-count { margin-top: 4px; margin-bottom: 10px; }
  .finale-voice { margin-top: 12px; }
}
@media (max-height: 570px) {
  .finale-voice { margin-top: 10px; }
  .voice-card { padding-top: 18px; }
  .voice-status { margin: 12px 0; }
}
