@font-face{font-family:WenKai;src:url('assets/wenkai.woff2') format('woff2');font-display:swap}
:root{--paper:#f4e9d2;--ink:#26333c;--accent:#b84032;--garden:#ecede4;--muted:#5e655e;--line:#b3b5a5;--sheet:#f8f5eb;--rose:#946671}
*{box-sizing:border-box}body{margin:0;background:var(--garden);color:var(--ink);font:17px/1.65 WenKai,'Kaiti SC','KaiTi',serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button{touch-action:manipulation}a{color:var(--ink);text-underline-offset:3px}[hidden]{display:none!important}
.shell{width:min(1400px,96vw);margin:auto;padding:0 0 20px}.masthead{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 8px}.brand{display:flex;gap:12px;align-items:center;letter-spacing:.22em;font-size:25px}.brand img{object-fit:contain}.edition{color:var(--muted);font-size:14px;letter-spacing:.12em}.edition span{margin:0 12px}
.stage{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;background:var(--paper);border:1px solid #bab8a6;box-shadow:0 12px 35px #26333c12;isolation:isolate;container-type:inline-size}.art{position:absolute;inset:0;overflow:hidden}.garden{width:100%;height:100%;object-fit:cover;object-position:center}.portrait{position:absolute;bottom:-2%;height:96%;width:auto;max-width:none;object-fit:contain;pointer-events:none;transition:filter .28s,opacity .28s}.liniang{left:30%;transform:translateX(-50%)}.companion{left:14%;height:88%;transform:translateX(-50%);filter:brightness(.83) saturate(.8)}.portrait.speaking{filter:none}.portrait.listening{filter:brightness(.87) saturate(.85)}.stage[data-phase="cover"] .liniang{left:31%}
.scene-label{position:absolute;left:3.1%;top:4%;writing-mode:vertical-rl;display:flex;gap:14px;color:var(--ink);text-shadow:0 0 8px var(--sheet)}.scene-label span{font-size:clamp(23px,2.5vw,36px);letter-spacing:.18em}.scene-label small{font-size:14px;letter-spacing:.18em;padding-top:7px}
.panel{position:absolute;right:7%;top:50%;transform:translateY(-50%);width:34%;padding:32px 34px;background:#f8f5ebed;border-top:1px solid #939a8580;border-bottom:1px solid #939a8580;box-shadow:0 8px 25px #26333c08}.cover{background:#f8f5ebd9}.eyebrow{font-size:13px;color:var(--muted);letter-spacing:.22em}.panel h1{font-weight:400;font-size:clamp(46px,5.5vw,82px);letter-spacing:.22em;margin:6px 0 12px;line-height:1.2}.panel h2{font-weight:400;font-size:clamp(23px,2.5vw,34px);margin:9px 0 15px}.panel p{margin:0 0 23px;font-size:18px}.panel small{display:block;font-size:12px;margin-top:16px;color:var(--muted)}
.primary{background:var(--ink);color:var(--sheet);border:1px solid var(--ink);padding:10px 23px;letter-spacing:.15em;min-height:48px}.primary:hover{background:#3b4d53}.quiet{background:none;border:0;padding:8px 12px;font-size:15px;color:var(--muted)}.quiet:hover{color:var(--accent)}
.dialogue{position:absolute;right:3%;top:50%;transform:translateY(-50%);width:min(36%,470px);height:66%;min-height:0;padding:18px 17px 44px;display:flex;flex-direction:row-reverse;align-items:flex-start;gap:13px;background:linear-gradient(90deg,#f8f5eb00 0%,#f8f5eb38 40%,#f8f5eb91 100%)}.speaker,.dialogue p{writing-mode:vertical-rl;text-orientation:mixed;text-shadow:0 1px 4px #f8f5ebd9}.speaker{font-size:18px;color:var(--rose);letter-spacing:.12em;display:inline-block;min-width:0;flex:none}.dialogue p{flex:1;min-width:0;height:calc(100% - 8px);max-height:100%;font-size:clamp(18px,1.65cqw,23px);line-height:1.8;letter-spacing:.08em;margin:0;overflow:auto}.dialogue-bottom{position:absolute;left:15px;right:15px;bottom:7px;display:flex;align-items:center;justify-content:space-between;writing-mode:horizontal-tb}.next{border:0;background:none;font-size:15px;padding:4px 2px 4px 20px;min-height:34px}.next span{margin-left:16px;font-size:22px;color:var(--accent)}.next:hover{color:var(--accent)}
.choices{right:5%;width:42%;padding:28px}.choices p{font-size:16px;color:var(--muted);margin-bottom:22px}#choice-list{display:grid;gap:12px}#choice-list button{border:1px solid #9da491;background:var(--sheet);padding:13px 17px;text-align:left;font-size:18px;min-height:52px;line-height:1.6}#choice-list button:hover{background:#e7eadd;border-color:var(--ink)}.end .quiet{display:block;margin:8px 0 0;padding-left:0}.end p{font-size:17px}.end strong{font-weight:400;color:var(--rose)}.end-note{color:var(--muted)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:12px 6px;border-bottom:1px solid #b3b5a56b}.context{font-size:14px;color:var(--muted)}.toolbar div{display:flex;gap:5px}.toolbar button{border:0;background:transparent;padding:7px 11px;font-size:14px;min-height:40px}.toolbar button:hover{color:var(--accent)}footer{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:20px;padding:14px 6px}footer details{max-width:650px;text-align:right}footer details p{text-align:left}summary{cursor:pointer}dialog{width:min(720px,92vw);max-height:82svh;padding:26px;border:1px solid var(--line);background:var(--sheet);color:var(--ink);font:18px/1.8 WenKai,serif}dialog::backdrop{background:#26333c80}.dialog-head{position:sticky;top:-26px;background:var(--sheet);display:flex;justify-content:space-between;align-items:center;gap:20px;padding:12px 0;border-bottom:1px solid var(--line)}.dialog-head h2{font-size:23px;font-weight:400;margin:0}.dialog-head button{background:none;border:1px solid var(--line);padding:6px 12px;font-size:15px}#history-content article{margin:23px 0}#history-content strong{color:var(--rose);font-size:15px;font-weight:400}#history-content p{margin:3px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.load-error,.no-script{position:fixed;bottom:16px;left:5%;width:90%;padding:15px;background:var(--sheet);color:var(--accent);z-index:10}
@media(min-width:1000px) and (min-aspect-ratio:16/10){.shell{width:min(1400px,94vw,calc((100svh - 168px)*16/9))}.masthead{height:64px}}
@media(max-width:740px){.shell{width:100%;padding:0 0 max(10px,env(safe-area-inset-bottom))}.masthead{height:64px;padding:0 18px}.brand{font-size:22px;gap:8px}.edition{font-size:12px}.edition span{margin:0 3px}.stage{aspect-ratio:auto;min-height:0;overflow:visible;border-left:0;border-right:0;box-shadow:none;display:flex;flex-direction:column}.art{position:relative;height:clamp(300px,47svh,450px);flex:none}.garden{object-position:42% center}.portrait{height:99%;bottom:-7%}.liniang,.stage[data-phase="cover"] .liniang{left:56%}.companion{left:23%;height:90%}.scene-label{left:5%;top:24px}.scene-label span{font-size:28px}.scene-label small{font-size:12px}.panel,.dialogue{position:relative;inset:auto;transform:none;width:100%;height:auto;max-height:none;padding:23px 24px;border:0;border-top:1px solid #b3b5a5a0;background:var(--sheet);box-shadow:none;min-height:232px;display:block}.cover h1{font-size:44px;margin:5px 0 10px}.cover p{font-size:16px;margin-bottom:16px}.cover small{margin-top:12px}.choices h2,.end h2{font-size:25px}.choices p{margin-bottom:14px}#choice-list{gap:9px}#choice-list button{font-size:17px;padding:11px 14px}.speaker,.dialogue p{writing-mode:horizontal-tb;text-orientation:initial}.dialogue p{height:auto;max-height:none;overflow:visible;font-size:19px;line-height:1.85;min-height:5.55em;margin:9px 0 12px}.dialogue-bottom{position:static;left:auto;right:auto;bottom:auto;writing-mode:horizontal-tb}.speaker{font-size:18px}.toolbar{padding:7px 14px;flex-wrap:wrap;gap:0}.context{font-size:12px}.toolbar div{margin-left:auto}.toolbar button{font-size:13px;padding:6px 8px}footer{display:block;padding:12px 18px;font-size:12px}footer details{text-align:left;margin-top:5px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
