*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#090e0c;color:#f3e4bf;font-family:Arial,Helvetica,sans-serif;overscroll-behavior:none;touch-action:none;user-select:none;-webkit-user-select:none}button{font:inherit;cursor:pointer;color:inherit;border:0;touch-action:none}button:focus-visible{outline:3px solid #fff1a4;outline-offset:3px}[hidden]{display:none!important}body{display:grid;place-items:center}#game{position:relative;overflow:hidden;width:min(100vw,177.778dvh);height:min(100dvh,56.25vw);background:#12211d;isolation:isolate}canvas{display:block;width:100%;height:100%;image-rendering:pixelated}.vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 100px #0006;z-index:1}.screen{position:absolute;inset:0;z-index:4}#menu{background:linear-gradient(90deg,#081610dd 0%,#0b1b17aa 35%,#08161008 75%);padding:3.4% 5.3%}.edition{font-size:clamp(7px,1.05vw,13px);letter-spacing:.22em;font-weight:700;color:#b7bca8}.edition span{color:#dbac5e;margin:0 12px}.titleblock{position:absolute;top:19%;left:6%;width:60%}.eyebrow{color:#deb575;letter-spacing:.3em;font-size:clamp(8px,1vw,13px);margin:0 0 2%}h1{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:900;font-size:clamp(30px,7.8vw,108px);line-height:.8;letter-spacing:-.065em;margin:0 0 5% -1%;transform:rotate(-3deg);text-shadow:2px 3px 0 #773d1b,4px 6px 0 #251910;color:#e5ad51}h1 span{font-size:1.24em;color:#f6cf78}.subtitle{display:flex;align-items:center;gap:12px;letter-spacing:.16em;font-size:clamp(7px,1.03vw,14px);font-weight:800;color:#f1ddb6;width:92%}.subtitle i{width:22px;flex-shrink:0;height:1px;background:#b29260}.tagline{color:#c3c1a6;font-family:Georgia,serif;font-style:italic;font-size:clamp(10px,1.4vw,18px);margin:3% 0 5%}.menu-actions{width:53%;min-width:210px;max-width:330px}.primary{background:#d8ac62;color:#1d2018;box-shadow:0 4px 0 #71572f;padding:16px 20px;letter-spacing:.12em;font-size:12px;font-weight:800;width:100%;display:flex;align-items:center;justify-content:space-between;gap:20px;transition:background .15s,transform .15s}.primary:hover{background:#f0cb80;transform:translateY(-2px)}.primary span{font-size:20px;line-height:10px}.secondary-row{display:flex;justify-content:space-between;margin-top:17px;gap:5px}.secondary{padding:6px 0;background:transparent;color:#cbc6ae;font-size:9px;font-weight:700;letter-spacing:.13em}.secondary:hover{color:#fff2bb}.menu-footer{position:absolute;bottom:5%;left:6%;right:5%;display:flex;justify-content:space-between;font-size:9px;letter-spacing:.17em;color:#a3ad97}.menu-footer b{color:#c69d5a;margin:0 12px}.expedition-stamp{position:absolute;right:5.8%;top:9%;text-align:right;display:flex;flex-direction:column;gap:6px;color:#e0c891}.expedition-stamp span{font-family:Georgia,serif;font-size:30px;letter-spacing:.23em}.expedition-stamp strong{font-size:10px;letter-spacing:.15em}.expedition-stamp small{font-size:7px;letter-spacing:.2em}#hud{position:absolute;inset:0;z-index:2;pointer-events:none}.hud-top{height:77px;background:linear-gradient(#08110ee6,#08110e00);display:flex;justify-content:space-between;padding:19px 25px}.hud-label{font-size:8px;letter-spacing:.2em;color:#c7c3a3;font-weight:700;margin-bottom:8px}#hearts{font-size:22px;letter-spacing:4px;color:#dca65c;line-height:1}.heart-empty{color:#726955}.chapter-box{text-align:center;display:flex;flex-direction:column;gap:6px;padding-left:30px}.chapter-box span{font-size:8px;letter-spacing:.25em;color:#e0bc7d}.chapter-box strong{font-size:11px;letter-spacing:.14em}.hud-right{display:flex;align-items:flex-start;gap:13px}#score{font-family:monospace;letter-spacing:.1em;font-size:17px;color:#e7cd92;padding-top:4px}.hud-right button{pointer-events:auto;width:29px;height:29px;background:#14251daa;border:1px solid #a4976555;color:#ecdbac;font-size:17px}.objective{position:absolute;top:74px;left:25px;display:flex;flex-direction:column;gap:5px;font-size:10px;letter-spacing:.04em;text-shadow:1px 2px #000}.objective small{color:#cfb982;font-size:9px}#toast{position:absolute;left:50%;top:23%;transform:translateX(-50%);padding:10px 22px;background:#10231cda;border:1px solid #dbc08b66;color:#f1dfaf;font-family:Georgia,serif;font-style:italic;font-size:15px;text-align:center;opacity:0;transition:opacity .2s;max-width:78%}#toast.visible{opacity:1}#context{position:absolute;bottom:18%;left:50%;transform:translateX(-50%);font-size:11px;letter-spacing:.08em;color:#ffdda0;background:#111b16cf;padding:8px 16px;border:1px solid #c4ad5c88;white-space:nowrap}#context:empty{display:none}.progress{position:absolute;bottom:0;height:3px;width:100%;background:#060b0866}.progress i{height:100%;display:block;background:#d5af6a;width:0}#bossHud{position:absolute;left:32%;right:32%;top:82px;text-align:center;font-size:8px;letter-spacing:.2em}#bossHud>div{margin-top:7px;height:6px;background:#192b29;border:1px solid #b7a269}#bossHealth{display:block;height:100%;background:#e2b968;width:100%}#overlay{background:#06100dc9;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center}.panel{width:580px;max-width:88%;max-height:92%;overflow-y:auto;background:linear-gradient(135deg,#22332b,#12231e);border:1px solid #a78b555e;box-shadow:0 16px 80px #0008;padding:32px 38px;text-align:center}.panel .eyebrow{font-size:9px;margin-bottom:17px}.panel h2{font-family:Georgia,serif;font-size:34px;font-weight:400;margin:0 0 16px;color:#f1ce8d}.panel p{font-family:Georgia,serif;font-size:15px;color:#c7c6ad;line-height:1.6;margin:10px 0 20px}.panel .primary{max-width:280px;margin:20px auto 0}.panel .secondary{display:inline-block;margin:14px 10px 0}.route{display:flex;align-items:center;justify-content:center;margin:22px auto;gap:12px;color:#8a9a84;font-size:11px}.route i{display:block;width:25px;height:1px;background:#81744b}.route .done{color:#e8bd68}.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;text-align:left;margin:20px 0;font-size:11px;color:#d1d0b9}.controls-grid b{color:#e7bf78;display:block;margin-bottom:5px}kbd{padding:2px 5px;border:1px solid #8e866250;border-radius:3px;font:10px monospace}.guide-text{font-size:12px!important;text-align:left}.panel .footnote{font:9px Arial,sans-serif;color:#879b8b;margin:16px 0 0}.runes{display:flex;justify-content:center;gap:15px;margin:18px 0}.runes button{background:#38443a;border:1px solid #a98f59;width:75px;height:75px;font-size:29px;color:#e1be70}.runes button small{display:block;font-size:8px;letter-spacing:.1em;margin-top:6px}.runes button:hover{background:#526149}.puzzle-slots{letter-spacing:.7em;color:#f3ca73;font-size:22px;min-height:30px}.results{display:flex;justify-content:center;gap:30px;margin:20px 0}.results span{font-size:9px;letter-spacing:.13em;color:#a9b39c}.results b{display:block;font:26px Georgia,serif;color:#e3bc77;margin-bottom:6px}#touch{position:absolute;inset:0;pointer-events:none;z-index:3}.touch-left,.touch-right{position:absolute;bottom:19px;display:flex;align-items:flex-end;gap:10px}.touch-left{left:max(19px,env(safe-area-inset-left))}.touch-right{right:max(19px,env(safe-area-inset-right))}#touch button{pointer-events:auto;width:64px;height:64px;border-radius:50%;border:1px solid #ddcf9655;background:#101e1b70;backdrop-filter:blur(2px);color:#f4e7bc;font-size:19px;box-shadow:0 2px 10px #0003}#touch button.active{background:#9c815eaa;border-color:#f1d49f}#touch button[data-key=attack]{font-size:11px;letter-spacing:.05em}#touch .small{width:43px;height:43px;font-size:10px;margin-bottom:0}#touch .jump{width:73px;height:73px;background:#ba965949;font-size:25px}#touch .jump small{display:block;font-size:8px;letter-spacing:.1em}#rotate{display:none;position:fixed;inset:0;background:#101f18f5;z-index:20;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:35px}#rotate>span{font-size:65px;color:#d4ae66}#rotate strong{font:26px Georgia,serif;color:#edce92;max-width:280px}#rotate p{font-size:13px;color:#b7bea8}#rotate button{background:transparent;border:1px solid #c9a96977;padding:13px 20px;margin-top:20px;font-size:10px;letter-spacing:.15em}body.allow-portrait #rotate{display:none!important}@media(pointer:coarse){.hud-top{padding:12px 20px}.objective{top:65px}.panel{padding:20px 30px}.panel h2{font-size:28px}.panel p{font-size:13px}.panel .primary{padding:13px 18px}.controls-grid{gap:10px}.menu-actions{min-width:180px}.primary{padding:12px 16px;font-size:10px}.secondary-row{margin-top:10px}.secondary{font-size:8px}.menu-footer{font-size:7px}.titleblock{top:17%}}@media(max-height:430px) and (orientation:landscape){#game{width:100vw;height:100dvh}.titleblock{top:15%;width:58%}h1{font-size:clamp(32px,6.6vw,75px);margin-bottom:4%}.tagline{margin:2% 0 3%;font-size:12px}.primary{padding:11px 16px;font-size:9px}.menu-footer{bottom:4%}.edition{font-size:8px}.secondary-row{margin-top:8px}.subtitle{font-size:8px}.hud-label{font-size:7px}#hearts{font-size:18px}.chapter-box strong{font-size:9px}.chapter-box span{font-size:7px}#score{font-size:14px}.hud-top{padding:10px 18px}.objective{top:56px;left:18px;font-size:9px}.objective small{font-size:8px}.panel{padding:18px 28px;max-height:94%}.panel h2{font-size:26px;margin-bottom:10px}.panel p{font-size:12px;margin:8px 0 12px}.panel .eyebrow{margin-bottom:10px}.panel .primary{margin-top:14px}.route{margin:14px 0}.controls-grid{font-size:10px;gap:9px;margin:14px 0}.guide-text{font-size:10px!important}.touch-left,.touch-right{bottom:15px}#touch button{width:52px;height:52px}#touch .jump{width:61px;height:61px}#touch .small{width:37px;height:37px}#context{bottom:24%;font-size:9px}#toast{font-size:12px}}@media(orientation:portrait) and (pointer:coarse){#rotate{display:flex}#game{width:100vw;height:56.25vw}.edition{font-size:5px}.titleblock{top:17%}.eyebrow{font-size:5px}.subtitle{font-size:5px;gap:4px}.subtitle i{width:8px}.menu-actions{min-width:130px;width:60%}.primary{font-size:6px;padding:8px}.secondary{font-size:5px}.tagline{font-size:7px}.menu-footer{font-size:4px}.expedition-stamp span{font-size:17px}.expedition-stamp strong{font-size:6px}.expedition-stamp small{font-size:4px}.hud-top{transform:scale(.65);transform-origin:top left;width:154%}.objective{top:43px;font-size:7px}.chapter-box{padding:0}#touch button{width:32px;height:32px;font-size:10px}#touch .jump{width:37px;height:37px;font-size:13px}#touch .small{width:26px;height:26px;font-size:6px}.touch-left,.touch-right{bottom:8px;gap:4px}.touch-left{left:8px}.touch-right{right:8px}#touch .jump small{font-size:5px}.panel{padding:12px 18px}.panel h2{font-size:18px}.panel p{font-size:9px}.panel .eyebrow{font-size:6px;margin:0 0 7px}.route{font-size:8px;margin:8px 0}.panel .primary{font-size:7px;max-width:180px;margin-top:8px}.panel .secondary{margin-top:8px}.controls-grid{font-size:7px;gap:7px;margin:8px 0}.guide-text{font-size:8px!important}.panel .footnote{font-size:6px}.results b{font-size:18px}.results span{font-size:6px}.results{margin:10px 0}}

