/* One-screen phone dashboard; desktop retains its original HUD. */
#mobileMenu{display:none}
@media (max-width:700px) and (orientation:portrait),(max-width:540px),(orientation:landscape) and (max-height:600px) and (max-width:1200px){
 html{-webkit-text-size-adjust:100%}
 .wrap,.live .wrap{padding:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
 .stage,.live .stage{width:100%;max-width:none;margin:0;height:calc(100dvh - max(4px,env(safe-area-inset-top)) - max(4px,env(safe-area-inset-bottom)));min-height:0}
 .stage .panel-toggle{display:none}.stage .corner-panel.collapsed .panel-content{display:block}.stage .corner-panel h2 small{display:none}
 .stage .resource-pips{display:none}.stage .resource-summary{flex-wrap:nowrap;margin-top:2px}.stage .resource-summary .resource-level{font-size:8px;white-space:nowrap}
 .stage .unit-line>div{min-width:0}.stage .unit-line .army-pending{font-size:8px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 .stage .lumi-portrait{display:none}.stage .lumi-speech{position:relative;inset:auto;padding:7px;border:0;border-radius:4px;box-shadow:none;height:100%}.stage .lumi-speech:before{display:none}
 .stage .lumi-speech p{font-size:10px;line-height:1.35;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.stage .lumi-speech h2{font-size:8px;margin:0 0 3px}
 .stage .game-dock{display:flex;gap:8px;align-items:center;padding:3px 5px;min-height:0;background:#0c2130;z-index:10}
 .stage #mobileMenu{display:block;flex:none;min-height:34px;padding:5px 11px;font-size:12px}
 .stage .dock-nav{display:none;position:fixed;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:calc(52px + env(safe-area-inset-bottom));width:auto;padding:10px;border:1px solid #7bacc1;border-radius:8px;background:#0c2236fa;box-shadow:0 0 0 100vmax #0006,0 6px 25px #000b;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;overflow:visible;z-index:30}
 .stage.mobile-menu-open .dock-nav{display:grid}.stage .game-dock .dock-nav button{min-width:0;min-height:42px;padding:6px 3px;font-size:10px;white-space:normal;overflow-wrap:anywhere}
 .stage .game-dock .point-button{min-height:30px;padding:5px 7px;font-size:10px}.stage .ea-link{min-width:0;margin-left:auto;font-size:8px}.stage .ea-link small{font-size:7px}.demo-note{display:none}
 .settings-open aside.cards{top:max(6px,env(safe-area-inset-top));bottom:max(6px,env(safe-area-inset-bottom));right:max(6px,env(safe-area-inset-right));width:min(400px,calc(100% - 12px))}
 .settings-open input,.settings-open select,.settings-open textarea,.account-dialog input,.account-dialog select{font-size:16px}.account-dialog,.scenario-dialog,.leaderboard-dialog{max-height:calc(100dvh - 16px)}
}
@media (max-width:700px) and (orientation:portrait),(max-width:540px){
 .stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:30px minmax(48px,1fr) 122px 104px 60px 40px;gap:5px;padding:5px}.stage:before{display:none}
 .stage .player-profile{position:relative;inset:auto;transform:none;grid-column:1/-1;grid-row:1;width:100%;max-width:none;min-height:0;height:30px;padding:3px 7px;gap:7px}
 .stage .player-avatar{width:24px;height:24px;border-radius:6px}.stage .player-identity b{font-size:13px}.stage .player-identity small{font-size:6px;line-height:1;letter-spacing:.5px}.stage .player-rank{font-size:9px;padding-left:8px;margin-left:auto}.stage .player-rank:before{display:none}
 .stage .battle-scenario-status{top:42px;max-width:80%;font-size:8px;padding:2px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .stage #scene{position:relative;grid-column:1/-1;grid-row:2;width:100%;height:100%;min-height:0;aspect-ratio:auto;border-radius:4px}
 .stage .battle-hud{position:relative;inset:auto;transform:none;grid-column:1/-1;grid-row:3;width:100%;padding:0}
 .stage .battle-hud .round-panel{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:32px 27px 42px;min-height:0;height:122px;padding:6px 10px;gap:3px 8px;background:linear-gradient(135deg,#173447,#091824);border:1px solid #668fa3;border-radius:6px;filter:none}
 .stage .battle-hud .round-heading{grid-column:1/-1;grid-row:1;width:100%;padding:0 0 3px;gap:10px}.stage .battle-hud .account-balance,.stage .battle-hud .today-profit{gap:1px}
 .stage .battle-hud .account-balance>span,.stage .battle-hud .today-profit>span{font-size:8px;line-height:1.1;letter-spacing:.7px}.stage .battle-hud .account-balance>b,.stage .battle-hud .today-profit>b{font-size:18px;line-height:1.2}
 .stage .battle-hud .round-panel strong{grid-column:1;grid-row:2;font-size:24px;line-height:1;margin:0}
 .stage .battle-hud .round-panel .targets-button{grid-column:2;grid-row:2;min-height:27px;padding:4px 5px;width:100%;min-width:0;clip-path:none}.stage .targets-button>span:first-child{display:none}.stage .target-pair{flex-wrap:wrap;gap:0 6px;white-space:normal}.stage .target-pair b{font-size:10px}.stage .target-pair small{font-size:8px}
 .stage .battle-hud .round-bottom{grid-column:1/-1;grid-row:3;height:42px;width:100%;flex-wrap:nowrap;gap:8px}.stage .battle-hud #roundAction{width:auto;min-width:0;max-width:none;flex:1;min-height:40px;font-size:19px;padding:7px 12px}
 .stage .signal-indicator{width:32px;flex-basis:32px;gap:0}.stage .signal-beacon{width:26px;height:26px}.stage .signal-beacon svg{width:30px;height:30px}.stage #signalCountdown{height:11px;font-size:9px;line-height:11px}
 .stage .corner-panel,.stage .corner-panel.collapsed{position:relative;inset:auto;width:100%;min-width:0;min-height:0;height:100%;padding:6px 8px;overflow:hidden;background:linear-gradient(135deg,#132b3bd9,#07131bc9);border:1px solid #7cabc05e;border-radius:4px}
 .stage .army-panel{grid-column:1;grid-row:4}.stage .regime-panel{grid-column:2;grid-row:4}.stage .lumi-panel,.stage .lumi-panel.collapsed{grid-column:1;grid-row:5;padding:0}.stage .signals-panel{grid-column:2;grid-row:5}
 .stage .corner-panel h2{font-size:9px;letter-spacing:.5px;margin:0 0 4px}.stage .unit-line{gap:0;margin-top:4px}.stage .unit-line canvas{display:none}.stage .unit-line b{font-size:11px}.stage .unit-line b span{margin-left:3px}.stage .unit-line small{display:inline;font-size:9px;margin-top:0}.stage .unit-line .army-pending{display:block;font-size:7px}.stage .unit-line .army-pending:empty{display:none}.stage .resource-summary{margin-top:1px}
 .stage .unit-line>div{display:grid;grid-template-columns:auto 1fr;column-gap:4px;align-items:baseline;width:100%}.stage .unit-line b{line-height:14px}.stage .unit-line small:not(.army-pending):not(.resource-level){font-size:8px;text-align:right;white-space:nowrap}.stage .unit-line .army-pending,.stage .unit-line .resource-summary{grid-column:1/-1}
 .stage .corner-panel dl{font-size:11px}.stage .corner-panel dl>div{margin-top:4px;line-height:1.25;gap:4px}
 .stage .signals-panel .panel-content>h2{font-size:8px;margin:0 0 3px}.stage .radar-lights{gap:4px;padding:0}.stage .lamp-housing{width:24px;height:24px;padding:3px}.stage .radar-indicator{gap:3px}.stage .lamp-label{font-size:6px}
 .stage .game-dock{position:relative;inset:auto;grid-column:1/-1;grid-row:6}
 .stage .settlement-toast{position:relative;inset:auto;grid-column:1/-1;grid-row:2;align-self:center;justify-self:center;width:min(290px,92%);padding:7px 10px;transform:none;animation:mobile-reward-appear .4s ease-out both}.stage .settlement-toast>span{font-size:10px}.stage .settlement-toast>strong{font-size:25px;line-height:1.15}.stage .settlement-account{margin-top:3px;padding-top:3px}.stage .settlement-account>b{font-size:19px;line-height:1.2}.stage .settlement-account small{display:none}
}
@media (orientation:landscape) and (max-height:600px) and (min-width:541px) and (max-width:1200px){
 .stage #scene{position:absolute;inset:0 0 43px;width:100%;height:calc(100% - 43px);aspect-ratio:auto}
 .stage .player-profile{top:5px;min-height:34px;width:210px;padding:3px 8px}.stage .player-avatar{width:26px;height:26px}.stage .player-identity b{font-size:14px}.stage .player-identity small{font-size:6px}.stage .player-rank{font-size:9px}.stage .battle-scenario-status{top:44px;max-width:40%;font-size:8px;padding:2px 6px}
 .stage .corner-panel,.stage .corner-panel.collapsed{width:clamp(132px,19%,180px);min-width:0;min-height:0;height:auto;padding:8px;background:linear-gradient(135deg,#132b3bd9,#07131bc9);border:1px solid #7cabc05e}.stage .army-panel{top:6px;left:6px}.stage .regime-panel{top:6px;right:6px}
 .stage .corner-panel h2{font-size:9px;margin:0 0 5px;letter-spacing:.4px}.stage .unit-line{gap:3px;margin-top:4px}.stage .unit-line canvas{width:20px;height:24px}.stage .unit-line b{font-size:11px}.stage .unit-line small{font-size:9px;margin-top:1px}.stage .corner-panel dl{font-size:11px}.stage .corner-panel dl>div{margin-top:5px}
 .stage .lumi-panel,.stage .lumi-panel.collapsed{top:auto;left:6px;bottom:49px;min-height:0;padding:0}.stage .signals-panel{top:auto;right:6px;bottom:49px}.stage .radar-lights{gap:5px}.stage .lamp-housing{width:27px;height:27px}.stage .lamp-label{font-size:7px}.stage .radar-indicator{gap:4px}
 .stage .battle-hud{width:min(330px,calc(100% - 300px));bottom:49px}.stage .battle-hud .round-panel{display:grid;grid-template-columns:1fr 1fr;min-height:0;padding:7px 11px;gap:4px;background:linear-gradient(135deg,#132b3bf0,#07131be8);border:1px solid #7cabc07a;border-radius:6px}
 .stage .battle-hud .round-heading{grid-column:1;grid-row:1;padding-bottom:4px;gap:6px}.stage .battle-hud .round-panel strong{grid-column:2;grid-row:1;font-size:24px}.stage .battle-hud .round-panel .targets-button{grid-column:1;grid-row:2;min-height:28px;padding:4px}.stage .targets-button>span:first-child{display:none}.stage .target-pair{flex-wrap:wrap;gap:1px 6px}.stage .target-pair b{font-size:9px}
 .stage .battle-hud .round-bottom{grid-column:2;grid-row:2;height:38px;gap:5px}.stage .battle-hud .account-balance>span,.stage .battle-hud .today-profit>span{font-size:7px}.stage .battle-hud .account-balance>b,.stage .battle-hud .today-profit>b{font-size:12px}.stage .battle-hud #roundAction{min-height:36px;min-width:0;width:100%;font-size:17px;padding:7px}
 .stage .signal-indicator{width:26px;flex-basis:26px}.stage .signal-beacon{width:24px;height:24px}.stage .signal-beacon svg{width:28px;height:28px}.stage #signalCountdown{font-size:8px;height:10px;line-height:10px}.stage .game-dock{min-height:40px;left:0;right:0;bottom:0}
 .stage .settlement-toast{top:60px;width:min(290px,44%);padding:6px 10px}.stage .settlement-toast>span{font-size:10px}.stage .settlement-toast>strong{font-size:23px;line-height:1.1}.stage .settlement-account{margin-top:3px;padding-top:3px}.stage .settlement-account>b{font-size:18px;line-height:1.2}.stage .settlement-account small{display:none}
}
.stage .signal-status{position:absolute;inset:auto;width:1px;height:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
@keyframes mobile-reward-appear{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.stage .settlement-toast{animation:none}}
