:root{--paper:#eee9da;--gold:#d8bc84;--muted:#9ca99e;--red:#d39680;--green:#b2c5ac;color-scheme:dark;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-synthesis:none;color:var(--paper)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#080e0b}button,input{font:inherit}button{color:inherit;cursor:pointer;border:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:5px}a{color:var(--gold)}[hidden]{display:none!important}body{overscroll-behavior:none}#game{isolation:isolate;position:relative;height:100dvh;min-height:600px;overflow:hidden}#world{position:absolute;inset:0;z-index:-1;overflow:hidden;background:#060d0a}#scene-photo,#scene-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(.64) saturate(.54);transition:opacity .3s,filter 1s;pointer-events:none}#scene-photo{transform:scale(1.015)}#scene-video{z-index:1;opacity:0}#scene-video.is-playing{opacity:1}.warm #scene-photo,.warm #scene-video{filter:brightness(.92) saturate(.8)}#scene-photo.photo-evidence{object-fit:contain;padding:70px 0 240px;background:#152018}.on-title #scene-photo{filter:brightness(.64) saturate(.58)}#shade{position:absolute;inset:0;z-index:3;background:linear-gradient(0deg,#070d0a 0,rgba(6,12,9,.9) 12%,transparent 62%),linear-gradient(90deg,rgba(2,8,6,.45),transparent 70%),linear-gradient(180deg,#02080566,transparent 20%)}#weather{position:absolute;inset:0;width:100%;height:100%;z-index:2;opacity:.43;pointer-events:none}#fog{position:absolute;inset:-30%;z-index:2;opacity:.17;background:radial-gradient(ellipse at 10% 50%,#78968a,transparent 40%),radial-gradient(ellipse at 70% 60%,#48695f,transparent 40%);animation:drift 23s ease-in-out infinite alternate;pointer-events:none}#grain{position:absolute;inset:0;z-index:4;opacity:.055;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.5' d='M0 0h130v130H0z'/%3E%3C/svg%3E");pointer-events:none}#blackout,#flash{position:absolute;inset:0;opacity:0;z-index:5;pointer-events:none}#blackout{background:#000;transition:opacity .12s}#flash{background:#b5c7ba}.blackout #blackout{opacity:.98}.shock #world{animation:shock .32s both}.shock #flash{animation:flash .32s both}.quiet #weather,.quiet #fog{opacity:.04}
#hud{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:26px 4%;z-index:9}.brand{font-family:"Songti SC","SimSun",serif;font-size:17px;letter-spacing:5px}.brand span{display:inline-block;font-family:system-ui;font-size:10px;letter-spacing:2px;color:var(--muted);margin-left:17px}nav{display:flex;gap:8px}nav button{min-width:38px;height:38px;border:1px solid #b0c0ad29;border-radius:50%;background:#0b140d66;font-size:17px}#journal-btn{font-size:10px;border-radius:20px;padding:0 13px}.on-title #hud{opacity:.85}#title-screen{position:absolute;left:8%;top:23%;max-width:700px}.title-kicker{font-size:11px;letter-spacing:5px;color:#b8bba9}.title-kicker:before{content:"";display:inline-block;width:30px;height:1px;background:var(--gold);margin-right:15px;vertical-align:middle}h1{font-family:"Songti SC","SimSun",serif;font-weight:400;font-size:clamp(64px,6.8vw,106px);line-height:1.18;letter-spacing:7px;margin:30px 0}h1 span{color:var(--gold);font-size:.72em}.title-quote{font-size:15px;line-height:2;color:#b4c0b5;letter-spacing:2px;margin:0 0 30px}.primary,.secondary,.choice{min-height:50px;padding:15px 25px;font-size:13px;letter-spacing:2px;transition:background .2s,transform .2s}.primary{background:var(--gold);color:#1e281e;border:1px solid var(--gold)}.primary:hover{background:#e4cc98}.primary:active,.secondary:active,.choice:active{transform:translateY(1px)}.primary span{margin-left:35px}.secondary,.choice{border:1px solid #c8cbb247;background:#18231c8a;color:#e0ddce}#continue-btn{margin-left:12px}.title-meta{font-size:10px;color:#a8b3a7;margin-top:17px;letter-spacing:2px}.title-bottom{display:flex;gap:20px;margin-top:42px;font-size:10px;color:#94a296}.title-bottom button{background:transparent;color:inherit;text-decoration:underline;font-size:10px;padding:0}
#chapter-marker{position:absolute;top:105px;left:6%;display:flex;gap:17px;max-width:75%;z-index:7;text-shadow:0 2px 10px #000}#chapter-no{color:var(--gold);font:30px/1 Georgia,serif;opacity:.65}#chapter-label{font-size:10px;letter-spacing:3px;color:#d4d4c1}#scene-caption{font-size:12px;line-height:1.8;letter-spacing:1px;color:#b8c2b7;margin:5px 0;max-width:390px}#scene-events{position:absolute;inset:0;pointer-events:none;z-index:7}#scene-events .event-label{position:absolute;top:33%;left:50%;transform:translateX(-50%);letter-spacing:4px;color:#d5d8c7;font-size:12px;text-shadow:0 2px 15px #000;background:#0b140b73;padding:10px 17px;animation:appear .5s both}
#dialogue{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);width:min(860px,88%);padding:23px 30px 12px;background:linear-gradient(120deg,#111b13ed,#09120de8);border:1px solid #b6c4ac24;border-top:1px solid #d1be8e69;z-index:8;box-shadow:0 18px 60px #0008;backdrop-filter:blur(14px)}.dialogue-head{display:flex;align-items:center;justify-content:space-between;min-height:25px}#speaker{color:var(--gold);font-size:11px;letter-spacing:3px}#voice-replay{min-height:30px;background:transparent;font-size:10px;color:#a9b9a5;padding:5px 8px}#dialogue-text{font-family:"Songti SC","SimSun",serif;font-size:23px;line-height:1.65;letter-spacing:1px;margin:6px 0 8px;min-height:38px;color:#f0ecdf}#scene-direction{font-size:12px;line-height:1.8;color:#b0b9ac;letter-spacing:.5px;margin:6px 0 17px}#interaction{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap}#interaction>.primary{min-width:225px}#interaction>.choice{flex:1;text-align:left;min-width:220px}#interaction>.choice small{display:block;color:#91a28f;letter-spacing:.5px;margin-top:5px;font-size:10px}.dialogue-foot{display:flex;align-items:center;gap:15px;margin-top:12px;font-size:9px;color:#758775;letter-spacing:1px}.dialogue-foot button{background:transparent;color:#a4b19d;padding:5px;font-size:10px;min-height:28px}#skip-voice{margin-left:auto}.dialogue-foot #hint-btn{margin-left:auto}#evidence{position:absolute;top:22%;left:50%;transform:translateX(-50%) rotate(-1deg);z-index:7;background:#d8d0b5;color:#333d31;width:min(380px,72vw);padding:25px 30px;box-shadow:0 10px 50px #000a;border:1px solid #948a67;font:16px/1.9 "Songti SC","SimSun",serif}#evidence .evidence-heading{font-size:10px;letter-spacing:3px;margin-bottom:15px;color:#65664b}#evidence strong{font-size:23px;font-weight:400}#evidence small{display:block;font-size:11px;margin-top:12px;color:#6f6e51}.connection{width:100%;display:flex;align-items:center;gap:12px}.connector{flex:1;min-height:60px;padding:10px;border:1px solid #8e9e8555;background:#142219;color:#dedecb;font-size:13px;letter-spacing:1px}.connector.selected{box-shadow:0 0 25px #b6bf6540;border-color:var(--gold);color:var(--gold)}.connector.done{border-color:#bbd4a5;background:#273b29}.cable{width:70px;height:2px;background:#4f5c47;position:relative}.cable.live{background:#d0c191;box-shadow:0 0 16px #d0c191}.timer-block{width:100%}.timer-bar{height:3px;background:#384434;margin:0 0 13px;overflow:hidden}.timer-bar i{display:block;width:100%;height:100%;background:var(--gold);transform-origin:left}.timer-block .primary{width:100%;animation:pulse 1.7s infinite}.timer-caption{font-size:11px;color:#c7b68e;margin:0 0 12px}.sound-picks{display:flex;gap:10px;width:100%;flex-wrap:wrap}.sound-picks button{flex:1;min-width:180px;min-height:55px;background:#1b2c1d;border:1px solid #7f9a7452;padding:10px 15px;color:#d6ddc9;font-size:12px}.sound-picks button.selected{border-color:var(--gold)}.sound-picks .pattern{font-size:20px;display:block;letter-spacing:5px;margin:5px 0}.receipt-target{width:100%;display:flex;align-items:center;gap:15px}.receipt-target .primary{flex:1}.receipt-target span{font-size:11px;letter-spacing:2px;color:#b6c6aa}.end-message{margin:0;color:#c2c9b6;font-size:11px;line-height:1.8}
#toast{position:absolute;bottom:20px;left:50%;transform:translate(-50%,20px);padding:11px 20px;background:#243725;border:1px solid #82987766;z-index:30;opacity:0;transition:opacity .2s,transform .2s;font-size:12px;pointer-events:none;max-width:90vw;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}dialog{padding:0;background:#111d14;border:1px solid #70856855;color:var(--paper);width:min(540px,92vw);max-height:86dvh;box-shadow:0 20px 120px #000;border-radius:3px}dialog::backdrop{background:#010703b5;backdrop-filter:blur(8px)}#modal-inner{padding:27px 30px}.modal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.modal-top h2{font-family:serif;font-weight:400;font-size:23px;margin:0}.close-modal{width:38px;height:38px;background:transparent;font-size:25px;color:#aebca6}.modal-copy{font-size:12px;line-height:1.9;color:#bac5b1}.settings-row{display:flex;align-items:center;gap:12px;margin:22px 0;font-size:12px}.settings-row label{width:78px}.settings-row input[type=range]{flex:1;min-width:70px;accent-color:var(--gold)}.settings-row output{width:36px;text-align:right;color:#b8c7ac;font-size:10px}.toggle{display:flex;gap:10px;align-items:center;font-size:12px;margin:18px 0;line-height:1.7}.toggle input{accent-color:var(--gold);width:16px;height:16px}.modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}.modal-actions button{flex:1;min-width:140px}.small-button{background:transparent;padding:12px 0;font-size:11px;color:var(--gold);text-decoration:underline}.upload-control{display:block;margin:18px 0;padding:15px;border:1px dashed #8ba07765;font-size:12px;line-height:2}.upload-control input{display:block;width:100%;font-size:11px;margin-top:10px}.cue-number{width:85px;padding:8px;background:#0b160e;border:1px solid #7f956366;color:var(--paper)}.item-card{border-bottom:1px solid #78916b30;padding:15px 0}.item-card h3{font-size:13px;font-weight:400;color:var(--gold)}.item-card p{font-size:12px;line-height:1.8;color:#b5c0ad}.muted-label{font-size:10px;line-height:1.8;color:#8fa085}
.reduced-motion #fog{animation:none}.reduced-motion .timer-block .primary{animation:none}.reduced-motion #weather{opacity:.12}.paused *{animation-play-state:paused!important}.ending #weather{opacity:0}.ending #fog{opacity:.05}.ending #chapter-marker{max-width:50%}.ending #scene-photo,.ending #scene-video{object-position:58% 38%}.on-title #dialogue{display:none}
@keyframes drift{from{transform:translateX(-5%)}to{transform:translateX(7%)}}@keyframes shock{0%{transform:translate(0,0)}22%{transform:translate(-6px,3px)}50%{transform:translate(4px,-2px)}100%{transform:translate(0,0)}}@keyframes flash{0%{opacity:.24}30%{opacity:0}100%{opacity:0}}@keyframes pulse{0%,100%{box-shadow:0 0 0 0 #ccb37500}50%{box-shadow:0 0 0 5px #ccb37522}}@keyframes appear{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:760px){#game{min-height:600px}#hud{padding:18px 18px;padding-top:max(18px,env(safe-area-inset-top))}.brand{font-size:14px;letter-spacing:3px}.brand span{display:block;margin:5px 0 0;font-size:8px;letter-spacing:1.5px}nav{gap:6px}nav button{width:35px;min-width:35px;height:35px}#journal-btn{padding:0 9px;font-size:9px}#chapter-marker{top:101px;left:6%;gap:12px;max-width:85%}#chapter-no{font-size:24px}#chapter-label{font-size:9px;letter-spacing:2px}#scene-caption{font-size:10px;max-width:270px}#title-screen{left:8%;top:25%;max-width:86%}.title-kicker{font-size:9px;letter-spacing:2px}.title-kicker:before{width:19px;margin-right:8px}h1{font-size:clamp(48px,13vw,82px);letter-spacing:3px;margin:26px 0 24px}.title-quote{font-size:12px;line-height:2;margin-bottom:25px}.title-meta{font-size:9px;letter-spacing:1px}.title-bottom{margin-top:30px;gap:15px;font-size:9px;line-height:1.8}.title-bottom button{font-size:9px}#start-btn{padding:14px 18px;min-height:51px;font-size:12px}.primary span{margin-left:25px}#continue-btn{display:block;margin:12px 0 0;font-size:11px;padding:12px 18px;min-height:42px}#dialogue{bottom:max(15px,env(safe-area-inset-bottom));width:92%;padding:15px 18px 8px}#dialogue-text{font-size:19px;line-height:1.6;letter-spacing:.5px;min-height:30px;margin-top:4px}#scene-direction{font-size:11px;line-height:1.7;margin:8px 0 14px}.dialogue-head{min-height:22px}#speaker{font-size:10px;letter-spacing:2px}#interaction{gap:8px}#interaction>.primary,#interaction>.choice{width:100%;min-width:unset;font-size:12px;min-height:48px;padding:13px 16px}.primary,.secondary{font-size:12px;letter-spacing:1px}.dialogue-foot{margin-top:6px;font-size:8px;gap:5px}.dialogue-foot button{font-size:9px}#voice-replay{font-size:9px;min-height:27px;padding:3px 7px}#evidence{top:20%;width:71%;padding:18px 22px;font-size:13px;line-height:1.8}#evidence strong{font-size:19px}#evidence small{font-size:10px}#scene-photo.photo-evidence{padding:140px 14px 290px;object-position:center}#scene-photo,#scene-video{height:77%;object-position:52% 40%}#shade{background:linear-gradient(0deg,#080f0b 12%,#080f0be8 27%,transparent 67%),linear-gradient(180deg,#050d0755,transparent 24%)}.on-title #scene-photo,.on-title #scene-video{height:100%;object-position:53% center}.on-title #shade{background:linear-gradient(90deg,#04100b99,transparent),linear-gradient(0deg,#08110c 3%,transparent 75%)}.connection{gap:8px}.connector{font-size:11px;min-height:57px;padding:10px 8px}.cable{width:30px}.sound-picks{gap:8px}.sound-picks button{min-width:120px;font-size:11px}.sound-picks .pattern{font-size:18px}.receipt-target{gap:10px}.receipt-target span{font-size:9px;letter-spacing:1px}.receipt-target .primary{font-size:11px;padding:13px}#modal-inner{padding:20px 23px}.settings-row{margin:17px 0}.ending #chapter-marker{max-width:60%;top:95px}.ending #scene-photo,.ending #scene-video{height:73%;object-position:58% 28%}}
@media(max-height:730px){#title-screen{top:21%}h1{margin:18px 0;font-size:clamp(48px,6.5vw,78px)}.title-bottom{margin-top:20px}#dialogue{padding-top:12px;padding-bottom:7px}#dialogue-text{font-size:18px}#scene-direction{margin-bottom:10px}#chapter-marker{top:87px}#evidence{top:22%;font-size:12px;padding:14px 20px}#evidence .evidence-heading{margin-bottom:7px}#evidence small{margin-top:7px}}
@media(prefers-reduced-motion:reduce){#fog{animation:none}*{scroll-behavior:auto!important}}

/* First-person eyelids are a real-time interface effect, not a generated GIF. */
#eye-top,#eye-bottom{position:absolute;left:-10%;width:120%;height:51%;background:#000;z-index:19;pointer-events:none;display:none;box-shadow:0 0 35px 35px #000}
#eye-top{top:-1%;border-radius:0 0 35% 35%}#eye-bottom{bottom:-1%;border-radius:35% 35% 0 0}
.waking #eye-top,.waking #eye-bottom{display:block;animation-duration:4.2s;animation-fill-mode:forwards;animation-timing-function:ease-in-out}.waking #eye-top{animation-name:eye-top}.waking #eye-bottom{animation-name:eye-bottom}.waking #dialogue,.waking #chapter-marker,.waking #hud{opacity:0}.waking #scene-photo{animation:wake-focus 4.2s both}
#scene-photo{transition:opacity .3s,filter .8s,transform .8s}.mirror-covered #scene-photo,.mirror-covered #scene-video{filter:blur(12px) brightness(.35) saturate(.35)}.mirror-reveal #scene-photo{animation:mirror-focus 1.6s both}.memory #scene-photo,.memory #scene-video{filter:brightness(.82) sepia(.3) saturate(.6)}
.saluting #dialogue,.saluting #chapter-marker,.saluting #hud{display:none!important}.saluting #scene-photo,.saluting #scene-video{height:100%;object-fit:cover;object-position:center;filter:brightness(1) saturate(.92)}.saluting #shade{background:linear-gradient(0deg,#10210b66,transparent 50%)}.saluting #weather,.saluting #fog,.saluting #grain{display:none}#salute{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#07100be8;opacity:0;transition:opacity 2s}#salute.visible{opacity:1}#salute h2{font-family:"Songti SC","SimSun",serif;font-size:clamp(65px,12vw,150px);font-weight:400;letter-spacing:.35em;margin-left:.35em;color:#e6dfcb}#salute button{position:absolute;bottom:max(40px,env(safe-area-inset-bottom));background:transparent;border-bottom:1px solid #b2bca348;padding:12px 18px;font-size:11px;letter-spacing:3px;color:#a8b69d}
@keyframes eye-top{0%,13%{transform:translateY(0)}30%{transform:translateY(-35%)}39%{transform:translateY(-8%)}100%{transform:translateY(-140%)}}@keyframes eye-bottom{0%,13%{transform:translateY(0)}30%{transform:translateY(35%)}39%{transform:translateY(8%)}100%{transform:translateY(140%)}}@keyframes wake-focus{0%{filter:blur(14px) brightness(.2)}40%{filter:blur(6px) brightness(.4)}100%{filter:blur(0) brightness(.64) saturate(.54)}}@keyframes mirror-focus{0%{filter:blur(12px) brightness(.35)}100%{filter:blur(0) brightness(.75) saturate(.6)}}
@media(max-width:760px){.saluting #scene-photo,.saluting #scene-video{object-fit:contain;background:#d7d9c5;height:100%}#salute h2{font-size:78px}.waking #eye-top,.waking #eye-bottom{animation-duration:3.5s}}

/* Keep the faces and the objects above the dialogue panel. */
#scene-frame{position:absolute;top:0;left:0;right:0;bottom:var(--panel-reserve,270px);overflow:hidden;transition:bottom .25s;background:#080e0b}
#scene-photo,#scene-video{height:100%;object-fit:contain}
.on-title #scene-frame,.saluting #scene-frame{bottom:0}
.on-title #scene-photo,.on-title #scene-video{object-fit:cover}
.ending #scene-photo,.ending #scene-video{height:100%}
#shade{background:linear-gradient(0deg,#070d0a 0,rgba(6,12,9,.85) 8%,transparent 36%),linear-gradient(180deg,#02080577,transparent 24%)}
@media(max-width:760px){#scene-photo,#scene-video{height:100%}#scene-frame{bottom:var(--panel-reserve,265px)}.on-title #scene-frame,.saluting #scene-frame{bottom:0}.saluting #scene-photo,.saluting #scene-video{object-fit:contain;background:#142017}#shade{background:linear-gradient(0deg,#080f0b 0,transparent 36%),linear-gradient(180deg,#050d0777,transparent 25%)}}
.saluting #hud{display:flex!important;justify-content:flex-end;z-index:21}.saluting #hud .brand,.saluting #journal-btn{display:none}.saluting #hud nav button{opacity:.55}
@media(max-width:760px){
  nav button{width:44px;min-width:44px;height:44px}
  #journal-btn{width:auto;min-width:60px;white-space:nowrap;padding:0 10px}
  #scene-photo,#scene-video{object-fit:cover;object-position:center 20%}
  #chapter-marker{top:auto;bottom:calc(var(--panel-reserve,260px) - 14px);left:6%;height:18px;align-items:center;gap:8px;max-width:90%}
  #chapter-no{font-size:14px;line-height:18px}#chapter-label{font-size:9px;line-height:18px}#scene-caption{display:none}
  .ending #chapter-marker{top:auto}
}
@media(max-width:760px){.memory #scene-photo,.memory #scene-video{object-fit:contain}}

/* V4: the actual portrait, object and mirror remain fully visible. */
#scene-backdrop{position:absolute;inset:-30px;background-size:cover;background-position:center;filter:blur(28px) brightness(.22) saturate(.4);opacity:.7;pointer-events:none}
#scene-frame{top:78px;transition:bottom .2s;isolation:isolate}
.scene-interaction-host{top:78px}
.on-title #scene-frame,.saluting #scene-frame{top:0}
.on-title #scene-backdrop{display:none}
#scene-photo,#scene-video{object-fit:contain;filter:brightness(.82) saturate(.62)}
.warm #scene-photo,.warm #scene-video{filter:brightness(.98) saturate(.82)}
#chapter-marker{top:83px;left:4%;max-width:24%}
#scene-caption{font-size:11px}
#scene-direction:empty{display:none}
#dialogue-text:empty{display:none}
#dialogue-head:empty{display:none}
.arrival #scene-frame{animation:arrival .6s cubic-bezier(.15,.8,.25,1) both}
.memory-flash #flash{animation:memory-cut .24s linear both}
.mirror-reveal #scene-photo{animation:none;filter:brightness(.84) saturate(.6)}
.si-hint{bottom:7px;font-size:10px}
#scene-touch .si-after{filter:brightness(.84) saturate(.6)}
@keyframes arrival{0%{transform:scale(1.2) translateY(2%);filter:blur(3px)}35%{transform:scale(1.035) translateY(-.4%);filter:blur(0)}100%{transform:scale(1)}}
@keyframes memory-cut{0%{opacity:.48}100%{opacity:0}}
@media(max-width:760px){
 #scene-frame,.scene-interaction-host{top:76px}
 #scene-photo,#scene-video{object-fit:contain}
 #chapter-marker{top:auto;left:6%;max-width:90%}
 #chapter-no{font-size:12px}
 #dialogue{padding:12px 16px 7px}
 #dialogue-text{font-size:19px;line-height:1.5;min-height:27px;margin:4px 0 6px}
 #scene-direction{font-size:11px;line-height:1.65;margin:5px 0 10px}
 .dialogue-head{min-height:20px}
 .si-hint{max-width:94%;padding:5px 8px;font-size:9px;letter-spacing:0;bottom:4px}
 .saluting #scene-frame{top:0}
 .saluting #scene-photo,.saluting #scene-video{object-fit:contain}
}
@media(max-height:710px) and (max-width:760px){
 #scene-frame,.scene-interaction-host{top:70px}
 #hud{padding-top:12px;padding-bottom:10px}
 #dialogue{padding:9px 14px 6px}
 #dialogue-text{font-size:17px;line-height:1.45;margin:2px 0 4px}
 #scene-direction{font-size:10px;line-height:1.6;margin:3px 0 7px}
 .dialogue-foot{margin-top:3px}
 #interaction>.primary{min-height:46px;padding:11px 12px}
}
.stumbling #scene-frame{animation:stumble .7s ease-out both}
@keyframes stumble{0%{transform:translateY(0)}26%{transform:translateY(-20px) rotate(-1.3deg)}65%{transform:translateY(4px) rotate(.3deg)}100%{transform:none}}
.portrait-scene #weather{opacity:.18}.memory #weather{opacity:.06}
#interaction>.secondary{min-width:130px}
@media(max-width:760px){#interaction>.secondary{min-height:44px;flex:1;padding:10px 12px;font-size:11px}#interaction:has(>.secondary)>.primary{width:auto;flex:1.3;padding:10px 12px}}
.awaiting-dawn #scene-frame{opacity:0}
/* The input surface and its after-image share the photograph's exact viewport. */
#scene-touch.scene-interaction-host{top:78px}
.mirror-covered #scene-photo{filter:brightness(.74) saturate(.55)}
@media(max-width:760px){#scene-touch.scene-interaction-host{top:76px}}
@media(max-height:710px) and (max-width:760px){#scene-touch.scene-interaction-host{top:70px}}

/* V5: let the photographed lighting carry the scene; keep picture and input aligned. */
#game #dialogue-text,#game #dialogue-text:empty{display:block;min-height:1.5em}
.arrival #scene-frame{animation:none}
.cutblink #scene-frame{animation:blink-cut .22s linear both}
@keyframes blink-cut{0%,45%{opacity:0}100%{opacity:1}}
:root{--paper:#f1eee8;--muted:#aaa8a1;--green:#c0beb7}
html,body,#world{background:#080808}
#game{--scene-top:60px;--scene-bottom:max(0px,calc(var(--panel-reserve,220px) - 28px));min-height:520px}
#scene-frame,#scene-touch.scene-interaction-host{top:var(--scene-top);bottom:var(--scene-bottom)}
#scene-frame{background:#080808;transition:none}
#scene-backdrop{display:none}
#game #scene-photo,#game #scene-video,#game #scene-touch .si-after{filter:none}
#scene-photo{transition:opacity .12s linear;object-fit:contain}
#shade{background:linear-gradient(0deg,#080808 0,rgba(8,8,8,.35) 7%,transparent 18%)}
#grain{opacity:.016}
#fog{display:none}
#weather{opacity:.17}
.portrait-scene #weather{opacity:.06}
.memory #weather{opacity:0}
#hud{height:var(--scene-top);padding:6px 24px;background:#080808;gap:12px}
.brand{font-size:13px;letter-spacing:2px;line-height:1.25;color:#c9c6bd}
.brand span{font-size:9px;letter-spacing:1px;color:#92918b;margin-left:10px}
nav{gap:5px}
nav button{min-width:44px;width:44px;height:44px;background:transparent;border-color:#b9b6ac24;color:#dedbd4}
#journal-btn{width:auto;min-width:54px;padding:0 10px}
#chapter-marker{display:none}
#dialogue{bottom:12px;width:min(820px,92%);padding:12px 20px 6px;background:#0c0c0cf2;border:0;border-top:1px solid #aaa39733;box-shadow:none;backdrop-filter:none}
.dialogue-head{min-height:20px}
#speaker{color:#bcb6a7;letter-spacing:1px}
#voice-replay{color:#aba79d;min-height:28px}
#dialogue-text{font-size:21px;line-height:1.5;letter-spacing:.2px;margin:3px 0 7px;min-height:0;color:#f1eee8;text-shadow:0 1px 2px #000}
#scene-direction{font-size:11px;line-height:1.6;letter-spacing:0;color:#aaa79f;margin:4px 0 9px}
#interaction{gap:8px}
#game:not(.on-title) #interaction>.primary{background:#252522;color:#f1eee8;border:1px solid #aaa39670;min-height:46px;padding:11px 16px;letter-spacing:.6px}
#game:not(.on-title) #interaction>.primary:hover{background:#353530}
#game:not(.on-title) #interaction>.secondary{background:#111;color:#d3d0c8;border-color:#716e644d;min-height:46px}
.dialogue-foot{margin-top:3px;min-height:24px;color:#85817a}
.dialogue-foot button{color:#a8a397;min-height:28px}
#save-status{font-size:8px;letter-spacing:0;color:#726e65}
#scene-touch .si-hint{display:none}
#scene-touch .si-wipe .si-hint{display:block;bottom:6px;background:#080808bf;border-color:#a5a09629;color:#d8d4ca;font-size:10px;padding:4px 8px;letter-spacing:0}
#scene-touch .si-target-ring{border-color:#e5dfce80;box-shadow:0 0 8px #0009;animation-duration:4s}
#scene-touch .si-target-ring::after{display:none}
#scene-touch .si-target-dot{background:#e5dfce;box-shadow:none}
#scene-touch .si-lamp .si-light{background:radial-gradient(circle at var(--si-beam-x) var(--si-beam-y),transparent 0,rgba(0,0,0,.13) calc(var(--si-beam-size)*.55),rgba(0,0,0,.76) var(--si-beam-size),rgba(0,0,0,.9) 160%)}
dialog{background:#111;border-color:#77726859}
dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}
.modal-copy,.item-card p{color:#bcb8ae}
#sound-caption{position:absolute;left:50%;bottom:calc(var(--scene-bottom) + 14px);transform:translateX(-50%);z-index:8;pointer-events:none;width:max-content;max-width:82%;margin:0;padding:4px 9px;background:#080808bf;color:#d8d4ca;font-size:11px;line-height:1.5;letter-spacing:.5px;text-align:center;border-radius:2px}
.saluting #sound-caption,.on-title #sound-caption{display:none}
.clue-inscription{position:absolute;z-index:11;transform:translate(-50%,-50%) rotate(-5deg);color:#241b10;font-family:"Songti SC","STSong",serif;font-weight:700;letter-spacing:.1em;text-shadow:0 1px 0 #c7aa6b44;pointer-events:none;white-space:nowrap}
.storm-memory{position:absolute;inset:0 0 var(--panel-reserve,270px);background-size:contain;background-repeat:no-repeat;background-position:center;background-color:#020403;animation:storm-return .9s ease both}
@keyframes storm-return{0%,100%{opacity:0}18%,55%{opacity:.85}80%{opacity:.12}}
.paused .storm-memory{animation-play-state:paused}
#game.showing-clue #scene-direction{display:block!important;white-space:pre-line}
.showing-clue .ci-hint{display:none}
#game:has(.ci-root:not(.is-done)) #sound-caption{bottom:calc(var(--scene-bottom) + 42px)}
.memory-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.memory-pair figure{margin:0;background:#080808}
.memory-pair img{display:block;width:100%;aspect-ratio:3/4;object-fit:contain}
.memory-pair figcaption{font-size:10px;text-align:center;color:#bcb6a7;padding:5px}
#toast{background:#22211e;border-color:#817b6d66;color:#e5e0d4}
.on-title #hud{background:transparent}
.on-title #scene-frame,.saluting #scene-frame{top:0;bottom:0}
.on-title #shade{background:linear-gradient(90deg,#050505aa,transparent 95%),linear-gradient(0deg,#080808 0,transparent 65%)}
.saluting #hud{height:auto;background:transparent}
.saluting #shade{background:linear-gradient(0deg,#0003,transparent 35%)}
#salute{background:#050505ef}
@keyframes wake-focus{0%{filter:blur(11px) brightness(.15)}40%{filter:blur(4px) brightness(.5)}100%{filter:blur(0) brightness(1)}}
@media(max-width:760px){
 #game{--scene-top:max(52px,calc(env(safe-area-inset-top) + 48px));--scene-bottom:max(0px,calc(var(--panel-reserve,195px) - 28px));min-height:520px}
 #scene-frame,#scene-touch.scene-interaction-host{top:var(--scene-top);bottom:var(--scene-bottom)}
 #hud{padding:4px 12px;padding-top:max(4px,env(safe-area-inset-top))}
 .brand{font-size:11px;letter-spacing:1.5px;max-width:160px}
 .brand span{display:block;font-size:8px;letter-spacing:.3px;margin:2px 0 0;line-height:1.2}
 nav button{width:44px;min-width:44px;height:44px}
 #journal-btn{min-width:50px;font-size:9px;padding:0 8px}
 #dialogue{bottom:max(9px,env(safe-area-inset-bottom));width:94%;padding:8px 12px 3px}
 #dialogue-text{font-size:18px;line-height:1.45;margin:2px 0 7px;min-height:0}
 #scene-direction{font-size:11px;line-height:1.5;margin:3px 0 8px}
 #game:has(#scene-touch .si-root) #scene-direction{display:none}
 #interaction>.primary,#interaction>.secondary{font-size:12px;line-height:1.5;min-height:46px}
 .dialogue-head{min-height:20px}
 #voice-replay{font-size:9px;padding:3px 4px;min-height:27px}
 .dialogue-foot{min-height:25px;gap:6px;margin-top:2px}
 #save-status{display:none}
 .dialogue-foot #skip-voice{margin-left:0}
 .dialogue-foot #hint-btn{margin-left:auto}
 #scene-touch .si-wipe .si-hint{font-size:9px;max-width:88%;line-height:1.5}
 .on-title #scene-frame,.saluting #scene-frame{top:0;bottom:0}
}
@media(max-height:710px) and (max-width:760px){
 #dialogue{padding-top:5px;padding-bottom:2px}
 #dialogue-text{font-size:17px;line-height:1.4;margin:1px 0 6px}
 #scene-direction{font-size:10px;line-height:1.5;margin:3px 0 6px}
 #game:not(.on-title) #interaction>.primary{min-height:44px;padding:10px 12px}
 #game:not(.on-title) #interaction>.secondary{min-height:44px}
}
/* Keep all seven comrades visible when the ending is resized or rotated. */
#game.saluting #scene-photo,#game.saluting #scene-video{object-fit:contain;object-position:center;background:#142017}
/* V8: transitions preserve frame geometry; the next action appears after the memory resolves. */
#game:not(.on-title) #dialogue #scene-direction{display:block!important}
.memory-transition #dialogue{opacity:0;pointer-events:none;transition:opacity .12s}
.memory-transition #scene-touch,.memory-transition #sound-caption{visibility:hidden}
.gate-dust{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.gate-dust i{position:absolute;left:var(--x);top:-3%;width:3px;height:5px;background:#cbbca0aa;border-radius:30%;box-shadow:0 0 6px #d0b58e55;animation:gate-dust-fall 2.7s var(--delay) cubic-bezier(.25,.35,.65,1) both}
@keyframes gate-dust-fall{0%{opacity:0;transform:translate(0,0) rotate(0)}15%{opacity:.75}100%{opacity:0;transform:translate(24px,var(--fall)) rotate(190deg)}}
#ending-caption{position:absolute;z-index:12;left:50%;bottom:max(7%,calc(env(safe-area-inset-bottom) + 22px));transform:translateX(-50%);width:min(86%,720px);padding:16px 20px;color:#fff9e9;font:400 clamp(16px,2.1vw,24px)/1.85 "Songti SC","STSong",serif;letter-spacing:.08em;text-align:center;text-wrap:balance;background:linear-gradient(90deg,transparent,#080808aa 15%,#080808aa 85%,transparent);text-shadow:0 2px 8px #000}
#salute{box-sizing:border-box;padding:76px 24px 88px;gap:0;background:linear-gradient(160deg,#070908f5,#11100bf5);text-align:center;overflow-y:auto}
#salute .salute-kicker{margin:0 0 18px;color:#a89b7b;font:10px/1.7 system-ui,sans-serif;letter-spacing:.3em}
#salute h2{font-size:clamp(62px,10vw,110px);line-height:1.2;letter-spacing:.26em;margin:0 0 22px .26em;font-weight:400}
#salute-dedication{margin:0 0 19px;color:#eee4cd;font:400 clamp(18px,3vw,26px)/1.6 "Songti SC","STSong",serif;letter-spacing:.1em}
#salute .salute-body{margin:0;max-width:600px;color:#c8c1b2;font:14px/2 "Songti SC","STSong",serif;white-space:pre-line;text-wrap:balance}
#salute-names{margin:26px 0 20px;white-space:pre-line;font-size:11px;line-height:2.1;letter-spacing:.08em;color:#b5aa90}
#salute .salute-note{max-width:460px;margin:0;color:#827c70;font-size:10px;line-height:1.9;text-wrap:balance}
#salute button{bottom:max(24px,env(safe-area-inset-bottom));min-height:44px;padding:10px 16px;font-size:11px;letter-spacing:.14em}
@media(max-width:760px){#ending-caption{font-size:16px;line-height:1.8;padding:12px 9px;bottom:8%}#salute{padding:66px 23px 84px}#salute h2{font-size:66px;margin-bottom:21px}#salute-dedication{font-size:19px;letter-spacing:.04em}#salute .salute-body{font-size:13px;max-width:300px}#salute-names{margin:20px 0 18px}#salute .salute-note{font-size:10px}}
@media(max-height:640px){#salute{padding-top:52px;padding-bottom:70px}#salute .salute-kicker{margin-bottom:10px}#salute h2{font-size:54px;margin-bottom:13px}#salute-dedication{margin-bottom:11px}#salute-names{margin:13px 0}#salute .salute-body{font-size:12px}}
