:root{color-scheme:dark;font-family:Inter,Arial,sans-serif;font-size:16px;color:#eee8d6;background:#141a18;--gold:#d4ba81;--soft:#c3c2b1}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid #f5dca5;outline-offset:5px}[hidden]{display:none!important}#game{position:relative;width:100%;height:100svh;min-height:320px;overflow:hidden;background:#222c27}#world,#cover,.vignette,.grain,#hands{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#world{display:block;image-rendering:pixelated;pointer-events:auto;outline:none}#cover{background:#192323;transition:opacity 1.8s ease;opacity:1}body.playing #cover{opacity:0}#hands{z-index:3;overflow:hidden;transition:opacity .6s}#left-hand,#right-hand{position:absolute;inset:-2%;background-image:none;background-size:100% 100%;background-repeat:no-repeat;transform-origin:50% 100%;image-rendering:pixelated;will-change:transform}#left-hand{clip-path:inset(0 50% 0 0)}#right-hand{clip-path:inset(0 0 0 50%)}.vignette{z-index:4;background:linear-gradient(180deg,rgba(9,14,14,.63),transparent 25%,transparent 62%,rgba(5,10,10,.83)),radial-gradient(ellipse at 50% 45%,transparent 34%,rgba(5,10,10,.4) 100%)}.grain{z-index:5;opacity:.10;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.91' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.4' filter='url(%23n)'/%3E%3C/svg%3E")}header{position:absolute;inset:0 0 auto;z-index:10;display:flex;align-items:flex-start;justify-content:space-between;padding:30px 40px;pointer-events:none}.brand{display:flex;align-items:center;gap:13px;letter-spacing:.21em;font-size:14px;font-weight:500}.brand svg{width:28px;height:36px;color:var(--gold)}.brand small{display:block;font-size:12px;letter-spacing:.19em;color:#bfbdad;margin-top:7px}.compass{position:absolute;left:50%;transform:translateX(-50%);width:232px;text-align:center;color:#ded8bd}.compass-ticks{font-size:12px;letter-spacing:.5em;opacity:.45;white-space:nowrap}.directions{display:flex;justify-content:space-between;padding:6px 10px 0;font-size:12px;letter-spacing:.2em}.directions span:nth-child(2){color:#ffe8ad}.compass-marker{display:block;color:var(--gold);font-size:17px;line-height:16px}.compass small{display:block;white-space:nowrap;font-size:12px;letter-spacing:.17em;margin-top:8px;opacity:.8}.actions{display:flex;gap:10px;pointer-events:auto}.actions button{width:40px;height:40px;color:#ede7d2;background:#111d1c33;border:1px solid #d5c79a40;display:grid;place-items:center}.actions button:hover{background:#cdb77b30}.actions svg{width:20px;height:20px}#intro{position:absolute;z-index:8;bottom:111px;left:25%;text-shadow:0 2px 24px #090f0c;transition:opacity .5s,transform .5s}body.playing #intro{opacity:0;transform:translateY(20px);pointer-events:none}.chapter{color:var(--gold);font-size:12px;letter-spacing:.23em;display:flex;align-items:center;gap:12px;font-weight:500}.chapter>span{width:30px;height:1px;background:var(--gold)}h1,h2{font-family:'Cormorant Garamond',Georgia,serif;font-weight:400}h1{font-size:clamp(48px,5.4vw,82px);letter-spacing:-.025em;line-height:.96;margin:23px 0 18px}#intro p{color:#d0d0bc;font-size:15px;letter-spacing:.025em;margin:0 0 25px}.primary{min-height:50px;min-width:236px;display:flex;align-items:center;justify-content:space-between;gap:30px;border:1px solid #d8c99d9c;background:#c9b685;color:#19221c;padding:14px 21px;font-size:14px;font-weight:500;transition:background .2s,transform .2s}.primary:hover{background:#e1cca0;transform:translateY(-1px)}.primary:disabled{opacity:.6;cursor:wait}.primary span:last-child{font-size:20px}.intro-hint{font-size:12px;letter-spacing:.13em;color:#acb3a8;margin-top:19px}.intro-hint span{margin:0 7px}.controls{position:absolute;z-index:8;bottom:31px;left:40px;display:flex;align-items:center;gap:17px;color:#c5c8b8;font-size:12px;letter-spacing:.015em}.controls span{display:flex;align-items:center;gap:5px}.controls i{height:13px;width:1px;background:#e7dec039}kbd{font-family:inherit;border:1px solid #acb5a35c;padding:3px 4px;min-width:19px;text-align:center;font-size:12px;border-radius:2px;background:#1a231b35}.bottom-right{position:absolute;bottom:26px;right:40px;z-index:8;display:grid;grid-template-columns:18px auto;column-gap:8px;color:#ced1bd;font-size:12px;letter-spacing:.14em}.small-diamond{grid-row:span 2;font-size:25px;align-self:center;color:var(--gold)}.edition{font-size:12px;color:#8f9f91;margin-top:6px;letter-spacing:.12em}#journey{position:absolute;bottom:92px;left:40px;z-index:8}#journey h2{font-size:32px;margin:10px 0 3px}#journey p{color:#bdc3b0;font-size:13px;margin:0}#reticle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#efe8c4b0;z-index:8;font-size:30px;pointer-events:none;opacity:0}body.playing #reticle{opacity:1}.panel{position:absolute;z-index:20;left:50%;top:50%;transform:translate(-50%,-50%);width:min(440px,calc(100% - 40px));padding:45px 36px;text-align:center;background:#17221cee;border:1px solid #bcaa775c;box-shadow:0 0 0 100vmax #070c0966;backdrop-filter:blur(15px)}.panel .chapter{justify-content:center}.panel h2{font-size:46px;line-height:1.05;margin:25px 0 12px}.panel p{color:var(--soft);font-size:15px;line-height:1.6}.panel .primary{width:100%;margin-top:30px}.text-button{background:none;border:0;color:#d4c394;margin-top:22px;font-size:13px;text-decoration:underline;text-underline-offset:5px}.panel .pause-help{font-size:12px;line-height:1.8;margin-top:30px;color:#919f91}#notice{position:absolute;z-index:25;top:140px;left:50%;transform:translateX(-50%);text-align:center;max-width:90%;padding:10px 18px;color:#e6debf;background:#152119dc;border:1px solid #a38d554f;font-size:14px}#touch-controls{position:absolute;inset:0;z-index:9;pointer-events:none}#joystick{position:absolute;bottom:100px;left:30px;width:100px;height:100px;border:1px solid #e1d8ac66;border-radius:50%;background:#09191044;pointer-events:auto;touch-action:none}#joystick div{position:absolute;width:38px;height:38px;left:30px;top:30px;border-radius:50%;background:#d0c18c66;border:1px solid #ece1b484}#touch-swing{position:absolute;bottom:119px;right:35px;width:66px;height:66px;border-radius:50%;color:#e1d3a8;background:#19271a88;border:1px solid #cab77780;font-size:13px;pointer-events:auto;touch-action:none}#touch-controls>span{position:absolute;bottom:55px;right:25px;font-size:12px;color:#c7c7ae;opacity:.7}
@media(max-width:850px){header{padding:23px}.brand{font-size:12px;letter-spacing:.15em}.brand small{display:none}.compass{width:180px;top:80px}.controls{left:23px;bottom:24px;gap:8px}.controls i{display:none}.controls span:nth-of-type(4),.controls span:nth-of-type(5){display:none}.bottom-right{right:23px;bottom:25px}.bottom-right .edition{display:none}#intro{left:7%;bottom:110px}#journey{left:23px}#hands>div{inset:0 -20%;width:140%}.panel{padding:32px 25px}}
@media(pointer:coarse){#game{touch-action:none}.controls{display:none}#intro{bottom:95px}body.playing #journey{bottom:220px;left:26px}#journey h2{font-size:26px}body.playing .bottom-right{bottom:23px}.intro-hint{font-size:12px}.compass small{font-size:12px}}
@media(max-width:500px){.brand svg{width:20px;height:30px}.actions{gap:7px}.actions button{width:35px;height:35px}.brand{gap:9px}.bottom-right{font-size:12px}h1{font-size:58px}#intro p{font-size:14px}.compass{width:160px}.compass-ticks{letter-spacing:.4em}#hands>div{inset:0 -38%;width:176%}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.grain{display:none}}

@media(max-width:1100px){.bottom-right{display:none}.brand small{display:none}.controls{gap:12px}}
@media(min-width:851px){#intro{max-width:550px}}
@media(max-width:850px){#intro{left:12%}}
@media(max-width:500px){#intro{left:9%;right:8%}h1{font-size:52px}.intro-hint{font-size:12px;line-height:1.6;max-width:260px}.compass small{font-size:12px}}

/* The vista stays visible from the title screen through the entire journey. */
#cover{background:#192323;transition:opacity 1.2s ease}
.artwork-ready #cover{opacity:0}
.grain{display:none}
.vignette{background:linear-gradient(180deg,#0c102d55,transparent 20%,transparent 68%,#061810b5)}
#intro{left:50%;right:auto;bottom:89px;transform:translateX(-50%);text-align:center;max-width:none;width:min(500px,84%);text-shadow:0 3px 22px #08180a}
#intro .chapter{justify-content:center;font-size:12px;letter-spacing:.26em}
#intro .chapter>span{display:none}
#intro h1{font-size:clamp(46px,5vw,72px);letter-spacing:.06em;line-height:1.05;margin:12px 0 6px;color:#fff1c9}
#intro p{font-family:'Cormorant Garamond',Georgia,serif;font-size:22px;letter-spacing:.07em;margin:0 0 20px;color:#efe3c4}
#intro .primary{margin:auto;min-width:238px;background:#0c201add;color:#f0dba0;border-color:#d3b974b5;box-shadow:inset 0 0 0 3px #102920,0 6px 30px #091c1255}
#intro .primary:hover{background:#24452ee8}
.intro-hint{color:#d0ccba;font-size:12px;letter-spacing:.10em;margin-top:18px}
body.playing #intro{transform:translate(-50%,18px)}
.brand{font-size:14px;text-shadow:0 2px 9px #10142e}
.brand small{font-size:12px;letter-spacing:.08em}
.compass{filter:drop-shadow(0 2px 5px #15212a)}
.compass small{font-size:12px;letter-spacing:.10em}
.controls{font-size:12px;gap:14px;color:#e1debe;text-shadow:0 2px 8px #102415}
header .actions button{background:#13232777}
#journey{transition:opacity .5s;opacity:.85;bottom:94px}
#journey h2{font-size:28px;letter-spacing:.03em}
@media(max-width:850px){#intro{left:50%;bottom:84px}.brand small{display:none}.controls{gap:10px}}
@media(max-width:500px){#intro{right:auto;left:50%;bottom:75px;width:88%}#intro h1{font-size:46px}#intro p{font-size:20px}.intro-hint{max-width:none;font-size:12px;line-height:1.6}.compass{top:80px}.brand{font-size:12px}#journey .chapter{font-size:12px}#journey p{font-size:14px}}


/* Adventure interface */
#interact{position:absolute;z-index:12;left:50%;bottom:20%;transform:translateX(-50%);min-height:46px;padding:0 18px;border:1px solid #dec88c88;background:#101b19dd;color:#f1e5c2;box-shadow:0 8px 35px #04080788;letter-spacing:.04em}
#interact .key{display:inline-grid;place-items:center;min-width:25px;height:25px;margin-right:9px;border:1px solid #ddca9699;background:#d5bd7d22;color:#ffe8a8}
#stamina{position:absolute;z-index:11;left:50%;bottom:76px;width:min(270px,48vw);height:7px;transform:translateX(-50%);border:1px solid #d2c69855;background:#08120fcc}
#stamina-fill{height:100%;background:linear-gradient(90deg,#55794e,#c9c26f);transition:width .12s linear}
#journal-panel,#map-panel{width:min(650px,calc(100% - 34px));max-height:min(82svh,760px);overflow:auto;text-align:left}
#journal-panel .chapter,#map-panel .chapter{justify-content:flex-start}
#journal-panel h2,#map-panel h2{text-align:left}
#journal-entries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
#journal-entries article{padding:14px 16px;border-left:1px solid #c3a96d66;background:#ffffff08}
#journal-entries h3{font:500 19px 'Cormorant Garamond',serif;color:#ead9ab;margin:0 0 5px}
#journal-entries p{font-size:13px;margin:0}
#valley-map{margin:18px auto 0;max-width:430px;background:radial-gradient(circle at 50% 45%,#314139,#101a18);border:1px solid #bcaa775c}
#valley-map svg{display:block;width:100%;height:auto}
.panel{max-height:calc(100svh - 32px);overflow:auto}
body.immersive header,body.immersive .controls,body.immersive .bottom-right,body.immersive #journey{opacity:0;pointer-events:none}
@media(max-width:620px){header{padding:16px}.brand{display:none}.actions button{width:44px;height:44px}.compass{top:68px}#journal-entries{grid-template-columns:1fr}.panel{padding:28px 22px}#interact{bottom:23%;width:max-content;max-width:88%;font-size:13px}}
@media(max-height:520px){#game{min-height:0}.brand,.controls,.bottom-right{display:none}.compass{top:12px}.panel{top:52%;padding:20px 24px}.panel h2{font-size:35px;margin:14px 0 8px}.panel .primary{margin-top:15px}}
@media(pointer:coarse){.panel{touch-action:pan-y}button{min-height:44px}}

#stamina-fill{transform-origin:left center;width:100%;transition:transform .12s linear}#stamina>span{display:block;margin-top:7px;text-align:center;letter-spacing:.2em;font-size:9px;color:#d9d0b7}.quest-meta{display:flex;gap:18px;font-size:12px;color:#d8c79d;margin:7px 0 11px}#interact kbd{margin-right:10px;padding:5px 8px}.panel-top{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.close-button{background:none;border:1px solid #bfaa7466;color:#ead9b2;min-width:44px;min-height:44px;font-size:25px}.story-panel p{white-space:pre-line}

/* Battle composition: narrow gauges, aged brass, ivory type and deep crimson. */
body.in-boss .brand,body.in-boss .compass,body.in-boss #journey,body.in-boss .controls,body.in-boss .bottom-right,body.in-boss #stamina{display:none}
body.in-boss header{justify-content:flex-end}
#combat-hud{position:absolute;inset:0;z-index:11;pointer-events:none;font-family:Georgia,'Times New Roman',serif;text-shadow:0 1px 3px #000}
#damage-vignette{position:absolute;inset:0;z-index:7;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,transparent 35%,#8a181b85 100%)}
.player-status{position:absolute;top:4.4%;left:3.1%;display:flex;align-items:center;gap:12px}
.status-sigil{width:clamp(43px,4.1vw,64px);height:70px;color:#b4a277;filter:drop-shadow(0 2px 3px #000)}
.status-sigil svg{width:100%;height:100%}
.player-gauges{display:flex;flex-direction:column;gap:6px;width:clamp(150px,24vw,370px)}
.player-gauge{height:12px;position:relative;border:1px solid #958568;background:#161410dc;box-shadow:0 0 0 1px #14100e,0 2px 3px #0008;padding:1px}
.player-gauge i{display:block;height:100%;transform-origin:left;transition:transform .08s linear;box-shadow:inset 0 1px #ffffff12}
.player-gauge.health i{background:linear-gradient(#833a39,#662120)}
.player-gauge.focus{width:76%;height:9px}.player-gauge.focus i{background:linear-gradient(#467383,#304656)}
.player-gauge.endurance{width:87%;height:9px}.player-gauge.endurance i{background:linear-gradient(#697d4f,#3d572e)}
.boss-health{position:absolute;left:23.5%;width:53%;bottom:18.4%}
.boss-health-label{display:flex;align-items:baseline;justify-content:space-between;padding:0 10px 5px;font-size:clamp(13px,1.9vh,21px);color:#e6e2cf;line-height:1.2;letter-spacing:.005em}
#boss-damage{padding-left:12px;font-size:clamp(12px,1.8vh,19px);font-variant-numeric:tabular-nums}
#boss-health-meter{position:relative;height:clamp(6px,.87vh,10px);border:1px solid #9a8866;background:#161311;box-shadow:0 0 0 1px #14120fcc,0 2px 4px #0009}
#boss-health-meter i{position:absolute;inset:1px;transform-origin:left;transition:transform .08s linear}
#boss-health-trail{background:#b29a50}#boss-health-fill{background:linear-gradient(#84332e,#67221e)}
#boss-tell{position:absolute;left:0;right:0;top:21px;color:#d5b984;font:10px Inter,Arial,sans-serif;letter-spacing:.19em;text-align:center;min-height:12px}
.equipment{position:absolute;left:3.8%;bottom:7%;width:170px;height:195px}
.equip-tile{position:absolute;width:63px;height:70px;background:linear-gradient(135deg,#81704b2c,#14120edf 60%);border:1px solid #8674508a;box-shadow:inset 0 0 0 3px #11100e77,0 2px 8px #0006}
.equip-tile svg{display:block;width:100%;height:100%;padding:6px;filter:drop-shadow(0 2px 3px #000)}
.equip-sword{top:0;left:56px}.equip-torch{top:69px;left:0}.equip-flask{top:69px;left:68px;border-color:#b09b68}
.equip-flask b{position:absolute;right:5px;bottom:2px;font-weight:400;font-size:22px;color:#eee5ce}
.equipment-label{position:absolute;left:0;bottom:12px;white-space:nowrap;font-size:14px;color:#ddd6bf}
.combat-currency{position:absolute;right:4%;bottom:7%;width:143px;height:33px;border:1px solid #77694a90;box-shadow:inset 0 0 0 2px #080805aa;background:linear-gradient(90deg,#151411d9,#383323b5,#14120ed9);display:flex;align-items:center;justify-content:space-between;padding:0 14px;color:#ded8bb}
.combat-currency span{font-size:25px;color:#c0af7b}.combat-currency b{font-size:18px;font-weight:400;font-variant-numeric:tabular-nums}
.battle-hints{position:absolute;bottom:7.5%;left:50%;transform:translateX(-50%);display:flex;gap:19px;align-items:center;white-space:nowrap;color:#c9bd99;font:11px Inter,Arial,sans-serif}
.battle-hints b{font-weight:400;color:#c5c4b5;margin-left:3px}.battle-hints button{pointer-events:auto;background:none;border:0;color:#c5c4b5;font-size:11px;padding:9px 0}
.boss-announcement{position:absolute;z-index:14;left:0;top:35%;width:100%;text-align:center;pointer-events:none;padding:25px 5%;background:linear-gradient(90deg,transparent,#090b0dc9 22%,#090b0dd6 50%,#090b0dc9 78%,transparent);animation:boss-reveal .75s ease-out both}
.boss-announcement h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;color:#d6bd81;font-size:clamp(27px,4.2vw,63px);line-height:1.2;margin:8px 0;text-shadow:0 2px 12px #000;letter-spacing:.03em}
.boss-announcement p{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:clamp(14px,1.35vw,19px);color:#c9c1ac;margin:14px 0 4px}
.encounter-caption{font:10px Inter,Arial,sans-serif;letter-spacing:.28em;color:#baaa86}
.phase-announcement{top:25%;padding:15px 5%}.phase-announcement h2{font-size:clamp(21px,2.6vw,39px);letter-spacing:.13em}
.victory-announcement h2{color:#cbb77f;letter-spacing:.035em;font-size:clamp(28px,5vw,78px)}
.boss-death{position:absolute;inset:0;z-index:22;background:#10090766;display:flex;align-items:center;justify-content:center;flex-direction:column}
.death-wash{width:100%;position:absolute;top:33%;padding:28px 12px;text-align:center;background:linear-gradient(90deg,transparent,#090809d4 23%,#090809eb 50%,#090809d4 77%,transparent);animation:boss-reveal 1.1s ease-out both}
.death-wash h2{font-family:Georgia,'Times New Roman',serif;color:#8f2927;letter-spacing:.09em;font-size:clamp(49px,7.5vw,112px);font-weight:400;margin:0;text-shadow:0 0 16px #470a1388;line-height:1.2}
.death-wash p{color:#a19b90;font:italic 15px Georgia,serif;margin:15px 0 0}
.death-actions{position:absolute;top:66%;display:flex;flex-wrap:wrap;justify-content:center;gap:13px;width:min(480px,90%)}
.death-actions button{background:linear-gradient(90deg,#121311,#393426,#121311);color:#ded4b8;border:1px solid #8a795366;padding:12px 25px;font:16px Georgia,serif;min-height:46px}
.death-actions button:hover{border-color:#c5ae7b;color:#fff0cb}.death-actions small{width:100%;text-align:center;color:#9c9889;font-size:11px;margin-top:5px}
#touch-combat button{position:absolute;right:112px;bottom:108px;pointer-events:auto;touch-action:none;width:58px;height:58px;border-radius:50%;background:#191b15b8;color:#e1d3a8;border:1px solid #cab77780;font-size:12px}
#touch-combat #touch-flask{right:110px;bottom:178px}#touch-combat #touch-burst{right:38px;bottom:201px}
body.in-boss #touch-controls>span{display:none}
@keyframes boss-reveal{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:850px){.boss-health{left:12%;width:76%;bottom:24%}.player-status{top:3%;left:3%;gap:7px}.status-sigil{height:56px}.player-gauges{width:clamp(125px,26vw,220px);gap:5px}.player-gauge{height:10px}.equipment{transform:scale(.78);transform-origin:left bottom;left:3%;bottom:4%}.combat-currency{bottom:5%;right:3%;width:100px}.battle-hints{bottom:9%;gap:10px}.battle-hints span{display:none}.battle-hints button{font-size:12px;padding:12px}.boss-health-label{font-size:16px}.death-wash p{font-size:14px}}
@media(max-width:520px){.boss-health{left:8%;width:84%;bottom:34%}.boss-health-label{font-size:14px;padding:0 4px 5px}.player-gauges{width:130px}.player-status{top:17px}.status-sigil{width:32px}.in-boss .actions{gap:2px}.in-boss .actions button{width:34px;height:38px;min-height:38px}.in-boss #journal-button,.in-boss #map-button{display:none}.equipment{bottom:3%;transform:scale(.63)}.combat-currency{bottom:4%}.battle-hints{bottom:8%}.boss-announcement{top:27%}.boss-announcement h2{font-size:27px}.death-actions{top:63%}}
@media(pointer:coarse){.equipment{bottom:2%;transform:scale(.6)}.boss-health{bottom:36%;left:8%;width:84%}.battle-hints{bottom:3%}.combat-currency{bottom:3%;right:4%}}
@media(max-height:520px){.boss-health{bottom:17%;left:23.5%;width:53%}.equipment{transform:scale(.54);bottom:0}.boss-health-label{font-size:14px}.boss-announcement{top:24%;padding:12px 4%}.boss-announcement h2{font-size:29px}.boss-announcement p{margin-top:8px}.battle-hints{bottom:3%}.player-status{top:3%;transform:scale(.8);transform-origin:top left}.death-wash{top:23%;padding:12px}.death-wash h2{font-size:56px}.death-actions{top:62%}.combat-currency{bottom:4%}}
@media(prefers-reduced-motion:reduce){.boss-announcement,.death-wash{animation:none}}

#touch-combat #touch-parry{right:184px;bottom:123px;border-color:#d7bd81;background:#3c3524aa}
.battle-hints{gap:14px}#boss-tell{font-size:12px;letter-spacing:.12em}
@media(max-width:520px){#boss-tell{font-size:11px;letter-spacing:.07em}}

/* App shell and thumb controls share the same restrained brass and ink palette. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
html,body{overscroll-behavior:none}#game{height:100dvh}header{padding-top:calc(22px + var(--safe-top));padding-right:calc(24px + var(--safe-right));padding-left:calc(24px + var(--safe-left))}.actions{margin-left:auto}
.install-link{display:block;margin:13px auto 0;border:0;background:transparent;color:#d7c08d;font-size:12px;padding:8px 14px;text-decoration:underline;text-underline-offset:4px;min-height:40px}
#intro .pwa-status{font:10px Arial,sans-serif;color:#b7bbaa;letter-spacing:.03em;margin:2px auto 0;min-height:12px}
#intro .intro-hint{margin-top:10px}.pause-touch-help{display:none}
#install-dialog{position:fixed;width:min(420px,calc(100% - 36px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 32px);padding:34px 28px;color:#eee2c6;background:#17221cf5;border:1px solid #ad935f;border-radius:3px;overflow:auto}
#install-dialog::backdrop{background:#060d0bdd;backdrop-filter:blur(8px)}#install-dialog h2{font-size:36px;line-height:1.1;margin:20px 0}#install-dialog p{font-size:14px;line-height:1.65;color:#d0cebd}#install-dialog .install-offline{font-size:12px;color:#aeb6a6}#install-close{float:right;margin:-20px -15px 12px 10px}#install-dialog .primary{width:100%;margin-top:24px}
#touch-look{position:absolute;inset:0 0 0 42%;pointer-events:auto;touch-action:none}
#joystick{width:104px;height:104px;bottom:calc(30px + var(--safe-bottom));left:calc(18px + var(--safe-left));background:#0a151467}#joystick div{left:32px;top:32px;pointer-events:none}
#touch-swing{width:70px;height:70px;right:calc(18px + var(--safe-right));bottom:calc(24px + var(--safe-bottom));font-size:13px;background:#314132d6;border-color:#d8c08bcc;box-shadow:0 3px 15px #030a0b55}
#touch-run,#touch-torch{position:absolute;pointer-events:auto;touch-action:none;width:48px;height:44px;color:#e1d3a8;background:#18291ed9;border:1px solid #ac986d99;border-radius:22px;font-size:11px;bottom:calc(150px + var(--safe-bottom));left:calc(20px + var(--safe-left))}
#touch-torch{left:calc(76px + var(--safe-left))}#touch-run[aria-pressed=true]{background:#6c6942;border-color:#ebd59a}
#touch-combat{position:absolute;right:calc(18px + var(--safe-right));bottom:calc(105px + var(--safe-bottom));width:156px;display:grid;grid-template-columns:repeat(3,48px);gap:6px;pointer-events:none}
#touch-combat button,#touch-combat #touch-parry,#touch-combat #touch-flask,#touch-combat #touch-burst{position:static;width:48px;height:48px;min-height:48px;pointer-events:auto;border-radius:50%;font-size:11px;background:#19261fe8}
#touch-combat #touch-parry{border-color:#d7bd81;background:#443d2bdd}#touch-combat #touch-dodge{border-color:#c7d0b3}
#touch-controls>span{bottom:calc(8px + var(--safe-bottom));right:calc(103px + var(--safe-right));max-width:100px;text-align:center;font-size:10px;pointer-events:none}
.touch-mode .controls,.touch-mode .pause-help,.touch-mode #interact kbd{display:none}.touch-mode .pause-touch-help{display:block;font-size:12px}.touch-mode .equipment,.touch-mode .battle-hints,.touch-mode .combat-currency{display:none}
.touch-mode header{padding:calc(12px + var(--safe-top)) calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left))}.touch-mode .actions button{width:44px;height:44px;min-height:44px}
.touch-mode #interact{bottom:calc(225px + var(--safe-bottom));max-width:88%;min-height:48px}.touch-mode .boss-health{bottom:calc(250px + var(--safe-bottom));left:8%;width:84%}
.touch-mode .player-status{top:calc(14px + var(--safe-top));left:calc(14px + var(--safe-left));transform:none}.touch-mode.in-boss #journal-button,.touch-mode.in-boss #map-button{display:none}.touch-mode .player-gauges{width:min(30vw,200px)}
.touch-mode #journey{left:calc(20px + var(--safe-left));bottom:calc(225px + var(--safe-bottom))}.touch-mode #journey h2{font-size:23px}.touch-mode #journey p{font-size:12px}.touch-mode .quest-meta{margin-bottom:5px}
.touch-mode #stamina{bottom:calc(12px + var(--safe-bottom));width:82px;left:calc(70px + var(--safe-left));height:5px}.touch-mode #stamina>span{display:none}
.touch-mode #notice{top:calc(120px + var(--safe-top));font-size:12px}.touch-mode .panel{max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 32px)}
@media(max-height:520px) and (orientation:landscape){.touch-mode .compass{top:calc(12px + var(--safe-top))}.touch-mode #journey{top:calc(63px + var(--safe-top));bottom:auto}.touch-mode #journey .chapter,.touch-mode #journey p{display:none}.touch-mode #journey h2{font-size:18px;margin:0}.touch-mode #interact{bottom:calc(48px + var(--safe-bottom));max-width:calc(100% - 370px);font-size:11px;padding:8px}.touch-mode .boss-health{bottom:calc(58px + var(--safe-bottom));left:25%;width:48%}.touch-mode #boss-tell{font-size:10px}.touch-mode .boss-health-label{font-size:12px}.touch-mode #intro{bottom:20px}.touch-mode #intro h1{font-size:36px}.touch-mode #intro p{font-size:17px;margin-bottom:10px}.touch-mode .intro-hint{display:none}.touch-mode #notice{top:calc(77px + var(--safe-top));max-width:46%}.touch-mode .boss-announcement{top:20%}}

.touch-mode #game{touch-action:auto}.touch-mode #world{touch-action:none}
body.touch-mode.playing #journey{left:calc(20px + var(--safe-left));bottom:calc(295px + var(--safe-bottom))}
@media(max-height:520px) and (orientation:landscape){body.touch-mode.playing #journey{top:calc(63px + var(--safe-top));bottom:auto}}

/* Clear feedback, safe dialogs, and a quiet save indicator. */
.panel .primary,#install-dialog .primary{min-width:0}
#intro #loading-note{font:12px/1.5 Inter,Arial,sans-serif;max-width:340px;margin:12px auto;color:#dacda9}
#save-status{font-size:12px;color:#aaaf9b;margin:8px 0}
#combat-feedback{position:absolute;z-index:14;top:58%;left:50%;transform:translateX(-50%);max-width:80%;padding:8px 14px;background:#171c20e8;border:1px solid #c6a05c70;color:#ecd5a9;font-size:13px;text-align:center;pointer-events:none}
#touch-combat button[data-unavailable="true"]{color:#b9b5a3;border-color:#b9b5a330;background:#1b2221bb}

.touch-mode .compass{top:calc(68px + var(--safe-top))}
#intro .text-button{margin-top:8px;min-height:44px}
#intro{max-height:calc(100svh - 220px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#a38d55 transparent;padding:5px}
.touch-mode #intro{bottom:calc(24px + var(--safe-bottom));max-height:calc(100svh - var(--safe-top) - var(--safe-bottom) - 182px);touch-action:pan-y}
@media(max-height:520px){#intro{max-height:calc(100svh - 120px)}.touch-mode #intro{bottom:calc(12px + var(--safe-bottom));max-height:calc(100svh - var(--safe-top) - var(--safe-bottom) - 108px)}#intro .text-button,#intro .install-link{margin-top:4px}.touch-mode .compass{top:calc(12px + var(--safe-top))}.touch-mode #combat-feedback{top:38%;font-size:11px}}
