#app-shell{position:fixed;inset:0;width:var(--game-width,100%);height:var(--game-height,100%)}
#app-shell #world{position:absolute}
.mobile-only{display:none}
.mobile-ui{overscroll-behavior:none}
.mobile-ui #menu{overflow-y:auto;overscroll-behavior:contain;padding-bottom:16px}
.mobile-ui:not(.game-active) #menu{padding-top:env(safe-area-inset-top);padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:max(16px,env(safe-area-inset-bottom))}
.mobile-ui #menu>*{flex-shrink:0}
.mobile-ui .menu-main{flex:1 0 auto}
.mobile-ui .topbar{min-height:64px}
.mobile-ui .text-button,.mobile-ui .nav-link{min-height:44px}
.mobile-ui .icon-button{min-width:44px;height:44px}
.mobile-ui .identity .text-button,.mobile-ui .footer-actions .icon-button{display:inline-flex}
.mobile-ui .menu-footer{flex-wrap:wrap;gap:8px;padding:10px 0}
.mobile-ui .identity input,.mobile-ui .field input,.mobile-ui select{font-size:16px}
.mobile-ui .footer-actions{gap:14px}
.mobile-ui .version{position:static;margin-top:8px}
.mobile-ui .mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.mobile-ui .mode-card{min-height:64px}
.mobile-ui .mode-card strong{font-size:10px}
.mobile-ui dialog{max-height:calc(var(--screen-height) - 24px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.mobile-ui .modal-close{width:44px;height:44px;right:6px;top:4px}
.mobile-ui .modal-actions{flex-wrap:wrap}
.game-rotated #app-shell{inset:auto;left:var(--screen-width);top:0;transform-origin:0 0;transform:rotate(90deg)}
.game-rotated dialog{position:fixed;inset:auto;margin:0;left:calc(var(--screen-width)/2);top:calc(var(--screen-height)/2);width:calc(var(--game-width) - 28px);max-height:calc(var(--game-height) - 24px);transform:translate(-50%,-50%) rotate(90deg)}
.mobile-ui.game-active{--pad-top:max(10px,env(safe-area-inset-top));--pad-left:max(12px,env(safe-area-inset-left));--pad-right:max(12px,env(safe-area-inset-right));--pad-bottom:max(10px,env(safe-area-inset-bottom));--button-size:52px}
.mobile-ui.game-rotated{--pad-top:max(10px,env(safe-area-inset-right));--pad-left:max(12px,env(safe-area-inset-top));--pad-right:max(12px,env(safe-area-inset-bottom));--pad-bottom:max(10px,env(safe-area-inset-left))}
.mobile-ui.game-active #world,.mobile-ui #game-ui{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.mobile-ui #game-ui{padding:var(--pad-top) var(--pad-right) 0 var(--pad-left)}
.mobile-ui .mobile-only{display:inline-flex}
.mobile-ui .player-panel{width:28%;min-width:158px;max-width:230px;gap:8px}
.mobile-ui .hud-avatar{display:none}
.mobile-ui .vitals-label{font-size:9px;margin-bottom:5px}
.mobile-ui .vitals-label strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:125px}
.mobile-ui .vitals-bottom{font-size:7px;letter-spacing:0;margin-top:5px}
.mobile-ui #hud-character{display:none}
.mobile-ui .match-info{left:50%;top:calc(var(--pad-top) + 1px);width:34%;pointer-events:none}
.mobile-ui .match-info>span{font-size:8px;letter-spacing:1px}
.mobile-ui .match-info strong{font-size:25px;line-height:1;margin:4px 0}
.mobile-ui .match-info small{font-size:7px;letter-spacing:.3px}
.mobile-ui .hud-right{gap:5px;z-index:1}
.mobile-ui .hud-right .net-stat{display:none}
.mobile-ui .hud-right button{min-width:44px;height:44px;font-size:20px;border-radius:10px;background:#0a201ddd}
.mobile-ui #touch-score{font-size:11px;letter-spacing:.4px}
.mobile-ui .combat-help,.mobile-ui .hud-bottomline{display:none}
.mobile-ui .hud-bottom{left:50%;right:auto;bottom:var(--pad-bottom);transform:translateX(-50%);width:auto;pointer-events:none}
.mobile-ui .ability-bar{display:grid;grid-template-columns:repeat(3,44px);gap:7px;margin:0;pointer-events:auto}
.mobile-ui .ability-slot{width:44px;height:50px;border-radius:9px;overflow:hidden;padding:4px 2px 14px;touch-action:none;background:#0a2220df}
.mobile-ui .ability-slot svg{width:21px;height:21px;pointer-events:none}
.mobile-ui .ability-slot kbd{display:none}
.mobile-ui .ability-slot small{bottom:4px;font-size:7px;letter-spacing:0;color:#dce8d8;z-index:2;pointer-events:none}
.mobile-ui .ability-slot .cooldown-text{font-size:16px;pointer-events:none}
.mobile-ui .ability-slot.unavailable{opacity:.55}
.mobile-ui .touch-controls{display:block;position:absolute;inset:0;pointer-events:none}
.mobile-ui .touch-controls .move-pad{display:block;position:absolute;left:var(--pad-left);bottom:var(--pad-bottom);width:126px;height:142px}
.mobile-ui #move-stick{position:absolute;bottom:0;width:126px;height:126px;border:1px solid #b9dcc275;border-radius:50%;background:radial-gradient(circle,#183c32bb 0 38%,#081e20bb 40%);pointer-events:auto;touch-action:none;box-shadow:0 3px 22px #0004}
.stick-direction{position:absolute;font-size:15px;color:#d3ead5;pointer-events:none}
.stick-direction.up{left:50%;top:7px;transform:translateX(-50%)}
.stick-direction.down{left:50%;bottom:7px;transform:translateX(-50%)}
.stick-direction.left{left:10px;top:50%;transform:translateY(-50%)}
.stick-direction.right{right:10px;top:50%;transform:translateY(-50%)}
#stick-thumb{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border-radius:50%;border:1px solid #d2f0d59c;background:#87b7a27d;box-shadow:0 2px 12px #0005;pointer-events:none}
.move-pad>small{position:absolute;top:0;width:100%;text-align:center;font-size:7px;letter-spacing:.7px;color:#c6d9cb;text-shadow:0 2px 4px #000}
.mobile-ui .touch-controls .touch-actions{position:absolute;right:var(--pad-right);bottom:var(--pad-bottom);display:grid;grid-template-columns:repeat(3,var(--button-size));gap:8px;align-items:stretch}
.mobile-ui .touch-actions button{width:var(--button-size);height:var(--button-size);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:15px;background:#092322df;border:1px solid #a6c9b978;touch-action:none;pointer-events:auto;box-shadow:0 3px 14px #0004}
.mobile-ui .touch-actions button span{font-size:22px;line-height:1}
.mobile-ui .touch-actions button small{font-size:8px;letter-spacing:.3px;pointer-events:none}
.mobile-ui .touch-actions .blade-button{background:#642c39e8;border-color:#ee8995}
.mobile-ui .touch-actions .jump-button{background:#416751e8;border-color:#b9dcbd}
.mobile-ui #game-ui .is-pressed{background-color:#6a9c7de8;border-color:#e1ffe6;box-shadow:0 0 16px #a1e7be55}
.mobile-ui .run-hud{left:var(--pad-left);top:calc(var(--pad-top) + 55px);width:184px;padding:6px 8px;border-radius:7px}
.mobile-ui .run-hud>div:first-child{gap:5px}
.mobile-ui .run-hud strong{font-size:12px}
.mobile-ui .run-hud .coin-symbol{font-size:16px}
.mobile-ui .run-hud span{font-size:6px;letter-spacing:0}
.mobile-ui .run-hud b{font-size:14px}
.mobile-ui .run-hud small{display:none}
.mobile-ui .streak-track{margin:4px 0 0}
.mobile-ui .boss-hud{top:calc(var(--pad-top) + 68px);width:32%;max-width:300px}
.mobile-ui .boss-hud>span{font-size:13px;margin-bottom:4px}
.mobile-ui .kill-feed{top:calc(var(--pad-top) + 54px);right:var(--pad-right);font-size:8px;max-width:28%}
.mobile-ui .kill-entry{padding:5px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-ui .kill-entry:nth-child(n+3){display:none}
.mobile-ui .target-hud{left:var(--pad-left);top:calc(var(--pad-top) + 55px);padding:7px 10px;font-size:9px}
.mobile-ui .target-hud small{font-size:6px;margin-bottom:4px}
.mobile-ui .combat-readout{bottom:calc(var(--pad-bottom) + 116px);max-width:48%;white-space:normal}
.mobile-ui .combat-readout>div:last-child{display:none}
.mobile-ui #combat-feedback{height:auto;min-height:14px;font-size:9px;letter-spacing:.3px}
.mobile-ui .center-message{top:40%;width:75%;max-width:none}
.mobile-ui .center-message strong{font-size:42px}
.mobile-ui .center-message p{font-size:9px;letter-spacing:1px}
.mobile-ui .announcement{top:30%;min-width:0;width:50%;padding:9px 12px;font-size:19px}
.mobile-ui .announcement small{font-size:7px;letter-spacing:1px;line-height:1.5}
.mobile-ui .scoreboard{z-index:5;width:calc(var(--game-width) - 32px);max-width:620px;max-height:calc(var(--game-height) - 100px);overflow-y:auto;padding:15px;pointer-events:auto;touch-action:pan-y}
.mobile-ui .scoreboard h2{font-size:20px;margin-bottom:8px}
.mobile-ui .scoreboard .score-table td{padding:7px}
.mobile-ui.game-active dialog{padding:28px 20px 18px}
.mobile-ui.game-active dialog h2{font-size:25px;margin:10px 0}
.game-rotated dialog[data-kind="results"]{max-width:none}
.compact-game dialog[data-kind="results"] .results-panel{display:grid;grid-template-columns:minmax(200px,.85fr) minmax(260px,1.15fr);align-items:center;gap:12px 22px}
.compact-game .results-panel .result-title{grid-column:1;grid-row:1}
.compact-game .results-panel .result-symbol{width:58px;height:58px;margin:0 auto 16px}
.compact-game .results-panel .result-symbol svg{width:32px;height:32px}
.compact-game .results-panel .score-table,.compact-game .results-panel .run-results{grid-column:2;grid-row:1;margin:0}
.compact-game .results-panel .score-table td{padding:5px 6px;font-size:11px}
.compact-game .results-panel .score-table th{padding:7px 6px;font-size:7px}
.compact-game .results-panel .modal-actions{grid-column:1/-1;margin:0;gap:16px}
.compact-game .results-panel .modal-actions .button{padding:12px 16px;min-height:40px}
.mobile-ui.game-active dialog .intro{margin-bottom:12px;font-size:11px}
.mobile-ui.game-active .pause-items{flex-direction:row;gap:10px}
.mobile-ui.game-active .settings-row{padding:12px 0;gap:20px}
.mobile-ui.game-active .settings-row input[type=range]{min-height:24px;width:45%}
.mobile-ui.game-active .control-grid{grid-template-columns:1fr 1fr}
.mobile-ui.compact-game{--button-size:48px}
.mobile-ui.compact-game .touch-controls .move-pad{width:112px;height:130px}
.mobile-ui.compact-game #move-stick{width:112px;height:112px}
.mobile-ui.compact-game .touch-actions{gap:6px}
.mobile-ui.compact-game .ability-bar{gap:5px}
.mobile-ui.compact-game .ability-slot{height:48px}
.mobile-ui.compact-game .combat-readout{bottom:calc(var(--pad-bottom) + 104px)}
@media(orientation:landscape) and (max-height:540px){
  .mobile-ui #menu .topbar{height:64px}
  .mobile-ui #menu .hero{padding-top:22px;width:100%}
  .mobile-ui #menu .menu-main{min-height:270px}
  .mobile-ui #menu h1{font-size:48px;margin:15px 0;letter-spacing:-2px}
  .mobile-ui #menu .hero-copy{margin-bottom:12px}
  .mobile-ui #menu .hero-note,.mobile-ui #menu .scene-caption{display:none}
}
@media(orientation:landscape) and (max-height:540px) and (min-width:700px){.mobile-ui #menu .mode-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
