@charset "UTF-8";
:root {
  color-scheme: dark;
  --ink: #f4f1ff;
  --serif: Georgia, "Songti SC", "Noto Serif SC", serif;
  --edge: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: calc(78px + env(safe-area-inset-bottom));
  --view-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  background: #020205;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; }
body { width: 100%; min-width: 0; margin: 0; min-height: var(--view-height); overflow-x: hidden; }
main { width: 100%; max-width: var(--view-width, 100%); min-width: 0; margin-inline: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 2px solid #c3e6ff; outline-offset: 4px; }
button:focus:not(:focus-visible) { outline: none; }
.scene h2:focus { outline: none; }
audio { display: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Full-bleed art stays behind a single, safely padded content column. */
.world { position: fixed; inset: 0; z-index: -3; overflow: hidden; background: #020205; }
.world-art { position: absolute; inset: -3%; background: url('./assets/starlit-sky.webp') center 72% / cover no-repeat; transform: scale(1.045); filter: saturate(.85) blur(4px); opacity: 0; transition: transform 2.4s, filter 2.4s, opacity 1.8s; }
.is-opening .world-art { transition: none; }
.world-shade { position: absolute; inset: 0; background: linear-gradient(180deg,#111d4533,#1521440d 62%,#0c143641); }
body[data-state="revealed"] .world-art, body[data-state="wish"] .world-art, body[data-state="after-wish"] .world-art { transform: scale(1); filter: none; opacity: 1; }
#magic-canvas { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* Only replay and music sit at the bottom; stars belong below the wish. */
.player-controls { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 8px; max-width: calc(100% - 32px); }
.icon-button, .sound-toggle { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cadbff26; border-radius: 50%; color: #dbe7fa; background: #13234366; backdrop-filter: blur(8px); font-size: 17px; line-height: 1; opacity: .78; }
.icon-button:hover, .sound-toggle:hover { opacity: 1; }
.player-controls button:disabled { opacity: .3; }
.star-action { display: flex; justify-content: center; margin-top: 18px; }
#more-sparkles { min-height: 44px; padding: 10px 18px; font-size: 12px; color: #e5eaff; background: #182b4e45; border-color: #d7e7ff50; opacity: .92; box-shadow: 0 0 17px #a8d6ff12; }
#more-sparkles:hover { box-shadow: 0 0 23px #abdfff35; }
#sound-bars { display: flex; align-items: center; gap: 2px; height: 13px; }
#sound-bars i { display: block; width: 2px; height: 5px; border-radius: 2px; background: #a7d4fa; }
#sound-bars i:nth-child(2) { height: 12px; }
#sound-bars i:nth-child(3) { height: 8px; }
.audio-playing #sound-bars i { animation: equalizer .8s ease-in-out infinite alternate; }
.audio-playing #sound-bars i:nth-child(2) { animation-delay: -.3s; }
.audio-playing #sound-bars i:nth-child(3) { animation-delay: -.5s; }

/* The entire present and Reborn illustration scales together. */
.gift-stage { position: relative; z-index: 4; isolation: isolate; width: 100%; height: var(--view-height); min-height: 0; padding: var(--safe-top) var(--edge) var(--safe-bottom); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
/* Opaque black curtains conceal both the sky art and its particles on entry. */
.wrapping { position: fixed; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.paper { position: absolute; top: 0; bottom: 0; width: calc(50% + 1px); background-color: #020205; background-image: repeating-linear-gradient(90deg,#020205 0,#08090e 11%,#010103 21%,#05060a 31%); box-shadow: 0 0 28px #000c; will-change: transform; }
.paper-left { left: 0; }
.paper-right { right: 0; }
.gift-scene { position: relative; isolation: isolate; display: block; flex: none; width: min(440px,100%,calc((var(--view-height) - 250px) * 1.2758)); max-width: 100%; height: auto; aspect-ratio: 370 / 290; padding: 0; margin: 0; background: none; border: 0; }
@supports not (aspect-ratio: 1) { .gift-scene:before { content: ""; display: block; padding-top: 78.378%; } }
.scene-glow { position: absolute; left: 28%; bottom: 8%; width: 60%; height: 50%; background: radial-gradient(ellipse,#a4c6ff28,transparent 70%); filter: blur(18px); }
.reborn-host { position: absolute; z-index: 4; left: 2.97%; bottom: 8.28%; width: 62.16%; height: 72.76%; transform-origin: 68% 94%; filter: drop-shadow(0 5px 4px #05101e5c); }
.reborn-host img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; user-select: none; pointer-events: none; }
.host-shadow { position: absolute; z-index: -1; bottom: 1px; left: 23%; width: 49%; height: 9px; border-radius: 50%; filter: blur(4px); background: #070f3666; }
.present { position: absolute; display: block; z-index: 3; right: -.27%; bottom: 0; width: 68.92%; transform-origin: 50% 80%; }
.present-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 9px 8px #060d323c); }
#gift-lid { transform-origin: 72px 158px; will-change: transform; }
#gift-bow { transform-origin: 185px 139px; }
#gift-beams { opacity: 0; mix-blend-mode: screen; }
.little-sparkle { position: absolute; color: #d9d3ff; font-size: 20px; line-height: 1; animation: twinkle 3s ease-in-out infinite; pointer-events: none; }
.sparkle-a { left: 3%; top: 28%; font-size: 15px; }
.sparkle-b { right: 3%; top: 32%; animation-delay: 1s; }
.sparkle-c { left: 52%; top: 14%; font-size: 12px; animation-delay: .6s; }
.gift-invitations { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity .3s,filter .3s; }
.invitation-arrow { fill: none; stroke: #d9eeff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px #8fcaff); transform-box: fill-box; transform-origin: center; animation: arrow-dance 1.8s ease-in-out infinite; --arrow-x: 3px; --arrow-y: 7px; }
.arrow-present { stroke: #efd5ff; animation-delay: -.6s; --arrow-x: -4px; --arrow-y: 8px; filter: drop-shadow(0 0 4px #cab5ff); }
.arrow-side { stroke: #bdeaff; animation-delay: -1.2s; --arrow-x: -7px; --arrow-y: -3px; }
body:not([data-state="waiting"]) .gift-invitations { opacity: 0; filter: blur(5px); }
body:not([data-state="waiting"]) .invitation-arrow { animation-play-state: paused; }
.gift-footer { position: relative; z-index: 5; flex: none; width: 100%; max-width: 320px; min-height: 103px; }
.countdown-slot { height: 58px; display: flex; align-items: flex-start; justify-content: center; }
#gift-countdown { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #c5e5ff77; border-radius: 50%; font: normal 24px/1 Georgia,serif; font-variant-numeric: tabular-nums; color: #edf8ff; box-shadow: 0 0 23px #a1ceff1f; background: #18254b38; }
#gift-countdown.count-final { color: #fff1fa; border-color: #ffe3f8aa; box-shadow: 0 0 24px #e5bdff45; }
.count-tick { animation: count-beat .55s ease-out; }
#gift-status { max-width: 100%; margin: 0 0 12px; padding: 6px 12px; border: 0; background: none; font-size: 12px; line-height: 1.5; letter-spacing: .05em; color: #dfdafa; overflow-wrap: anywhere; }
.reveal-progress { width: 85px; height: 2px; border-radius: 5px; margin: auto; overflow: hidden; background: #ced2fa22; opacity: 0; transition: opacity .5s; }
.reveal-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg,#b3ccff,#f8d3f3); transform: scaleX(0); transform-origin: left; }
.is-opening .reveal-progress { opacity: 1; }
.subtle-button { display: block; max-width: 100%; margin: 9px auto 0; padding: 5px 9px; border: 0; background: none; font-size: 11px; line-height: 1.4; color: #c3cfe9; }
.gift-stage.burst-away { position: absolute; inset: 0; z-index: 10; pointer-events: none; animation: gift-exit .9s cubic-bezier(.3,.7,.2,1) forwards; }

/* A small, centered stack with predictable spacing on every phone. */
.experience { position: relative; z-index: 3; width: 100%; height: var(--view-height); min-width: 0; padding: var(--safe-top) var(--edge) var(--safe-bottom); display: grid; place-items: center; }
.scenes { width: 100%; max-width: 570px; min-width: 0; height: 100%; }
.scene { width: 100%; max-width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: scene-in .65s both; }
.after-wish { position: absolute; inset: 0; padding: var(--safe-top) var(--edge); }
.birthday-greeting { width: 100%; max-width: 100%; min-width: 0; padding-block: 15px; text-align: center; }
#birthday-title { position: relative; width: 100%; margin: 0; font: normal clamp(1.75rem,8.5vw,4.25rem)/1.2 Georgia,serif; letter-spacing: -.035em; color: #faf7ff; }
.title-sheen { display: inline-block; max-width: 100%; margin: 0; padding: 0; font: inherit; letter-spacing: inherit; white-space: normal; overflow-wrap: normal; text-wrap: balance; color: #f6f1ff; animation: title-float 4.8s ease-in-out infinite; text-shadow: 0 0 23px #b1d8ff45; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .title-sheen { color: transparent; background: linear-gradient(110deg,#e9e5ff,#d7ecff 24%,#fff 36%,#fff 41%,#eacfff 51%,#f9f4ff 65%,#d7ecff 81%,#e9e5ff); background-size: 260% 100%; background-clip: text; -webkit-background-clip: text; animation: title-shimmer 5s linear infinite,title-float 4.8s ease-in-out infinite; text-shadow: none; filter: drop-shadow(0 0 8px #b2d7ff55); }
}
#birthday-title:before, #birthday-title:after { content: "✧"; position: absolute; pointer-events: none; font: normal 12px/1 Georgia,serif; color: #d7eeff; animation: title-twinkle 3s ease-in-out infinite; top: -18px; left: 12%; }
#birthday-title:after { left: auto; right: 10%; top: 92%; font-size: 10px; animation-delay: -1.5s; color: #eed7ff; }
.birthday-chinese { width: 100%; max-width: 100%; margin: 16px 0 0; padding-left: .13em; font: normal clamp(1.5rem,6.7vw,2.125rem)/1.4 var(--serif); letter-spacing: .13em; color: #eeeaff; }
.birthday-wish { max-width: 100%; margin: 22px 0 0; font: italic clamp(1.0625rem,4.8vw,1.4375rem)/1.45 Georgia,serif; letter-spacing: .02em; color: #dfe9ff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; max-width: 100%; min-height: 46px; padding: 12px 22px; border: 1px solid #e3e9ff77; border-radius: 28px; font-size: 13px; line-height: 1.4; letter-spacing: .06em; text-align: center; overflow-wrap: anywhere; transition: transform .25s,box-shadow .25s; }
.button.primary { color: #303b5f; background: #f4effaee; box-shadow: 0 4px 22px #03092933,inset 0 1px #ffffff73; }
.button span { flex: none; font-size: 18px; line-height: 1; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #92b8eb30; }
.button:disabled:hover { transform: none; }
.wish-entry { min-width: 142px; margin-top: 25px; }
.reveal { opacity: 0; animation: reveal-in .9s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--delay); }
.r1 { --delay: .18s; } .r2 { --delay: .35s; } .r3 { --delay: .55s; } .r4 { --delay: .85s; } .r5 { --delay: 1.05s; }
.wish h2 { width: 100%; max-width: 100%; margin: 0; font: normal clamp(1.5rem,6.8vw,2.125rem)/1.4 var(--serif); letter-spacing: .025em; overflow-wrap: anywhere; }
.wish-copy { width: 100%; max-width: 100%; margin: 14px 0 0; font: normal 15px/1.7 var(--serif); letter-spacing: .035em; color: #e2e4ff; overflow-wrap: anywhere; }
.candle-button { flex: none; display: block; width: min(230px,70%,calc(var(--view-height) * .31)); max-width: 100%; margin: 8px auto 17px; padding: 0; border: 0; background: none; filter: drop-shadow(0 8px 14px #b7cdfa33); }
.cake { display: block; width: 100%; height: auto; overflow: visible; }
.flame { transform-origin: 170px 82px; animation: flicker 2.1s ease-in-out infinite; }
.smoke { opacity: 0; }
.blown .flame { opacity: 0; transition: opacity .3s; animation: none; }
.blown .smoke { animation: smoke 1.8s ease-out both; }
.noscript { position: fixed; z-index: 50; inset: auto 20px 20px; padding: 16px; background: #192747; border: 1px solid #8ba5dc; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

/* Tiny meme dancers stay in the corners, clear of the central text and taps. */
.dancing-cats, #ambient-sky { position: fixed; inset: 0; width: 100%; height: var(--view-height); z-index: 2; overflow: hidden; pointer-events: none; }
.dancing-cats { z-index: 21; }
body[data-state="waiting"] .dancing-cats, body[data-state="opening"] .dancing-cats { display: none; }
.dance-cat { position: absolute; display: block; width: clamp(48px,17vw,94px); aspect-ratio: 1; filter: drop-shadow(0 3px 6px #07142f66); }
.cat-sprite { display: block; width: 100%; height: 100%; background: url('./assets/yuexin-cats.webp') 0 0 / 200% 200% no-repeat; }
.cat-a { left: max(12px,env(safe-area-inset-left)); --cat-delay: -.12s; }
.cat-b { right: max(14px,env(safe-area-inset-right)); --cat-delay: -.6s; }
.dance-cat.cat-a, .dance-cat.cat-b { top: var(--upper-cat-top,24px); width: var(--upper-cat-size,clamp(48px,17vw,94px)); }
.cat-c { left: max(15px,env(safe-area-inset-left)); bottom: calc(77px + env(safe-area-inset-bottom)); --cat-delay: -.36s; }
.cat-d { right: max(12px,env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); --cat-delay: -.84s; }
.dance-cat.cat-e { left: 50%; top: var(--center-cat-top,75%); width: var(--center-cat-size,60px); margin-left: calc(var(--center-cat-size,60px) * -.5); --cat-delay: -.48s; }
.sanwei-cat { animation: none; }
.sanwei-cat .cat-sprite { background-image: url('./assets/yuexin-original-still.webp'); background-size: contain; background-position: center; animation: none; }
body[data-state="revealed"] .sanwei-cat .cat-sprite, body[data-state="wish"] .sanwei-cat .cat-sprite, body[data-state="after-wish"] .sanwei-cat .cat-sprite { background-image: url('./assets/yuexin-original-dance.gif'); }
body.reduced-effects .sanwei-cat .cat-sprite, body.page-hidden .sanwei-cat .cat-sprite { background-image: url('./assets/yuexin-original-still.webp'); }
.dance-cat.cat-f, .dance-cat.cat-g { top: var(--side-cat-top,45%); width: var(--side-cat-size,54px); }
.cat-f { left: max(12px,env(safe-area-inset-left)); --cat-delay: -.13s; }
.cat-g { right: max(12px,env(safe-area-inset-right)); --cat-delay: -.51s; }
.dance-cat.cat-h { left: 50%; top: var(--upper-cat-top,24px); width: var(--upper-cat-size,60px); margin-left: calc(var(--upper-cat-size,60px) * -.5); --cat-delay: -.32s; }
.sky-twinkle { position: absolute; width: var(--star-size); height: var(--star-size); color: #e3f3ff; animation: sky-twinkle 2.8s ease-in-out both; }
.sky-twinkle:before, .sky-twinkle:after { content: ""; position: absolute; inset: 0; background: currentColor; border-radius: 50%; transform: scaleX(.13); box-shadow: 0 0 8px #bddfff70; }
.sky-twinkle:after { transform: scaleY(.13); }
.ambient-meteor { position: absolute; width: var(--trail-length); height: 2px; border-radius: 100%; transform: rotate(-32deg); transform-origin: left center; background: linear-gradient(90deg,#fff,#aceaffaa 22%,#c6b4ff44 60%,transparent); filter: drop-shadow(0 0 3px #b2dfff); animation: shooting-star 1.8s ease-out both; }
.ambient-meteor:before { content: ""; position: absolute; left: -1px; top: -1px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #c5eeff; }

/* The reveal remains synchronized to the same music impact. */
#impact { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0; overflow: hidden; }
#impact.active { opacity: 1; }
.impact-light { position: absolute; inset: -20%; background: radial-gradient(circle at 50% 52%,#fbfcff 0,#e7f4ff 14%,#bad8ff90 37%,#d3b8ff44 54%,transparent 70%); opacity: 0; }
.impact-ring { position: absolute; left: 50%; top: 50%; width: 15vw; height: 15vw; border: 4px solid #eef5ff; border-radius: 50%; transform: translate(-50%,-50%) scale(.2); opacity: 0; box-shadow: 0 0 70px #b0e0ff,inset 0 0 50px #e0d6ff; }
.speed-lines { position: absolute; inset: -80%; background: repeating-conic-gradient(from 0deg,transparent 0 8deg,#c2e4ff55 8.2deg 8.6deg,transparent 9deg 15deg); mask-image: radial-gradient(circle,transparent 0 20%,#000 33%); opacity: 0; }
#impact.active .impact-light { animation: bloom 1.45s ease-out both; }
#impact.active .impact-ring { animation: shockwave 1.2s ease-out both; }
#impact.active .speed-lines { animation: rush 1.1s ease-out both; }
.comet-streak { position: fixed; z-index: 4; left: 87%; top: 8%; width: min(55vw,460px); height: 3px; background: linear-gradient(90deg,#fff,#92dfffaa 24%,#8facff33 62%,transparent); border-radius: 50%; transform: rotate(-38deg); transform-origin: left center; filter: drop-shadow(0 0 5px #a3e5ff); opacity: 0; pointer-events: none; }
.comet-streak:before { content: ""; position: absolute; left: -2px; top: -1px; width: 7px; height: 5px; background: #fff; border-radius: 50%; box-shadow: 0 0 12px 4px #a8e9ff88,0 0 35px 7px #b1cbff55; }
.comet-streak:after { content: ""; position: absolute; left: 14px; top: 8px; width: 90%; height: 2px; background: linear-gradient(90deg,#f5c8ffcc,#baaaff44,transparent); transform: rotate(2deg); transform-origin: left center; }
.comet-streak.active { animation: comet-pass 2.6s cubic-bezier(.18,.45,.5,1) .15s both; }

@keyframes equalizer { to { height: 3px; } }
@keyframes twinkle { 50% { opacity: .45; transform: scale(.75); } }
@keyframes arrow-dance { 0%,100% { transform: translate(0,0) rotate(-3deg); opacity: .68; } 50% { transform: translate(var(--arrow-x),var(--arrow-y)) rotate(3deg); opacity: 1; } }
@keyframes count-beat { 0% { transform: scale(.83); opacity: .4; } 45% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes title-shimmer { from { background-position: 140% 50%; } to { background-position: -140% 50%; } }
@keyframes title-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes title-twinkle { 0%,100% { opacity: .3; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(35deg); } }
@keyframes flicker { 0%,100% { transform: scaleX(.92) rotate(-2deg); } 45% { transform: scaleX(1.08) scaleY(.96) rotate(2deg); } 70% { transform: scaleX(.94) scaleY(1.06); } }
@keyframes smoke { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-33px); } }
@keyframes scene-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes reveal-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes gift-exit { to { transform: scale(1.35); opacity: 0; filter: blur(7px); } }
@keyframes bloom { 0% { opacity: 0; transform: scale(.15); } 12% { opacity: .96; transform: scale(.85); } 30% { opacity: .82; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes shockwave { 0% { opacity: .9; transform: translate(-50%,-50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(14); } }
@keyframes rush { 0% { opacity: 0; transform: scale(.6) rotate(0); } 15% { opacity: .65; } 100% { opacity: 0; transform: scale(1.4) rotate(10deg); } }
@keyframes comet-pass { 0% { opacity: 0; transform: translate(20vw,-15vh) rotate(-38deg); } 12%,70% { opacity: 1; } 100% { opacity: 0; transform: translate(-125vw,86vh) rotate(-38deg); } }
@keyframes quiet-exit { to { opacity: 0; } }
@keyframes sky-twinkle { 0%,100% { opacity: 0; transform: scale(.3) rotate(0); } 40% { opacity: .85; transform: scale(1) rotate(16deg); } 65% { opacity: .6; transform: scale(.75) rotate(25deg); } }
@keyframes shooting-star { 0% { opacity: 0; transform: translate(0,0) rotate(-32deg); } 12% { opacity: .9; } 70% { opacity: .7; } 100% { opacity: 0; transform: translate(var(--travel-x),var(--travel-y)) rotate(-32deg); } }

@media (max-width: 350px) {
  :root { --edge: max(22px,env(safe-area-inset-left),env(safe-area-inset-right)); }
  .birthday-chinese { margin-top: 13px; }
  .birthday-wish { margin-top: 20px; }
  .wish-entry { margin-top: 23px; }
}
@media (max-height: 560px) {
  :root { --safe-top: max(12px,env(safe-area-inset-top)); --safe-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .birthday-greeting { padding-block: 10px; }
  .birthday-chinese { margin-top: 11px; }
  .birthday-wish { margin-top: 17px; }
  .wish-entry { margin-top: 20px; }
  .star-action { margin-top: 14px; }
  .dance-cat { width: clamp(44px,16vw,65px); }
  .wish-copy { margin-top: 10px; }
  .candle-button { width: min(190px,64%,calc(var(--view-height) * .27)); margin-block: 5px 12px; }
}
@media (max-height: 420px) and (orientation: landscape) {
  .gift-stage { flex-direction: row; gap: 22px; }
  .gift-scene { width: min(290px,50%,calc(var(--view-height) * .66)); }
  .gift-footer { flex: 0 1 180px; min-width: 0; }
  #birthday-title { font-size: 30px; }
  .birthday-chinese { font-size: 22px; margin-top: 8px; }
  .birthday-wish { font-size: 17px; margin-top: 12px; }
  .wish-entry { margin-top: 14px; min-height: 42px; padding-block: 9px; }
  .star-action { margin-top: 12px; }
  #more-sparkles { min-height: 36px; padding-block: 6px; }
  .wish h2 { font-size: 23px; }
  .wish-copy { margin-top: 6px; font-size: 13px; }
  .candle-button { width: calc(var(--view-height) * .27); margin-block: 2px 7px; }
}
.reduced-effects .invitation-arrow, .reduced-effects .little-sparkle, .reduced-effects .flame, .reduced-effects .count-tick, .reduced-effects .title-sheen, .reduced-effects #birthday-title:before, .reduced-effects #birthday-title:after { animation: none; transform: none; }
.reduced-effects .reveal { animation-duration: .3s; animation-delay: 0s; transform: none; }
.reduced-effects #impact, .reduced-effects .comet-streak { display: none; }
.reduced-effects .gift-stage.burst-away { animation: quiet-exit .35s ease-out forwards; }
.reduced-effects .world-art { transition: opacity .3s; transform: none; }
.reduced-effects .dance-cat, .reduced-effects .cat-sprite { animation: none; transform: none; }
.reduced-effects #ambient-sky { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  #impact, #magic-canvas, .comet-streak, .gift-stage.burst-away { display: none; }
}
