:root{--bg:#0d1021;--panel:#1b203b;--text:#ebe5d4;--muted:#afbdd0;--gold:#f0cc86;--line:#66739866;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:#090d1a;color:var(--text);font-family:'Noto Sans KR',sans-serif;font-size:16px}button{font:inherit;font-size:14px;min-height:40px;border-radius:0;border:1px solid #7683a777;color:#e9dfc9;background:#202844;padding:9px 14px;transition:background .12s;touch-action:manipulation}button:hover{background:#334061;border-color:#d7c28a}button:focus-visible,button.key-selected{outline:2px solid #f0cc86;outline-offset:3px;background:#3a4160}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:#e8c383;border:1px solid #f5dcaa;color:#242439;box-shadow:inset 0 -3px #aa835344}.primary:hover{background:#f5d9a1}
#app{max-width:1680px;margin:auto}header{height:55px;border:0;padding:0 20px;gap:20px;background:#11172a}.brand{font-size:25px;gap:10px}.brand span{font-size:22px;letter-spacing:1px}.brand small{display:none}.day{font-size:14px}.wallet{gap:12px}.wallet>span{font-size:16px}.wallet button{font-size:13px;min-height:34px;padding:6px 10px}.weather{font-size:13px}main{padding:0 14px}.scene-head{height:52px}.scene-head h1{font-family:inherit;font-size:17px;font-weight:500;letter-spacing:1px}.scene-head .eyebrow{font-size:12px}.scene-head button{min-height:32px;font-size:13px;padding:5px 12px}#world{height:calc(100dvh - 194px);min-height:390px;border:2px solid #7180a1;border-radius:0;box-shadow:0 0 0 3px #080d1a,0 0 0 4px #363b56;overflow:hidden;background:#111529}#game{image-rendering:pixelated;touch-action:none}.vignette{box-shadow:inset 0 0 45px #070b1c55;border-radius:0}#sceneBadge{display:none}#quest{right:13px;top:13px;width:250px;background:#171e39ed;border:1px solid #8899b4;box-shadow:0 0 0 2px #15182b,0 0 0 3px #515e7e;border-radius:0;padding:13px 16px}#quest .eyebrow{font-size:12px;color:#d9c69c;letter-spacing:3px}#quest h2{font-family:inherit;font-size:17px;line-height:1.5;margin:6px 0 7px}#quest p{font-size:14px;line-height:1.75;margin:9px 0 10px;color:#f1e8d7}#questPlace{font-size:12px;color:#9ab6cd}#questStep{position:absolute;right:43px;top:13px;color:#bac7d8;font-size:12px}#quest>button{min-height:33px;padding:7px 0;font-size:13px;color:#d8dcec;border-color:#60759b44}#quest>button kbd{float:right;margin:0 2px}#quest.collapsed #questStep{display:none}#quest h2 button{min-height:24px}.chapter-meter{height:3px;background:#394264}#hint{font-size:12px;left:10px;bottom:10px;background:#151d36ec;border:1px solid #7b8ea1;max-width:320px;border-radius:0}#directionHint{left:13px;top:13px;font-size:13px;background:#17243ceb;border:1px solid #92aaac;padding:9px 12px;border-radius:0;max-width:calc(100% - 295px)}#minimapWrap{width:158px;border-radius:0;bottom:12px;right:13px;background:#161d35;border:1px solid #8296b0}#minimap{width:158px;height:105px;image-rendering:pixelated}#mapCaption{display:none}#chapterBanner{position:absolute;left:50%;top:36%;transform:translate(-50%,-50%);width:max-content;max-width:85%;padding:20px 38px;z-index:3;pointer-events:none;font-family:'Gowun Batang',serif;font-size:30px;letter-spacing:4px;color:#f1d7a6;background:#111831eb;border-block:1px solid #bdb38b;opacity:0;transition:opacity .3s}#chapterBanner.show{opacity:1}#sceneTransition{background:#0e1324;font-size:27px;letter-spacing:2px}#toast{font-size:15px;line-height:1.65;border-radius:0;background:#171e37f5;border:1px solid #c4b388;max-width:min(560px,85%);top:54%;z-index:7}#actionHUD{border-radius:0;background:#131e3aee;border-color:#c4b388}footer{height:64px;gap:12px}.status{min-width:170px;gap:8px}.status strong{font-size:13px}.status small{font-size:12px;margin:4px 0}.status .avatar{width:36px;height:47px}.meter{width:125px;height:4px;background:#3c3c5d}.meter i{background:#92cdb5}nav{gap:2px;margin-left:auto}nav button{font-size:14px;padding:7px 11px;min-height:42px}nav button span{font-size:18px}#interact{max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;min-height:42px}kbd{font-size:11px;border-radius:0}#partyStrip{display:flex;gap:5px}.party-member{display:flex;align-items:center;gap:2px;border:0;background:transparent;padding:2px 5px;font-size:12px;min-height:40px}.party-avatar{display:block;width:33px;height:40px;background-size:400% 400%;background-position:33.333% 0;image-rendering:pixelated}.bottomline{font-size:12px;height:23px;margin:0 16px;padding:3px 0;border:0}.bottomline span:last-child{display:none}
#dialogue{bottom:24px;width:min(1050px,95vw);border:2px solid #9da7c3;border-radius:0;background:#182140fa;box-shadow:0 0 0 4px #11152a,0 0 0 5px #596983,0 20px 70px #0009;padding:21px 28px;gap:23px;z-index:20}#speaker{display:inline-block;font-size:15px;letter-spacing:2px;color:#f0cc86}.speech{min-width:0}.speech p{font-family:inherit;font-size:18px;line-height:1.9;margin:9px 0 14px;min-height:3.8em}.portrait{width:100px;min-width:100px;height:140px;image-rendering:pixelated;align-self:flex-end}#choices{display:flex;gap:9px;flex-wrap:wrap}#choices button{font-size:14px;padding:9px 15px;min-height:40px}#speechCue{display:block;font-size:12px;margin-top:10px;color:#9caec5}.talking #touch{display:none}dialog{background:#19223d;color:#ece7d8;width:min(680px,94vw);max-height:88dvh;border:2px solid #a4afc7;border-radius:0;padding:23px 29px;box-shadow:0 0 0 4px #101a30,0 0 0 5px #4e5e7e,0 24px 80px #0009}dialog::backdrop{background:#030a1cb8;backdrop-filter:none}.modal-top .eyebrow{font-size:12px;color:#b9c7de}.modal-top button{min-height:30px}#modalBody h2{font-family:'Gowun Batang',serif;font-size:28px;line-height:1.5;margin:0 0 16px;color:#f0d5a4}#modalBody p{font-size:16px;line-height:1.9;color:#d2d9e6}.note{font-size:14px;line-height:1.8;background:#080f252b;color:#b4c6dc;border-color:#cbb98c}#modalBody .letter{font-size:20px;color:#eee0c2;line-height:2.05}.row{font-size:15px;gap:15px}.row small{font-size:14px}.story-prose{font-size:17px!important;font-family:inherit}.chapter-record p,.journal-task{font-size:14px}.chapter-record summary{font-size:15px}.clock-readout{font-family:monospace;font-size:46px;color:#f6d09a;background:#101932;letter-spacing:6px}.puzzle-controls button{font-size:15px;border-radius:0}.actions{gap:10px}.actions button{min-height:42px}.map-grid button{padding:15px 8px;font-size:15px}
.battle-modal{width:min(860px,96vw)}.battle-modal #modalBody h2{font-size:23px;margin:0 0 8px}.battle-modal .modal-top{margin-bottom:6px}.battle-modal #modalBody p{margin:10px 0;min-height:48px;font-size:15px}.battle-modal .actions{margin-top:10px}.battle-modal .actions button{flex:1 0 28%;font-size:14px}.battle-stage{height:238px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#43466a,#19213b 70%);border:1px solid #6c7d99}.enemy-sprite{position:absolute;left:50%;top:1px;transform:translateX(-50%);height:184px;width:184px;background-image:url('assets/encounters.png');background-size:200% 200%;image-rendering:pixelated}.battle-party{display:flex;position:absolute;left:0;right:0;bottom:0;justify-content:center;gap:28px;border-bottom:3px solid #8093a355}.battle-party i{display:block;width:72px;height:80px;background-size:400% 400%;background-position:33.333% 0;image-rendering:pixelated}.battle-readout{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-top:12px}.combat-hp{height:6px;margin:7px 0 12px;background:#433752}.combat-hp i{background:#c89bc6}.intent{font-size:14px;background:#263149;color:#f1d796;border-left:3px solid #c29a6d;padding:8px 12px}
#titleScreen{position:fixed;inset:0;display:grid;place-items:center;background:linear-gradient(90deg,#0b1427f7,#142137dd 52%,#07162aaa);z-index:30;overflow:auto}#titleScreen[hidden]{display:none}.title-content{text-align:center;padding:28px 20px;max-width:520px}.title-sub{font-size:14px;color:#c4c9d5;letter-spacing:5px}.title-content h2{font-family:'Gowun Batang',serif;font-size:76px;line-height:1.08;font-weight:700;color:#f0d09b;letter-spacing:11px;margin:24px 0 26px;text-shadow:3px 3px #593f4b,6px 6px #0e1223}.title-content h2 span{font-size:87px}.title-line{font-size:16px;line-height:1.95;color:#d1d8df;letter-spacing:2px}#titleActions{display:grid;gap:12px;min-width:270px;max-width:350px;margin:27px auto 20px}#titleActions button{font-size:16px;min-height:49px;border:1px solid #9c9cab}.title-content>small{font-size:12px;color:#99a9bf}#titleHelp{font-size:14px;line-height:1.9;margin:15px 0;color:#b8c9df}
@media(max-width:1120px){#partyStrip{display:none}#quest{width:228px}#directionHint{max-width:calc(100% - 270px)}nav kbd{display:none}nav button{padding:7px}footer{gap:6px}#interact{max-width:220px}}
@media(max-width:700px){header{height:49px;padding:0 10px;gap:8px}.brand span{font-size:20px}.brand{gap:4px}.day{font-size:12px;gap:6px}.day #time{display:none}.wallet{gap:7px}.wallet button{min-height:32px;font-size:12px;padding:4px 6px}main{padding:0 6px}.scene-head{height:46px}.scene-head h1{font-size:14px}.scene-head .eyebrow{display:none}.scene-head button{font-size:12px}#world{height:calc(100dvh - 215px);min-height:310px}#quest{right:8px;top:8px;width:188px;padding:10px}#quest h2{font-size:14px;margin:4px 0}#quest p{font-size:13px;line-height:1.65;margin:6px 0}#quest .eyebrow,#questPlace{font-size:12px}#questStep{display:none}#quest>button{font-size:12px;min-height:28px;padding:5px 0}#directionHint{top:auto;bottom:55px;left:8px;max-width:200px;font-size:12px}#hint{left:8px;bottom:8px;max-width:210px;font-size:12px;line-height:1.6;padding:6px 8px}#minimapWrap{display:none}footer{height:97px;flex-wrap:wrap;padding:7px 2px 0}.status{min-width:130px}.status strong{font-size:12px}.status small{font-size:12px}.status .avatar{height:38px;width:29px}.meter{width:108px}nav{width:100%;order:3;justify-content:space-around;margin:0;gap:0}nav button{font-size:13px;min-height:37px;padding:3px 6px}#interact{margin-left:auto;font-size:13px;max-width:200px;min-height:39px;padding:7px 10px}#interact kbd{display:none}.bottomline{margin:0 8px;font-size:12px;height:23px}.bottomline span:nth-child(2){display:none}#touch{bottom:154px;right:15px;z-index:3}#touch button{width:43px;height:40px;border-radius:0;padding:4px;font-size:18px;background:#13233ddb;min-height:40px}#dialogue{bottom:12px;padding:15px;gap:9px;max-height:80dvh;overflow:auto;width:94vw}.portrait{width:63px;min-width:63px;height:90px;align-self:flex-start}.speech p{font-size:16px;min-height:4em;line-height:1.8;margin-top:7px}#choices{gap:7px}#choices button{font-size:13px;min-height:40px;padding:8px 10px}#speechCue{font-size:12px}dialog{padding:18px;width:94vw;max-height:88dvh}#modalBody h2{font-size:24px}#modalBody p{font-size:15px}.actions button{font-size:14px}.row small{font-size:13px}.row button{font-size:13px;padding:8px}.puzzle-controls{gap:7px}.puzzle-controls button{font-size:13px}.battle-stage{height:196px}.enemy-sprite{width:157px;height:157px}.battle-party{gap:8px}.battle-party i{width:55px;height:60px}.battle-readout,.intent{font-size:13px}.battle-modal #modalBody p{font-size:14px;line-height:1.7}.battle-modal .actions button{font-size:13px;flex-basis:40%;padding:8px}.title-content h2{font-size:60px}.title-content h2 span{font-size:68px}.title-line{font-size:15px}#chapterBanner{font-size:23px;padding:15px 22px}.title-sub{font-size:12px;letter-spacing:3px}}
@media(max-height:550px) and (min-width:701px){header{height:40px}.scene-head{height:36px}#world{height:calc(100dvh - 150px);min-height:200px}footer{height:49px}#dialogue{max-height:80dvh;overflow:auto}.title-content{padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px 35px;align-items:center;max-width:750px}.title-content h2{font-size:48px;grid-row:1/4;margin:10px}.title-content h2 span{font-size:57px}.title-sub{display:none}.title-line{font-size:13px;margin:0}#titleActions{margin:5px}#titleActions button{min-height:38px}.title-content>small{grid-column:2}.battle-stage{height:135px}.enemy-sprite{height:120px;width:120px}}
