@font-face{font-family:Adventure Serif;src:url('./assets/narrative-serif.woff2') format('woff2');font-weight:200 900;font-display:swap}
:root{--gold:#c9ad72;--gold-light:#eee0ba;--ink:#11100e;--text:#e5decc;--muted:#a99e85;--line:#baa06c36;--serif:'Adventure Serif','Noto Serif SC','STSong',serif;--safe:clamp(22px,2.6vw,72px)}
html,body{background:#11100e;color:var(--text)}
.game{background:#14120e}.world-stage{background:#25221b}.scene-vignette{background:linear-gradient(180deg,#090807b3 0%,#09080715 24%,transparent 46%,#09080700 58%,#0908078a 76%,#090807ee 100%),linear-gradient(90deg,#07060650,transparent 23%,transparent 80%,#0706063a)}.film-grain{opacity:.035}
.hud-top{top:clamp(22px,3.3vh,46px);align-items:center}.game-brand{gap:clamp(12px,1.1vw,24px)}.game-brand .brand-emblem{width:clamp(39px,4.7vh,66px);height:clamp(46px,5.4vh,76px);filter:drop-shadow(0 1px 6px #000)}.game-brand h1{font-family:var(--serif);font-size:clamp(23px,2.9vh,41px)!important;font-weight:600;letter-spacing:.16em;line-height:1.3;text-shadow:0 2px 10px #000;color:#efdfb6}.game-brand h1 span{margin-left:0}.game-brand small{color:#b6a479;font-family:Georgia,serif;letter-spacing:.55em;font-size:clamp(9px,1.05vh,15px);margin-top:10px;padding-left:1px}
.chapter-hud{gap:15px;font-size:clamp(13px,1.7vh,23px);color:#c4b99f;max-width:40%;letter-spacing:2px}.chapter-hud::before,.chapter-hud::after{content:'';width:clamp(25px,4vw,100px);height:1px;background:linear-gradient(90deg,transparent,#a08b5a88);flex-shrink:0}.chapter-hud::after{transform:rotate(180deg)}.chapter-rule{height:3px;width:3px;background:#b79a5d;transform:rotate(45deg)}
.hud-tools{gap:0;padding:3px 9px;background:linear-gradient(#1c1a15c9,#0c0b0ac9);border:10px solid transparent;border-image:url('./assets/engraved-frame.svg') 16 stretch;box-shadow:0 4px 22px #0003}.hud-button{width:clamp(35px,3.6vw,62px);height:clamp(30px,3.6vh,50px);padding:clamp(7px,.75vh,11px) clamp(9px,1vw,20px);border:0;border-right:1px solid #c1a7742f;background:transparent;border-radius:0;color:#c1b18b}.hud-button:last-child{border-right:0}.hud-button:hover{background:#dcc28e0e;color:#f3dfae}.hud-button>svg{stroke-width:1.6}
.quest-hud{top:clamp(119px,15vh,205px);padding-left:17px;max-width:30%;border-left:1px solid #bba16b8c;gap:11px;text-shadow:0 2px 8px #000}.quest-type{font:clamp(12px,1.5vh,21px) var(--serif);letter-spacing:3px}.quest-type i{width:4px;height:4px;margin-left:-20px;margin-right:12px;border:1px solid #d8bc7c;background:#252016}.quest-hud strong{font:400 clamp(14px,1.95vh,27px) var(--serif);line-height:1.6;color:#e4d8b8}.quest-hud>span:last-child{display:none}.quest-hud::after{content:'';width:80%;height:1px;background:linear-gradient(90deg,#b49b6680,transparent);margin-top:8px}
.identity-hud{top:clamp(124px,15vh,210px);gap:17px;max-width:26%;text-shadow:0 2px 7px #000}.identity-portrait{order:2;width:clamp(46px,6.6vh,90px);height:clamp(46px,6.6vh,90px);border:3px double #b9a374;border-radius:50%;background:#a89f88 url('./assets/hero-reference.png') 22% 28%/270% no-repeat;box-shadow:0 0 0 4px #14130f,0 0 0 5px #8e7c4c,0 3px 15px #0008;flex-shrink:0;filter:sepia(.3)}.identity-hud small{font-size:clamp(10px,1.2vh,16px);color:#9e9278;letter-spacing:3px}.identity-hud #character-tag{font:clamp(13px,1.6vh,22px) var(--serif);line-height:1.7;max-width:220px}
.world-prompt{border:0;border-bottom:1px solid #ba9f6870;background:linear-gradient(90deg,transparent,#17140ee6 20%,#17140ee6 80%,transparent);color:#dbcb9f;box-shadow:none;padding:8px 19px;font:clamp(10px,1.15vh,16px) var(--serif);backdrop-filter:none;letter-spacing:1px}.world-prompt.near{box-shadow:0 5px 20px #b7943322}
.dialogue-hud{left:var(--safe);right:var(--safe);bottom:clamp(43px,6.3vh,92px);padding:clamp(17px,2vh,28px) clamp(20px,3.6vw,90px) clamp(17px,2.1vh,32px);border:14px solid transparent;border-image:url('./assets/engraved-frame.svg') 16 stretch;background:linear-gradient(135deg,#171510ec,#0f0e0cec);box-shadow:0 8px 45px #0005;backdrop-filter:blur(7px)}
.dialogue-top{justify-content:center;margin:0;height:0;position:relative}.speaker{position:absolute;top:calc(-1 * clamp(27px,3vh,42px));left:50%;transform:translateX(-50%);padding:0 15px;background:#171510;color:#c3ad75;gap:8px;font:clamp(11px,1.45vh,20px) var(--serif);letter-spacing:3px;white-space:nowrap}.speaker::before,.speaker::after{content:'◇';font:9px Georgia;color:#ae935b}.speaker-mark{font-size:13px}.dialogue-tools{position:absolute;right:0;top:-9px;gap:12px}.subtle-button{color:#9b9077;font-size:clamp(10px,1.1vh,15px)}.subtle-button:hover{color:var(--gold-light)}.subtle-button kbd{border-color:#9e89624d;color:#b8aa86}
.narration-row{display:block;text-align:center;margin:0;min-height:0}.narration-row h2{font:400 clamp(24px,3.1vh,43px) var(--serif);letter-spacing:.12em;line-height:1.55;margin:0 0 6px;color:#f1e2bf;text-shadow:0 2px 4px #0006}.narration-row p{font:clamp(13px,1.7vh,23px) var(--serif);color:#b8aa88;line-height:1.75;max-width:85%;margin:0 auto;min-height:0;max-height:4em;overflow-y:auto}.question-line{display:none}.has-story .question-line{display:flex;margin:12px auto 0;max-width:900px}.question-line h3{font-family:var(--serif);font-size:clamp(12px,1.45vh,19px);color:#d2bd8e}.question-line>span{background:linear-gradient(90deg,transparent,#bfa26b55)}.has-story .narration-row h2{font-size:clamp(21px,2.6vh,35px)}.has-story .narration-row p{font-size:clamp(12px,1.55vh,21px);max-height:3.6em}
.choice-grid{margin-top:clamp(14px,1.8vh,28px);gap:clamp(10px,1vw,24px)}#choices{gap:clamp(10px,1vw,24px)}.choice{min-height:clamp(95px,12vh,170px);padding:clamp(15px,2.2vh,32px) 15px clamp(13px,1.5vh,24px) clamp(63px,5.5vw,140px);border:9px solid transparent;border-image:url('./assets/engraved-frame.svg') 16 stretch;background:linear-gradient(135deg,#24211780,#090908aa);box-shadow:inset 0 1px #d9c3970a,0 3px 9px #0003;backdrop-filter:none;justify-content:center;overflow:visible}.choice::before{content:'';position:absolute;inset:1px;border:1px solid #c0a46c12;pointer-events:none}.choice::after{display:none}.choice:first-child:not(.custom-choice){background:linear-gradient(130deg,#5d4e2c4d,#292319b3);filter:brightness(1.08)}.choice:hover:not(:disabled),.choice:focus-visible{transform:translateY(-3px);background:linear-gradient(135deg,#66532ea6,#342918);box-shadow:0 0 20px #d1ac4725,inset 0 0 20px #b4995330;filter:brightness(1.2);outline-offset:3px}.choice-key{left:0;top:0;right:auto;width:19px;height:23px;border:1px solid #a98d555c;background:#17140e;color:#cbb57e;font:14px Georgia,serif}.choice-symbol{width:clamp(40px,4.5vw,96px);height:clamp(45px,6.6vh,100px);left:clamp(8px,1vw,23px);right:auto;bottom:50%;transform:translateY(50%);stroke:#b395585e;stroke-width:1.25;filter:drop-shadow(0 0 3px #ccb4730c)}.choice:first-child .choice-symbol{stroke:#d9b879b0}.choice-title{font:400 clamp(15px,2.15vh,30px) var(--serif);line-height:1.5;letter-spacing:.03em;max-width:100%;color:#e0cea6;overflow-wrap:anywhere}.choice-hint{font:clamp(10px,1.33vh,18px) var(--serif);line-height:1.65;color:#94866a;margin-top:6px;max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.choice-tail{display:none}.custom-choice{border-image:url('./assets/engraved-frame.svg') 16 stretch;background:linear-gradient(135deg,#201c15a1,#090908c4)}.custom-choice .choice-tail{display:block;margin-top:4px;font:clamp(10px,1.25vh,17px) var(--serif);color:#c7a954}.custom-choice .choice-title{color:#e0cea6}.custom-choice .choice-symbol{stroke:#b3955877}
.bottom-hud{bottom:clamp(15px,2.3vh,33px);font:clamp(10px,1.2vh,17px) var(--serif);color:#817963}.bottom-hud i{background:#aa9363}.controls-help{gap:10px!important;opacity:.85}.bottom-hud kbd{font:clamp(10px,1.2vh,16px) Georgia,serif;color:#ad9d77;border-color:#98835955;padding:2px 6px}.touch-controls button{background:#17150eb8;color:#d1bd87;border-color:#a58d5266}
.game-dialog,.generation-hud,.error-panel{background:linear-gradient(135deg,#262116f5,#100f0dfa);border:14px solid transparent;border-image:url('./assets/engraved-frame.svg') 16 stretch;color:#dfd3b4;box-shadow:0 20px 100px #0009}.game-dialog::backdrop{background:#070604ad}.game-dialog h2,.generation-hud h2{font-family:var(--serif);font-weight:400;color:#ead8ad;letter-spacing:2px}.game-dialog{padding:30px;width:min(510px,90vw)}.game-dialog select,.game-dialog textarea{background:#100f0ca8;color:#e4d3aa;border-color:#b69a5a50}.toggle input{accent-color:#c1a669}.config-status{border-color:#b69a5a33;color:#a99876}.menu-description,.toggle small{color:#a99b7b}.game-dialog label:not(.toggle){color:#d6c29a}.primary{background:linear-gradient(#c3ab70,#a48a51);border-color:#d4bb84;color:#1c160c}.secondary{border-color:#b49b5c55;color:#cbb68a}.text-action,.close{color:#a89770}.tree-node{border-color:#baa06433;background:#17140eb0;color:#c9b791}.tree-node.active{background:#51412580;border-color:#c1a462}.tree-node.active .node-dot{background:#c9a963}.node-text small{color:#978564}.toast{background:#19150ef5;border-color:#a68b4b80;color:#e3cea1}.show-dialogue{background:#241e11ed;border-color:#b69b5d99}.error-panel p{color:#d3bd91}.generation-track{background:#a68b4b33}
.chapter-progress{display:flex;justify-content:center;gap:7px;position:absolute;left:50%;top:calc(100% + 12px);transform:translateX(-50%)}.chapter-progress i{width:5px;height:5px;transform:rotate(45deg);border:1px solid #8b794e}.chapter-progress i.done{background:#bda36b}.chapter-progress i.current{background:#dfc587;box-shadow:0 0 8px #d5b36a66}.major-decision .question-line h3{color:#f1cc86}.major-decision .speaker{color:#f1c98a}.major-decision .choice{border-image:url('./assets/engraved-frame.svg') 16 stretch;box-shadow:0 0 20px #b7772720}.chapter-result{font-family:var(--serif);font-size:13px;line-height:1.8;color:#baa981;padding:12px 0 0;text-align:center;max-width:900px;margin:auto}.value-readout{display:flex;justify-content:center;gap:24px;color:#b9a478;margin-top:15px;font-size:12px}.value-readout strong{color:#e4cfa4;font-weight:500}.consequence-item{padding:13px 0;border-bottom:1px solid #ab915533;font-size:13px;line-height:1.8;color:#b9ab8c}.consequence-item strong{display:block;color:#deca9f}
@media(min-width:2100px){.dialogue-hud{padding-left:4vw;padding-right:4vw}.game-dialog{transform:scale(1.15)}}
@media(max-width:1100px){.chapter-hud{display:none}.dialogue-hud{padding:19px 15px 17px;border-width:10px;bottom:48px}.choice{padding-left:53px;min-height:106px;padding-top:12px;padding-bottom:12px;border-width:7px}.choice-symbol{width:35px;left:5px;height:45px}.choice-title{font-size:16px}.choice-hint{font-size:10px}.game-brand h1{font-size:25px!important}.game-brand .brand-emblem{width:37px;height:45px}.identity-hud{top:115px}.quest-hud{top:118px}.narration-row h2{font-size:27px}.narration-row p{font-size:14px;max-width:92%}.dialogue-tools{top:-4px}.speaker{top:-28px}.controls-help{display:none!important}.chapter-result{font-size:11px}.has-story .narration-row p{font-size:13px}}
@media(max-width:720px){:root{--safe:17px}.hud-top{top:22px}.game-brand{gap:9px}.game-brand h1{font-size:21px!important;letter-spacing:.12em}.game-brand .brand-emblem{width:29px;height:37px}.game-brand small{font-size:8px;margin-top:6px;letter-spacing:.48em}.hud-tools{border-width:7px;padding:2px}.hud-button{width:30px;height:28px;padding:5px 7px}.quest-hud{top:110px;max-width:58%;padding-left:12px;gap:7px}.quest-hud strong{font-size:15px}.quest-type{font-size:12px}.quest-hud::after{margin-top:3px}.identity-hud{top:115px;gap:10px;max-width:31%}.identity-portrait{width:39px;height:39px}.identity-hud small{display:none}.identity-hud #character-tag{font-size:11px}.dialogue-hud{bottom:44px;left:11px;right:11px;padding:17px 11px 11px;border-width:8px}.dialogue-tools{top:-6px;right:-1px}.subtle-button{font-size:9px}.speaker{top:-25px;font-size:11px;padding:0 10px}.speaker-mark{font-size:10px}.narration-row h2{font-size:22px;letter-spacing:.05em;margin-bottom:4px}.narration-row p{font-size:12px;max-width:100%;line-height:1.65;max-height:3.4em;min-height:0}.choice-grid{grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}#choices{display:contents}.choice{min-height:78px;padding:9px 7px 9px 53px;border-width:6px}.choice-key{font-size:11px;width:15px;height:18px}.choice-title{font-size:14px;letter-spacing:0;line-height:1.5}.choice-symbol{width:35px;left:5px;height:40px}.choice-hint{font-size:10px;line-height:1.5;margin-top:4px;max-height:3em}.custom-choice .choice-tail{font-size:10px}.bottom-hud{bottom:14px;font-size:9px}.has-story .narration-row h2{font-size:20px}.has-story .narration-row p{font-size:11px;max-height:3.4em}.has-story .question-line{margin-top:7px}.question-line h3{font-size:11px;line-height:1.5}.chapter-result{font-size:10px;max-height:3.5em;overflow:auto;padding-top:7px}.game-dialog{padding:23px;border-width:10px}.game-dialog h2{font-size:24px}.value-readout{gap:14px}.world-prompt{font-size:11px}.touch-controls{top:44%}}
@media(max-width:410px){.game-brand h1{font-size:19px!important}.game-brand .brand-emblem{width:25px}.game-brand small{font-size:7px}.hud-button{width:27px}.identity-portrait{display:none}}
@media(max-height:740px) and (min-width:721px){.hud-top{top:18px}.game-brand h1{font-size:23px!important}.game-brand small{font-size:8px;margin-top:5px}.game-brand .brand-emblem{width:31px;height:39px}.quest-hud,.identity-hud{top:96px}.dialogue-hud{bottom:38px;padding:13px 20px 12px;border-width:9px}.narration-row h2{font-size:23px}.narration-row p{font-size:12px}.speaker{top:-22px}.choice-grid{margin-top:10px}.choice{min-height:83px;padding-top:8px;padding-bottom:8px}.choice-title{font-size:15px}.choice-hint{font-size:10px}.bottom-hud{bottom:12px}.has-story .narration-row h2{font-size:21px}.has-story .narration-row p{font-size:11px;max-height:3.4em}.has-story .question-line{margin-top:6px}.chapter-result{padding-top:5px;font-size:10px}}
.identity-hud{border:0;padding:0;background:none;cursor:pointer;color:inherit}.identity-hud:hover .identity-portrait{box-shadow:0 0 0 4px #14130f,0 0 0 5px #c2a56c,0 0 20px #c8aa6b44}.chapter-hud{position:relative}.chapter-progress{pointer-events:none}
@media(max-width:1100px){.chapter-hud{display:flex;position:absolute;left:50%;top:68px;transform:translateX(-50%);max-width:65%;font-size:13px;white-space:nowrap}.chapter-hud::before,.chapter-hud::after{width:24px}.quest-hud,.identity-hud{top:140px}.chapter-progress{top:calc(100% + 8px)}}
@media(max-width:720px){.chapter-hud{top:57px;max-width:85%;font-size:12px;gap:9px}.quest-hud,.identity-hud{top:133px}.chapter-hud::before,.chapter-hud::after{width:17px}.chapter-progress{gap:6px}.chapter-progress i{width:4px;height:4px}.chapter-result{display:none}.world-prompt{z-index:2}}
.identity-portrait{filter:sepia(.6) brightness(.78) contrast(.95)}
.impact-feedback{position:absolute;left:50%;top:43%;z-index:15;transform:translate(-50%,-50%);width:min(620px,82vw);padding:19px 28px;text-align:center;background:linear-gradient(90deg,transparent,#17120de8 15%,#17120de8 85%,transparent);border-top:1px solid #d2b46f70;border-bottom:1px solid #d2b46f70;pointer-events:none;text-shadow:0 2px 10px #000}.impact-feedback span{display:block;font:10px Georgia,serif;letter-spacing:.35em;color:#b79a5e;text-transform:uppercase}.impact-feedback strong{display:block;margin:7px 0 5px;font:26px var(--serif);color:#f1ddb0}.impact-feedback small{display:block;font:12px var(--serif);color:#b9aa87;line-height:1.6}.impact-feedback.strike{animation:impact-strike 1.1s cubic-bezier(.2,.8,.2,1)}.choice-impact .world-stage{animation:world-hit .45s ease-out}.choice-impact .scene-vignette{background:radial-gradient(circle at 50% 52%,transparent 0 20%,#090704b8 78%)}@keyframes impact-strike{0%{opacity:0;transform:translate(-50%,-42%) scale(.94);filter:blur(5px)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.02);filter:blur(0)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-55%) scale(1)}}@keyframes world-hit{0%{transform:translateX(0)}30%{transform:translateX(-5px)}55%{transform:translateX(3px)}100%{transform:translateX(0)}}
@media(max-width:720px){.impact-feedback{top:38%;padding:14px 16px}.impact-feedback strong{font-size:20px}.impact-feedback small{font-size:10px}}
.preview-ready .generation-hud{left:50%;bottom:6%;width:min(560px,88%);padding:14px 22px;border-width:8px;gap:15px;background:#14120ecc;pointer-events:none}.preview-ready .ink-orbit{width:30px;height:30px}.preview-ready .ink-orbit span{font-size:24px}.preview-ready .generation-hud h2{font-size:16px;margin:3px 0}.preview-ready .generation-hud p{font-size:11px;margin:4px 0}.preview-ready .generation-track,.preview-ready .micro-label{display:none}.preview-ready .generation-hud #elapsed{font-size:10px}.preview-ready .world-prompt{display:none!important}
