:root{color-scheme:dark;--ink:#090e19;--cyan:#9aefff;--gold:#e9d399;--muted:#9bacbe}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--ink);color:#eef5fb;font-family:Arial,Helvetica,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}#app{max-width:1440px;margin:auto;padding:0 4vw}header{height:86px;display:flex;align-items:center;justify-content:space-between;gap:15px}.brand{display:flex;align-items:center;gap:12px;font-size:24px;font-weight:900;letter-spacing:2px;text-decoration:none;color:#f2faff}.brand>span{font-size:33px;color:var(--cyan)}.brand small{font-size:10px;letter-spacing:2px;color:var(--muted);padding-left:20px;margin-left:8px;border-left:1px solid #344558}.top{display:flex;align-items:center;gap:12px}.top button{background:#142132;border:1px solid #33465a;border-radius:6px;padding:9px 12px;font-size:13px}.edition{font-size:11px;color:var(--gold);letter-spacing:2px}.game-shell{overflow:hidden;border:1px solid #364b60;border-radius:12px;box-shadow:0 20px 70px #0005}#arena{aspect-ratio:16/9;position:relative;isolation:isolate;background:#0e1d32;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none;outline:none}.overlay{position:absolute;inset:0;padding:5%;z-index:5;display:flex;align-items:center;background:linear-gradient(90deg,#071024f5,#09172daf 50%,#09172d20)}.menu-copy{position:relative;z-index:2}.eyebrow{font-size:12px;letter-spacing:2.2px;color:var(--gold);font-weight:bold}h1{font-family:Georgia,serif;line-height:1.02;letter-spacing:-2px;font-size:clamp(38px,4.6vw,66px);font-weight:400;margin:18px 0}h1 em{color:#afeaf0}p{font-size:15px;line-height:1.65;color:#b9cbd9}.menu-copy p{margin:15px 0 22px}.menu-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px;max-width:340px}.menu-buttons .primary{grid-column:1/-1}.primary,.secondary{padding:12px 18px;border-radius:6px;font-size:15px;font-weight:700}.primary{background:var(--cyan);color:#103044;border:1px solid #c2f7ff;box-shadow:0 4px 24px #66e4ff20}.primary:hover:not(:disabled){background:#c5f8ff}.secondary{background:#14273ae0;border:1px solid #506779;color:#d4e8ed}.secondary:hover:not(:disabled){border-color:#a8eafa;background:#234054}.menu-note{display:block;font-size:11px;color:#90aabd;margin-top:17px}.hero-character{position:absolute;right:5%;top:26%;width:37%;aspect-ratio:1;background:url('/sprites.png') 0 0/200% 200% no-repeat;filter:drop-shadow(0 15px 28px #51b5f54d);animation:float 3s ease-in-out infinite}@keyframes float{50%{transform:translateY(-10px)}}#hud{position:absolute;inset:18px 22px auto;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;text-shadow:0 2px 4px #001}.stage-hud{position:absolute;top:0;left:50%;transform:translateX(-50%);text-align:center;display:grid;gap:6px;background:#0a162bbd;border:1px solid #8bb4d129;border-radius:6px;padding:10px 25px;min-width:165px}.stage-hud>span{font-size:10px;letter-spacing:2px;color:#b4cdde}.stage-hud strong{font-size:17px}#player-label{font-size:12px;letter-spacing:2px}#hearts{display:flex;gap:5px;font-size:27px;line-height:1.3;color:#fd879e;filter:drop-shadow(0 0 5px #fa779330)}#hearts .empty{color:#253245;-webkit-text-stroke:1px #9a7184}.xp-track{height:4px;background:#25374d;width:155px;border-radius:2px;overflow:hidden}.xp-track i,.route-track i{height:100%;display:block;background:#8ad6fc;transition:width .1s}.xp-label{display:flex;justify-content:space-between;width:155px;font-size:10px;margin-top:5px;color:#c7dfe9}.route-track{height:2px;background:#52708b55;margin-top:2px}#pause{pointer-events:auto;background:#12243db3;border:1px solid #6b8ca066;border-radius:6px;padding:8px 12px;font-size:16px}#boss-ui{position:absolute;top:112px;left:28%;width:44%;font-size:13px;font-weight:bold;letter-spacing:2px}#boss-ui small{font-size:10px;float:right;font-weight:400;color:#e8c6cd;letter-spacing:1px}#boss-ui>div{height:7px;background:#321e33;border:1px solid #b8749670;margin-top:7px}#boss-fill{display:block;height:100%;background:linear-gradient(90deg,#ab4b98,#ffa99d)}#toast{position:absolute;top:32%;left:8%;width:84%;text-align:center;font-size:19px;font-weight:bold;color:#fbe6ae;text-shadow:0 2px 7px black;pointer-events:none;opacity:0;z-index:2;transition:opacity .2s}#skills{position:absolute;bottom:16px;left:20px;display:flex;gap:23px;font-size:11px}#skills>span{display:flex;align-items:center;gap:7px}#skills b{font-weight:400;color:#97e8da}kbd{font:10px Arial;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;min-width:24px;height:23px;background:#132338;border:1px solid #567086;border-bottom-width:3px;border-radius:4px;color:#e4f5ff}.sheet{background:#061023e8;backdrop-filter:blur(9px);justify-content:center;text-align:center;padding:4%;z-index:10}.sheet-inner{position:relative;width:min(720px,100%);max-height:100%;overflow:auto;padding:18px 24px;scrollbar-width:thin}.close{position:absolute;right:0;top:0;font-size:27px;background:none;border:0;color:#b7d2e2;padding:0 6px}h2{font-family:Georgia,serif;font-size:36px;font-weight:400;margin:14px 0 18px}#sheet-content p{margin:10px 0 20px}#sheet-content input[type=text]{background:#101f34;border:1px solid #59798f;border-radius:6px;width:100%;padding:14px 16px;font-size:17px;color:white;margin:8px 0 13px}#sheet-content form{max-width:360px;margin:auto;text-align:left}#sheet-content label{font-size:14px;color:#d3e6f0}#sheet-content form .primary{width:100%}.help{font-size:12px!important;color:#8ca7bc!important}.error{color:#ffb4bc!important;min-height:18px;font-size:13px!important}.choice-list{display:flex;gap:13px}.choice{flex:1;border:1px solid #597486;border-radius:8px;background:linear-gradient(155deg,#244453,#11243a);padding:20px 15px;text-align:left}.choice:not(:disabled):hover{border-color:#bcfaff;transform:translateY(-3px)}.choice .rune{display:block;font-size:27px;color:var(--cyan);margin-bottom:17px}.choice b{display:block;font-size:16px;margin-bottom:10px}.choice small{display:block;font-size:13px;line-height:1.6;color:#b5cad9}.button-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:20px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:430px;margin:20px auto;text-align:left}.settings-row input[type=range]{accent-color:#98e8ff;width:160px}.settings-row input[type=checkbox]{accent-color:#98e8ff;width:20px;height:20px}.table-wrap{max-height:240px;overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px;text-align:left}th{font-size:11px;letter-spacing:1px;color:#90b2c8;position:sticky;top:0;background:#0c1b30}th,td{padding:13px;border-bottom:1px solid #39536b66}td:last-child,th:last-child{text-align:right}td:first-child{color:var(--gold);width:55px}.score-large{font:64px Georgia,serif;color:var(--cyan)}#intro{position:absolute;inset:0;z-index:7;display:flex;justify-content:center;align-items:center;gap:20px;pointer-events:none;background:#080c2599}#intro img{position:relative;width:35%;height:83%;object-fit:contain;filter:drop-shadow(0 0 35px #9859ec66)}#intro>div:not(.intro-shade){position:relative;text-align:left}#intro-label{font-size:12px;color:var(--gold);letter-spacing:4px}#intro h2{font-size:70px;margin:10px 0;color:#fff1ed}#intro p{font:italic 23px Georgia,serif;color:#e8afd9;margin:0}#intro.ready{background:#090e1950}#intro.ready img{display:none}#intro.ready h2{font-size:90px;color:#a9f7ff;text-shadow:0 0 40px #61d5f8;letter-spacing:5px}#intro.ready>div{text-align:center}#intro.ready p,#intro.ready #intro-label{display:none}footer{padding:15px 20px;background:#101a28;border-top:1px solid #30465a;display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#8eacbf}footer>div{display:flex;align-items:center;gap:12px}footer b{color:#d3e5ec;font-weight:400}#save-state{font-size:10px;letter-spacing:1px}.dot{width:5px;height:5px;border-radius:50%;background:#a1e8e8}.bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0}.controls{display:flex;gap:18px;flex-wrap:wrap;font-size:11px;color:#91a9ba}.controls>span{display:flex;align-items:center;gap:4px}.stats{display:flex;gap:18px;color:#b6d8e3;font-size:12px}.mobile-note{display:none}#touch{position:absolute;bottom:12px;left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none;z-index:3}#touch>div{display:flex;align-items:center;gap:7px}#touch button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;border:1px solid #a9ebf877;background:#12324bc9;border-radius:50%;height:49px;width:49px;font-weight:bold;font-size:12px;color:#dffbff}#touch button.pressed{background:#67c6deb0}#touch .fire{height:60px;width:60px;background:#357f99c9}#app:fullscreen{width:100%;height:100%;max-width:none;padding:0;display:grid;place-content:center;background:#080e19}#app:fullscreen header,#app:fullscreen footer,#app:fullscreen .bottom,#app:fullscreen .mobile-note{display:none}#app:fullscreen .game-shell{width:min(100vw,177.77vh);border:0}body.reduced-motion *{animation:none!important;transition:none!important}@media(pointer:coarse){.controls,#skills{display:none!important}.mobile-note{display:block;font-size:12px;text-align:center;color:#8baabd;margin:0 0 20px}}@media(max-width:800px){#app{padding:0 2vw}header{height:65px}.brand{font-size:20px}.brand small,.edition{display:none}.top{gap:6px}.top button{font-size:11px;padding:8px}.overlay{padding:4%}h1{font-size:37px;margin:12px 0}.eyebrow{font-size:9px}.menu-copy p{font-size:12px;margin:10px 0 14px}.primary,.secondary{font-size:12px;padding:10px 13px}.menu-note{font-size:9px;margin-top:11px}.menu-buttons{max-width:270px}.hero-character{right:3%;width:36%}#hud{inset:10px 13px auto}#player-label{font-size:10px}#hearts{font-size:23px;gap:3px}.xp-track,.xp-label{width:125px}.xp-label{font-size:9px}.stage-hud{padding:7px 15px;min-width:130px;gap:4px}.stage-hud strong{font-size:13px}.stage-hud>span{font-size:8px}#pause{padding:6px 9px;font-size:13px}#boss-ui{top:80px}#boss-ui small{font-size:8px}#toast{font-size:14px}footer{padding:10px;font-size:10px}#save-state{font-size:9px}.bottom{padding:15px 0}.stats{font-size:11px}.sheet-inner{padding:8px 20px}h2{font-size:27px;margin:10px 0}.sheet p{font-size:12px!important;margin:7px 0 12px!important}.choice{padding:12px}.choice .rune{font-size:19px;margin-bottom:8px}.choice b{font-size:13px;margin-bottom:7px}.choice small{font-size:11px}.settings-row{margin:12px auto;font-size:12px}#intro h2{font-size:50px}#intro p{font-size:17px}#intro.ready h2{font-size:65px}.table-wrap{max-height:150px}td,th{padding:9px}.score-large{font-size:40px}}@media(max-width:540px) and (orientation:portrait){#arena{aspect-ratio:4/5}canvas{object-fit:contain}.menu-copy{align-self:flex-start;margin-top:4%}h1{font-size:42px}.hero-character{top:49%;right:11%;width:55%;opacity:.9}.menu-copy p{max-width:220px}.menu-buttons{max-width:230px}.menu-note{max-width:210px;line-height:1.7}.stage-hud{left:auto;right:42px;transform:none;min-width:100px;padding:6px 10px}#boss-ui{top:95px;left:15%;width:70%}#boss-ui small{font-size:8px}.choice-list{flex-direction:column;gap:8px}.choice{display:grid;grid-template-columns:25px 1fr;gap:4px 10px}.choice .rune{grid-row:span 2}.choice small{grid-column:2}.choice b{margin:0}.sheet-inner{padding:15px}.table-wrap{max-height:260px}#touch button{width:42px;height:42px}#touch .fire{width:50px;height:50px}#touch>div{gap:4px}footer #objective{display:none}#intro{flex-direction:column;gap:0}#intro img{width:55%;height:55%}#intro>div:not(.intro-shade){text-align:center}#intro h2{font-size:43px}#intro p{font-size:19px}}

#boss-taunt{position:absolute;top:151px;right:4%;max-width:43%;padding:10px 14px;border:1px solid #bb85d577;border-radius:8px;background:#201332e8;color:#f5d9ff;font-size:13px;line-height:1.4;font-weight:bold;pointer-events:none;z-index:3;box-shadow:0 3px 20px #0004}#intro-skills{max-width:280px;margin-top:15px;font-size:12px;line-height:1.7;color:#ddc6e9}#intro.ready #intro-skills{display:none}@media(max-width:800px){#boss-taunt{top:105px;font-size:10px;padding:7px 10px}#intro-skills{font-size:10px;max-width:230px}}@media(max-width:540px) and (orientation:portrait){#boss-taunt{top:134px;right:8%;max-width:84%;font-size:11px}#intro-skills{margin:10px auto 0}}
/* Version 04: readable upgrade cards and always accessible pause. */
#element-hud{position:absolute;left:20px;bottom:49px;max-width:85%;font-size:13px;line-height:1.6;padding:5px 9px;background:#091a30d9;border:1px solid #74b0c644;border-radius:6px;pointer-events:none;color:#dbf5f4}
#pause{min-height:40px;font-weight:700;white-space:nowrap}.rank{display:block;color:#f7d88d;font-size:14px;margin-bottom:9px}.choice small{font-size:14px;line-height:1.5}.choice .rune{margin-bottom:9px}.choice-list{align-items:stretch}.choice{min-width:0}.handbook{text-align:left}.book-title,.fusion-name{color:#a6edff!important;font-weight:bold}.handbook p{font-size:15px}.handbook .book-title{margin-bottom:4px!important}.sheet-inner>.eyebrow{padding-right:20px}#sheet-content>.secondary{margin:5px}.help{font-size:14px!important}#intro h2{font-size:clamp(35px,5vw,66px)}#boss-name{letter-spacing:1px}.sheet-inner{max-height:100%;overscroll-behavior:contain}.stage-hud{left:53%}#boss-taunt{max-width:40%}
@media(pointer:coarse){#element-hud{bottom:82px;font-size:12px;left:12px;max-width:90%}}
@media(max-width:800px){.choice small{font-size:12px}.choice b{font-size:14px}.rank{font-size:12px}#pause{font-size:12px;min-height:36px}.help{font-size:12px!important}.stage-hud{left:52%;min-width:115px;padding:6px 8px}.sheet p{font-size:14px!important}.handbook p{font-size:14px!important}#element-hud{font-size:11px}}
@media(max-width:540px) and (orientation:portrait){.stage-hud{left:auto;right:0;top:49px;min-width:100px}#boss-ui{top:126px}#boss-taunt{top:162px;max-width:80%}.choice small{font-size:14px}.choice .rank{grid-column:2;margin:0}.choice .rune{grid-row:span 3}#element-hud{bottom:78px;font-size:12px}#intro h2{font-size:40px}.sheet-inner{padding:12px}.sheet h2{font-size:28px}}
/* Campaign HUD and responsive touch controls */
#hearts{font-size:23px;gap:3px}.stage-hud{min-width:220px}.stage-hud strong{font-size:15px}.splits{display:grid;grid-template-columns:1fr 1fr;gap:8px}.splits span{display:grid;gap:7px;background:#12283c;padding:12px;font-size:13px;color:#b9d2e5}.splits b{color:#e4faff}.hero-character{background:url('/hero-campaign.png') 0 0/400% 300% no-repeat}#boss-ui>div{position:relative}#boss-ui[data-phases="2"]>div:after,#boss-ui[data-phases="3"]>div:after{content:'';position:absolute;left:50%;top:0;height:100%;width:2px;background:#fff9}#boss-ui[data-phases="3"]>div:after{left:33.33%;box-shadow:calc(100vw * .12) 0 #fff9}.table-wrap{max-height:230px}#sheet-content{padding-bottom:10px}@media(max-width:800px){.stage-hud{min-width:175px}.stage-hud strong{font-size:12px}#hearts{font-size:20px}#element-hud{font-size:10px}#touch button{width:44px;height:44px}#touch .fire{width:54px;height:54px}}@media(max-width:540px) and (orientation:portrait){.stage-hud{min-width:125px}.splits{grid-template-columns:1fr 1fr}#touch{left:6px;right:6px}#touch>div{gap:3px}#touch button{width:39px;height:43px;font-size:10px}#touch .fire{width:46px;height:48px}.table-wrap{max-height:250px}}

/* Original Dlicom project branding. */
.brand-logo{width:40px;height:40px;object-fit:contain;border-radius:8px;flex-shrink:0}.menu-brand{display:flex;align-items:center;gap:12px}.menu-brand img{width:56px;height:56px;object-fit:contain;border-radius:12px;border:1px solid #8adfff40;box-shadow:0 0 22px #259ff52a}@media(max-width:800px){.brand-logo{width:30px;height:30px}.menu-brand{gap:9px}.menu-brand img{width:34px;height:34px;border-radius:7px}}

#boss-ui[data-phases="3"]>div:after{left:30%;box-shadow:none}#boss-ui[data-phases="3"]>div:before{content:'';position:absolute;left:65%;top:0;width:2px;height:100%;background:#fff9;z-index:1}.build-stats{border:1px solid #426273;border-radius:8px;padding:12px;background:#12283c}.choice{touch-action:manipulation}@media(max-width:540px){#sound{max-width:100px;font-size:10px}.brand{gap:6px;font-size:17px}}
/* v11: independent, thumb-sized movement and firing controls. */
#game{cursor:crosshair}#touch{inset:auto max(18px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));align-items:flex-end;user-select:none;-webkit-user-select:none;touch-action:none}#touch #move-stick{position:relative;display:grid;place-items:center;width:112px;height:112px;border:2px solid #a2e9ff80;border-radius:50%;background:#102b4680;pointer-events:auto;touch-action:none}#move-stick i{position:absolute;width:52px;height:52px;border-radius:50%;background:#76d7ed90;border:2px solid #c6f5ff}#move-stick span{position:absolute;bottom:8px;font-size:10px;letter-spacing:2px;pointer-events:none}#touch .action-pad{position:relative;display:block;width:206px;height:148px}#touch button{position:absolute;width:68px;height:68px;font-size:12px;border:2px solid #a9ebf899}#touch .jump-button{left:0;bottom:0;background:#28577dcc}#touch .dash-button{left:5px;top:0;width:56px;height:56px;font-size:10px}#touch #fire-stick{right:0;bottom:20px;width:96px;height:96px;background:#347d9299;overflow:visible}#fire-stick i{position:absolute;inset:20px;border:1px solid #cef7ff88;border-radius:50%;pointer-events:none}#fire-stick span{position:relative;pointer-events:none}#touch .pressed{box-shadow:0 0 20px #9bf3ff77;background:#50a1bccc}
@media(pointer:coarse) and (orientation:landscape){body{overflow:hidden}#app{height:100dvh;width:100%;max-width:none;padding:0;display:grid;place-items:center}header,.bottom,footer,.mobile-note{display:none!important}.game-shell,#app:fullscreen .game-shell{width:min(100vw,177.777dvh);border:0;border-radius:0}#arena{aspect-ratio:16/9}#hud{inset:8px 12px auto}#hearts{font-size:17px}#player-label{font-size:9px}.xp-label{font-size:8px}.stage-hud{padding:4px 8px;min-width:140px}.stage-hud strong{font-size:11px}#boss-ui{top:67px;left:30%;width:40%;font-size:10px}#boss-taunt{top:96px;font-size:10px;padding:4px 8px}#element-hud{bottom:auto;top:67px;left:12px;font-size:9px}#touch{z-index:4}.sheet-inner{padding:8px;max-height:100%}.sheet h2{font-size:23px}.choice small{font-size:12px}}
@media(pointer:coarse) and (orientation:portrait){#arena{aspect-ratio:3/4}#touch #move-stick{width:100px;height:100px}#touch .action-pad{width:190px;height:142px}#touch #fire-stick{width:86px;height:86px}#touch{left:10px;right:10px;bottom:12px}#element-hud{bottom:162px}.mobile-note{font-size:13px;padding:10px}.mobile-note:before{content:'Rotate your phone for a larger play area. ';color:#bff5ff}.bottom{display:none}.sheet{padding:2%}}
/* Final: visible viewport, safe-area insets and a separate bottom badge gutter. */
:root{--button-size:1;--button-opacity:.8;--control-fit:1}
#practice-chip{position:absolute;top:92px;left:12px;padding:5px 8px;border:1px solid #cb94ff;background:#2b174ee6;color:#eddaff;font-size:11px;z-index:3;pointer-events:none}
#save-chip{display:none}#touch{opacity:var(--button-opacity)}#touch #move-stick{width:134px;height:134px;transform:scale(calc(var(--button-size)*var(--control-fit)));transform-origin:left bottom}#touch .action-pad{width:244px;height:166px;transform:scale(calc(var(--button-size)*var(--control-fit)));transform-origin:right bottom}#touch .jump-button{width:82px;height:82px;bottom:0;left:0}#touch .dash-button{width:64px;height:64px;left:8px;top:0}#touch #fire-stick{width:114px;height:114px;right:0;bottom:28px}
@media(pointer:coarse){
 html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
 #app,#app:fullscreen{position:fixed;left:var(--view-left,0px);top:var(--view-top,0px);width:var(--view-width,100vw);height:var(--view-height,100dvh);max-width:none;margin:0;padding:calc(env(safe-area-inset-top,0px) + 6px) calc(env(safe-area-inset-right,0px) + 8px) calc(env(safe-area-inset-bottom,0px) + 96px) calc(env(safe-area-inset-left,0px) + 8px);display:flex;align-items:center;justify-content:center;background:#080e19}
 header,.bottom,footer,.mobile-note{display:none!important}
 .game-shell,#app:fullscreen .game-shell{width:var(--play-width,100%);max-width:100%;flex-shrink:0;border:0;border-radius:0;box-shadow:none}
 #arena{aspect-ratio:16/9}canvas{object-fit:contain;width:100%;height:100%}
 #hud{inset:7px 10px auto}#player-label{font-size:9px;letter-spacing:.7px}#hearts{font-size:17px;gap:2px}.xp-track,.xp-label{width:112px}.xp-label{font-size:8px;margin-top:2px}
 .stage-hud{left:52%;right:auto;top:0;transform:translateX(-50%);min-width:130px;padding:4px 6px;gap:2px}.stage-hud strong{font-size:11px}.stage-hud>span{font-size:8px;letter-spacing:.5px}
 #pause{min-width:48px;min-height:40px;padding:7px;font-size:11px}
 #boss-ui{top:59px;left:28%;width:44%;font-size:10px}#boss-taunt{top:83px;right:5%;max-width:55%;font-size:10px;padding:5px 7px}
 #element-hud{left:10px;top:64px;bottom:auto;padding:2px 5px;font-size:9px;max-width:40%}#practice-chip{top:86px;font-size:9px;padding:3px 5px}
 #touch{left:14px;right:14px;bottom:12px;z-index:4;align-items:flex-end}#touch .action-pad{display:block}#touch #move-stick{display:grid}
 #sheet-content input[type=text]{font-size:16px}.sheet-inner{padding:8px;max-height:100%;touch-action:pan-y}.sheet{padding:2%}.sheet h2{font-size:24px;margin:8px 0}.settings-row{margin:10px auto}.settings-row input[type=range]{min-height:30px}.choice-list{gap:8px}.choice{padding:10px}.choice small{font-size:12px}.choice b{font-size:13px}.choice .rune{font-size:20px;margin-bottom:5px}.rank{font-size:11px;margin-bottom:5px}
 #save-chip{position:absolute;bottom:48px;left:12px;max-width:calc(100% - 24px);display:block;color:#a9c8d8;font-size:10px;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .menu-brand img{width:30px;height:30px}.menu-copy h1{font-size:32px;margin:7px 0}.menu-copy p{margin:5px 0 10px;font-size:12px}.menu-buttons{gap:6px}.primary,.secondary{padding:10px 12px}.hero-character{top:24%;width:32%;right:8%}
}
@media(pointer:coarse) and (orientation:portrait){
 #arena{aspect-ratio:3/4}.stage-hud{top:45px;right:8px;left:auto;transform:none;min-width:110px}#boss-ui{top:88px;left:28%;width:60%}#boss-taunt{top:113px;right:6%;max-width:68%}#element-hud{top:70px}#practice-chip{top:95px}#touch{bottom:12px;left:10px;right:10px}
 .menu-copy{align-self:flex-start;margin-top:4%}.hero-character{top:52%;width:45%;right:12%}.choice-list{flex-direction:column}.choice small{font-size:13px}
 #save-chip{white-space:normal;bottom:43px;font-size:10px}
}
/* Anchor each cluster independently so scaling cannot push it outside the viewport. */
#touch{height:calc(166px * var(--button-size) * var(--control-fit))}#touch #move-stick{position:absolute;left:0;bottom:0;flex-shrink:0}#touch .action-pad{position:absolute;right:0;bottom:0;flex-shrink:0}

/* Final 12.1: Fire above, Dash lower left, Jump lower right and slightly raised. */
#touch{height:calc(188px * var(--button-size) * var(--control-fit))}
#touch #move-stick{width:120px;height:120px}
#touch .action-pad{width:190px;height:188px}
#touch #fire-stick{width:102px;height:102px;top:0;right:18px;bottom:auto}
#touch .dash-button{width:58px;height:58px;left:28px;top:auto;right:auto;bottom:0}
#touch .jump-button{width:74px;height:74px;left:auto;right:4px;top:auto;bottom:8px}
@media(pointer:coarse) and (orientation:portrait){
 #arena{aspect-ratio:auto;height:var(--portrait-height,480px)}
 #game{position:absolute;top:84px;left:0;width:100%;height:auto;aspect-ratio:16/9;object-fit:fill}
 #hud{inset:7px 8px auto;height:67px}
 #hud>div:first-child{max-width:40%}#player-label{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:8px}
 #hearts{font-size:16px;gap:1px}.xp-track,.xp-label{width:102px}.xp-label{font-size:8px}
 .stage-hud{left:auto;right:49px;top:0;transform:none;min-width:0;max-width:40%;padding:4px 5px;background:none;border:0;text-align:right}
 .stage-hud strong{font-size:10px}.stage-hud>span{font-size:7px;letter-spacing:0}
 #pause{font-size:0;min-width:40px;width:40px;min-height:40px;padding:0}#pause:after{content:'Ⅱ';font-size:20px}
 #element-hud{top:62px;left:8px;font-size:9px;max-width:58%;padding:1px 4px}
 #practice-chip{top:62px;left:auto;right:8px;font-size:8px}
 #boss-ui{top:90px;left:20%;width:60%;font-size:9px;background:#0b1729bb;padding:3px 5px}#boss-ui>div{margin-top:3px}
 #boss-taunt{top:119px;font-size:9px;max-width:70%}
 #touch{left:12px;right:12px;bottom:12px}
 #toast{top:42%;font-size:13px}.overlay{padding:4%}
}
