@font-face{font-family:Wenkai;src:url('assets/title.ttf') format('truetype');font-display:swap}
:root{color-scheme:dark;--ground:#100f0e;--ink:#f5eee3;--soft:#c6bbae;--accent:#e5bd80;--surface:#292520;--blue:#1562d6;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft Yahei',sans-serif;color:var(--ink);background:var(--ground)}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}a{color:inherit;text-underline-offset:4px}button,dialog{color:inherit}button{border:0}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:5px}::selection{color:var(--ground);background:var(--accent)}[hidden]{display:none!important}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,p{margin:0}h1,h2{text-wrap:balance}dialog{scrollbar-color:var(--soft) var(--ground);scrollbar-width:thin}
.home{max-width:1320px;margin:auto;padding:28px 48px 24px}.home-header{display:flex;justify-content:space-between;align-items:center;color:var(--soft);font-size:15px}.text-button{background:none;padding:12px;color:var(--soft);border-radius:8px}.text-button:hover{color:var(--ink);background:var(--surface)}.home-heading{margin:36px 0 32px;display:flex;align-items:baseline;gap:36px}.home-heading h1{font-family:Wenkai,serif;font-size:clamp(44px,5.5vw,72px);font-weight:400;letter-spacing:-.025em;line-height:1.2}.home-heading p{font-size:18px;color:var(--soft);line-height:1.6}.scenes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.scene{position:relative;min-height:235px;overflow:hidden;border-radius:12px;text-align:left;text-decoration:none;background:#24211e;color:var(--ink);display:flex;align-items:flex-end;padding:30px}.scene-ready{background:#292520;isolation:isolate}.scene-ready img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 55%;z-index:-2}.scene-ready::after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#100f0ef2 0%,#100f0e99 45%,#100f0e0d 100%);z-index:-1}.scene-copy{width:100%}.scene h2{font-family:Wenkai,serif;font-weight:400;font-size:30px;line-height:1.4}.scene p{font-size:16px;line-height:1.7;color:#e2d9cf;margin-top:4px}.scene-action,.scene-status{display:flex;align-items:center;gap:12px;margin-top:24px;font-size:15px}.scene-action{color:var(--accent)}.scene-ready:hover .scene-action{color:#f2cfa0}.scene-ready:hover img{filter:brightness(1.12)}.scene-pending{background:#201e1b}.scene-pending h2{color:#d4c9bd}.scene-pending p{color:#b9aea2}.scene-status{color:#b9aea2}.home-note{font-size:13px;color:var(--soft);margin-top:24px;line-height:1.6}
.player{position:fixed;inset:0;background:#000;overflow:hidden;height:100dvh;display:grid;grid-template-rows:minmax(0,1fr) calc(var(--caption-height,104px) + env(safe-area-inset-bottom))}.video-stage{position:relative;min-height:0;overflow:hidden}.caption-dock{display:grid;place-items:center;background:#000;padding:12px 5% calc(12px + env(safe-area-inset-bottom))}.source-film{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.player canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.player-tools{position:absolute;inset:18px 22px auto;display:flex;justify-content:space-between;align-items:center;z-index:4;padding-top:env(safe-area-inset-top)}.tool-right{display:flex;gap:10px}.icon-button{display:grid;place-items:center;width:44px;height:44px;border-radius:8px;color:#fff;background:#0007}.icon-button:hover{background:#000b}.icon-button:disabled{opacity:.45}.play-options{position:absolute;right:22px;top:calc(76px + env(safe-area-inset-top));z-index:6;width:190px;background:#211f1c;border-radius:12px;padding:8px;box-shadow:0 12px 35px #0007}.play-options button{display:block;width:100%;text-align:left;background:none;padding:12px 14px;min-height:46px;border-radius:8px;font-size:16px}.play-options button:hover{background:#3d352c}.bottom-shade{position:absolute;inset:auto 0 0;height:180px;background:linear-gradient(0deg,#000c,#0000);pointer-events:none}.caption{width:100%;max-width:1200px;margin:0;text-align:center;color:#fff;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft Yahei',sans-serif;font-size:clamp(18px,1.7vw,24px);font-weight:400;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;max-height:3em}
.decision{position:absolute;bottom:calc(30px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(960px,calc(100% - 64px));text-align:center;z-index:3}.decision h2{font-size:20px;font-weight:400;line-height:1.5;margin-bottom:18px;color:#fff;outline:none}.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.choices button{display:flex;align-items:center;justify-content:center;min-height:80px;padding:18px 20px;border-radius:12px;color:#181614;background:#f5eee3;font-size:20px;line-height:1.5;font-weight:500;transition:background .15s}.choices button:hover{background:#e5bd80}.replay{margin-top:16px;padding:10px 16px;color:#fff;background:#0008;font-size:15px;border-radius:8px}#game[data-mode=decision] .bottom-shade{height:310px;background:linear-gradient(0deg,#000e,#0000)}#game[data-mode=decision] #pauseButton{visibility:hidden}
.loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:16px;padding:12px 20px;background:#100f0ed9;border-radius:8px;z-index:3}.recovery{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:20px;background:#100f0ecc;z-index:5;padding:32px;text-align:center}.recovery p{max-width:40ch;line-height:1.7}.recovery button{padding:15px 30px;background:var(--ink);color:var(--ground);font-size:18px;border-radius:12px}
 dialog{border:0;background:#201c18;max-width:640px;width:calc(100% - 32px);padding:36px;border-radius:16px;max-height:calc(100dvh - 32px);overflow:auto}dialog::backdrop{background:#000b}dialog p,dialog li{font-size:16px;color:var(--soft);line-height:1.8}dialog p{margin:18px 0}dialog h2{font:400 32px/1.4 Wenkai,serif}dialog h3{font-size:18px;font-weight:500;margin-top:24px}.close{float:right}dialog a{color:var(--accent)}
.ending{position:fixed;inset:0;margin:auto;width:min(860px,calc(100% - 32px));max-width:860px;padding:58px 58px 44px;text-align:center;background:var(--blue);color:#f5fbff;border-radius:12px;box-shadow:0 24px 80px #0008}.ending::backdrop{background:#031426d9;backdrop-filter:blur(6px)}.ending-close{position:absolute;top:10px;right:10px;background:transparent;color:#d3eafa}.ending-close:hover{background:#00518f}.ending-shield{display:block;width:120px;height:120px;margin:0 auto 28px}.ending h2{font:400 clamp(22px,5.5vw,64px)/1.35 Wenkai,serif;white-space:nowrap;outline:none;margin-bottom:32px}.app-downloads{display:flex;align-items:center;flex-direction:column;gap:18px;border-top:1px solid #eed99c66;padding-top:28px}.app-downloads a{font-size:16px;color:#d3eafa;line-height:1.8}.app-downloads .download-primary{display:block;width:100%;border-radius:8px;padding:17px 12px;background:#f5fbff;color:#064f89;text-decoration:none;font-weight:600}.download-primary:hover{background:#e4f2fc}
@media(min-width:761px) and (max-height:740px){.home{padding-top:18px}.home-heading{margin:18px 0 24px}.scene{min-height:190px;padding:24px}.scene-action,.scene-status{margin-top:18px}}
@media(max-width:760px){.home{padding:20px 20px 28px}.home-header{font-size:13px}.home-heading{display:block;margin:28px 0 24px}.home-heading p{font-size:16px;margin-top:12px}.scenes{grid-template-columns:1fr;gap:14px}.scene{min-height:195px;padding:25px}.scene h2{font-size:27px}.scene p{font-size:15px}.scene-action,.scene-status{margin-top:20px}.home-note{font-size:12px}.player-tools{inset:12px 14px auto}.play-options{right:14px;top:calc(66px + env(safe-area-inset-top))}.player{--caption-height:88px}.caption-dock{padding-left:20px;padding-right:20px}.caption{font-size:18px}.decision{width:calc(100% - 40px);bottom:calc(20px + env(safe-area-inset-bottom));max-height:calc(100% - 84px);overflow:auto;scrollbar-color:var(--soft) transparent;scrollbar-width:thin}.decision h2{font-size:18px;margin-bottom:14px}.choices{grid-template-columns:1fr;gap:10px}.choices button{min-height:62px;font-size:18px;padding:14px 18px}.replay{margin-top:10px}#game[data-mode=decision] .bottom-shade{height:400px}.ending{padding:52px 20px 30px}.ending-shield{width:96px;height:96px;margin-bottom:24px}.ending h2{margin-bottom:28px}.app-downloads{padding-top:24px}.app-downloads a{font-size:15px}dialog{padding:25px}}
@media(max-height:480px){.player{--caption-height:80px}.decision{bottom:12px}.decision h2{margin-bottom:10px}.choices button{min-height:58px;padding:10px 16px}.replay{margin-top:6px;padding:6px 12px}}
.camera-float{position:absolute;right:22px;top:calc(82px + env(safe-area-inset-top));z-index:3;width:clamp(180px,30vw,384px)}.camera-preview{display:block;width:100%;aspect-ratio:16/9;padding:0;overflow:hidden;border-radius:12px;background:#000;box-shadow:0 8px 24px #0007;touch-action:none;cursor:grab;user-select:none}.camera-preview.dragging{cursor:grabbing}.camera-hint{margin:6px 0 0;padding:4px 8px;background:#000b;border-radius:8px;color:#fff;font-size:12px;font-weight:400;line-height:1.5;text-align:center;pointer-events:none}.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}
.camera-preview canvas{position:static;inset:auto;width:100%;height:100%;display:block;pointer-events:none}
.camera-preview:active{filter:brightness(.9)}
@media(max-width:760px){.camera-float{right:14px;top:calc(74px + env(safe-area-inset-top));width:clamp(112px,34vw,156px)}}
@media(max-height:480px){.camera-float{top:calc(70px + env(safe-area-inset-top));width:160px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.bottom-shade{display:none}#game[data-mode=decision] .bottom-shade{display:block}

.broadcast-start{display:inline-flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;margin-left:auto;min-height:48px;padding:12px 18px;border-radius:12px;background:var(--ink);color:#181614;font-size:16px;font-weight:500}.broadcast-start:hover{background:var(--accent)}.broadcast-exit{min-height:44px;padding:10px 16px;border-radius:8px;background:#000b;color:#fff;font-size:16px}.broadcast-exit:hover{background:#211f1c}.auto-choice{margin-top:16px;font-size:15px;font-weight:400;color:#fff;line-height:1.5}.choices button.auto-selected{background:var(--accent)}#game[data-mode=decision][data-broadcast=true] #pauseButton{visibility:visible}@media(max-width:1050px){.home-heading{flex-wrap:wrap}.broadcast-start{margin-left:0}}@media(max-width:760px){.broadcast-start{margin-top:20px}.auto-choice{font-size:14px;margin-top:12px}}
