:root{--ink:#102c32;--cream:#f2efdf;--gold:#d2bd84;--mint:#b5d4bf;--stage-scale:1}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#080f13;touch-action:manipulation;-webkit-user-select:none;user-select:none}
body{font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;color:var(--cream);-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;border:0;cursor:pointer;background:transparent}
button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #f6d598;outline-offset:5px}
button:disabled{opacity:.25;cursor:default}
button:hover:not(:disabled){filter:brightness(1.15)}
#viewport{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
#rotateHint{display:none;position:fixed;left:0;right:0;bottom:0;z-index:80;padding:10px 16px calc(10px + env(safe-area-inset-bottom));text-align:center;font-size:13px;letter-spacing:1px;color:#d7e2da;background:#07141acc}
@media (orientation:portrait) and (max-width:900px){#rotateHint{display:block}}
#stage{width:1600px;height:900px;position:relative;flex:none;overflow:hidden;background:#20353c;transform:scale(var(--stage-scale));isolation:isolate}

.backdrop{position:absolute;inset:0;transition:opacity .65s ease,filter .65s ease;pointer-events:none}
.backdrop img{width:100%;height:100%;object-fit:cover;display:block}
#meeting{opacity:0}
.meeting #office{opacity:0}
.meeting #meeting{opacity:1}
.wash{position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,26,31,.08),transparent 45%,rgba(6,20,24,.1) 65%,#06151d 100%);pointer-events:none;transition:background .65s ease,opacity .65s ease}
.tone-dim .backdrop img{filter:brightness(.78) saturate(.92)}
.tone-dim .wash{background:linear-gradient(180deg,rgba(4,16,22,.28),rgba(4,16,22,.08) 40%,rgba(4,14,20,.45) 100%)}
.tone-cool .backdrop img{filter:brightness(.96)}

.scene-meta{position:absolute;left:50%;top:30px;transform:translateX(-50%);display:flex;gap:16px;align-items:center;color:#264547;z-index:3;white-space:nowrap;cursor:pointer}
.scene-meta .number{font-size:14px;border-right:1px solid currentColor;padding:0 16px 0 0;letter-spacing:2px;opacity:.8}
.scene-meta h1{margin:0;font-size:24px;font-weight:500;letter-spacing:5px}
#sceneBadge{font-size:14px;letter-spacing:2px;opacity:.85;max-width:420px;overflow:hidden;text-overflow:ellipsis}
.meeting .scene-meta,.tone-dim .scene-meta{color:#d2e2df}
.brand{position:absolute;left:50%;transform:translateX(-50%);top:82px;font-size:13px;letter-spacing:3px;color:#4f6b66;z-index:3;white-space:nowrap}
.meeting .brand,.tone-dim .brand{color:#98b4b5}

/* Approved PNG portraits. Data is fixed left; Software/Sales share the right slot. */
.character{position:absolute;top:26px;width:1080px;height:1510px;z-index:2;opacity:1;transform:translateY(0);transition:opacity .48s ease,transform .48s ease;pointer-events:none}
.character::before{content:"";position:absolute;left:50%;top:100px;width:730px;height:680px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(239,224,173,.20),transparent 67%);opacity:0;transition:opacity .4s}
.character .portrait{position:absolute;top:90px;width:1080px;height:1440px;object-fit:contain;opacity:.85;filter:brightness(.73) saturate(.75) drop-shadow(0 10px 20px #071b2540);transition:opacity .4s,filter .4s}
.character.active{opacity:1;transform:translateY(-5px);z-index:2}
.character.active .portrait{opacity:1;filter:brightness(1.03) saturate(1) drop-shadow(0 10px 25px #071b2540)}
.character.active::before{opacity:1}
.role{position:absolute;top:15px;left:50%;transform:translateX(-50%);min-width:140px;text-align:center;border-bottom:1px solid #d7d9c5a0;background:#173a42e8;padding:9px 27px 11px;font-size:33px;font-weight:500;letter-spacing:6px;line-height:1.2;white-space:nowrap;color:#e6e8d9;transition:background .35s,color .35s}
.character.active .role{background:#e2d1a5;color:#17363e;border-color:#e2d1a5}
.role::after{content:"";position:absolute;top:100%;left:50%;height:23px;border-left:1px solid currentColor;opacity:.6}
#data{left:-220px}
#software,#sales{left:740px}
#data .portrait{top:80px}
#software .portrait{top:118px}
#sales.absent{opacity:0;transform:translate(100px,8px)}
#software.exited{opacity:0;transform:translate(85px,10px)}
.character.absent .role,.character.exited .role{visibility:hidden}

/* ADV window: the whole box, nameplate and pointer follow data-side. */
#dialogue{position:absolute;z-index:5;left:32px;right:auto;bottom:42px;width:1328px;min-height:260px;max-height:360px;padding:47px 54px 36px;border:0;border-top:1px solid #b9cec16b;border-radius:3px;background:linear-gradient(180deg,rgba(8,29,40,.91),rgba(6,22,32,.97));box-shadow:0 -15px 50px #071c2538;cursor:pointer;transition:opacity .3s,transform .3s,left .22s ease}
#dialogue[data-side="right"]{left:240px}
#dialogue::before{content:"";position:absolute;top:-17px;left:248px;width:32px;height:18px;background:rgba(8,29,40,.91);clip-path:polygon(0 100%,50% 0,100% 100%)}
#dialogue[data-side="right"]::before{left:auto;right:248px}
#dialogue[data-side="right"] #speaker{left:auto;right:34px}
#speaker{position:absolute;left:34px;right:auto;top:-32px;min-width:172px;height:58px;padding:8px 28px 10px;background:#d9c798;color:#173641;font-size:33px;line-height:40px;font-weight:500;letter-spacing:6px;border-top:1px solid #f7e7ba;box-shadow:0 5px 18px #071d2530;white-space:nowrap}
#line{font-size:42px;line-height:1.38;letter-spacing:.6px;margin:0;overflow-wrap:break-word;font-weight:450;color:#f4f1e5;text-shadow:0 2px 5px #0005}
#dialogue[data-side="left"] #line{text-align:left}
#dialogue[data-side="right"] #line{text-align:right}
#dialogue::after{content:"轻点 / SPACE  ▸";position:absolute;right:30px;bottom:13px;color:#cfbd91;font-size:14px;letter-spacing:2px}
#dialogue[data-side="right"]::after{right:auto;left:30px}

.scene-dim{position:absolute;inset:0;z-index:3;background:rgba(7,25,34,.63);opacity:0;transition:opacity .5s;pointer-events:none}
.interlude .scene-dim,.narrating .scene-dim{opacity:1}
.finale .scene-dim{opacity:.42}
.interlude .character,.narrating .character,.recalling .character{opacity:.28}
.finale .character{opacity:.85}
.interlude #dialogue,.narrating #dialogue,.recalling #dialogue,.finale #dialogue{opacity:0;pointer-events:none;transform:translateY(30px)}

#intertitle{position:absolute;z-index:4;inset:190px 100px 220px;display:flex;flex-direction:column;justify-content:center;align-items:center;opacity:0;pointer-events:none;transform:translateY(12px);transition:opacity .5s,transform .5s;text-align:center}
.interlude #intertitle,.finale #intertitle{opacity:1;transform:translateY(0);pointer-events:auto;cursor:pointer}
.eyebrow{font-size:18px;letter-spacing:7px;color:#cfbd91;margin-bottom:24px}
#intertitle h2{font-size:68px;line-height:1.35;letter-spacing:8px;font-weight:500;margin:0;text-shadow:0 3px 32px #0004;max-width:1300px}
#intertitle .hairline{height:1px;width:80px;background:#d9bd83;margin:32px 0 22px}
#interHint{font-size:18px;color:#dce5dfb5;letter-spacing:3px}
#intertitle.time h2,#intertitle.event h2{font-size:43px;letter-spacing:6px;font-weight:400}
#intertitle.finale h2{font-size:56px;letter-spacing:8px}

/* Stage talk and recollection are distinct from character dialogue. */
#talk,#recall{position:absolute;z-index:6;left:140px;right:140px;top:150px;bottom:120px;display:flex;flex-direction:column;opacity:0;pointer-events:none;transform:translateY(16px);transition:opacity .4s,transform .4s;cursor:pointer}
.narrating #talk,.recalling #recall{opacity:1;pointer-events:auto;transform:translateY(0)}
.panel{flex:1;display:flex;flex-direction:column;justify-content:center;padding:42px 56px 48px;border:1px solid #c9d6c855;background:linear-gradient(180deg,rgba(10,32,40,.94),rgba(7,24,32,.96));box-shadow:0 18px 50px #03101870}
#talk .panel{border-color:#d7c28a55}
#recall .panel{border-left:4px solid #d2bd84;background:linear-gradient(180deg,rgba(8,28,36,.9),rgba(6,20,28,.94))}
.panel-kicker{font-size:18px;letter-spacing:6px;color:#e2cc94;margin-bottom:22px}
#recall .panel-kicker{color:#c9d6c8}
#talkText,#recallText{margin:0;font-size:34px;line-height:1.55;letter-spacing:.4px;color:#f3f0e6;text-align:left;overflow-wrap:break-word;overflow:auto;max-height:430px;text-shadow:0 2px 5px #0004}
.panel-hint{margin-top:28px;font-size:16px;letter-spacing:2px;color:#cfbd91;text-align:right}

.toolbar{position:absolute;z-index:7;left:38px;right:38px;bottom:7px;height:30px;display:flex;align-items:center;gap:8px;font-size:14px;color:#c7d6cf9c}
.toolbar button{padding:3px 9px;line-height:24px;white-space:nowrap}
.toolbar button:hover{background:#e9e8dc13}
.toolbar .spacer{flex:1}
.toolbar .slash{width:1px;height:12px;background:#f5efda30;margin:0 5px}
#progress{width:86px;height:2px;background:#e9e3d32b;margin-right:5px}
#progress span{display:block;height:100%;width:0;background:#dcc68c;transition:width .3s}
#counter{font-size:12px;letter-spacing:2px;font-variant-numeric:tabular-nums;min-width:84px}
.toolbar .next{color:#d6dccc}

#cover,#end{position:absolute;inset:0;z-index:20;background:radial-gradient(ellipse at 70% 40%,#355b5b 0,transparent 56%),linear-gradient(125deg,#142c34,#07161e);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:100px 138px}
#cover::before,#end::before{content:"";position:absolute;inset:40px;border:1px solid #c1c6af25;pointer-events:none}
#cover .edition,#end .edition{font-size:19px;letter-spacing:5px;color:#b9c9bc;margin-bottom:36px}
#cover h2,#end h2{font-size:72px;font-weight:500;line-height:1.28;letter-spacing:6px;margin:0 0 25px;max-width:1280px}
#cover .subtitle,#end .subtitle{font-size:26px;color:#bac9c7;letter-spacing:4px;margin-bottom:60px}
.cover-actions{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.primary{font-size:24px;padding:17px 31px;background:#e5d5ac;color:#1b353b;border-radius:4px;letter-spacing:2px}
.secondary{font-size:20px;padding:18px 25px;background:#ffffff07;border:1px solid #d4d9c245;border-radius:4px;letter-spacing:1px}
.cover-note{position:absolute;bottom:77px;left:138px;font-size:17px;color:#b5c5be99;letter-spacing:2px}
.cover-mark{position:absolute;right:130px;bottom:72px;color:#c3c8b7;font-size:16px;letter-spacing:5px}
.top-right{position:absolute;top:75px;right:90px;font-size:18px;color:#d9dfcfb0;padding:12px}
.hidden{display:none!important}

#videoWrap{position:absolute;inset:0;z-index:25;background:#000;display:flex;align-items:center;justify-content:center}
video{width:100%;height:100%;object-fit:contain;background:#000}
#videoTools{position:absolute;bottom:22px;left:35px;right:35px;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;background:#071017d9;border:1px solid #ffffff20;border-radius:6px}
#videoTools button{background:#ffffff0d;border:1px solid #ffffff30;border-radius:4px;padding:10px 20px;font-size:19px}
#videoTools .label{font-size:16px;letter-spacing:2px;color:#ccd5ce;flex:1}
#videoMessage{position:absolute;top:28px;left:30px;right:30px;text-align:center;background:#172e37ed;padding:18px;font-size:24px;border:1px solid #dacba370}
#blackout{position:absolute;inset:0;z-index:18;background:#000;opacity:0;pointer-events:none;transition:opacity .6s ease}
#blackout.on{opacity:1}

#help,#jump{position:absolute;inset:0;z-index:40;background:#031018cc;display:flex;align-items:center;justify-content:center}
.help-card,.jump-card{width:920px;max-height:820px;overflow:auto;padding:46px 56px;background:#18343b;border:1px solid #cbd5c249;box-shadow:0 30px 100px #0008;border-radius:8px}
.help-card header,.jump-card header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:16px}
.help-card h2,.jump-card h2{font-size:32px;font-weight:500;margin:0;letter-spacing:4px}
.help-card header button,.jump-card header button{font-size:22px;padding:7px 14px;background:#ffffff12;border-radius:4px}
.help-card dl{display:grid;grid-template-columns:280px 1fr;font-size:22px;line-height:1.6;gap:14px 15px;margin:0}
.help-card dt{color:#dfc894}
.help-card dd{margin:0;color:#e4e7de}
.help-card p,.jump-note{font-size:18px;color:#b9c9c4;border-top:1px solid #fff2;margin:24px 0 0;padding-top:20px;line-height:1.8}
#actList{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
#actList button{width:100%;text-align:left;padding:14px 18px;background:#ffffff0c;border:1px solid #ffffff14;font-size:22px;letter-spacing:2px}
#actList button[aria-current="true"]{background:#e5d5ac;color:#1b353b;border-color:#e5d5ac}
.review-tag{font-size:13px;letter-spacing:2px;color:#e2cc94;border:1px solid #e2cc9460;padding:2px 8px;margin-left:10px;vertical-align:middle}

#toast{position:absolute;bottom:96px;left:50%;transform:translateX(-50%);z-index:60;max-width:1100px;background:#0c242ef5;border:1px solid #dcc58a70;border-radius:6px;padding:18px 26px;font-size:23px;text-align:center;box-shadow:0 5px 35px #0005}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
body.reduce-motion *,body.reduce-motion *::before,body.reduce-motion *::after{transition:none!important}
