/* ================================================================
   欣雨的生日页 · 深夜星空 × 暖金玫瑰
   ================================================================ */
:root {
  --bg0: #0a0912;
  --bg1: #171128;
  --gold: #f2c979;
  --gold-soft: rgba(242, 201, 121, .16);
  --rose: #ff8fab;
  --rose-deep: #e46a8b;
  --ink: #f6efe6;
  --ink-dim: rgba(246, 239, 230, .62);
  --paper: #fdf6e8;
  --card: rgba(255, 255, 255, .055);
  --card-line: rgba(255, 255, 255, .12);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --kai: KaiTi, "Kaiti SC", STKaiti, "楷体", var(--serif);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: radial-gradient(120% 90% at 70% -10%, #241a3e 0%, var(--bg1) 42%, var(--bg0) 100%) fixed;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.center { text-align: center; }

/* ---------- 背景与特效层 ---------- */
#sky { position: fixed; inset: 0; z-index: 0; }
#fx { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
#hearts { position: fixed; inset: 0; z-index: 94; pointer-events: none; overflow: hidden; }
.trail {
  position: absolute; font-size: 14px; will-change: transform, opacity;
  animation: trailUp .9s ease-out forwards; pointer-events: none;
}
@keyframes trailUp {
  from { transform: translate(0, 0) scale(1); opacity: .9; }
  to   { transform: translate(var(--dx, 0), -46px) scale(.4); opacity: 0; }
}

/* ---------- 加载页 ---------- */
#loader {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(80% 60% at 50% 40%, #1b1430 0%, var(--bg0) 70%);
  transition: opacity .8s ease; 
}
#loader.done { opacity: 0; pointer-events: none; }
#loader .beat { font-size: 44px; animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.25); } 40% { transform: scale(.95); } 60% { transform: scale(1.15); } }
#loader p { color: var(--ink-dim); letter-spacing: .2em; font-size: 14px; }
#loader .bar { width: min(52vw, 240px); height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
#loader .bar i { display: block; height: 100%; width: 8%; border-radius: 3px;
  background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width .3s; }

/* ---------- 场景框架 ---------- */
main { position: relative; z-index: 10; height: 100vh; height: 100dvh; }
.scene {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 22px 18px;
  opacity: 0; transform: translateY(26px) scale(.99); pointer-events: none;
  transition: opacity .75s ease, transform .75s ease;
}
.scene.active { opacity: 1; transform: none; pointer-events: auto; }
.sc-scroll { width: 100%; max-width: 1060px; height: 100%; overflow-y: auto;
  overscroll-behavior: contain; padding: 10px 4px 40px; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent; }
.sc-scroll::-webkit-scrollbar { width: 5px; }
.sc-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
.sc-title { text-align: center; font-size: clamp(22px, 4.6vw, 32px); letter-spacing: .12em;
  font-weight: 600; margin: 14px 0 8px; text-shadow: 0 2px 22px rgba(242,201,121,.25); }
.sc-title::after { content: ''; display: block; width: 54px; height: 2px; margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- 通用组件 ---------- */
.glass { background: var(--card); border: 1px solid var(--card-line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 16px; }
.btn {
  border: none; border-radius: 999px; padding: 12px 26px; font-size: 15.5px;
  letter-spacing: .12em; transition: transform .25s, box-shadow .25s, opacity .25s;
}
.btn.primary {
  color: #3a2413; font-weight: 700;
  background: linear-gradient(135deg, #ffe3ae, var(--gold) 55%, #e9a95c);
  box-shadow: 0 8px 26px rgba(242, 201, 121, .3);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(242,201,121,.42); }
.btn.ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--card-line); }
.btn.ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.3); }
.btn:active { transform: scale(.97); }

/* ---------- 音乐按钮 / 导航点 ---------- */
#musicToggle {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 120;
  width: 42px; height: 42px; border-radius: 50%; font-size: 17px; color: var(--gold);
  background: var(--card); border: 1px solid var(--card-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
#musicToggle.playing { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#musicToggle.muted { color: var(--ink-dim); animation: none; }
#dots { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 110;
  display: flex; flex-direction: column; gap: 12px; }
#dots button { width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,.22); transition: all .3s; position: relative; }
#dots button.on { background: var(--gold); box-shadow: 0 0 10px rgba(242,201,121,.8); transform: scale(1.35); }
#dots button:hover::after {
  content: attr(data-tip); position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 12px; color: var(--ink-dim);
  background: rgba(10,9,18,.85); border: 1px solid var(--card-line); padding: 4px 10px; border-radius: 8px;
}

