/* Loaded last: safe thumb controls, small HUDs and scrollable mobile menus. */
:root{--phone-left:max(10px,env(safe-area-inset-left));--phone-right:max(10px,env(safe-area-inset-right));--phone-top:max(8px,env(safe-area-inset-top));--phone-bottom:max(10px,env(safe-area-inset-bottom));--story-header-height:98px}
.weapon-readout{display:flex;align-items:center;gap:6px;margin-top:5px;font-size:11px;color:#fff3c7;text-shadow:0 1px 2px #102c25}.weapon-readout b{font-size:11px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weapon-readout span{white-space:nowrap}.weapon-changed{color:#ffe067}.attack-thumb{display:none;position:absolute;width:34px;height:34px;left:calc(50% - 17px);top:calc(50% - 17px);border:2px solid #fff7bb;border-radius:50%;background:#e8aa4955;pointer-events:none}#touchAttack.aiming .attack-thumb{display:block}#touchAttack.aiming::before{opacity:.3}.weapon-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.weapon-guide-grid div{border:1px solid #ffdf8733;border-radius:9px;padding:12px}.weapon-guide-grid b,.weapon-guide-grid span{display:block}.weapon-guide-grid span{font-size:12px;margin-top:5px}
.mobile-mode-picker{order:3}.mobile-mode-picker>summary{display:none}.adventure-touch-controls [hidden]{display:none!important}
html{scrollbar-gutter:stable}body{overflow-x:clip}button,input,select,summary{touch-action:manipulation}dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}dialog p{overflow-wrap:anywhere}
.mobile-hero-details{order:8;margin:8px 0;font-size:12px;border-top:1px solid #ffe3a244}.mobile-hero-details>summary{padding:12px 0;cursor:pointer;color:#ffdf89;min-height:44px}.mobile-hero-details .ability-card{margin-top:0}.mobile-combat-dock{display:none;position:absolute;right:132px;bottom:22px;gap:12px;z-index:14}.mobile-tools-toggle{display:none!important}.mobile-story-tools{display:none}.mobile-tools-label{display:none}.mobile-rotation-hint{display:none}
#storyAdventure .story-stage{height:calc(100dvh - var(--story-header-height));min-height:0}#storyAdventure.mobile-story-playing{overflow:hidden;padding-bottom:0}#storyAdventure.mobile-story-playing .story-header{position:relative}#storyAdventure .story-level-progress{white-space:normal;overflow-wrap:anywhere}.adventure-stat-line{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.adventure-stat-detail{display:block;font-size:11px;margin-top:3px}.adventure-stat-friends{display:block;font-size:11px;margin-top:3px}.adventure-stat-warning{color:#ffe082;font-weight:800}
@media(max-width:900px),(pointer:coarse){
 #lobby{background-attachment:scroll;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#lobby .play-panel{backdrop-filter:none}#lobby .hero-card,#lobby .mode,#lobby .explore-village,#lobby .profile-form button{min-height:44px}#lobby .icon-button{width:44px;height:44px;flex-shrink:0}#lobby .topbar{padding:0 12px;gap:8px}#lobby .hero-caption h2{font-size:25px}#lobby .hero-caption p{font-size:12px}#lobby .play-panel>.mode-heading{order:2;margin-top:8px}#lobby .modes{order:3}#lobby .play-button{order:4;min-height:58px}#lobby .play-panel>#joinPublicGrove{order:5;min-height:48px;font-size:12px;margin:10px 0 0}#lobby .play-panel>#exploreVillage{order:6;font-size:12px;margin-top:8px}#lobby .play-panel>.friends-panel{order:7}#lobby .play-panel>.account-panel{order:9;margin:8px 0}#lobby .play-panel>.profile-form{order:10}#lobby .mobile-hero-details{order:11}#lobby .play-panel>.play-note{order:12}#lobby .mode{min-height:54px}#lobby .mode b{font-size:12px}#lobby .mode small{font-size:10px}#lobby .play-note{font-size:11px}#lobby .profile-form label,#lobby .profile-form small{font-size:11px}#lobby .profile-form input{min-height:44px}#lobby .home-footer{padding:18px 12px 24px}#lobby .legal-notice{font-size:12px;line-height:1.55}#lobby .home-guide-links a{min-height:44px;display:flex;align-items:center}#lobby .friends-panel summary,#lobby .account-details summary,#lobby .legal-notice summary{min-height:44px}#lobby .friends-row>*{min-width:0;min-height:44px}
 #game .match-top{top:var(--phone-top);left:var(--phone-left);right:var(--phone-right)}#game .match-score{padding:4px 9px;gap:8px;border:0;background:#0e28292e;max-width:calc(100% - 112px)}#game .match-score b{font-size:12px}#game .match-score small{font-size:11px;margin-top:1px}#game .match-score>span{font-size:21px;min-width:26px}#game .hud-utility{top:calc(var(--phone-top) + 52px);right:var(--phone-right);gap:6px}#game .hud-utility .hud-action{--hud-size:44px}#game .mobile-tools-toggle{display:inline-flex!important}#game .hud-objective{top:calc(var(--phone-top) + 55px);left:var(--phone-left);max-width:calc(100% - 218px);font-size:11px;line-height:1.35;max-height:32px;overflow:hidden}#game .hud-target{bottom:calc(var(--phone-bottom) + 96px);font-size:11px;max-width:calc(100% - 250px);line-height:1.35}#game .announcement{top:25%;font-size:19px;max-width:70%;line-height:1.1}#game .lock-on-caption{font-size:11px;line-height:1.25;max-width:58%}
 #game .match-bottom{bottom:auto;top:calc(var(--phone-top) + 101px);left:var(--phone-left);right:auto;display:block}#game .player-status{width:130px;padding:0;pointer-events:none}#game .player-status>b{font-size:14px}#game .player-status small{font-size:10px}#game #hpBar{margin:4px 0;height:5px}#game .ammo{margin-top:4px;gap:3px}#game .ammo i{width:15px;height:3px}
 #game #movePad{left:calc(var(--phone-left) + 8px);bottom:calc(var(--phone-bottom) + 10px);width:108px;height:108px;background:#102d2618}#game #movePad i{left:32px;top:32px;width:42px;height:42px}#game #touchAttack{right:calc(var(--phone-right) + 5px);bottom:calc(var(--phone-bottom) + 9px);--hud-size:82px}#game #super{position:fixed;right:calc(var(--phone-right) + 105px);bottom:calc(var(--phone-bottom) + 70px);--hud-size:54px}#game .mobile-combat-dock{display:flex;right:calc(var(--phone-right) + 100px);bottom:var(--phone-bottom);gap:9px}#game .mobile-combat-dock .hud-action{--hud-size:44px}
 #game .hud-actions{display:none;right:var(--phone-right);bottom:auto;top:calc(var(--phone-top) + 104px);grid-template-columns:repeat(3,56px);gap:18px 10px;width:max-content;max-width:calc(100vw - 24px);padding:14px 14px 20px;border:1px solid #fff0b955;background:#102d29e8;border-radius:16px;z-index:24;touch-action:manipulation}#game.mobile-tools-open .hud-actions{display:grid}#game .hud-actions .hud-action{--hud-size:48px}#game .hud-actions .hud-action::after{bottom:-10px;max-width:62px;font-size:9px;overflow:hidden;text-overflow:ellipsis}#game .mobile-tools-label{display:block;position:absolute;left:50%;top:calc(100% + 7px);transform:translateX(-50%);font:800 9px/1 var(--font);white-space:nowrap;color:#fff6d9;text-shadow:0 1px 3px #102823;pointer-events:none}#game .hud-actions .hud-action::after{bottom:2px;background:#102d29c9;border-radius:4px;padding:1px 3px}#game .build-controls{display:none}#game #miniMap{top:calc(var(--phone-top) + 104px);right:var(--phone-right);width:108px;height:72px;opacity:.72}#game.mobile-tools-open #miniMap{visibility:hidden}#game .hud-details{top:calc(var(--phone-top) + 104px);right:var(--phone-right);max-height:calc(100dvh - var(--phone-top) - 118px);width:min(350px,calc(100vw - 24px));z-index:30}#game .online-room-chip{left:auto;right:var(--phone-right);top:calc(var(--phone-top) + 182px);transform:none;max-width:160px;padding:3px 6px;font-size:10px;background:#102d2955;gap:4px}#game .online-room-chip button{min-width:44px;min-height:44px;font-size:0}#game #onlineShare::before{content:'↗';font-size:22px}#game #onlineScores::before{content:'★';font-size:22px}
 #storyAdventure .story-header{gap:8px;flex-wrap:nowrap;flex-direction:row;align-items:center;padding:7px var(--phone-right) 7px var(--phone-left);border-top-width:12px;backdrop-filter:none}#storyAdventure .story-header::before{top:-12px;height:12px}#storyAdventure .story-brand{min-width:0;flex:1}#storyAdventure .story-brand b{font-size:13px;letter-spacing:.06em}#storyAdventure .story-brand small{font-size:9px;max-width:200px;line-height:1.3}#storyAdventure .story-toolbar{gap:5px;align-items:center}#storyAdventure .story-icon{width:44px;height:44px;flex-shrink:0;border-radius:50%}#storyAdventure .mobile-story-tools{display:grid}#storyAdventure .story-toolbar>.mobile-story-secondary{display:none}#storyAdventure.story-tools-open .story-toolbar>.mobile-story-secondary{display:grid}#storyAdventure.story-tools-open .story-toolbar{position:absolute;right:var(--phone-right);top:calc(100% + 5px);padding:10px;display:grid;grid-template-columns:repeat(3,44px);background:#10382aeb;border:1px solid #edcf8777;border-radius:14px;z-index:30}#storyAdventure.story-tools-open .story-toolbar>.mobile-story-tools{grid-row:1;grid-column:3}#storyAdventure.mobile-story-playing .story-brand small{display:none}#storyAdventure.mobile-story-playing .story-brand b{font-size:12px}#storyAdventure .story-view{padding:10px 12px 24px}#storyAdventure .story-dashboard{display:block}#storyAdventure .story-intro{grid-template-columns:85px minmax(0,1fr)}#storyAdventure .story-sanute{height:88px;width:82px}#storyAdventure .story-identity h2{font-size:25px}#storyAdventure .story-identity p{font-size:12px;line-height:1.4}#storyAdventure .story-identity .story-eyebrow{font-size:8px!important}#storyAdventure .story-featured p{font-size:12px}#storyAdventure .story-featured h2{font-size:24px}#storyAdventure .story-map{grid-template-columns:repeat(7,138px)}#storyAdventure .story-level-detail small,#storyAdventure .story-level-progress{font-size:10px}#storyAdventure .story-level-detail b{font-size:13px}#storyAdventure .story-button{min-height:44px}#storyAdventure .story-map-notes summary{min-height:44px}#storyAdventure .story-talisman small,#storyAdventure .story-friend small{font-size:10px}#storyAdventure .story-talisman{font-size:11px}#storyAdventure .story-friend b{font-size:12px}
 #storyAdventure .story-panel{padding:calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 10px) calc(env(safe-area-inset-bottom) + 10px) calc(env(safe-area-inset-left) + 10px)}#storyAdventure .story-card{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);overscroll-behavior:contain;padding:20px 16px}#storyAdventure .story-card h2{font-size:25px}#storyAdventure .story-card p{font-size:13px}#storyAdventure .story-setting{flex-wrap:wrap;gap:8px}#storyAdventure .story-setting select{max-width:100%}#storyAdventure .story-celebration-card .story-actions{position:relative}#storyAdventure .story-save-status{font-size:10px}#storyAdventure.mobile-story-playing .story-save-status{display:none}
 .adventure-engine-hud{top:8px;left:var(--phone-left);right:var(--phone-right);font-size:12px}.adventure-engine-stats{padding:5px 8px;background:#17332b45;border:0;max-width:100%}.adventure-stat-line{gap:9px;font-weight:800}.adventure-stat-detail{display:none}.adventure-stat-friends{font-size:10px;max-width:260px}.adventure-stat-friends:not(.adventure-stat-warning){display:none}.adventure-engine-caption{bottom:auto;top:48px;font-size:12px;padding:6px 10px;width:min(520px,calc(100% - 32px));max-height:52px;overflow:auto;background:#162b2980;line-height:1.4}.adventure-touch-controls{left:var(--phone-left);right:var(--phone-right);bottom:var(--phone-bottom);gap:8px}.adventure-touch-move{gap:8px}.adventure-touch-actions{max-width:218px;gap:6px}.adventure-touch-button{width:48px;height:48px;font-size:22px}.adventure-touch-jump{width:68px;height:68px}.adventure-touch-lantern,.adventure-touch-interact,.adventure-touch-glide{width:44px;height:44px;font-size:19px}.adventure-touch-companions{right:0;bottom:82px;gap:7px}.adventure-touch-companions .adventure-touch-button{width:44px;height:44px;font-size:18px}.adventure-engine-notice{overflow-y:auto;justify-content:safe center;padding:16px}.adventure-engine-notice p{font-size:13px}.story-notice{bottom:auto;top:calc(var(--story-header-height) + 50px);font-size:12px;max-height:56px;overflow:auto}
}
@media(max-width:420px){#lobby .brand{font-size:23px;gap:6px}#lobby .brand small{font-size:10px;letter-spacing:2px}#lobby .brand-mark{font-size:30px}#lobby .topbar{height:60px}#lobby .lobby-content{padding:5px 10px 10px}#lobby .hero-caption p{font-size:11px}#game .hud-target{max-width:145px}#game .hud-objective{max-width:150px}#storyAdventure .story-brand b{font-size:11px}#storyAdventure .story-brand small{font-size:8px}.adventure-touch-actions{max-width:188px}.adventure-touch-stomp{width:44px;height:44px}.adventure-touch-controls{gap:5px}}
@media(max-height:540px) and (orientation:landscape){
 #lobby::before{height:18px}#lobby .topbar{height:56px}#lobby .lobby-content{display:grid;grid-template-columns:130px minmax(0,1fr);gap:14px;max-width:1000px;padding:7px 16px 12px}#lobby .hero-stage{min-height:0;display:block;text-align:center}#lobby .hero-stage>.eyebrow,#lobby .hero-stage h1,#lobby .stage-label{display:none}#lobby .selected-art{width:115px;height:150px;margin:5px auto}#lobby .hero-caption{text-align:center;margin:6px 0}#lobby .hero-caption p{font-size:11px}#lobby .hero-caption>span{font-size:9px}#lobby .play-panel{padding:12px 14px}#lobby .modes{grid-template-columns:repeat(2,minmax(0,1fr))}#lobby .portrait{height:44px}#lobby .hero-card{flex-basis:72px;min-width:72px}#lobby .hero-card b{font-size:10px;min-height:22px}#lobby .section-heading{margin-bottom:5px}#lobby .section-heading h2{font-size:20px}#lobby .hero-caption h2{font-size:23px}#lobby .home-footer{padding-left:16px;padding-right:16px}
 #game .match-score b{font-size:11px}#game .match-score small{font-size:11px}#game .hud-utility{top:var(--phone-top);right:calc(var(--phone-right) + 54px);gap:5px}#game .match-top>#gameSound{visibility:visible;pointer-events:auto}#game .hud-utility{max-width:210px}#game .match-score{margin-right:190px;max-width:calc(100% - 260px);gap:7px}#game .match-score>span{font-size:20px}#game .hud-objective{top:calc(var(--phone-top) + 47px);left:calc(var(--phone-left) + 54px);max-width:calc(100% - 430px);max-height:29px}#game .match-bottom{top:calc(var(--phone-top) + 48px)}#game .player-status{width:112px}#game #movePad{bottom:calc(var(--phone-bottom) + 4px);width:96px;height:96px}#game #movePad i{left:27px;top:27px;width:40px;height:40px}#game #touchAttack{--hud-size:76px;bottom:calc(var(--phone-bottom) + 4px)}#game #super{bottom:calc(var(--phone-bottom) + 73px);right:calc(var(--phone-right) + 75px);--hud-size:50px}#game .mobile-combat-dock{display:flex;right:calc(var(--phone-right) + 92px);bottom:var(--phone-bottom)}#game .hud-actions{top:calc(var(--phone-top) + 54px);grid-template-columns:repeat(4,52px);gap:18px 7px;padding:10px 10px 18px}#game #miniMap{top:calc(var(--phone-top) + 51px);width:96px;height:64px}#game .online-room-chip{top:calc(var(--phone-top) + 119px);max-width:155px}#game .hud-target{bottom:calc(var(--phone-bottom) + 18px);max-width:calc(100% - 440px)}#game .announcement{top:28%;font-size:18px;max-width:60%}#game .hud-details{top:calc(var(--phone-top) + 50px);max-height:calc(100dvh - var(--phone-top) - 64px)}
 #storyAdventure .story-header{padding-top:4px;padding-bottom:4px;border-top-width:8px}#storyAdventure .story-header::before{top:-8px;height:8px}#storyAdventure .story-brand small{display:none}#storyAdventure .story-view{padding:12px 16px}#storyAdventure .story-dashboard{display:grid;grid-template-columns:125px minmax(0,1fr);gap:16px}#storyAdventure .story-intro{display:block;text-align:center}#storyAdventure .story-sanute{height:150px;width:120px;margin:auto}#storyAdventure .story-identity{padding:4px}#storyAdventure .story-identity p{font-size:11px}#storyAdventure .story-console{margin:0;padding:12px}#storyAdventure .story-map{grid-template-columns:repeat(7,132px)}#storyAdventure .story-card{padding:16px}#storyAdventure .story-card h2{font-size:23px}.adventure-engine-caption{top:40px;width:min(480px,calc(100% - 240px));font-size:11px;max-height:38px}.adventure-touch-controls{bottom:var(--phone-bottom)}.adventure-touch-actions{max-width:280px;align-items:end}.adventure-touch-button{width:46px;height:46px}.adventure-touch-jump{width:64px;height:64px}.adventure-touch-lantern,.adventure-touch-interact,.adventure-touch-glide{width:44px;height:44px}.adventure-touch-companions{bottom:75px}.adventure-engine-stats{max-width:calc(100% - 230px)}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}#lobby .hero-card,#storyAdventure .story-level{transition:none}}
@media(max-width:900px),(pointer:coarse){#lobby #exploreVillage{display:none}#lobby .mode-heading{display:none}#lobby .mobile-mode-picker{margin:7px 0}#lobby .mobile-mode-picker>summary{display:list-item;min-height:46px;padding:12px;border:1px solid #ffdc8b77;border-radius:12px;color:#ffe79f;font-weight:800;font-size:14px;background:#382b2233;cursor:pointer}#lobby .mobile-mode-picker .modes{margin-top:8px}#game .announcement{top:auto;bottom:calc(var(--phone-bottom) + 166px);left:50%;transform:translateX(-50%);font:800 13px/1.3 var(--font);max-width:75%;padding:5px 9px;border-radius:8px;text-shadow:0 1px 2px #142c22;background:#102d2670;pointer-events:none}#game .announcement:empty{display:none}#game .hud-objective{font-size:10px}}
@media(max-height:540px) and (orientation:landscape){#game .announcement{bottom:calc(var(--phone-bottom) + 5px);max-width:calc(100% - 460px);font-size:12px}#lobby .mobile-mode-picker>summary{min-height:44px;font-size:12px;padding:10px}}

#game .hud-actions .hud-action[data-mobile-label] .mobile-tools-label{display:none}
@media(max-width:900px),(pointer:coarse){#game .hud-actions .hud-action[data-mobile-label]{margin-bottom:10px}#game .hud-actions .hud-action[data-mobile-label]::before{transform:translateY(-2px)}#game .hud-actions .hud-action[data-mobile-label]{background:#133d31}#game .hud-actions .hud-action[data-mobile-label] span{display:none}#game .hud-actions .hud-action[data-mobile-label]{font-size:0}#game .hud-actions .hud-action[data-mobile-label]::after{content:attr(data-mobile-label);bottom:-12px;background:none;font-size:10px;max-width:65px}}

