/* ============ 基础 ============ */
:root {
  --night: #04060e;
  --moon: #f5ecd6;
  --gold: #e9c784;
  --gold-hi: #f6e2b0;
  --text: #f2ebdc;
  --dim: rgba(242, 235, 220, .64);
  --faint: rgba(242, 235, 220, .4);
  --kai: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --pad: 22px;
  --top: calc(var(--sat) + 66px);
  --bot: calc(var(--sab) + 46px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  color: var(--text);
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img { display: block; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: none; }
p { margin: 0; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
}

.ch { display: inline-block; }
.sp { white-space: pre; }
.emo { font-family: var(--emoji); font-size: 1.04em; margin: 0 1px; line-height: 1; vertical-align: -.08em; }

/* ============ 背景 ============ */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-layer { position: absolute; inset: 0; opacity: 0; background-color: var(--night); background-size: cover; background-position: center; }

.bg-night { background: radial-gradient(130% 75% at 88% -8%, #27326c 0%, #121a45 36%, #080c22 66%, #04060e 100%); }
.bg-deep { background: radial-gradient(110% 70% at 50% 42%, #10173a 0%, #070a1d 55%, #030409 100%); }
.bg-ice { background: radial-gradient(130% 75% at 88% -8%, #1f5378 0%, #10294a 38%, #071022 70%, #04060e 100%); }
.bg-rain { background: linear-gradient(180deg, #0f1728 0%, #1b2639 52%, #0a0e18 100%); }
.bg-film { background: radial-gradient(120% 80% at 50% 0%, #2c211a 0%, #140f0c 58%, #07060a 100%); }
.bg-box { background: radial-gradient(100% 62% at 50% 38%, #2b2557 0%, #121034 55%, #05060f 100%); }
.bg-sunset { background: linear-gradient(180deg, #2a2352 0%, #6e3a6e 24%, #c94f6a 48%, #ef8159 70%, #fbbf74 88%, #ffe0a4 100%); }
.bg-river { background: linear-gradient(180deg, rgba(6, 10, 20, .55), rgba(4, 6, 14, .82)), url(../assets/photos/bg-river.jpg) center / cover; }
.bg-hands { background: linear-gradient(180deg, rgba(14, 8, 4, .5), rgba(6, 4, 4, .85)), url(../assets/photos/bg-hands.jpg) center / cover; }
.bg-letter { background: linear-gradient(180deg, rgba(14, 10, 6, .55), rgba(5, 4, 3, .88)), url(../assets/photos/bg-flower.jpg) center / cover; }
.bg-together { background: radial-gradient(120% 70% at 50% 18%, #43357a 0%, #1f1a4d 38%, #0b0a24 70%, #04040e 100%); }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ============ 舞台 ============ */
#frame { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; width: 100%; max-width: 460px; z-index: 2; }
#stage { position: absolute; inset: 0; overflow: hidden; }

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--top) var(--pad) var(--bot);
  visibility: hidden;
}
.body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fit { transform-origin: 50% 50%; }
/* 有标题的页，标题放在顶部月亮和音乐按钮之间那一条 */
.scene.has-ttl { padding-top: calc(var(--sat) + 18px); }

/* 标题 */
.ttl { flex: none; text-align: center; margin: 0 0 14px; }
.ttl-date {
  font-size: 32px; line-height: 1; letter-spacing: .1em; padding-left: .1em;
  color: var(--gold-hi); text-shadow: 0 0 22px rgba(240, 200, 120, .38);
}
.ttl-line { width: 30px; height: 1px; margin: 11px auto 0; background: linear-gradient(90deg, transparent, rgba(233, 199, 132, .9), transparent); }
.ttl-name { margin-top: 9px; font-size: 14px; line-height: 1.2; letter-spacing: .5em; padding-left: .5em; color: var(--dim); }

/* 旁白 */
.cap {
  flex: none;
  margin-top: 14px;
  text-align: center;
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--moon);
  text-shadow: 0 0 16px rgba(245, 236, 214, .25);
}

/* ============ 月亮 ============ */
#moon {
  position: absolute; left: 0; top: 0;
  width: 300px; height: 300px; margin: -150px 0 0 -150px;
  z-index: 5; pointer-events: none; visibility: hidden; opacity: 0;
}
#moon svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.moon-glow {
  position: absolute; inset: -60%; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 242, 210, .62) 0%, rgba(255, 236, 196, .26) 24%, rgba(255, 230, 190, .08) 42%, rgba(255, 230, 190, 0) 62%);
}
#moon-corner { position: absolute; right: 13px; top: calc(var(--sat) + 13px); width: 46px; height: 46px; pointer-events: none; }

/* 音乐按钮 */
#music {
  position: absolute; left: 13px; top: calc(var(--sat) + 16px); z-index: 6;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  visibility: hidden; opacity: 0;
}
#music::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
#music .disc {
  position: relative; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0 17%, #141726 19% 27%, #2c3049 29% 62%, #22253a 64% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  animation: spin 4.5s linear infinite; animation-play-state: paused; opacity: .55;
}
#music.on .disc { animation-play-state: running; opacity: 1; }
#music.ask::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1px solid var(--gold);
  animation: ping 1.6s ease-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* 提示 */
#hint {
  position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 14px); z-index: 6;
  text-align: center; font-size: 12.5px; letter-spacing: .32em; padding-left: .32em;
  color: rgba(242, 235, 220, .46); opacity: 0; pointer-events: none;
}
#hint i { font-style: normal; display: inline-block; margin-left: .2em; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ============ 1 开场 ============ */
.cover-body { align-items: center; justify-content: flex-start; padding-top: 9vh; }
.cover-anchor { width: min(62vw, 34vh, 270px); aspect-ratio: 1 / 1; flex: none; }
@supports not (aspect-ratio: 1 / 1) { .cover-anchor { height: min(62vw, 34vh, 270px); } }
.cover-hint { margin-top: 9vh; text-align: center; }
.cover-hint b { display: block; font-weight: 400; font-size: 19px; letter-spacing: .55em; padding-left: .55em; color: var(--moon); text-shadow: 0 0 18px rgba(245, 236, 214, .4); }
.cover-hint small { display: block; margin-top: 14px; font-size: 12px; letter-spacing: .3em; padding-left: .3em; color: var(--faint); }

/* ============ 2 开头 ============ */
.intro { padding: 0 6px 6vh; }
.intro-name { font-size: 40px; line-height: 1.3; color: var(--gold-hi); text-shadow: 0 0 26px rgba(240, 200, 120, .35); margin-bottom: 22px; }
.intro-line { font-size: 19px; line-height: 2.05; color: var(--moon); }
.intro-gap { height: 22px; }
.intro-sign { margin-top: 34px; text-align: right; font-size: 17px; color: var(--dim); letter-spacing: .08em; }
.intro-sign svg { width: 15px; height: 15px; vertical-align: -1px; margin-left: 4px; overflow: visible; }

/* ============ 聊天 ============ */
.chat { position: relative; flex: 0 1 auto; min-height: 0; overflow: hidden; }
.track { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 2px 0 6px; }
.row { position: relative; display: flex; align-items: flex-start; gap: 9px; }
.row.me { flex-direction: row-reverse; }
.av { width: 35px; height: 35px; flex: none; border-radius: 7px; object-fit: cover; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.av.ghost { visibility: hidden; }
.msg { position: relative; max-width: calc(100% - 90px); }
.bubble {
  position: relative; padding: 8px 12px; border-radius: 8px;
  font: 15.5px/1.48 var(--sans); letter-spacing: .01em; word-break: break-word;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .22);
}
.her .bubble { background: #fbf8f2; color: #1c1d23; }
.me .bubble { background: linear-gradient(135deg, #f8e3b0, #eac27c); color: #2c2110; }
.bubble.tail::before { content: ""; position: absolute; top: 12px; border: 6px solid transparent; }
.her .bubble.tail::before { left: -11px; border-right-color: #fbf8f2; }
.me .bubble.tail::before { right: -11px; border-left-color: #eecb8d; }
.stk { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.typing {
  position: absolute; left: 0; top: 0; height: 39px; padding: 0 13px; border-radius: 8px;
  display: flex; align-items: center; gap: 4px; background: #fbf8f2;
}
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #aaa498; animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-3px); opacity: 1; } }
.time {
  align-self: center; margin: 2px 0; padding: 4px 10px; border-radius: 4px;
  font: 12px/1.3 var(--sans); color: rgba(242, 235, 220, .55); background: rgba(255, 255, 255, .06);
}
.note {
  align-self: center; margin: 4px 0 2px; text-align: center;
  font-size: 17px; line-height: 1.7; color: var(--gold-hi); text-shadow: 0 0 14px rgba(240, 200, 120, .35);
}
/* 照片卡（盲盒页） */
.pcard {
  position: relative; flex: none; align-self: center; width: min(38%, 22vh, 160px);
  margin: 4px 0 16px; padding: 6px 6px 24px; background: #fbfaf5; border-radius: 2px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.pcard img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pcard figcaption { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12.5px; color: #6f665a; }
.tape {
  position: absolute; top: -9px; left: 50%; width: 58px; height: 18px; margin-left: -29px;
  background: rgba(242, 230, 205, .72); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transform: rotate(-4deg);
}
.ring { position: absolute; inset: -8px; border: 1.5px solid var(--gold); border-radius: 6px; opacity: 0; box-shadow: 0 0 18px rgba(233, 199, 132, .5); }

/* 胶片（被记录了） */
.film { position: relative; flex: none; align-self: center; width: min(88%, 44vh, 360px); margin: 0 0 16px; padding: 17px 9px; background: #15110e; border-radius: 3px; box-shadow: 0 14px 36px rgba(0, 0, 0, .55); }
.film::before, .film::after {
  content: ""; position: absolute; left: 7px; right: 7px; height: 8px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, rgba(246, 236, 220, .82) 0 8px, transparent 8px 16px);
}
.film::before { top: 5px; }
.film::after { bottom: 5px; }
.film-frame { position: relative; overflow: hidden; padding-top: 64%; background: #000; }
.film-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-frame .grain { position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stamp-date { position: absolute; right: 10px; bottom: 7px; font: 700 13px/1 var(--mono); letter-spacing: .1em; color: #ff9b3d; text-shadow: 0 0 6px rgba(255, 140, 40, .85); }
.film-tag { position: absolute; left: 12px; bottom: -1px; font: 9px/1 var(--mono); letter-spacing: .2em; color: rgba(255, 170, 80, .65); }

/* ============ 4 计时 + 月历 ============ */
.timer { text-align: center; }
.tm-lead { font-size: 15.5px; color: var(--dim); letter-spacing: .05em; }
.tm-days { margin-top: 12px; line-height: 1; }
.tm-days b { font-weight: 400; font-size: 78px; color: var(--gold-hi); text-shadow: 0 0 34px rgba(240, 200, 120, .4); }
.tm-days span { font-size: 21px; margin-left: 6px; color: var(--moon); }
.tm-hms { margin-top: 12px; font-size: 14px; color: var(--dim); }
.tm-hms b { display: inline-block; min-width: 1.32em; font-weight: 400; font-size: 23px; color: var(--moon); text-align: center; margin: 0 2px; }
.cal { width: 100%; max-width: 330px; margin: 24px auto 0; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head span { font: 11px/1 var(--sans); color: var(--faint); padding-bottom: 8px; }
.cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0 4px; }
.cell svg { width: 17px; height: 17px; overflow: visible; }
.cell i { font: normal 10.5px/1 var(--sans); color: var(--dim); }
.cell.mark i { color: var(--gold); }
.cell.today::before {
  content: ""; position: absolute; inset: 0 3px; border-radius: 9px;
  border: 1px solid rgba(233, 199, 132, .85); box-shadow: 0 0 16px rgba(233, 199, 132, .45), inset 0 0 10px rgba(233, 199, 132, .2);
}
.cell.today i { color: var(--gold-hi); }
.timer .cap { margin-top: 18px; }

/* ============ 5 小票 ============ */
.rc-lead { text-align: center; font-size: 18px; line-height: 1.85; color: var(--moon); margin-bottom: 18px; }
.printer { position: relative; width: min(304px, 92%); margin: 0 auto; }
.slot {
  position: relative; z-index: 2; height: 14px; border-radius: 7px;
  background: linear-gradient(#0a0c16, #2a2e44); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .1);
}
.paper-clip { position: relative; margin: -7px 9px 0; padding-bottom: 16px; overflow: hidden; }
.receipt {
  position: relative; background: #fbf9f3; color: #2b2b2b;
  font: 12.5px/1.66 var(--mono); padding: 20px 15px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}
.receipt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0h12L6 7z' fill='%23fbf9f3'/%3E%3C/svg%3E") repeat-x;
}
.rc-title { text-align: center; font: 16px/1.4 var(--kai); letter-spacing: .32em; padding-left: .32em; }
.rc-meta { text-align: center; font-size: 10.5px; color: #8a857c; letter-spacing: .04em; }
.rc-hr { border-top: 1px dashed #bcb6a9; margin: 7px 0; }
.rc-row { display: flex; align-items: baseline; }
.rc-row .k { white-space: nowrap; }
.rc-row .dots { flex: 1; min-width: 10px; margin: 0 5px; border-bottom: 1px dotted #c9c3b5; transform: translateY(-3px); }
.rc-row .v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-row.sub { color: #858076; padding-left: 1.1em; font-size: 11.5px; }
.rc-row.total { font-size: 14px; font-weight: 700; }
.rc-note { font-size: 10px; color: #9a958b; margin-top: 2px; }
.barcode { display: block; width: 78%; height: 34px; margin: 10px auto 3px; }
.rc-foot { text-align: center; font-size: 10.5px; color: #8a857c; letter-spacing: .14em; }
.rc-stamp {
  position: absolute; right: 10px; bottom: 20px; width: 76px; height: 76px; border-radius: 50%;
  border: 2.5px solid rgba(206, 48, 58, .86); color: rgba(206, 48, 58, .9);
  display: grid; place-items: center; text-align: center;
  font: 19px/1.1 var(--kai); letter-spacing: .1em; opacity: 0;
}
.rc-stamp::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(206, 48, 58, .6); }
.rc-stamp small { display: block; font-size: 9px; letter-spacing: .15em; margin-top: 3px; }
.scribble { position: absolute; left: 30%; font: 13px/1.2 var(--kai); color: #d36a2c; white-space: nowrap; opacity: 0; background: #fbf9f3; padding: 0 4px; }

/* ============ 8 打字发送 ============ */
.composer {
  flex: none; display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; padding: 8px;
  border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.composer .input {
  flex: 1; min-height: 36px; padding: 7px 10px; border-radius: 6px; background: rgba(255, 255, 255, .92);
  font: 15px/1.45 var(--sans); color: #1c1d23; word-break: break-word;
}
.composer .caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: #2a7cf6; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer .send {
  flex: none; height: 36px; padding: 0 13px; border-radius: 6px; display: grid; place-items: center;
  font: 14px/1 var(--sans); color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12);
}
.composer .send.ready { color: #2c2110; background: linear-gradient(135deg, #f8e3b0, #eac27c); }
.glow { position: relative; }
.glow::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(200, 120, 40, 0), rgba(200, 120, 40, .95), rgba(200, 120, 40, 0));
  transform: scaleX(var(--gl, 0)); transform-origin: left;
}

/* ============ 11 那晚 ============ */
.luck-a, .luck-b { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.luck-b { visibility: hidden; }
.duo { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 6%; }
.lcard { position: relative; width: 43%; max-width: 180px; margin: 0; }
.lcard .ph { background: #fbfaf5; padding: 5px 5px 7px; border-radius: 2px; box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
.lcard img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.lcard figcaption { margin-top: 9px; text-align: center; font-size: 13.5px; color: var(--dim); letter-spacing: .05em; }
.lcard.a .ph { transform: rotate(-4deg); }
.lcard.b .ph { transform: rotate(3.5deg); }
.same {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 3;
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
  font-size: 15px; letter-spacing: .2em; padding-left: calc(12px + .2em); color: #2c2110;
  background: linear-gradient(135deg, #fbe7b6, #e9be74); box-shadow: 0 0 22px rgba(240, 200, 120, .6);
}
.mbox { position: absolute; left: 0; top: 0; width: 100%; height: 0; padding-top: 133%; z-index: 2; }
.mbox-in { position: absolute; left: 12%; right: 12%; bottom: 6%; height: 70%; }
.mbox-body {
  position: absolute; inset: 14% 0 0; border-radius: 6px;
  background: linear-gradient(160deg, #6b5fd6 0%, #3e3596 55%, #2a2470 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
  display: grid; place-items: center; overflow: hidden;
}
.mbox-body b { font: 400 46px/1 var(--kai); color: #ffe7ad; text-shadow: 0 0 16px rgba(255, 220, 140, .8); }
.mbox-body::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 18%; margin-left: -9%;
  background: linear-gradient(90deg, #e9c27c, #ffe6aa, #d9a95b); opacity: .9;
}
.mbox-body b { position: relative; }
.mbox-lid {
  position: absolute; left: -6%; right: -6%; top: 2%; height: 20%; border-radius: 5px;
  background: linear-gradient(180deg, #7d72e6, #4a40aa); box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
.mbox-lid::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; margin-left: -8%;
  background: linear-gradient(90deg, #e9c27c, #ffe6aa, #d9a95b);
}
.mbox-rays {
  position: absolute; left: 50%; top: 18%; width: 240%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0;
  background: radial-gradient(circle, rgba(255, 240, 200, .95) 0%, rgba(255, 220, 150, .45) 16%, rgba(255, 210, 140, 0) 48%);
}
.moment {
  display: flex; gap: 10px; margin: 22px auto 0; width: 100%; max-width: 360px; padding: 12px 13px;
  border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
}
.moment img { width: 40px; height: 40px; border-radius: 6px; flex: none; }
.moment .nm { font: 600 14.5px/1.3 var(--sans); color: #9db0e6; }
.moment .tx { margin-top: 3px; font: 15.5px/1.45 var(--sans); color: var(--text); }
.moment .tm { margin-top: 6px; font: 11.5px/1 var(--sans); color: var(--faint); }
.luck-note { margin-top: 12px; text-align: center; font-size: 13.5px; color: var(--faint); letter-spacing: .04em; }
.luck-a .cap { margin-top: 18px; }

.clouds { position: absolute; inset: 0; pointer-events: none; opacity: 0; overflow: hidden; }
.cl { position: absolute; border-radius: 50%; }
.cl.c1 { left: -30%; top: 6%; width: 110%; height: 22%; background: radial-gradient(closest-side, rgba(255, 196, 150, .55), rgba(255, 150, 120, 0)); animation: drift 26s linear infinite; }
.cl.c2 { left: 20%; top: 18%; width: 120%; height: 18%; background: radial-gradient(closest-side, rgba(255, 140, 120, .5), rgba(255, 120, 110, 0)); animation: drift 34s linear infinite reverse; }
.cl.c3 { left: -40%; top: 32%; width: 130%; height: 16%; background: radial-gradient(closest-side, rgba(255, 210, 160, .45), rgba(255, 190, 140, 0)); animation: drift 30s linear infinite; }
@keyframes drift { 0% { transform: translateX(-6%); } 50% { transform: translateX(6%); } 100% { transform: translateX(-6%); } }

/* ============ 12 相册 ============ */
.album { position: relative; flex: 1 1 auto; min-height: 280px; }
.pola {
  position: absolute; left: 50%; top: 48%; margin: 0;
  width: min(60vw, 36vh, 252px); padding: 8px 8px 34px; background: #fbfaf6; border-radius: 2px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .55);
}
.pola .im { overflow: hidden; }
.pola img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }
.pola figcaption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 14px; color: #7d7263; letter-spacing: .1em; }

/* ============ 13 牵手 ============ */
.hands { position: relative; flex: 1 1 auto; min-height: 300px; }
.hph {
  position: absolute; width: min(56vw, 34vh, 236px); padding: 5px; background: #f7f2e7; border-radius: 3px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6);
}
.hph img { width: 100%; aspect-ratio: 911 / 1100; object-fit: cover; }
.hph.h1 { left: 3%; top: 2%; }
.hph.h2 { right: 3%; bottom: 2%; }
.spark { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 236, 196, .9), rgba(255, 220, 160, .3) 30%, rgba(255, 220, 160, 0) 64%); }

/* ============ 14 满月 ============ */
.hero-anchor { position: absolute; left: 50%; top: 36%; width: min(50vw, 30vh, 220px); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); pointer-events: none; }
@supports not (aspect-ratio: 1 / 1) { .hero-anchor { height: min(50vw, 30vh, 220px); } }
.answer {
  position: absolute; left: 0; right: 0; top: calc(36% + min(25vw, 15vh, 110px) + 26px);
  text-align: center; font-size: 52px; line-height: 1.2; letter-spacing: .12em; padding-left: .12em;
  color: #fff4d8; text-shadow: 0 0 22px rgba(255, 236, 190, .75), 0 0 60px rgba(255, 214, 150, .45);
  pointer-events: none;
}
.flash { position: absolute; inset: -20%; background: radial-gradient(circle at 50% 36%, rgba(255, 246, 222, .85), rgba(255, 240, 210, 0) 60%); opacity: 0; pointer-events: none; }

/* ============ 15 信 ============ */
.paper-wrap { position: relative; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.paper {
  position: relative; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  padding: 30px 22px 24px; border-radius: 4px; color: #3f3024;
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(150, 120, 90, .16) 33px 34px) 0 26px / 100% calc(100% - 50px) no-repeat,
    linear-gradient(180deg, #fbf5e8, #f3e9d4);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .55);
}
.paper p { font-size: 17px; line-height: 34px; text-indent: 2em; }
.paper p.hi { text-indent: 0; }
.paper .sign { margin-top: 12px; text-align: right; text-indent: 0; }
.paper .date { text-align: right; text-indent: 0; font-size: 14px; color: #8a7663; }
.flower {
  position: absolute; z-index: 2; top: -16px; right: -6px; width: 84px; padding: 4px 4px 12px; background: #fff;
  transform: rotate(7deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.flower img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.flower .tape { width: 40px; height: 14px; margin-left: -20px; top: -7px; }

/* ============ 16 抬头看我 ============ */
.hz-top { flex: none; text-align: center; font-size: 19px; line-height: 1.9; color: var(--moon); }
.hz-mid { flex: 1 1 auto; min-height: 220px; }
.hz-look {
  flex: none; text-align: center; font-size: 40px; line-height: 1.3; letter-spacing: .3em; padding-left: .3em;
  color: #fff3d6; text-shadow: 0 0 20px rgba(255, 236, 190, .7), 0 0 52px rgba(255, 214, 150, .4);
}
.hz-after {
  position: absolute; left: 50%; bottom: calc(var(--sab) + 6px); transform: translateX(-50%); z-index: 4;
  padding: 12px 18px; font-size: 13px; letter-spacing: .2em; color: rgba(242, 235, 220, .9); opacity: 0; visibility: hidden; white-space: nowrap;
}

/* ============ 17 在一起 ============ */
.tg { align-items: center; text-align: center; }
.tg-moon { width: min(30vw, 18vh, 128px); aspect-ratio: 1 / 1; flex: none; margin-bottom: 30px; }
@supports not (aspect-ratio: 1 / 1) { .tg-moon { height: min(30vw, 18vh, 128px); } }
.tg-lines { font-size: 22px; line-height: 1.9; color: var(--moon); }
.tg-post { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; font-size: 22px; color: var(--gold-hi); text-shadow: 0 0 18px rgba(240, 200, 120, .4); }
.tg-post svg { width: 24px; height: 24px; flex: none; }
.tg-div { width: 120px; height: 1px; margin: 34px auto 0; background: linear-gradient(90deg, transparent, rgba(233, 199, 132, .7), transparent); }
.tg-days { margin-top: 24px; font-size: 15px; letter-spacing: .3em; padding-left: .3em; color: var(--dim); }
.tg-days b { display: inline-block; margin: 0 .25em; font-weight: 400; font-size: 34px; letter-spacing: 0; color: var(--gold-hi); vertical-align: -4px; }
.tg-again {
  margin-top: 34px; padding: 11px 26px; border-radius: 30px; font-size: 14px; letter-spacing: .25em; padding-left: calc(26px + .25em);
  color: var(--moon); border: 1px solid rgba(233, 199, 132, .45); background: rgba(255, 255, 255, .04);
}
.tg-bgm { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 16px); text-align: center; font: 11.5px/1 var(--sans); letter-spacing: .12em; color: var(--faint); }

/* ============ 桌面 ============ */
@media (min-width: 520px) {
  #frame::before, #frame::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .06), transparent); }
  #frame::before { left: 0; }
  #frame::after { right: 0; }
}
/* 矮屏（iPhone SE、小安卓在微信里）收紧一点 */
@media (max-height: 700px) {
  :root { --top: calc(var(--sat) + 62px); --bot: calc(var(--sab) + 38px); }
  .scene.has-ttl { padding-top: calc(var(--sat) + 14px); }
  .ttl { margin-bottom: 10px; }
  .ttl-date { font-size: 28px; }
  .ttl-line { margin-top: 8px; }
  .ttl-name { margin-top: 7px; font-size: 13px; }
  .cap { font-size: 16.5px; line-height: 1.75; margin-top: 10px; }
  .track { gap: 8px; }
  .bubble { padding: 7px 11px; }
  .stk { width: 76px; height: 76px; }
  .pcard { width: min(36%, 19vh, 150px); margin-bottom: 12px; }
  .film { width: min(88%, 38vh, 360px); margin-bottom: 12px; }
}