/* ================= ① 封面 ================= */
#sc-cover { gap: 20px; }
.cover-date { color: var(--ink-dim); font-size: 14px; letter-spacing: .28em; }
.cover-days { color: var(--gold); font-weight: 700; }
.env-wrap { perspective: 1100px; margin-top: 6px; }
.env {
  position: relative; width: min(78vw, 330px); aspect-ratio: 10 / 7; cursor: pointer;
  filter: drop-shadow(0 24px 44px rgba(0,0,0,.55)); transition: transform .45s ease;
}
.env:hover { transform: translateY(-4px) scale(1.02); }
.env-body { position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(160deg, #f3ddc0, #e7c295 70%, #dcb27f); z-index: 2;
  box-shadow: inset 0 -14px 26px rgba(150, 100, 40, .18); }
.env-paper { position: absolute; left: 5%; right: 5%; top: 8%; bottom: 10%;
  background: var(--paper); border-radius: 6px; z-index: 1; padding: 14px 16px;
  transition: transform .9s cubic-bezier(.5,.05,.3,1); box-shadow: 0 4px 18px rgba(0,0,0,.2); }
.env-paper-line { display: block; height: 5px; border-radius: 3px; margin: 12px 0;
  background: rgba(190, 160, 120, .4); }
.env-paper-line.w60 { width: 60%; } .env-paper-line.w80 { width: 80%; } .env-paper-line.w40 { width: 40%; }
.env-pocket { position: absolute; inset: 0; z-index: 3; border-radius: 12px; overflow: hidden; pointer-events: none; }
.env-pocket::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(200deg, #f6e3c8 0%, #e9c79b 55%, #dfb686 100%);
  clip-path: polygon(0 42%, 50% 88%, 100% 42%, 100% 100%, 0 100%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 4;
  background: linear-gradient(180deg, #f0d6b2, #e4bd8d);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top center;
  transition: transform .9s cubic-bezier(.55,.06,.28,1), z-index 0s .45s;
  border-radius: 12px 12px 0 0; }
.env.open .env-flap { transform: rotateX(-178deg); z-index: 1; }
.env.open .env-paper { transform: translateY(-64%); z-index: 2; }
.env-seal { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; color: #fff; background: radial-gradient(circle at 35% 30%, #ff9db6, var(--rose-deep) 70%);
  box-shadow: 0 4px 14px rgba(228, 106, 139, .55); transition: opacity .4s, transform .4s;
  animation: sealPulse 2.2s ease-in-out infinite; }
@keyframes sealPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,143,171,.5);} 55% { box-shadow: 0 0 0 16px rgba(255,143,171,0);} }
.env.open .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
.env-tag { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); z-index: 6;
  font-family: var(--kai); font-size: 19px; color: #6b4a23; letter-spacing: .3em; text-indent: .3em; }
.cover-hint { color: var(--gold); letter-spacing: .3em; font-size: 15px; animation: hintFloat 1.8s ease-in-out infinite; }
@keyframes hintFloat { 0%,100% { transform: translateY(0); opacity: .85; } 50% { transform: translateY(6px); opacity: 1; } }
.cover-sub { color: var(--ink-dim); font-size: 13px; letter-spacing: .18em; }

