*{box-sizing:border-box}html{color-scheme:dark;background:#101724}body{margin:0;background:radial-gradient(ellipse at 15% 0,#24463855,transparent 55%),#101724;color:#e8e3d5;font-family:system-ui,-apple-system,'Microsoft JhengHei',sans-serif;font-size:16px;line-height:1.75;min-height:100vh}button,input,select{font:inherit}button{min-height:44px;color:#e3e7da;border:1px solid #819c7959;background:#24372f;padding:9px 15px;cursor:pointer;box-shadow:inset 0 0 0 2px #15241e66;touch-action:manipulation;clip-path:polygon(0 4px,4px 4px,4px 0,calc(100% - 4px) 0,calc(100% - 4px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 4px) calc(100% - 4px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 4px),0 calc(100% - 4px))}button:hover:not(:disabled){background:#344b3f;border-color:#c9c89b}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #e2c990;outline-offset:4px}button:disabled{opacity:.4;cursor:default}.primary{background:#d4c08e;color:#1b2b24;border-color:#eadcb4;box-shadow:inset 0 0 0 2px #9d8a5d55;font-weight:600}.primary:hover:not(:disabled){background:#ead9ac}.quiet{background:transparent}.shell{max-width:1180px;margin:auto;padding:0 32px}.masthead{height:92px;display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #8ba68c30}.brand{font-family:'Noto Serif TC','PMingLiU',serif;font-size:19px;letter-spacing:.05em;display:flex;align-items:center;gap:13px;white-space:nowrap}.brand-mark{font-size:34px;color:#dfc991}.brand small{display:block;font:8px system-ui;letter-spacing:.25em;color:#9ebda6;margin-top:7px}.head-tools{display:flex;align-items:center;gap:8px}.head-tools button{font-size:12px;padding:8px 12px}#save-status{color:#adc7b0;font-size:11px;margin-right:7px;min-width:110px;text-align:right}#save-status.error{color:#efb39e}.chapter-title{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px 3px 20px}.eyebrow{font-size:10px;letter-spacing:.14em;color:#cab68b;text-transform:uppercase;margin:0 0 9px}h1,h2,h3,.dialogue-text{font-family:'Noto Serif TC','PMingLiU',serif}h1{font-size:29px;font-weight:500;letter-spacing:.05em;margin:0 0 5px;line-height:1.4}h2{font-size:24px;font-weight:500;margin:0;color:#eadbb8}h3{font-weight:500;font-size:18px;color:#e5d5ad;margin:0 0 12px}p{margin:0 0 14px}.muted{font-size:12px;color:#a5b8b0;margin:0}#chapter-progress{font-size:12px;color:#d8c49a;letter-spacing:.14em;white-space:nowrap}.dots{display:flex;gap:8px;margin-top:11px;justify-content:flex-end}.dots i{width:6px;height:6px;border:1px solid #8baa96;transform:rotate(45deg)}.dots i.done{background:#a8cfad}.dots i.current{border-color:#e5cc91;box-shadow:0 0 8px #e7d1a944}.folio{position:relative;background:#192a2e;border:2px solid #77765c;box-shadow:0 0 0 3px #101a24,0 0 0 4px #6e8b6e55,0 20px 70px #0005;overflow:clip}.folio::after{content:'';position:absolute;inset:4px;pointer-events:none;z-index:5;background:linear-gradient(#d2bf8c,#d2bf8c) 0 0/17px 2px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 0 0/2px 17px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 100% 0/17px 2px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 100% 0/2px 17px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 0 100%/17px 2px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 0 100%/2px 17px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 100% 100%/17px 2px no-repeat,linear-gradient(#d2bf8c,#d2bf8c) 100% 100%/2px 17px no-repeat;opacity:.65}.scene-bar{height:40px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 20px;background:#20342f;color:#c6d2bf;font-size:11px;border-bottom:1px solid #b8bd8a35}#scene-phase{color:#dfc997;white-space:nowrap}.stage-wrap{height:360px;position:relative;background:#141e2c;overflow:hidden}.stage-wrap canvas,.review-stage canvas{width:100%;height:100%;display:block;image-rendering:pixelated}.stage-button{position:absolute;top:12px;right:12px;width:44px;padding:0;background:#11201ed9;font-size:17px}.scene-caption{position:absolute;left:16px;top:12px;color:#d2d9c5b3;letter-spacing:.08em;font-size:10px;pointer-events:none}.dialogue{height:294px;padding:20px 26px 18px;position:relative;background:linear-gradient(100deg,#1c302e,#222c36);border-top:1px solid #9fb18f48}.dialogue-heading{height:24px;display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px}.speaker{color:#e2c992;font-size:13px;letter-spacing:.06em}.page-count{color:#92ae9e;font-size:10px}.dialogue-copy{height:168px;position:relative}.dialogue-text{font-size:20px;line-height:1.9;letter-spacing:.035em;margin:0;height:168px;overflow:auto;scrollbar-width:thin}.dialogue.has-portrait .dialogue-text{padding-right:164px}.portrait{position:absolute;right:0;top:-5px;width:146px;height:178px;background:url('/art/portrait.webp') no-repeat;mask-image:linear-gradient(#000 80%,transparent);visibility:hidden}.portrait.visible{visibility:visible}.dialogue-controls{position:absolute;left:26px;right:26px;bottom:18px;height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dialogue-controls button{width:142px;flex:0 0 142px;height:44px;font-size:14px}.reading-hint{font-size:10px;color:#9db4a7}.choice-panel,.camp,.complete,.failure{padding:25px 28px;background:#1b302e}.choice-panel>p{font-family:'PMingLiU',serif;font-size:20px}.choice-kind{font-size:11px;color:#c9b683;margin-bottom:9px}.choice-options{display:grid;gap:10px}.choice-options button{text-align:left;background:#273a35;font-size:16px;padding:13px 18px}.choice-note{font-size:12px;color:#a5bcae;margin:14px 0 0}.combat{padding:17px 24px 22px;background:#1a2b2e;border-top:1px solid #b2bf9038}.intent{display:grid;grid-template-columns:1fr auto;align-items:start;gap:20px;margin-bottom:12px}.intent .label{font-size:10px;letter-spacing:.12em;color:#cbbd91}.intent h3{font-size:17px;margin:3px 0 4px}.intent p{font-size:13px;color:#bacebe;line-height:1.7;margin:0}.intent .danger h3{color:#efc2a3}.resource-strip{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.resource{display:inline-flex;gap:6px;align-items:center;padding:4px 9px;border:1px solid #a6bd9633;background:#111f2690;font-size:12px;white-space:nowrap}.resource b{font-weight:500;font-size:15px;color:#e4d6ad}.icon{width:19px;height:19px;flex:0 0 auto;vertical-align:middle;color:inherit}.resource .icon{width:13px;height:13px}.friend{color:#b8d4b6}.foe{color:#cbb5b2}.checklist{display:flex;gap:7px 14px;flex-wrap:wrap;border-top:1px solid #a2b19b25;margin:12px 0;padding-top:10px;font-size:11px;color:#a9b6aa}.checklist .done{color:#b4d7ac}.tutorial{padding:10px 14px;border-left:2px solid #c7bc85;background:#d2c9930a;font-size:13px;color:#d4d7bc;margin-bottom:13px;line-height:1.8}.tutorial summary{cursor:pointer;min-height:32px;color:#d5d4b4}.tutorial p{margin:4px 0 0}.spells{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.spell{text-align:left;display:flex;align-items:center;gap:9px;background:#21372f;min-height:65px;padding:10px 12px;border-color:#9fb0933d}.spell .icon{color:var(--spell);width:24px;height:24px}.spell strong{display:block;font-size:14px;font-weight:500}.spell small{display:block;font-size:11px;color:#9fb9a8}.spell.selected{background:#3a493a;border-color:var(--spell);box-shadow:inset 0 0 0 1px var(--spell)}.locked-spell{font-size:12px;color:#88a394;padding:12px;border:1px dashed #829b8733;display:grid;place-items:center;min-height:65px}.target-prompt{font-size:13px;color:#c6d3bd;margin:14px 0 8px;min-height:23px}.targets{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.targets button{min-height:44px;font-size:13px;background:#152b27;border-style:dashed;padding:8px}.targets button.selected-target{border-color:#dbcda2}.utility{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}.utility button{font-size:13px}.utility .explain{margin-left:auto;font-size:11px;color:#9bb3a1}.round-log{font-size:13px;color:#b8cdb8;border-left:2px solid #91b199;background:#b8d5b005;padding:9px 12px;line-height:1.75;margin-top:14px;max-height:120px;overflow:auto}.round-log p{margin:0 0 4px}.round-log p:last-child{margin:0}.settling{font-size:12px;color:#e3cca0;padding:8px 0}.camp p,.complete p,.failure p{font-size:15px;line-height:1.9;color:#c3d0bd}.learned{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}.learned>div{padding:12px;border:1px solid #a3b7933b;background:#172b28;display:flex;gap:8px;align-items:center;font-size:13px}.learned .icon{color:#d3c490}.next-area{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:20px;border-top:1px solid #a9bb9433;margin-top:20px}.next-area small{font-size:12px;color:#a2baa6}.consequence{padding:15px 18px;border:1px solid #c3b87e3b;background:#c3b87e08;margin:18px 0;font-size:14px;color:#d3d4b8}.consequence strong{color:#e1cc9d;font-weight:500}.complete-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.complete-grid>div{padding:14px;border:1px solid #a6b8943b;background:#142a26;font-size:12px;color:#a9c1aa}.complete-grid b{display:block;font-size:25px;color:#e1cca0;font-weight:400}.ending-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.ending-list>div{padding:13px;border:1px solid #839a8040;background:#172824;font-size:12px;color:#a3b69f}.ending-list strong{display:block;color:#cbbb95;font-weight:500;margin-bottom:6px}.replay-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 18px;background:#75664136;color:#e5cf9f;font-size:12px}.replay-banner button{font-size:12px}.practice-tools{padding:16px 24px;background:#22362e;border-top:1px solid #8da5814d}.style-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.style-card{text-align:left;padding:14px;display:grid;grid-template-columns:30px 1fr;gap:9px;background:#1d322c}.style-card .icon{width:25px;height:25px;color:#d2c48e}.style-card strong{font-size:15px;font-weight:500;color:#e2d4ad}.style-card small{display:block;font-size:12px;color:#aec3ac;margin-top:3px;line-height:1.65}.style-card .example{font-size:11px;color:#8fae97}.style-card[aria-pressed=true]{border-color:#dac991;background:#3b4937}.practice-hint{font-size:12px;color:#a2b59c;margin:12px 0 0}.journal-item{padding:17px;border:1px solid #9eb18d38;background:#1a3029;margin-bottom:12px}.journal-item h3{margin-bottom:5px}.journal-item p{font-size:13px;color:#a8c0a8;margin-bottom:12px}.journal-actions{display:flex;gap:8px;flex-wrap:wrap}.journal-actions button{font-size:12px}.journal-item.locked{opacity:.55}.rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rule-card{padding:16px;background:#1b322a;border:1px solid #91ab833b}.rule-card h3{font-size:16px;margin-bottom:8px;display:flex;gap:8px;align-items:center}.rule-card p{font-size:13px;color:#b1c5ad;margin:0}.rule-card .icon{color:#d6c58e}dialog{width:min(800px,calc(100% - 28px));max-height:92dvh;padding:0;border:2px solid #8e9470;background:#192e29;color:#e1e4d3;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#090f1be0;backdrop-filter:blur(4px)}.dialog-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#253e31;padding:18px 22px;border-bottom:1px solid #afb78b50}.dialog-head button{font-size:13px;white-space:nowrap}.dialog-body{padding:22px}.review-stage{height:220px;background:#101d27}.review-line{font-family:'PMingLiU',serif;font-size:20px;line-height:1.9;background:#20372c;padding:17px;min-height:150px;border:1px solid #9bb58a38}.review-controls{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:15px}.review-controls button{font-size:13px;min-width:90px}.review-range{width:100%;height:44px;accent-color:#c7b880}.settings-line{display:flex;align-items:center;gap:13px;min-height:58px;font-size:15px}.settings-line input[type=checkbox]{width:22px;height:22px;accent-color:#c7bd8c}.settings-line input[type=range]{width:190px;min-height:44px;accent-color:#c7bd8c}.settings-note{font-size:12px;color:#a2b79e;line-height:1.9}.practice-result{padding:20px;background:#213a2b}footer{display:flex;justify-content:space-between;gap:15px;padding:20px 2px 28px;color:#829f8b;font-size:10px}#loading{position:fixed;inset:0;background:#111f2af7;z-index:30;display:grid;place-items:center;color:#e2d3ad;padding:30px}#loading[hidden]{display:none}.load-error{max-width:560px;font-size:16px}.load-error button{margin-top:15px}#toast{display:none;position:fixed;bottom:22px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 30px);background:#233f30;border:1px solid #9db78e;padding:12px 18px;z-index:40;font-size:13px;color:#e2e5d0}#toast.show{display:block}.battle-mode .stage-wrap{position:sticky;top:0;z-index:4;box-shadow:0 5px 20px #0004}.busy .folio{box-shadow:0 0 0 3px #101a24,0 0 0 4px #bfca9270,0 0 30px #aacb8522}.fade-in{animation:fadein .3s ease}@keyframes fadein{from{opacity:.5}to{opacity:1}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}@media(max-width:760px){.shell{padding:0 20px}.masthead{height:100px;gap:10px}.brand{font-size:16px}.brand-mark{font-size:28px}.head-tools{gap:5px}#save-status{font-size:10px;min-width:90px}.head-tools button{font-size:11px;padding:8px 10px}.stage-wrap{height:300px}.dialogue{padding:20px;height:294px}.dialogue-text{font-size:18px}.dialogue.has-portrait .dialogue-text{padding-right:127px}.portrait{width:112px;height:168px}.dialogue-controls{left:20px;right:20px}.intent{gap:12px}.targets{grid-template-columns:repeat(2,1fr)}.spells{grid-template-columns:repeat(2,1fr)}.combat{padding:16px}.learned{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){.shell{padding:0 12px}.masthead{height:auto;min-height:104px;flex-wrap:wrap;padding:13px 0 9px;gap:7px}.brand{font-size:17px}.brand small{font-size:7px;margin-top:4px}.head-tools{width:100%;justify-content:flex-end}#save-status{margin-right:auto;min-width:0;font-size:10px;max-width:112px;line-height:1.5;text-align:left}.head-tools button{padding:8px 10px;font-size:11px}.chapter-title{padding:18px 2px 16px;gap:8px}h1{font-size:23px;letter-spacing:.02em}.eyebrow{font-size:9px;margin-bottom:7px}.muted{font-size:10px}#chapter-progress{font-size:10px}.dots{gap:6px}.dots i{width:5px;height:5px}.scene-bar{padding:0 13px;font-size:10px;height:36px}.stage-wrap{height:226px}.scene-caption{font-size:9px;left:12px;top:10px;max-width:74%}.stage-button{top:8px;right:8px}.dialogue{height:294px;padding:18px 15px}.dialogue-heading{height:22px;margin-bottom:12px}.speaker{font-size:12px}.dialogue-text{font-size:18px;height:168px;line-height:1.85;letter-spacing:.015em}.dialogue.has-portrait .dialogue-text{padding-right:105px}.portrait{width:92px;height:160px;top:0}.dialogue-controls{left:15px;right:15px;bottom:16px}.dialogue-controls button{width:120px;flex-basis:120px}.reading-hint{font-size:9px;max-width:44%}.page-count{font-size:9px}.choice-panel,.camp,.complete,.failure{padding:22px 16px}.choice-panel>p{font-size:18px}.choice-options button{font-size:15px;padding:12px 14px}.choice-note{font-size:11px}.combat{padding:14px}.intent{display:block}.intent h3{font-size:16px}.intent p{font-size:13px}.intent>button{margin-top:9px;font-size:11px}.resource-strip{gap:6px}.resource{padding:4px 6px;font-size:10px;gap:4px}.resource b{font-size:14px}.checklist{font-size:10px;gap:5px 9px}.tutorial{font-size:12px;padding:10px}.spell{padding:10px;gap:8px;min-height:65px}.spell strong{font-size:14px}.spell small{font-size:11px}.targets button{font-size:12px}.utility .explain{width:100%;margin:0}.utility button{font-size:12px}.target-prompt{font-size:12px}.battle-mode .stage-wrap{height:210px}.round-log{font-size:12px}.camp p,.complete p,.failure p{font-size:14px}.next-area{display:block;padding-top:15px;margin-top:18px}.next-area small{display:block;margin-bottom:12px}.next-area button{width:100%}.learned>div{font-size:12px;padding:10px}.complete-grid{gap:6px}.complete-grid>div{padding:10px;font-size:10px}.complete-grid b{font-size:22px}.ending-list{grid-template-columns:1fr}.ending-list>div{font-size:12px}.style-grid{grid-template-columns:1fr}.practice-tools{padding:16px}.rule-grid{grid-template-columns:1fr}.dialog-head{padding:15px}.dialog-head h2{font-size:21px}.dialog-head button{font-size:12px;padding:8px 11px}.dialog-body{padding:16px}.review-stage{height:185px}.review-line{font-size:19px;min-height:160px}.review-controls button{min-width:0;font-size:12px;padding:8px 12px}.consequence{font-size:13px;padding:12px}footer{display:block;text-align:center;padding:15px 0 24px}footer span{display:block}.replay-banner{padding:10px 12px;font-size:11px}.replay-banner button{font-size:11px}}@media(max-width:350px){.shell{padding:0 8px}.head-tools button{padding:8px;font-size:10px}#save-status{max-width:95px}h1{font-size:21px}.dialogue-text{font-size:17px}.dialogue.has-portrait .dialogue-text{padding-right:90px}.portrait{width:78px;height:148px}.stage-wrap{height:218px}.resource{font-size:10px}.resource .icon{width:12px;height:12px}}@media(min-width:761px) and (max-height:950px){.stage-wrap{height:290px}.masthead{height:80px}.chapter-title{padding:17px 2px 16px}}
.unlock-note{font-size:11px;color:#98b5a1;margin:9px 0 0}.spells:has(>.spell:only-child){grid-template-columns:minmax(170px,1fr) 1fr}@media(max-width:480px){.spells:has(>.spell:only-child){grid-template-columns:1fr 1fr}.unlock-note{font-size:10px}}
button{min-width:44px}
