/* ============================================================
   C’est la vie. · 记忆保管室（V5）
   纸模型房间 → 手账 → 纸上像素世界。统一「纸与光」的语言。
   ============================================================ */

:root {
  --paper: #efe4cd;
  --paper-2: #e4d6b8;
  --paper-3: #d8c8a6;
  --card: #f7efdd;
  --ink: #3a2f1e;
  --ink-soft: #6b5a40;
  --brass: #b08a3e;
  --red: #a5342a;
  --dusk: #6a5a7a;
  --f-serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --f-hand: "Hannotate SC", "HanziPen SC", "Kaiti SC", "STKaiti", cursive;
  --f-sans: "PingFang SC", "Hiragino Sans GB", -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: #241f1a;
  overscroll-behavior: none;
}

body {
  font-family: var(--f-serif);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.app {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 0%, #4a3f33 0%, #2c251e 55%, #1d1813 100%);
}

/* ---------------- HUD ---------------- */
.hud {
  position: absolute; left: 0; right: 0; top: 0;
  z-index: 60;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}
.hud-title { display: flex; flex-direction: column; gap: 3px; }
.hud-mark {
  font-family: var(--f-serif); font-size: 13px; letter-spacing: .06em;
  color: rgba(246, 236, 216, .9);
}
.hud-sub {
  font-family: var(--f-sans); font-size: 9.5px; letter-spacing: .16em;
  color: rgba(232, 214, 184, .5);
}
.hud-actions { pointer-events: auto; display: flex; align-items: center; gap: 7px; }

.frags { display: flex; gap: 4px; align-items: center; }
.frags i {
  width: 9px; height: 9px;
  border: 1px solid rgba(176, 138, 62, .5);
  transform: rotate(45deg);
  transition: background .4s, box-shadow .4s;
}
.frags i.on {
  background: var(--brass);
  box-shadow: 0 0 8px rgba(217, 184, 120, .7);
}
.found {
  font-family: var(--f-sans); font-size: 10px;
  color: rgba(240, 230, 210, .72);
  background: rgba(26, 22, 18, .55);
  border: 1px solid rgba(176, 138, 62, .26);
  border-radius: 12px;
  padding: 4px 9px;
}
.found b { font-size: 12px; color: #d9b878; }

.mus {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 9px 0 7px;
  border-radius: 14px;
  border: 1px solid rgba(176, 138, 62, .26);
  background: rgba(26, 22, 18, .55);
  color: rgba(240, 230, 210, .75);
  font-family: var(--f-sans); font-size: 9.5px;
}
.mus .slash { opacity: 1; transition: opacity .2s; }
.mus.is-playing .slash { opacity: 0; }
.mus.is-playing { color: #d9b878; }

/* ---------------- 场景容器 ---------------- */
.scene {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s, transform .6s;
  transform: scale(.98);
}
.scene.on { opacity: 1; pointer-events: auto; transform: scale(1); }

.scene-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  margin: 0;
  text-align: center;
  font-family: var(--f-sans); font-size: 9px; letter-spacing: .12em;
  color: rgba(120, 100, 72, .55);
  pointer-events: none;
}

/* ============================================================
   场景 1：纸模型房间
   ============================================================ */
.paper-room {
  position: absolute;
  left: 50%; top: 50%;
  width: min(92vw, 390px);
  height: min(74vh, 600px);
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 62%, var(--paper-3) 100%);
  border: 1px solid rgba(120, 96, 60, .25);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .45) inset,
    0 -8px 0 rgba(120, 96, 60, .12) inset,
    0 22px 50px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.pr-wall {
  position: absolute; inset: 0 0 34% 0;
  background:
    repeating-linear-gradient(90deg, rgba(160, 136, 96, .07) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #f3e9d4, #eadcc2);
}
.pr-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background:
    repeating-linear-gradient(0deg, rgba(140, 112, 72, .12) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #dcc9a6, #cbb488);
  border-top: 2px solid rgba(120, 96, 60, .28);
  box-shadow: 0 -6px 14px rgba(120, 96, 60, .12) inset;
}
/* 折痕与胶带：纸模型的手工痕迹 */
.pr-crease {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(120, 96, 60, .18), transparent);
  pointer-events: none;
}
.pr-crease.v1 { left: 30%; top: 0; bottom: 0; width: 1px; }
.pr-crease.v2 { left: 68%; top: 0; bottom: 34%; width: 1px; }
.pr-crease.h1 { left: 0; right: 0; top: 40%; height: 1px; background: linear-gradient(180deg, transparent, rgba(120, 96, 60, .16), transparent); }
.pr-tape {
  position: absolute;
  width: 54px; height: 16px;
  background: rgba(226, 205, 160, .62);
  border-left: 1px dashed rgba(160, 136, 96, .35);
  border-right: 1px dashed rgba(160, 136, 96, .35);
  transform: rotate(-6deg);
  box-shadow: 0 1px 2px rgba(120, 96, 60, .2);
}
.pr-tape.t1 { left: 8%; top: 6%; }
.pr-tape.t2 { right: 10%; top: 46%; transform: rotate(4deg); }

/* 通用物件按钮 */
.pr-obj {
  position: absolute;
  border: 0; padding: 0; background: transparent;
  cursor: pointer;
  transition: transform .25s, filter .25s;
}
.pr-obj:active { transform: scale(.96); }
.pr-obj:hover { filter: brightness(1.03); }

/* 狗照片 */
.pr-photo {
  left: 6%; top: 8%;
  width: 92px; height: 104px;
  background: #fdf8ec;
  border: 5px solid #fff;
  box-shadow: 0 4px 10px rgba(80, 60, 30, .25);
  transform: rotate(-2.5deg);
}
.po-face {
  position: absolute; left: 50%; top: 42%;
  width: 38px; height: 34px; margin: -17px 0 0 -19px;
  border-radius: 46% 46% 40% 40%;
  background: radial-gradient(circle at 40% 36%, #d9b078, #b8874e);
}
.po-face::before, .po-face::after {
  content: ""; position: absolute; top: -8px;
  width: 13px; height: 15px; border-radius: 50% 50% 0 0;
  background: #a87f52;
}
.po-face::before { left: -2px; transform: rotate(-16deg); }
.po-face::after { right: -2px; transform: rotate(16deg); }
.po-cap {
  position: absolute; left: 0; right: 0; bottom: 4px;
  text-align: center;
  font-family: var(--f-hand); font-size: 9px; color: #6b5a40;
}

/* 玩偶 */
.pr-doll { left: 4%; bottom: 6%; width: 56px; height: 62px; z-index: 4; }
.po-body {
  position: absolute; left: 50%; bottom: 0;
  width: 44px; height: 38px; margin-left: -22px;
  border-radius: 50% 50% 44% 44%;
  background: #f0a6c0;
}
.po-head {
  position: absolute; left: 50%; top: 0;
  width: 34px; height: 32px; margin-left: -17px;
  border-radius: 50%;
  background: #f5b8cd;
}
.po-ear {
  position: absolute; top: -6px;
  width: 12px; height: 14px;
  background: #f5b8cd;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.po-ear.l { left: 8px; transform: rotate(-14deg); }
.po-ear.r { right: 8px; transform: rotate(14deg); }

/* 床 + 月亮抱枕 */
.pr-bed { left: 26%; bottom: 26%; width: 168px; height: 112px; z-index: 3; }
.po-mattress::before {
  content: "";
  position: absolute; left: 0; top: -14px; width: 12px; height: 80px;
  background: linear-gradient(90deg, #c9a878, #b08a5e);
  border: 1px solid rgba(120, 96, 60, .3);
  border-radius: 2px;
}
.po-mattress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 66px;
  background: linear-gradient(180deg, #f7efdd, #e8dcc4 70%, #d8c8a6);
  border: 1px solid rgba(120, 96, 60, .28);
  border-radius: 4px;
  box-shadow: 0 3px 0 -1px rgba(120, 96, 60, .18), 0 6px 12px rgba(120, 96, 60, .12);
  z-index: 1;
}
.po-pillow {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  width: 52px; height: 26px;
  background: #fdf8ec;
  border: 1px solid rgba(120, 96, 60, .18);
  border-radius: 8px;
}
.po-moon {
  position: absolute; right: 14px; bottom: 16px; z-index: 2;
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #f6d76a, #e8b83a 68%, #d8a02a);
  box-shadow: 0 3px 8px rgba(120, 90, 20, .3);
}
.po-moon::after {
  content: ""; position: absolute; left: 10px; top: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(180, 130, 30, .35);
  box-shadow: 16px 10px 0 -2px rgba(180, 130, 30, .3), 6px 24px 0 -3px rgba(180, 130, 30, .25);
}

/* 浴室门 */
.pr-bath { left: 2%; top: 40%; width: 44px; height: 150px; }
.po-glass {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #e4ece8, #cfdcd6);
  border: 2px solid rgba(120, 96, 60, .3);
  border-radius: 3px;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, .6);
}
.po-knob {
  position: absolute; right: 5px; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: #b08a3e;
}

/* 八音盒 */
.pr-music { right: 30%; bottom: 7%; width: 58px; height: 42px; z-index: 4; }
.po-box {
  position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  background: linear-gradient(180deg, #a8744a, #8a5a3a);
  border: 1px solid rgba(90, 60, 30, .4);
  border-radius: 3px;
}
.po-wheel {
  position: absolute; left: 50%; top: 6px;
  width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%;
  background: #d9b878;
  border: 2px solid #8a5a3a;
}

/* 抽屉信封 */
.pr-drawer { left: 22%; bottom: 5%; width: 92px; height: 46px; z-index: 4; }
.po-drawer {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  background: linear-gradient(180deg, #c9a878, #b08a5e);
  border: 1px solid rgba(120, 96, 60, .35);
  border-radius: 2px;
}
.po-drawer::after {
  content: ""; position: absolute; left: 50%; top: 10px;
  width: 22px; height: 5px; margin-left: -11px;
  background: #6b5436; border-radius: 2px;
}
.po-letter {
  position: absolute; left: 14px; bottom: 18px;
  width: 40px; height: 26px;
  background: #fdf8ec;
  border: 1px solid rgba(120, 96, 60, .3);
  transform: rotate(-4deg);
}

/* 桌上纸盒 */
.pr-carton { right: 6%; bottom: 7%; width: 76px; height: 66px; z-index: 4; }
.pc-body {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  box-shadow: 0 4px 10px rgba(80, 60, 30, .25), inset 0 -6px 10px rgba(120, 96, 60, .12);
  background: linear-gradient(180deg, #e8dcc4, #d8c8a6);
  border: 1px solid rgba(120, 96, 60, .3);
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(80, 60, 30, .2);
}
.pc-lid {
  position: absolute; left: -3px; right: -3px; top: 4px; height: 18px;
  background: linear-gradient(180deg, #f2e8d2, #e0d0b2);
  border: 1px solid rgba(120, 96, 60, .3);
  border-radius: 2px;
  transform-origin: 50% 100%;
  transition: transform .6s cubic-bezier(.3,.85,.2,1);
}
.pr-carton.open .pc-lid { transform: rotateX(-115deg); }
.pc-hint {
  position: absolute; left: 0; right: 0; bottom: -16px;
  text-align: center;
  font-family: var(--f-sans); font-size: 8px; letter-spacing: .1em;
  color: rgba(120, 96, 60, .6);
}
.pr-carton.open .pc-hint { opacity: 0; }

/* 手账（开盒后出现） */
.pr-handbook {
  right: 8%; bottom: 23%;
  width: 62px; height: 76px;
  transform: rotate(6deg);
  animation: hbIn .5s cubic-bezier(.3,1.4,.5,1);
}
@keyframes hbIn { from { transform: rotate(6deg) scale(.4); opacity: 0; } }
.ph-cover {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #3a4a3e, #2c3a30);
  border-radius: 2px;
  box-shadow: 0 6px 14px rgba(40, 30, 20, .4), inset 0 0 0 2px rgba(176, 138, 62, .3);
  font-family: var(--f-serif); font-size: 7px; color: #d9b878;
  text-align: center; padding: 4px;
}

/* ============================================================
   场景 2：手账
   ============================================================ */
.book-wrap {
  position: absolute;
  left: 50%; top: 50%;
  width: min(88vw, 360px);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.book {
  width: 100%;
  aspect-ratio: 0.72;
  background: linear-gradient(160deg, #f7efdd, #ece0c8);
  border-radius: 3px 6px 6px 3px;
  box-shadow:
    -6px 0 0 -2px #2c3a30,
    -8px 2px 0 -2px #24302a,
    0 22px 44px rgba(0, 0, 0, .5);
  position: relative;
  overflow: hidden;
}
.book::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(90deg, rgba(60, 40, 20, .22), transparent);
  z-index: 2;
  pointer-events: none;
}
.bk-page { position: absolute; inset: 0; padding: 22px 20px 30px 26px; }
.bp-inner {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.bp-num {
  position: absolute; right: 14px; bottom: 10px;
  font-family: var(--f-sans); font-size: 8px;
  color: rgba(120, 100, 72, .6);
}
.bk-nav {
  display: flex; align-items: center; gap: 16px;
}
.bk-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(217, 184, 120, .35);
  background: rgba(26, 22, 18, .5);
  color: #d9b878;
  font-size: 20px; line-height: 1;
}
.bk-btn:disabled { opacity: .3; }
.bk-dots { display: flex; gap: 5px; }
.bk-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(217, 184, 120, .25);
}
.bk-dots i.on { background: #d9b878; }

/* 手账页内容 */
.bp-title {
  font-family: var(--f-serif); font-size: 18px; line-height: 1.35;
  margin: 0 0 6px;
}
.bp-sub {
  font-family: var(--f-sans); font-size: 9.5px; line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.bp-rule { height: 1px; background: rgba(120, 96, 60, .22); margin: 10px 0; }
.bp-line {
  font-family: var(--f-serif); font-size: 12.5px; line-height: 1.65;
  margin: 6px 0;
}
.bp-line b { color: var(--red); font-weight: 600; }
.bp-note {
  font-family: var(--f-sans); font-size: 8.5px; line-height: 1.7;
  color: rgba(96, 80, 56, .8);
  margin-top: 10px;
}
.bp-photo {
  width: 100%; border: 5px solid #fff;
  box-shadow: 0 4px 12px rgba(60, 40, 20, .25);
  transform: rotate(-1.2deg);
  margin: 8px 0;
}
.bp-door {
  position: relative;
  height: 150px;
  margin-top: 10px;
  border: 2px dashed rgba(120, 96, 60, .4);
  background: linear-gradient(180deg, #efe4cd, #e0d0b2);
  display: grid; place-items: center;
  cursor: pointer;
}
.bp-door .d-frame {
  width: 74px; height: 108px;
  border: 2px solid #8a6a48;
  background: linear-gradient(180deg, #6a5a4a, #3a3028);
  position: relative;
}
.bp-door .d-frame::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: #d9b878;
}
.bp-door .d-label {
  position: absolute; left: 0; right: 0; bottom: 6px;
  text-align: center;
  font-family: var(--f-sans); font-size: 8px;
  color: rgba(120, 100, 72, .7);
}
.bp-door.locked .d-frame { filter: grayscale(.6) brightness(.8); }

/* ============================================================
   场景 3：纸上像素世界
   ============================================================ */
.pixel-frame {
  position: absolute;
  left: 50%; top: 50%;
  width: min(94vw, 400px);
  height: min(76vh, 620px);
  transform: translate(-50%, -50%);
  background: #14161c;
  border: 1px solid rgba(217, 184, 120, .22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55);
  padding: 10px 10px 30px;
}
.px-map {
  position: relative;
  width: 100%; height: 100%;
  background: #1a1d24;
  overflow: hidden;
  image-rendering: pixelated;
}
.px-caption {
  position: absolute; left: 0; right: 0; bottom: 8px;
  text-align: center;
  font-family: var(--f-sans); font-size: 8px; letter-spacing: .12em;
  color: rgba(217, 184, 120, .45);
}

/* 像素块 */
.px-tile { position: absolute; }
.px-spot {
  position: absolute;
  cursor: pointer;
  animation: pxGlow 2.6s ease-in-out infinite;
}
@keyframes pxGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 184, 58, 0); }
  50% { box-shadow: 0 0 0 3px rgba(232, 184, 58, .28); }
}
.px-spot.found { animation: none; box-shadow: none; }
.px-spot span {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-sans); font-size: 7px;
  color: rgba(255, 255, 255, .75);
  pointer-events: none;
  white-space: nowrap;
}

/* ============================================================
   转场
   ============================================================ */
.wipe {
  position: fixed; inset: 0; z-index: 120;
  pointer-events: none;
  opacity: 0;
  display: grid; place-items: center;
  transition: opacity .35s;
}
.wipe.on { opacity: 1; }
.wipe.white { background: #fff; }
.wipe.paper {
  background:
    repeating-linear-gradient(90deg, #f2e8d2 0 8px, #ece0c6 8px 16px);
}
.wipe.pixel {
  background:
    repeating-conic-gradient(#1a1d24 0 25%, #232833 0 50%) 0 0 / 16px 16px;
}
.wipe-txt {
  font-family: var(--f-hand); font-size: 14px;
  color: rgba(60, 48, 30, .7);
  opacity: 0;
  transition: opacity .3s;
}
.wipe.on .wipe-txt { opacity: 1; }
.wipe.white .wipe-txt { color: rgba(60, 48, 30, .5); }

/* ============================================================
   特写
   ============================================================ */
.closeup {
  position: fixed; inset: 0; z-index: 200;
  visibility: hidden; pointer-events: none;
}
.closeup.on { visibility: visible; pointer-events: auto; }
.cu-bg {
  position: absolute; inset: 0;
  background: rgba(20, 16, 12, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .35s;
}
.closeup.on .cu-bg { opacity: 1; }
.cu-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  top: calc(env(safe-area-inset-top, 0px) + 54px);
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.2,.85,.2,1);
  overflow: hidden;
}
.closeup.on .cu-panel { transform: translateY(0); }
.cu-close {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(120, 96, 60, .25);
  background: rgba(255, 252, 244, .92);
  color: rgba(70, 54, 34, .8);
  font-size: 17px; line-height: 1;
}
.cu-scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px 34px;
  overscroll-behavior: contain;
}
.cu-kicker {
  font-family: var(--f-sans); font-size: 8.5px; letter-spacing: .18em;
  color: rgba(110, 92, 64, .8);
  padding-right: 34px;
}
.cu-title {
  margin: 8px 0 0;
  font-family: var(--f-serif); font-size: 21px; line-height: 1.34; font-weight: 600;
}
.cu-hook {
  margin: 7px 0 0;
  font-family: var(--f-sans); font-size: 11px; line-height: 1.6;
  color: var(--ink-soft);
}
.cu-body { margin-top: 14px; }
.cu-foot {
  margin-top: 16px; padding-top: 10px;
  border-top: 1px dashed rgba(120, 96, 60, .28);
  font-family: var(--f-sans); font-size: 7.5px; line-height: 1.6;
  color: rgba(130, 114, 88, .72);
}

.vb-chat {
  display: flex; align-items: baseline; gap: 7px;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(120, 96, 60, .18);
  font-family: var(--f-serif); font-size: 12.5px; line-height: 1.5;
}
.vb-who {
  flex: 0 0 auto;
  font-family: var(--f-sans); font-size: 8px;
  padding: 1px 4px; border-radius: 3px;
  background: rgba(90, 110, 140, .8); color: #fff;
}
.vb-chat.her .vb-who { background: rgba(150, 80, 100, .82); }
.vb-chat.punch .vb-txt { font-family: var(--f-hand); font-size: 14.5px; color: var(--red); }
.vb-at { flex: 0 0 auto; font-family: var(--f-sans); font-size: 7.5px; color: rgba(130, 114, 88, .7); }
.vb-note {
  margin: 10px 0 0;
  font-family: var(--f-sans); font-size: 9px; line-height: 1.65;
  color: rgba(96, 80, 56, .8);
}
.vb-img { width: 54%; margin: 0 auto; display: block; border: 5px solid #fff; box-shadow: 0 4px 14px -6px rgba(50,34,16,.5); }
.vb-gap {
  margin-top: 12px; padding: 11px 13px;
  border-left: 3px solid rgba(165, 52, 42, .55);
  background: rgba(165, 52, 42, .05);
}
.vb-gap b { display: block; font-family: var(--f-serif); font-size: 12.5px; color: var(--red); }
.vb-gap p { margin: 6px 0 0; font-family: var(--f-sans); font-size: 9px; line-height: 1.7; color: rgba(96, 80, 56, .85); }
.vb-frag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border: 1px solid rgba(176, 138, 62, .45);
  font-family: var(--f-sans); font-size: 8.5px;
  color: #8a6a2a;
  background: rgba(217, 184, 120, .12);
}

/* 终章 */
.finale-note {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-1.5deg);
  width: min(78vw, 300px);
  padding: 22px 20px;
  background: #fdf8ec;
  border: 1px solid rgba(120, 96, 60, .25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  z-index: 90;
  font-family: var(--f-hand); font-size: 17px; line-height: 1.7;
  color: #5a4630;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s .3s, transform 1s .3s;
}
.finale-note.on { opacity: 1; transform: translate(-50%, -50%) rotate(-1.5deg) scale(1.02); }

/* 终章：房间被点亮 */
.paper-room.lit {
  background: linear-gradient(180deg, #fdf5e2, #f4e6c6 62%, #e6d2a8);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .55) inset,
    0 -8px 0 rgba(120, 96, 60, .1) inset,
    0 22px 60px rgba(0, 0, 0, .5),
    0 0 60px rgba(255, 220, 150, .28);
}
.paper-room.lit .pr-wall {
  background:
    repeating-linear-gradient(90deg, rgba(160, 136, 96, .06) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #fff8e6, #f4e6c8);
}
.paper-room.lit .pr-floor {
  background:
    repeating-linear-gradient(0deg, rgba(140, 112, 72, .1) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #ecd9b4, #dcc49a);
}
.paper-room.lit .po-moon {
  box-shadow: 0 0 34px rgba(255, 220, 130, .85), 0 3px 10px rgba(120, 90, 20, .3);
  transform: translateY(-10px);
  transition: transform 1.2s, box-shadow 1.2s;
}
.paper-room.lit .po-wheel { animation: wheelSpin 3.2s linear infinite; }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.paper-room.lit .po-glass {
  background: linear-gradient(180deg, #f2f8f4, #dcece6);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, .85);
}
/* 终章多出来的一张合影 */
.finale-photo {
  position: absolute; right: 8%; bottom: 42%;
  width: 74px; height: 58px;
  background: #fdf8ec;
  border: 4px solid #fff;
  box-shadow: 0 6px 14px rgba(80, 60, 30, .3);
  transform: rotate(4deg);
  opacity: 0;
  transition: opacity 1s .6s;
  pointer-events: none;
}
.finale-photo::before {
  content: ""; position: absolute; left: 14px; top: 14px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #d8b890;
  box-shadow: 22px 0 0 -1px #e8c8a8;
}
.finale-photo::after {
  content: "合影"; position: absolute; left: 0; right: 0; bottom: 3px;
  text-align: center;
  font-family: var(--f-hand); font-size: 8px; color: #6b5a40;
}
.paper-room.lit .finale-photo { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .px-spot { animation: none; }
  .scene, .wipe, .cu-panel, .finale-note { transition: none; }
}
