* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0C0608; color: #F6EFE6; }
button { font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
.app {
  height: 100%;
  height: 100dvh;
  background: #0C0608;
  color: #F6EFE6;
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  touch-action: manipulation;
  user-select: none;
}
.frame {
  width: 100%;
  max-width: 480px;
  height: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 138, 61, .16), transparent 46%),
    #14080B;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(40px + env(safe-area-inset-top)) 16px 8px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mark {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 38% 32%, #E24B3A, #8E1A24);
  color: #FFF6EA;
  border: 1px solid rgba(255, 220, 180, .35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .28);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 18px;
}
.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 1px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  color: #F6EFE6;
}
.subline { margin: 3px 0 0; font-size: 12px; color: #C2B1A6; line-height: 1.3; }
.tools { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  color: #F6EFE6;
  border: 1px solid rgba(255, 236, 214, .16);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .22);
  font-size: 14px; font-weight: 700;
  position: relative;
}
.icon-btn:active { background: rgba(255, 138, 61, .32); transform: scale(.97); }
.icon-btn.off { color: #8C7B76; }
.badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px;
  background: #FF8A3D; color: #2A1208;
  font-size: 11px; font-weight: 700; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}

.stage {
  flex: 1; min-height: 0;
  margin: 4px 16px 0;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: #1A0C10;
  border: 1px solid rgba(255, 220, 190, .16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.stage.lit { box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 48px rgba(255, 138, 61, .14); }

.room { position: absolute; inset: 0; }
.room.enter { animation: fadein .32s ease; }
.wall { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #1A0A0E 0%, #3A1820 70%, #241014 100%); }
.room.shrine .wall { background: linear-gradient(180deg, #1A080C, #4A1822 68%, #2A1014); }
.room.wing .wall { background: linear-gradient(180deg, #140A12, #2E1424 70%, #1C1014); }
.room.study .wall { background: linear-gradient(180deg, #140C0A, #2C1A16 72%, #1A100E); }
.room.secret .wall {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(255, 138, 61, .14), transparent 48%),
    linear-gradient(180deg, #10080A, #241014 72%, #14080C);
}
.floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 32%; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, #5A382C, #2A1812);
}
.room.secret .floor {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #3A2422, #140C0C);
}
.beam {
  position: absolute; left: 0; right: 0; top: 0; height: 12px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, #1A0E0C, #3A241C);
  box-shadow: 0 8px 12px rgba(0, 0, 0, .35);
}
.vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(20, 0, 6, .55) 100%);
}
.frame.eerie-2 .vignette { background: radial-gradient(ellipse at center, transparent 38%, rgba(90, 0, 16, .45) 100%); }
.frame.eerie-3 .vignette,
.frame.eerie-4 .vignette {
  background: radial-gradient(ellipse at center, transparent 34%, rgba(110, 0, 18, .55) 100%);
  animation: pulseV 3s ease-in-out infinite;
}

.hang { position: absolute; top: 10px; z-index: 2; pointer-events: none; }
.hang.a { left: 34%; }
.hang.b { left: 58%; }
.lantern {
  display: block; width: 26px; height: 34px; position: relative;
  background: linear-gradient(180deg, #8E2430, #4A1218);
  border-radius: 8px;
  border: 2px solid #2A0C10;
  box-shadow: inset 0 0 0 2px rgba(255, 200, 120, .18);
}
.lantern:before {
  content: ""; position: absolute; left: 3px; right: 3px; top: -6px; height: 6px;
  background: #E3B56A; border-radius: 2px;
}
.lantern:after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 14px; margin-left: -1px;
  background: #E3B56A;
}
.lantern.on {
  background: linear-gradient(180deg, #FF8A3D, #C4333E);
  box-shadow: 0 0 16px rgba(255, 138, 61, .75), inset 0 0 0 2px rgba(255, 230, 190, .35);
}

.moonwin {
  position: absolute; right: 12px; top: 18px; z-index: 2; pointer-events: none;
  width: 72px; height: 86px; padding: 6px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: #24160F; border-radius: 4px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 0 0 2px #3A241C;
}
.moonwin i { background: linear-gradient(180deg, #314556, #1B2834); border-radius: 1px; display: block; }
.moon {
  position: absolute; left: 38px; top: 16px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF6E4, #E7D3A4);
  box-shadow: 0 0 12px rgba(255, 230, 190, .85);
}

.rug {
  position: absolute; left: 50%; bottom: 7%; width: 168px; height: 34px; z-index: 1; pointer-events: none;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(142, 30, 44, .95), rgba(58, 18, 24, .9) 68%, transparent 72%);
}
.table {
  position: absolute; left: 50%; bottom: 16%; width: 116px; height: 16px; z-index: 2; pointer-events: none;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #6A4634, #3A2418);
  border-radius: 8px;
  box-shadow: 0 10px 0 #2A1812;
}
.carpet {
  position: absolute; left: 16%; right: 16%; bottom: 8%; height: 18%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #7A1C28, #4A1018);
  border-radius: 10px;
  border: 2px solid rgba(227, 181, 106, .35);
}
.plaque {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, #8E1E2C, #5A141C);
  color: #F8E7C8;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 14px;
  letter-spacing: 3px;
  border: 1px solid rgba(255, 220, 170, .28);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
}
.desk {
  position: absolute; left: 8%; right: 8%; bottom: 6%; height: 20%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, #6B4330, #3A2418);
  border-radius: 8px 8px 4px 4px;
  border: 2px solid #24140E;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .25);
}

.hot {
  border: 0; background: transparent; color: #FFF8EE; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 64px; min-height: 44px;
}
.float { position: absolute; z-index: 4; }
.float.center { left: 50%; transform: translateX(-50%); }
.float.center:active { transform: translateX(-50%) scale(.98); }
.hot em {
  font-style: normal; font-size: 12px; line-height: 1;
  padding: 5px 8px; border-radius: 999px;
  background: rgba(20, 8, 11, .78);
  border: 1px solid rgba(255, 236, 214, .18);
  color: #F6EFE6;
}
.hot:active em { background: #FF8A3D; color: #2A1208; border-color: transparent; }
.hot.coach em {
  background: #FF8A3D; color: #2A1208; border-color: transparent; font-weight: 700;
  animation: pulse 1.15s ease-in-out infinite;
}
.pos-candle { bottom: 18%; top: auto; }
.pos-photo { left: 12px; top: 24%; }
.pos-altar { top: 18%; }
.pos-lamp { right: 10px; bottom: 12%; top: auto; }
.pos-fish { left: 10px; bottom: 12%; top: auto; }
.pos-mirror { left: 10px; top: 16px; }
.pos-oil { right: 8px; top: 42%; }
.pos-shelf { left: 12px; right: 12px; top: 18px; height: 46%; justify-content: flex-end; }
.pos-candle-study { left: 14%; bottom: 16%; }
.pos-book { right: 12%; bottom: 18%; }

.framepic {
  width: 64px; height: 76px; padding: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #E8C98A, #A67C3D);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
}
.shot {
  display: block; height: 100%; border-radius: 1px; position: relative;
  background:
    radial-gradient(circle at 50% 34%, #3A2A24 0 8px, transparent 9px),
    linear-gradient(#3A2A24, #3A2A24) 50% 76% / 26px 24px no-repeat,
    linear-gradient(180deg, #E4D2B4, #C2B090);
}
.glitch .shot {
  background:
    radial-gradient(circle at 50% 36%, #F7F1E6 0 10px, transparent 11px),
    linear-gradient(#F7F1E6, #F7F1E6) 50% 78% / 20px 22px no-repeat,
    linear-gradient(180deg, #E7D0CC, #C9A3A0);
}
.mirror {
  width: 52px; height: 64px; border-radius: 26px 26px 8px 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.35), transparent 42%),
    linear-gradient(180deg, #8AA4B0, #314048);
  border: 3px solid #E3B56A;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25), inset 0 0 12px rgba(255, 138, 61, .25);
}

.candle { display: flex; flex-direction: column; align-items: center; }
.flame {
  width: 14px; height: 20px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 70%, #FFF6E0, #FF8A3D 46%, #E23B2F 78%);
  opacity: 0; transform: scale(.55); transform-origin: bottom center;
}
.is-on .flame {
  opacity: 1; transform: scale(1);
  animation: flick .32s ease-in-out infinite alternate;
  box-shadow: 0 0 16px 4px rgba(255, 138, 61, .7);
}
.wax {
  width: 12px; height: 28px; margin-top: -4px;
  background: linear-gradient(90deg, #F7F1E4, #D9CBB2 55%, #B7A48A);
  border-radius: 2px;
}
.holder {
  width: 26px; height: 8px; margin-top: -1px;
  background: linear-gradient(180deg, #E0A15A, #7A4A16);
  border-radius: 0 0 8px 8px;
}
.bowllamp, .oillamp { display: flex; flex-direction: column; align-items: center; }
.bowl {
  width: 36px; height: 16px; margin-top: -6px;
  background: linear-gradient(180deg, #E0A15A, #6A4018);
  border-radius: 0 0 18px 18px;
  border: 2px solid #3A240E;
}
.chimney {
  width: 16px; height: 26px; margin-top: -8px;
  background: linear-gradient(180deg, rgba(255, 244, 220, .25), rgba(210, 226, 232, .62));
  border: 2px solid #D5E2EA; border-radius: 7px 7px 2px 2px;
}
.oilbase {
  width: 34px; height: 12px;
  background: linear-gradient(180deg, #9AA1AA, #3E4450);
  border-radius: 3px 3px 6px 6px;
}

.altar { width: 150px; }
.tablets { display: flex; justify-content: center; gap: 6px; }
.tablets i {
  font-style: normal; width: 28px; height: 46px;
  background: linear-gradient(180deg, #F6EFE2, #E4D3B4);
  color: #6E1420;
  border-radius: 2px 2px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-family: "Songti SC", "STSong", serif;
  border: 1px solid #C4A574;
}
.altar-body {
  height: 26px; margin-top: -1px;
  background: linear-gradient(180deg, #8E2430, #3A1218);
  border-radius: 0 0 8px 8px;
  border: 2px solid #E3B56A;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .25);
}

.doll-row {
  position: absolute; left: 72px; right: 72px; top: 40%; z-index: 4;
  display: flex; justify-content: center; align-items: flex-start; gap: 4px;
}
.doll-slot, .dollbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.doll { position: relative; width: 54px; height: 104px; }
.head {
  position: relative; width: 32px; height: 36px; margin: 0 auto; z-index: 1;
  background: linear-gradient(180deg, #FFF8EE, #E7D5BE);
  border: 2px solid #241410; border-radius: 16px 16px 12px 12px;
}
.hair {
  position: absolute; left: 2px; right: 2px; top: -5px; height: 15px;
  background: #1A1012; border-radius: 12px 12px 3px 3px;
}
.e {
  position: absolute; top: 16px; left: 6px;
  width: 4px; height: 5px; background: #1A1012; border-radius: 50%;
}
.e.r { left: auto; right: 6px; }
.c { position: absolute; top: 22px; left: 3px; width: 5px; height: 3px; border-radius: 50%; background: rgba(196, 64, 64, .75); }
.c.r { left: auto; right: 3px; }
.mouth { position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; background: #A32030; border-radius: 2px; }
.wrong .e { background: transparent; box-shadow: inset 0 0 0 1.5px #1A1012; }
.wrong .mouth { height: 6px; left: 10px; right: 10px; background: transparent; box-shadow: inset 0 0 0 1.5px #A32030; border-radius: 50%; }
.robe {
  display: block; width: 48px; height: 52px; margin: -6px auto 0;
  background: linear-gradient(180deg, #B32634, #4C121A);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.arm {
  position: absolute; top: 42px; width: 8px; height: 28px; z-index: 0;
  background: #F3E6D0; border: 2px solid #241410; border-radius: 6px;
}
.arm.l { left: 0; transform: rotate(14deg); }
.arm.r { right: 0; transform: rotate(-14deg); }
.ghostlab { visibility: hidden; font-style: normal; font-size: 12px; padding: 5px 8px; }

.books {
  position: absolute; left: 6px; right: 6px; top: 10px; height: 74px;
  display: flex; align-items: flex-end; gap: 3px; pointer-events: none;
}
.books i { display: block; flex: 1; border-radius: 2px 2px 0 0; box-shadow: inset -2px 0 0 rgba(0,0,0,.18); }
.crack {
  position: absolute; top: 12px; bottom: 36px; left: 64%; width: 3px; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, #FF8A3D, transparent);
  box-shadow: 0 0 12px #FF8A3D;
}
.pos-shelf.ready .crack { opacity: 1; }
.scroll {
  width: 56px; height: 38px; border-radius: 4px; position: relative;
  background: linear-gradient(180deg, #F6EFE2, #E4D3B4);
  border: 2px solid #5C4030;
  box-shadow: inset 0 0 0 4px rgba(140, 40, 40, .12), 0 6px 0 rgba(0, 0, 0, .2);
}
.scroll.got:after {
  content: "沈";
  position: absolute; right: -6px; bottom: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #A32030; color: #F8E7C8;
  font-size: 11px; line-height: 20px; text-align: center;
  font-family: "Songti SC", "STSong", serif;
}

.room.secret { display: flex; flex-direction: column; }
.door-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; z-index: 4; }
.gate {
  height: 88%; max-height: 250px; width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: 0; color: #F6EFE6; padding: 0;
}
.leaf {
  flex: 1; width: 118px; min-height: 96px; position: relative;
  background: linear-gradient(90deg, #5A3828, #2A1812 42%, #3E281E);
  border: 3px solid #1A0E0C; border-radius: 6px 6px 2px 2px;
  box-shadow: inset 0 0 0 6px rgba(227, 181, 106, .16), 0 8px 0 rgba(0, 0, 0, .25);
}
.leaf:before, .leaf:after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #C4A574;
  box-shadow: 0 28px 0 #C4A574, 0 56px 0 #C4A574, 0 84px 0 #C4A574;
}
.leaf:before { left: 10px; top: 16px; }
.leaf:after { right: 10px; top: 16px; }
.gate.open .leaf {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(255, 214, 170, .55), rgba(20, 10, 12, .2) 46%, #120C0C 70%),
    linear-gradient(90deg, #2A1A14, #100C0C);
  box-shadow: inset 0 0 28px rgba(255, 138, 61, .35);
}
.fu {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 22px; padding: 6px 0 8px; text-align: center;
  background: #C4333E; color: #F8E7C8; font-size: 13px;
  font-family: "Songti SC", "STSong", serif; border-radius: 2px;
}
.gate.open .fu,
.gate.open .leaf:before,
.gate.open .leaf:after { opacity: 0; }
.gate.coach em {
  background: #FF8A3D; color: #2A1208; border-color: transparent; font-weight: 700;
  animation: pulse 1.15s ease-in-out infinite;
}
.gate em {
  font-style: normal; font-size: 12px; padding: 5px 8px; border-radius: 999px;
  background: rgba(20, 8, 11, .78); border: 1px solid rgba(255, 236, 214, .18);
}
.gate:active { transform: scale(.98); }
.gate:active em { background: #FF8A3D; color: #2A1208; }

.fish-dock {
  position: relative; z-index: 4; flex-shrink: 0;
  margin: 0 8px 8px; padding: 8px;
  border-radius: 14px;
  background: rgba(20, 8, 11, .72);
  border: 1px solid rgba(255, 236, 214, .14);
}
.fish-dock.coach { animation: pulse 1.15s ease-in-out infinite; }
.fish-hint { margin: 0 0 6px; text-align: center; font-size: 12px; color: #C2B1A6; }
.seals { display: flex; gap: 6px; margin-bottom: 8px; }
.seals span {
  flex: 1; height: 28px; border-radius: 8px;
  border: 1px dashed rgba(255, 220, 180, .28);
  color: #F6EFE6; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: "Songti SC", "STSong", serif;
}
.seals span.on {
  background: rgba(163, 32, 48, .85);
  border-style: solid; border-color: rgba(255, 200, 160, .35);
}
.fish-row { display: flex; gap: 8px; }
.wood, .fish {
  display: flex; align-items: center; justify-content: center;
  border-radius: 46% 50% 48% 50%;
  border: 2px solid #2A160E; color: #F6E7C8;
  background: radial-gradient(circle at 35% 40%, #C4844A, #6B3E22 62%, #3E2414);
  box-shadow: inset -6px -4px 0 rgba(0, 0, 0, .2), 0 4px 0 #2A160E;
  font-size: 18px; font-weight: 700; padding: 0;
  font-family: "Songti SC", "STSong", serif;
}
.wood { width: 64px; height: 52px; }
.fish { flex: 1; height: 56px; min-width: 0; }
.fish:active { transform: translateY(3px); box-shadow: inset -6px -4px 0 rgba(0, 0, 0, .2), 0 1px 0 #2A160E; }
.fish:disabled { opacity: .72; }
.relight {
  display: block; width: 100%; margin-top: 8px; height: 44px;
  border-radius: 10px; border: 1px solid rgba(255, 236, 214, .16);
  background: transparent; color: #E7D9CC; font-size: 13px;
}
.relight:active { background: rgba(255, 138, 61, .2); }

.narr {
  margin: 10px 16px 10px;
  padding: 12px 14px;
  max-height: 6.4em; overflow: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 236, 214, .12);
  color: #F3E6D0;
  font-size: 14px; line-height: 1.55;
  overscroll-behavior: contain;
}
.exits { display: flex; gap: 10px; padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
.exits .go {
  flex: 1; height: 48px; border-radius: 12px;
  background: linear-gradient(180deg, #6E2430, #3A1218);
  color: #F6EFE6;
  border: 1px solid rgba(255, 236, 214, .16);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  font-size: 15px; font-weight: 700;
}
.exits .go.hotgo {
  background: linear-gradient(180deg, #FF9A52, #E25A22);
  color: #2A1208; border-color: transparent;
}
.exits .go:active { transform: scale(.98); filter: brightness(.95); }
.exits .go.dim { opacity: .7; }

.mask { position: absolute; inset: 0; z-index: 7; background: rgba(8, 2, 4, .58); }
.pop {
  position: absolute; left: 22px; right: 22px; top: 14%; z-index: 8;
  max-height: 72%; overflow: auto;
  background: linear-gradient(180deg, #FFF9F1, #F0E2D0);
  color: #241810;
  border-radius: 16px; padding: 16px;
  border: 1px solid rgba(80, 20, 20, .12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  max-height: 78%; overflow: auto;
  background: linear-gradient(180deg, #F7F0E4, #E7D8C4);
  color: #241810;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .35);
  border-top: 1px solid rgba(255, 255, 255, .45);
  overscroll-behavior: contain;
}
.handle {
  width: 40px; height: 4px; border-radius: 2px; margin: 2px auto 10px;
  background: rgba(36, 24, 16, .22);
}
.kicker { margin: 0; font-size: 12px; letter-spacing: 1px; color: #8A7568; }
.pop h3, .sheet h3 { margin: 4px 0 8px; font-size: 18px; color: #17181A; font-family: "Songti SC", "STSong", serif; }
.body { margin: 0; font-size: 15px; line-height: 1.65; color: #333; }
.order {
  margin: 10px 0 0; text-align: center;
  font-size: 16px; font-weight: 700; letter-spacing: 1px; color: #A32030;
}
.btn-main {
  width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #FF9A52, #E25A22);
  color: #2A1208; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 16px rgba(226, 90, 34, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-main:active { transform: translateY(1px) scale(.99); filter: brightness(.96); }
.btn-ghost {
  width: 100%; height: 48px; margin-top: 10px; border-radius: 14px;
  background: transparent; color: #F6EFE6;
  border: 1px solid rgba(243, 230, 208, .35);
  font-size: 15px; font-weight: 700;
}
.btn-ghost:active { background: rgba(255, 255, 255, .06); }
.fcard {
  background: #FFF9F2; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid rgba(80, 20, 20, .1);
  box-shadow: 0 4px 10px rgba(80, 30, 20, .06);
}
.fcard h3 { font-size: 16px; }
.fcard p { margin: 0; font-size: 14px; line-height: 1.6; color: #3A312A; }
.fcard.locked { opacity: .72; box-shadow: none; }
.fcard.locked p { color: #8A7568; font-size: 13px; }
.sheet-note { margin: 2px 0 12px; font-size: 12px; color: #8E2418; font-weight: 700; }
.linkish {
  width: 100%; height: 44px; margin-top: 4px;
  background: transparent; border: 0; color: #8E2418;
  font-size: 14px; font-weight: 700;
}
.linkish:active { opacity: .6; }

.end {
  height: 100%; overflow: auto;
  padding: calc(40px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 138, 61, .2), transparent 42%),
    linear-gradient(180deg, #1A0A0E, #12080B);
}
.end .eyebrow { margin: 0; font-size: 12px; letter-spacing: 3px; color: #FF8A3D; }
.end h2 {
  margin: 8px 0 14px; font-size: 22px; line-height: 1.3;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif; color: #F6EFE6;
}
.paper {
  background: linear-gradient(180deg, #FFF9F1, #F3E6D0);
  color: #241810; border-radius: 16px; padding: 16px;
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.paper p { margin: 0 0 12px; font-size: 15px; line-height: 1.7; color: #333; }
.paper p:last-child { margin-bottom: 0; }
.end-actions { margin-top: 14px; }
.fine { margin: 14px 0 0; text-align: center; font-size: 12px; color: #C2B1A6; }

.ash { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.ash i {
  position: absolute; top: -8px; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(243, 230, 208, .75);
  animation-name: fall; animation-timing-function: linear; animation-iteration-count: infinite;
}
.phantom {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 8% 8% 6%;
  background: linear-gradient(90deg, rgba(20, 0, 0, 0), rgba(90, 0, 16, .38));
  animation: fadein .25s ease;
}
.phantom-copy {
  max-width: 54%;
  color: #F6EFE6; font-size: 14px; line-height: 1.45;
  background: rgba(20, 8, 11, .62);
  border-radius: 12px; padding: 10px 12px;
  border: 1px solid rgba(255, 236, 214, .16);
}
.phantom-copy b {
  display: block; color: #FF8A3D; font-size: 12px; letter-spacing: 2px; margin-bottom: 4px;
}
.phantom .doll { animation: sway 1.05s ease-in-out infinite; transform-origin: bottom center; }
.flash {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: rgba(160, 20, 30, .28);
  animation: fadeFlash .45s ease forwards;
}

@keyframes flick { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.08, .92) rotate(3deg); } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, .55); }
  50% { box-shadow: 0 0 0 7px rgba(255, 138, 61, 0); }
}
@keyframes pulseV { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes fall {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: .75; }
  100% { transform: translateY(520px); opacity: 0; }
}
@keyframes sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeFlash { to { opacity: 0; } }
@keyframes shake {
  10% { transform: translateX(-5px); }
  20% { transform: translateX(5px); }
  30% { transform: translateX(-4px); }
  40% { transform: translateX(3px); }
  50% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.frame.shake { animation: shake .42s linear; }

@media (max-height: 680px) {
  .doll { transform: scale(.88); transform-origin: top center; }
  .leaf:before, .leaf:after { box-shadow: 0 22px 0 #C4A574, 0 44px 0 #C4A574, 0 66px 0 #C4A574; }
  .narr { max-height: 4.8em; margin-top: 8px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .flame, .ash i, .phantom .doll, .frame.shake, .hot.coach em, .fish-dock.coach, .frame.eerie-3 .vignette, .frame.eerie-4 .vignette, .room.enter {
    animation: none;
  }
}