/* ================= ② 信 ================= */
#sc-letter { padding-top: max(14px, env(safe-area-inset-top)); }
.paper-wrap { width: min(94vw, 620px); display: flex; flex-direction: column; align-items: center; gap: 16px; max-height: 100dvh; }
.paper {
  position: relative; width: 100%; background: var(--paper); color: #4a3a28;
  border-radius: 10px; padding: 26px 26px 30px; box-shadow: var(--shadow);
  font-family: var(--kai); font-size: clamp(16.5px, 2.6vw, 19.5px); line-height: 2.05;
  letter-spacing: .06em; transform: rotate(-.6deg);
  max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px);
  overflow-y: auto; scrollbar-width: thin;
}
.paper::before, .paper::after {
  content: ''; position: absolute; top: -12px; width: 92px; height: 26px;
  background: rgba(255, 205, 178, .65); transform: rotate(-4deg); border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.paper::before { left: 9%; } .paper::after { right: 9%; transform: rotate(5deg); }
.paper-head { text-align: center; margin-bottom: 14px; letter-spacing: .3em; color: #b0603f; }
.paper-head h2 { display: inline-block; font-size: 19px; margin: 0 10px; font-weight: 700; }
.paper-body p { margin-bottom: .9em; }
.paper-body .indent { text-indent: 2em; }
.paper-sign { text-align: right; color: #8a6a48; margin-top: 10px; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: #c78d5e;
  vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.letter-actions { display: flex; gap: 14px; }

/* ================= ③ 时光轴 ================= */
#sc-time .counter { width: min(92vw, 560px); padding: 22px 26px; text-align: center; margin-top: 12px; }
.counter-days b { font-size: clamp(52px, 13vw, 84px); font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 34px rgba(242,201,121,.35); }
.counter-days span { font-size: 20px; margin-left: 8px; color: var(--ink-dim); }
.counter-hms { margin-top: 6px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.counter-hms span { font-size: 17px; letter-spacing: .14em; }
.counter-hms small { display: block; margin-top: 4px; font-size: 12px; opacity: .75; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 18px 0 6px; }
.chip { padding: 12px 18px; min-width: 108px; text-align: center; }
.chip b { display: block; font-size: 24px; color: var(--rose); }
.chip span { font-size: 12.5px; color: var(--ink-dim); letter-spacing: .1em; }
.miles { position: relative; width: min(92vw, 640px); margin: 26px auto 10px; padding-left: 26px; }
.miles::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--rose), rgba(255,255,255,.06)); }
.mile { position: relative; margin-bottom: 16px; padding: 14px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--card-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateX(-18px); transition: opacity .6s, transform .6s; }
.mile.show { opacity: 1; transform: none; }
.mile::before { content: ''; position: absolute; left: -24px; top: 50%; transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(242,201,121,.9); }
.mile .m-d { font-size: 12.5px; color: var(--ink-dim); letter-spacing: .16em; }
.mile .m-t { font-size: 17px; margin-top: 3px; }
.mile.today { border-color: rgba(255,143,171,.55); box-shadow: 0 0 24px rgba(255,143,171,.18) inset; }
.mile.today .m-t { color: var(--rose); font-weight: 700; }
#sc-time .center { margin-top: 20px; }

/* ================= ④ 相册 ================= */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  position: sticky; top: 0; z-index: 5; padding: 12px 0 14px; margin: 0 0 6px;
  background: linear-gradient(180deg, rgba(13,11,22,.92) 55%, transparent); }
.tab { border: 1px solid var(--card-line); background: rgba(255,255,255,.05); color: var(--ink-dim);
  border-radius: 999px; padding: 8px 18px; font-size: 14px; letter-spacing: .1em; transition: all .25s; }
.tab.on { color: #3a2413; font-weight: 700; background: linear-gradient(135deg, #ffe3ae, var(--gold)); border-color: transparent; }
.wall { columns: 240px; column-gap: 20px; padding-bottom: 8px; }
.pol {
  break-inside: avoid; margin: 0 0 20px; background: #fffdf8; padding: 10px 10px 12px;
  border-radius: 4px; box-shadow: 0 10px 26px rgba(0,0,0,.42); cursor: zoom-in;
  transform: rotate(var(--r, 0deg)); transition: transform .35s ease, box-shadow .35s ease;
  opacity: 0; translate: 0 22px; animation: polIn .7s ease forwards; animation-delay: var(--d, 0s);
  position: relative;
}
@keyframes polIn { to { opacity: 1; translate: 0 0; } }
.pol:hover { transform: rotate(0deg) scale(1.035); box-shadow: 0 18px 44px rgba(0,0,0,.55); z-index: 3; }
.pol::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(var(--tr, -3deg));
  width: 74px; height: 22px; background: rgba(255, 220, 190, .55); border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.pol img { width: 100%; border-radius: 2px; }
.pol .p-cap { font-family: var(--kai); color: #5d4a33; font-size: 15px; padding: 9px 2px 0; }
.pol .p-t { color: #b09a7d; font-size: 11.5px; padding: 2px 2px 0; letter-spacing: .12em; }
.pol .p-badge { position: absolute; top: 14px; right: 16px; z-index: 2; width: 40px; height: 40px;
  border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff;
  background: rgba(20, 14, 26, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.35); }
.end-gap { margin: 26px 0 10px; }

/* ---------- 灯箱 ---------- */
#lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 4, 10, .93);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-stage { max-width: min(92vw, 900px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
#lbImg, #lbVideo { max-width: min(92vw, 880px); max-height: 74dvh; border-radius: 8px;
  box-shadow: 0 26px 70px rgba(0,0,0,.7); animation: lbIn .35s ease; }
@keyframes lbIn { from { transform: scale(.94); opacity: 0; } }
#lbCap { color: var(--ink); font-family: var(--kai); font-size: 17px; letter-spacing: .1em; text-align: center; }
#lbCap small { display: block; color: var(--ink-dim); font-size: 12px; margin-top: 4px; letter-spacing: .2em; }
.lb-close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--card-line); background: rgba(255,255,255,.07);
  color: var(--ink); font-size: 17px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 76px;
  border: none; background: transparent; color: var(--ink-dim); font-size: 40px; }
