*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0b1113;color:#eae4d4;font-family:"Noto Sans KR","Malgun Gothic",system-ui,sans-serif}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid #e5c38a;outline-offset:5px}#game-shell{position:relative;width:100%;height:100%;isolation:isolate;background:#121c20}canvas{position:absolute;width:100%;height:100%;object-fit:contain}#interface{position:absolute;inset:0;pointer-events:none}#interface button,#interface input,#interface select{pointer-events:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
body{display:grid;place-items:center}#game-shell{width:min(100vw,177.77778dvh);height:auto;aspect-ratio:16/9;overflow:hidden;box-shadow:0 0 100px #000}#interface{font-size:clamp(14px,1.05vw,19px)}.serif,h1,h2{font-family:"Noto Serif KR","Batang",Georgia,serif;font-weight:400}.shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,15,17,.94),rgba(8,16,19,.65) 40%,rgba(10,15,18,.07) 76%),linear-gradient(0deg,rgba(5,10,12,.7),transparent 35%)}.topline{position:absolute;top:5%;left:5.5%;font-size:.8em;letter-spacing:.2em;color:#ddd2bb}.topline:before{content:'✦';color:#c5a570;margin-right:1.1em}.tools{position:absolute;right:4%;top:3.5%;display:flex;gap:.55em;z-index:8}.iconbtn{border:1px solid #cbbf983b;color:#e4dbc9;background:#0b1316aa;width:2.9em;height:2.9em;border-radius:50%;display:grid;place-items:center;font-size:1em;transition:background .2s}.iconbtn:hover{background:#33403c}.iconbtn svg{width:1.15em;height:1.15em;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.title-content{position:absolute;left:8%;top:22%;width:48%;animation:arrive 1s both}.eyebrow{font-size:.8em;letter-spacing:.26em;color:#ccad79;margin:0 0 1.5em}.title-content h1{font-size:clamp(42px,6.25vw,106px);line-height:1.18;letter-spacing:-.055em;margin:0}.title-en{font-family:Georgia,serif;font-size:.9em;letter-spacing:.26em;color:#abaf9f;margin:1.25em 0 2em}.title-copy{font-size:1.06em;line-height:1.85;color:#b8bdb5;margin-bottom:2em}.gold-button{display:inline-flex;align-items:center;justify-content:center;gap:2em;min-width:16em;padding:1em 1.4em;color:#e8d8b5;border:1px solid #ad9460;background:linear-gradient(110deg,#3c392ad9,#182022e6);font-size:1em;letter-spacing:.06em;transition:background .2s,transform .2s}.gold-button:hover{background:linear-gradient(110deg,#655536e6,#293532);transform:translateY(-2px)}.gold-button:disabled{opacity:.5;cursor:wait}.gold-button .diamond{font-size:.85em}.quiet-button{border:0;background:none;color:#c7cbbb;font-size:.88em;padding:.8em 0;border-bottom:1px solid #a7ad9a45}.quiet-button:hover{color:#f5ddaf}.title-secondary{display:flex;gap:1.5em;margin-top:1em;align-items:center}.title-footer{position:absolute;left:5.5%;right:5.5%;bottom:4%;display:flex;justify-content:space-between;align-items:center;font-size:.78em;color:#a0a99f;letter-spacing:.1em}.footer-rule{width:3.5em;height:1px;background:#a48e65;display:inline-block;margin:0 1.1em;vertical-align:middle}.knight-motto{position:absolute;right:7%;top:38%;color:#ecdfc4ad;writing-mode:vertical-rl;font-family:"Batang",serif;font-size:1.1em;letter-spacing:.3em;line-height:2.4}.overlay{position:absolute;inset:0;background:#070f13bd;display:flex;align-items:center;justify-content:center;pointer-events:auto;animation:arrive .4s both;z-index:12}.panel{width:min(600px,80%);padding:3em;border:1px solid #bbab7b66;background:linear-gradient(135deg,#192324f2,#101a1df5);box-shadow:0 20px 80px #0008;text-align:center}.panel h2{font-size:2.3em;line-height:1.35;margin:0 0 .7em}.panel p{line-height:1.9;color:#b6c1bb}.panel .gold-button{margin-top:1em}.panel-actions{display:flex;flex-wrap:wrap;gap:1em;justify-content:center;margin-top:1em}.panel-actions .quiet-button{min-width:6em}.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:1em;text-align:left;margin:2em 0}.control-cell{display:flex;gap:.65em;align-items:center;font-size:.9em}kbd{font:inherit;font-size:.85em;display:inline-block;min-width:2em;text-align:center;padding:.3em .5em;border:1px solid #c3c4ac4a;border-radius:3px;background:#c6d3bb0b;color:#e2d9c1}.help-note{font-size:.82em!important}.difficulty{display:flex;justify-content:center;gap:1em;margin:1em 0}.difficulty button{border:1px solid #b9b3934a;color:#bbb;background:transparent;padding:.7em 1em}.difficulty button.selected{border-color:#c6ae7e;color:#e8d7b6;background:#c0a46c1b}.dialogue-shade{position:absolute;inset:0;background:linear-gradient(0deg,#081216f5,transparent 80%);pointer-events:auto}.story-box{position:absolute;left:20%;right:20%;bottom:14%;text-align:center;animation:arrive .7s both}.story-box .speaker{color:#cfb783;font-size:.9em;letter-spacing:.18em;margin-bottom:1.4em}.story-text{font-family:"Noto Serif KR","Batang",Georgia,serif;font-size:1.65em;line-height:1.9;min-height:4em;word-break:keep-all;color:#efe8d8;margin:0 0 1.4em}.story-step{font-size:.75em;color:#8e9e99;margin-top:1.5em;letter-spacing:.3em}.skip-story{position:absolute;right:5%;bottom:5%;font-size:.8em}.chapter-intro{position:absolute;top:11%;left:0;right:0;text-align:center}.chapter-intro h2{font-size:2.2em;margin:.3em 0;color:#dfd9ca}.chapter-intro small{color:#b7bcae;font-size:.85em;letter-spacing:.18em}.hud{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#071014bd,transparent 24%,transparent 87%,#050c10b0)}.player-hud{position:absolute;top:5%;left:4.5%;width:23%}.hud-name{display:flex;justify-content:space-between;align-items:center;letter-spacing:.1em;font-size:.9em;color:#e9dfca;margin-bottom:.7em}.hp-track{height:7px;background:#0c1418c9;border:1px solid #ac987053;padding:1px}.hp-fill{height:100%;width:100%;background:linear-gradient(90deg,#967057,#ddad88);transition:width .1s}.stamina-track{margin-top:.4em;height:3px;background:#132326}.stamina-fill{height:100%;width:100%;background:#829e94;transition:width .08s}.relics{display:flex;gap:.8em;margin-top:1em;color:#d6c7aa;font-size:.75em}.relic-dot{display:flex;align-items:center;gap:.4em;opacity:.35}.relic-dot.current{opacity:1}.relic-dot.purified{opacity:.7;color:#97b4a8}.chapter-hud{position:absolute;left:34%;right:34%;top:4.5%;text-align:center;font-family:"Batang",serif;font-size:1.3em;letter-spacing:.1em}.chapter-hud small{font-family:system-ui,sans-serif;display:block;font-size:.5em;letter-spacing:.25em;color:#abaf9b;margin-bottom:.55em}.skill-hud{position:absolute;left:4.5%;top:20%;display:flex;gap:.7em;align-items:center}.skill-key{border:1px solid #b3c9c07a;display:grid;place-items:center;width:2.5em;height:2.5em;background:#08181abd;color:#cbdccb}.skill-name{font-size:.85em;line-height:1.8;text-shadow:0 2px 4px #000}.skill-name small{display:block;color:#b8c8bb;font-size:.86em}.boss-hud{position:absolute;width:38%;bottom:8%;left:31%;text-align:center}.boss-name{font-family:"Batang",serif;font-size:1.15em;letter-spacing:.1em;margin-bottom:.6em;text-shadow:0 2px 4px #000}.boss-track{height:5px;background:#090c0d;border:1px solid #b5a17059}.boss-fill{height:100%;background:linear-gradient(90deg,#826543,#c5a879);transition:width .12s}.boss-status{font-size:.73em;margin-top:.7em;color:#ddc7a0;min-height:1em}.key-strip{position:absolute;left:4.5%;right:4.5%;bottom:2.2%;display:flex;gap:1.5em;font-size:.72em;color:#b6bfb3;justify-content:center;align-items:center}.key-strip kbd{font-size:.88em;padding:.2em .4em;min-width:1.7em}.key-strip .key{display:flex;gap:.5em;align-items:center}.toast{position:absolute;top:17%;left:29%;right:20%;text-align:center;pointer-events:none;z-index:15;animation:arrive .3s both;color:#eddfb9;font-size:.95em;line-height:1.7;text-shadow:0 2px 8px #000;background:#0813169e;padding:.7em 1.1em;border-bottom:1px solid #d3b06b55}.battle-banner{position:absolute;inset:33% 20% auto;text-align:center;animation:banner 3s both;pointer-events:none}.battle-banner h2{font-size:3em;margin:0;color:#eae2ce;text-shadow:0 3px 20px #000}.battle-banner p{letter-spacing:.2em;color:#d3c8ad}.purify-ready{position:absolute;inset:0;background:linear-gradient(0deg,#071015fa,#0c1b1eb0 60%,#06101835);display:flex;align-items:center;justify-content:center;text-align:center;pointer-events:auto}.purify-ready-inner{width:65%;animation:arrive 1.3s both}.purify-ready-symbol{font-size:2.8em;color:#d6bd8a;line-height:1.5}.purify-ready h2{font-size:2.8em;margin:.4em 0 .5em}.purify-ready .quote{font-family:"Batang",serif;font-size:1.3em;line-height:1.9;color:#cdd2c3;margin:1.1em 0 1.6em}.purify-ready .sacrifice{font-size:.85em;color:#a7b8b1;margin-top:1.3em}.ending-shade{position:absolute;inset:0;background:linear-gradient(90deg,#0d1a1cdd,#1222219c 34%,transparent 68%),linear-gradient(0deg,#101a1dcc,transparent 45%)}.ending-content{position:absolute;left:8%;top:19%;width:39%;animation:arrive 2s both}.ending-content h2{font-size:3.4em;line-height:1.5;margin:.3em 0 .6em;letter-spacing:-.04em}.ending-content p{color:#d4d8c7;line-height:2;font-family:"Batang",serif;font-size:1.13em}.ending-content .quiet-button{margin-top:2em}.end-label{position:absolute;bottom:6%;left:8%;color:#c3cbb8;font-size:.8em;letter-spacing:.15em}.danger-title{color:#bd9a8d}.pause-list{display:flex;flex-direction:column;align-items:center;gap:.7em}.portrait-rotate{display:none}#touch-controls{position:absolute;inset:0;pointer-events:none;display:none;z-index:9}.touch-group{position:absolute;bottom:3%;display:flex;gap:9px;align-items:center}.touch-left{left:3%}.touch-right{right:3%}.touch-button{pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;min-width:46px;height:46px;padding:0 12px;border:1px solid #d4c19888;border-radius:50%;color:#eee1c9;background:#0d1d20c9;font-size:14px}.touch-button.down{background:#8b7655aa}.touch-button.primary{width:58px;height:58px;border-color:#d1b684}.touch-button small{font-size:11px;display:block}.touch-interact{position:absolute;bottom:22%;left:calc(50% - 36px);display:none;width:72px;border-radius:6px}.loading-label{position:absolute;bottom:16%;left:8%;color:#cab887;font-size:.85em}.settings-back{margin-top:1em}.pause-hint{font-size:.8em;color:#a6b0a5}@keyframes arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes banner{0%{opacity:0;transform:translateY(15px)}20%,65%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-6px)}}
@media(pointer:coarse){#touch-controls.active{display:block}.key-strip{display:none}.boss-hud{bottom:7%;width:30%;left:35%}.boss-name{font-size:.95em}.boss-status{font-size:.65em}.skill-hud{top:23%}.touch-interact.available{display:block}}
@media(max-width:900px){#interface{font-size:14px}.title-content{top:19%;left:7%;width:60%}.title-content h1{font-size:clamp(34px,7vw,62px)}.title-copy{font-size:.88em;margin-bottom:1.25em}.title-en{font-size:.65em;margin:1em 0 1.25em}.eyebrow{font-size:.65em;margin-bottom:1em}.gold-button{min-width:13em;padding:.75em 1em;font-size:.85em}.title-footer{font-size:.65em;bottom:3%}.title-secondary{margin-top:.5em}.topline{font-size:.65em}.knight-motto{font-size:.9em;right:8%}.iconbtn{width:2.3em;height:2.3em}.tools{gap:.4em}.story-box{left:15%;right:15%;bottom:10%}.story-text{font-size:1.2em;min-height:3.8em;line-height:1.65;margin-bottom:1em}.story-box .speaker{margin-bottom:.6em}.story-step{margin-top:.8em}.chapter-intro h2{font-size:1.7em}.panel{padding:1.5em;max-height:93%;overflow:auto}.panel h2{font-size:1.7em}.panel p{font-size:.9em}.controls-grid{gap:.65em;margin:1em 0}.chapter-hud{font-size:1.05em}.hud-name{font-size:.8em}.relics{gap:.45em;font-size:.65em;margin-top:.7em}.skill-name{font-size:.72em}.skill-key{width:2em;height:2em}.skill-hud{gap:.5em}.toast{top:22%;left:29%;right:15%;font-size:.8em;padding:.5em}.purify-ready h2{font-size:2em}.purify-ready .quote{font-size:1em}.ending-content{top:16%;width:45%}.ending-content h2{font-size:2.4em}.ending-content p{font-size:.95em}.end-label{font-size:.65em}.key-strip{font-size:.65em;gap:1em}.battle-banner h2{font-size:2.1em}}
@media(max-width:600px) and (orientation:portrait){#game-shell{width:100vw;aspect-ratio:9/15;height:auto;max-height:100dvh}canvas{object-fit:contain;object-position:50% 30%}.title-content{top:26%;width:86%}.title-content h1{font-size:56px}.title-copy{font-size:1em}.title-en{font-size:.72em}.knight-motto{display:none}.title-footer{flex-direction:column;gap:1em;align-items:flex-start}.tools{top:4%}.title-content .gold-button{padding:1em 1.5em}.story-box{left:7%;right:7%;bottom:15%}.story-text{font-size:1.25em}.chapter-intro{top:14%}.player-hud{top:5%;width:43%}.chapter-hud{top:17%;left:25%;right:25%}.skill-hud{top:64%;left:5%}.boss-hud{bottom:28%;width:80%;left:10%}.touch-group{bottom:9%;gap:7px}.touch-left{left:4%}.touch-right{right:4%;max-width:60%;flex-wrap:wrap;justify-content:flex-end}.touch-button{height:46px;min-width:43px;padding:0 8px}.touch-button.primary{height:54px;width:54px}.touch-interact{bottom:21%}.toast{top:22%;left:5%;right:5%;font-size:.85em}.battle-banner{inset:34% 10% auto}.purify-ready-inner{width:86%}.purify-ready h2{font-size:2.2em}.purify-ready .quote{font-size:1.15em}.ending-content{left:8%;top:17%;width:85%}.ending-content h2{font-size:3em}.ending-content p{font-size:1.1em}.ending-shade{background:#0d1a1caa}.panel{width:91%;padding:1.6em}.panel h2{font-size:2em}.portrait-rotate{display:block;position:absolute;left:5%;bottom:3%;font-size:.78em;color:#bcbcac}.key-strip{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.title-content{top:20%}.title-copy{line-height:1.9}.recovery-hud{position:absolute;left:4.5%;bottom:12%;display:flex;align-items:center;gap:.65em;color:#d9caaa;font-size:.82em;text-shadow:0 2px 5px #000}.recovery-hud b{font-weight:400;letter-spacing:.16em;color:#e6be7d}.objective-hud{position:absolute;right:4.5%;top:15%;font-size:.79em;max-width:27%;line-height:1.8;text-align:right;color:#c4ccb9;text-shadow:0 2px 4px #000}.context-prompt{position:absolute;left:22%;right:22%;bottom:22%;text-align:center;font-size:.9em;line-height:1.7;color:#eee0be;opacity:0;transition:opacity .2s;pointer-events:none;text-shadow:0 2px 8px #000;padding:.55em 1em;background:linear-gradient(90deg,#09161a00,#09161ace 20%,#09161ace 80%,#09161a00)}.context-prompt.visible{opacity:1}.journey-hud{width:31%;left:34.5%}.journey-hud .boss-name{font-family:inherit;font-size:.75em;color:#babfad;letter-spacing:.16em}.journey-hud .boss-track{height:3px;border:0;background:#bcc6af23}.journey-hud .boss-fill{background:#b4bba5}.poise-track{height:3px;background:#eee2ac17;margin-top:5px}.poise-track>div{height:100%;width:0;background:#b9d2c0;transition:width .15s}.boss-hud{bottom:8.5%}.boss-status{font-size:.76em;line-height:1.65;min-height:1.5em}.key-strip{font-size:.75em;gap:1.2em}.skill-hud{top:21%}.wide-help{width:min(840px,86%);max-height:92%;overflow:auto;padding:2.2em}.wide-help .controls-grid{grid-template-columns:1fr 1fr 1fr;gap:.9em;margin:1.5em 0}.help-lessons{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1.4em;text-align:left;border-top:1px solid #bab69533;padding-top:.7em}.help-lessons p{font-size:.83em;line-height:1.9;margin:.3em 0}.help-lessons b{color:#daceb3;font-weight:500;line-height:2.4}.phase-banner{position:absolute;left:16%;right:16%;top:35%;text-align:center;padding:1.5em;background:linear-gradient(90deg,#07131a00,#09191edb,#07131a00);animation:banner 2.1s both;pointer-events:none;z-index:14}.phase-banner small{letter-spacing:.2em;color:#d1b888}.phase-banner h2{font-size:2.5em;margin:.3em 0;color:#eadfc4}.purifying-caption{position:absolute;left:20%;right:20%;top:21%;text-align:center;animation:arrive .8s both}.purifying-caption h2{font-size:2.7em;margin:.4em 0}.purifying-progress{height:1px;background:#d3bd7833;width:30%;margin:1.5em auto}.purifying-progress i{display:block;height:100%;width:0;background:#dfc99c}.journal-panel{width:min(1000px,90%);max-height:90%;overflow:auto;padding:2.5em;background:linear-gradient(135deg,#1a2729fa,#101c22fc);border:1px solid #b9a17466;box-shadow:0 20px 100px #0008}.journal-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #b6b49830;padding-bottom:1.5em}.journal-heading .eyebrow{margin:0 0 .6em}.journal-heading h2{font-size:2.2em;margin:0}.journal-body{display:grid;grid-template-columns:42% 58%;padding-top:1.6em}.memory-list{display:flex;flex-direction:column;gap:.45em;padding-right:1.5em;border-right:1px solid #a8b8aa22}.memory-item{width:100%;display:flex;align-items:center;gap:1em;padding:1em;text-align:left;border:1px solid transparent;background:none;color:#c9cfbe;font-size:.9em;line-height:1.7}.memory-item.selected{border-color:#c8b18577;background:#c8b1850d;color:#eee0c2}.memory-item:disabled{opacity:.4;cursor:default}.memory-item small{display:block;font-size:.82em;color:#96a89f}.memory-item>span{color:#cbb780}.memory-detail{padding:1.2em 0 1em 2.5em}.memory-detail h3{font-family:"Batang",serif;font-size:1.8em;font-weight:400;line-height:1.5;margin:.6em 0 1.5em}.memory-detail>p:not(.eyebrow){font-family:"Batang",serif;font-size:1.15em;line-height:2.3;color:#dce1cf;word-break:keep-all}.journal-relics{display:flex;flex-direction:column;gap:.8em;margin-top:2.5em;padding-top:1.5em;border-top:1px solid #bab28b22;color:#91a99d;font-size:.8em}.journey-results{display:flex;gap:1.5em;margin-top:1.8em;font-size:.78em;color:#b9c8b4}.journey-results b{font-weight:500;display:block;color:#e6dbb8;margin-top:.4em}.ending-content .quiet-button{margin-top:1em}.touch-right{max-width:45%;flex-wrap:wrap;justify-content:flex-end}.touch-button{background:#0c1a20db}.touch-interact{bottom:25%}
@media(max-width:900px){.wide-help .controls-grid{grid-template-columns:1fr 1fr;gap:.6em}.help-lessons{gap:.8em}.help-lessons p{font-size:.8em}.wide-help{padding:1.5em}.objective-hud{font-size:.67em;top:16%;max-width:29%}.recovery-hud{font-size:.72em;bottom:14%}.context-prompt{font-size:.8em;left:17%;right:17%;bottom:22%}.key-strip{font-size:.64em;gap:.8em}.journal-panel{padding:1.5em}.memory-detail{padding:0 0 0 1.5em}.memory-detail h3{font-size:1.5em;margin:.5em 0 1em}.memory-detail>p:not(.eyebrow){font-size:1em;line-height:2}.memory-item{padding:.7em;font-size:.8em}.journal-relics{margin-top:1.5em}.phase-banner h2{font-size:1.8em}.purifying-caption h2{font-size:2em}}
@media(pointer:coarse){.recovery-hud{bottom:26%}.context-prompt{bottom:31%;left:18%;right:18%}.boss-hud{bottom:8%;width:30%;left:35%}.objective-hud{display:none}.touch-right{bottom:3%;gap:6px;max-width:43%}.touch-button{font-size:12px;min-width:44px;height:44px}.touch-button.primary{height:50px;width:50px}.touch-interact{bottom:24%}}
@media(max-width:600px) and (orientation:portrait){.title-content{top:24%}.wide-help .controls-grid{grid-template-columns:1fr 1fr}.help-lessons{display:block}.help-lessons p{margin:.6em 0}.journal-panel{width:94%;padding:1.2em}.journal-body{grid-template-columns:1fr}.memory-list{display:grid;grid-template-columns:1fr 1fr;padding:0;border:0}.memory-detail{padding:1.3em 0 0}.memory-detail h3{margin:.2em 0 .5em}.journal-relics{display:none}.journal-heading h2{font-size:1.8em}.recovery-hud{bottom:29%;left:5%}.context-prompt{bottom:38%;left:3%;right:3%;font-size:.82em}.skill-hud{top:57%}.boss-hud{bottom:23%;width:84%;left:8%}.touch-right{bottom:7%;max-width:59%}.touch-left{bottom:8%}.touch-interact{bottom:18%}.purifying-caption{top:21%;left:5%;right:5%}.purifying-caption h2{font-size:2em}.phase-banner{top:31%;left:5%;right:5%}.journey-results{font-size:.75em}}
.ultimate-hud{--ultimate-color:#8edfff;position:absolute;top:24%;right:4.5%;width:23%;max-width:310px;display:block;text-align:left;padding:1em 1.1em;background:linear-gradient(125deg,#08131eed,#102631dc);border:1px solid #82bed255;color:#e9f6fa;box-shadow:0 5px 22px #0005;cursor:pointer;pointer-events:auto}.ultimate-header{display:flex;justify-content:space-between;align-items:center;gap:.6em;color:var(--ultimate-color);font-size:.7em;letter-spacing:.06em}.ultimate-header kbd{font-size:1em;white-space:nowrap;border-color:#a6d2de55;background:#93dcff0b}.ultimate-hud strong{display:block;font-family:"Batang",serif;font-size:1.35em;font-weight:400;margin:.7em 0 .6em;letter-spacing:.08em}.ultimate-track{display:block;height:4px;background:#bad3df20;overflow:hidden}.ultimate-track i{display:block;height:100%;width:0;background:var(--ultimate-color);box-shadow:0 0 12px var(--ultimate-color);transition:width .15s}.ultimate-hud small{display:block;font-size:.66em;color:#a7bfc7;line-height:1.65;margin-top:.65em}.ultimate-hud:disabled{cursor:default}.ultimate-hud.ready{border-color:var(--ultimate-color);box-shadow:0 0 25px #8edfff20,inset 0 0 24px #8edfff0c;animation:ultimate-breathe 2.4s ease-in-out infinite}.ultimate-hud.ready strong{color:#fff5d6}.ultimate-hud.spent{opacity:.45;border-color:#88998b44;animation:none}.ultimate-touch{border-color:#93dcea99!important;color:#d4f7ff!important}.ultimate-touch.ready{box-shadow:0 0 17px #b4eaff55;background:#173c4b!important}.ultimate-touch:disabled{opacity:.45}.ultimate-hud:focus-visible{outline:2px solid #e6fcff;outline-offset:4px}@keyframes ultimate-breathe{50%{box-shadow:0 0 35px #8edfff40,inset 0 0 24px #8edfff18}}
@media(max-width:900px){.ultimate-hud{top:25%;padding:.7em .8em;width:25%;right:4%;font-size:12px}.ultimate-hud strong{font-size:1.15em;margin:.5em 0}.ultimate-hud small{font-size:.75em}.ultimate-header{font-size:.8em}.ultimate-header kbd{font-size:.85em}.ultimate-hud.ready{animation:none}}
@media(pointer:coarse){.ultimate-hud{top:23%;right:4%;width:25%;padding:.65em}.ultimate-hud small{display:none}.ultimate-hud strong{font-size:1.1em}.ultimate-header kbd{display:none}.ultimate-header{font-size:.8em}.touch-right{max-width:44%}.ultimate-touch{min-width:60px}}
@media(max-width:600px) and (orientation:portrait){.ultimate-hud{top:56%;right:5%;width:43%;padding:.65em .8em}.ultimate-hud strong{font-size:1.2em}.ultimate-hud small{display:none}.touch-right{max-width:60%}.ultimate-hud .ultimate-header kbd{display:none}}
@media(prefers-reduced-motion:reduce){.ultimate-hud.ready{animation:none}}
.memory-notice{position:absolute;top:32%;left:4.5%;width:28%;max-width:390px;padding:1.05em 1.2em;background:linear-gradient(110deg,#0b2029ed,#102832d9);border-left:2px solid #b2dcd4;box-shadow:0 12px 30px #0003;pointer-events:none;animation:arrive .5s both}.memory-notice small{color:#b5ded5;font-size:.72em;letter-spacing:.13em}.memory-notice h3{font-family:"Batang",serif;font-size:1.2em;font-weight:400;margin:.5em 0 .7em;color:#f0e8d3}.memory-notice p{font-size:.8em;line-height:1.85;color:#c7dbd6;margin:0 0 .8em;word-break:keep-all}.memory-notice>span{color:#91b0ac;font-size:.72em}.memory-notice:before{content:'';position:absolute;top:0;left:0;width:45%;height:1px;background:linear-gradient(90deg,#b2dcd4,transparent)}
@media(max-width:900px){.memory-notice{top:34%;width:30%;padding:.7em .9em}.memory-notice p{display:none}.memory-notice h3{font-size:1.05em;margin:.4em 0}.memory-notice small,.memory-notice>span{font-size:.72em}}
@media(max-width:600px) and (orientation:portrait){.memory-notice{top:22%;left:5%;width:70%;max-width:none}.memory-notice small{font-size:12px}.memory-notice h3{display:inline-block;margin:.1em .8em .1em 0}.memory-notice>span{font-size:12px}}

/* Equipment stays below the player meters; expanded information lives in a scrollable panel. */
.gear-hud{position:absolute;top:28%;left:4.5%;width:22%;max-width:310px;padding:10px;background:#0a141be8;border:1px solid #7d92a642;color:#d8dedf;text-align:left;pointer-events:auto}.gear-hud-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-bottom:8px}.gear-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.gear-mini{display:grid;justify-items:center;gap:4px;color:var(--rarity);font-size:13px}.gear-picture{display:block;object-fit:cover;aspect-ratio:1;border:1px solid var(--rarity,#677078);border-radius:3px}.gear-mini img{width:100%;height:auto;max-width:48px}.gear-open{font-size:14px}.gear-notice{position:absolute;left:4.5%;top:47%;width:29%;max-width:400px;display:flex;align-items:center;gap:12px;padding:12px 14px;border-left:3px solid var(--rarity);background:linear-gradient(110deg,#0d1824f5,#10202ee8);box-shadow:0 8px 25px #0005;pointer-events:none;animation:arrive .25s both}.gear-notice img{width:58px;height:58px;flex:0 0 58px}.gear-notice small{font-size:12px;color:var(--rarity)}.gear-notice strong{display:block;font-size:18px;margin:4px 0}.gear-notice p{margin:0 0 4px;font-size:14px;color:#d1dfe5;line-height:1.5}.gear-notice span{font-size:12px;color:#91a4b1}.gear-panel{width:min(1040px,92%);max-height:92%;overflow:auto;overscroll-behavior:contain;padding:28px;background:linear-gradient(130deg,#152533fb,#0b141ffc);border:1px solid #8096ad70;box-shadow:0 25px 100px #000a;pointer-events:auto}.gear-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.gear-heading h2{font-size:28px;margin:0}.gear-heading .eyebrow{margin:0 0 8px;font-size:12px;letter-spacing:.2em}.gear-rule{font-size:15px;line-height:1.7;color:#a9bccb;margin:16px 0 20px}.equipped-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.equipped-card{display:flex;gap:14px;align-items:center;padding:14px;background:#07111ba6;border:1px solid var(--rarity);border-left-width:3px}.equipped-card img{width:64px;height:64px;flex:0 0 64px}.equipped-card small{font-size:13px;color:var(--rarity)}.equipped-card h3{font-size:18px;margin:5px 0}.equipped-card p{font-size:14px;line-height:1.5;margin:0;color:#b7cbd6}.gear-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0;padding:15px 0;border-block:1px solid #7b95a42d;font-size:14px;color:#a9bbca}.gear-totals b{display:block;font-size:20px;color:#ead6aa;margin-top:7px}.collection-title{font-size:18px;margin:22px 0 14px}.gear-collection{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.collection-item{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:10px 5px;border:1px solid #75869c38;background:#09121bc7}.collection-item img{width:64px;height:64px}.collection-item span{font-size:14px;line-height:1.4}.collection-item small{font-size:12px;color:#8da4b5}.collection-item.undiscovered img{filter:grayscale(1) brightness(.22)}.collection-item.undiscovered span{color:#79909d}.collection-item.equipped{border-color:#d4b574;background:#9a78431c}.collection-item.equipped small{color:#e0c58e}.memory-notice{top:47%;left:auto;right:4.5%;width:28%}.gear-hud:focus-visible{outline:2px solid #dbeaff;outline-offset:3px}
@media(max-width:900px){.gear-hud{top:31%;width:24%;padding:8px}.gear-mini img{max-width:36px}.gear-mini{font-size:12px}.gear-slots{gap:5px}.gear-hud-label{margin-bottom:5px}.gear-notice{top:53%;width:33%;padding:8px;gap:8px}.gear-notice img{width:40px;height:40px;flex-basis:40px}.gear-notice strong{font-size:15px}.gear-notice p{font-size:13px}.gear-notice span{display:none}.gear-panel{padding:20px}.gear-collection{grid-template-columns:repeat(4,1fr)}.gear-heading h2{font-size:24px}.equipped-card{padding:10px;gap:10px}.equipped-card h3{font-size:16px}.equipped-card img{width:48px;height:48px;flex-basis:48px}}
@media(max-width:600px) and (orientation:portrait){.gear-hud{top:36%;left:5%;width:48%}.gear-mini img{max-width:36px}.gear-notice{top:48%;width:70%;max-width:none}.gear-notice small{font-size:12px}.gear-heading h2{font-size:21px}.equipped-grid{grid-template-columns:1fr}.gear-collection{grid-template-columns:repeat(3,1fr)}.gear-totals{grid-template-columns:1fr 1fr}.gear-panel{max-height:94%;padding:16px}.memory-notice{display:none}.gear-open{font-size:12px}}

.ultimate-active .gear-hud,.ultimate-active .gear-notice,.ultimate-active .skill-hud{visibility:hidden;pointer-events:none}

.gear-fitting{display:grid;grid-template-columns:230px 1fr;gap:22px;align-items:center}.gear-avatar{margin:0;text-align:center;background:radial-gradient(ellipse at 50% 65%,#8397aa24,transparent 68%)}.gear-avatar img{display:block;width:100%;height:270px;object-fit:contain}.gear-avatar figcaption{font-size:14px;color:#cab895;margin-bottom:10px}.gear-fitting .equipped-grid{grid-template-columns:1fr 1fr}.gear-fitting .equipped-card{padding:10px;gap:10px}.gear-fitting .equipped-card img{width:48px;height:48px;flex-basis:48px}@media(max-width:900px){.gear-fitting{grid-template-columns:160px 1fr;gap:12px}.gear-fitting .equipped-grid{grid-template-columns:1fr}.gear-avatar img{height:245px}}@media(max-width:600px){.gear-fitting{grid-template-columns:1fr}.gear-avatar img{height:200px}.gear-fitting .equipped-grid{grid-template-columns:1fr 1fr}.gear-fitting .equipped-card{display:block}.gear-fitting .equipped-card h3{font-size:14px}}

.gear-lookbook{border-block:1px solid #8096ad45;padding:14px 0}.gear-lookbook summary{cursor:pointer;font-size:16px;color:#ead6aa}.gear-lookbook p{font-size:14px;line-height:1.6;color:#a9bccb}.lookbook-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.lookbook-grid figure{margin:0;background:radial-gradient(ellipse at 50% 65%,#657c8c30,#07101980 70%);border:1px solid #8096ad35;text-align:center}.lookbook-grid img{display:block;width:100%;height:230px;object-fit:contain}.lookbook-grid figcaption{font-size:14px;color:#d6c9b7;padding:0 6px 12px}@media(max-width:600px){.lookbook-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lookbook-grid img{height:180px}}

.gear-mini{position:relative}.enhance-badge{position:absolute;right:0;top:0;padding:1px 4px;color:#ffe8ad;background:#271912f2;border:1px solid #ca995b;font-size:13px;line-height:1.25;text-shadow:0 1px #000}.heavy-lookbook{grid-template-columns:repeat(2,minmax(0,1fr))}.heavy-lookbook img{height:260px}

.title-content h1.ashbound-title{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(32px,5.3vw,94px);letter-spacing:.045em;line-height:1.15;color:#f0ddc2;text-shadow:0 3px 30px #b53b2026;margin:0 0 .52em}.recovery-hud span{white-space:nowrap}

/* Sunlit, storybook fantasy presentation. */
body{background:#163b42;color:#f8f5e8}#game-shell{background:#315966}
.shade{background:linear-gradient(180deg,#12332c70 0%,transparent 38%,transparent 62%,#13352ec9 100%)}
.topline{top:3%;left:3%;color:#ffedc2;font-size:.65em;font-weight:800;letter-spacing:.19em;text-shadow:0 2px 4px #123628}
.title-content{left:24%;right:24%;top:6.5%;bottom:12%;width:auto;text-align:center;animation:arrive .55s both}
.title-content .eyebrow{color:#fff1b5;font-size:.83em;font-weight:800;letter-spacing:.22em;margin:0 0 .5em;text-shadow:0 2px 6px #173521}
.title-content h1.ashbound-title{font-family:Georgia,serif;font-size:clamp(42px,6.8vw,104px);line-height:1.05;letter-spacing:.055em;color:#ffedbd;-webkit-text-stroke:1px #7d502c;text-shadow:0 4px #704323,0 7px 0 #e0aa4a,0 12px 24px #123822cc;margin:0}
.title-copy{font-size:.95em;line-height:1.8;color:#fffef3;font-weight:600;text-shadow:0 2px 6px #143c2b,0 1px 15px #17321b;margin:1.5em 0 0}
.title-content>.gold-button{position:absolute;left:50%;bottom:1%;transform:translateX(-50%);width:270px;justify-content:center;font-size:1.13em;min-height:58px}
.gold-button{background:linear-gradient(#ffe79e,#edbc55);color:#3b391d;border:2px solid #fff4bd;border-radius:14px;box-shadow:0 5px 0 #846020,0 9px 20px #15342966;font-weight:800;letter-spacing:.02em;transition:filter .15s,box-shadow .15s}
.gold-button:hover{background:linear-gradient(#fff4bf,#f4d175);color:#26351e;box-shadow:0 4px 0 #846020,0 10px 25px #20352488;filter:brightness(1.04)}
.gold-button .diamond{margin-left:.8em}.quiet-button{font-weight:600;color:#e4f5ee}.quiet-button:hover{color:#fff5bf}
.title-secondary{position:absolute;left:50%;bottom:-10%;transform:translateX(-50%);display:flex;justify-content:center;gap:24px;white-space:nowrap;font-size:.87em;text-shadow:0 2px 5px #0e2517}
.title-footer{bottom:3%;color:#edf1d8;font-size:.7em;letter-spacing:.02em;text-shadow:0 2px 4px #123822}.knight-motto{display:none}
.iconbtn{background:#163d51da;border:1px solid #badde269;border-radius:11px;color:#f5e9c9;box-shadow:0 3px 9px #18342444}.iconbtn:hover{background:#2f6073}
.panel,.gear-panel,.journal-panel{border:2px solid #a8d4ce85;border-radius:22px;background:linear-gradient(135deg,#204859fa,#142d40fc);box-shadow:0 20px 80px #071e3066}
.panel h2,.gear-heading h2,.journal-heading h2{font-family:system-ui,sans-serif;font-weight:800;letter-spacing:-.04em;color:#fff0c1}.eyebrow{color:#aee1d6}.control-cell kbd,kbd{border-radius:6px;background:#163449;color:#fff0ba;border-color:#a6d0d754}
.player-hud{top:4%;left:8.5%;width:21%;padding:12px 14px 10px;background:#173b50e8;border:1px solid #c2e5db80;border-radius:0 16px 16px 0;box-shadow:0 5px 18px #15333144}
.hero-portrait{position:absolute;width:85px;height:85px;object-fit:contain;left:-72px;top:-3px;padding:4px;background:radial-gradient(circle,#abcfd7,#2e687b);border:3px solid #f5d893;border-radius:50%;box-shadow:0 4px 0 #536850;z-index:1}
.hud-name{font-size:.84em;color:#fff1cc;font-weight:750}.hp-track{height:11px;border-radius:8px;background:#102b3d;overflow:hidden;border:1px solid #081d32}.hp-fill{background:linear-gradient(#fbac77,#e15d57);box-shadow:inset 0 1px #ffe5b0}.stamina-track{height:6px;margin-top:6px;border-radius:5px;background:#102b3d;overflow:hidden}.stamina-fill{background:linear-gradient(90deg,#4ed3bb,#b0e89b)}
.relics{font-size:.6em;margin-top:7px;justify-content:space-between}.relic-dot{color:#a2c5c5}.relic-dot.current{color:#ffe195}
.chapter-hud{top:4%;left:35%;right:31%;color:#fffde6;font-family:system-ui,sans-serif;font-size:1.1em;font-weight:800;letter-spacing:-.02em;text-shadow:0 2px 7px #16443c,0 1px 3px #173627}.chapter-hud small{color:#ffe5a0;font-size:.65em;letter-spacing:.15em}
.skill-hud{top:19%;left:3.5%;font-size:.8em;padding:7px 10px;border-radius:10px;background:#173b50df;box-shadow:0 3px 10px #17372e33}.skill-name small{color:#c2dce1}.skill-key{border-radius:7px;border-color:#9acfd5}
.ultimate-hud{top:19%;right:3%;width:20%;padding:.8em 1em;border:1px solid #a7dce195;border-radius:14px;background:linear-gradient(130deg,#23566ce8,#153b55e8);box-shadow:0 4px 18px #15342955}.ultimate-hud strong{font-family:system-ui,sans-serif;font-weight:800;font-size:1.08em;letter-spacing:-.02em;margin:.45em 0}.ultimate-hud small{color:#d4e5e0;font-size:.64em}.ultimate-header{font-size:.67em}.ultimate-hud.ready{border-color:#ffe8a4}
.gear-hud{top:29%;left:3.5%;width:19%;max-width:260px;background:#173b50dd;border:1px solid #a2d2d56e;border-radius:13px;padding:9px}.gear-hud-label{font-size:12px;color:#eff1d6}.gear-mini{font-size:10px}.gear-mini img{max-width:40px;border-radius:7px}.gear-slots{gap:6px}.gear-hud-label kbd{font-size:10px}.gear-picture{border-radius:8px;background:#234b61}
.objective-hud{top:16.3%;left:35%;max-width:38%;font-size:.68em;color:#effce8;text-shadow:0 2px 4px #0b2f20}.recovery-hud{left:3.5%;bottom:10.5%;padding:7px 11px;background:#143b50df;border-radius:10px;font-size:.76em;color:#f6efd4}.recovery-hud b{color:#ffb69c}
.boss-hud{bottom:8%;padding:8px 14px;border-radius:13px;background:#153b50e3;border:1px solid #bcddd35e}.boss-name{font-family:system-ui,sans-serif;font-weight:800;color:#ffefc1}.boss-status{color:#cbe3df}.journey-hud{width:34%;left:34%;bottom:8%;font-size:.82em}.boss-track{border-radius:4px;overflow:hidden;background:#0e2838}.boss-fill{background:linear-gradient(90deg,#ffbc74,#e77565)}
.key-strip{bottom:2%;font-size:.7em;color:#eff3df;gap:1.05em;text-shadow:0 2px 3px #143a35;background:#123440c9;border-radius:9px;padding:7px 10px;left:12%;right:12%;flex-wrap:wrap}.key-strip kbd{font-size:.95em}
.gear-notice,.memory-notice{border-radius:12px;background:linear-gradient(110deg,#204d63f5,#17364fe8)}.context-prompt{background:#214e61ed;border:1px solid #b8dcd1;color:#fff2c3;border-radius:12px;font-weight:700}.toast{background:#234e64ef;border-radius:12px;color:#fff4d4}.battle-banner{color:#fff4d5;text-shadow:0 3px 8px #16423b}.battle-banner h2{font-family:system-ui,sans-serif;font-weight:800}.dialogue-shade{background:linear-gradient(90deg,#123c5188,#123c5100)}.story-box{background:#173c50eb;border:1px solid #b8d9ce88;border-radius:18px;padding:2em}.story-text{font-family:system-ui,sans-serif;color:#fff6e0}.chapter-intro h2{font-family:system-ui,sans-serif;font-weight:800;color:#fff6ce;text-shadow:0 2px 8px #143627}.speaker{color:#b2e7d8}
.touch-button{border-radius:13px;background:#17475ddf;border-color:#c8e7dc80}.touch-button.down{background:#557d7d}.touch-button.primary{background:#ce9249e8}
@media(max-width:900px){.hero-portrait{width:65px;height:65px;left:-56px;top:-2px}.player-hud{left:10%;padding:7px 10px;width:21%}.hud-name{font-size:.72em}.title-content h1.ashbound-title{font-size:clamp(42px,7vw,85px)}.title-copy{font-size:.8em}.title-content>.gold-button{min-height:46px;font-size:.9em;width:220px}.title-secondary{bottom:-13%;font-size:.75em}.topline{font-size:.5em}.ultimate-hud{font-size:11px;width:22%;padding:9px}.gear-hud{width:20%;font-size:11px}.gear-mini img{max-width:31px}.gear-hud-label{font-size:10px}.gear-mini{font-size:9px}.gear-hud-label kbd{font-size:9px}.gear-slots{gap:4px}.objective-hud{font-size:.6em}.chapter-hud{font-size:.9em}.key-strip{left:5%;right:5%;font-size:.6em;gap:.7em;padding:5px}.skill-hud{font-size:.67em}.relics{font-size:.52em}}
@media(max-width:600px) and (orientation:portrait){.title-content{left:5%;right:5%;top:14%;bottom:20%}.title-content h1.ashbound-title{font-size:12vw}.title-content>.gold-button{bottom:2%}.title-copy{margin-top:1.8em}.title-footer{font-size:.58em}.player-hud{left:20%;width:35%}.chapter-hud{top:18%;left:20%;right:20%}.hero-portrait{width:56px;height:56px;left:-52px}.gear-hud{top:31%;width:36%}.ultimate-hud{top:31%;width:36%}.skill-hud{top:25%;left:4%}.objective-hud,.key-strip{display:none}.recovery-hud{bottom:29%}.boss-hud{bottom:23%;width:82%;left:9%}.title-secondary{white-space:normal;width:100%}.topline{font-size:.5em}}
.shield-hud{display:flex;align-items:center;gap:8px;margin-top:9px;height:36px;color:#eef7ff;transition:filter .1s}.shield-hud img{width:28px;height:34px;object-fit:contain}.shield-hud span{display:flex;flex-direction:column;gap:2px;min-width:90px}.shield-hud b{font-size:13px}.shield-hud small{font-size:10px;color:#c3d8e8}.shield-pips{display:grid;grid-template-columns:repeat(5,9px);gap:4px}.shield-pips i{height:8px;border:1px solid #8fabc65e;background:#183247}.shield-pips i.filled{background:#7ad1ff;border-color:#e5f4ff;box-shadow:0 0 5px #77b9e055}.shield-hud.broken{opacity:.65}.shield-hud.broken b{color:#f4aa89}.shield-hud.blocking{filter:brightness(1.65)}.cinema-bars{position:absolute;inset:0;pointer-events:none;border-top:65px solid #081222;border-bottom:110px solid #081222;box-sizing:border-box}.cinema-tools{position:absolute;top:14px;right:24px;display:flex;gap:16px;align-items:center}.cinema-tools .quiet-button{font-size:13px}.rescue-caption{position:absolute;bottom:25px;left:5%;right:5%;text-align:center;color:#ffefd4}.rescue-caption small{letter-spacing:4px;color:#b5dafa;font-size:11px}.rescue-caption p{font-size:clamp(13px,1.5vw,21px);margin:12px 0 0;line-height:1.5}.player-hud .relics{margin-top:8px}@media(max-width:850px){.shield-hud{gap:5px;margin-top:4px;height:27px}.shield-hud img{width:20px;height:26px}.shield-hud b{font-size:10px}.shield-hud small{font-size:8px}.shield-hud span{min-width:73px}.shield-pips{grid-template-columns:repeat(5,6px);gap:2px}.shield-pips i{height:5px}.cinema-bars{border-top-width:40px;border-bottom-width:77px}.cinema-tools{top:5px;right:12px}.rescue-caption{bottom:15px}.rescue-caption small{font-size:8px}.rescue-caption p{margin-top:7px}}
/* Village edition: warm paper panels, clear hierarchy, room to see the action. */
:root{--paper:#fff4d9;--ink:#284d55;--teal:#28736f;--gold:#f7c761}
button:focus-visible{outline:3px solid #fff4b0;outline-offset:4px}.iconbtn{background:var(--paper);border:2px solid #fffdf0;color:var(--ink);box-shadow:0 4px 0 #31594e99}.iconbtn:hover{background:#fffce9}.shop-tool{padding:9px 14px;border:2px solid #fff4cb;border-radius:13px;background:#f5c75f;color:#3d4930;font-weight:800;box-shadow:0 3px 0 #927c42;cursor:pointer}.tools{gap:9px}.panel,.gear-panel,.journal-panel,.shop-panel{background:linear-gradient(145deg,#fff9e9,#f6e7c6);border:3px solid #fffcee;border-radius:24px;box-shadow:0 10px 0 #42726899,0 20px 70px #102d4166;color:var(--ink)}
.panel h2,.gear-heading h2,.journal-heading h2,.panel h3,.gear-panel h3{color:#245853}.panel p,.gear-rule,.gear-totals,.memory-detail p,.control-cell,.help-note,.equipped-card p,.equipped-card small,.gear-lookbook p,.gear-avatar figcaption{color:#456363}.panel .eyebrow,.gear-panel .eyebrow,.journal-panel .eyebrow{color:#578c7c}.panel .quiet-button,.gear-panel .quiet-button,.journal-panel .quiet-button,.shop-panel .quiet-button{color:#286b68;font-weight:800}.panel .quiet-button:hover,.shop-panel .quiet-button:hover{color:#b0702f}.difficulty button{border-color:#729c90;color:#2f6863;background:#e5edde}.difficulty button.selected{background:#307b72;color:#fff7dc}
.player-hud{top:3.7%;left:8%;width:23%;padding:10px 13px 9px;background:var(--paper);border:3px solid #fffceb;border-radius:14px;box-shadow:0 5px 0 #37695c99}.hud-name{color:#315952;font-weight:850}.hero-portrait{background:radial-gradient(circle,#d7f2e0,#66aab1);border-color:#fff2ba}.player-hud .relics{display:none}.hp-track{height:12px;border-color:#506453}.hp-fill{background:linear-gradient(#ffa68a,#ed6465)}.stamina-track{height:7px;background:#aac7b8}.stamina-fill{background:linear-gradient(#6bcaa4,#45a982)}.shield-hud{color:#345953;height:31px;margin-top:7px}.shield-hud small{color:#698378}.shield-pips i{border-radius:3px;border-color:#9bbfb5;background:#ccd7c1}.shield-pips i.filled{background:#77bada;border-color:#43829b}.shield-hud.broken b{color:#a55b45}
.chapter-hud{top:4%;left:36%;right:31%;padding:7px 10px;border-radius:15px;background:#fdf5dfeb;color:#315c55;text-shadow:none;box-shadow:0 3px 0 #40655677;font-size:1.06em}.chapter-hud small{color:#769888;letter-spacing:.1em}.objective-hud{top:15.5%;left:35%;max-width:36%;text-align:center;font-weight:700;font-size:.7em;color:#fffbde}.skill-hud{top:auto;bottom:14%;background:#fff1d9;color:#375e55;border:2px solid #fff9e8;border-radius:14px}.skill-name small{color:#6d8a7c}.recovery-hud{bottom:7.2%;background:#fff1d9;color:#375e55;border:2px solid #fff9e8}.recovery-hud b{color:#e17c56}.ultimate-hud{top:auto;bottom:7.2%;width:21%;background:linear-gradient(140deg,#347c76,#215f67);border:3px solid #e8d799;box-shadow:0 5px 0 #315b54}.ultimate-hud.ready{border-color:#fff0af}.gear-hud{left:auto;right:3%;top:17%;width:19%;padding:7px;background:#ffefd9ed;border:2px solid #fff7e2;box-shadow:0 3px 0 #345d5477}.gear-hud-label,.gear-mini{color:#3a665d}.gear-mini img{max-width:35px}.gear-slots{gap:6px}.gear-picture{background:#e0e7d8}.boss-hud{background:#fff1dbeF;border:2px solid #fff9ed;box-shadow:0 4px 0 #36625199;color:#426755}.boss-name{color:#31564c}.boss-status{color:#638273}.boss-track{background:#c8d7c3}.key-strip{left:24%;right:25%;bottom:1.4%;gap:.8em;justify-content:center;font-size:.61em;background:#2d6556d9;border:1px solid #afceb586}.key-strip kbd{background:#fff3d7;border:0;color:#456150}.context-prompt{border:2px solid #fff2c3;background:#347b69;color:#fff9e0}.story-box{background:#fff1dcf5;border:3px solid #fffaf0;box-shadow:0 7px 0 #38675499}.speaker{color:#419580}.story-text{color:#345e58}.story-step{color:#6a9c87}.rescue-caption p{font-weight:650}.cinema-bars{border-color:#183d42}.cinema-tools .quiet-button{color:#fff0c9}.rescue-caption small{color:#dfc584}.gear-notice,.memory-notice{background:#fff0ddec;color:#355f56;border:2px solid #fff9eb}.memory-notice p,.memory-notice h3,.gear-notice strong,.gear-notice p{color:#3d6255}.collection-item,.equipped-card{background:#ffffff60;border-color:#b9c8ab}.collection-item span{color:#34564c}.collection-item small{color:#678679}.memory-item{color:#3c7065}.memory-item.selected{background:#dbe8d1}.memory-item small,.journal-relics{color:#7d927c}.gear-totals{border-color:#b1c8b0}
.village-welcome{position:absolute;top:7%;left:6%;max-width:510px;padding:24px 28px;background:#fff4ddeF;border:3px solid #fffdee;border-radius:23px;box-shadow:0 6px 0 #42706588;color:#396355}.village-welcome h2{font:850 clamp(18px,2vw,29px) system-ui;margin:10px 0 14px}.village-welcome p{line-height:1.7}.village-welcome .eyebrow{color:#79997e;font-size:10px;letter-spacing:2px}.coin-chip{display:inline-block;padding:9px 15px;border-radius:22px;background:#ffe2a0;color:#7d622b;font-weight:850;border:2px solid #fff2c9}.village-actions{position:absolute;left:6%;bottom:7%;display:flex;align-items:flex-start;flex-direction:column;gap:16px}.village-actions .quiet-button{color:#fff4cc;text-shadow:0 2px 4px #224631}.village-actions small{font-size:11px;color:#fff4d0;text-shadow:0 1px 4px #163b31}.shop-panel{width:min(890px,91%);max-height:88%;overflow:auto;padding:25px 30px;box-sizing:border-box}.shop-panel header{display:flex;justify-content:space-between;align-items:center}.shop-panel h2{font:850 30px system-ui;margin:4px 0 12px;letter-spacing:-1px}.shop-panel .eyebrow{color:#80a18a;font-size:10px;letter-spacing:2px}.shop-greeting{display:flex;gap:22px;align-items:center;background:#e4edcf;border-radius:17px;padding:12px 24px;margin:10px 0 22px}.shop-greeting>img{width:68px;height:100px;object-fit:contain}.shop-greeting p{line-height:1.8;font-weight:600;flex:1}.shop-products{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.shop-products article{background:#fff9e9;border:2px solid #e0ddbb;border-radius:18px;text-align:center;padding:18px 13px}.shop-products article>img{width:79px;height:85px;object-fit:contain}.shop-products h3{font-size:18px;margin:8px 0}.shop-products p{font-size:13px;line-height:1.6;min-height:43px;color:#6a8475}.shop-products small{display:block;color:#649080;margin:10px}.shop-products .gold-button{width:100%;min-width:0;padding:11px 8px;font-size:14px;min-height:0}.shop-products .gold-button:disabled{filter:grayscale(.65);opacity:.5;cursor:default}.shop-feedback{font-size:13px;text-align:center;color:#628773;min-height:20px;margin:21px 0 0}
@media(max-width:900px){.player-hud{left:9%;padding:6px 8px;width:23%}.chapter-hud{font-size:.85em;left:36%;right:31%}.gear-hud{width:19%;top:17%}.gear-mini img{max-width:28px}.skill-hud{bottom:14%;padding:5px}.ultimate-hud{width:22%;bottom:7%}.shop-panel{padding:15px}.shop-greeting{padding:5px 14px;margin:4px 0 12px;font-size:11px}.shop-greeting>img{height:68px;width:48px}.shop-panel h2{font-size:23px}.shop-products article{padding:9px}.shop-products article>img{height:55px;width:55px}.shop-products h3{font-size:15px}.shop-products p{font-size:11px;min-height:35px}.shop-products .gold-button{font-size:12px;padding:9px 3px}.shop-products small{font-size:10px;margin:6px}.shop-feedback{font-size:11px;margin:14px 0 0}.village-welcome{padding:12px 18px;top:5%;left:4%;max-width:48%;font-size:11px}.village-actions{bottom:6%;gap:10px}.village-actions .gold-button{min-height:38px;font-size:12px}.village-actions small{font-size:9px}.shop-tool{padding:7px;font-size:10px}.shield-hud{height:27px}.key-strip{display:none}.tools{gap:6px}}
@media(max-width:600px) and (orientation:portrait){.shop-products{grid-template-columns:1fr}.shop-products article{display:grid;grid-template-columns:60px 1fr;gap:5px}.shop-products article>img{grid-row:1/4}.shop-products p{min-height:0;margin:0}.shop-products .gold-button{grid-column:2}.shop-greeting{gap:8px;flex-wrap:wrap}.player-hud{left:18%;width:35%}.chapter-hud{left:20%;right:20%;top:22%}.gear-hud{top:32%;width:35%}.ultimate-hud{bottom:31%;width:34%}.skill-hud{bottom:40%}.recovery-hud{bottom:31%}.village-welcome{top:14%;max-width:82%}.village-actions{bottom:25%}}
.wallet-count{position:absolute;right:13px;top:10px;font-size:11px!important;color:#a17c32}.hud-name{padding-right:48px}.shield-pips{margin-left:auto}.shop-tool:focus-visible{outline-color:#286b68}
.hud-name{padding-right:0;gap:10px;letter-spacing:0}.hud-name>span:first-child{flex:1}.wallet-count{position:static;font-size:11px!important;color:#a17c32;white-space:nowrap}.boss-name,.boss-status,.skill-name,.skill-name small{text-shadow:none}.gear-open{white-space:nowrap;font-size:12px;min-width:42px}.boss-track{height:7px}.boss-name{letter-spacing:0}
.homecoming-shade{background:linear-gradient(0deg,#12362c80,transparent 25%);pointer-events:none}
.title-content.homecoming-menu{top:52%;left:7%;right:auto;bottom:auto;width:41%;text-align:left;transform:none;animation:arrive .65s both}
.homecoming-menu .title-copy{position:static;margin:0 0 1.1em;color:#fff7dd;font-size:clamp(16px,1.45vw,24px);font-weight:800;text-shadow:0 2px 8px #173c2f;line-height:1.8;letter-spacing:0}
.homecoming-menu .title-copy span{font-size:.68em;font-weight:500;display:block}
.title-content.homecoming-menu>.gold-button{position:static;transform:none;width:260px;min-width:0;min-height:55px;margin:0}
.homecoming-menu .title-secondary{position:static;left:auto;bottom:auto;transform:none;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:12px 22px;white-space:normal;margin-top:12px;font-size:14px}
.homecoming-menu .quiet-button{color:#fff6d8;text-shadow:0 1px 5px #113b27}
.homecoming-loading-title{font:800 28px Georgia,serif;color:#ffe3a0}
@media(max-width:900px){.title-content.homecoming-menu{top:52%;left:7%;width:45%}.homecoming-menu .title-copy{font-size:16px;line-height:1.45;margin-bottom:12px}.homecoming-menu .title-copy span{font-size:13px}.title-content.homecoming-menu>.gold-button{width:220px;min-height:44px;font-size:14px}.homecoming-menu .title-secondary{font-size:13px;gap:4px 14px;margin-top:4px}}
@media(max-width:600px) and (orientation:portrait){.title-content.homecoming-menu{top:61%;left:8%;width:84%;text-align:center}.homecoming-menu .title-copy{font-size:18px}.homecoming-menu .title-copy span{font-size:14px}.homecoming-menu .title-secondary{justify-content:center}.homecoming-shade{background:linear-gradient(0deg,#153b2bed 30%,transparent 64%)}}
/* Illustrated, reusable UI skins. All labels remain real, selectable text. */
#interface .gold-button,#interface .quiet-button,#interface .difficulty button,.shop-tool{background-color:transparent;background-image:var(--art-secondary);background-size:100% 100%;background-repeat:no-repeat;border:0;box-shadow:none;border-radius:0;color:#fff3d2;padding:15px 25px;text-shadow:0 1px 3px #183635;min-height:47px}
#interface .gold-button,#interface .difficulty button.selected{background-image:var(--art-primary);color:#fffbe7;font-weight:800}
#interface button:hover{filter:brightness(1.12)}#interface button:disabled{filter:grayscale(.7);opacity:.5}
#interface .iconbtn,.touch-button{background-color:#153d3e;background-image:var(--art-round);background-size:100% 100%;border:0;box-shadow:none;color:#fff2c2}
.panel,.gear-panel,.journal-panel,.shop-panel,.village-welcome{border:30px solid transparent!important;border-image:var(--art-parchment) 52 fill /30px!important;background:#f8e6be!important;box-shadow:0 15px 50px #09272b66;border-radius:0!important;padding:16px!important;color:#3d5649}
.shop-panel{border-image-source:var(--art-shop)!important;border-image-slice:50 fill!important}
.player-hud,.chapter-hud,.skill-hud,.ultimate-hud,.recovery-hud,.gear-hud,.boss-hud{background-color:transparent!important;background-image:var(--art-hud)!important;background-size:100% 100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#fff4ce!important}
.player-hud{padding:17px 20px!important}.hud-name,.wallet-count,.skill-name,.skill-name small,.boss-name,.boss-status,.gear-hud-label,.ultimate-hud strong,.ultimate-hud small,.chapter-hud small,.recovery-hud{color:#fff3ce!important}
.chapter-hud{padding:16px 15px!important;font-family:system-ui,sans-serif}.gear-hud{padding:17px 13px!important;width:21%;right:3%}.gear-slots{gap:7px}.gear-mini img{width:45px;height:45px;max-width:45px;object-fit:contain}.gear-mini{background-image:var(--art-slot);background-size:100% 85%;background-repeat:no-repeat;padding:5px 3px 0}.gear-mini span{color:#ead9ae}
.gear-picture{width:80px;height:80px;object-fit:contain}.equipped-card>.gear-picture{width:80px;height:80px}.collection-item .gear-picture{width:70px;height:70px}.gear-notice .gear-picture{width:75px;height:75px}
.equipped-card,.collection-item,.shop-products article{border:12px solid transparent!important;border-image:var(--art-slot) 40 fill /12px!important;background-color:#fff4d0!important;box-shadow:none;border-radius:0!important}
.hp-track{height:17px!important;padding:5px 9px!important;background-image:var(--art-health);background-size:100% 100%;border:0!important;background-color:#143739}.stamina-track{margin-left:9px;margin-right:9px}.hp-fill{border-radius:4px;background:linear-gradient(90deg,#d54445,#f18761)!important}.boss-track{height:19px!important;padding:6px 10px!important;background-image:var(--art-boss);background-size:100% 100%;border:0!important}.boss-fill{background:#efab53!important}.boss-hud{padding:14px 22px!important}
.toast,.context-prompt,.gear-notice,.memory-notice,.story-box,.rescue-caption{border:18px solid transparent!important;border-image:var(--art-toast) 27 fill /18px!important;background:transparent!important;box-shadow:none!important;color:#fff5d6!important;border-radius:0!important}.story-text,.story-box .speaker,.story-step,.gear-notice p,.gear-notice strong,.memory-notice p,.memory-notice h3{color:#fff1d2!important}
.skill-key,.ultimate-key,.touch-button.primary{background-image:var(--art-slot);background-size:100% 100%;border:0!important}.skill-hud,.ultimate-hud,.recovery-hud{padding:15px 20px!important}.ultimate-hud{width:24%}.ultimate-hud.ready{filter:drop-shadow(0 0 8px #fbc96766)}.hero-portrait{background-image:var(--art-portrait);background-size:100% 100%;padding:6px;border:0!important}
.title-content.homecoming-menu{top:20%;left:6%;width:43%}.title-content.homecoming-menu .homecoming-title{position:static;font:900 clamp(26px,4.6vw,78px)/1.05 Georgia,serif!important;letter-spacing:-.04em;color:#ffe8a0;text-shadow:0 3px 0 #704c1e,0 7px 17px #001b1c;white-space:normal;margin:0 0 25px!important}.homecoming-title span{display:block}.homecoming-title small{display:block;font-size:.43em;letter-spacing:.24em;margin:14px 0 0;color:#fff4d1}.homecoming-menu .title-copy{font-size:clamp(14px,1.4vw,21px);line-height:1.75;margin:0 0 20px}.title-content.homecoming-menu>.gold-button{width:285px;min-height:64px}.homecoming-menu .title-secondary{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.homecoming-menu .quiet-button{font-size:13px;min-height:41px;padding:10px 26px}.title-footer{color:#d9e0c4;text-shadow:0 2px 4px #12312c}
.npc-shop-target{position:absolute;left:49.3%;top:64.4%;width:10%;height:19.3%;background:transparent;border:0;cursor:pointer;z-index:4;border-radius:30%}.npc-shop-target span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);white-space:nowrap;background-image:var(--art-toast);background-size:100% 100%;color:#fff5d4;padding:12px 19px;font-size:13px;pointer-events:none}.npc-shop-target:hover{background:#ffe39916;outline:1px solid #ffe1a083}.village-actions{z-index:5}
@media(max-width:900px){.title-content.homecoming-menu{top:13%;width:45%}.title-content.homecoming-menu .homecoming-title{margin-bottom:15px!important}.homecoming-title small{margin-top:8px}.homecoming-menu .title-copy{margin-bottom:10px;font-size:14px}.title-content.homecoming-menu>.gold-button{min-height:49px;width:240px}.homecoming-menu .quiet-button{min-height:34px;font-size:12px}.homecoming-menu .title-secondary{gap:0;margin-top:1px}.player-hud{padding:12px!important}.gear-hud{padding:12px!important}.gear-mini img{width:35px;height:35px;max-width:35px}.gear-slots{gap:1px}.skill-hud,.ultimate-hud,.recovery-hud{padding:10px 14px!important}.chapter-hud{padding:12px!important}.boss-hud{padding:10px 15px!important}.npc-shop-target span{font-size:11px;padding:9px 15px}}
@media(max-width:600px) and (orientation:portrait){.title-content.homecoming-menu{top:58%;left:8%;width:84%;text-align:center}.title-content.homecoming-menu .homecoming-title{font-size:30px!important;margin-bottom:12px!important}.homecoming-menu .title-copy{font-size:15px}.homecoming-menu .title-secondary{align-items:center}.gear-hud{width:38%}.npc-shop-target{top:37.1%;height:6.5%}.player-hud{padding:12px!important}.title-footer{font-size:9px}.panel,.gear-panel,.shop-panel,.journal-panel{border-width:20px!important;padding:9px!important}.ultimate-hud{width:36%}}

.chapter-hud{background-image:var(--art-plaque)!important}.shield-hud,.objective-hud{background-image:var(--art-hud);background-size:100% 100%;color:#fff0c7;border:0!important}.shield-hud{padding:5px 10px}.objective-hud{padding:12px 18px}.memory-item{background-image:var(--art-parchment);background-size:100% 100%;padding:14px}.shop-tool{min-height:40px}
.help-lessons b,.panel strong{color:#265e50!important}.panel .eyebrow{color:#537962}.gear-notice span{color:#d5e8d7!important}.shield-hud small{color:#cde6d8!important}
/* Leave the feet and the playable ground visible beneath every combat meter. */
.boss-hud{bottom:4%;height:84px;padding:10px 20px!important}.boss-name{margin:0 0 4px;font-size:14px}.boss-status{font-size:11px;margin-top:4px}.key-strip{display:none}.journey-hud{height:74px}
@media(max-width:900px){.boss-hud{height:72px}.boss-name{font-size:12px}.boss-status{font-size:10px}.journey-hud{height:68px}}
@media(max-width:600px) and (orientation:portrait){.boss-hud{bottom:26%;height:76px}}

/* v35: enlarge the artwork itself, including flex bases that used to shrink icons. */
.gear-hud{width:24%;max-width:360px}.gear-mini img{width:57px;height:57px;max-width:57px;flex-shrink:0}
.gear-picture,.equipped-card>.gear-picture,.gear-fitting .equipped-card img{width:100px;height:100px;max-width:none;flex:0 0 100px}
.collection-item .gear-picture{width:88px;height:88px;max-width:none}.gear-notice .gear-picture{width:94px;height:94px;max-width:none;flex:0 0 94px}
.gear-fitting{grid-template-columns:205px 1fr;gap:16px}.gear-fitting .equipped-grid{grid-template-columns:1fr}.gear-panel{width:min(1150px,94%)}
.shield-hud{height:50px}.shield-hud img{width:36px;height:43px;flex:0 0 36px}.iconbtn svg{width:1.45em;height:1.45em}.iconbtn{width:3.25em;height:3.25em}
.shop-products article>img{width:100px;height:100px;object-fit:contain}.shop-greeting>img{width:75px;height:110px;object-fit:contain}
@media(max-width:900px){.gear-mini img{width:44px;height:44px;max-width:44px}.gear-hud{width:25%;max-width:none}.gear-slots{gap:3px}.shield-hud{height:37px}.shield-hud img{width:25px;height:33px;flex-basis:25px}.gear-notice .gear-picture{width:94px;height:94px;flex-basis:94px}.shop-products article>img{width:70px;height:70px}.shop-greeting>img{width:60px;height:85px}.gear-fitting{grid-template-columns:145px 1fr}.gear-fitting .equipped-card img{width:100px;height:100px;flex-basis:100px}}
@media(max-width:600px){.gear-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.gear-fitting{grid-template-columns:1fr}.gear-fitting .equipped-grid{grid-template-columns:1fr}.gear-fitting .equipped-card{display:flex}.shop-products article{grid-template-columns:80px 1fr}}

/* Chapter 1: controls have stable geometry; only the pressed control moves. */
#interface .gold-button,#interface .quiet-button,#interface .difficulty button,#interface .shop-tool{min-height:58px;min-width:144px;padding:17px 30px;line-height:1.45;white-space:normal;word-break:keep-all;overflow-wrap:break-word;display:inline-flex;align-items:center;justify-content:center;gap:8px;max-width:100%;font-size:16px;transition:filter .12s,transform .10s}
#interface button:active:not(:disabled):not(.npc-shop-target){transform:translateY(2px);filter:brightness(.94)}
#interface .iconbtn{min-width:54px;min-height:54px;flex-shrink:0}
#interface .shop-panel{width:min(1060px,94%);max-height:92%;overflow:auto;overscroll-behavior:contain;animation:none;transform:none;filter:none}
.shop-overlay{animation:none!important}.shop-panel header{gap:24px;align-items:center}.shop-panel header .quiet-button{flex-shrink:0}
.shop-products{gap:18px}.shop-products article{display:flex;flex-direction:column;align-items:center;padding:18px 16px;min-width:0}
.shop-products p{font-size:15px;min-height:52px;line-height:1.6;word-break:keep-all}.shop-products small{font-size:14px;min-height:22px}
#interface .shop-products .gold-button{width:100%;min-height:62px;padding:18px 26px;margin-top:auto;flex-shrink:0;font-size:16px}
.shop-feedback{font-size:15px;min-height:24px}.shop-panel{scrollbar-gutter:stable}.shop-greeting{gap:20px}.shop-greeting p{font-size:16px}
.homecoming-cover{position:absolute;inset:0;background:#071b20;z-index:30;pointer-events:none;opacity:0}.homecoming-cover.covered{pointer-events:auto}
.village-welcome{width:min(470px,38%);max-width:none}.village-welcome h2{font-size:26px}.village-welcome p{font-size:16px;line-height:1.65}.village-welcome .quest-note{border-top:1px solid #bba472;padding-top:12px;color:#765329}
.village-restoration{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.village-restoration span{padding:5px 9px;background:#e7dec6;border-radius:8px;font-size:12px;color:#827f70}.village-restoration .restored{background:#d4e6bc;color:#3d674b;font-weight:800}
#interface .homecoming-menu .gold-button{min-height:70px;width:310px}#interface .homecoming-menu .quiet-button{min-height:54px;font-size:15px}
@media(max-width:900px){#interface .gold-button,#interface .quiet-button,#interface .difficulty button,#interface .shop-tool{min-height:52px;min-width:110px;padding:14px 23px;font-size:14px}#interface .iconbtn{min-width:46px;min-height:46px}.shop-panel header{gap:12px}.shop-products{gap:9px}.shop-products article{padding:10px 6px}.shop-products p{font-size:14px;min-height:68px}.shop-greeting p{font-size:14px}#interface .shop-products .gold-button{min-height:56px;padding:15px 19px;font-size:14px}.village-welcome{width:44%;padding:9px!important}.village-welcome h2{font-size:21px}.village-welcome p{font-size:14px}.village-restoration{display:none}}
@media(max-width:600px){.shop-products{grid-template-columns:1fr}.shop-products article{display:grid;grid-template-columns:90px minmax(0,1fr);column-gap:12px}.shop-products article>img{grid-row:1/5;width:86px;height:100px}.shop-products h3,.shop-products p,.shop-products small,.shop-products .gold-button{grid-column:2}.shop-products p{min-height:0}.village-welcome{width:88%;top:14%}.village-welcome p{font-size:13px}#interface .homecoming-menu .gold-button{width:100%;min-height:60px}}
#interface .gear-hud{padding-bottom:24px!important}.gear-mini>span{line-height:1.4}.boss-hud{padding-bottom:21px!important}.boss-status{line-height:1.45;min-height:1.45em}.shop-products article{cursor:default}

.boss-hud{height:auto;min-height:98px;bottom:1.5%;padding:13px 22px 20px!important}.journey-hud{min-height:89px}@media(max-width:900px){.boss-hud{height:auto;min-height:91px;padding:12px 17px 18px!important}.journey-hud{min-height:84px}}

/* v37: nine-slice frames preserve corner proportions instead of stretching art. */
#interface .gold-button,#interface .quiet-button,#interface .difficulty button,#interface .shop-tool{background:none!important;border:18px solid transparent!important;border-image:var(--art-secondary) 48 fill /18px stretch!important;border-radius:0;padding:5px 16px;min-height:60px;line-height:1.4;font-size:16px;box-shadow:none}
#interface .gold-button,#interface .difficulty button.selected{border-image-source:var(--art-primary)!important}.diamond{display:none!important}
#interface .player-hud,#interface .chapter-hud,#interface .skill-hud,#interface .ultimate-hud,#interface .recovery-hud,#interface .gear-hud,#interface .boss-hud,#interface .objective-hud{background:none!important;border:14px solid transparent!important;border-image:var(--art-hud) 32 fill /14px stretch!important;border-radius:0!important;padding:5px 9px!important;color:#fff3d7}
#interface .chapter-hud{border-image-source:var(--art-plaque)!important;padding:7px 14px!important;left:35%;right:32%;font-size:17px;min-height:72px}
#interface .player-hud{top:3%;left:8%;width:25%;max-width:360px;padding:7px 9px!important}.hero-portrait{width:82px;height:82px;left:-75px;top:0;object-fit:contain}.hud-name{font-size:15px;gap:8px}.hud-name>span:last-child{margin-left:auto}
.relics{font-size:11px;gap:4px;flex-wrap:wrap}.shield-hud{background:none!important;padding:2px 0;height:43px}.shield-hud img{height:40px;width:34px}.shield-hud b{font-size:14px}.shield-hud small{font-size:11px}.shield-hud span{min-width:100px}.shield-pips{grid-template-columns:repeat(5,9px)}
#interface .skill-hud{top:27%;left:3%;font-size:15px}.skill-key{width:38px;height:38px;font-size:17px}.skill-name{font-size:14px}.skill-name small{font-size:12px}
#interface .gear-hud{top:39%;left:3%;width:24%;max-width:335px;padding:7px 8px 11px!important}.gear-hud-label{font-size:14px}.gear-mini{background:none;padding:2px;font-size:12px}.gear-mini img{object-fit:contain;border-radius:5px}.gear-picture{object-fit:contain!important}.gear-hud-label kbd{font-size:12px}
#interface .objective-hud{top:14%;left:36%;right:30%;max-width:none;font-size:14px;line-height:1.55;text-align:center;padding:7px 11px!important}
.currency-hud{position:absolute;right:3%;top:13%;display:flex;align-items:center;gap:9px;min-width:170px;height:74px;padding:4px 16px 4px 6px;border:1px solid #d5aa5a80;border-radius:16px;background:linear-gradient(120deg,#183f43ed,#183f43bb);z-index:6;color:#fff0b6;pointer-events:none;box-shadow:0 3px 12px #102f3544}.coin-purse{width:72px;height:66px;object-fit:contain;transform-origin:50% 60%;filter:drop-shadow(0 2px 3px #071d24aa)}.currency-hud small{display:block;font-size:12px;color:#dbd6b2}.currency-hud b{display:block;font-size:23px;line-height:1.3;font-variant-numeric:tabular-nums}.wallet-gain{position:absolute;right:13px;top:-12px;font-size:20px;font-style:normal;font-weight:900;color:#ffe675;text-shadow:0 2px 5px #12342d;opacity:0}.coin-flight{position:absolute;top:0;left:0;width:32px;height:32px;object-fit:contain;pointer-events:none;z-index:24;filter:drop-shadow(0 0 8px #ffd451)}
#interface .ultimate-hud{top:26%;right:3%;width:25%;max-width:340px;min-height:150px;padding:12px 14px!important;isolation:isolate}.ultimate-header{display:flex;flex-wrap:wrap;gap:10px;font-size:14px;color:#fff0c2}.ultimate-header kbd{font-size:13px}.ultimate-header #ultimate-state{font-size:16px;font-weight:800}.ultimate-hud strong{font-size:18px;margin:10px 0}.ultimate-hud small{font-size:13px;line-height:1.5}.ultimate-track{height:8px;border-radius:6px;background:#082c32}.ultimate-hud.ready{animation:ultimate-gold-pulse 1.7s ease-in-out infinite!important;filter:none!important;box-shadow:0 0 0 2px #ffda79,0 0 26px #ffbe4660!important}.ultimate-hud.ready #ultimate-state{color:#ffe477}.ultimate-hud.ready:before{content:'✦';position:absolute;right:10px;top:-21px;color:#ffe8a3;font-size:30px;text-shadow:0 0 15px #ffb83c;animation:ready-star 1.7s ease-in-out infinite}.ultimate-hud.ready small{color:#fff0b3;font-weight:750}.ultimate-hud:not(.ready){opacity:.85}.ultimate-hud:disabled{pointer-events:none}
@keyframes ultimate-gold-pulse{50%{box-shadow:0 0 0 3px #ffeeb0,0 0 38px #ffbf4680,0 0 10px #ffce6333 inset}}
@keyframes ready-star{50%{transform:scale(1.18) rotate(15deg);filter:brightness(1.3)}}
#interface .boss-hud{min-height:96px;bottom:2%;left:32%;width:36%;padding:7px 12px!important}.boss-name{font-size:16px}.boss-status{font-size:12px}.journey-hud .boss-name{font-size:14px}.boss-track{background-image:none!important;padding:3px!important;height:13px!important;border:1px solid #d2a764!important;border-radius:6px}.hp-track{background-image:none!important;padding:3px!important;height:17px!important;border:1px solid #d2a764!important}.stamina-track{height:5px}
#interface .recovery-hud{left:3%;bottom:5%;font-size:14px;min-height:62px}.recovery-hud kbd{font-size:16px}
.food-belt{position:absolute;right:3%;bottom:3%;display:flex;gap:9px;pointer-events:auto}.food-belt button{display:flex;align-items:center;gap:6px;min-width:118px;min-height:82px;padding:7px;border:2px solid #b89a52;border-radius:12px;background:#143c40ef;color:#fff1c6;text-align:left}.food-belt img{width:56px;height:56px;object-fit:contain}.food-belt span{display:block}.food-belt small{display:block;font-size:11px;margin-top:6px;white-space:nowrap}.food-belt b{font-size:20px}.food-belt kbd{font-size:13px}.food-belt button:disabled{opacity:.52;cursor:default}.food-belt button.available:not(:disabled){border-color:#cdea9a;box-shadow:0 0 15px #b5f07735}
#interface .shop-panel{width:min(1040px,95%);max-height:94%;border-width:22px!important;padding:18px!important}.shop-panel h2{font-size:28px}.shop-greeting>img{width:88px;height:110px;flex-shrink:0;object-fit:contain}.shop-products h3{font-size:18px;line-height:1.4;min-height:25px}.shop-products p{min-height:48px;margin:6px 0 14px}.shop-products article{padding:15px 12px}.shop-products article>img{width:108px;height:108px}.shop-products .gold-button{border-width:18px!important;min-height:64px!important;padding:5px 10px!important}.restaurant-panel .shop-products{grid-template-columns:repeat(2,minmax(0,1fr))}.restaurant-panel .shop-products article>img{width:134px;height:104px}.restaurant-panel .shop-greeting>img{width:80px;height:110px}.shop-feedback{margin:16px 0 0;line-height:1.6}
.npc-shop-target span{border:10px solid transparent;border-image:var(--art-toast) 28 fill /10px;background:none;padding:3px 8px;font-size:14px}.village-actions{gap:9px}.village-actions>button{min-height:54px!important}.village-actions small{font-size:12px}.village-welcome{max-height:62%;overflow:auto}.village-welcome h2{font-size:25px}.village-restoration span{font-size:12px}.village-welcome .coin-chip{display:none}
#interface .iconbtn{width:54px;height:54px;aspect-ratio:1;min-height:54px;min-width:54px;padding:0;background-size:contain;border-radius:50%;font-size:16px}.iconbtn svg{width:25px;height:25px}.shop-tool{font-size:15px!important}.gear-notice{top:61%;left:3%;max-width:320px}.toast{top:15%;left:35%;right:30%;font-size:15px;line-height:1.5}.context-prompt{bottom:17%;font-size:15px}
@media(max-width:1100px){#interface .player-hud{width:28%;left:8%}.hero-portrait{width:64px;height:64px;left:-58px}.hud-name{font-size:13px}.relics{display:none}.shield-hud small{display:none}.shield-hud span{min-width:84px}.shield-pips{grid-template-columns:repeat(5,6px)}.shield-hud b{font-size:12px}#interface .chapter-hud{left:38%;right:30%;font-size:15px}#interface .objective-hud{left:38%;right:30%;font-size:12px}#interface .skill-hud{top:28%}#interface .gear-hud{top:42%;width:27%}.gear-mini img{width:44px;height:44px;max-width:44px}#interface .ultimate-hud{width:26%;min-height:132px;padding:9px!important}.ultimate-header{gap:5px}.ultimate-header #ultimate-state{font-size:14px}.ultimate-hud strong{font-size:16px}.ultimate-hud small{font-size:12px}.currency-hud{height:62px;min-width:142px;top:14%}.coin-purse{width:58px;height:55px}.currency-hud b{font-size:21px}.food-belt{gap:5px}.food-belt button{min-width:96px;min-height:68px;padding:4px;gap:2px}.food-belt img{width:40px;height:44px}.food-belt small{font-size:10px}#interface .recovery-hud{bottom:3%;font-size:12px}.boss-status{font-size:11px}.village-welcome h2{font-size:20px}.village-welcome p{font-size:14px}.village-actions{bottom:5%}.shop-greeting p{font-size:15px}#interface .iconbtn{min-width:44px;min-height:44px;width:44px;height:44px}.tools{gap:6px}.tools .shop-tool{min-height:48px!important;min-width:105px!important;padding:1px 5px!important}.shop-products article>img{width:80px;height:80px}.shop-products p{font-size:14px}.shop-panel h2{font-size:24px}.shop-greeting>img{height:84px}.shop-products h3{font-size:17px}.shop-greeting{gap:12px}.shop-products{gap:12px}}
@media(max-width:750px){#interface{font-size:14px}#interface .gold-button,#interface .quiet-button{font-size:14px;min-width:110px;min-height:48px;border-width:14px!important;padding:4px 10px}#interface .player-hud{top:2%;width:30%;left:8%;border-width:9px!important;padding:3px 5px!important}.hero-portrait{width:49px;height:49px;left:-46px}.hud-name{font-size:11px}.shield-hud{height:28px}.shield-hud img{height:27px;width:24px;flex-basis:24px}.shield-hud span{min-width:70px}.shield-hud b{font-size:10px}.shield-pips{display:none}#interface .chapter-hud{top:2%;left:40%;right:26%;font-size:12px;min-height:48px;padding:4px!important}#interface .objective-hud{display:none}.tools .shop-tool{display:none}#interface .iconbtn{min-width:36px;min-height:36px;width:36px;height:36px;font-size:12px}.iconbtn svg{width:20px;height:20px}.currency-hud{top:16%;height:45px;min-width:112px;padding:2px 6px;gap:5px}.coin-purse{width:43px;height:40px}.currency-hud small{font-size:10px}.currency-hud b{font-size:17px}#interface .ultimate-hud{top:31%;width:30%;min-height:110px;border-width:10px!important;padding:6px!important}.ultimate-header #ultimate-state{font-size:12px}.ultimate-header kbd{font-size:10px}.ultimate-hud strong{font-size:14px;margin:6px 0}.ultimate-hud small{font-size:10px}#interface .skill-hud{top:29%;font-size:12px;border-width:9px!important}.skill-key{width:27px;height:27px}.skill-name{font-size:12px}.skill-name small{font-size:10px}#interface .gear-hud{top:47%;width:32%;border-width:9px!important}.gear-hud-label{font-size:11px}.gear-mini img{width:31px;height:31px;max-width:31px}.gear-mini{font-size:10px}.gear-hud-label kbd{font-size:10px}#interface .boss-hud{left:34%;width:35%;min-height:70px;padding:4px!important;border-width:9px!important}.boss-name,.journey-hud .boss-name{font-size:12px}.boss-status{font-size:10px}.food-belt{bottom:3%;right:2%;gap:4px}.food-belt button{min-width:61px;min-height:54px;gap:0;flex-direction:column;padding:2px}.food-belt img{width:38px;height:30px}.food-belt small{display:none}.food-belt b{font-size:14px}.food-belt kbd{font-size:10px}#interface .recovery-hud{font-size:10px;border-width:9px!important;min-height:44px;padding:3px!important}.recovery-hud span{max-width:55px}.recovery-hud kbd{font-size:11px}.gear-notice{top:65%;font-size:12px;width:35%}.shop-products{grid-template-columns:1fr}.restaurant-panel .shop-products{grid-template-columns:1fr}.shop-products article{display:grid;grid-template-columns:90px 1fr;column-gap:8px;text-align:left}.shop-products article>img{grid-row:1/5;width:80px!important;height:90px!important}.shop-products h3,.shop-products p,.shop-products small,.shop-products .gold-button{grid-column:2;min-height:0}.shop-panel header .quiet-button{min-width:105px}.shop-greeting>img{height:80px}.shop-greeting p{font-size:13px}.shop-panel h2{font-size:22px}.shop-greeting .coin-chip{font-size:13px}.village-welcome{width:43%;top:13%;max-height:55%;border-width:15px!important}.village-welcome p{font-size:12px}.village-welcome h2{font-size:17px}.village-actions small{display:none}.village-actions{bottom:4%;gap:4px}.village-actions>button{min-height:43px!important}.npc-shop-target span{font-size:11px}.currency-hud:has(+.overlay){display:none}}
@media(prefers-reduced-motion:reduce){.ultimate-hud.ready,.ultimate-hud.ready:before{animation:none!important}}
#interface .skill-hud,#interface .ultimate-hud{bottom:auto!important;height:auto!important}#interface .chapter-hud{border-image-source:var(--art-hud)!important}.chapter-hud small{font-size:12px;margin:0 0 7px;letter-spacing:.08em}
#interface .shop-panel,#interface .gear-panel,#interface .journal-panel{border:20px solid transparent!important;border-image:var(--art-slot) 40 /20px stretch!important;background:linear-gradient(135deg,#fff6dc,#f4e4bc)!important;padding:18px!important}
.shop-panel header .eyebrow{margin:0 0 5px;font-size:11px}.shop-panel header h2{margin:0;font-size:25px}.shop-panel header{margin-bottom:15px}.shop-greeting{margin:0 0 15px;padding:8px 14px;min-height:90px}.shop-greeting>img,.restaurant-panel .shop-greeting>img{height:78px}.shop-greeting p{margin:0;line-height:1.7}.shop-products article{padding:10px 12px;gap:5px}.shop-products h3{margin:4px 0;min-height:0;font-size:18px}.shop-products p{margin:5px 0;min-height:40px;line-height:1.5}.shop-products small{margin:4px 0;min-height:20px}.restaurant-panel .shop-products article>img{width:118px;height:88px}.shop-products article>img{width:88px;height:88px}#interface .shop-products .gold-button{width:100%;max-width:260px;min-height:64px!important;margin-top:8px!important;align-self:center}.shop-feedback{margin:12px 0 0;font-size:14px}.shop-panel header .quiet-button{min-height:54px!important}
@media(max-width:750px){#interface .shop-panel{padding:12px!important;border-width:15px!important}.shop-panel header h2{font-size:20px}.shop-panel header{gap:8px}.shop-greeting>img{width:62px}.shop-greeting{padding:6px 10px}.shop-products article{padding:8px}.shop-products h3{font-size:16px}.shop-products p{min-height:0}.shop-products small{font-size:12px}#interface .shop-products .gold-button{max-width:none;min-height:54px!important}}

/* v38: readable recovery belt, illustrated title and conversation faces. */
#interface .homecoming-title{margin:0 0 7px;line-height:1;width:100%;max-width:590px}
.title-logo{display:block;width:100%;height:auto;max-height:240px;object-fit:contain;filter:drop-shadow(0 5px 12px #0c243d70)}
#interface .homecoming-menu{width:44%;max-width:620px;top:8%;left:4%;padding:10px 14px}
#interface .gold-button,#interface .quiet-button{min-height:66px;min-width:180px;font-size:19px;padding:8px 20px;line-height:1.25;white-space:normal}
#interface .iconbtn{min-height:54px;min-width:54px;width:54px;height:54px;font-size:16px}
#interface .shop-tool{min-height:56px;min-width:138px;font-size:17px}
#interface .difficulty button{min-height:52px;padding:10px 19px;font-size:17px}
#interface .shop-products .gold-button{width:100%;min-width:0;min-height:66px;font-size:17px}
.shop-products article>img{width:108px;height:108px;object-fit:contain}
.shop-products h3{font-size:21px}.shop-products p{min-height:36px}
.shop-greeting>img{width:96px;height:96px;object-fit:contain;object-position:center;border:3px solid #d5b96a;border-radius:20px;background:#27484b;flex-shrink:0}
.shop-greeting p{flex:1}.shop-greeting .coin-chip{white-space:nowrap}
.story-box.has-portrait{padding-left:154px;min-height:165px}
.dialogue-portrait{position:absolute;left:18px;top:19px;width:114px;height:114px;object-fit:contain;border-radius:22px;border:3px solid #ddc584;background:linear-gradient(#416570,#17383e);box-shadow:0 3px 10px #0005}
.cinema-portrait{width:66px;height:66px;object-fit:contain;border:2px solid #d9c18a;background:#31565b;border-radius:14px;vertical-align:middle;margin-right:12px}
.lives-hud{position:absolute;left:3%;top:26%;display:flex;align-items:center;gap:9px;padding:7px 14px;border:2px solid #d0b573;border-radius:12px;background:#173c41df;box-shadow:0 3px 8px #0b1e2a55}
#life-hearts{font-size:25px;color:#ff8882;letter-spacing:5px;text-shadow:0 2px #7b3037}#life-count{font-size:15px;color:#ffe9b4}
.frost-hud{position:absolute;top:31%;left:38%;padding:8px 18px;color:#d9f7ff;border:2px solid #78d9ff;background:#173e60df;border-radius:15px;font-size:17px}
.food-belt{left:auto;right:2.5%;bottom:3%;gap:9px}
.food-belt button{min-width:108px;min-height:105px;flex-direction:column;gap:0;padding:6px 8px;border-width:3px;box-shadow:0 4px 9px #001a264d}
.food-belt img{width:62px;height:60px}.food-belt span{text-align:center}.food-belt small{font-size:12px;margin-top:3px}.food-belt b{font-size:21px}.food-belt button:disabled{opacity:.62}.food-belt button:not(:disabled):hover{transform:translateY(-3px);border-color:#ffdf7d;filter:brightness(1.13)}
.food-belt button:not(:disabled):active{transform:translateY(1px)}
.shield-grade.grade-wood{filter:sepia(.85) saturate(.85) hue-rotate(340deg)}.shield-grade.grade-iron{filter:grayscale(.78) brightness(1.08)}.shield-grade.grade-royal{filter:drop-shadow(0 0 6px #e8b64455)}
.defeat-shade{background:linear-gradient(100deg,#071d29f2,#071923d9)}.defeat-content{max-width:630px;left:12%;top:15%}.defeat-content h2{color:#ecd499;font-size:45px;line-height:1.28}.defeat-content p{font-size:19px;line-height:1.7}.defeat-content .restart-note{font-size:14px;color:#c1cdd0}
@media(max-width:1100px){#interface .homecoming-menu{top:6%;width:46%}.title-logo{max-height:190px}#interface .gold-button,#interface .quiet-button{min-height:58px;min-width:150px;font-size:17px;padding:7px 13px}#interface .iconbtn{width:48px;height:48px;min-width:48px;min-height:48px}.food-belt button{min-width:85px;min-height:87px;padding:5px}.food-belt img{width:50px;height:48px}.food-belt small{font-size:10px}.lives-hud{top:27%;padding:4px 8px}.lives-hud b{font-size:12px}#life-hearts{font-size:21px}.shop-products h3{font-size:18px}.shop-products article>img{width:84px;height:84px}.shop-products .gold-button{font-size:15px!important;min-height:58px!important}.shop-greeting>img{width:76px;height:76px}.story-box.has-portrait{padding-left:123px}.dialogue-portrait{width:90px;height:90px;left:14px;top:18px}}
@media(max-width:750px){#interface .gold-button,#interface .quiet-button{min-height:48px;min-width:122px;font-size:14px}.title-logo{max-height:145px}#interface .homecoming-menu{top:5%;padding:4px;width:48%}.food-belt{gap:4px;right:2%;bottom:2%}.food-belt button{min-width:59px;min-height:68px;padding:3px}.food-belt img{width:40px;height:38px}.food-belt small{display:none}.food-belt b{font-size:15px}.lives-hud{top:28%;font-size:11px;gap:3px}#life-hearts{font-size:16px;letter-spacing:2px}.lives-hud b{font-size:10px}.frost-hud{font-size:12px;top:26%;left:39%;padding:5px}.story-box.has-portrait{padding-left:86px;min-height:120px}.dialogue-portrait{width:62px;height:62px;left:10px;top:14px}.cinema-portrait{width:40px;height:40px}.defeat-content{top:5%;left:8%}.defeat-content h2{font-size:27px}.defeat-content p{font-size:13px}.shop-greeting>img{width:65px;height:65px}}

.lives-hud{top:23%;height:36px;box-sizing:border-box;padding:3px 12px}#life-hearts{font-size:22px}.food-belt button:disabled{opacity:.78}@media(max-width:750px){.lives-hud{top:34%;height:28px;padding:2px 6px}#life-hearts{font-size:16px}}

#interface .ultimate-hud{top:auto;right:auto;left:3%;bottom:3%!important;width:26%;min-height:108px;padding:10px!important}#interface .ultimate-hud strong{margin:6px 0;font-size:19px}#interface .ultimate-hud small{font-size:12px}#interface .ultimate-header #ultimate-state{font-size:16px}@media(max-width:750px){#interface .ultimate-hud{width:28%;min-height:78px;bottom:2%!important;left:2%;padding:4px!important}#interface .ultimate-hud strong{font-size:13px;margin:3px 0}#interface .ultimate-hud small{font-size:9px}#interface .ultimate-header #ultimate-state{font-size:11px}}

/* v39: deliberate difficulty selection, larger conversation faces, clear rewards. */
#interface .difficulty-panel{width:min(1000px,90%);max-height:94%;overflow:auto;padding:24px 30px!important;text-align:left}
.difficulty-panel h2{font-family:inherit;font-size:30px;font-weight:800;margin:0 0 8px}.difficulty-panel .eyebrow{margin:0 0 7px}.difficulty-guide{margin:0 0 16px!important;font-size:15px;line-height:1.5!important}
.difficulty-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.difficulty-choice{min-height:108px;padding:12px 16px;border:2px solid #c2a367;border-radius:10px;background:#183f46;color:#fff1cc;text-align:left;transition:background .15s,border-color .15s}.difficulty-choice:hover{background:#245863}.difficulty-choice.selected{border-color:#ffe69a;background:#366977;box-shadow:0 0 0 2px #edbb5266,inset 0 0 18px #ffce521c}.difficulty-stars{display:block;color:#f0c162;font-size:12px;letter-spacing:3px}.difficulty-choice strong{display:block;font-size:22px;margin:3px 0}.difficulty-choice small{display:block;color:#e2e7d9;font-size:13px;line-height:1.5}.difficulty-choice[data-action="difficulty-hell"] strong{color:#ffb094}
.difficulty-detail{display:flex;gap:18px;flex-wrap:wrap;align-items:center;padding:12px 15px;margin-top:14px;border-radius:9px;background:#163941;color:#fff0c4;font-size:15px}.difficulty-detail>b{color:#ffdf7e}.journey-rules{font-size:14px!important;margin:12px 0!important;line-height:1.65!important}.start-actions{display:flex;justify-content:flex-end;gap:12px}.start-actions .gold-button{margin:0!important}
#interface .story-box.has-portrait{left:13%;right:13%;min-height:310px;padding:28px 28px 24px 286px!important;text-align:left}
#interface .dialogue-portrait{width:224px;height:224px;left:20px;top:25px;border-radius:24px;border-width:4px;object-fit:cover}.story-box.has-portrait .speaker{font-size:21px;font-weight:800}.story-box.has-portrait .story-text{font-size:22px;line-height:1.65;margin:16px 0 24px;min-height:75px}.story-box.has-portrait .story-step{text-align:left;margin-top:14px}.cinema-portrait{width:130px;height:130px;float:left;margin:0 20px 0 0}.rescue-caption:has(.cinema-portrait){min-height:170px;text-align:left;padding:13px 20px!important}.rescue-caption:has(.cinema-portrait) p{font-size:21px;padding-top:12px}.shop-greeting>img{width:140px;height:140px}
.run-hud{position:absolute;top:24%;left:38%;width:29%;padding:7px 11px;display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;border-radius:10px;background:#13373eda;color:#fff0c8;font-size:14px}.run-hud b{font-size:19px;color:#ffe28b;font-variant-numeric:tabular-nums}.run-hud small{font-size:12px}.weapon-hud-trait{display:block;margin-top:7px;border-top:1px solid #cdae5960;padding-top:6px;font-size:13px;line-height:1.45;color:#ffe69e}.weapon-trait{color:#ffd883!important;font-weight:700}
.clear-reward{position:absolute;right:3%;top:25%;width:29%;padding:19px 21px;border:3px solid #ddbd73;border-radius:16px;color:#fff0c3;background:linear-gradient(145deg,#154653f2,#142f38f0);box-shadow:0 6px 22px #08232970}.clear-reward small{font-size:13px;line-height:1.5}.clear-reward h3{font-size:25px;margin:9px 0;color:#ffe18e}.clear-reward p{display:flex;justify-content:space-between;gap:12px;margin:10px 0;font-size:16px}.clear-reward .clear-gold{color:#ffe08c}.clear-reward .clear-life{color:#ffb6a8}
@media(max-width:1000px){#interface .difficulty-panel{padding:16px!important}.difficulty-panel h2{font-size:23px}.difficulty-choice{min-height:84px;padding:7px 11px}.difficulty-choice strong{font-size:18px}.difficulty-choice small{font-size:12px}.difficulty-guide{font-size:13px}.difficulty-detail{font-size:13px;gap:12px;padding:7px}.journey-rules{font-size:12px!important}.start-actions .gold-button,.start-actions .quiet-button{min-height:50px!important}#interface .story-box.has-portrait{left:9%;right:9%;min-height:245px;padding:18px 22px 16px 222px!important}#interface .dialogue-portrait{width:172px;height:172px;top:20px;left:18px}.story-box.has-portrait .speaker{font-size:18px}.story-box.has-portrait .story-text{font-size:18px;margin:8px 0 12px;min-height:60px}.cinema-portrait{width:94px;height:94px}.rescue-caption:has(.cinema-portrait){min-height:133px}.rescue-caption:has(.cinema-portrait) p{font-size:17px}.run-hud{top:26%;font-size:12px;gap:5px;width:31%;left:36%}.run-hud b{font-size:15px}.weapon-hud-trait{font-size:11px}.clear-reward{padding:10px 14px;top:26%;width:30%}.clear-reward h3{font-size:20px}.clear-reward p{font-size:14px}.shop-greeting>img{width:106px;height:106px}}
@media(max-width:650px){.difficulty-options{grid-template-columns:repeat(2,1fr)}.difficulty-choice{min-height:68px}.difficulty-choice small{display:none}.difficulty-detail{gap:8px}.difficulty-detail span{font-size:12px}#interface .story-box.has-portrait{left:5%;right:5%;min-height:195px;padding:14px 12px 12px 145px!important}#interface .dialogue-portrait{width:118px;height:118px;left:9px;top:17px}.story-box.has-portrait .story-text{font-size:15px;min-height:42px}.story-box.has-portrait .speaker{font-size:16px}.cinema-portrait{width:76px;height:76px}.rescue-caption:has(.cinema-portrait){min-height:108px}.rescue-caption:has(.cinema-portrait) p{font-size:14px;padding-top:0}.run-hud small,.weapon-hud-trait{display:none}.clear-reward{width:37%;font-size:12px}.clear-reward p{font-size:12px}.clear-reward h3{font-size:16px}}
#interface .difficulty-choice strong{color:#fff0c6!important}#interface .difficulty-choice[data-action="difficulty-hell"] strong{color:#ffb59b!important}.clear-reward b{color:inherit!important}

/* v40 — one clear purchase, full-size life feedback. */
.inn-panel{max-width:850px!important}.inn-rest-card{text-align:center;padding:18px 24px 26px;border:2px solid #c99948;border-radius:22px;background:linear-gradient(135deg,#fff3ca,#d9ead7);color:#244a45}.inn-hearts{font-size:44px!important;letter-spacing:12px;color:#cc5960!important;margin:4px 0!important}.inn-rest-card h3{font-size:24px}.inn-rest-card>p{font-size:18px}.inn-rest-card small{display:block;font-size:15px;margin:12px 0 20px}.inn-rest-card .gold-button{min-width:290px;min-height:60px}.village-actions{flex-wrap:wrap;max-width:95%;gap:8px}.village-actions .quiet-button{font-size:15px;padding:10px 16px;min-height:46px}.inn-target span{white-space:nowrap}.inn-rest-card .gold-button:disabled{opacity:.65}
#interface .village-actions{left:3%;right:3%;bottom:2%;max-width:94%;flex-direction:row;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}
#interface .village-actions>.quiet-button{min-width:168px!important;min-height:54px!important;margin:0!important;font-size:15px;padding:5px 12px!important}
#interface .village-actions>small{flex-basis:100%;text-align:center;font-size:12px}
#interface:has(.village-actions)>.food-belt{display:none}
#interface .village-welcome{max-width:455px;max-height:41%;overflow:auto}
@media(max-width:900px){#interface .village-actions>.quiet-button{min-width:125px!important;min-height:44px!important;font-size:12px!important;padding:2px 7px!important}#interface .village-actions{gap:4px}#interface .village-welcome{max-height:39%}.inn-rest-card{padding:12px}.inn-rest-card .gold-button{min-width:220px}}

/* v41: readable, independently clickable dodge cooldown. */
#interface .dodge-hud{position:absolute;top:27%;right:3%;width:235px;min-height:83px;padding:12px 16px;background:#12383eea;color:#f9f1d5;border:2px solid #c59a4a;border-radius:13px;box-shadow:0 4px 12px #071e2c70;pointer-events:auto;text-align:left;cursor:pointer;font:700 15px system-ui}
.dodge-hud>span{display:flex;align-items:center;justify-content:space-between;gap:9px}.dodge-hud kbd{font:700 12px system-ui;color:#e9d9ab}.dodge-hud b{font-size:15px}.dodge-hud small{font:12px system-ui;display:block;margin-top:5px;color:#cbdae0}.dodge-track{display:block;height:5px;margin-top:9px;border-radius:5px;background:#071f2a;overflow:hidden}.dodge-track i{display:block;height:100%;background:#71daf0}.dodge-hud.ready{border-color:#e9cd7c}.dodge-hud.rolling{box-shadow:0 0 20px #93e9ff88;border-color:#bcefff}.dodge-hud:disabled{cursor:default}.touch-button:disabled{opacity:.5}
@media(max-width:900px){#interface .dodge-hud{width:185px;min-height:66px;top:29%;padding:8px 10px}.dodge-hud small{display:none}.dodge-hud b{font-size:13px}}

#interface .dodge-hud:disabled{opacity:.88;filter:none}

/* v42: one low, centered action dock; open sightlines on both sides. */
#interface .combat-dock{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);display:flex;align-items:stretch;justify-content:center;gap:8px;padding:7px 9px;border:1px solid #e5c179aa;border-radius:20px;background:linear-gradient(180deg,#193f48ed,#0d2733ed);box-shadow:0 6px 22px #06172088,inset 0 1px #fff2c529;pointer-events:none;max-width:94%;box-sizing:border-box}
#interface .combat-dock>*{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;transform:none;pointer-events:auto;margin:0;box-sizing:border-box}
#interface .combat-dock .ultimate-hud{width:205px;min-width:205px;min-height:82px;height:82px!important;padding:8px 11px!important;border-radius:13px;display:flex;flex-direction:column;justify-content:center;overflow:visible;background:linear-gradient(140deg,#233b49,#132934)}
#interface .combat-dock .ultimate-hud strong{font-size:18px;line-height:1.2;margin:6px 0 8px;white-space:nowrap;color:#fff4d7}
#interface .ultimate-header{gap:8px;align-items:center}#interface .combat-dock .ultimate-header kbd{font-size:11px;white-space:nowrap}#interface .combat-dock #ultimate-state{font-size:12px;white-space:nowrap}
#interface .combat-dock #ultimate-hint{display:none}#interface .combat-dock .ultimate-track{height:6px;margin:0}
#interface .combat-dock .ultimate-hud.ready{border-color:#ffe9aa;box-shadow:0 0 0 1px #fff0b1,inset 0 0 24px #edbc5d44,0 0 24px #ffba5266;animation:ready-crown 1.2s ease-in-out infinite}
#interface .combat-dock .ultimate-hud.ready:before{content:'';position:absolute;inset:-5px;border:1px solid #ffda83;border-radius:17px;pointer-events:none;background:none;animation:ready-wave 1.5s ease-out infinite}
#interface .combat-dock .ultimate-hud.ready:after{content:'✦';position:absolute;right:10px;top:-17px;font-size:24px;color:#fff4bf;text-shadow:0 0 12px #ffb03b;animation:ready-star 1.2s ease-in-out infinite;pointer-events:none}
#interface .combat-dock .ultimate-hud:disabled:not(.ready){opacity:.9;filter:none}
#interface .combat-dock .food-belt{display:flex;gap:5px;width:auto;flex-shrink:0;padding:0;background:none;border:0;box-shadow:none}
#interface .combat-dock .food-belt button{position:relative;width:76px;min-width:76px;height:82px;min-height:82px;border-width:1px;border-radius:11px;padding:4px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0;background:linear-gradient(#31585a,#183a41);box-shadow:inset 0 1px #fff0c32b}
#interface .combat-dock .food-belt img{width:49px;height:46px;object-fit:contain;filter:drop-shadow(0 2px 2px #00182680)}
#interface .combat-dock .food-belt span{display:flex;justify-content:center;align-items:center;gap:8px;line-height:19px}#interface .combat-dock .food-belt b{font-size:18px}#interface .combat-dock .food-belt kbd{font-size:11px}#interface .combat-dock .food-belt small{display:none}
#interface .combat-dock .food-belt button:disabled{opacity:.62}#interface .combat-dock .food-belt button.available:not(:disabled){border-color:#efd08d}
#interface .combat-dock .dodge-hud{width:115px;min-width:115px;min-height:82px;height:82px!important;padding:8px 10px;border-width:1px;border-color:#719697;background:#153941;border-radius:12px;box-shadow:none}
#interface .combat-dock .dodge-hud>span{flex-direction:column;gap:7px;align-items:flex-start}#interface .combat-dock .dodge-hud b{font-size:13px;white-space:nowrap}#interface .combat-dock .dodge-hud small{display:none}#interface .combat-dock .dodge-track{margin-top:11px;height:4px}
#interface .combat-dock .skill-hud{display:flex;align-items:center;justify-content:center;gap:6px;width:90px;min-height:82px;padding:7px;background:none;border:0;box-shadow:none;pointer-events:none}
#interface .combat-dock .skill-key{width:25px;height:28px;min-width:25px;font-size:15px;border-radius:7px;display:grid;place-items:center}#interface .combat-dock .skill-name{font-size:12px;line-height:1.5}#interface .combat-dock .skill-name small{display:none}
#interface #equipment-hud{display:none}#interface .key-strip{display:none}
#interface .gear-notice{left:auto;right:2.5%;top:24%;bottom:auto;width:290px;max-width:28%;border-radius:13px;border:1px solid #bcaa7b;border-left:4px solid var(--rarity);background:linear-gradient(135deg,#143b46f5,#16333bef);padding:11px;gap:9px;animation:loot-arrive .32s ease-out both;box-shadow:0 8px 24px #071b2955}
#interface .gear-notice img{width:59px;height:59px;flex-basis:59px;object-fit:contain}#interface .gear-notice strong{font-size:15px;margin:4px 0}#interface .gear-notice p{font-size:12px;margin:0;line-height:1.4}#interface .gear-notice span{display:none}#interface .gear-notice small{font-size:11px}
#interface .boss-hud:not(.journey-hud){left:33%;width:34%;top:22%;bottom:auto;padding:8px 13px;border-radius:12px;background:#102e39bd;box-sizing:border-box}#interface .boss-status{font-size:11px;line-height:1.4;margin-top:4px}#interface .boss-name{font-size:16px}#interface .journey-hud{display:none}
#interface .run-hud{top:15%;left:35%;width:30%;font-size:12px;padding:5px 8px;box-sizing:border-box;gap:8px;background:#12353bb0}#interface .run-hud b{font-size:16px}#interface .run-hud small{font-size:10px}
#interface .objective-hud{top:10%;right:auto;left:35%;width:30%;max-width:30%;text-align:center;font-size:11px;line-height:1.45;display:block}
#interface .context-prompt{bottom:135px;max-width:55%;font-size:14px}#interface .toast{top:28%;bottom:auto;left:50%;transform:translateX(-50%);max-width:44%;font-size:13px;padding:9px 15px}
@keyframes ready-crown{50%{box-shadow:0 0 0 1px #fff7d6,inset 0 0 30px #edbc5d55,0 0 34px #ffba5299}}
@keyframes ready-wave{0%{opacity:.75;scale:1}100%{opacity:0;scale:1.10}}
@keyframes ready-star{50%{transform:translateY(-4px) scale(1.15)}}
@keyframes loot-arrive{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:950px){#interface .combat-dock{bottom:8px;gap:5px;padding:5px 6px}#interface .combat-dock .ultimate-hud{width:180px;min-width:180px}#interface .combat-dock .ultimate-hud strong{font-size:16px}#interface .combat-dock .food-belt button{width:62px;min-width:62px}#interface .combat-dock .dodge-hud{width:108px;min-width:108px}#interface .combat-dock .skill-hud{width:64px}#interface .gear-notice{top:24%;max-width:31%;width:260px;padding:8px}#interface .gear-notice p{font-size:10px}#interface .gear-notice strong{font-size:13px}#interface .gear-notice img{width:49px;height:49px;flex-basis:49px}}
@media(max-width:650px){#interface .combat-dock{width:94%;gap:4px}#interface .combat-dock .skill-hud{display:none}#interface .combat-dock .ultimate-hud{width:160px;min-width:140px;height:67px!important;min-height:67px;padding:6px!important}#interface .combat-dock .ultimate-hud strong{font-size:14px}#interface .combat-dock #ultimate-state{font-size:10px}#interface .combat-dock .ultimate-header kbd{font-size:9px}#interface .combat-dock .food-belt{gap:3px;flex-shrink:1}#interface .combat-dock .food-belt button{width:45px;min-width:42px;height:67px;min-height:67px}#interface .combat-dock .food-belt img{width:38px;height:38px}#interface .combat-dock .food-belt b{font-size:14px}#interface .combat-dock .dodge-hud{width:92px;min-width:82px;min-height:67px;height:67px!important;padding:7px}#interface .combat-dock .dodge-hud b{font-size:11px}#interface .combat-dock .dodge-hud kbd{font-size:10px}#interface .boss-hud:not(.journey-hud){top:29%;width:43%;left:29%}#interface .run-hud{top:22%;left:36%;width:30%}#interface .run-hud small{display:none}#interface .objective-hud{display:none}#interface .gear-notice{top:24%;right:2%;width:185px;max-width:34%}#interface .gear-notice p{display:none}#interface .gear-notice small{font-size:9px}#interface .context-prompt{bottom:98px}}
@media(prefers-reduced-motion:reduce){#interface .combat-dock .ultimate-hud.ready,#interface .combat-dock .ultimate-hud.ready:before,#interface .combat-dock .ultimate-hud.ready:after{animation:none}#interface .gear-notice{animation:none}}
/* Existing illustrated borders reserve 28px. The compact dock uses its own thin frame. */
#interface .combat-dock .ultimate-hud,#interface .combat-dock .skill-hud{border-image:none!important;border:1px solid #b89f67!important;padding:8px 10px!important}
#interface .combat-dock .skill-hud{height:82px!important;min-height:82px;width:92px;flex-direction:column;gap:3px;padding:5px!important;background:#153941}
#interface .combat-dock .skill-name{max-width:none;width:100%;text-align:center;font-size:11px;white-space:nowrap}
#interface .combat-dock .ultimate-header{font-size:11px;line-height:1.3;min-height:0;flex:0 0 auto;flex-wrap:nowrap;justify-content:space-between}
#interface .combat-dock .ultimate-header kbd{padding:2px 4px;margin:0;border:1px solid #d2b57d55;line-height:1.2;min-height:0}
#interface .combat-dock #ultimate-name{flex:0 0 auto;margin:7px 0 9px}#interface .combat-dock .ultimate-track{flex:0 0 6px}
#interface .chapter-hud{border-image:none!important;border:1px solid #ddbe7b!important;background:linear-gradient(#19404ee8,#123039df);border-radius:13px;min-height:0;height:57px;box-sizing:border-box;padding:7px 12px!important;top:4%;left:35%;right:auto;width:30%;font:700 20px system-ui;letter-spacing:0;line-height:1.3;display:flex;flex-direction:column;justify-content:center}
#interface .chapter-hud small{font-size:10px;margin:0 0 3px;letter-spacing:2px}
#interface .objective-hud{border-image:none!important;border:0!important;background:none;box-shadow:none;padding:0!important;top:12%;line-height:1.4}
#interface .boss-hud:not(.journey-hud){border-image:none!important;border:1px solid #c09759!important;padding:8px 12px!important;min-height:0}
#interface .gear-notice{border-image:none!important}
@media(max-width:950px){#interface .chapter-hud{font-size:16px;height:49px;top:3%}#interface .objective-hud{top:13%;font-size:10px}#interface .run-hud{top:18%}#interface .boss-hud:not(.journey-hud){top:25%}#interface .combat-dock .skill-hud{width:70px}}
@media(max-width:650px){#interface .combat-dock .skill-hud{display:none}#interface .chapter-hud{top:3%;height:43px;font-size:14px}#interface .combat-dock .ultimate-hud{padding:5px!important}#interface .combat-dock #ultimate-name{margin:5px 0}}
#interface .chapter-hud{background:linear-gradient(160deg,#245261ee,#102e3de8)!important;border-radius:13px!important}
#interface .combat-dock .ultimate-hud{background:linear-gradient(140deg,#244859,#12313e)!important;border-radius:12px!important}
#interface .combat-dock .skill-hud{background:#153941!important;border-radius:10px!important}
#interface .gear-notice{background:linear-gradient(135deg,#173f49f5,#102e3af2)!important;border:1px solid #c2ab75!important;border-left:4px solid var(--rarity)!important;border-radius:13px!important;padding:11px!important;min-height:0}
#interface .boss-hud:not(.journey-hud){background:#102e39d9!important;border-radius:13px!important}

/* v43 — conversations stay in the village, with a visible speaking actor. */
.conversation-screen{position:absolute;inset:0;z-index:15;pointer-events:auto;background:linear-gradient(180deg,#122e3c6e,transparent 56%)}
.conversation-card{position:absolute;top:5%;left:5%;right:5%;display:grid;grid-template-columns:28% 1fr;gap:2%;align-items:center;padding:1.3em 1.7em;border:3px solid #c79b56;border-radius:25px;background:linear-gradient(120deg,#fff6dcfa,#f1e5c6fa);box-shadow:0 8px 0 #684b2c,0 20px 35px #0c282b50;color:#3b4f4b}
.conversation-faces{display:flex;align-items:center;justify-content:center;gap:.25em;min-width:0}
.conversation-faces img{width:46%;aspect-ratio:1;object-fit:contain;opacity:.53;filter:saturate(.6);transition:opacity .2s,filter .2s,transform .2s;transform:scale(.89)}
.conversation-faces img.speaking{opacity:1;filter:none;transform:scale(1)}
.conversation-faces span{color:#a8854f;font-size:1.3em}
.conversation-copy .eyebrow{font-size:.68em;color:#85704d;letter-spacing:.12em;margin:0 0 .5em}
.conversation-copy h2{font:900 1.35em system-ui,sans-serif;color:#346353;margin:0 0 .35em}
.conversation-copy>p:not(.eyebrow){font-size:1.16em;line-height:1.55;word-break:keep-all;min-height:3.1em;margin:.3em 0 .8em;color:#364c49}
.conversation-copy>small{display:block;font-size:.66em;color:#8b806c;margin-top:.7em}
.conversation-actions{display:flex;gap:1em;align-items:center;flex-wrap:wrap}
.conversation-actions .gold-button{min-width:10.5em;min-height:46px;font-size:.87em;padding:.75em 1em;gap:.8em}
.conversation-actions .quiet-button{min-height:44px;font-size:.84em;color:#456d65;padding:.7em .5em;border-bottom:1px solid #baa071}
.world-speech{position:absolute;z-index:16;pointer-events:none;transform:translate(-50%,-100%);width:max-content;max-width:min(29%,330px);padding:.7em 1em;background:#fffdf0;color:#344c45;border:2px solid #b88e4f;border-radius:18px;box-shadow:0 5px 14px #112d3d38;font-size:clamp(12px,1.02vw,17px);line-height:1.45;word-break:keep-all;animation:speech-arrive .2s both}
.world-speech:after{content:'';position:absolute;left:var(--tail-offset,50%);bottom:-10px;width:16px;height:16px;border-right:2px solid #b88e4f;border-bottom:2px solid #b88e4f;background:#fffdf0;transform:translateX(-50%) rotate(45deg)}
.world-speech b{display:block;color:#357764;font-size:.75em;margin-bottom:.25em}.world-speech span{display:block}
@keyframes speech-arrive{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
.boss-dialogue .dialogue-shade{background:linear-gradient(180deg,#142c2f88,transparent 65%)}
.boss-dialogue .chapter-intro{display:none}.boss-dialogue .story-box.has-portrait{left:8%;right:8%;top:6%;bottom:auto;min-height:0;padding:1em 1.4em 1em 195px;text-align:left;border-radius:22px;background:#203c3fec;border:2px solid #d1ad69}
.boss-dialogue .dialogue-portrait{width:165px;height:165px;left:15px;top:50%;transform:translateY(-50%)}
.boss-dialogue .story-text{font-size:1.15em;min-height:2.8em;line-height:1.5;margin:.3em 0 .8em}.boss-dialogue .story-box .speaker{margin:0}.boss-dialogue .story-step{position:absolute;right:2em;bottom:2em}.boss-dialogue .story-box .gold-button{font-size:.83em;min-width:12em;padding:.7em 1em}
.festival-ending{top:9%;left:6%;width:45%;animation:arrive .5s both}.festival-ending .eyebrow{font-size:.73em;letter-spacing:.1em;color:#ffe4a0;margin-bottom:.9em}.festival-ending h2{font-family:system-ui,sans-serif;font-weight:800;font-size:2.15em;line-height:1.35;color:#fff5d8;margin:.2em 0 .65em;word-break:keep-all}.festival-ending .epilogue-narration{font-family:system-ui,sans-serif;font-size:.98em;line-height:1.75;color:#e6e9d7;word-break:keep-all;margin:0 0 1.1em}.epilogue-quote{display:flex;gap:1em;align-items:center;padding:.8em;border:1px solid #edd29770;border-radius:18px;background:#173e3ade}.epilogue-quote img{width:90px;height:90px;object-fit:contain;flex-shrink:0}.epilogue-quote b{color:#ffdf9f;font-size:.83em}.festival-ending .epilogue-quote p{font:1em/1.65 system-ui,sans-serif;color:#fff7e4;margin:.3em 0;word-break:keep-all}.epilogue-progress{font-size:.75em;color:#eed098;margin:1em 0}.festival-ending .gold-button{min-width:13em;padding:.75em 1.2em;font-size:.92em}.epilogue-links{display:flex;gap:1.2em}.festival-ending .quiet-button{margin-top:.5em;font-size:.76em}.festival-ending~.world-speech{max-width:23%;font-size:clamp(12px,.92vw,16px)}
@media(max-height:600px){.conversation-card{top:3%;padding:.8em 1em;grid-template-columns:23% 1fr}.conversation-copy>p:not(.eyebrow){font-size:1em;min-height:2.6em;margin:.25em 0}.conversation-copy>small{display:none}.conversation-actions{gap:.6em}.conversation-actions .gold-button,.conversation-actions .quiet-button{min-height:36px;padding:.45em .6em;font-size:.8em}.world-speech{font-size:11px;padding:.5em .7em}.festival-ending{top:7%;width:46%}.festival-ending h2{font-size:1.65em}.festival-ending .epilogue-narration{font-size:.81em;line-height:1.45}.epilogue-quote img{width:55px;height:55px}.festival-ending .epilogue-quote p{font-size:.8em;line-height:1.45}.festival-ending .gold-button{padding:.5em .8em;min-height:35px}.festival-ending .eyebrow{margin-bottom:.5em}.epilogue-progress{margin:.6em 0}.festival-ending~.world-speech{font-size:11px}}
@media(prefers-reduced-motion:reduce){.world-speech,.festival-ending{animation:none}.conversation-faces img{transition:none}}
.boss-dialogue #interface .story-box.has-portrait{left:8%;right:8%;top:6%;bottom:auto;min-height:210px;padding:24px 28px 22px 210px!important}
.boss-dialogue #interface .dialogue-portrait{width:165px;height:165px;left:25px;top:50%;transform:translateY(-50%);object-fit:contain}
.boss-dialogue #interface .story-text{min-height:2.5em;margin:8px 0 14px;font-size:20px;line-height:1.5}
@media(max-height:600px){.boss-dialogue #interface .story-box.has-portrait{min-height:145px;padding:16px 18px 14px 135px!important}.boss-dialogue #interface .dialogue-portrait{width:104px;height:104px;left:16px}.boss-dialogue #interface .story-text{font-size:15px;margin:4px 0 8px;min-height:1.5em}.boss-dialogue #interface .story-step{bottom:1em}}

/* v44: asset-identical shield tiers and readable recovery controls. */
.shield-grade.grade-wood,.shield-grade.grade-iron,.shield-grade.grade-royal{filter:none!important}.shield-hud.broken img{filter:grayscale(1)!important;opacity:.38}.smith-panel .shop-products article>img{width:124px;height:124px;object-fit:contain}#interface .combat-dock .food-belt button{width:96px;min-width:96px;height:94px;min-height:94px;padding:4px 6px;gap:1px}#interface .combat-dock .food-belt button>img{width:62px;height:58px;object-fit:contain}#interface .combat-dock .food-belt button small{display:block;font-size:9px;white-space:nowrap;line-height:1.2;flex-basis:100%}.weapon-armory{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:16px 0 24px}.weapon-armory button{display:flex;align-items:center;text-align:left;min-height:88px;padding:8px 12px;background:#203e4c;border:2px solid #c79850;border-radius:14px;color:#fff1cb;gap:10px}.weapon-armory button small{display:block;margin-top:6px;color:#bedccd}.weapon-armory button:disabled{opacity:.55}.weapon-armory .gear-picture{width:66px;height:66px}.weapon-armory button:focus-visible{outline:3px solid #fff2bd;outline-offset:3px}@media(max-width:700px){#interface .combat-dock .food-belt button{min-width:78px;min-height:64px;padding:4px}#interface .combat-dock .food-belt button>img{width:42px;height:49px}}

#interface .combat-dock .food-belt span{flex-wrap:wrap;gap:2px 7px;text-align:center}#interface .combat-dock .food-belt button>img{flex-shrink:0}
/* v45: residents follow the scrolling world; compact the welcome card for the wider town. */
#interface .npc-shop-target[hidden]{display:none!important}
#interface .village-welcome{top:4%;left:3%;max-width:410px;max-height:31%;padding:15px 22px}
#interface .village-welcome h2{font-size:23px;margin:5px 0 8px}
#interface .village-welcome p{margin:5px 0;font-size:14px;line-height:1.55}
#interface .village-welcome .village-restoration{display:none}
#interface .village-welcome .eyebrow{display:none}
#interface .village-welcome .coin-chip{display:none}
#interface .npc-shop-target span{font-size:14px;white-space:nowrap;max-width:none;padding:5px 9px}
@media(max-width:800px){#interface .village-welcome{max-width:40%;max-height:24%;top:3%;padding:9px 13px}#interface .village-welcome h2{font-size:17px}#interface .village-welcome p{font-size:12px}#interface .village-welcome .quest-note{display:none}#interface .npc-shop-target span{font-size:11px}}

/* Keep the cage door, feet and spacing visible throughout the rescue. */
.rescue-scene .rescue-caption:has(.cinema-portrait){top:13%;bottom:auto;left:8%;right:8%;min-height:145px;padding:12px 20px!important;text-align:left}.rescue-scene .cinema-portrait{width:100px;height:108px}.rescue-scene .rescue-caption p{margin:8px 0 0}.rescue-scene .currency-hud{top:auto;bottom:3%;height:58px}.rescue-instruction{font-size:clamp(12px,1.3vw,18px);color:#fff2d5;padding-right:8px}@media(max-width:850px){.rescue-scene .rescue-caption:has(.cinema-portrait){min-height:105px;padding:10px 14px!important;left:5%;right:5%}.rescue-scene .cinema-portrait{width:65px;height:73px}.rescue-scene .rescue-caption small{font-size:8px;letter-spacing:1px}}

/* Cape durability stays beside the existing compact equipment HUD. */
.cloak-hud{display:flex;align-items:center;gap:8px;min-height:38px;margin-top:2px;color:#fff0bc}.cloak-hud img{width:40px;height:40px;object-fit:contain}.cloak-hud span{display:flex;gap:9px;align-items:baseline}.cloak-hud b{font-size:14px}.cloak-hud small{font-size:12px;color:#c9dbda}.cloak-hud.broken{opacity:.52}.tailor-panel .cloak-product{width:126px;height:126px;object-fit:contain}.tailor-note{font-size:14px;text-align:center;color:#61482f}.tailor-panel .shop-products article p{min-height:58px}.tailor-panel .gold-button{min-width:176px;padding:15px 18px}.tailor-panel .shop-products{gap:20px}
#interface .lives-hud{top:29%;}#interface .cloak-hud small{white-space:nowrap}#interface .cloak-hud span{gap:8px}@media(max-width:1100px){#interface .lives-hud{top:calc(3% + 183px)}#interface .cloak-hud img{width:32px;height:32px}#interface .cloak-hud b{font-size:12px}#interface .cloak-hud small{font-size:11px}}
/* v49: the two movement skills always expose readiness and recharge. */
#interface .combat-dock .skill-hud{display:flex;width:160px;min-width:160px;height:94px!important;min-height:94px;gap:4px;justify-content:center;pointer-events:auto;background:linear-gradient(145deg,#173e4b,#102c38);color:#e1eff0;border-radius:12px;padding:7px 10px!important;opacity:1}
#interface .combat-dock .mobility-heading{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
#interface .combat-dock .mobility-heading b{font-size:13px}#interface .combat-dock .skill-key{background:none;width:24px;height:23px;min-width:24px;padding:1px;border:1px solid #8dc8d4!important;line-height:20px;font-size:13px}
#interface .combat-dock #rush-state{font-size:14px;line-height:1.25;white-space:nowrap}#interface .combat-dock #skill-cooldown{display:block;font-size:11px;line-height:1.2;color:#cee4e8;white-space:nowrap}
#interface .combat-dock .mobility-track{display:block;width:100%;height:5px;background:#09202c;border-radius:5px;overflow:hidden}#interface .combat-dock .mobility-track i{display:block;height:100%;background:#78d9ed;transition:width .08s}
#interface .combat-dock .dodge-hud{width:140px;min-width:140px;height:94px!important;min-height:94px;display:flex;flex-direction:column;justify-content:center;gap:4px;color:#dcecee}#interface .combat-dock .dodge-hud>span{gap:5px}#interface .combat-dock .dodge-hud small{display:block;font-size:10px;line-height:1.2;white-space:nowrap}#interface .combat-dock .dodge-hud .dodge-track{width:100%;margin:3px 0}
#interface .combat-dock .skill-hud.ready,#interface .combat-dock .dodge-hud.ready{border:2px solid #a3f4ff!important;background:linear-gradient(140deg,#23677b,#14495d);color:#fff;box-shadow:0 0 15px #4dd5f977,inset 0 0 12px #4ee1ff33;animation:mobility-ready 1.5s ease-in-out infinite}
#interface .combat-dock .skill-hud.rushing,#interface .combat-dock .dodge-hud.rolling{border:2px solid #ffde91!important;background:linear-gradient(140deg,#946133,#4a3223);color:#fff1cc;box-shadow:0 0 22px #ffbf5988;opacity:1}
#interface .combat-dock .skill-hud:disabled:not(.rushing),#interface .combat-dock .dodge-hud:disabled:not(.rolling){filter:none;color:#bcced4;border-color:#607984!important}
#interface .combat-dock .skill-hud.ready:hover,#interface .combat-dock .dodge-hud.ready:hover{background:#2e7b8c}
@keyframes mobility-ready{50%{box-shadow:0 0 23px #4dd5f999,inset 0 0 17px #4ee1ff44}}
@media(max-width:950px){#interface .combat-dock .skill-hud{width:140px;min-width:140px}#interface .combat-dock .dodge-hud{width:126px;min-width:126px}#interface .combat-dock #rush-state{font-size:13px}}
@media(max-width:650px){#interface .combat-dock{flex-wrap:wrap;max-width:98%;width:max-content}#interface .combat-dock .skill-hud{width:130px;min-width:130px;height:76px!important;min-height:76px}#interface .combat-dock .dodge-hud{width:118px;min-width:118px;height:76px!important;min-height:76px}#interface .combat-dock .skill-hud small,#interface .combat-dock .dodge-hud small{display:none}}
@media(prefers-reduced-motion:reduce){#interface .combat-dock .skill-hud.ready,#interface .combat-dock .dodge-hud.ready{animation:none}}
#interface .combat-dock .food-belt button>img{height:48px;width:56px;flex-shrink:0}#interface .combat-dock .food-belt button>span{width:100%;flex-wrap:wrap;gap:1px 6px;line-height:17px}#interface .combat-dock .food-belt button small{font-size:10px;line-height:12px;margin-top:1px}#interface .combat-dock .food-belt button kbd{padding:1px 4px}

/* v52: clean cutout edges and a compact, unstretched conversation card. */
#interface .panel,#interface .gear-panel,#interface .journal-panel,#interface .shop-panel,#interface .village-welcome{
 border-image:none!important;border:2px solid #c6a469!important;border-radius:22px!important;
 background:linear-gradient(145deg,#fff6df,#efdfb9)!important;background-clip:padding-box!important;
 padding:24px!important;box-shadow:0 12px 35px #081e2b66,inset 0 0 0 4px #ffffff50!important;
}
#interface .equipped-card,#interface .collection-item,#interface .shop-products article{
 border-image:none!important;border:1px solid #cfb47d!important;border-radius:14px!important;
 background:linear-gradient(#fff9e8,#eddfbb)!important;background-clip:padding-box!important;padding:14px!important;
}
#interface .story-box,#interface .rescue-caption{
 border-image:none!important;border:2px solid #ddbf78!important;border-radius:22px!important;
 background:linear-gradient(135deg,#204856f5,#122d3ff5)!important;background-clip:padding-box!important;
 box-shadow:0 10px 28px #07182477,inset 0 0 0 4px #ffffff08!important;color:#fff6dd!important;
}
#interface .story-box .speaker,#interface .rescue-caption small{color:#f7d487!important;letter-spacing:.06em}
#interface .story-box .story-text,#interface .rescue-caption p{color:#fff6e7!important;line-height:1.55}
#interface .story-step{color:#b9d6dd!important;letter-spacing:.1em}
#interface .dialogue-portrait,#interface .cinema-portrait{object-fit:contain;background:radial-gradient(circle at 50% 38%,#82a8b8,#234756);border:2px solid #c9ac70;border-radius:18px;box-sizing:border-box}
#interface .rescue-caption .cinema-portrait{width:112px;height:112px;margin-right:22px}
#interface .rescue-caption:has(.cinema-portrait){padding:18px 24px!important;min-height:150px}
#interface .toast,#interface .context-prompt,#interface .memory-notice{
 border-image:none!important;border:1px solid #d4b87a!important;border-radius:12px!important;
 background:#173c4eed!important;background-clip:padding-box!important;padding:10px 16px!important;
}
#interface button{background-clip:padding-box}
@media(max-width:850px){
 #interface .panel,#interface .gear-panel,#interface .journal-panel,#interface .shop-panel{padding:16px!important;border-radius:16px!important}
 #interface .rescue-caption .cinema-portrait{width:76px;height:76px;margin-right:14px}
 #interface .rescue-caption:has(.cinema-portrait){min-height:108px;padding:12px 16px!important}
}

.spirit-hud{position:absolute;right:3%;top:28%;padding:7px 12px;border:1px solid #c9d68e;border-radius:14px;background:#163a35e8;color:#efffcf;font-size:14px;pointer-events:none}.summoner-target span{transform:translateY(24px)}

/* A separate, compact testing shelf, below the main journey controls. */
.stage-test-panel{position:absolute;z-index:12;left:4%;right:4%;bottom:32px;display:flex;align-items:center;gap:16px;padding:15px 20px;border:2px solid #d6b671;border-radius:17px;background:linear-gradient(135deg,#172d30f2,#102328f2);box-shadow:0 5px 18px #00181d99,inset 0 0 0 3px #304549;color:#fff4d5;pointer-events:auto}
.stage-test-label{flex:0 0 158px}.stage-test-label b{display:block;font-size:18px}.stage-test-label small{display:block;font-size:13px;color:#c9d9d5;margin-top:4px}
.stage-test-panel label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#d8e5df;min-width:0;flex:1}.stage-test-panel label:first-of-type{flex:1.7}
.stage-test-panel select{width:100%;min-height:44px;padding:8px 30px 8px 12px;background:#f5e7c9;color:#203a38;border:1px solid #bfa364;border-radius:8px;font-family:inherit;font-weight:700;font-size:15px;line-height:1.4;cursor:pointer}.stage-test-panel select:focus-visible{outline:3px solid #87e7df;outline-offset:3px}
#interface .stage-test-panel .gold-button{min-width:150px;width:auto;min-height:60px;font-size:17px;margin:0;padding:10px 18px;align-self:flex-end;white-space:nowrap}
.practice-badge{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:60;padding:6px 14px;border:1px solid #e9c981;border-radius:16px;color:#ffe6a4;background:#162e32ed;font-size:13px;pointer-events:none}
@media(max-width:1100px){.stage-test-panel{left:3%;right:3%;bottom:22px;padding:10px 12px;gap:10px}.stage-test-label{flex-basis:133px}.stage-test-label b{font-size:16px}.stage-test-label small{font-size:12px}.stage-test-panel select{font-size:14px;min-height:40px}#interface .stage-test-panel .gold-button{min-width:115px;min-height:54px;font-size:15px;padding:8px 12px}}
@media(max-width:750px){.stage-test-panel{bottom:16px;gap:6px;padding:8px}.stage-test-label{flex-basis:100px}.stage-test-label b{font-size:14px}.stage-test-label small{font-size:11px}.stage-test-panel label{font-size:11px;gap:3px}.stage-test-panel select{padding:4px;min-height:34px;font-size:12px}#interface .stage-test-panel .gold-button{min-width:90px;min-height:43px;font-size:13px;padding:5px}}

/* Keep compact HUD panels inside the frame and clear of the centered chapter label. */
@media(max-width:750px){
 #interface .chapter-hud{left:34%;width:32%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #interface .run-hud{left:35%;width:30%;box-sizing:border-box}
 #interface .combat-dock{max-width:96%;box-sizing:border-box;gap:4px;bottom:6px}
 #interface .combat-dock .ultimate-hud{min-width:0;flex:1 1 135px}
 #interface .combat-dock .skill-hud,#interface .combat-dock .dodge-hud{min-width:0;flex:1 1 100px}
 #interface .combat-dock .food-belt{min-width:0}
}
@media(max-height:600px) and (max-width:750px){
 #interface .combat-dock{bottom:4px;padding:4px}
 #interface .combat-dock .ultimate-hud,#interface .combat-dock .skill-hud,#interface .combat-dock .dodge-hud{height:62px!important;min-height:62px}
 #interface .combat-dock .food-belt button{min-height:62px;height:62px}
}

#interface .homecoming-menu .title-secondary{flex-direction:row;align-items:center;gap:8px 12px}
/* Remaining breath: full is safe, empty is drowning. */
.breath-hud{position:absolute;z-index:9;top:16.5%;left:50%;transform:translateX(-50%);width:clamp(230px,24vw,345px);padding:10px 14px;border:1px solid #a5f7e999;border-radius:12px;background:#072c39eb;box-shadow:0 4px 20px #03192480;color:#e8fff9;pointer-events:none}
.breath-hud>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:15px}.breath-hud strong{font-variant-numeric:tabular-nums;font-size:19px}.breath-track{height:10px;background:#01141ecc;border:1px solid #7cddd266;border-radius:6px;overflow:hidden;margin:5px 0}.breath-track i{display:block;height:100%;background:linear-gradient(90deg,#5fe1d1,#ffd073);width:0;transition:width .08s linear}.breath-hud small{display:block;font-size:12px;line-height:1.45;text-align:center;color:#c5e9e7}.breath-hud.danger{border-color:#ff8d7b;background:#471c25ed}.breath-hud.danger .breath-track i{background:#ff796c}.breath-hud.surfaced{border-color:#b9ffb6}.breath-hud.surfaced b{color:#c8ffc0}
@media(max-width:900px){.breath-hud{top:17%;width:240px;padding:6px 10px}.breath-hud small{font-size:10px}.breath-hud>div:first-child{font-size:12px}.breath-hud strong{font-size:15px}}

#game-shell.underwater-stage #interface .run-hud{left:auto;right:3%;top:25%;bottom:auto;width:220px;transform:none;text-align:right}.breath-hud[hidden]{display:none}
#game-shell.underwater-stage .spirit-hud{top:33%}
#game-shell.underwater-stage .breath-hud{top:calc(3% + 68px);left:50%;right:auto;transform:translateX(-50%);width:clamp(220px,28%,350px);box-sizing:border-box}
#game-shell.underwater-stage #interface .objective-hud{display:none}
.breath-hud.warning .breath-track i{background:#ffd073}
.breath-hud.danger .breath-track i{background:#ff796c}
@media(max-width:900px){#game-shell.underwater-stage .breath-hud{top:calc(3% + 57px);width:30%;min-width:200px;padding:6px 10px}}
@media(max-width:650px){#game-shell.underwater-stage .breath-hud{top:calc(3% + 48px);width:32%;min-width:165px;padding:5px 8px}.breath-hud small{font-size:10px}.breath-track{height:8px;margin:3px 0}}
@media(min-width:900px){
 #game-shell.underwater-stage #interface .combat-dock{left:2.5%;right:auto;bottom:2%;transform:none;display:grid;grid-template-columns:1fr 1fr;width:265px;max-width:265px;gap:5px;padding:7px}
 #game-shell.underwater-stage #interface .combat-dock .ultimate-hud{grid-column:1/-1;width:100%;min-width:0;height:65px!important;min-height:65px}
 #game-shell.underwater-stage #interface .combat-dock .ultimate-hud strong{font-size:17px}
 #game-shell.underwater-stage #interface .combat-dock .food-belt{grid-column:1/-1;display:flex;width:100%;gap:3px}
 #game-shell.underwater-stage #interface .combat-dock .food-belt button{flex:1;min-width:0;min-height:48px;height:48px;display:flex;flex-direction:row;padding:3px}
 #game-shell.underwater-stage #interface .combat-dock .food-belt button img{width:29px;height:36px}
 #game-shell.underwater-stage #interface .combat-dock .food-belt button small{display:none}
 #game-shell.underwater-stage #interface .combat-dock .skill-hud,#game-shell.underwater-stage #interface .combat-dock .dodge-hud{width:100%;min-width:0;height:73px!important;min-height:73px;padding:6px}
 #game-shell.underwater-stage #interface .combat-dock .skill-hud small,#game-shell.underwater-stage #interface .combat-dock .dodge-hud small{display:none}
}

/* v74: keep the enlarged foreground residents clear of the village toolbar. */
#interface .village-actions{bottom:1%;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;max-width:94%;padding-bottom:3px;scrollbar-width:thin}
#interface .village-actions>.quiet-button{flex:0 0 auto;min-width:142px!important;min-height:48px!important;font-size:13px}
#interface .village-actions>small{display:none}
@media(max-width:900px){#interface .village-actions>.quiet-button{min-width:122px!important;min-height:38px!important}}
/* The tenth journey uses mounted controls until the guarded portal. */
.horse-hud{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);display:flex;align-items:center;gap:18px;padding:15px 22px;max-width:85%;background:#231c18ed;border:1px solid #b5935f;border-radius:12px;color:#ffebbe;pointer-events:auto;font:16px 'Malgun Gothic',sans-serif;box-shadow:0 5px 25px #120b12aa}
.horse-hud[hidden]{display:none}.horse-hud b{white-space:nowrap;font-size:20px}.horse-hud button{white-space:nowrap;border:1px solid #e0bd75;border-radius:8px;padding:12px;background:#765127;color:#fff4d1;font:inherit;font-size:16px;font-weight:700;cursor:pointer}.horse-hud button:disabled{opacity:.55}.horse-riding .combat-dock{display:none!important}
@media(max-width:760px){.horse-hud{bottom:108px;gap:8px;padding:8px 12px;font-size:14px;flex-wrap:wrap;justify-content:center}.horse-hud b{font-size:15px}.horse-hud button{font-size:13px;padding:8px}.horse-hud span{max-width:220px}}

.horse-riding #context-prompt{display:none}

.lava-stage #context-prompt{display:none}
.dragon-hud{position:absolute;bottom:9%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:16px;padding:14px 20px;background:#122b3de8;border:2px solid #d9b96d;border-radius:16px;color:#fff1cc;font-size:16px;z-index:8;box-shadow:0 6px 22px #06132280}.dragon-hud[hidden]{display:none}.dragon-hud button{font:inherit;font-weight:700;color:#ffe5a6;background:#28434e;border:1px solid #ccae65;border-radius:8px;padding:10px 15px;cursor:pointer}.dragon-riding .combat-dock .ultimate-hud,.dragon-riding .combat-dock .dodge-hud,.dragon-riding .combat-dock .skill-hud{display:none}.dragon-riding .combat-dock{left:auto;right:3%;bottom:4%;transform:none}.dragon-riding .context-hint{bottom:22%}@media(max-width:750px){.dragon-hud{bottom:18%;gap:8px;padding:8px;font-size:14px}.dragon-hud span{display:none}}
#game-shell.dragon-riding #interface .combat-dock .ultimate-hud,#game-shell.dragon-riding #interface .combat-dock .dodge-hud,#game-shell.dragon-riding #interface .combat-dock .skill-hud{display:none!important}#game-shell.dragon-riding #interface .combat-dock{left:auto!important;right:3%!important;bottom:4%!important;transform:none!important;width:auto!important;min-width:0!important;display:flex!important}#game-shell.dragon-riding #context-prompt{display:none}

/* Keep the rolling-gear lane and the knight's feet visible. */
.clock-interior #interface .context-prompt{top:24%;bottom:auto;max-width:48%;font-size:13px}

/* Keep final-dungeon feet, corpses and floor warnings visible. */
#game-shell.demon-stage #interface .context-prompt{top:23%;bottom:auto;left:30%;right:30%;font-size:12px;line-height:1.45;padding:5px 9px;border-radius:8px}
@media(max-width:750px){#game-shell.demon-stage #interface .context-prompt{display:none}}

#game-shell.demon-boss #interface .context-prompt{display:none}

/* Native hardware cursors: no DOM follower or input delay. */
@media (any-pointer:fine){
 html,body,#game-shell,#game{cursor:url('./assets/knight-cursor-v96.svg') 3 2,default}
 #game-shell button,#game-shell a,#game-shell select,#game-shell summary,[role="button"]{cursor:url('./assets/knight-select-v96.svg') 3 2,pointer}
 #game-shell button:disabled{cursor:not-allowed}
 #game-shell input[type="text"],#game-shell textarea{cursor:text}
}
/* Keep the knight visible above the new castle stairways. Health stays visible. */
#game-shell.elevated-player #interface .chapter-hud,
#game-shell.elevated-player #interface .objective-hud,
#game-shell.elevated-player #interface .run-hud{visibility:hidden}
#game-shell.elevated-player #interface .context-prompt{top:auto;bottom:128px;left:30%;right:30%}
#game-shell.active-combat #interface .context-prompt{visibility:hidden}

/* v99: clear-state sandbox and readable NPC quest flow. */
.stage-test-panel{flex-wrap:wrap;gap:10px}.stage-test-panel label{min-width:120px}.stage-test-panel select{max-width:260px}
.practice-ribbon{position:absolute;z-index:90;top:6px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;white-space:nowrap;background:#153f38ed;border:1px solid #97d6bf88;border-radius:20px;padding:6px 12px;color:#edffe9;font:700 12px sans-serif;pointer-events:auto}.practice-ribbon button{background:#dbefc7;color:#24463a;border:0;border-radius:12px;padding:4px 9px;font:inherit;cursor:pointer}
@media(max-width:760px){.stage-test-panel{gap:6px}.stage-test-panel label{min-width:100px}.practice-ribbon{font-size:10px;gap:6px;max-width:96%}}

#interface .pg-overlay{background:#071e27aa}#interface .pg-panel{background:linear-gradient(140deg,#193c43,#102a34)!important;opacity:1!important;border:1px solid #cfbb7c99;box-shadow:0 18px 70px #0007}#interface .pg-home figure{background:radial-gradient(ellipse,#49625055,transparent 72%)}

#interface{z-index:2;isolation:isolate}#game{z-index:0}#interface .pg-overlay{animation:none!important;transform:translateZ(0);isolation:isolate}

#interface .pg-overlay{padding:2% 3%;height:100%;box-sizing:border-box}#interface .pg-panel{height:100%;max-height:100%;width:min(1160px,100%)}

/* Secret release controls follow the actual logo artwork at every viewport size. */
#interface .logo-wrap{display:block;position:relative;width:100%;max-width:calc(240px * 1754 / 836);margin:0 auto;line-height:0}
#interface .logo-wrap .title-logo{max-height:none;width:100%;height:auto;user-select:none;-webkit-user-drag:none}
#interface button.logo-pommel{position:absolute;left:22%;top:3%;width:10%;height:19%;min-width:0!important;min-height:0!important;margin:0;padding:0!important;border:0;background:transparent;box-shadow:none;border-radius:50%;touch-action:manipulation;user-select:none;-webkit-tap-highlight-color:transparent}
#interface button.logo-pommel:focus-visible{outline:2px solid #ffeab0;outline-offset:3px}
#interface .test-hide{display:block;margin:6px 0 0;padding:4px 8px;min-height:30px;min-width:0;background:#244650;color:#fce8bd;border:1px solid #7b907c;border-radius:6px;font-size:12px}
@media(max-width:1100px){#interface .logo-wrap{max-width:calc(190px * 1754 / 836)}}
@media(max-width:750px){#interface .logo-wrap{max-width:calc(145px * 1754 / 836)}}

/* Keep exit visible beside the play controls, including touch viewports. */
#interface .tools .exit-open{width:auto;min-width:64px;min-height:40px;padding:0 12px;font-size:14px;font-weight:700;white-space:nowrap;flex-shrink:0}

#interface .exit-error{position:absolute;z-index:100;top:20%;left:50%;transform:translateX(-50%);width:min(440px,88%);padding:14px 18px;border:1px solid #efd29b;border-radius:12px;background:#342d28;color:#fff2d5;font-size:16px;line-height:1.5;text-align:center;pointer-events:auto}

.pg-overlay{z-index:100!important;background:#091720dc!important;padding:3vh 3vw;pointer-events:auto;display:flex;align-items:center;justify-content:center}
#interface .pg-panel{width:min(1160px,96vw);height:100%;max-height:100%;background:linear-gradient(145deg,#183340,#101f2c);border:2px solid #bda473;border-radius:16px;color:#f9eed6;box-shadow:0 24px 80px #000b;display:flex;flex-direction:column;overflow:hidden;font-family:system-ui,'Malgun Gothic',sans-serif;text-align:left;box-sizing:border-box}
.pg-header{display:flex;gap:20px;align-items:center;padding:19px 25px;border-bottom:1px solid #51606a}.pg-header>div{flex:1}.pg-header h2{font-size:25px!important;line-height:1.3;margin:4px 0!important}.pg-header .eyebrow{font-size:12px;color:#e1c38b}.pg-header .coin-chip{font-size:15px;white-space:nowrap}
#interface .pg-panel button{cursor:inherit;min-height:42px;font-size:14px;line-height:1.35;white-space:normal;box-sizing:border-box}.pg-panel button:focus-visible{outline:3px solid #82e6f5;outline-offset:3px}.pg-panel button:disabled{cursor:default;opacity:.45}
.pg-tabs{display:flex;padding:0 24px;gap:6px;border-bottom:1px solid #52616a;background:#102531}.pg-tabs button{flex:1;padding:13px 8px;border:0;border-bottom:3px solid transparent;background:transparent;color:#b9cbd1;font-weight:700}.pg-tabs button.selected{color:#ffe5a5;border-bottom-color:#e6ba69;background:#29404a}
.pg-difficulties{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;padding:14px 24px 0}.pg-difficulties button{background:#182630;color:#c5d8df;border:1px solid #536773;border-radius:7px;padding:8px 3px}.pg-difficulties button.selected{border-color:#f1ca7c;background:#405253;color:#fff1cc}.pg-difficulties small{display:block;font-size:12px;margin-top:3px}
.pg-content{flex:1;min-height:0;overflow:auto;padding:20px 24px;overscroll-behavior:contain}.pg-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:19px}.pg-panel h3{font-size:21px!important;line-height:1.35;margin:0 0 8px!important}.pg-panel h4{font-size:17px!important;line-height:1.4;margin:0 0 6px!important}.pg-panel p{font-size:15px;line-height:1.65;margin:6px 0;color:#cdd9dc}.pg-pill{background:#294451;border:1px solid #607481;border-radius:20px;white-space:nowrap;padding:8px 12px;font-size:14px;color:#f6d99c}
.pg-stages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pg-stage{display:flex;gap:13px;align-items:center;padding:15px 13px;background:#213b47;border:1px solid #49616d;border-radius:9px}.pg-stage>div{flex:1;min-width:0}.pg-stage-number{font-size:28px;font-weight:800;letter-spacing:-1px;color:#e7c282}.pg-stage p{margin:0;font-size:14px}.pg-stage small{display:block;font-size:12px;color:#acc0c8;margin-top:4px}.pg-stage .gold-button{min-width:64px!important;padding:8px 13px!important}.pg-request-tag{display:inline-block;font-size:12px;color:#a3efda;margin-top:6px}
.pg-quests{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.pg-quest{background:#203843;border:1px solid #49626c;border-radius:11px;padding:17px;display:flex;flex-direction:column}.pg-quest.highlighted{border-color:#ebc989}.pg-quest.claimed{background:#233f3e}.pg-quest-person{display:flex;align-items:center;gap:11px;margin-bottom:12px;font-weight:700}.pg-quest-person img{width:55px;height:55px;border-radius:10px;object-fit:contain;background:#405964;border:1px solid #76837d}.pg-quest-person small{display:block;color:#bacece;font-size:12px;font-weight:400;margin-top:4px}.pg-quest p{flex:1}.pg-quest ul,.pg-armor ul{padding:0;list-style:none;font-size:14px;line-height:1.8;color:#b9cdd3}.pg-quest li.done{color:#a3ead0}.pg-quest footer{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #49626c;padding-top:13px}.pg-quest footer b{font-size:14px;color:#efd298}.pg-complete{color:#a4e3c5!important;font-size:15px}
.pg-home{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center}.pg-home figure{margin:0;text-align:center}.pg-home figure img{width:100%;max-height:430px;object-fit:contain}.pg-home figcaption{font-size:14px;color:#d6bb86}.pg-home dl{margin:22px 0}.pg-home dl>div{display:flex;justify-content:space-between;padding:10px;border-bottom:1px solid #4b6269;font-size:16px}.pg-home dd{margin:0;color:#f4d393;font-weight:700}
.pg-armors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.pg-armor{border:1px solid #53616a;border-top:3px solid var(--armor-color);border-radius:12px;padding:13px;text-align:center;background:radial-gradient(ellipse at 50% 15%,#46606a,#172c36 70%)}.pg-armor.earned{border-color:var(--armor-color)}.pg-armor>img{height:190px;max-width:100%;object-fit:contain;display:block;margin:0 auto 8px;filter:saturate(.8)}.pg-armor.earned>img{filter:none}.pg-armor>small{color:var(--armor-color);font-size:13px}.pg-armor ul{text-align:left;margin:10px auto;width:max-content}.pg-armor button{width:100%}.pg-note{font-size:13px!important;color:#a8bbc3!important;margin:16px 0!important}.pg-feedback{padding:12px 24px;background:#10222e;border-top:1px solid #4d606c;margin:0!important;color:#e5cc98!important;font-size:14px!important;min-height:22px}
#interface .pg-welcome{max-width:650px!important;padding:16px 23px!important}#interface .pg-welcome h2{font-size:27px!important}#interface .pg-village-actions{gap:8px;max-width:1000px;flex-wrap:wrap}#interface .pg-village-actions button{font-size:15px;min-height:47px}.pg-return{position:absolute;top:auto;bottom:138px;right:18px;z-index:70;pointer-events:auto}
@media(max-width:800px){.pg-header{padding:12px 14px;gap:8px}.pg-header h2{font-size:19px!important}.pg-header .coin-chip{display:none}.pg-tabs{padding:0 8px;gap:0}.pg-tabs button{font-size:13px!important;padding:10px 4px}.pg-difficulties{padding:10px 12px 0;grid-template-columns:repeat(3,1fr)}.pg-content{padding:14px 12px}.pg-section-heading{display:block}.pg-section-heading .pg-pill{display:inline-block;margin-top:8px}.pg-stages,.pg-quests{grid-template-columns:1fr}.pg-home{grid-template-columns:1fr;gap:15px}.pg-home figure img{max-height:260px}.pg-armors{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.pg-armor>img{height:145px}.pg-panel h4{font-size:15px!important}.pg-feedback{padding:8px 12px}.pg-header .eyebrow{display:none}}
@media(max-height:600px){.pg-header{padding:10px 18px}.pg-difficulties{padding-top:8px}.pg-difficulties button{padding:4px}.pg-header .eyebrow{display:none}.pg-armor>img{height:155px}.pg-content{padding-top:12px}.pg-welcome{top:5%!important}.pg-village-actions{bottom:2%!important}}

.collection-nav{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}.collection-nav button{border:1px solid #627480;border-radius:8px;padding:9px 20px;background:#183341;color:#dbe6e7}.collection-nav button.selected{background:#e7c98b;color:#162e3a;border-color:#f7dda4;font-weight:800}.collection-nav small{font-size:13px;opacity:.8}.material-purse{display:flex;flex-wrap:wrap;gap:8px;padding:12px;background:#0d202dcc;border:1px solid #415b68;border-radius:10px;margin-bottom:20px}.material-purse>span{font-size:14px;color:#d5e2e4;display:flex;gap:6px;align-items:center;padding:4px 7px}.material-purse b{color:#fff3c7}.material-purse i{width:8px;height:8px;background:var(--material);display:inline-block;transform:rotate(45deg)}.material-purse .bond-token{margin-left:auto;color:#f2cb8f}.companion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.companion-card{border:1px solid #4c6573;border-top:3px solid var(--companion);border-radius:14px;background:linear-gradient(145deg,#263f4e,#142a36);padding:17px;display:flex;flex-direction:column;align-items:stretch}.companion-card.chosen{box-shadow:inset 0 0 0 2px var(--companion)}.companion-art{height:155px;display:flex;justify-content:center;align-items:center;background:radial-gradient(ellipse,#89c6dc25,transparent 68%);margin-bottom:12px}.companion-icon{width:100%;height:100%;object-fit:contain}.companion-placeholder{font-size:64px;color:var(--companion,#e6c582)}.companion-card>small{font-size:14px;color:var(--companion)}.companion-card h4{font-size:20px!important;margin:7px 0!important}.companion-card>p{font-size:14px!important;line-height:1.6!important;min-height:4.8em;color:#beced6;margin:8px 0 14px!important}.companion-effect{font-size:15px;color:#f5e1ad;line-height:1.5}.companion-card>button{margin-top:auto}.companion-training{border-top:1px solid #486271;margin-top:15px;padding-top:12px;display:grid;gap:8px;font-size:14px;color:#d7c9a9}.companion-training button{font-size:13px!important}.collection-contracts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.collection-contract{border:1px solid #4b6878;background:#173440;border-radius:13px;padding:19px}.collection-contract.claimed{opacity:.7}.collection-contract.highlighted,.pg-stage.highlighted{border:2px solid #e7c98b!important;box-shadow:0 0 0 2px #d7b76b22}.contract-top{display:flex;align-items:center;gap:15px}.contract-top>.companion-icon{width:80px;height:86px}.contract-top small{font-size:14px;color:#b4cbd0}.contract-top h4{font-size:19px!important;margin:6px 0!important}.contract-top b{font-size:15px;color:#eed494}.collection-contract>p{font-size:15px!important;line-height:1.65!important;color:#c4d3d8;min-height:4.95em}.contract-progress{list-style:none!important;padding:0!important;margin:14px 0!important}.contract-progress li{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:8px 0;font-size:14px}.contract-progress b{white-space:nowrap;color:#f4d387}.collection-meter{display:block;grid-column:1/-1;background:#071922;height:5px;border-radius:5px;overflow:hidden}.collection-meter i{display:block;height:100%;background:#91c8ae}.recipe{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}.recipe>strong{width:100%;font-size:14px;color:#d4e0e3;margin-bottom:3px}.recipe>span{background:#321f2dcc;color:#f2bab3;border:1px solid #754c50;border-radius:5px;padding:5px 7px;font-size:13px}.recipe>span.enough{background:#203c39;color:#bde2c5;border-color:#53736a}.collection-contract footer{display:grid;gap:9px;border-top:1px solid #3e5b68;padding-top:13px}.collection-contract footer small{font-size:13px;color:#b7c9ce}.collection-stage-loot{display:block;font-size:13px;line-height:1.5;margin-top:4px}.collection-delivery{font-size:14px!important;color:#efd4a0!important}.collection-filter-note{font-size:14px!important;color:#e8c891!important}.material-regions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.material-regions article{padding:18px;border:1px solid #52717d;border-top:3px solid var(--material);border-radius:12px;background:#1e3945}.material-regions small{font-size:13px;color:#a9c0c9}.material-regions h4{color:var(--material);font-size:19px!important;margin:9px 0!important}.material-regions strong{font-size:17px}.material-regions p{font-size:14px!important;line-height:1.6!important;min-height:3.2em}.collection-rules{margin-top:22px;padding:20px;border-radius:12px;background:#0c2431}.collection-rules h4{font-size:18px!important}.collection-rules p{font-size:15px!important;line-height:1.65!important;margin:10px 0!important}.clear-material{color:#cbeab8!important;font-size:14px!important;line-height:1.65}.spirit-hud.companion-status{max-width:300px;text-align:right;line-height:1.6;font-size:13px;padding:7px 11px;pointer-events:none}.companion-status small{display:block;font-size:12px;color:#d2e2e5}.pg-tabs{flex-wrap:wrap}.pg-tabs button{min-width:90px}.pg-village-actions button{min-width:105px!important}@media(max-width:850px){.companion-grid,.material-regions{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-contracts{grid-template-columns:1fr}.collection-nav button{padding:8px 12px}.companion-card{padding:12px}.material-purse>span{font-size:13px}.companion-art{height:135px}.pg-tabs button{min-width:70px;font-size:12px!important}.spirit-hud.companion-status{font-size:11px;max-width:220px}}@media(max-width:500px){.companion-grid,.material-regions{grid-template-columns:1fr}.companion-art{height:155px}.material-purse .bond-token{margin-left:0}}

/* One shared palette, surface and control treatment across the game. */
#game-shell{--ui-deep:#102e38;--ui-panel:#193e48;--ui-line:#597878;--ui-gold:#f3cb5f;--ui-ink:#fff4d8;--ui-muted:#bfd2d1}
#interface{font-family:system-ui,"Malgun Gothic",sans-serif;font-size:16px;color:var(--ui-ink)}
#interface button{font-family:inherit;line-height:1.35;letter-spacing:0;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
#interface button:focus-visible,#interface select:focus-visible{outline:3px solid #fff0ab;outline-offset:3px}
#interface :is(.gold-button,.quiet-button,.shop-tool,.iconbtn){border-image:none!important;background-clip:padding-box!important;min-height:44px;border:1px solid #79918a!important;border-radius:11px!important;padding:10px 17px!important;font-size:16px!important;font-weight:750;box-shadow:0 3px 0 #06192066!important;text-shadow:none!important;transform:none;animation:none;min-width:0;white-space:normal}
#interface :is(.gold-button,.quiet-button,.shop-tool,.iconbtn)::before,#interface :is(.gold-button,.quiet-button,.shop-tool,.iconbtn)::after{display:none!important}
#interface .gold-button{background:linear-gradient(#ffdf82,#e9bb46)!important;color:#352715!important;border-color:#f4d681!important}
#interface :is(.quiet-button,.shop-tool,.iconbtn){background:linear-gradient(#28505b,#183c48)!important;color:#fff4da!important}
#interface :is(.gold-button,.quiet-button,.shop-tool,.iconbtn):hover:not(:disabled){filter:brightness(1.1);border-color:#fff0b8!important;box-shadow:0 3px 0 #06192066,0 0 0 2px #ffe19930!important}
#interface button:disabled{opacity:.52;cursor:default;filter:none}
#interface .diamond{display:none}
#interface .iconbtn{width:44px;height:44px;padding:9px!important;display:grid;place-items:center;flex:0 0 44px}
#interface .iconbtn svg{width:24px;height:24px;stroke:#ffda6c;stroke-width:2.7;filter:drop-shadow(0 2px 0 #4d331b)}
#interface .gear-open{font-size:14px!important;padding:5px!important}
#interface .tools{top:3%;right:2.6%;gap:7px;align-items:center;max-width:36%;flex-wrap:wrap;justify-content:flex-end}
#interface .tools .shop-tool{font-size:14px!important;padding:9px 11px!important;min-height:44px}
#interface :is(.panel,.gear-panel,.journal-panel,.shop-panel,.pg-panel){border-image:none!important;border:1px solid #78918a!important;border-radius:18px!important;background:linear-gradient(145deg,#214750,#102d38)!important;color:#fff3d9!important;box-shadow:0 18px 55px #03101599,inset 0 1px #ffffff16!important}
#interface :is(.panel,.gear-panel,.journal-panel,.shop-panel) h2{color:#ffe19b}
#interface :is(.panel,.gear-panel,.journal-panel,.shop-panel)>p,#interface .shop-greeting p{color:#d7e5df}
#interface :is(.equipped-card,.collection-item,.shop-products article){border:1px solid #9c946f!important;background:#f7efd9!important;color:#2d4548!important;border-radius:12px!important;box-shadow:none!important}
#interface :is(.equipped-card,.collection-item,.shop-products article) h3,#interface :is(.equipped-card,.collection-item,.shop-products article) h4{color:#29444a!important}
#interface :is(.story-box,.rescue-caption,.conversation-card){border:1px solid #c6ad70!important;border-image:none!important;background:linear-gradient(140deg,#244a54,#153441)!important;color:#fff4de!important;border-radius:18px!important;box-shadow:0 12px 35px #051a2366!important}
#interface :is(.story-box,.rescue-caption,.conversation-card) p{color:#fff4de!important}
#interface .conversation-card .quiet-button{margin-left:8px}
#interface .dialogue-portrait,#interface .cinema-portrait,#interface .conversation-faces img{border-radius:14px!important;border-width:1px!important}
#interface .story-text{line-height:1.65!important}
#interface .world-speech{box-shadow:0 4px 14px #08202a44;border-radius:13px;border-width:1px}
#interface .eyebrow{color:#e8c976;letter-spacing:.09em;font-size:13px}
/* Compact combat information; the world remains the focus. */
#interface .player-hud{left:2.6%;top:3%;width:28%;max-width:340px;padding:13px 16px 12px 78px!important;border-image:none!important;border:1px solid #77938e!important;border-radius:15px!important;background:#123540ed!important;box-shadow:0 5px 18px #051a2244!important;min-height:0}
#interface .hero-portrait{width:61px;height:61px;left:9px;top:10px;border:1px solid #e1c476;border-radius:50%;background:#26525b}
#interface .hud-name{font-size:14px;line-height:1.4;letter-spacing:0;margin-bottom:7px}
#interface .hp-track{height:10px;border-radius:6px;overflow:hidden;border:1px solid #c77e70}
#interface .stamina-track{height:6px;margin-top:5px;border-radius:4px;overflow:hidden}
#interface .shield-hud,#interface .cloak-hud{min-height:27px;gap:5px;margin:5px 0 0;padding:0;border:0;background:none}
#interface .shield-hud img,#interface .cloak-hud img{width:25px;height:25px;flex:0 0 25px}
#interface .shield-hud b,#interface .cloak-hud b{font-size:14px;white-space:nowrap}
#interface .shield-hud small,#interface .cloak-hud small,#interface .shield-pips,#interface .relics{display:none}
#interface .chapter-hud{left:34%;top:3.5%;width:30%;padding:0!important;border:0!important;border-image:none!important;border-radius:0!important;background:none!important;color:#fff5dc;font-size:18px;font-weight:750;line-height:1.5;text-align:center;box-shadow:none!important;text-shadow:0 2px 5px #071b24}
#interface .chapter-hud small{font-size:13px;letter-spacing:.04em;line-height:1.4;margin:0 0 4px;color:#dfcf9f}
#interface .run-hud{top:12.5%;left:35%;width:28%;padding:5px 8px;border:0;background:#102c38bb;font-size:14px;border-radius:8px;text-align:center}
#interface .run-hud small{font-size:12px;color:#bfd5d1}
#interface .lives-hud{left:3%;top:calc(3% + 170px);background:#123540e8;border:1px solid #698982;border-radius:9px;padding:5px 10px;gap:9px;font-size:14px}
#interface .lives-hud span{font-size:22px;letter-spacing:3px}
#interface .currency-hud{right:2.6%;top:calc(3% + 58px);min-width:116px;padding:7px 11px;background:#123540eb;border:1px solid #6c8880;border-radius:11px;box-shadow:none;gap:7px}
#interface .coin-purse{width:41px;height:41px}
#interface .currency-hud small{font-size:12px;color:#cbd8cd}
#interface .currency-hud b{font-size:21px;color:#ffe296}
#interface .spirit-hud{right:2.6%;top:calc(3% + 126px);font-size:13px;padding:5px 9px;background:#183e43de;border:1px solid #567e72;border-radius:8px}
#interface .objective-hud,#interface .key-strip{display:none!important}
#interface .context-prompt{max-width:52%;left:50%;right:auto;transform:translateX(-50%);top:auto;bottom:17%;border:1px solid #c9b176;background:#193e49f2;color:#fff3d3;padding:9px 15px;font-size:15px;border-radius:10px;line-height:1.4}
#interface .combat-dock{bottom:1.8%;gap:7px;padding:7px;border:1px solid #577d81;border-radius:15px;background:#0d2b38ed;box-shadow:0 5px 20px #05192360;max-width:94%}
#interface .combat-dock :is(.skill-hud,.dodge-hud,.ultimate-hud){border:1px solid #557b83!important;border-image:none!important;border-radius:10px!important;background:#214853!important;box-shadow:none!important;animation:none!important;height:79px!important;min-height:79px;padding:7px 10px!important;gap:4px}
#interface .combat-dock :is(.skill-hud,.dodge-hud,.ultimate-hud).ready{border-color:#e0be64!important;background:#28545b!important;box-shadow:inset 0 0 0 1px #e0be6429!important;animation:none!important}
#interface .combat-dock strong,#interface .combat-dock b{font-size:14px!important;color:#fff0c3}
#interface .combat-dock :is(.ultimate-hud,.skill-hud,.dodge-hud) small{font-size:12px;color:#c2d7d6}
#interface .combat-dock .food-belt{gap:5px}
#interface .combat-dock .food-belt button{height:79px;min-height:79px;padding:5px;border:1px solid #64868b;border-radius:10px;background:#1f414d}
#interface .combat-dock .food-belt button>img{height:37px;width:42px}
#interface .combat-dock .food-belt button small{font-size:11px}
/* Keep the boss panel content-sized; pinning top and bottom stretches it over combat. */
#interface .boss-hud:not(.journey-hud){bottom:auto;height:auto;min-height:0;left:30%;width:40%;padding:8px 12px;border-image:none;background:#102b38dc;border:1px solid #846951;border-radius:10px}
#interface .boss-hud .boss-name{font-size:17px;font-weight:750;margin:0 0 7px;color:#fff0d0}
#interface .boss-status{font-size:13px;margin-top:5px;line-height:1.4}
#interface .journey-hud{display:none}
/* Town, menus and dialogue have their own information density. */
#game-shell:not([data-view="fight"]):not([data-view="paused"]) .combat-dock{display:none!important}
#game-shell[data-view="postgame"] .combat-dock,#game-shell[data-view="conversation"] .combat-dock{display:none!important}
#game-shell[data-view="village"] .food-belt,#game-shell[data-view="village"] .spirit-hud{display:none!important}
#interface .village-welcome{left:2.6%;top:3%;padding:15px 20px!important;max-width:420px;border:1px solid #69897e!important;border-radius:15px!important;background:#153a45ed!important;color:#fff1d0!important;box-shadow:none!important}
#interface .village-welcome h2{font-size:26px;color:#ffe19a;margin:4px 0 8px}
#interface .village-welcome p{color:#d7e4dc;font-size:15px;line-height:1.5}
#interface .village-welcome .quest-note{font-size:13px;margin-bottom:0}
#interface .village-actions{left:2.6%;right:2.6%;bottom:2%;max-width:none;gap:7px;padding:9px;align-items:center;border:1px solid #63817a;background:#102e38ec;border-radius:13px;overflow-x:auto;scrollbar-width:thin}
#interface .village-actions>button{min-width:max-content!important;min-height:43px!important;font-size:14px!important;padding:9px 13px!important;flex:0 0 auto}
#interface .pg-overlay{padding:2% 3%;background:#0619238a;animation:none!important}
#interface .pg-panel{padding:20px!important;gap:12px;border:1px solid #87957d!important;background:linear-gradient(140deg,#20464f,#122e39)!important;overflow:hidden;height:100%;max-height:100%}
#interface .pg-header h2{font-size:26px;color:#ffe19d;letter-spacing:-.03em;margin:2px 0}
#interface .pg-header .eyebrow{margin:0;font-size:12px}
#interface .pg-tabs{gap:6px;padding:0 0 10px;border-bottom:1px solid #56726e;flex-wrap:wrap}
#interface .pg-tabs button,#interface .pg-difficulties button{background:#173843;color:#cfdfd9;border:1px solid #55736e;border-radius:9px;padding:10px 14px;font-size:15px;min-height:42px;box-shadow:none}
#interface .pg-tabs button.selected,#interface .pg-difficulties button.selected{background:#f2cb68;color:#382c1b;border-color:#ffdfa0}
#interface .pg-difficulties{gap:7px;margin:0}
#interface .pg-difficulties button small{font-size:12px;margin-top:4px}
#interface .pg-difficulties button:disabled{background:#142f39;border-style:dashed;color:#a5b8b7;opacity:.6}
#interface .pg-content{padding:2px 5px 8px 0;scrollbar-color:#768d79 #12313b;scrollbar-width:thin}
#interface .pg-section-heading h3{font-size:23px;color:#fff0bb;margin:6px 0}
#interface .pg-section-heading p,#interface .pg-note{font-size:14px;line-height:1.6;color:#c9dbd5}
#interface :is(.pg-stage,.pg-quest,.pg-armor,.companion-card,.collection-contract){background:#244750;border:1px solid #577770;border-radius:13px;box-shadow:none;padding:16px}
#interface .pg-stage h4{font-size:18px;color:#fff1d0;margin:0 0 5px}
#interface .pg-stage p{font-size:14px;color:#c9dcd7;margin:0 0 5px}
#interface .pg-stage-number{color:#edcf7d;font-size:25px}
#interface .pg-stage small{font-size:13px;color:#bccfc8}
#interface .pg-request-tag{background:#745e28;color:#ffedb1;font-size:13px;padding:4px 7px;border-radius:6px}
#interface .pg-stage.highlighted,#interface .pg-quest.highlighted{border-color:#e7c66a;box-shadow:inset 0 0 0 1px #e7c66a44}
#interface .pg-feedback{font-size:13px;color:#e7d3a3;margin:0;min-height:19px}
#interface .practice-ribbon{top:auto;bottom:calc(2% + 72px);left:auto;right:2.6%;transform:none;z-index:21;max-width:calc(100% - 4%);font-size:12px;border:1px solid #809a7f;border-radius:9px;background:#12392af0;padding:5px 8px}
#interface .practice-ribbon button{font-size:12px;padding:4px 8px;border-radius:6px}
#interface .pg-return{bottom:18%;right:2.6%;font-size:14px!important}
#interface .clear-reward{right:2.6%;top:calc(3% + 126px);width:245px;padding:14px;background:#163b45ed;border:1px solid #80907a;border-radius:12px;box-shadow:none}
#interface .clear-reward h3{font-size:18px;margin:5px 0}
#interface .clear-reward p{font-size:13px;line-height:1.5;margin:5px 0}
#interface .stage-test-panel{border:1px solid #759184;background:#143843ef;border-radius:13px;box-shadow:none;padding:14px}
#interface .stage-test-panel select{background:#244650;color:#ffefc9;border:1px solid #7b907c;border-radius:8px;padding:10px;font-size:14px}
#interface .stage-test-panel .gold-button{min-height:44px!important;height:44px}
#interface .title-content .gold-button{min-width:210px;margin:12px 0 8px}
#interface .title-secondary{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
#interface .title-secondary button{font-size:14px!important;min-height:40px!important}
#interface .title-footer{font-size:12px}
/* Rewards stay in the visible dungeon, with a single clear return action. */
#interface .reward-card{position:absolute;left:3%;right:auto;top:4%;width:370px;max-width:46%;padding:24px;background:#143740f5;border:1px solid #d5b35f;border-radius:18px;box-shadow:0 12px 35px #041b2470;box-sizing:border-box}
#interface .reward-card h2{font-size:25px;margin:7px 0 9px;color:#ffe19b;line-height:1.35}
#interface .reward-card p{font-size:14px;line-height:1.5;color:#cfdfd6}
#interface .reward-card dl{margin:18px 0;border-top:1px solid #57716a;border-bottom:1px solid #57716a;padding:9px 0}
#interface .reward-card dl div{display:flex;justify-content:space-between;gap:16px;padding:6px 0;font-size:16px}
#interface .reward-card dd{margin:0;font-weight:800;color:#ffe291}
#interface .reward-card .gold-button{width:100%;margin:7px 0 0}
#interface .reward-card .reward-first{color:#ffde80}
#interface .reward-saved{font-size:13px!important}
#interface .story-records{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#interface .story-record{display:grid;grid-template-columns:65px 1fr;gap:12px;align-items:center;background:#234650;border:1px solid #59786e;border-radius:13px;padding:15px}
#interface .story-record>img{width:65px;height:65px;object-fit:contain;background:#30535c;border-radius:11px}
#interface .story-record h4{font-size:19px;margin:0 0 5px;color:#ffe5a1}
#interface .story-record p{font-size:14px;margin:0 0 4px;color:#deebe2}
#interface .story-record small{font-size:12px;color:#b5ccc2}
#interface .story-record button{grid-column:1/-1;justify-self:end}
#interface .story-record.locked{opacity:.55}
@media(max-width:1000px){
 #interface{font-size:14px}#interface .tools{max-width:36%;gap:4px}#interface .tools .shop-tool{min-height:36px;padding:6px 8px!important;font-size:12px!important}#interface .iconbtn{width:36px;height:36px;min-height:36px;flex-basis:36px;padding:6px!important}
 #interface .player-hud{width:28%;padding:9px 10px 8px 59px!important}#interface .hero-portrait{width:44px;height:44px;left:7px;top:8px}#interface .hud-name{font-size:12px}#interface .shield-hud b,#interface .cloak-hud b{font-size:12px}#interface .shield-hud img,#interface .cloak-hud img{width:20px;height:20px;flex-basis:20px}#interface .lives-hud{top:calc(3% + 150px);font-size:12px;padding:3px 6px}#interface .lives-hud span{font-size:17px}
 #interface .chapter-hud{font-size:15px}#interface .chapter-hud small{font-size:12px}#interface .run-hud{font-size:12px;top:14%}#interface .currency-hud{top:calc(3% + 46px);padding:5px 7px}#interface .spirit-hud{top:calc(3% + 106px);font-size:12px}
 #interface .combat-dock{gap:4px;padding:5px;bottom:1%}#interface .combat-dock :is(.skill-hud,.dodge-hud,.ultimate-hud){height:66px!important;min-height:66px;padding:5px 7px!important}#interface .combat-dock .food-belt button{height:66px;min-height:66px}#interface .combat-dock .food-belt button>img{width:33px;height:30px}#interface .combat-dock small{display:none!important}
 #interface .pg-panel{padding:13px!important;gap:8px}#interface .pg-header h2{font-size:21px}#interface .pg-tabs button{font-size:14px;padding:7px 10px;min-height:35px}#interface .pg-difficulties button{padding:7px;font-size:14px}#interface .pg-section-heading h3{font-size:20px}
 #interface .village-welcome{max-width:36%;padding:12px!important}#interface .village-welcome h2{font-size:21px}#interface .village-welcome p{font-size:13px}#interface .reward-card{padding:16px;width:330px;top:3%}#interface .reward-card h2{font-size:21px}#interface .reward-card dl{margin:10px 0}#interface .reward-card dl div{font-size:14px;padding:4px 0}
}
@media(max-width:700px){#interface .story-records{grid-template-columns:1fr}#interface .pg-stages{grid-template-columns:1fr}#interface .pg-header .eyebrow{display:none}#interface .pg-tabs{flex-wrap:nowrap;overflow-x:auto}#interface .pg-tabs button{white-space:nowrap}#interface .reward-card{max-width:55%;max-height:92%;overflow:auto}#interface .reward-card h2{font-size:18px}#interface .village-welcome p:not(.eyebrow){display:none}}
@media(prefers-reduced-motion:reduce){#interface *{animation:none!important;scroll-behavior:auto!important}}

/* Keep cinematic text free of unrelated inventory badges. */
#game-shell:is([data-view="rescue"],[data-view="intro"],[data-view="bossIntro"]) :is(.currency-hud,.spirit-hud){display:none!important}

#interface .npc-shop-target span{border:1px solid #8c9c79!important;border-image:none!important;background:#173a42ed;color:#fff0c5;border-radius:8px;padding:6px 10px;box-shadow:0 2px 0 #081e27b0;font-weight:750}

#game-shell:is([data-view="fight"],[data-view="paused"]) .practice-ribbon{bottom:calc(2% + 100px)}

/* Fresh starts explain the overwrite before the player confirms. */
#interface .difficulty-panel .new-game-reset-note{margin:12px 0;padding:12px 16px;border:1px solid #ac774e;border-radius:10px;background:#f1dec3;color:#5e3525;font-size:14px;line-height:1.65;text-align:left}
.new-game-reset-note strong{display:block;font-size:16px}

/* Native, keyboard-accessible language selection without flag/country assumptions. */
.language-control{display:flex;align-items:center;gap:5px;min-height:40px;padding:0 8px;color:#fff0c8;background:#173b49;border:1px solid #a9aa87;border-radius:9px;box-shadow:0 2px 3px #0003;font:500 14px system-ui,sans-serif}
.language-control select{appearance:auto;max-width:122px;min-height:36px;border:0;background:#173b49;color:inherit;font:inherit;cursor:pointer;padding:3px}
.language-control select:focus-visible{outline:2px solid #ffe7a7;outline-offset:2px}
.loading-progress{width:min(350px,85%);margin:10px auto 14px;text-align:center;font:500 14px system-ui,sans-serif;color:#fff1cd}
.difficulty-panel .loading-progress{color:#294652}
.loading-progress>div{height:6px;margin-top:7px;border-radius:4px;background:#182f3c50;overflow:hidden}
.loading-progress i{display:block;height:100%;background:#e3b960;border-radius:4px;transition:width .18s linear}
html:not([lang="ko"]) #interface :is(.gold-button,.quiet-button,.shop-tool){white-space:normal;line-height:1.25;overflow-wrap:anywhere}
html:not([lang="ko"]) .title-secondary{max-width:700px;margin-inline:auto;gap:6px}
html:not([lang="ko"]) #interface .pg-tabs{flex-wrap:wrap}
html:not([lang="ko"]) #interface .pg-tabs button{flex:1 1 auto}
html:not([lang="ko"]) #interface :is(.difficulty-choice,.companion-card,.pg-armor,.equipped-card){min-width:0;overflow-wrap:anywhere}
html:not([lang="ko"]) #interface .difficulty-choice strong{font-size:clamp(14px,1.6vw,19px)}
html:not([lang="ko"]) #interface .difficulty-options{align-items:stretch}
html:not([lang="ko"]) #interface .difficulty-detail{flex-wrap:wrap}
html:not([lang="ko"]) #interface .story-text{overflow-wrap:anywhere}
html:not([lang="ko"]) #interface :is(.conversation-copy>p,.world-speech,.memory-detail p,.shop-products p,.festival-ending,.story-text){word-break:normal;overflow-wrap:anywhere}
.global-guide-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.language-error{position:absolute;top:70px;right:16px;max-width:320px;padding:12px;background:#ffedc7;color:#743a26;border-radius:8px;z-index:200;font-size:14px}
@media(max-width:760px){.language-control{padding:0 4px;min-height:34px;font-size:12px}.language-control select{max-width:95px;min-height:32px}.language-control>span{display:none}#interface .tools{gap:4px;max-width:98%;flex-wrap:wrap}html:not([lang="ko"]) #interface .title-copy{font-size:clamp(16px,3vw,23px)}html:not([lang="ko"]) #interface .title-secondary .quiet-button{padding:6px 8px;font-size:12px}}

.pg-theatre{display:flex;align-items:center;gap:20px;padding:24px;margin:0 0 24px;border:1px solid #bb8b52;border-radius:16px;background:linear-gradient(90deg,#271721ef,#271721be),url('./assets/puppet-theatre-v108.webp') center 40%/cover}.pg-theatre h3{color:#f4d4a1;font-size:24px;margin:6px 0}.pg-theatre p{line-height:1.6;color:#d3bec7}.pg-theatre>div{flex:1}.pg-theatre small{color:#ddb181}.theatre-wave{color:#f3d499;font-weight:700}
.shell-overlay{background:#09070dcc;z-index:100}.shell-panel{position:relative;width:min(1050px,94vw);height:min(740px,94vh);min-height:540px;border:1px solid #ab7b48;border-radius:20px;overflow:hidden;background:#241b1b url('./assets/luca-table-v108.webp') center/cover;box-shadow:0 30px 100px #000c;color:#fff0d4}.shell-panel:before{content:'';position:absolute;inset:0;background:linear-gradient(#120d1890,transparent 45%,#170e0df5 88%);pointer-events:none}.shell-panel header{position:relative;padding:28px 36px}.shell-panel h2{font-size:38px;margin:4px 0}.shell-panel .eyebrow{color:#e1bc7c}.shell-close{position:absolute;right:28px;top:28px}.shell-rules{position:absolute;right:4%;top:120px;width:49%;padding:18px 22px;border-radius:14px;background:#170f1bd9;line-height:1.8;border:1px solid #79583c}.shell-rules p{margin:0 0 10px;font-size:14px}.shell-rules strong{color:#ffda88}.shell-table{position:absolute;left:18%;right:4%;top:47%;height:29%}.shell-cup{position:absolute;bottom:0;width:24%;height:100%;transform:translate(-50%,var(--cup-y,0px));background:none;border:0;padding:0;color:#ffe4a7;cursor:pointer;opacity:1!important}.shell-cup:disabled{cursor:default;filter:none!important}.shell-cup img{position:absolute;object-fit:contain;pointer-events:none}.shell-wood{width:100%;height:100%;inset:0;filter:drop-shadow(0 12px 9px #160a09a0);transition:transform .45s}.shell-ball{width:24%;height:26%;bottom:0;left:38%;opacity:0;transition:opacity .25s}.shell-cup.raised .shell-wood{transform:translateY(-38%)}.shell-cup:enabled:hover .shell-wood{transform:translateY(-8%);filter:drop-shadow(0 0 12px #e5c271)}.shell-cup-number{position:absolute;bottom:-24px;left:0;right:0;font:700 14px sans-serif;color:#ffe2a6}.shell-cup.chosen .shell-cup-number:after{content:' ✓'}.shell-cup.winner .shell-cup-number{color:#a9ffbd}.shell-panel footer{position:absolute;left:4%;right:4%;bottom:22px;text-align:center}.shell-status{min-height:28px;font-size:17px;font-weight:700;color:#ffe3a7}.shell-bet{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:12px}.shell-bet label{display:flex;align-items:center;gap:12px;font-size:14px}.shell-bet input{width:120px;color:#ffdfa1;background:#211925;border:1px solid #bd9761;border-radius:9px;padding:12px;font-size:17px}.shell-wager{font-size:12px;color:#d7c4ad;margin-top:16px}
@media(max-width:650px){.shell-panel{height:90vh;min-height:560px;background-position:32% center}.shell-panel header{padding:22px}.shell-panel h2{font-size:29px}.shell-close{right:15px;top:20px;padding:10px}.shell-rules{top:130px;right:5%;width:68%;padding:13px}.shell-rules p{font-size:12px}.shell-table{left:5%;right:5%;top:52%;height:23%}.shell-bet{gap:7px;flex-wrap:wrap}.shell-bet input{width:82px;padding:10px}.shell-status{font-size:14px}.shell-panel footer{bottom:16px}.pg-theatre{display:block;padding:18px}.pg-theatre h3{font-size:21px}}
#game-shell.theatre-stage #interface .boss-hud:not(.journey-hud){padding:7px 12px!important;height:auto;min-height:0;max-height:84px}#game-shell.theatre-stage #interface .boss-name{font-size:16px;margin-bottom:3px}#game-shell.theatre-stage #interface .boss-status{font-size:11px;line-height:1.3;min-height:0;margin-top:3px}#game-shell.theatre-stage #interface .boss-track{height:8px}#game-shell.theatre-stage #interface .poise-track{height:3px;margin-top:4px}

/* v126: translucent HUD surfaces keep the world visible behind readable text. */
#interface :is(.player-hud,.chapter-hud,.boss-hud,.gear-hud,.recovery-hud){background:linear-gradient(135deg,#193d49bf,#102b37b3)!important;text-shadow:0 1px 3px #07121b}
#interface .combat-dock{background:#102e3aab!important}
#interface .combat-dock :is(.ultimate-hud,.dodge-hud,.skill-hud){background:linear-gradient(140deg,#244859b8,#12313eb3)!important}
.hud{background:linear-gradient(#07101475,transparent 24%,transparent 87%,#050c1066)}

/* Mobile controls use their own layout. Desktop controls and shortcuts stay intact. */
.mobile-controls #touch-controls.active{display:block}
.mobile-controls #touch-controls .touch-button{position:absolute;transform:translate(-50%,-50%);min-width:0;padding:4px;border:1px solid #dbc894b3;border-radius:18px;background:#153845a6;background-image:none;box-shadow:0 3px 10px #07131b55;color:#fff5dc;font:700 clamp(11px,1.6vw,14px)/1.2 system-ui;text-shadow:0 1px 3px #000;overflow-wrap:anywhere;touch-action:none;-webkit-tap-highlight-color:transparent}
.mobile-controls #touch-controls .touch-button.touch-large{font-size:clamp(13px,1.9vw,17px);border-width:2px;border-radius:25px;background:#224d63b8}
.mobile-controls #touch-controls [data-control="ultimate"]{background:#652b37b8;border-color:#efb283}
.mobile-controls #touch-controls [data-control="ultimate"].ready{background:#a72b35bd;box-shadow:0 0 16px #ff623bb3}
.mobile-controls #touch-controls .touch-button.down{background:#8d7746dc;transform:translate(-50%,-50%) scale(.96)}
.mobile-controls #touch-controls :is([data-control="left"],[data-control="right"]){font-size:23px}
.mobile-controls #touch-controls .touch-button:disabled{opacity:.45;filter:saturate(.5)}
.mobile-controls #touch-controls [hidden]{display:none!important}
.touch-toolbar{position:absolute;left:50%;top:25%;transform:translateX(-50%);display:flex;gap:6px;pointer-events:auto;white-space:nowrap;z-index:3}
.touch-toolbar button{min-height:36px;padding:6px 10px;border:1px solid #aebeb677;border-radius:12px;background:#102e3bba;color:#fff1ce;font:600 12px/1.2 system-ui;touch-action:manipulation}
.touch-toolbar [aria-pressed="true"]{border-color:#b8d79a;color:#d5f5bd}
.touch-edit-note{position:absolute;left:10%;right:10%;top:calc(25% + 42px);margin:0;text-align:center;font:600 14px/1.5 system-ui;color:#fff5d8;text-shadow:0 2px 4px #000;pointer-events:none}
#game-shell.mobile-controls #interface .combat-dock,#game-shell.mobile-controls #interface>.food-belt{display:none!important}
#game-shell.mobile-controls #interface .key-strip{display:none}
#game-shell.mobile-controls #interface .boss-hud{top:3%;bottom:auto!important;left:36%;width:30%;min-height:0!important;height:auto!important;padding:6px 10px!important}
#game-shell.mobile-controls #interface .boss-status{font-size:10px;line-height:1.25;min-height:0;margin:3px 0}
#game-shell.mobile-controls #interface .boss-name{font-size:12px;margin:0 0 3px}
#game-shell.mobile-controls #interface .chapter-hud{display:none}
#game-shell.mobile-controls #interface .dragon-hud,#game-shell.mobile-controls #interface .horse-hud{display:none!important}
#game-shell.touch-editing #interface *{pointer-events:none!important}
#game-shell.touch-editing #interface .overlay{display:none!important}
#game-shell.touch-editing #touch-controls{background:#071b252b}
#game-shell.touch-editing #touch-controls .touch-button{outline:2px dashed #ffe2a6;outline-offset:2px;cursor:grab;opacity:1}
@media(max-width:600px) and (orientation:portrait){
 .mobile-controls .touch-toolbar{top:auto;bottom:270px}
 .mobile-controls .touch-edit-note{top:8%;padding:8px;background:#173440b3;border-radius:10px}
 #game-shell.mobile-controls #interface .boss-hud{left:50%;width:45%;top:12%}
 .mobile-controls #touch-controls .touch-button{font-size:12px}
 .mobile-controls #touch-controls .touch-button.touch-large{font-size:15px}
}

/* Fullscreen keeps the original canvas aspect ratio; controls respect display cutouts. */
#game-shell.mobile-controls:fullscreen{width:100vw;height:100dvh;max-height:none;aspect-ratio:auto;box-shadow:none;background:#08121b}
#game-shell.mobile-controls:-webkit-full-screen{width:100vw;height:100dvh;max-height:none;aspect-ratio:auto;box-shadow:none;background:#08121b}
#game-shell.mobile-controls:fullscreen #touch-controls{left:env(safe-area-inset-left);right:env(safe-area-inset-right);top:env(safe-area-inset-top);bottom:env(safe-area-inset-bottom)}
#game-shell.mobile-controls:-webkit-full-screen #touch-controls{left:env(safe-area-inset-left);right:env(safe-area-inset-right);top:env(safe-area-inset-top);bottom:env(safe-area-inset-bottom)}
.mobile-screen-gate{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:#0b202af5;color:#fff0ce;text-align:center;pointer-events:auto;touch-action:manipulation}
.mobile-screen-gate[hidden]{display:none!important}
.mobile-screen-gate>div{width:min(370px,100%)}
.mobile-screen-gate h2{font:700 25px/1.4 system-ui;margin:0 0 18px}
.mobile-screen-gate p{font:400 16px/1.75 system-ui;color:#ccd9d7;margin:0 0 24px;word-break:keep-all}
.mobile-screen-gate button{width:100%;min-height:54px;border:1px solid #e7cf8c;border-radius:14px;background:#315865;color:#fff0ce;font:700 17px/1.35 system-ui;padding:12px}
.mobile-screen-gate small{display:block;margin-top:20px;font:400 13px/1.6 system-ui;color:#a9bfbe}
#game-shell.mobile-portrait-blocked #touch-controls{display:none!important}

/* Keep the existing illustrated interface; the mobile pad is a connected metal cross. */
.mobile-controls #touch-controls{left:env(safe-area-inset-left,0px);right:env(safe-area-inset-right,0px);top:env(safe-area-inset-top,0px);bottom:env(safe-area-inset-bottom,0px)}
.mobile-controls .touch-pad-center{position:absolute;transform:translate(-50%,-50%);background:#1d3947da;border:1px solid #c7b784;border-radius:8px;pointer-events:none;box-shadow:0 3px 10px #07131b55}
.mobile-controls #touch-controls .touch-dpad{border-radius:9px;background:linear-gradient(#385565de,#152f3edd);font-size:23px;border-color:#c7b784;box-shadow:inset 0 2px 0 #ffffff22,0 3px 5px #07131b66}
.mobile-controls #touch-controls [data-control="padUp"]{border-radius:15px 15px 5px 5px}
.mobile-controls #touch-controls [data-control="crouch"]{border-radius:5px 5px 15px 15px}
.mobile-controls #touch-controls [data-control="left"]{border-radius:15px 5px 5px 15px}
.mobile-controls #touch-controls [data-control="right"]{border-radius:5px 15px 15px 5px}
.mobile-controls #touch-controls [data-control="interact"]{background:#705631cf}
#game-shell.mobile-town #interface :is(.village-welcome,.village-actions,.food-belt,.combat-dock){display:none!important}
#game-shell.mobile-town #interface .tools.mobile-town-tools{top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));max-width:none}
#game-shell.mobile-town #interface .mobile-town-tools button{width:auto;min-width:74px;min-height:46px;font-size:16px;padding:8px 16px!important;flex-basis:auto}
#game-shell.mobile-controls #interface :is(.death-overlay,.mobile-menu-overlay){inset:0;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overflow:auto;align-items:center;pointer-events:auto;z-index:60}
#game-shell.mobile-controls #interface :is(.death-panel,.mobile-menu-panel){width:min(530px,100%);max-width:100%;max-height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;margin:0;padding:12px 18px!important;box-sizing:border-box}
#game-shell.mobile-controls #interface :is(.death-panel,.mobile-menu-panel) h2{font-size:24px;line-height:1.25;margin:4px 0 10px}
#game-shell.mobile-controls #interface .death-panel p{font-size:14px;line-height:1.4;margin:6px 0}
#game-shell.mobile-controls #interface :is(.death-panel,.mobile-menu-panel) :is(.quiet-button,.gold-button){min-height:48px;width:100%;min-width:0;margin:0;font-size:15px}
#game-shell.mobile-controls #interface :is(.death-panel,.mobile-menu-panel) .pause-list{gap:6px}
#game-shell.mobile-controls #interface .death-panel .panel-actions{margin-top:6px}
#game-shell.mobile-controls #interface .mobile-menu-panel .language-control{justify-content:center;min-height:48px;font-size:16px}
#game-shell.mobile-controls #interface .mobile-menu-panel select{font-size:16px;max-width:100%}
#game-shell.mobile-controls #interface .defeat-content{inset:0;width:auto;max-width:none;max-height:100%;margin:0;padding:max(12px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));overflow:auto;box-sizing:border-box;pointer-events:auto;touch-action:pan-y;z-index:60}
#game-shell.mobile-controls #interface .defeat-content h2{font-size:25px;margin:4px 0}
#game-shell.mobile-controls #interface .defeat-content p{font-size:14px;line-height:1.4;margin:8px 0}
#game-shell.mobile-controls #interface .defeat-content .panel-actions{display:inline-flex;margin:0 0 0 8px}
/* Result feedback is visual only; rewards were already settled once by the game. */
.shell-celebration{position:absolute;top:55%;width:0;height:0;pointer-events:none;z-index:4;opacity:0;color:#ffda67;font-size:25px;text-shadow:0 0 9px #ffad23}
.shell-celebration img{width:24px;height:24px;object-fit:contain;filter:drop-shadow(0 0 5px #fcb832)}
.shell-celebration i{position:absolute;font-style:normal;opacity:0}
.shell-won .shell-celebration{opacity:1}
.shell-won .shell-celebration i{animation:shell-spark 1.25s ease-out both;animation-delay:calc(var(--n) * 15ms)}
.shell-missed .shell-table{animation:shell-wobble .12s ease-in-out 3}
.shell-won .shell-status{color:#ffe48b;text-shadow:0 0 16px #d59035}
@keyframes shell-spark{0%{opacity:0;transform:translate(0,0) scale(.4)}20%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.75) rotate(120deg)}}
@keyframes shell-wobble{0%,100%{transform:translateX(0)}30%{transform:translateX(-4px)}70%{transform:translateX(4px)}}
#game-shell.mobile-controls #interface .shell-overlay{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
#game-shell.mobile-controls #interface .shell-panel{width:100%;height:100%;min-height:0;max-height:100%;background-position:35% center}
#game-shell.mobile-controls #interface .shell-panel header{padding:8px 15px}
#game-shell.mobile-controls #interface .shell-panel h2{font-size:24px;margin:0}
#game-shell.mobile-controls #interface .shell-panel .eyebrow{display:none}
#game-shell.mobile-controls #interface .shell-close{top:4px;right:8px;min-height:44px;min-width:80px;padding:2px!important}
#game-shell.mobile-controls #interface .shell-rules{top:47px;right:3%;width:64%;padding:6px 10px;line-height:1.3}
#game-shell.mobile-controls #interface .shell-rules p{font-size:14px;margin:0 0 4px}
#game-shell.mobile-controls #interface .shell-rules p:nth-child(2){display:none}
#game-shell.mobile-controls #interface .shell-table{left:25%;right:4%;top:34%;height:27%}
#game-shell.mobile-controls #interface .shell-panel footer{left:3%;right:3%;bottom:6px}
#game-shell.mobile-controls #interface .shell-status{font-size:14px;min-height:20px}
#game-shell.mobile-controls #interface .shell-bet{margin-top:2px;gap:6px;flex-wrap:nowrap}
#game-shell.mobile-controls #interface .shell-bet label{font-size:14px;gap:5px}
#game-shell.mobile-controls #interface .shell-bet input{width:75px;min-height:44px;padding:5px;font-size:16px;box-sizing:border-box}
#game-shell.mobile-controls #interface .shell-bet button{min-width:60px;min-height:44px;font-size:14px;padding:2px!important}
#game-shell.mobile-controls #interface .shell-wager{margin:4px 0;font-size:12px}
@media(prefers-reduced-motion:reduce){.shell-missed .shell-table{animation:none}.shell-won .shell-celebration i{animation:none;opacity:1;transform:translate(var(--dx),var(--dy));font-size:18px}.shell-wood{transition:none}}

/* Compact information pockets; large, movable combat buttons remain unchanged. */
#game-shell.mobile-controls #interface .tools.mobile-town-tools{top:max(6px,env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right));max-width:none;gap:0}
#game-shell.mobile-controls #interface .mobile-town-tools button{width:46px;min-width:46px;height:44px;min-height:44px;padding:3px!important;font-size:12px;flex-basis:auto}
#game-shell.mobile-controls #interface .player-hud{top:max(6px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));width:clamp(150px,30vw,210px);padding:5px 8px!important;box-sizing:border-box;border-width:1px;border-radius:9px;box-shadow:0 2px 6px #0005;min-height:0}
#game-shell.mobile-controls #interface .hero-portrait{display:none}
#game-shell.mobile-controls #interface .hud-name{font-size:10px;line-height:13px;margin:0 0 3px;letter-spacing:0}
#game-shell.mobile-controls #interface .hp-track{height:7px;padding:1px}
#game-shell.mobile-controls #interface .stamina-track{height:4px;margin-top:3px}
#game-shell.mobile-controls #interface :is(.shield-hud,.cloak-hud,.relics,#equipment-hud,#equipment-notice,.spirit-hud,.objective-hud,.recovery-hud,.portrait-rotate,.pg-return){display:none!important}
#game-shell.mobile-controls #interface .currency-hud{top:calc(max(6px,env(safe-area-inset-top)) + 49px);left:max(8px,env(safe-area-inset-left));right:auto;bottom:auto;width:auto;min-width:65px;height:25px;min-height:0;padding:2px 5px!important;gap:3px;border-width:1px;border-radius:7px;box-shadow:none;font-size:11px}
#game-shell.mobile-controls #interface .currency-hud img{width:18px;height:18px}
#game-shell.mobile-controls #interface .currency-hud small{display:none}
#game-shell.mobile-controls #interface .currency-hud b{font-size:12px}
#game-shell.mobile-controls #interface .lives-hud{top:calc(max(6px,env(safe-area-inset-top)) + 49px);left:calc(max(8px,env(safe-area-inset-left)) + 95px);right:auto;bottom:auto;width:auto;padding:3px 5px!important;font-size:10px;gap:3px;min-height:0;height:25px;box-sizing:border-box}
#game-shell.mobile-controls #interface #life-hearts{font-size:12px}
#game-shell.mobile-controls #interface .run-hud{top:calc(max(6px,env(safe-area-inset-top)) + 77px);left:max(8px,env(safe-area-inset-left));right:auto;bottom:auto;width:auto;min-height:0;padding:2px 5px!important;font-size:9px;line-height:12px;gap:5px;border-width:1px}
#game-shell.mobile-controls #interface .run-hud :is(b,strong,small){font-size:inherit;line-height:inherit}
#game-shell.mobile-controls #interface .boss-hud{top:max(6px,env(safe-area-inset-top));right:calc(max(6px,env(safe-area-inset-right)) + 51px);left:auto;bottom:auto!important;width:clamp(150px,29vw,240px);padding:5px 7px!important;border-width:1px;border-radius:9px;min-height:0!important;height:auto!important;box-sizing:border-box}
#game-shell.mobile-controls #interface .boss-name{font-size:11px;line-height:14px;margin:0 0 3px;letter-spacing:0}
#game-shell.mobile-controls #interface .boss-track{height:7px!important;padding:1px!important}
#game-shell.mobile-controls #interface .poise-track{height:3px;margin-top:3px}
#game-shell.mobile-controls #interface .boss-status{font-size:9px;line-height:12px;margin:2px 0 0;min-height:0;max-height:24px;overflow:hidden}
#game-shell.mobile-controls #interface .breath-hud{top:calc(max(6px,env(safe-area-inset-top)) + 97px);left:max(8px,env(safe-area-inset-left));right:auto;bottom:auto;width:155px;padding:4px 6px!important;font-size:10px}
#game-shell.mobile-controls #interface .breath-hud small{display:none}
#game-shell.mobile-controls #interface :is(.frost-hud,.poison-hud){top:calc(max(6px,env(safe-area-inset-top)) + 97px);left:170px;right:auto;bottom:auto;font-size:10px;padding:3px 5px}
#game-shell.mobile-controls #interface .toast{top:calc(max(6px,env(safe-area-inset-top)) + 55px);left:auto;right:calc(max(6px,env(safe-area-inset-right)) + 4px);width:min(38%,255px);font-size:11px;line-height:1.35;padding:5px 7px;border-radius:6px;box-sizing:border-box}
#game-shell.mobile-controls #interface .context-prompt{top:calc(max(6px,env(safe-area-inset-top)) + 97px);bottom:auto;font-size:10px;max-width:40%;padding:3px 5px;left:auto;right:max(8px,env(safe-area-inset-right));transform:none}
#game-shell.mobile-controls #interface :is(.toast,.context-prompt){border:1px solid #c6ab7266!important;border-image:none!important;background:#112e3cb8!important;padding:4px 6px!important;border-radius:6px!important}
#game-shell.mobile-town #interface .currency-hud{top:max(6px,env(safe-area-inset-top))}
#game-shell.mobile-controls #interface .practice-ribbon{top:max(4px,env(safe-area-inset-top));left:36%;right:36%;bottom:auto;font-size:8px;padding:2px;max-height:42px;overflow:auto}
#game-shell.mobile-controls #touch-controls .touch-toolbar{display:none}
#game-shell.mobile-controls.touch-editing #touch-controls .touch-toolbar{display:flex;top:4px;right:4px;left:auto;bottom:auto;transform:none}
#game-shell.mobile-controls.touch-editing #touch-controls .touch-edit-note{top:44px;bottom:auto;font-size:12px}
/* A modal owns the screen; old HUD/toolbars must not remain interactive beneath it. */
#game-shell.mobile-controls.has-game-panel #interface>:is(.hud,.tools,.currency-hud,.spirit-hud,.food-belt,.combat-dock,.pg-return,.context-prompt,.practice-ribbon){display:none!important}
#game-shell.mobile-controls.has-game-panel:not(.touch-editing) #touch-controls{display:none!important}
#game-shell.mobile-controls #interface>.overlay>.panel{max-height:calc(100% - 16px);overflow:auto;box-sizing:border-box;touch-action:pan-y}
/* Fullscreen requests reveal the title immediately, even when rotation is unavailable. */
#game-shell.mobile-title-portrait #interface .portrait-rotate{display:block;font-size:11px;bottom:max(6px,env(safe-area-inset-bottom));left:8px}

.mobile-rotation-note{display:none}
#game-shell.mobile-title-portrait .mobile-rotation-note{display:block;position:absolute;bottom:max(6px,env(safe-area-inset-bottom));left:8px;font-size:11px;color:#ffe6b6;text-shadow:0 1px 4px #000;pointer-events:none;z-index:10}

/* One readable scroll surface for short landscape / in-app browser viewports. */
#game-shell.mobile-controls #interface .overlay:has(.difficulty-panel){inset:0;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));align-items:center;overflow:hidden;z-index:70}
#game-shell.mobile-controls #interface .difficulty-panel{width:min(780px,100%);max-width:100%;max-height:100%;margin:0;padding:12px 16px!important;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;box-sizing:border-box;background:#153946f5!important;border:1px solid #bfae77!important;border-image:none!important;border-radius:16px!important}
#game-shell.mobile-controls #interface .difficulty-panel .eyebrow{font-size:10px;margin:0 0 4px;line-height:1.2}
#game-shell.mobile-controls #interface .difficulty-panel h2{font-size:22px;line-height:1.25;margin:0 0 8px}
#game-shell.mobile-controls #interface .difficulty-guide{font-size:12px;line-height:1.45;margin:6px 0 10px}
#game-shell.mobile-controls #interface .difficulty-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#game-shell.mobile-controls #interface .difficulty-choice{min-width:0;min-height:54px;padding:5px 8px!important;border:1px solid #ad996a!important;border-image:none!important;border-radius:8px!important;text-align:left}
#game-shell.mobile-controls #interface .difficulty-choice strong{font-size:16px;line-height:1.2}
#game-shell.mobile-controls #interface .difficulty-stars{font-size:10px;line-height:1.2}
#game-shell.mobile-controls #interface .difficulty-choice small{display:none}
#game-shell.mobile-controls #interface .difficulty-detail{font-size:11px;line-height:1.3;gap:7px;margin-top:8px;padding:6px 8px}
#game-shell.mobile-controls #interface .difficulty-detail span{font-size:11px}
#game-shell.mobile-controls #interface .journey-rules,#game-shell.mobile-controls #interface .new-game-reset-note{font-size:11px!important;line-height:1.4!important;margin:8px 0!important}
#game-shell.mobile-controls #interface .start-actions{position:sticky;bottom:-12px;z-index:1;gap:8px;display:flex;padding:8px 0 2px;background:#153946}
#game-shell.mobile-controls #interface .start-actions button{flex:1;min-width:0;min-height:44px!important;padding:6px 10px!important;margin:0!important;font-size:14px!important;line-height:1.3}
/* Retain safe insets after the game itself turns clockwise. */
#game-shell.mobile-landscape-fallback{--rotated-edge:max(env(safe-area-inset-top),env(safe-area-inset-right),env(safe-area-inset-bottom),env(safe-area-inset-left),4px)}
#game-shell.mobile-landscape-fallback #touch-controls{inset:var(--rotated-edge)}

#game-shell.mobile-landscape-fallback #interface .title-content{width:46%;left:7%;top:8%;bottom:auto}
#game-shell.mobile-landscape-fallback #interface .title-logo{max-height:32vw}
#game-shell.mobile-landscape-fallback #interface .title-footer{font-size:9px}
#game-shell.mobile-landscape-fallback #interface .boss-hud{width:29%;left:auto;right:57px;top:6px}
#game-shell.mobile-landscape-fallback #interface .portrait-rotate{display:none!important}

/* Two compact technique keys fit the established bottom action bar. */
#interface .combat-dock .combat-techniques{display:grid;grid-template-rows:1fr 1fr;gap:6px;width:160px;min-width:160px;height:94px;pointer-events:auto}
#interface .combat-dock .technique-button{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-width:0;min-height:44px;padding:4px 8px!important;border:1px solid #7096a1!important;border-image:none!important;border-radius:9px!important;color:#e5eeef;background:linear-gradient(145deg,#264d5cdd,#132f3cdd);box-shadow:inset 0 1px #ffffff16;cursor:pointer}
#interface .combat-dock .technique-button kbd{display:grid;place-items:center;flex:0 0 24px;height:25px;padding:0;border:1px solid #ccbf83;border-radius:5px;background:#102b38;color:#ffe6a0;font:700 14px/1 system-ui}
#interface .combat-dock .technique-button span{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:2px}
#interface .combat-dock .technique-button b{font-size:11px!important;line-height:1.1;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#interface .combat-dock .technique-button small{font-size:9px;line-height:1.1;color:#bdd5da;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#interface .combat-dock .technique-button.ready{border-color:#b8dad6!important}
#interface .combat-dock .technique-button.ready:hover{background:#356c79}
#interface .combat-dock .technique-button:disabled{opacity:.58;cursor:default}
@media(pointer:fine) and (max-width:1100px){
 #interface .combat-dock{width:96%;max-width:96%;gap:5px}
 #interface .combat-dock .ultimate-hud{width:170px;min-width:110px;flex:1 1 170px}
 #interface .combat-dock .food-belt{flex:1 1 220px;min-width:0}
 #interface .combat-dock .food-belt button{width:70px;min-width:42px;flex:1 1 70px;padding:4px!important}
 #interface .combat-dock .dodge-hud,#interface .combat-dock .skill-hud{width:125px;min-width:105px;flex:1 1 125px}
 #interface .combat-dock .combat-techniques{width:136px;min-width:136px}
}
@media(pointer:fine) and (max-height:600px) and (max-width:750px){
 #interface .combat-dock .combat-techniques{height:62px;gap:4px}
 #interface .combat-dock .technique-button{min-height:29px;padding:2px 5px!important;gap:5px}
 #interface .combat-dock .technique-button small{display:none}
}
/* Swimming uses the existing compact left dock; mount controls stay separate. */
#game-shell.underwater-stage #interface .combat-dock .combat-techniques{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:1fr;width:100%;min-width:0;height:44px}
#game-shell.dragon-riding #interface .combat-techniques,#game-shell.horse-riding #interface .combat-techniques{display:none!important}
#game-shell.mobile-controls #interface .combat-techniques{display:none!important}

/* Fill the mobile viewport. The shared canvas transform keeps world hit targets aligned. */
#game-shell.mobile-controls:not(.mobile-landscape-fallback){width:100vw;height:100dvh;max-width:none;max-height:none;aspect-ratio:auto;box-shadow:none}
#game-shell.mobile-controls{--edge-top:max(6px,env(safe-area-inset-top));--edge-right:max(8px,env(safe-area-inset-right));--edge-bottom:max(6px,env(safe-area-inset-bottom));--edge-left:max(8px,env(safe-area-inset-left));container-type:size}
#game-shell.mobile-landscape-fallback{--edge-top:max(6px,env(safe-area-inset-right));--edge-right:max(8px,env(safe-area-inset-bottom));--edge-bottom:max(6px,env(safe-area-inset-left));--edge-left:max(8px,env(safe-area-inset-top))}
#game-shell.mobile-controls #game{object-fit:cover}
#game-shell.mobile-controls #touch-controls{inset:var(--edge-top) var(--edge-right) var(--edge-bottom) var(--edge-left)}
#game-shell.mobile-controls #interface .player-hud{left:var(--edge-left);top:var(--edge-top);width:min(28%,190px)}
#game-shell.mobile-controls #interface .boss-hud:not(.journey-hud){left:auto;right:calc(var(--edge-right) + 52px);top:var(--edge-top);width:min(32%,240px);transform:none}
#game-shell.mobile-controls #interface :is(.run-hud,.chapter-hud,.journey-hud){display:none!important}
#game-shell.mobile-controls #interface .tools{top:var(--edge-top);right:var(--edge-right);gap:5px;max-width:calc(100% - 20px);flex-wrap:nowrap}
#game-shell.mobile-controls #interface .tools .iconbtn{width:40px;height:40px;min-width:40px;min-height:40px}
#game-shell.mobile-controls #interface .currency-hud{left:var(--edge-left);top:calc(var(--edge-top) + 47px)}
#game-shell.mobile-controls #interface .lives-hud{left:calc(var(--edge-left) + 91px);top:calc(var(--edge-top) + 47px)}
#game-shell.mobile-controls #interface .breath-hud{left:var(--edge-left);top:calc(var(--edge-top) + 75px);width:min(27%,170px)}
#game-shell.mobile-controls #interface :is(.frost-hud,.poison-hud){left:auto;right:var(--edge-right);top:calc(var(--edge-top) + 95px);max-width:35%;font-size:10px}
#game-shell.mobile-controls #interface .context-prompt{left:auto;right:var(--edge-right);top:calc(var(--edge-top) + 74px);bottom:auto;max-width:35%;font-size:10px;line-height:1.3;padding:4px 6px!important;border-width:1px!important;border-image:none!important;background:#173d4bc9!important}
#game-shell.mobile-controls #interface .toast{right:var(--edge-right);left:auto;top:calc(var(--edge-top) + 52px);max-width:36%;font-size:11px;line-height:1.3;padding:4px 7px!important;border:1px solid #bba471!important;border-image:none!important;background:#173d4be8!important}
#game-shell.mobile-controls #interface .practice-ribbon{left:32%;right:38%;top:var(--edge-top);max-height:40px;font-size:8px;line-height:1.15;border-radius:6px;overflow:auto}
#game-shell.mobile-controls #interface .practice-ribbon button{font-size:8px;padding:1px 3px;min-height:0}
#game-shell.mobile-controls #interface .memory-notice{left:auto;right:var(--edge-right);top:calc(var(--edge-top) + 105px);width:31%;padding:5px 7px!important;font-size:10px}
#game-shell.mobile-controls #interface .memory-notice p{display:none}
/* The scene stays visible behind compact subtitles, without cinematic matte bars. */
#game-shell.mobile-controls #interface :is(.cinema-bars,.chapter-intro,.dialogue-shade,.world-speech){display:none!important}
#game-shell.mobile-controls #interface .cinema-tools{top:var(--edge-top);right:var(--edge-right);gap:8px;z-index:8}
#game-shell.mobile-controls #interface :is(.cinema-tools,.skip-story) .quiet-button{min-height:36px!important;min-width:0;padding:4px 10px!important;font-size:11px!important;margin:0}
#game-shell.mobile-controls #interface .skip-story{left:var(--edge-left);right:auto;top:var(--edge-top);bottom:auto}
#game-shell.mobile-controls #interface .story-box.has-portrait{left:var(--edge-left);right:var(--edge-right);top:calc(var(--edge-top) + 44px);bottom:auto;min-height:0;max-height:43%;overflow:auto;pointer-events:auto;touch-action:pan-y;padding:8px 12px 8px 80px!important;border-radius:10px!important;background:#183c4cdd!important;box-shadow:none!important;animation:none}
#game-shell.mobile-controls #interface .dialogue-portrait{width:56px;height:56px;top:10px;left:10px;border-radius:10px;border-width:1px}
#game-shell.mobile-controls #interface .story-box .speaker{font-size:12px;line-height:1.2;margin:0 0 4px}
#game-shell.mobile-controls #interface .story-box .story-text{min-height:0;font-size:13px;line-height:1.4!important;margin:0 0 6px;word-break:normal}
#game-shell.mobile-controls #interface .story-box .gold-button{min-height:34px!important;min-width:0;margin:0;padding:4px 12px!important;font-size:12px!important;line-height:1.2}
#game-shell.mobile-controls #interface .story-step{position:static;display:inline-block;font-size:9px;letter-spacing:0;margin:0 0 0 10px}
#game-shell.mobile-controls #interface .rescue-caption:has(.cinema-portrait){left:var(--edge-left);right:var(--edge-right);top:calc(var(--edge-top) + 43px);bottom:auto;min-height:0;max-height:28%;overflow:auto;padding:7px 10px!important;border-radius:10px!important;background:#183c4ccc!important;box-shadow:none!important;pointer-events:auto;touch-action:pan-y}
#game-shell.mobile-controls #interface .rescue-caption .cinema-portrait{width:46px;height:46px;margin:0 10px 0 0}
#game-shell.mobile-controls #interface .rescue-caption small{display:none}
#game-shell.mobile-controls #interface .rescue-caption p{font-size:12px;line-height:1.4!important;margin:0;padding:0}
#game-shell.mobile-controls #interface :is(.battle-banner,.phase-banner){left:30%;right:30%;top:22%;padding:4px 8px;font-size:10px}
#game-shell.mobile-controls #interface :is(.battle-banner,.phase-banner) h2{font-size:17px;line-height:1.2}
#game-shell.mobile-controls #interface :is(.battle-banner,.phase-banner) p{display:none}
#game-shell.mobile-controls #interface .conversation-card{top:var(--edge-top);left:var(--edge-left);right:var(--edge-right);max-height:47%;overflow:auto;grid-template-columns:70px minmax(0,1fr);gap:8px;padding:8px!important;touch-action:pan-y}
#game-shell.mobile-controls #interface .conversation-faces{display:flex;flex-wrap:wrap;gap:3px}
#game-shell.mobile-controls #interface .conversation-faces img{width:32px;height:40px;border-width:1px}
#game-shell.mobile-controls #interface .conversation-faces span,#game-shell.mobile-controls #interface .conversation-copy>small{display:none}
#game-shell.mobile-controls #interface .conversation-copy :is(p,h2){font-size:12px;line-height:1.4;margin:0 0 5px}
#game-shell.mobile-controls #interface .conversation-actions{display:flex;flex-wrap:wrap;gap:5px}
#game-shell.mobile-controls #interface .conversation-actions button{min-width:0;min-height:36px!important;padding:4px 9px!important;font-size:11px!important;margin:0!important}
#game-shell.mobile-controls #interface .overlay{padding:var(--edge-top) var(--edge-right) var(--edge-bottom) var(--edge-left)}
#game-shell.mobile-controls #interface .mobile-menu-panel{width:min(620px,100%);max-height:100%;padding:12px!important}
#game-shell.mobile-controls #interface .mobile-menu-panel .pause-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#game-shell.mobile-controls #interface .mobile-menu-panel .pause-list>button{min-height:42px!important;min-width:0;width:100%;font-size:13px!important;margin:0;padding:5px 10px!important}
#game-shell.mobile-controls #interface .mobile-menu-panel h2{font-size:20px;margin:0 0 8px}
#game-shell.mobile-controls #interface .mobile-run-summary{font-size:11px;margin:0 0 8px;color:#e9dfbd}
/* Native selection is retained on PC. Mobile choices belong to the game surface. */
.language-mobile{display:none}
#game-shell.mobile-controls #interface .language-native{display:none}
#game-shell.mobile-controls #interface .language-mobile{display:flex;justify-content:center;min-height:40px;pointer-events:auto}
#game-shell.mobile-controls #interface .language-overlay{z-index:80}
#game-shell.mobile-controls #interface .language-panel{width:min(610px,100%);max-width:100%;max-height:100%;padding:12px 16px!important;border:1px solid #cbb379!important;border-image:none!important;border-radius:14px!important;background:#153946fa!important;overflow:auto}
.language-panel header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 0 8px}
#interface .language-panel h2{font-size:20px;margin:0}
#interface .language-panel button{min-width:0;min-height:44px;border:1px solid #819c98;border-radius:9px;padding:6px 12px;background:#204957;color:#fff2cc;font:600 14px/1.3 system-ui;pointer-events:auto}
.language-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#interface .language-panel button[aria-pressed=true]{border:2px solid #f0ce82;background:#386377;color:#fff4c8}
#interface .language-panel button:disabled{opacity:.5}
#interface .language-panel .language-error{position:static;margin:8px 0;font-size:12px;color:#ffd4c8}
@container (max-height:330px){#game-shell.mobile-controls #interface .language-panel{padding:8px 12px!important}.language-grid{gap:5px}#interface .language-panel h2{font-size:17px}#interface .language-panel button{min-height:38px}}

/* Keep every top status inside its own box, including localized text. */
#game-shell.mobile-controls #interface .hud>.control-cell{display:none!important}
#game-shell.mobile-controls #interface .player-hud{isolation:isolate;overflow:hidden;border:1px solid #bdccb17a!important;border-image:none!important;border-radius:10px!important;box-sizing:border-box;padding:5px 8px!important}
#game-shell.mobile-controls #interface .player-hud :is(.hp-track,.stamina-track){position:relative;left:auto;right:auto;top:auto;bottom:auto;width:auto;max-width:100%;box-sizing:border-box;overflow:hidden}
#game-shell.mobile-controls #interface .player-hud .hud-name{min-width:0;padding:0;gap:6px}
#game-shell.mobile-controls #interface .hud-name>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#game-shell.mobile-controls #interface .hud-name>span:last-child{flex:none}
#game-shell.mobile-controls #interface .boss-hud:not(.journey-hud){box-sizing:border-box;overflow:hidden;border:1px solid #bdccb17a!important;border-image:none!important;border-radius:9px!important}
#game-shell.mobile-controls #interface .hud .key-strip{display:none!important}
#game-shell.mobile-controls #interface .combat-dock{display:none!important}

#interface .tools .achievement-open{width:auto;min-width:2.9em;padding:0 10px;border-radius:10px;font-size:12px}
.achievement-overlay{z-index:65;display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box;background:#071015c9}
.achievement-panel{width:min(1060px,96%);max-height:92%;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;background:#182b34f5;color:#f5eddc;border:1px solid #baa76b;border-radius:14px;padding:24px;box-shadow:0 18px 70px #0009;pointer-events:auto}
.achievement-panel>header{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:-24px;background:#182b34;z-index:2;padding:12px 0;border-bottom:1px solid #baab7140}
.achievement-panel h2{margin:3px 0;font-size:26px}.achievement-panel h3{margin:6px 0;font-size:18px;line-height:1.4}.achievement-panel p{font-size:15px;line-height:1.65;color:#ccd6d6}.achievement-panel small{font-size:12px;line-height:1.5}
.achievement-summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:18px 0;color:#ffdf7c}.achievement-summary strong{font-size:25px}.achievement-summary strong small{color:#d0d4c8;font-weight:400}.legend-title{color:#ffdd79}
.achievement-intro{background:#10202bcc;border-radius:9px;padding:14px 18px}.achievement-intro p{margin:0 0 8px}.achievement-intro>small{display:block;color:#a5b9c0;margin-top:8px}.achievement-feedback{min-height:1.4em;color:#ffe497!important}
.achievement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.achievement-card{display:flex;flex-direction:column;min-width:0;padding:16px;border:1px solid #73939e42;border-radius:10px;background:linear-gradient(145deg,#253b46,#142631);position:relative}.achievement-card.ready{border-color:#f6cf65;box-shadow:inset 0 0 28px #dfbb3114}.achievement-card.claimed{background:#18362f;border-color:#88b7995e}.achievement-card-top{display:flex;gap:10px;align-items:center;min-height:68px}.achievement-card-top img{width:64px;height:68px;object-fit:contain;flex:none}.achievement-card-top>div{min-width:0}.achievement-card h3{font-size:16px;overflow-wrap:anywhere}.achievement-card p{font-size:14px;flex:1}.achievement-seal{display:grid;place-content:center;width:56px;height:56px;flex:none;font-size:36px;color:#edd18b;border:1px solid #b6a56a57;border-radius:50%}.achievement-difficulty{color:#e3c778}.achievement-progress{height:6px;background:#081822;border-radius:6px;overflow:hidden}.achievement-progress i{display:block;height:100%;background:#edc46a}.achievement-count{align-self:flex-end;font-size:12px;margin:5px 0;color:#d4dfdc}.achievement-reward{font-size:14px;color:#f7dd93;line-height:1.5;min-height:42px}.achievement-card footer{display:flex;gap:8px;flex-direction:column;margin-top:12px;font-size:12px;color:#aebfc5}.achievement-card button{width:100%;min-height:42px;padding:8px;font-size:13px}.achievement-claimed{color:#a9dfb7}.achievement-ready{color:#ffe596}.achievement-stages{display:flex;gap:3px;margin-bottom:10px}.achievement-stages span{flex:1;text-align:center;background:#091f28;color:#819ca9;border-radius:3px;font-size:11px;padding:3px 0}.achievement-stages .done{background:#b9a661;color:#0f2430}.achievement-notes,.achievement-companions{margin-top:22px;padding:14px 18px;background:#0d222cc9;border-radius:8px}.achievement-companions>div{display:flex;flex-wrap:wrap;gap:8px}
#game-shell.mobile-controls .achievement-overlay{padding:env(safe-area-inset-top,0px) max(10px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(10px,env(safe-area-inset-left,0px));align-items:stretch}
#game-shell.mobile-controls .achievement-panel{width:100%;max-height:100%;border-radius:0;padding:12px 16px;touch-action:pan-y;-webkit-overflow-scrolling:touch}
#game-shell.mobile-controls .achievement-panel>header{top:-12px;padding:6px 0;min-height:40px}#game-shell.mobile-controls .achievement-panel h2{font-size:20px}#game-shell.mobile-controls .achievement-panel header .eyebrow{display:none}#game-shell.mobile-controls .achievement-panel button{min-height:42px;touch-action:manipulation}#game-shell.mobile-controls .achievement-summary{margin:10px 0}
@media(max-width:850px){.achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.achievement-grid{grid-template-columns:1fr}.achievement-panel{padding:14px}.achievement-panel>header{top:-14px}.achievement-panel h2{font-size:20px}}

/* Base and inherited weapon previews stay visible even before discovery. */
.achievement-card.weapon-mastery .achievement-card-top{min-height:0}
.achievement-weapon-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 0}
.achievement-weapon-pair figure{margin:0;min-width:0;padding:10px 6px;border:1px solid #829eac50;border-radius:8px;background:#0d222bb3;text-align:center}
.achievement-weapon-pair .achievement-result-weapon{border-color:#e3be6866;background:#3f362330}
.achievement-weapon-pair img{display:block;width:64px;height:64px;object-fit:contain;margin:0 auto 8px}
.achievement-weapon-pair figcaption{display:flex;flex-direction:column;gap:5px;min-width:0}
.achievement-weapon-pair small{font-size:14px;color:#b8cdd6}
.achievement-weapon-pair strong{font-size:14px;line-height:1.5;overflow-wrap:anywhere;color:#f5eddc}
.achievement-result-weapon small,.achievement-result-weapon strong{color:#f7dd93}

#interface .tools .gear-open,#interface .tools .achievement-open{display:grid;place-items:center;width:42px;min-width:42px;height:42px;padding:8px;border-radius:10px;color:#f4d996;background:linear-gradient(145deg,#30424ce8,#132532eb);border:1px solid #b7a06b8c;box-shadow:inset 0 1px #fff2}
#interface .tools .gear-open svg,#interface .tools .achievement-open svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.mobile-menu-panel button[data-action="gear"],.mobile-menu-panel button[data-action="ach:open"]{display:flex;align-items:center;justify-content:center;gap:12px}
.mobile-menu-panel button svg{width:24px;height:24px;fill:none;stroke:#f4d996;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.armor-craft{margin:24px 0;border:1px solid #bea56877;border-radius:12px;padding:20px;background:linear-gradient(125deg,#233442,#14232a)}
.armor-craft header{display:flex;align-items:center;justify-content:space-between;gap:12px}.armor-craft h3{margin:4px 0;font-size:24px}.armor-craft header>span{color:#eacb81;font-size:14px}.armor-craft p{line-height:1.6;font-size:15px}.armor-kit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}.armor-kit-grid article{display:flex;align-items:center;gap:16px;padding:14px;border-radius:9px;background:#0c1c25b3;border:1px solid #7994a344;min-width:0}.armor-kit-grid h4{font-size:17px;margin:0 0 6px;color:var(--kit-color)}.armor-kit-grid article>div{flex:1;min-width:0}.armor-kit-grid p{margin:4px 0}.armor-kit-grid small{display:block;color:#bccbd0;font-size:13px}.armor-kit-picture{width:80px;height:80px;object-fit:contain;filter:drop-shadow(0 4px 6px #0009);flex-shrink:0}.armor-kit-grid button{margin-top:10px;width:100%;min-height:42px;font-size:14px}.armor-kit-grid button:disabled{opacity:.5}.armor-kit-message{color:#f5d894;min-height:1em}.armor-craft summary{font-size:14px;cursor:pointer;color:#e7cd9e}.armor-craft details p{font-size:14px;color:#bbccd1}
.true-ending{position:absolute;inset:0;overflow:hidden;pointer-events:auto;color:#fff7e4;background:#101c28;font-family:inherit}.true-ending-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:40% center;animation:wedding-reveal 1.4s ease-out both}.true-ending-shade{position:absolute;inset:0;background:linear-gradient(90deg,transparent 34%,#09131c45 50%,#07131df5 69%,#07131dfc),linear-gradient(0deg,#07131d66,transparent 25%)}.true-ending>header{position:absolute;top:max(22px,env(safe-area-inset-top));right:max(30px,env(safe-area-inset-right));left:64%;display:flex;justify-content:space-between;gap:12px;color:#eacc8a;font-size:13px}.true-ending>header .eyebrow{margin:0;letter-spacing:.14em;line-height:1.5}.true-ending-copy{position:absolute;top:11%;bottom:max(24px,env(safe-area-inset-bottom));right:max(30px,env(safe-area-inset-right));width:33%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y;padding:0 6px 0 0;box-sizing:border-box;animation:wedding-copy .65s ease-out both}.true-ending h1{font-size:clamp(24px,3vw,46px);line-height:1.23;letter-spacing:-.04em;margin:10px 0 20px;color:#ffe3a4;font-weight:800}.true-ending-narration{font-size:clamp(14px,1.35vw,18px);line-height:1.7;color:#cfdbd9}.true-ending-vows{margin:24px 0;padding-left:16px;border-left:2px solid #dbb86f88}.true-ending-vows p{margin:16px 0;font-size:clamp(14px,1.25vw,17px);line-height:1.75}.true-ending-vows b{display:block;color:#eac982;font-size:13px;letter-spacing:.08em;margin-bottom:4px}.true-ending-vows span{display:block}.true-ending footer{display:flex;gap:10px;flex-direction:column;margin-top:24px;padding-bottom:8px}.true-ending footer button{min-height:44px;font-size:15px;padding:12px;width:100%;margin:0}.true-ending-credits{margin:24px 0;padding:18px 0;border-top:1px solid #c7aa6855;border-bottom:1px solid #c7aa6855}.true-ending-credits p{display:flex;justify-content:space-between;gap:12px;margin:10px 0;align-items:center}.true-ending-credits span{color:#bccece;font-size:14px}.true-ending-credits strong{color:#ffe4a8;font-size:clamp(18px,2vw,26px);letter-spacing:.07em}.true-ending-credits small{display:block;margin-top:18px;color:#b4c5c7;font-size:13px;line-height:1.5}.wedding-preview-label{display:block;color:#e5cf91;font-size:12px;margin-top:8px}.wedding-invite-overlay{z-index:70}.wedding-invite{max-height:90%;overflow:auto;touch-action:pan-y}.wedding-invite h2{color:#f4d390}.wedding-invite p{line-height:1.75}
@keyframes wedding-reveal{from{opacity:.2;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes wedding-copy{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-height:540px) and (orientation:landscape){.true-ending>header{left:57%;top:max(10px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));font-size:12px}.true-ending-copy{top:14%;width:41%;right:max(14px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}.true-ending-shade{background:linear-gradient(90deg,transparent 30%,#07131db3 52%,#07131dfa 65%)}.true-ending h1{font-size:27px;margin:0 0 10px}.true-ending-narration{font-size:14px;line-height:1.55}.true-ending-vows{margin:14px 0;padding-left:12px}.true-ending-vows p{font-size:14px;line-height:1.55;margin:10px 0}.true-ending footer{margin-top:12px}.true-ending-credits{margin:12px 0;padding:10px 0}.true-ending-credits strong{font-size:21px}.true-ending footer{position:sticky;bottom:0;background:linear-gradient(0deg,#07131d 90%,#07131d00);padding-top:10px}}
@media(max-width:650px){.armor-craft{padding:14px}.armor-kit-grid{grid-template-columns:1fr}.armor-kit-picture{width:68px;height:68px}.armor-craft header{align-items:flex-start;flex-direction:column}}
@media(orientation:portrait){.true-ending-art{height:49%;object-position:30% center}.true-ending-shade{background:linear-gradient(0deg,#07131d 48%,transparent 66%)}.true-ending>header{top:46%;left:6%;right:6%}.true-ending-copy{left:6%;right:6%;width:88%;top:51%;bottom:max(14px,env(safe-area-inset-bottom))}.true-ending h1{font-size:29px;margin-top:0}.true-ending footer{position:sticky;bottom:0;background:#07131df2;padding-top:10px}}
@media(prefers-reduced-motion:reduce){.true-ending-art,.true-ending-copy{animation:none}}

.stage-entry-banner{position:absolute;z-index:25;top:15%;left:50%;width:max-content;max-width:82%;box-sizing:border-box;padding:12px 25px;color:#fff2cf;text-align:center;background:linear-gradient(90deg,#102d3b00,#102d3bf2 12%,#102d3bf2 88%,#102d3b00);border-block:1px solid #e8c87985;pointer-events:none;font-family:system-ui,sans-serif;will-change:opacity,transform}.stage-entry-banner[hidden]{display:none}.stage-entry-banner strong{display:block;font-size:clamp(16px,2.15vw,28px);line-height:1.4;overflow-wrap:anywhere}.stage-entry-banner span{display:block;margin-top:3px;font-size:clamp(14px,1.25vw,17px);line-height:1.45;color:#d1e3e6}@media(max-width:600px){.stage-entry-banner{padding:8px 15px;max-width:88%;top:17%}}

/* Headers stay outside scrolling content, including the rotated mobile shell. */
#interface .help-panel-header,#interface .clear-panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
#interface .help-panel-header h2{margin:0;line-height:1.25}
#interface .help-panel-header .eyebrow{margin:0 0 6px}
#interface .panel-close{min-width:56px;min-height:44px;padding:8px 12px;flex-shrink:0;border:1px solid #d7bb7c;border-radius:9px;background:#173e49;color:#fff1cd;font:700 15px/1.2 system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
#interface .wide-help{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
#interface .help-panel-body{min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding-right:4px}
#interface .clear-panel-body{min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;pointer-events:auto}
.mobile-durability,.mobile-town-dock{display:none}
#game-shell.mobile-controls #interface{z-index:10}
#game-shell.mobile-controls #interface :is(.chapter-hud,.journey-hud,.objective-hud,.key-strip,.hud>.control-cell,.companion-status){display:none!important}
#game-shell.mobile-controls #interface .mobile-town-tools{gap:6px}
#game-shell.mobile-controls #interface .mobile-town-tools .iconbtn{height:44px;min-height:44px;min-width:44px}
#game-shell.mobile-controls #interface .mobile-layout-open{width:auto!important;min-width:90px;padding:0 10px!important;font-size:14px;white-space:nowrap}
#game-shell.mobile-controls #interface .boss-hud:not(.journey-hud){right:calc(var(--edge-right) + 151px);width:min(32%,240px)}
#game-shell.mobile-controls #interface .mobile-durability{position:absolute;display:flex;gap:10px;z-index:12;top:calc(var(--edge-top) + 76px);left:var(--edge-left);padding:6px 9px;background:#102f3eea;border:1px solid #a9bfba80;border-radius:8px;color:#fff3d7;font:14px/1.3 system-ui,sans-serif;pointer-events:none}
#game-shell.mobile-controls #interface .mobile-durability span{white-space:nowrap}
#game-shell.mobile-controls #interface .mobile-durability b{color:inherit}
#game-shell.mobile-controls.underwater-stage #interface .mobile-durability{top:calc(var(--edge-top) + 108px)}
#game-shell.mobile-controls.mobile-town #interface .mobile-durability{top:calc(var(--edge-top) + 46px)}
#game-shell.mobile-controls #interface .mobile-town-dock{position:absolute;z-index:31;display:flex;justify-content:center;left:50%;transform:translateX(-50%);bottom:calc(var(--edge-bottom) + 8px);max-width:calc(100% - 32px)}
#game-shell.mobile-controls #interface .mobile-town-dock .gold-button{width:auto;min-height:44px;min-width:164px;margin:0;padding:10px 16px;font-size:15px;line-height:1.25;white-space:nowrap}
#game-shell.mobile-controls #interface .clear-reward{z-index:32;display:flex;flex-direction:column;box-sizing:border-box;left:50%;right:auto;top:calc(var(--edge-top) + 54px);bottom:auto;transform:translateX(-50%);width:min(400px,calc(100% - 32px));max-height:calc(100% - var(--edge-top) - var(--edge-bottom) - 118px);padding:10px 12px;font-size:14px}
#game-shell.mobile-controls #interface .clear-reward h3{font-size:20px;margin:8px 0}
#game-shell.mobile-controls #interface .clear-reward p{font-size:14px;margin:8px 0}
#game-shell.mobile-controls #interface .clear-reward small{font-size:13px}
#game-shell.mobile-controls #interface .overlay>.wide-help{max-height:100%;width:min(840px,100%);padding:12px!important;overflow:hidden!important}
#game-shell.mobile-controls #interface .help-panel-header{margin-bottom:8px}
#game-shell.mobile-controls #interface .help-panel-header h2{font-size:20px}
#game-shell.mobile-controls #interface .help-panel-header .eyebrow{display:none}
#game-shell.mobile-controls #interface .help-panel-body{font-size:14px;line-height:1.55}
#game-shell.mobile-controls #interface .help-panel-body .controls-grid{margin:6px 0 12px}
#game-shell.mobile-controls.touch-editing #interface :is(.mobile-durability,.clear-reward,.mobile-town-dock,.tools){display:none!important}
#game-shell.mobile-controls.touch-editing .touch-toolbar button{min-height:44px;font-size:14px}
#game-shell.mobile-controls.touch-editing #touch-controls .touch-edit-note{top:54px}

/* Mobile status is a bounded component, separate from desktop HUD styling. */
#interface .mobile-legacy-state[hidden],#interface .mobile-boss-status[hidden]{display:none!important}
#game-shell.mobile-controls #interface .mobile-combat-status{position:absolute;z-index:12;left:var(--edge-left);top:var(--edge-top);width:clamp(180px,34%,220px);box-sizing:border-box;overflow:hidden;contain:layout paint;padding:8px;border:1px solid #b3c4b486;border-radius:12px;background:#123746dc;color:#fff3d7;font:14px/1.35 system-ui,sans-serif;pointer-events:none}
#interface .mobile-status-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:5px;white-space:nowrap}
#interface .mobile-status-heading b,#interface .mobile-gear-counts b{color:inherit}
#interface :is(.mobile-health-meter,.mobile-stamina-meter,.mobile-boss-meter,.mobile-poise-meter){position:relative;display:block;box-sizing:border-box;overflow:hidden;width:100%;max-width:100%;height:8px;border-radius:5px;background:#0a202be0}
#interface :is(.mobile-health-meter,.mobile-stamina-meter,.mobile-boss-meter,.mobile-poise-meter)>i{position:static;display:block;width:100%;max-width:100%;height:100%;background:linear-gradient(90deg,#c83d50,#f08062);border-radius:inherit}
#interface .mobile-stamina-meter{height:4px;margin-top:4px}
#interface .mobile-stamina-meter>i{background:linear-gradient(90deg,#55cdb2,#a4dfa1)}
#interface .mobile-gear-counts{display:flex;justify-content:space-between;gap:6px;margin-top:6px;white-space:nowrap;font-size:14px}
#game-shell.mobile-controls #interface .mobile-boss-status{position:absolute;right:var(--edge-right);top:calc(var(--edge-top) + 54px);z-index:12;width:min(32%,220px);box-sizing:border-box;overflow:hidden;contain:layout paint;padding:7px 9px;border:1px solid #b5b6978c;border-radius:10px;background:#123746dc;color:#fff3d7;font:14px/1.3 system-ui,sans-serif;pointer-events:none}
#interface .mobile-boss-status>b{display:block;overflow-wrap:anywhere;margin-bottom:5px}
#interface .mobile-poise-meter{height:3px;margin-top:4px}
#interface .mobile-poise-meter>i{background:#e6ce86}
#interface .mobile-boss-status p{font-size:13px;line-height:1.35;margin:5px 0 0;max-height:3.9em;overflow:hidden;color:#e5edda}
#interface .mobile-health-heart{color:#ff9da2}
#interface .mobile-life-row{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:6px;font-size:14px;line-height:1.3}
#game-shell.mobile-controls #interface .mobile-life-row #life-hearts{font-size:18px;line-height:1.2;letter-spacing:3px;color:#ff9da2;white-space:nowrap}
#interface .mobile-life-row #life-count{font-weight:600;white-space:nowrap}
#game-shell.mobile-controls:not(.mobile-town) #interface .currency-hud{top:calc(var(--edge-top) + 112px)}
#game-shell.mobile-controls:not(.mobile-town) #interface .lives-hud{top:calc(var(--edge-top) + 85px)}
#game-shell.mobile-controls.underwater-stage:not(.mobile-town) #interface .breath-hud{top:calc(var(--edge-top) + 143px)}
#game-shell.has-game-panel #interface :is(.mobile-combat-status,.mobile-boss-status){display:none}
#game-shell.mobile-controls #touch-controls .touch-layout-launch{position:absolute;z-index:5;right:52px;top:0;min-height:44px;min-width:94px;padding:8px 10px;border:1px solid #d7bf88;border-radius:10px;background:#183d4deb;color:#fff1cb;font:700 14px/1.2 system-ui,sans-serif;pointer-events:auto;touch-action:manipulation;white-space:nowrap}
#game-shell.mobile-controls #touch-controls .touch-layout-launch[hidden]{display:none!important}
#game-shell.mobile-controls #touch-controls .touch-edit-note[hidden],#game-shell.mobile-controls #touch-controls .touch-edit-note:empty{display:none!important}
#game-shell.mobile-controls.touch-editing #interface :is(.mobile-combat-status,.mobile-boss-status){display:none!important}
#interface button:disabled{cursor:default;opacity:.5;filter:saturate(.45)}
/* Portraits stay inside the scrollable mobile dialogue, including boss events. */
#game-shell.mobile-controls #interface .story-box.has-portrait{min-height:86px;box-sizing:border-box;padding:10px 12px 10px 80px!important}
#game-shell.mobile-controls #interface .dialogue-portrait{top:12px;transform:none;object-fit:contain;padding:3px}
#game-shell.mobile-controls #interface .story-box .speaker{font-size:14px}
#game-shell.mobile-controls #interface .story-box .story-text{font-size:14px}
#game-shell.mobile-controls #interface .story-box .gold-button{font-size:14px!important}
/* This sibling layer must be above the mobile interface's NPC hit targets. */
#game-shell.mobile-controls #touch-controls{z-index:11}
