/* 主画面坐标系：#stage 恒为 9:16，所有场景元素用百分比定位在其中 */
:root {
  --scene-ratio: 0.5625; /* 9 / 16 */
  --sky: #e8b9b4;
  --snow: #e9e7ee;
  --window-light-core: rgba(255, 228, 165, .62);
  --window-light-mid: rgba(255, 214, 140, .34);
  --window-light-edge: rgba(255, 214, 140, .14);
  --window-light-fill: radial-gradient(closest-side, var(--window-light-core), var(--window-light-mid) 65%, var(--window-light-edge));
  --window-light-shadow: 0 0 8px 2px rgba(255, 206, 120, .5), 0 0 20px 6px rgba(255, 186, 96, .18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--sky);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

@media (max-aspect-ratio: 9/16) {
  .backdrop { display: none; }
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* 无图时的兜底：上天空、下雪地 */
  background: linear-gradient(to bottom, var(--sky) 0%, var(--sky) 45%, var(--snow) 55%, var(--snow) 100%);
}

/* 垫底层：同一张图放大铺满并模糊，填补主画面之外的空余 */
.backdrop {
  position: absolute;
  inset: -6%;
  background: url("../assets/scene/base.jpg") center bottom / cover no-repeat;
  filter: blur(28px) saturate(1.05);
  transform: translateZ(0);
}

/* 主画面：contain 居中。手机竖屏按宽铺满，宽屏按高铺满 */
#stage {
  container-type: inline-size;
  position: absolute;
  left: 50%;
  top: 0; /* 贴顶：手机上多出的高度全部落在底部雪地，留给日期条与饰品栏 */
  width: min(100vw, 100dvh * var(--scene-ratio));
  aspect-ratio: 9 / 16;
  transform: translateX(-50%);
  /* 左右羽化（宽屏时两侧有空余） */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
}
@supports not (height: 1dvh) {
  #stage { width: min(100vw, 100vh * var(--scene-ratio)); }
}
/* 手机按宽铺满时左右无空余，不羽化 */
@media (max-aspect-ratio: 9/16) {
  #stage { -webkit-mask-image: none; mask-image: none; }
}