.lb-nav:hover { color: #fff; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }

/* ================= ⑤ 蛋糕 ================= */
#sc-cake { gap: 4px; }
.cake-sub { color: var(--ink-dim); font-size: 14.5px; letter-spacing: .12em; margin-bottom: 8px; }
.cake-sub b { color: var(--gold); font-size: 17px; }
.cake-stage { position: relative; display: flex; align-items: flex-end; justify-content: center;
  height: min(46vh, 360px); height: min(46dvh, 360px); width: 100%; }
.glowfloor { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%);
  width: min(72vw, 420px); height: 60px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 170, 90, .18), transparent 70%);
  filter: blur(6px); transition: opacity 1s; }
.cake { position: relative; width: min(70vw, 330px); display: flex; flex-direction: column; align-items: center; }
.plate { width: 108%; height: 24px; border-radius: 50%; margin-top: -6px;
  background: linear-gradient(180deg, #efeaf8, #b9b0d6 70%, #968cc0);
  box-shadow: 0 16px 30px rgba(0,0,0,.5); }
.tier { position: relative; border-radius: 16px 16px 10px 10px;
  box-shadow: inset 0 -12px 22px rgba(120, 40, 70, .18), 0 6px 16px rgba(0,0,0,.25); }
.tier .icing { position: absolute; top: 0; left: 0; right: 0; height: 40%; min-height: 26px;
  border-radius: 16px 16px 0 0; background: #fff7ef; }
.tier .icing::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 14px;
  background: radial-gradient(circle at 11px -7px, #fff7ef 13px, transparent 14px);
  background-size: 24px 16px; background-repeat: repeat-x; }
.tier .dots { position: absolute; inset: 40% 12% 14% 12%;
  background-image: radial-gradient(circle at 30% 40%, rgba(255,255,255,.5) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.4) 0 2.6px, transparent 4px);
  background-size: 34px 30px; }
.t1 { width: 100%; height: 84px; background: linear-gradient(180deg, #ffd9e2, #f3a7bb); z-index: 2; }
.t2 { width: 78%; height: 70px; background: linear-gradient(180deg, #ffe7cf, #f5c393); z-index: 1; }
.candles { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; margin-bottom: -6px; height: 112px; }
.candle-row { display: flex; align-items: flex-end; gap: 6px; }
.candle-row.back { margin-bottom: 5px; }   /* 后排略高，前排贴住蛋糕 */
.candle { position: relative; width: 9px; border-radius: 3px 3px 2px 2px; cursor: pointer;
  background: repeating-linear-gradient(-45deg, #ff9db4 0 5px, #fff 5px 10px);
  box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.candle::before { content: ''; position: absolute; inset: -16px -7px; }  /* 扩大手机触控区 */
.candle::after { content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 7px; background: #6b4a2a; }
.flame { position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 20px; transform-origin: 50% 100%;
  background: radial-gradient(circle at 50% 72%, #fff8c9 0 26%, #ffc84d 48%, #ff8a2a 68%, rgba(255,120,40,0) 74%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  filter: drop-shadow(0 0 10px rgba(255, 170, 60, .75));
  animation: flick .16s ease-in-out infinite alternate; transition: opacity .35s, transform .35s; }
@keyframes flick { from { transform: translateX(-50%) scale(1) rotate(-2deg); }
  to { transform: translateX(-52%) scale(.92, 1.08) rotate(2.5deg); } }
.candle.out .flame { opacity: 0; transform: translateX(-50%) scale(.2); pointer-events: none; }
.smoke { position: absolute; top: -34px; left: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(200, 200, 210, .5); filter: blur(3px); pointer-events: none;
  animation: smokeUp 1.2s ease-out forwards; }
@keyframes smokeUp { to { transform: translate(-6px, -46px) scale(2.4); opacity: 0; } }
.cake-banner { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: radial-gradient(60% 50% at 50% 45%, rgba(30, 18, 40, .78), rgba(10, 9, 18, .92));
  animation: fadeIn .8s ease; }
.cb-happy { font-size: clamp(30px, 7.4vw, 52px); font-weight: 800; letter-spacing: .1em;
  background: linear-gradient(120deg, #ffd98e, #ff9db4 55%, #c9a1ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: popIn .7s cubic-bezier(.3,1.6,.5,1) both; }
.cb-name { font-size: clamp(24px, 6vw, 40px); letter-spacing: .5em; text-indent: .5em; color: var(--ink);
  font-weight: 700; animation: popIn .7s .15s cubic-bezier(.3,1.6,.5,1) both; }
.cb-sub { color: var(--ink-dim); letter-spacing: .24em; animation: popIn .7s .3s both; }
.cb-sub + .btn { margin-top: 14px; animation: popIn .7s .45s both; }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } }

/* ================= ⑥ 许愿灯 ================= */
#sc-wish { justify-content: center; }
.wish-box { width: min(92vw, 520px); text-align: center; }
.wish-sub { color: var(--ink-dim); font-size: 14px; margin-bottom: 22px; }
.wish-sub b { color: var(--gold); }
.wish-row { display: flex; gap: 12px; justify-content: center; }
#wishInput { flex: 1; min-width: 0; max-width: 340px; border-radius: 999px; border: 1px solid var(--card-line);
  background: var(--card); color: var(--ink); padding: 13px 20px; font-size: 15.5px;
  font-family: var(--kai); letter-spacing: .05em; outline: none; transition: border .3s, box-shadow .3s; }
#wishInput:focus { border-color: rgba(242,201,121,.6); box-shadow: 0 0 0 4px rgba(242,201,121,.12); }
#wishInput::placeholder { color: rgba(246,239,230,.35); }
.wish-tip { margin-top: 16px; color: var(--gold); font-size: 14.5px; letter-spacing: .1em;
  animation: hintFloat 2s ease-in-out infinite; }
.wish-box .center { margin-top: 30px; }
.lantern { position: fixed; z-index: 96; width: 54px; height: 74px; pointer-events: none;
  border-radius: 50% 50% 46% 46% / 38% 38% 62% 62%;
  background: radial-gradient(circle at 50% 36%, #ffedbe 0 22%, #ffc46b 52%, #ef7f33 88%);
  box-shadow: 0 0 38px 12px rgba(255, 165, 70, .3), inset -6px -8px 18px rgba(200, 80, 20, .35);
  animation: lanternIn .5s ease; }
.lantern::before { content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 8px; border-radius: 3px; background: #b56a2c; }
.lantern::after { content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 12px; border-radius: 2px; background: #ffd98e; box-shadow: 0 12px 0 -1px #ff9b52; }
.lantern .lt { position: absolute; top: 84%; left: 50%; transform: translateX(-50%) rotate(2deg);
  white-space: nowrap; font-family: var(--kai); font-size: 13.5px; color: #ffe9c9;
  text-shadow: 0 0 8px rgba(0,0,0,.6); }
@keyframes lanternIn { from { transform: translateY(30px); opacity: 0; } }

/* ================= ⑦ 尾声 ================= */
.final-box { text-align: center; }
.f-line { font-size: clamp(21px, 5vw, 30px); letter-spacing: .3em; margin: 12px 0;
  opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.f-line.accent { color: var(--rose); font-weight: 700; }
.f-line.show { opacity: 1; transform: none; }
.f-sign { margin-top: 30px; color: var(--ink-dim); line-height: 2; letter-spacing: .2em; }
.f-sign small { font-size: 12.5px; }
.f-actions { margin-top: 34px; }
.f-egg { margin-top: 26px; font-size: 12px; color: rgba(246,239,230,.32); letter-spacing: .16em; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 640px) {
  .scene { padding: 16px 12px; }
  .wall { columns: 150px; column-gap: 12px; }
  .pol { margin-bottom: 12px; padding: 7px 7px 9px; }
  .pol .p-cap { font-size: 13px; }
  .pol .p-badge { width: 32px; height: 32px; font-size: 13px; }
  .chips { gap: 8px; } .chip { min-width: 88px; padding: 10px 10px; }
  .candle-row { gap: 5px; }
  .candle { width: 8px; }
  #wishInput { font-size: 16px; }   /* 防 iOS 聚焦自动放大 */
  .lb-nav { font-size: 32px; width: 38px; }
  #dots { right: 7px; gap: 11px; }
  #dots button { width: 12px; height: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .15s !important; }
}
