:root {
  color-scheme: dark;
  --night: #080709;
  --paper: #fbf8f8;
  --ink: #21171c;
  --rose: #eaa3bd;
  --serif: Georgia, "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

@font-face { font-family: "Long Cang"; src: url("fonts/LongCang-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; overflow-x: hidden; background: var(--night); color: #fff; font-family: var(--sans); }
body.scroll-locked { overflow: hidden; }
button { font: inherit; }
button:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
[hidden] { display: none !important; }
::selection { background: #f2adc7; color: #25131b; }

.eyebrow { display: block; margin: 0; font-size: 10px; letter-spacing: .32em; line-height: 1.6; text-transform: uppercase; }

.asset-gate { min-height: 100svh; display: grid; place-items: center; padding: 40px 24px; background: var(--night); }
.asset-gate__inner { max-width: 560px; }
.asset-gate .eyebrow { color: #ab929b; }
.asset-gate h1 { margin: 32px 0 16px; font: 400 clamp(32px, 6vw, 58px)/1.3 var(--serif); }
.asset-gate p { color: #b8a8ad; line-height: 1.8; }
.asset-gate ul { margin: 24px 0 0; padding-left: 20px; color: #d5c6cb; line-height: 2; }

.opening { position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--night); text-align: center; }
.opening::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background: radial-gradient(circle at 50% 63%, #35252a 0, transparent 38%); }
.opening__content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 36px 20px 48px; transition: opacity .28s ease; }
.opening__date { margin: 0; color: #dfd6d8; font-size: clamp(11px, 1.1vw, 14px); font-weight: 500; letter-spacing: .38em; }
.candle-scene { position: relative; width: 140px; height: min(41vh, 330px); min-height: 250px; margin: 2vh auto 0; opacity: 0; transform: translateY(12px); animation: candle-arrive 1.8s ease 2s both; }
@keyframes candle-arrive { to { opacity: 1; transform: translateY(0); } }
.candle-scene__aura { position: absolute; top: 14px; left: 50%; width: 130px; height: 130px; border-radius: 50%; transform: translateX(-50%); background: #eeb373; filter: blur(47px); opacity: .24; transition: opacity .4s ease; }
.candle-scene__body { position: absolute; left: 50%; bottom: 0; width: 28px; height: 145px; border-radius: 4px 4px 2px 2px; transform: translateX(-50%); background: linear-gradient(90deg, #b7a8a6 0, #f1e9df 24%, #fff7eb 64%, #c9b9b6 100%); box-shadow: 0 14px 25px #0005; }
.candle-scene__body::before { content: ""; position: absolute; top: -4px; left: 0; width: 28px; height: 8px; border-radius: 50%; background: #fff9ec; }
.candle-scene__wick { position: absolute; bottom: 143px; left: 50%; width: 2px; height: 18px; transform: translateX(-50%); background: #4c3d37; }
.candle-scene__flame { position: absolute; bottom: 154px; left: 50%; width: 23px; height: 34px; z-index: 2; transform: translateX(-50%); transform-origin: 50% 100%; border-radius: 55% 45% 54% 46% / 68% 69% 31% 32%; background: radial-gradient(circle at 50% 68%, #fff9db 0 19%, #ffda7b 43%, #f4a35a 74%, #d76543 100%); box-shadow: 0 0 24px #f7bd74aa, 0 0 54px #f7a45455; animation: flame-breathe 2.4s ease-in-out infinite alternate; }
@keyframes flame-breathe { from { transform: translateX(-50%) rotate(-2deg) scale(.94, .97); } to { transform: translateX(-50%) rotate(3deg) scale(1.05, 1.08); } }
.opening.is-ready .candle-scene__flame { animation-duration: .32s; }
.candle-scene__smoke { position: absolute; bottom: 168px; left: 51%; width: 6px; height: 80px; opacity: 0; background: linear-gradient(0deg, #d4c1bd77, transparent); filter: blur(6px); transform: rotate(12deg) translateY(14px); }
.opening.is-out .candle-scene__flame { animation: flame-out .3s ease forwards; }
.opening.is-out .candle-scene__aura { opacity: 0; }
.opening.is-out .candle-scene__smoke { animation: smoke-rise 1.5s ease-out forwards; }
@keyframes flame-out { to { opacity: 0; transform: translate(-100%, -12px) scale(.2); } }
@keyframes smoke-rise { 20% { opacity: .55; } to { opacity: 0; transform: rotate(16deg) translate(10px, -50px); } }
.opening__words { min-height: 135px; opacity: 0; transform: translateY(10px); animation: candle-arrive 1.3s ease 2.35s both; }
.opening.is-ready { user-select: none; -webkit-user-select: none; }
.opening.is-ready:not(.is-surprise) { touch-action: none; }
.opening__words > p { margin: 0 0 24px; color: #eee4e6; font: 400 clamp(26px, 3vw, 35px)/1.4 var(--serif); letter-spacing: .05em; }
.round-button { min-width: 126px; min-height: 48px; padding: 12px 24px; border: 1px solid #bda8ae66; border-radius: 99px; background: #fff0; color: #f7eced; cursor: pointer; transition: background .25s ease, border-color .25s ease; }
.round-button:hover { background: #ffffff12; border-color: #e4cbd3; }
.blow-controls { display: flex; flex-direction: column; align-items: center; }
.hold-button { position: relative; display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid #cbbac066; border-radius: 50%; background: #ffffff08; color: #f6eaed; font-size: 14px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.hold-button__ring { position: absolute; inset: -6px; border: 2px solid transparent; border-radius: 50%; pointer-events: none; }
.hold-button.is-holding .hold-button__ring { border-color: #e2b6c3; animation: hold-progress 1s linear forwards; }
@keyframes hold-progress { from { clip-path: polygon(50% 50%, 50% 0, 50% 0); } to { clip-path: circle(70%); } }
.text-button { margin-top: 19px; padding: 10px 12px; border: 0; background: none; color: #bda9af; font-size: 12px; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.mic-status { min-height: 20px; margin: 10px 0 0; color: #c5b8bc; font-size: 12px; }
.opening__blackout { position: absolute; inset: 0; z-index: 5; opacity: 0; visibility: hidden; background: #000; pointer-events: none; }
.opening.is-blackout .opening__blackout { opacity: 1; visibility: visible; }
.opening.is-surprise .opening__content { opacity: 0; pointer-events: none; }
.surprise { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; visibility: hidden; opacity: 0; overflow: hidden; transition: opacity .4s ease; }
.opening.is-surprise .surprise { visibility: visible; opacity: 1; }
.surprise__fireworks { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.surprise__bloom { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 72%, #b633625d, transparent 55%), radial-gradient(circle at 20% 28%, #ff7fa22b, transparent 43%), #10090e; transition: opacity 1.6s ease; }
.surprise.is-banner .surprise__bloom { opacity: 1; }
.surprise__banner { position: relative; z-index: 4; opacity: 0; transform: translateY(16px) scale(.98); padding: 26px 18px; transition: opacity 1s ease, transform 1.3s ease; }
.surprise.is-banner .surprise__banner { opacity: 1; transform: none; }
.surprise__banner .eyebrow { margin-bottom: 28px; color: #e6c3cf; }
.surprise__banner h1 { margin: 0; font: 400 clamp(72px, 12vw, 184px)/.8 var(--serif); letter-spacing: -.08em; text-shadow: 0 18px 70px #f283ad45; }
.surprise__banner h1 em { color: #f3a6c2; font-weight: 400; }
.surprise__cn { margin: 31px 0 0; color: #fff1f5; font: 400 clamp(24px, 3vw, 39px)/1.2 var(--serif); letter-spacing: .18em; }
.surprise__return { margin: 22px 0 0; color: #e9c7d3; font: 400 clamp(15px, 1.5vw, 19px)/1.5 var(--serif); }
.scroll-cue { position: absolute; bottom: max(26px, env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: #f4dde5; opacity: 0; font-size: 11px; letter-spacing: .2em; cursor: pointer; transition: opacity .7s ease; }
.scroll-cue span:last-child { font-size: 24px; font-weight: 200; animation: cue-drift 2s ease-in-out infinite alternate; }
.surprise.is-scrollable .scroll-cue { opacity: .8; }
@keyframes cue-drift { to { transform: translateY(7px); } }

.wishes { position: relative; overflow: hidden; background: var(--paper); color: var(--ink); }
.wishes__light { position: absolute; inset: 0; pointer-events: none; opacity: .7; background: radial-gradient(ellipse 38vw 25vw at 30% 13%, #f1d1d944, transparent 75%), radial-gradient(ellipse 45vw 35vw at 77% 58%, #efc4d744, transparent 75%); animation: light-drift 32s ease-in-out infinite alternate; }
@keyframes light-drift { to { transform: translate(6%, 3%); } }
.wish-frame { position: relative; display: grid; place-items: center; min-height: 94vh; min-height: 94svh; padding: 100px max(6vw, 24px); text-align: center; }
.wish-frame p { max-width: 900px; margin: 0; font: 400 clamp(33px, 5.3vw, 77px)/1.55 var(--serif); letter-spacing: -.025em; }
.wish-frame--bridge { min-height: 64vh; min-height: 64svh; }
.wish-frame--bridge p { color: #9b5c71; font-size: clamp(28px, 4vw, 55px); }
.wish-frame--last { min-height: 116vh; min-height: 116svh; color: #5e2439; }
.wish-frame--last p { font-size: clamp(36px, 6.4vw, 86px); }

.her { background: #090809; }
.chapter-title { display: grid; place-content: center; min-height: 60vh; min-height: 60svh; padding: 80px 22px; text-align: center; }
.chapter-title .eyebrow { color: #c6acb7; }
.chapter-title h2 { margin: 24px 0 0; font: 400 clamp(43px, 7vw, 94px)/1.12 var(--serif); }
.photo-scene { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px, 3vh, 34px); width: 100%; min-height: 100vh; min-height: 100svh; margin: 0; padding: 55px 28px; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 50% 48%, #251921 0, #0d0b0e 66%); touch-action: pan-y; }
.photo-scene__frame { display: inline-flex; flex: none; align-items: center; justify-content: center; max-width: 100%; padding: clamp(9px, 1.25vw, 17px); border: 1px solid #e5d7d4; background: #f9f5f1; box-shadow: 0 0 0 5px #433039, 0 0 0 6px #a68b95, 0 30px 80px #000a; transform: scale(1); }
.photo-scene__frame img { display: block; width: auto; height: auto; max-width: min(74vw, 1000px); max-height: 72vh; max-height: 72svh; object-fit: contain; }
.photo-scene.is-visible .photo-scene__frame { animation: photo-breathe 23s linear forwards; }
@keyframes photo-breathe { to { transform: scale(1.03); } }
.photo-scene figcaption { max-width: min(800px, 82vw); margin: 0; color: #f7e9ee; font: 400 clamp(25px, 3.5vw, 47px)/1.45 var(--serif); text-align: center; white-space: pre-line; }
.photo-scene.is-note-visible figcaption { opacity: 0; }
.photo-scene__hint { position: relative; z-index: 5; margin: -14px 0 0; padding: 8px 12px; border: 0; background: none; color: #d7bdc7; opacity: .83; font-size: 12px; letter-spacing: .05em; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.photo-scene__note { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 40px 25px; background: #100b0ed9; color: #fff1f5; opacity: 0; pointer-events: none; text-align: center; white-space: pre-line; font: 400 clamp(26px, 4.5vw, 56px)/1.65 var(--serif); transition: opacity .4s ease; }
.photo-scene.is-note-visible .photo-scene__note { opacity: 1; }

.card-section { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 120vh; min-height: 120svh; padding: 100px 24px 110px; background: radial-gradient(circle at 50% 55%, #f5dbe3 0, #fbf5f5 48%, #f3edf0 100%); color: #39242c; text-align: center; }
.card-section__intro .eyebrow { color: #aa6d81; }
.card-section__intro h2 { margin: 17px 0 48px; font: 400 clamp(50px, 7.5vw, 98px)/.96 var(--serif); letter-spacing: -.055em; }
.card-section__intro h2 em { color: #a84b6d; font-weight: 400; }
.card { display: block; width: min(72vw, 370px); height: min(96vw, 480px); padding: 0; border: 0; background: none; cursor: pointer; perspective: 1200px; }
.card:focus-visible { outline-color: #a84b6d; }
.card__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.card.is-open .card__inner { transform: rotateY(180deg); }
.card__face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid #d8b9c6; border-radius: 3px; background: #fffaf8; box-shadow: 0 35px 80px #7a3e5726, 0 3px 6px #7a3e5710; }
.card__face--front::before, .card__face--front::after { content: ""; position: absolute; inset: 14px; border: 1px solid #e8d3da; pointer-events: none; }
.card__face--front::after { inset: 22px; border-color: #f4e8eb; }
.card__line { color: #8f5368; font: 400 clamp(27px, 3.6vw, 39px)/1.5 "Long Cang", "Kaiti SC", cursive; letter-spacing: .06em; }
.card__heart { margin-top: 35px; color: #bd7791; font: 400 32px/1 var(--serif); }
.card__face--back { padding: 24px; transform: rotateY(180deg); }
.card__face--back img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card__letter { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-height: 100%; }
.card__face--back .card__text { display: block; width: 100%; max-height: 100%; overflow-y: auto; white-space: pre-line; color: #5a3444; font: 400 clamp(29px, 3vw, 37px)/1.35 "Long Cang", "Kaiti SC", cursive; text-align: center; }
.card__signature { display: block; align-self: flex-end; max-width: 100%; margin-top: clamp(24px, 4vw, 38px); color: #78465a; font: 400 clamp(17px, 4.4vw, 22px)/1.35 "Long Cang", "Kaiti SC", cursive; white-space: nowrap; }
.card-section__hint { margin: 24px 0 0; color: #9b7885; font-size: 12px; letter-spacing: .1em; }

.you { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 80px 22px; background: #050506; text-align: center; }
.you__invitation { width: 100%; }
.you .eyebrow { color: #ae8d9a; }
.you h2 { margin: 26px auto 60px; font: 400 clamp(37px, 5.5vw, 75px)/1.45 var(--serif); }
.gift-button { display: flex; flex-direction: column; align-items: center; gap: 28px; margin: auto; padding: 0 25px 15px; border: 0; background: none; color: #e5d3d9; cursor: pointer; }
.gift-button__box { position: relative; display: block; width: 115px; height: 90px; background: linear-gradient(145deg, #e6b7c6, #c27691); box-shadow: 0 26px 50px #b6648b27; transition: transform .4s ease; }
.gift-button:hover .gift-button__box { transform: translateY(-5px); }
.gift-button__box::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%); background: #f5e5e9; }
.gift-button__ribbon { position: absolute; top: 42%; left: 0; right: 0; height: 14px; background: #f5e5e9; }
.gift-button__bow { position: absolute; top: -24px; left: 50%; width: 47px; height: 32px; border: 9px solid #f5e5e9; border-radius: 80% 10% 80% 15%; transform: translateX(-82%) rotate(22deg); }
.gift-button__bow::after { content: ""; position: absolute; width: 47px; height: 32px; top: -13px; left: 31px; border: 9px solid #f5e5e9; border-radius: 10% 80% 15% 80%; transform: rotate(-42deg); }
.gift-button__label { font-size: 12px; letter-spacing: .34em; }
.you__player { width: min(100%, 520px, 62svh); }
.you__player video { display: block; width: 100%; aspect-ratio: 1; margin: auto; background: #000; object-fit: contain; }
.you__close { min-height: 44px; margin-top: 20px; padding: 10px 18px; border: 0; background: none; color: #cdbdc3; font-size: 12px; letter-spacing: .12em; cursor: pointer; }
.you__close:hover { color: #fff; }
.you.is-ending .you__player { opacity: 0; }
.video-error { display: grid; place-items: center; gap: 24px; min-height: 280px; color: #eee; }
.video-error p { margin: 0; }
.video-error div { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.video-error button { min-height: 44px; padding: 10px 20px; border: 1px solid #b6a8ad; border-radius: 99px; background: none; color: #fff; cursor: pointer; }
.video-error button:hover { background: #ffffff1b; }

.ending { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 95px 24px 60px; background: #050506; text-align: center; }
.ending__content { width: 100%; }
.ending__line { opacity: 0; transform: translateY(10px); transition: opacity 1s ease, transform 1s ease; }
.ending__line.is-visible { opacity: 1; transform: none; }
.ending h2 { margin: 0; font: 400 clamp(60px, 10vw, 136px)/1 var(--serif); letter-spacing: -.06em; }
.ending p { margin: 28px 0 0; font: 400 clamp(23px, 3.2vw, 42px)/1.65 var(--serif); }
.ending .ending__date { margin-top: 48px; color: #d6b1c0; font: 400 13px/1.4 var(--sans); letter-spacing: .36em; }
.ending .ending__archive { margin-top: 18px; color: #8f7480; font: 400 10px/1.4 var(--sans); letter-spacing: .25em; text-transform: uppercase; }
.ending__heart { display: block; margin: 42px auto 0; padding: 5px 12px; border: 0; background: none; color: #c38ba0; font: 400 20px/1 var(--serif); cursor: pointer; }
.ending .ending__secret { min-height: 36px; margin: 10px 0 0; color: #d6acbc; font: 400 16px/1.6 var(--serif); }

.reveal { opacity: 1; transform: none; }
.motion-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1.2s ease; }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 700px) {
  .opening__content { padding-bottom: 35px; }
  .opening__date { letter-spacing: .27em; }
  .candle-scene { height: 35vh; min-height: 230px; }
  .surprise__banner .eyebrow { font-size: 8px; letter-spacing: .18em; }
  .surprise__banner h1 { font-size: clamp(70px, 18vw, 114px); }
  .wish-frame { padding: 80px 22px; }
  .wish-frame p { font-size: clamp(31px, 8vw, 45px); line-height: 1.6; }
  .wish-frame--bridge p { font-size: clamp(26px, 7vw, 38px); }
  .wish-frame--last p { font-size: clamp(34px, 8.5vw, 48px); }
  .photo-scene { padding: 48px 28px; }
  .photo-scene__frame img { max-width: calc(100vw - 82px); max-height: 68vh; max-height: 68svh; }
  .photo-scene figcaption { font-size: clamp(25px, 6.8vw, 37px); }
  .photo-scene[data-photo="2"] figcaption { max-width: calc(100vw - 28px); font-size: clamp(18px, 4.8vw, 23px); }
  .card { width: min(78vw, 350px); height: min(105vw, 455px); }
  .you h2 { margin-bottom: 72px; }
  .ending h2 { font-size: clamp(58px, 13vw, 84px); }
  .ending p { font-size: clamp(23px, 6vw, 31px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .candle-scene, .opening__words { opacity: 1; transform: none; }
  .motion-ready .reveal { opacity: 1; transform: none; }
  .photo-scene.is-visible .photo-scene__frame { transform: none; }
  .ending__line.is-visible { opacity: 1; }
}
