html,body{overscroll-behavior:none;height:100%;height:100dvh}button{touch-action:manipulation}button,input,select{-webkit-tap-highlight-color:transparent}
.path-node i{animation:path-float 4s ease-in-out infinite}.path-node:nth-of-type(2) i{animation-delay:-1s}.path-node:nth-of-type(3) i{animation-delay:-2.2s}.path-node:nth-of-type(4) i{animation-delay:-3s}.path-rock{animation:rock-roll 7s linear infinite!important}.path-star{animation:star-breathe 3s ease-in-out infinite!important}.path-hole{animation:hole-breathe 4s ease-in-out infinite!important}
@keyframes path-float{0%,100%{transform:translateY(-2px) rotate(-8deg)}50%{transform:translateY(2px) rotate(8deg)}}@keyframes rock-roll{to{transform:rotate(385deg)}}@keyframes star-breathe{50%{transform:scale(1.15);box-shadow:0 0 15px #edb17daa}}@keyframes hole-breathe{50%{transform:rotate(12deg) scale(1.08);box-shadow:0 0 9px #edb17d88}}
.mobile-bar,.mobile-zoom,#mobile-abilities{display:none}.mobile-shade{position:fixed;inset:0;background:#02050aaa;z-index:17}#mobile-panel-close{position:fixed;right:max(16px,env(safe-area-inset-right));top:calc(77px + env(safe-area-inset-top));z-index:22;width:44px;height:44px;border:1px solid #6a8198;border-radius:50%;background:#121d2d;font-size:28px}
.mobile-layout .masthead{padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));gap:6px;flex-wrap:nowrap;height:calc(62px + env(safe-area-inset-top))}.mobile-layout .wordmark{margin-right:auto;gap:7px}.mobile-layout .wordmark span{font-size:12px;letter-spacing:1.8px}.mobile-layout .wordmark img{width:28px;height:28px}.mobile-layout .status,.mobile-layout .fps-counter,.mobile-layout #help-toggle,.mobile-layout #almanac-toggle,.mobile-layout #debug-toggle{display:none!important}.mobile-layout .icon-button{width:42px;height:42px;min-width:42px;border-radius:12px;font-size:19px}
.mobile-layout .lobby{background:linear-gradient(0deg,#080b12e8 8%,#080b1280 55%,#080b1230);overflow-y:auto;pointer-events:auto;padding-bottom:env(safe-area-inset-bottom)}.mobile-layout .intro{position:relative;left:auto;right:auto;top:auto;margin:44vh 24px 24px;max-width:none}.mobile-layout h1{font-size:clamp(30px,7.7vw,46px);line-height:1.13;letter-spacing:-1px;margin:20px 0}.mobile-layout .lead{font-size:12px;line-height:1.6;margin-bottom:20px}.mobile-layout form{width:100%}.mobile-layout .join-row{flex-wrap:wrap;padding:5px}.mobile-layout #nickname{font-size:16px;flex:1;min-height:46px}.mobile-layout #play{font-size:12px;min-height:46px;white-space:normal}.mobile-layout .lobby-hint,.mobile-layout .scene-caption{display:none}.mobile-layout .evolution-path{position:relative;left:auto;bottom:auto;right:auto;margin:30px 24px;gap:8px;justify-content:space-between;max-width:none;flex-wrap:wrap;padding:0}.mobile-layout .path-node{font-size:9px;white-space:normal;max-width:25%}.mobile-layout .lobby-footer{position:relative;left:auto;right:auto;bottom:auto;margin:30px 24px 20px}.mobile-layout .lobby-footer span{display:none}
.mobile-layout .hud,.mobile-layout .ranking,.mobile-layout .map-panel,.mobile-layout .bottom-hud{display:none}.mobile-layout .hud,.mobile-layout .ranking{top:calc(74px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:auto;max-height:none;z-index:20;padding:22px 20px;background:#0a1321f5;overflow:auto;pointer-events:auto;backdrop-filter:none}.mobile-layout .hud h2{font-size:23px;max-width:80%}.mobile-layout .hud .stat-row,.mobile-layout .hud #objective,.mobile-layout .orbit-item{font-size:13px}.mobile-layout .ability-grid button{min-height:48px;font-size:12px}.mobile-layout .ranking li{font-size:14px;min-height:36px}.mobile-layout .ranking li:nth-child(n){display:flex}.mobile-layout .ranking .lb-name{max-width:65%}.mobile-layout .ranking .eyebrow{font-size:11px;padding-right:45px}.mobile-layout .ranking li strong{font-size:14px}.mobile-layout #orbit-list{max-height:none}.mobile-layout .orbit-item{padding:12px;min-height:48px}.mobile-layout[data-mobile-panel="hud"] .hud,.mobile-layout[data-mobile-panel="ranking"] .ranking{display:block}.mobile-layout[data-mobile-panel="map"] .map-panel{display:block;left:10%;right:10%;top:calc(130px + env(safe-area-inset-top));bottom:auto;width:80%;z-index:20}.mobile-layout #minimap{width:100%;height:auto;aspect-ratio:1}.mobile-layout .map-caption,.mobile-layout .map-panel .eyebrow{display:flex;font-size:13px}
.mobile-layout .mobile-controls{display:block;position:fixed;inset:0;z-index:15;pointer-events:none}.mobile-layout .mobile-controls button,.mobile-layout #joystick{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.mobile-layout .mobile-bar{position:absolute;display:flex;gap:6px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:calc(65px + env(safe-area-inset-top));align-items:center}.mobile-layout .mobile-bar button{width:44px;height:44px;min-width:44px;border:1px solid #50658188;background:#101b2cdd;border-radius:12px;font-size:23px}.mobile-layout #mobile-summary{position:relative;flex:1;min-width:0;width:auto;font-size:12px;text-align:start;display:flex;align-items:center;gap:8px;padding:8px 12px;overflow:hidden}.mobile-layout #mobile-stage{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-layout #mobile-mass{margin-inline-start:auto;color:#efaa83;white-space:nowrap;font-size:16px}.mobile-layout #mobile-summary>i{position:absolute;bottom:0;left:0;right:0;height:3px;background:#2e3b4b}.mobile-layout #mobile-progress{display:block;height:100%;width:0;background:#efaa83}
.mobile-layout #joystick{position:absolute;left:max(20px,env(safe-area-inset-left));bottom:calc(24px + env(safe-area-inset-bottom));width:124px;height:124px;background:#10203688;border:1px solid #91b8df55;box-shadow:inset 0 0 24px #71a5d00a;border-radius:50%;touch-action:none}.mobile-layout #joystick span{left:calc(50% - 22px);top:calc(50% - 22px);width:44px;height:44px;background:#accfe6cc;border-radius:50%;box-shadow:0 0 20px #8bcdff33}.mobile-layout .mobile-actions{position:absolute;right:max(20px,env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));display:flex;align-items:flex-end;gap:12px}.mobile-layout .mobile-actions>button{margin:0;border:1px solid #7894af77;border-radius:50%;background:#162a40dd;width:50px;height:50px;font-size:26px}.mobile-layout #mobile-primary{width:78px;height:78px;border-color:#edb17d99;background:#31231bdc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.mobile-layout .action-symbol{font-size:26px}.mobile-layout #mobile-primary-label{font-size:10px;max-width:70px;line-height:1.2;overflow-wrap:anywhere}.mobile-layout #mobile-abilities{position:absolute;bottom:95px;right:0;width:min(300px,calc(100vw - 28px));display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px;border:1px solid #53687a;border-radius:14px;background:#0d1829f5;pointer-events:auto}.mobile-layout #mobile-abilities button{border:1px solid #42576c;border-radius:9px;min-height:48px;width:100%;font-size:12px;line-height:1.35;padding:8px;background:#192b40}.mobile-layout .mobile-zoom{position:absolute;right:max(20px,env(safe-area-inset-right));bottom:calc(119px + env(safe-area-inset-bottom));display:flex;gap:6px}.mobile-layout .mobile-zoom button{width:40px;height:40px;font-size:24px;border:1px solid #506581;border-radius:10px;background:#101b2cdd}.mobile-layout .toast{bottom:auto;top:calc(120px + env(safe-area-inset-top));font-size:12px;max-width:calc(100vw - 32px);width:max-content}.mobile-layout .crunch{padding-top:calc(125px + env(safe-area-inset-top))}.mobile-layout .modal{min-width:0;width:calc(100vw - 40px);padding:26px}.mobile-layout dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:28px 20px}.mobile-layout #almanac{max-height:calc(100dvh - 30px);padding:28px 20px}.mobile-layout dialog button{min-height:44px}.mobile-layout .settings-grid,.mobile-layout .ai-grid{grid-template-columns:1fr}.mobile-layout .settings-grid select{font-size:16px;min-height:44px}.mobile-layout .settings-grid input[type="range"]{min-height:42px}.mobile-layout .settings-grid input[type="checkbox"],.mobile-layout .ai-grid input{width:22px;height:22px}.mobile-layout .ai-grid label,.mobile-layout .setting-check{min-height:44px}
body.cinematic .mobile-controls,body.cinematic .mobile-shade,body.cinematic #mobile-panel-close{display:none!important}body.ui-hidden.mobile-layout .mobile-controls{display:block}.mobile-layout[data-mobile-panel="hud"] .mobile-controls,.mobile-layout[data-mobile-panel="ranking"] .mobile-controls,.mobile-layout[data-mobile-panel="map"] .mobile-controls{pointer-events:none;opacity:.2}.mobile-layout[data-mobile-panel="hud"] .mobile-controls button,.mobile-layout[data-mobile-panel="ranking"] .mobile-controls button,.mobile-layout[data-mobile-panel="map"] .mobile-controls button,.mobile-layout[data-mobile-panel="hud"] #joystick,.mobile-layout[data-mobile-panel="ranking"] #joystick,.mobile-layout[data-mobile-panel="map"] #joystick{pointer-events:none}
@media(max-height:520px){.mobile-layout .intro{margin:80px 24px 20px;max-width:52%}.mobile-layout h1{font-size:32px}.mobile-layout .lead{font-size:11px}.mobile-layout .evolution-path{max-width:55%;margin:22px 24px}.mobile-layout .lobby-footer{margin:22px 24px}.mobile-layout #joystick{width:104px;height:104px;bottom:calc(16px + env(safe-area-inset-bottom));left:max(24px,env(safe-area-inset-left))}.mobile-layout .mobile-actions{bottom:calc(16px + env(safe-area-inset-bottom))}.mobile-layout #mobile-primary{width:68px;height:68px}.mobile-layout .mobile-zoom{bottom:calc(98px + env(safe-area-inset-bottom))}.mobile-layout .mobile-bar{right:auto;max-width:65%;min-width:280px}.mobile-layout #mobile-abilities{grid-template-columns:repeat(4,1fr);width:min(470px,75vw);bottom:80px}.mobile-layout .mobile-bar button{height:40px}.mobile-layout .mobile-bar #mobile-summary{height:40px}.mobile-layout .map-panel{max-width:260px;left:auto!important;right:12%!important;top:80px!important}}
@media(prefers-reduced-motion:reduce){.path-node i{animation:none!important}}[dir="rtl"] .eyebrow{letter-spacing:0}[dir="rtl"] .hud,[dir="rtl"] dialog{text-align:right}[dir="rtl"] .almanac-symbol{right:auto;left:18px}[dir="rtl"] .almanac-card .eyebrow{padding-left:38px;max-width:100%}

#language-select{font-size:12px;width:106px;min-height:32px;background:#0e1520;border:1px solid var(--line);color:var(--white);border-radius:9px;padding:4px 7px}.language-setting{display:flex;align-items:center;gap:14px;margin-bottom:18px;font-size:13px}.language-setting select{margin-inline-start:auto;font-size:16px;max-width:65%;padding:10px;border:1px solid var(--line);border-radius:9px;background:#152030;color:var(--white)}#language-status{font-size:12px;color:var(--accent)}.mobile-layout #language-select{width:52px;min-width:52px;max-width:52px;font-size:12px;min-height:42px;padding:4px}.mobile-layout .wordmark span{font-size:11px;letter-spacing:1.4px}.mobile-layout .wordmark img{width:25px;height:25px}

.mobile-orbit-actions{display:none}.mobile-layout .mobile-orbit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.mobile-layout .mobile-orbit-actions button{flex:1;min-width:88px;min-height:48px;border:1px solid #506581;border-radius:9px;background:#152940;padding:10px;color:#dbe7f2;font-size:12px}@media(max-width:360px){.mobile-layout .wordmark span{display:none}}

.mobile-reference,.mobile-target-help{display:none}.mobile-layout .mobile-reference{display:flex;gap:10px;margin:14px 0 20px}.mobile-layout .mobile-reference button{flex:1;min-height:48px;border:1px solid #506581;border-radius:10px;background:#152940;color:#dbe7f2;padding:10px;font-size:14px}.mobile-layout .target-help,.mobile-layout .ability-grid kbd{display:none}.mobile-layout .mobile-target-help{display:block;font-size:12px;line-height:1.6;color:#a7b6c8}