@media(min-width:1000px) and (pointer:fine){.hud-label{font-size:10px}.chapter-box span{font-size:10px}.chapter-box strong{font-size:13px}.objective{font-size:12px}.objective small{font-size:10px}.hud-top{padding:22px 30px}.objective{left:30px;top:83px}}

/* Cel-animation edition — ink outlines, warm paper and evening-blue shadows. */
:root{--ink:#102737;--deep-ink:#071722;--paper:#f4dfb5;--gold:#edb761;--leather:#70371f}
html,body{background:var(--deep-ink);color:var(--paper)}
#game{container-type:inline-size;background:var(--ink)}
canvas{image-rendering:auto}
.vignette{box-shadow:inset 0 0 80px #07172240}
#menu{background:linear-gradient(100deg,#081a29 0%,#102d3eeb 42%,#153c4bd0 69%,#081a29e8 100%)}
#menu:after{content:"";position:absolute;inset:2%;border:1px solid #eab77334;pointer-events:none}
.heroine-art{position:absolute;right:1%;bottom:0;height:100%;width:48%;object-fit:contain;object-position:center bottom;pointer-events:none;mask-image:linear-gradient(90deg,transparent,#000 22%,#000 82%,transparent);-webkit-mask-image:linear-gradient(90deg,transparent,#000 22%,#000 82%,transparent)}
.edition{position:relative;z-index:1;color:#dac9a9;font-size:1cqw;letter-spacing:.19em}
.edition span{color:var(--gold)}
.titleblock{z-index:1;top:20%;left:6%;width:58%}
h1{color:#e8a854;text-shadow:1px 2px 0 #9a4d29,3px 5px 0 #43251e,5px 7px 0 #07172280;font-size:8cqw;letter-spacing:-.06em}
h1 span{color:#ffdc8c}
.eyebrow{color:#f0bb70;font-size:1.08cqw;letter-spacing:.23em}
.subtitle{font-size:1.03cqw;color:#f5dfb7;letter-spacing:.11em;gap:10px}
.subtitle i{background:#e3ac67}
.tagline{font-size:1.5cqw;color:#dfcfb7;text-shadow:0 1px #071722}
.menu-actions{min-width:0;width:57%;max-width:350px}
.primary{border:1px solid #ffd995;border-radius:3px;background:linear-gradient(180deg,#f3c980,#dca45b);box-shadow:0 4px 0 #5e361f,0 7px 16px #0003;color:#30241d;letter-spacing:.09em}
.primary:hover{background:#ffdc96;box-shadow:0 4px 0 #5e361f,0 9px 20px #0005}
.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #5e361f}
.secondary{color:#e4cfaa}
.secondary:hover{color:#ffe6a9}
.menu-footer{color:#b9c7c8;font-size:.88cqw;z-index:1}
.menu-footer b{color:var(--gold)}
.expedition-stamp{display:none}
.heroine-caption{position:absolute;right:4%;bottom:9%;width:36%;display:flex;align-items:center;flex-direction:column;gap:7px;color:#f4dba5;text-shadow:0 2px 4px #071722;z-index:1}
.heroine-caption span{font-size:1.05cqw;letter-spacing:.23em;font-weight:bold}
.heroine-caption i{height:1px;width:35%;background:#d9a058}
.heroine-caption small{font-size:.66cqw;letter-spacing:.13em}
.hud-top{background:linear-gradient(#081b30e8,#102d3d99 55%,#102d3d00)}
.hud-label,.chapter-box span{color:#f1c67e}
#hearts{color:#f2b277;text-shadow:0 2px #613e34}
.heart-empty{color:#53606a;text-shadow:none}
.hud-right button{background:#112e40d9;border-color:#e9bd6d66;border-radius:4px}
#score{color:#ffdc98}
.objective{color:#fff0d0;text-shadow:0 1px 3px #061722,0 1px 3px #061722}
.objective small{color:#efd19c}
#toast,#context{background:#102b3ce8;border-color:#e5b67488;color:#ffe3ad;box-shadow:0 3px 12px #0004;border-radius:3px}
.progress i{background:linear-gradient(90deg,#bf6c38,#f4cb7f)}
#overlay{background:#071b2bd6;backdrop-filter:blur(5px)}
.panel{background:linear-gradient(145deg,#234759,#102a3d);border:1px solid #d3aa6b80;border-radius:7px;box-shadow:0 16px 80px #0008,inset 0 0 0 5px #081d2b55;scrollbar-color:#d3aa6b #102a3d}
.panel h2{color:#ffda95}
.panel p{color:#e0d5be}
.panel .eyebrow,.controls-grid b{color:#f6c27c}
.panel .footnote{color:#aebfc3}
.controls-grid{color:#e4d9c5}
.route{color:#97afb3}
.route .done{color:#ffd48d}
.runes button{background:#285063;border-color:#d7af70;border-radius:5px;box-shadow:0 3px #071722;color:#ffdc96}
.runes button:hover{background:#3e6575}
#touch button{background:#102b3fa3;border:2px solid #edc68988;box-shadow:0 3px 0 #08172166;color:#ffe7ba}
#touch .jump{background:#a46c3c99;border-color:#f2cb84}
#touch button.active{background:#d3a05dcf}
#rotate{background:#0c2537f7}
@media(max-height:430px) and (orientation:landscape){.titleblock{top:17%}h1{font-size:7.2cqw}.tagline{font-size:1.45cqw;margin:2% 0 3%}.subtitle{font-size:1cqw}.edition{font-size:.9cqw}.heroine-caption{bottom:10%}.primary{padding:11px 15px}.menu-footer{bottom:4.5%}}
@media(orientation:portrait) and (pointer:coarse){.titleblock{top:19%}h1{font-size:8cqw}.eyebrow{font-size:1.08cqw}.edition{font-size:1cqw}.tagline{font-size:1.5cqw}.subtitle{font-size:1.03cqw;gap:4px}.menu-actions{min-width:0;width:62%}.primary{font-size:1.45cqw;padding:1.7cqw 2cqw}.secondary{font-size:1.1cqw}.secondary-row{margin-top:2cqw}.heroine-caption{gap:3px}.menu-footer{font-size:.88cqw}.panel .primary{font-size:7px;padding:8px}.panel .eyebrow{font-size:6px}}
@media(prefers-reduced-motion:reduce){button,#toast{transition:none!important}}

/* Retain the original adventure-title typography and gold palette. */
.edition,.subtitle{text-transform:uppercase}

/* Victory effects sit behind an opaque readable results card. */
#celebration{position:absolute;inset:0;pointer-events:none;z-index:4;width:100%;height:100%}
#overlay.celebrating{background:transparent;backdrop-filter:none;z-index:5}
#overlay.celebrating .panel{position:relative;background:linear-gradient(135deg,#173949,#102737);box-shadow:0 12px 60px #071722aa;border-color:#efc779}
.music-control{position:absolute;right:4%;top:8%;z-index:8;background:#102737e8;border:1px solid #e3ac67;border-radius:3px;color:#f5dfb7;padding:8px 12px;font-size:clamp(7px,1cqw,12px);letter-spacing:.06em}
@media(prefers-reduced-motion:reduce){#toast,.primary{transition:none}}

.sound-gate{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:#071722b8;backdrop-filter:blur(4px)}
.sound-gate-card{width:min(480px,88%);padding:clamp(16px,3cqw,36px);text-align:center;background:linear-gradient(135deg,#173949,#102737);border:1px solid #efc779;box-shadow:0 12px 60px #071722aa;color:#f4dfb5}
.sound-gate-card h2{font:italic clamp(18px,3cqw,34px) Georgia,serif;color:#ffdc8c;margin:12px 0}
.sound-gate-card p:not(.eyebrow){font-size:clamp(10px,1.4cqw,15px);line-height:1.5;margin:12px 0 22px}
.sound-gate-card .primary{font-size:clamp(8px,1.1cqw,12px);justify-content:center}
.sound-gate-card .secondary{margin-top:18px;padding:8px}
@media(prefers-reduced-motion:reduce){.sound-gate{backdrop-filter:none}}
.sound-gate-card{max-height:94%;overflow:auto}
@media(max-height:430px),(orientation:portrait){.sound-gate-card{padding:12px 18px}.sound-gate-card h2{margin:8px 0}.sound-gate-card p:not(.eyebrow){margin:8px 0 12px}.sound-gate-card .primary{padding:10px 12px}.sound-gate-card .secondary{margin-top:8px}}
/* iOS: game text/art are controls, not selectable document content. */
#game,#game *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
#game img,#game canvas{-webkit-user-drag:none}
