*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#101b1c;color:#f4ead5;font-family:"Microsoft YaHei",sans-serif}button{font:inherit;cursor:pointer}#stage{position:relative;width:100%;height:100%;overflow:hidden;background:#1a292a}#background,#reveal,#overlay{position:absolute;inset:0}#background,#reveal{background-position:center;background-size:cover}#background{transition:background-image .6s,transform .8s}#reveal{pointer-events:none;display:none;mask-image:radial-gradient(circle 150px at var(--x,50%) var(--y,40%),#000 30%,transparent 100%);-webkit-mask-image:radial-gradient(circle 150px at var(--x,50%) var(--y,40%),#000 30%,transparent 100%)}#overlay{pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.42),transparent 35%,rgba(0,0,0,.78))}header{position:absolute;top:0;width:100%;display:flex;justify-content:space-between;padding:24px 5%;font-size:13px;letter-spacing:.16em;text-shadow:0 1px 5px #000}#intro{position:absolute;left:9%;top:24%;text-shadow:0 2px 12px #000}h1{font-family:serif;font-size:clamp(36px,6vw,76px);letter-spacing:.15em;margin:20px 0}#intro p{letter-spacing:.16em;color:#e2ddce}button{border:1px solid #d8c194;background:rgba(22,25,22,.78);color:#f6ead3;padding:12px 22px}button:hover,button:focus-visible{background:#d1b783;color:#171e1d}#intro button{display:block;margin:36px 0 18px}small{color:#c5c1ae}#dialogue{position:absolute;bottom:8%;left:8%;width:min(750px,84%);background:rgba(18,25,24,.86);border-left:2px solid #d9be80;padding:20px 26px;box-shadow:0 8px 50px #0005}#speaker{color:#dbbd7c;font-size:14px;letter-spacing:.15em}#text{font-family:serif;font-size:clamp(17px,2vw,22px);line-height:1.8;margin:12px 0 20px}#choices{display:flex;flex-wrap:wrap;gap:10px}#choices button{font-size:14px;padding:9px 16px}footer{position:absolute;right:4%;bottom:3%;font-size:12px;color:#d9d5c8;text-shadow:0 1px 4px #000}[hidden]{display:none!important}
#pouch{position:absolute;left:72%;top:57%;transform:translate(-50%,-50%);border:0;background:transparent;color:#ffdc90;font-size:30px;text-shadow:0 0 12px #ffbd50;opacity:.15;padding:12px;transition:opacity .25s}#pouch.lit,#pouch:focus-visible{opacity:1}#pouch span{display:block;font-size:12px;white-space:nowrap;opacity:0}#pouch.lit span,#pouch:focus-visible span{opacity:1}
#player{position:absolute;left:25%;bottom:20%;height:clamp(220px,33vh,320px);transform:translateX(-50%);pointer-events:none}#player img{position:relative;height:100%;display:block}#player::before{content:"";position:absolute;left:27%;bottom:7%;width:46%;height:6%;border-radius:50%;background:#17221b99;filter:blur(5px)}#player .lantern{position:absolute;left:77%;top:55%;width:12px;height:18px;border-radius:35%;background:#f7ce78;box-shadow:0 0 14px 7px #efad5b99,0 0 50px 22px #d9984b55}#rain{position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(105deg,transparent 0 35px,#d8edf320 36px 37px,transparent 38px 70px);animation:rain .35s linear infinite;opacity:.55}
#stage.gate-ground #player{bottom:4%}
#stage.street-pan #player{bottom:14%}
#stage.street-scene #player{height:clamp(320px,55vh,600px);bottom:17%}
#stage.street-scene #player .lantern{display:none}
#street-people{position:absolute;inset:0;z-index:1;pointer-events:none;background:url("（5）游戏关键帧+工美素材/03朝武街与会馆/长卷有人_街坊前景.png") center/cover no-repeat}
#gate-siblings{position:absolute;inset:0;pointer-events:none;z-index:1}
#gate-siblings img{position:absolute;bottom:2%;height:35vh;width:auto;filter:brightness(.78) drop-shadow(2px 5px 7px #101a1aaa)}
#gate-siblings img:first-child{left:9%}
#gate-siblings img:last-child{left:20%;height:30vh}
#pouch:not([hidden]){top:91%;left:72%;width:clamp(70px,9vw,125px);height:clamp(65px,8vw,110px);opacity:0;background:url("（5）游戏关键帧+工美素材/04望岳门图片/望24_02  红绳香囊单件.png") center/contain no-repeat;font-size:0;filter:drop-shadow(0 3px 4px #111b)}
#pouch:not([hidden]).lit,#pouch:not([hidden]):focus-visible{opacity:1;filter:drop-shadow(0 0 13px #ffc26d)}
#ball-prop{position:absolute;z-index:1;left:68%;top:78%;width:clamp(95px,13vw,180px);height:clamp(95px,13vw,180px);transform:translate(calc(-50% + var(--ball-shift,0px)),-50%);padding:0;border:0;background:none;touch-action:none;cursor:grab;filter:drop-shadow(0 8px 8px #20140d99)}
#ball-prop:active{cursor:grabbing}
#ball-prop img{display:block;width:100%;height:100%;object-fit:contain}
#cast{position:absolute;right:1%;bottom:0;width:clamp(240px,37vw,520px);height:55vh;overflow:hidden;pointer-events:none;z-index:1;mask-image:linear-gradient(transparent,#000 8%,#000 92%,transparent);-webkit-mask-image:linear-gradient(transparent,#000 8%,#000 92%,transparent)}
#stage.night-rest #background{background-image:none!important;background-color:#0c1315}
#stage.night-rest #overlay{background:#071011bb}
#stage.night-rest #route-map{display:none}
#montage{position:absolute;z-index:1;top:27%;left:8%;right:8%;display:flex;justify-content:center;gap:clamp(8px,3vw,36px);pointer-events:none}#montage>div{display:flex;align-items:center;flex-direction:column;gap:7px;opacity:0;animation:memory-glimpse 7s ease-in-out forwards;animation-delay:calc(var(--n,0) * 1s)}#montage>div:nth-child(2){--n:1}#montage>div:nth-child(3){--n:2}#montage>div:nth-child(4){--n:3}#montage>div:nth-child(5){--n:4}#montage img{width:clamp(55px,8vw,100px);height:clamp(65px,9vw,110px);object-fit:contain;filter:drop-shadow(0 5px 10px #0a1717)}#montage span{font:13px serif;color:#efdfba;text-shadow:0 2px 4px #000}@keyframes memory-glimpse{12%,70%{opacity:1;transform:translateY(-8px)}100%{opacity:.65}}
#route-map{position:absolute;z-index:2;right:3%;top:9%;width:205px;padding:9px 12px 10px;background:linear-gradient(125deg,#f6ead4c4,#ead9b9b3),url("（5）游戏关键帧+工美素材/06尾声_春深再来/尾34_01  旧地图与体验记录空白背景.png") center/cover;border:2px solid #ab8455;color:#493922;pointer-events:none;box-shadow:0 5px 20px #0007,inset 0 0 0 2px #fff2d08c;border-radius:5px;transform:rotate(-1deg)}
#route-map strong{display:flex;justify-content:space-between;align-items:baseline;font:700 14px "KaiTi",serif;letter-spacing:.12em}#route-map strong small{font:10px "KaiTi",serif;color:#796347}#route-map svg{display:block;width:100%;height:97px}#route-map .route-one{stroke:#398f94;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #fff)}#route-map .route-two{stroke:#74609f;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #fff)}#route-map circle{fill:#fff9e7;stroke:#71583d;stroke-width:2}#route-map .active circle{fill:#bd4d58;stroke:#fff3d8;stroke-width:3;filter:drop-shadow(0 1px 3px #63434c)}#route-map text{fill:#533b2d;font-size:12px;font-weight:700;text-anchor:middle;dominant-baseline:central}#route-map .active text{fill:white}#route-caption{display:block;border-top:1px solid #ae88605c;padding-top:4px;font-size:11px;color:#624b32}
#paper-ink{position:absolute;z-index:1;left:50%;top:40%;transform:translate(-50%,-50%);height:33%;writing-mode:vertical-rl;letter-spacing:.14em;color:#5a4431bb;font:clamp(17px,2.3vw,30px)/1.8 "KaiTi","STKaiti",serif;pointer-events:none}
#document-ink{position:absolute;z-index:1;left:61%;top:34%;width:190px;padding:14px 13px;background:#d4bc8ddc;border:1px solid #644b2b88;box-shadow:2px 4px 13px #18110966;color:#4a321f;font:14px/1.7 "KaiTi",serif;white-space:pre-line;transform:rotate(3deg);pointer-events:none}
@media(max-width:700px){#document-ink{top:34%;left:56%;width:135px;padding:7px;font-size:11px}#paper-ink{top:38%;height:23%}}
@media(max-width:700px){#route-map{width:125px;top:9%;right:2%;padding:4px}#route-map svg{height:62px}#route-map strong,#route-caption{font-size:9px}#stage.first-person #route-map,#stage:has(#dialogue.step-mode) #route-map{display:none}}
#cast img{position:absolute;top:clamp(-120px,-11vh,-70px);left:50%;height:clamp(650px,105vh,1000px);max-width:none;width:auto;transform:translateX(-50%);filter:drop-shadow(1px 4px 5px #151c1777)}
#stage:has(#intro:not([hidden])) #cast{display:none}
@media(max-width:700px){#cast{right:-6%;width:54vw;height:49vh}#cast img{height:85vh;top:-9vh}}
#player.facing-right img{transform:scaleX(-1)}
#mist{position:absolute;inset:0;pointer-events:none;background:rgba(203,221,215,.38);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);-webkit-mask-image:radial-gradient(circle 100px at var(--mist-x,50%) var(--mist-y,50%),transparent 25%,#000 100%);mask-image:radial-gradient(circle 100px at var(--mist-x,50%) var(--mist-y,50%),transparent 25%,#000 100%);transition:opacity .18s}
#closeup-pouch{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);width:min(25vw,300px);height:min(30vh,220px);border:1px solid transparent;border-radius:45%;background:transparent;color:#fff5d9}#closeup-pouch:hover,#closeup-pouch:focus-visible{border-color:#ead5a7;background:#f2db9620}#closeup-pouch span{display:block;position:absolute;left:50%;bottom:-32px;transform:translateX(-50%);white-space:nowrap;padding:6px 12px;background:#1a2220cc;font-size:13px}
.glitch #background{animation:glitch 2.8s ease-out 1}.glitch #overlay{animation:flash 2.8s ease-out 1}@keyframes glitch{0%,12%,25%,50%,100%{transform:translateX(0)}14%{transform:translateX(-9px)}18%{transform:translateX(7px)}28%{transform:translateX(5px)}31%{transform:translateX(-5px)}}@keyframes flash{0%,100%{filter:none}10%{background:#fff9}15%{background:#102b2b99}22%{background:#fff7}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important}}
#hotspots{position:absolute;inset:0;pointer-events:none}#hotspots button{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);border-radius:50%;width:58px;height:58px;padding:0;background:#caa65e30;border:1px solid #e4ca8a99;color:#ffebb8;box-shadow:0 0 0 8px #e4c58318,0 0 28px #c79a47b0;animation:beacon 2s ease-in-out infinite}#hotspots button:hover,#hotspots button:focus-visible{background:#d7a95fbb;color:#1b201c}#hotspots button span{position:absolute;top:110%;left:50%;transform:translateX(-50%);white-space:nowrap;background:#1a211cdb;color:#fff0d0;padding:5px 9px;border:1px solid #927a56;font-size:12px}@keyframes beacon{50%{box-shadow:0 0 0 15px #e4c58308,0 0 42px #ebbc67}}#dialogue{z-index:2}#chapter-menu{z-index:5}
#dialogue.step-mode{bottom:auto;top:10%;left:4%;width:min(610px,75%);padding:10px 20px}#dialogue.step-mode #text{font-size:16px;line-height:1.5;margin:4px 0 10px}#dialogue.step-mode #choices button{font-size:12px;padding:6px 10px}
.without-lantern #player .lantern{display:none}
#records{position:absolute;z-index:1;top:10%;right:4%;width:min(460px,52%);padding:10px 18px;background:#1b2826de;border:1px solid #af9974}#records h2{font-family:serif;letter-spacing:.15em;font-size:19px;margin:5px 0 10px}#record-list{display:flex;gap:9px;flex-wrap:wrap}#record-list button{width:72px;height:75px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;padding:2px;background:#273532d9}#record-list img{width:42px;height:45px;object-fit:contain}#record-detail{font-size:13px;line-height:1.6;min-height:38px;color:#f4e2bc}
#stage:has(#chapter-menu:not([hidden])) #dialogue,#stage:has(#chapter-menu:not([hidden])) #hotspots,#stage:has(#chapter-menu:not([hidden])) #pouch{pointer-events:none}#chapter-menu:before{content:"";position:fixed;inset:-100vh -100vw;background:#0007;z-index:-1;pointer-events:none}
#intro button{margin:10px 0;min-width:170px}#intro small{display:block;margin-top:20px}#menu-button{padding:5px 12px;font-size:12px}#chapter-menu{position:absolute;z-index:5;top:50%;left:50%;transform:translate(-50%,-50%);width:min(90%,550px);max-height:85%;overflow:auto;padding:28px;background:#152120ee;border:1px solid #b9a477;box-shadow:0 10px 70px #000a}#chapter-menu h2{font-family:serif;letter-spacing:.12em}#chapter-menu p{font-size:13px;color:#d2ccba;line-height:1.7}#chapter-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:20px 0}#chapter-list button{text-align:left;font-size:14px}

/* 收窄对白区：透出背景，只用一条细金线和说话者标签建立层次。 */
#overlay{background:linear-gradient(180deg,rgba(0,0,0,.32),transparent 35%,rgba(0,0,0,.30))}
#dialogue{
  left:5%;
  bottom:6%;
  width:min(590px,90%);
  max-height:45vh;
  overflow-y:auto;
  padding:14px 20px 15px;
  color:#172e2c;
  background:linear-gradient(115deg,rgba(238,229,199,.68),rgba(220,221,194,.48));
  border:1px solid rgba(255,248,214,.48);
  border-left:2px solid #aa7849;
  border-radius:2px 12px 12px 2px;
  box-shadow:0 7px 20px #10201b2a,inset 0 1px #fff6;
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
#dialogue::before{
  content:"";
  display:block;
  width:36px;
  height:1px;
  margin-bottom:5px;
  background:linear-gradient(90deg,#9b7041,transparent);
}
#dialogue #speaker{color:#613f27;font-weight:700;text-shadow:0 1px #fff9}
#dialogue #text{color:#172d2a;font-size:clamp(16px,1.55vw,19px);font-weight:500;line-height:1.6;margin:7px 0 11px;text-shadow:0 1px #fff8}
#dialogue #choices{gap:6px}
#dialogue #choices button{
  color:#18312e;
  background:rgba(250,246,226,.36);
  border:1px solid #755e43a1;
  border-radius:3px;
  min-height:34px;
  padding:6px 11px;
  text-align:left;
  transition:background .16s,border-color .16s,transform .16s;
}
#dialogue #choices button:hover,#dialogue #choices button:focus-visible{
  color:#17302a;
  background:#f2d296c9;
  border-color:#755e43;
  transform:translateY(-1px);
}
#dialogue #choices button:focus-visible{outline:2px solid #294f4b;outline-offset:2px}
#dialogue.step-mode{top:9%;left:4%;width:min(530px,84%);max-height:42vh;padding:11px 17px 12px}
#stage.gate-ground #dialogue{top:9%;bottom:auto;left:4%;width:min(530px,84%);max-height:42vh}
#dialogue.step-mode #text{line-height:1.5;margin:4px 0 8px}
#dialogue.step-mode #choices button{min-height:32px}
#stage.first-person #background{transform:scale(1.025)}
#stage.first-person #dialogue.step-mode{top:auto;bottom:3%;left:3%;width:min(510px,82%);max-height:31vh;background:linear-gradient(115deg,rgba(238,229,199,.7),rgba(220,221,194,.56))}
#stage.first-person #dialogue.step-mode #choices button{font-size:12px;min-height:29px;padding:4px 9px}
#stage.first-person #hotspots button{width:74px;height:74px;cursor:grab;touch-action:none;background:#ecbb6b36}
#stage.first-person #hotspots button.drag-target:active{cursor:grabbing}
#stage.first-person #hotspots button.drag-target::before{content:"";position:absolute;inset:-7px;border-radius:50%;background:conic-gradient(#f7d792 var(--progress,0%),transparent 0);mask:radial-gradient(transparent 62%,#000 64%);-webkit-mask:radial-gradient(transparent 62%,#000 64%);pointer-events:none}
#stage.first-person #hotspots button.document-target{width:clamp(115px,14vw,180px);height:clamp(105px,16vh,150px);border-radius:3px;transform:translate(-50%,-50%) rotate(-3deg);background-color:transparent;background-position:center;background-repeat:no-repeat;background-size:contain;box-shadow:none;border:0}
#stage.first-person #hotspots button.document-target:nth-child(2){transform:translate(-50%,-50%) rotate(4deg)}
#stage.first-person #hotspots button.document-target span{top:30%;white-space:pre-line;width:100%;background:transparent;border:0;color:#4b341e;font:clamp(11px,1.2vw,15px)/1.5 "KaiTi",serif;text-shadow:0 1px #fff8}
#incense-prop{position:absolute;left:50%;top:43%;height:44vh;display:flex;align-items:stretch;gap:7px;transform:translateX(-50%) rotate(-7deg);pointer-events:none;filter:drop-shadow(0 2px 3px #3a1e16aa)}
#incense-prop i{position:relative;display:block;width:3px;height:100%;background:linear-gradient(#402b1e 0 70%,#9b6441 70%);transform-origin:bottom}
#incense-prop i:first-child{transform:rotate(-5deg)}#incense-prop i:last-child{transform:rotate(5deg)}
#incense-prop.lit-1 i:first-child::before,#incense-prop.lit-2 i:nth-child(2)::before,#incense-prop.lit-3 i:last-child::before{content:"";position:absolute;bottom:100%;left:-5px;width:13px;height:20px;border-radius:60% 60% 45% 45%;background:radial-gradient(#fff5ca,#edaf58 55%,#e47a3f);box-shadow:0 0 13px #efb263aa}
#incense-prop.embers i::before{height:5px!important;width:6px!important;left:-2px!important;background:#b95034!important;box-shadow:0 0 6px #e29549!important}
#incense-prop.placing.placed-1 i:first-child,#incense-prop.placing.placed-2 i:nth-child(-n+2){visibility:hidden}
#placed-incense{position:absolute;left:50%;top:29%;height:12vh;display:flex;gap:5px;transform:translateX(-50%);pointer-events:none}
#placed-incense i{width:2px;height:100%;background:linear-gradient(#5b3b28 70%,#a56a45);box-shadow:0 0 2px #372d22}
#placed-incense i:not(:first-child){visibility:hidden}#placed-incense.placed-2 i:nth-child(2),#placed-incense.placed-3 i{visibility:visible}
#lamp-glow{position:absolute;left:50%;top:57%;width:140px;height:140px;transform:translate(-50%,-50%);pointer-events:none;background:radial-gradient(circle,#fff9ca 0 3%,#ffc36d9c 8%,#ffa95135 30%,transparent 70%);mix-blend-mode:screen}
@media(max-width:700px){
  #dialogue,#dialogue.step-mode{left:3%;width:94%;padding:11px 13px 12px}
  #dialogue{bottom:6%;max-height:48vh}
  #dialogue.step-mode{top:10%;max-height:46vh}
  #stage.first-person #dialogue.step-mode{left:3%;bottom:3%;width:94%;max-height:34vh}
  #stage.gate-ground #dialogue{top:10%;left:3%;width:94%;max-height:46vh}
  #dialogue #text{font-size:16px;line-height:1.5}
  #dialogue #choices button{font-size:13px;padding:6px 9px}
}