.scene {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* 手机屏比 9:16 更长时，主画面下方接一张上下镜像的同图：
   紧贴底边的是雪地，镜像后与原图底边像素连续，无接缝；再往下淡出到雪色 */
.scene-reflect {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 100%;
  transform: scaleY(-1);
  pointer-events: none;
  /* 遮罩在原图坐标系生效：只保留原图 80% 以下的纯雪地（树干、路灯底座约在 73% 处），再往上渐隐 */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 83%, #000 93%);
          mask-image: linear-gradient(to bottom, transparent 0, transparent 83%, #000 93%);
}
@media (min-aspect-ratio: 9/16) {
  .scene-reflect { display: none; }
}

#layer-windows {
  position: absolute;
  inset: 0;
}

/* 窗户热区：透明按钮，按百分比定位在 #stage 内 */
.win-hit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.win-hit:focus-visible { outline: 2px solid #fff6d8; outline-offset: -2px; }

/* dev：热区填色 + 窗框描边与日期 */
.dev .win-hit { background: rgba(0, 200, 255, .18); outline: 1px dashed rgba(0, 120, 255, .8); outline-offset: -1px; }
.win-frame-dev {
  position: absolute;
  pointer-events: none;
  border: 1.5px solid #ff2fbf;
  color: #fff;
  font: 700 11px/1 system-ui, sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
  text-shadow: 0 0 3px #000, 0 0 2px #000;
}

/* 积雪画布：与主画面同坐标；飘雪画布：全屏最上层 */
.snow-accum { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.snow-fall { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ---------- 窗户三态（第 4 卡） ---------- */
.win-glass { position: absolute; pointer-events: none; transform-origin: 50% 100%; }
.win-glass > i {
  position: absolute;
  left: 17%; right: 17%; top: 14%; bottom: 17%;
  border-radius: 1px;
  transition: background .6s, box-shadow .6s, opacity .6s;
}
/* 未到：保持原画，不加任何效果（Ting 11-16 定） */
.win-glass[data-state="locked"] > i { background: none; }
/* 可开与已开窗沿用点灯后的柔光，不叠加日常的大光晕。 */
.win-glass:is([data-state="ready"], [data-state="today"], [data-state="opened"]) > i {
  background: var(--window-light-fill);
  box-shadow: var(--window-light-shadow);
  animation: none;
}
.win-glass[data-state="today"] { animation: wobble 2.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes wobble {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-2deg); }
  82% { transform: rotate(2deg); }
  88% { transform: rotate(-1deg); }
  94% { transform: rotate(.6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .win-glass, .win-glass > i { animation: none !important; }
}

/* ---------- 轻提示 ---------- */
#toast {
  position: absolute;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(70, 50, 60, .72);
  color: #fff;
  font: 14px/1.3 "PingFang SC", system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 7;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 窗上日期：字号随主画面宽度缩放（cqw），老虎窗略小 */
.win-glass > b {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-55%);
  text-align: center;
  font: 700 11px/1 "Georgia", "Songti SC", serif;
  font-size: 3.2cqw;
  color: #fff8ec;
  text-shadow: 0 0 2px rgba(90, 60, 50, .9), 0 0 6px rgba(90, 60, 50, .5);
  letter-spacing: -.02em;
}
.win-glass[data-state="locked"] > b { opacity: .88; }
.win-glass[data-state="today"] > b,
.win-glass[data-state="opened"] > b { color: #fff; text-shadow: 0 0 3px rgba(40, 40, 70, .9); }
/* 老虎窗窄：数字缩小，避免两位数溢出窗框 */
.win-glass[data-kind="dormer"] > b { font-size: 2.3cqw; letter-spacing: -.06em; }

/* ---------- 镜头 ---------- */
#cam { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }

/* ---------- 烟囱烟 ---------- */
.smoke-layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.smoke {
  position: absolute;
  width: 3.2cqw; height: 3.2cqw;
  margin: -1.6cqw 0 0 -1.6cqw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 244, 246, .75), rgba(240, 230, 238, .35) 55%, rgba(240, 230, 238, 0) 72%);
  filter: blur(1.5px);
  opacity: 0;
  animation: smoke 9s linear infinite;
}
@keyframes smoke {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  12%  { opacity: .75; }
  60%  { opacity: .35; }
  100% { transform: translate(5cqw, -16cqw) scale(2.6); opacity: 0; }
}

/* ---------- 开场：擦雾 ---------- */
#entry { position: fixed; inset: 0; z-index: 50; touch-action: none; }
#entry.night .entry-hint { color: rgba(40, 46, 96, .8); }
#entry.night .entry-hint::before { border-color: rgba(40, 46, 96, .6); }
#entry.night .entry-sub { color: rgba(36, 40, 88, .92); text-shadow: 0 0 8px rgba(220, 224, 250, .7); }
#entry.night .entry-skip { background: rgba(255, 255, 255, .3); color: rgba(40, 46, 96, .75); }
#entry canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.entry-hint {
  position: absolute; left: 0; right: 0; top: 62%;
  margin: 0; text-align: center;
  font: 15px/1.4 "PingFang SC", system-ui, sans-serif; letter-spacing: .2em;
  color: rgba(120, 90, 110, .8);
  opacity: 0; transition: opacity .6s;
  pointer-events: none;
}
.entry-hint.show { opacity: 1; animation: hint-breathe 2.2s ease-in-out infinite; }
.entry-hint::before {
  content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 10px;
  border-radius: 50%; border: 1.5px solid rgba(120, 90, 110, .6);
  animation: hint-swipe 2.2s ease-in-out infinite;
}
@keyframes hint-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes hint-swipe { 0%, 100% { transform: translateX(-28px); } 50% { transform: translateX(28px); } }
.entry-skip {
  position: absolute; right: 14px; top: calc(12px + env(safe-area-inset-top));
  border: 0; background: rgba(255, 255, 255, .35); color: rgba(110, 85, 100, .7);
  font: 13px "PingFang SC", system-ui, sans-serif; padding: 6px 12px; border-radius: 14px;
}
.entry-sub {
  position: absolute; left: 0; right: 0; top: 46%;
  margin: 0; text-align: center;
  font: 500 16px/1.4 "PingFang SC", system-ui, sans-serif; letter-spacing: .25em;
  color: rgba(140, 95, 110, .9);
  text-shadow: 0 0 8px rgba(255, 255, 255, .8);
  opacity: 0; transform: translateY(6px);
  transition: opacity .9s, transform .9s;
  pointer-events: none;
}
.entry-sub.show { opacity: 1; transform: none; }

/* ---------- 房子上的灯串 ---------- */
.house-lights { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.house-lights .wire { fill: none; stroke: rgba(60, 50, 45, .75); stroke-width: .16; }
.house-lights .bulb { fill: color-mix(in srgb, var(--c) 45%, #5a5050); stroke: rgba(50, 40, 35, .5); stroke-width: .08; transition: fill .5s, filter .5s; }
.house-lights .strand.lit .bulb {
  fill: var(--c);
  filter: drop-shadow(0 0 .6px var(--c)) drop-shadow(0 0 1.4px var(--c));
  animation: bulb-twinkle 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.37s);
}
.house-lights .strand.new { animation: strand-in 1.2s ease-out both; }
@keyframes strand-in { from { opacity: 0; transform: translateY(-.6px); } to { opacity: 1; transform: none; } }
@keyframes bulb-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }

/* ---------- 点灯仪式 ---------- */
.finale-night {
  /* 高度 200%：连下方镜像补出的雪地一起压暗（11-17 进页即夜后才露出来） */
  position: absolute; left: 0; right: 0; top: 0; height: 200%; z-index: 1; pointer-events: none;
  /* 11-16 Ting 反馈仍像黄昏：天空压成深蓝夜色，房子与雪地也暗下来 */
  background: linear-gradient(to bottom, rgba(12, 16, 52, .96) 0%, rgba(16, 22, 64, .92) 17%, rgba(30, 36, 86, .72) 26%, rgba(44, 52, 104, .58) 50%, rgba(44, 52, 104, .58) 100%);
  mix-blend-mode: multiply;
  opacity: 0; transition: opacity 1.6s ease;
}
#cam.finale-on .finale-night { opacity: 1; }
#cam.finale-on #layer-windows, #cam.finale-on .house-lights, #cam.finale-on .layer-orns { z-index: 3; }
#layer-windows { z-index: 2; }
.tree-lights { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.tree-lights .wire { fill: none; stroke: rgba(40, 50, 40, .5); stroke-width: .12; opacity: 0; transition: opacity .4s; }
.tree-lights .bulb { fill: var(--c); opacity: 0; transition: opacity .35s, filter .35s; }
.tree-lights .tl-row.lit .wire { opacity: 1; }
.tree-lights .tl-row.lit .bulb {
  opacity: 1;
  filter: drop-shadow(0 0 .7px var(--c)) drop-shadow(0 0 1.6px var(--c));
  animation: bulb-twinkle 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.41s);
}
/* 仪式开始先熄掉全部窗户，再逐个点亮 */
#layer-windows.finale-dark .win-glass > i { background: none !important; box-shadow: none !important; animation: none !important; }
#layer-windows.finale-dark .win-glass > b { color: #fff; text-shadow: 0 0 3px rgba(40, 40, 70, .9); }
/* 11-17 Ting：去掉暖色平涂层，只留柔和的发光，亮度调弱 */
#layer-windows .win-glass.finale-lit > i {
  background: var(--window-light-fill) !important;
  box-shadow: var(--window-light-shadow) !important;
  animation: none !important;
}
.win-glass.finale-lit { animation: none !important; }
.finale-glows { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.finale-glows i { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(.3); opacity: 0; transition: opacity 1s, transform 1.2s cubic-bezier(.2,.9,.25,1.2); }
.star-glow { width: 22cqw; height: 22cqw; background: radial-gradient(closest-side, rgba(255, 240, 180, .95), rgba(255, 210, 110, .45) 45%, rgba(255, 200, 100, 0)); }
.lamp-glow { width: 16cqw; height: 16cqw; background: radial-gradient(closest-side, rgba(255, 236, 170, .9), rgba(255, 200, 110, .35) 50%, rgba(255, 200, 100, 0)); }
#cam.finale-star .star-glow { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: star-pulse 2.6s ease-in-out 1.2s infinite; }
#cam.finale-lamps .lamp-glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* 教堂钟楼尖拱窗：午夜弥撒亮灯（11-17） */
.church-win {
  position: absolute; border-radius: 50% 50% 1px 1px / 32% 32% 1px 1px;
  background: radial-gradient(closest-side, rgba(255, 228, 165, .75), rgba(255, 206, 130, .4));
  box-shadow: 0 0 6px 2px rgba(255, 206, 120, .5), 0 0 18px 6px rgba(255, 186, 96, .18);
  opacity: 0; transition: opacity 1.4s ease;
}
#cam.finale-church .church-win { opacity: 1; }
/* 透明金色剪影PNG划过夜空，发光与粒子保持独立。 */
.finale-skyfx { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.finale-sleigh { position: absolute; width: 30%; transform-origin: 100% 50%; will-change: left, top, transform; }
.finale-sleigh img { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 0 1.5px rgba(255, 230, 160, .95)) drop-shadow(0 0 5px rgba(255, 200, 110, .6)); }
.sl-spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff3c8; box-shadow: 0 0 4px 1px rgba(255, 214, 130, .9);
  transform: scale(var(--s, 1)); animation: sl-spark 1.9s ease-out forwards;
}
@keyframes sl-spark { from { opacity: 1; } to { opacity: 0; transform: translateY(14px) scale(calc(var(--s, 1) * .4)); } }
@keyframes star-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.15); } }
.finale-card { text-align: center; }
.finale-script { margin: 6px 0 0; font: 34px/1.2 "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive; color: #b0623a; }
.finale-card .card-title { margin: 6px 0 2px; }
.finale-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.finale-credit { margin: 10px 0 0; font: 12px/1.4 "PingFang SC", system-ui, sans-serif; color: #a08a78; letter-spacing: .02em; }
.finale-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.finale-replay, .finale-letter-toggle { border: 1.5px solid #e9a35f; background: transparent; color: #b0623a; border-radius: 18px; padding: 8px 16px; font: 15px "PingFang SC", system-ui, sans-serif; }
.replay-btn {
  position: absolute; z-index: 7; right: 12px; top: calc(12px + env(safe-area-inset-top));
  border: 0; border-radius: 16px; padding: 7px 12px;
  background: rgba(255, 244, 220, .85); color: #8a5a3a;
  font: 13px "PingFang SC", system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.replay-btn[hidden] { display: none; }

/* 夜空：去掉晚霞的粉色 + 星星 */
.finale-sky {
  position: absolute; left: 0; right: 0; top: 0; height: 46%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(14, 20, 58, .55), rgba(14, 20, 58, 0));
  opacity: 0; transition: opacity 1.6s ease;
}
.finale-sky i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff8e0;
  box-shadow: 0 0 4px 1px rgba(255, 248, 220, .8);
  animation: sky-star 3s ease-in-out infinite;
}
#cam.finale-on .finale-sky { opacity: 1; }
@keyframes sky-star { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
#cam.finale-on .layer-orns { z-index: 4; }
#app.finale-night-app .backdrop { filter: blur(28px) brightness(.35) saturate(.6); transition: filter 1.6s; }

.town-changes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.town-changes [data-town-id="bookshop-window"] { display: none; }
#cam.finale-on .town-changes [data-town-id="bookshop-window"] { display: inline; }
.town-changes .bookshop-glow { filter: blur(.65px); }

/* ---------- 咕噜的捣蛋 ---------- */
.gulu-prank {
  position: absolute; transform: translate(-50%, -50%); z-index: 4;
  display: grid; min-width: 44px; min-height: 44px; place-items: center;
  padding: 0; border: 0; background: transparent; color: #5e493e; cursor: pointer;
}
.gulu-prank:focus-visible { outline: 2px solid #8e4c30; outline-offset: 2px; }
.gulu-prank[data-kind="tracks"] { width: 24%; }
.gulu-prank svg { width: 100%; fill: #7f7f8b; opacity: .7; }
.gulu-prank[data-kind="note"] span {
  padding: 3px 4px; border: 1px solid #bc9d6d; border-radius: 2px;
  background: #fff1c9; font-size: 9px; white-space: nowrap; transform: rotate(-10deg);
}
.gulu-flipped :is(.orn-img, .orn-svg) { transform: rotate(180deg); }
.orn-on-tree.gulu-hat::after {
  position: absolute; left: 28%; top: 10%; width: 54%; height: 24%;
  content: ""; background: #a95353; border-radius: 50% 50% 20% 20%;
  border-bottom: 2px solid #e7d5c3; transform: rotate(20deg); pointer-events: none;
}

.finale-gulu {
  margin: 16px 6px 0; padding-top: 10px; border-top: 1px dashed #c4a48d;
  color: #785645; font-size: 12px; line-height: 1.6; white-space: pre-line;
  animation: finale-aside-in .3s .45s ease-out both;
}
@keyframes finale-aside-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .finale-gulu { animation: none; } }

.finale-actions { flex-wrap: wrap; }
.finale-save {
  min-height: 44px; padding: 8px 15px; border: 1px solid #a15c3c; border-radius: 22px;
  background: #a05231; color: #fffaf0; font: 600 15px "PingFang SC", system-ui, sans-serif; cursor: pointer;
}
.finale-save:disabled { opacity: .65; cursor: wait; }
.keepsake-preview { margin-top: 14px; }
.keepsake-preview img {
  display: block; width: auto; max-width: 100%; height: auto; max-height: 50dvh; margin: 0 auto;
  border-radius: 4px; -webkit-touch-callout: default; user-select: auto;
}
.keepsake-preview p { margin: 6px 0 0; color: #785645; font-size: 13px; }

/* 小镇背景音乐：主画面右上角的手札小菜单。 */
.music-control { position: absolute; z-index: 10; right: 12px; top: calc(12px + env(safe-area-inset-top)); }
.music-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 0; background: transparent; color: #fff8ea; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(60, 32, 24, .6)); -webkit-tap-highlight-color: transparent; }
.music-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.music-button[data-playing="true"] { color: #fff8ea; }
.music-button[data-playing="false"] { opacity: .75; }
.music-off-line { display: none; }
.music-button[data-enabled="false"] .music-off-line { display: block; }
.music-menu { position: absolute; top: 54px; right: 0; width: min(272px, calc(100vw - 24px)); padding: 14px; background: #fbf1dd; border: 1px solid #b59b75; border-radius: 4px; box-shadow: 0 5px 16px #543b3033; color: #604b35; }
.music-menu[hidden] { display: none; }
.music-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.music-menu h2 { margin: 0; font: 20px/1.4 var(--handwriting); }
.music-toggle { min-height: 44px; border: 0; background: transparent; color: #884e3d; padding: 6px; font: 15px/1.4 var(--handwriting); cursor: pointer; }
.music-tracks { display: grid; gap: 6px; }
.music-track { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 10px; background: #fff8e9; border: 1px solid #c5b08d; border-radius: 3px; color: #5f4936; font: 15px/1.4 Georgia, serif; cursor: pointer; text-align: left; }
.music-track i { flex: none; width: 12px; height: 12px; border: 1px solid #ad9876; border-radius: 50%; }
.music-track[aria-checked="true"] { background: #e9e2c9; border-color: #758365; }
.music-track[aria-checked="true"] i { background: #667c58; border-color: #667c58; box-shadow: inset 0 0 0 2px #fbf1dd; }
.music-status { margin: 10px 0 0; color: #7b6249; font: 13px/1.5 var(--handwriting); }
.music-control button:focus-visible { outline: 2px solid #8e4c30; outline-offset: 3px; }
body:has(#entry) .music-control { visibility: hidden; }
.replay-btn { right: 66px; min-height: 44px; }

/* 祝福信有固定纸面，保存图与操作在纸面内部浏览。 */
.finale-card { overflow: hidden; }
.finale-scroll { max-height: calc(100dvh - 92px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b29c80 transparent; }
.keepsake-preview { max-width: 100%; }
.keepsake-preview img { max-height: 42dvh; max-width: 100%; object-fit: contain; }

.showing-keepsake :is(.finale-blessing, .finale-gulu) { display: none; }

/* 领取的树灯平时柔和常亮；仪式reset后恢复逐圈点亮的原效果。 */
.tree-lights.gift-tree .tl-row.lit .bulb { opacity: .8; filter: drop-shadow(0 0 .3px var(--c)); animation: none; }
