/* A single command bar above the battlefield; the same nodes return on mobile. */
@media(min-width:901px){
 .app{padding:8px 12px;gap:8px}
 .app>main{display:block;flex:1;min-height:0}.app>main>.sidebar{display:none}
 .app>.desktop-hud{position:relative;inset:auto;flex:0 0 116px;height:116px;min-height:0;display:grid;grid-template-columns:164px 216px minmax(210px,1fr) 116px 190px;gap:16px;padding:10px 14px;align-items:center;border:1px solid #68715180;border-radius:10px;background:linear-gradient(110deg,#28372a,#1d2b23);box-shadow:0 3px 12px #0a170d22;z-index:4}
 .desktop-hud>*{min-width:0}.desktop-hud .hud-identity{display:flex;flex-direction:column;gap:9px}
 .desktop-hud .brand{display:flex;font-size:17px;letter-spacing:1px;gap:7px;white-space:nowrap;color:var(--gold)}
 .desktop-hud .brand-mark{width:25px;height:34px;transform:none;object-fit:contain}
 .desktop-hud .your-estate{display:flex;padding:0;gap:8px;background:none;border:0;box-shadow:none}
 .desktop-hud .your-estate .shield{font-size:19px;padding:0 4px 2px}.desktop-hud .your-estate strong{font-size:21px;line-height:1.1}
 .desktop-hud .your-estate .eyebrow{font-size:7px;letter-spacing:1px;margin-bottom:3px}.desktop-hud .rank{font-size:12px;padding-left:9px;margin-left:auto}
 .desktop-hud .holdings{display:grid;grid-template-columns:1fr;gap:6px;padding:0 14px 0 0;border-right:1px solid #89916a30}
 .desktop-hud .holdings-heading,.desktop-hud .troops-heading{display:none}
 .desktop-hud .holdings-grid{gap:4px}.desktop-hud .holding{padding:4px 2px;grid-template-columns:20px auto;gap:2px;border-radius:5px;background:#34433260}
 .desktop-hud .holding svg{width:20px;height:20px}.desktop-hud .holding strong{font-size:17px}.desktop-hud .holding>span{font-size:8px}
 .desktop-hud .troops{min-height:26px;padding:0;gap:18px}.desktop-hud .troop-group{gap:4px}.desktop-hud .troop-group .warrior{width:17px;height:26px}.desktop-hud .troop-group small{font-size:9px}.desktop-hud .troop-group b{font-size:11px}
 .desktop-hud .standings{padding:0!important;margin:0!important;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;min-height:0}
 .desktop-hud .standings .ranking-heading{padding:0 0 6px;gap:5px}.desktop-hud .standings .ranking-heading h2{font-size:13px;margin:0;letter-spacing:.2px}.desktop-hud .ranking-heading .tiny-star{font-size:15px}
 .desktop-hud .standings #leaders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:2px 10px;overflow:hidden}
 .desktop-hud .standings #leaders>.leader{min-width:0;min-height:22px;padding:2px 3px;margin:0;border:0;gap:5px;font-size:11px;border-radius:4px}
 .desktop-hud .standings .leader .position{width:11px;font-size:9px}.desktop-hud .standings .leader .flag{width:13px;height:17px;flex:none}.desktop-hud .standings .leader .flag svg{width:13px;height:17px}
 .desktop-hud .leader-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desktop-hud .leader-score{font-size:10px;flex:none}
 .desktop-hud .minimap-wrap{justify-self:center;padding:3px;background:#15281c;border-radius:6px;box-shadow:inset 0 0 0 1px #dac58620}.desktop-hud .minimap-wrap canvas{width:108px;height:83px}.desktop-hud .minimap-wrap>span{display:none}
 .desktop-hud .your-estate,.desktop-hud .minimap-wrap{opacity:1!important;pointer-events:auto}
 .desktop-hud .hud-commands{display:flex;flex-direction:column;gap:6px;min-width:0}
 .desktop-hud .top-actions{justify-content:flex-end;gap:6px}.desktop-hud .top-actions::before{content:'WASD / ↑↓←→';margin-right:auto;align-self:center;font-size:9px;color:#a7b397;opacity:.65}
 .desktop-hud .top-actions .icon-button{width:25px;height:25px}.desktop-hud .icon-button svg{width:17px;height:17px}
 .desktop-hud .desktop-march{--march-size:38px;flex:none}.desktop-hud .desktop-march>.dash{height:38px;min-height:38px;padding:0 7px;gap:5px;border-radius:7px}.desktop-hud .desktop-march>.dash strong{font-size:12px}.desktop-hud .desktop-march>.dash kbd{display:none}
 .desktop-hud .desktop-march .army-command{border-radius:7px;padding:6px;margin-left:6px}.desktop-hud .desktop-march .army-command svg{width:24px;height:24px}.desktop-hud .desktop-march .army-command-slot.available{width:44px;flex-basis:44px}
 .desktop-hud .controls-guide{padding:0;gap:0;opacity:.55}.desktop-hud .movement-keys{display:none}.desktop-hud .controls-guide .action-keys{gap:4px 7px;flex-wrap:nowrap;font-size:8px}.desktop-hud .controls-guide kbd{height:15px;min-width:0;padding:0 3px;font-size:7px;border-width:1px 1px 2px;border-radius:3px;margin:0}.desktop-hud .action-keys>span{gap:3px}
}
@media(min-width:901px) and (max-width:1150px){
 .app>.desktop-hud{grid-template-columns:135px 181px minmax(170px,1fr) 90px 160px;gap:10px;padding:8px 10px;flex-basis:112px;height:112px}
 .desktop-hud .brand{font-size:14px;letter-spacing:.5px}.desktop-hud .brand-mark{width:22px;height:30px}
 .desktop-hud .holdings{padding-right:8px}.desktop-hud .holding>span{font-size:7px}.desktop-hud .holdings-grid{gap:3px}
 .desktop-hud .minimap-wrap canvas{width:82px;height:64px}.desktop-hud .standings #leaders{gap:2px 4px}.desktop-hud .standings #leaders>.leader{font-size:10px;gap:3px}.desktop-hud .leader-score{font-size:9px}
 .desktop-hud .controls-guide .action-keys{font-size:7px;gap:4px}.desktop-hud .controls-guide kbd{font-size:6px;padding:0 2px}
}
@media(min-width:901px){
 .desktop-hud .brand>span{font-size:17px;letter-spacing:.8px}.desktop-hud .brand>span::after{font-size:5px;letter-spacing:2px;margin-top:2px}
 .desktop-hud .your-estate .eyebrow{white-space:nowrap}
}
@media(min-width:901px) and (max-width:1150px){.desktop-hud .brand>span{font-size:14px;letter-spacing:.3px}.desktop-hud .brand>span::after{font-size:5px;letter-spacing:1.3px}.desktop-hud .your-estate{gap:5px}.desktop-hud .your-estate .eyebrow{font-size:6px}.desktop-hud .rank{padding-left:5px}}

/* Quiet movement hints and generous action pedals below the battlefield. */
@media(min-width:901px){
 .app>.desktop-hud{grid-template-columns:164px 216px minmax(210px,1fr) 116px 32px}
 .desktop-hud .top-actions{flex-direction:column}.desktop-hud .top-actions::before{display:none}
 .desktop-dock{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:0 0 68px;min-height:0;padding:5px 10px 7px;border-top:1px solid #75805c30;background:linear-gradient(90deg,#1c292100,#25342a66);border-radius:0 0 9px 9px}
 .desktop-dock .controls-guide{padding:0;opacity:.28;flex:none}.desktop-dock .movement-keys{display:flex;align-items:center;gap:14px}.desktop-dock .action-keys{display:none}.desktop-dock .controls-guide kbd{height:20px;min-width:20px;font-size:9px}
 .desktop-dock .desktop-march{--march-size:54px;width:min(540px,65%);flex:none;align-items:stretch}
 .desktop-dock .desktop-march>.dash{height:54px;min-height:54px;padding:0 16px;justify-content:center;gap:12px;border-radius:11px}
 .desktop-dock .desktop-march>.dash strong{font-size:17px}.desktop-dock .desktop-march>.dash kbd{margin-left:auto;font-size:10px;padding:6px;border-radius:4px}
 .desktop-dock .desktop-march .army-command-slot.available{width:220px;flex-basis:220px}
 .desktop-dock .desktop-march .army-command{width:210px;height:54px;margin-left:10px;padding:0 12px;display:grid;grid-template-columns:30px 1fr auto;gap:8px;border-radius:11px}
 .desktop-dock .army-command svg{width:30px;height:30px;grid-column:1;grid-row:1}
 .desktop-dock .army-command::before{content:'Отряд сюда';grid-column:2;grid-row:1;font-size:13px;font-weight:700;white-space:nowrap}
 .desktop-dock .army-command[aria-pressed=true]::before{content:'Распустить'}
 .desktop-dock .army-command::after{content:'ПРОБЕЛ';grid-column:3;grid-row:1;font:9px var(--ui);padding:6px 4px;border:1px solid #edcea64d;border-radius:4px;background:#34271c33;color:#e4d4b4}
 .desktop-dock .army-command-slot:not(.available){visibility:hidden}
}
@media(min-width:901px) and (max-width:1150px){.app>.desktop-hud{grid-template-columns:135px 181px minmax(170px,1fr) 90px 30px}}
@media(min-width:901px) and (max-height:600px){
 .app>.desktop-hud{height:100px;flex-basis:100px;padding-top:5px;padding-bottom:5px}
 .desktop-dock{flex-basis:62px;padding-top:2px;padding-bottom:6px}
 .result-overlay .dialog{padding:8px 14px}.result-overlay .result-emblem{height:32px;margin-bottom:2px}.result-overlay .result-emblem>svg{height:30px;margin:1px auto}.result-overlay .result-emblem>img{width:30px;height:30px;margin:1px auto}
}

/* One-row header; the optional ranking opens over the minimap on the field. */
@media(min-width:901px){
 .app>.desktop-hud{height:56px;flex-basis:56px;grid-template-columns:auto minmax(310px,1fr) auto;gap:20px;padding:6px 12px}
 .desktop-hud .hud-identity{flex-direction:row;align-items:center;gap:18px}
 .desktop-hud .brand>span{font-size:15px}.desktop-hud .brand-mark{width:25px;height:30px}
 .desktop-hud .your-estate{gap:6px;padding-left:14px;border-left:1px solid #89916a40}.desktop-hud .your-estate strong{font-size:19px}.desktop-hud .your-estate .eyebrow{font-size:6px}.desktop-hud .rank{margin-left:4px}
 .desktop-hud .holdings{display:flex;align-items:center;gap:16px;border:0;padding:0}.desktop-hud .holdings-grid{width:208px;flex:none}.desktop-hud .holding{padding:2px;grid-template-columns:20px auto}.desktop-hud .holding>span{font-size:7px}.desktop-hud .troops{gap:14px;min-height:0}.desktop-hud .troop-group .warrior{width:16px;height:25px}
 .desktop-hud .top-actions{flex-direction:row}.desktop-hud .top-actions .icon-button{width:30px;height:30px}
 .desktop-map-ui{position:absolute;z-index:4;right:12px;top:12px;width:248px;pointer-events:none}
 .desktop-ranking-toggle{width:100%;height:35px;display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #adb27b80;border-radius:7px;background:#23372bed;color:#e4d5ac;pointer-events:auto;box-shadow:0 2px 8px #0c1a1426;font-size:12px}
 .desktop-ranking-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;flex:none}.desktop-ranking-toggle .ranking-chevron{margin-left:auto;width:17px;transition:transform .18s}
 .ranking-open .ranking-chevron{transform:rotate(180deg)}
 .desktop-map-ui .minimap-wrap{width:max-content;margin:7px 0 0 auto;padding:4px;background:#20352be6;pointer-events:auto}
 .desktop-map-ui .minimap-wrap canvas{width:132px;height:102px}.desktop-map-ui .minimap-wrap>span{display:none}
 .desktop-map-ui .standings{position:absolute;top:42px;right:0;width:100%;margin:0!important;min-height:0;padding:8px 10px;background:#20352bf0;border:1px solid #adb27b80;border-radius:7px;box-shadow:0 6px 18px #0b1a1633;pointer-events:auto;max-height:calc(100vh - 230px);overflow-y:auto;overflow-x:hidden}
 .desktop-map-ui .ranking-heading{display:none}.desktop-map-ui #leaders{display:block;overflow-x:hidden}
 .desktop-map-ui .standings #leaders>.leader{padding:7px 3px;margin:0;gap:7px;font-size:12px}.desktop-map-ui .leader-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desktop-map-ui .leader-score{flex:none}
 .desktop-map-ui.ranking-open .minimap-wrap{visibility:visible}
}
@media(min-width:901px) and (max-width:1150px){
 .app>.desktop-hud{gap:10px;padding:6px 10px}.desktop-hud .hud-identity{gap:9px}.desktop-hud .brand>span{font-size:13px}.desktop-hud .your-estate{padding-left:8px}.desktop-hud .holdings{gap:10px}.desktop-hud .holdings-grid{width:180px}.desktop-hud .troops{gap:10px}
 .desktop-map-ui{width:226px;right:10px;top:10px}.desktop-map-ui .minimap-wrap canvas{width:112px;height:87px}
}
@media(prefers-reduced-motion:reduce){.desktop-ranking-toggle .ranking-chevron{transition:none}}
@media(min-width:901px){
 .desktop-dock{flex-basis:52px;padding:1px 4px 4px;justify-content:flex-end;background:none;border-top:0}
 .desktop-dock .controls-guide{display:none}
 .desktop-dock .desktop-march{--march-size:46px}
 .desktop-dock .desktop-march>.dash{height:46px;min-height:46px}
 .desktop-dock .desktop-march .army-command{height:46px}
}
/* A continuous green shell, without decorative frames or separator rules. */
@media(min-width:901px){
 html,body{background:#203529}
 .app{background:#203529}
 .app>.desktop-hud,.desktop-dock{background:transparent;border:0;outline:0;box-shadow:none;border-radius:0}
 .app>main>.arena{border:0;box-shadow:none}
 .desktop-hud .your-estate,.desktop-hud .rank,.desktop-hud .holdings,.desktop-hud .holding{border:0;box-shadow:none}
}

/* Ranking trigger in the header; map and expanded list have separate space. */
@media(min-width:901px){
 .app>.desktop-hud{grid-template-columns:auto minmax(300px,1fr) auto;gap:12px}
 .desktop-hud .hud-commands{flex-direction:row;align-items:center;gap:8px}
 .desktop-hud .desktop-ranking-toggle{width:216px;flex:none;background:#294333aa;border:0;box-shadow:none}
 .desktop-ranking-toggle[aria-expanded=true] .ranking-chevron{transform:rotate(180deg)}
 .desktop-map-ui .standings{top:0}
 .desktop-map-ui .minimap-wrap{position:absolute;top:0;right:calc(100% + 12px);margin:0}
 .desktop-map-ui.ranking-open .minimap-wrap{visibility:visible}
}
@media(min-width:901px) and (max-width:1150px){
 .app>.desktop-hud{gap:8px}
 .desktop-hud .desktop-ranking-toggle{width:180px;font-size:10px;gap:5px;padding:6px}
}

@media(min-width:901px){
 .desktop-map-ui .standings{top:42px}
 .desktop-map-ui .minimap-wrap{top:0;right:calc(100% + 8px)}
 .desktop-map-ui.ranking-open .minimap-wrap{visibility:visible}
}
/* The in-game header contains only game information and controls. */
.topbar .brand{display:none!important}
.topbar .top-actions{margin-left:auto}
@media(min-width:901px){.desktop-hud .your-estate{padding-left:0}}
@media(min-width:901px){
 .desktop-dock{flex-basis:48px;padding:1px 0 4px}
 .desktop-dock .desktop-march{--march-size:42px;width:100%}
 .desktop-dock .desktop-march>.dash{position:relative;height:42px;min-height:42px;justify-content:center;padding:0 72px}
 .desktop-dock .desktop-march>.dash kbd{position:absolute;right:14px;margin:0}
 .desktop-dock .desktop-march .army-command-slot.available{width:34%;flex-basis:34%}
 .desktop-dock .desktop-march .army-command{position:relative;width:calc(100% - 10px);height:42px;grid-template-columns:30px auto;justify-content:center;padding:0 64px}
 .desktop-dock .army-command::after{position:absolute;right:12px}
}

/* Minimap above a mobile-style ranking card; keep text clear over the fading panel. */
@media(min-width:901px){
 .desktop-map-ui{display:flex;flex-direction:column;width:226px;gap:0;max-height:calc(100% - 24px)}
 .desktop-map-ui .minimap-wrap{position:relative;inset:auto;order:0;width:100%;margin:0 0 7px;padding:7px;border:0;border-radius:8px;background:#152d24eb;box-shadow:inset 0 0 0 1px #c1ac6455;flex:none}
 .desktop-map-ui .minimap-wrap canvas{width:100%;height:auto;aspect-ratio:440/340;border-radius:3px}
 .desktop-map-ui .minimap-wrap::after{content:'';position:absolute;inset:5px;pointer-events:none;background:linear-gradient(#dfc778,#dfc778) left top/9px 3px no-repeat,linear-gradient(#dfc778,#dfc778) left top/3px 9px no-repeat,linear-gradient(#dfc778,#dfc778) right top/9px 3px no-repeat,linear-gradient(#dfc778,#dfc778) right top/3px 9px no-repeat,linear-gradient(#dfc778,#dfc778) left bottom/9px 3px no-repeat,linear-gradient(#dfc778,#dfc778) left bottom/3px 9px no-repeat,linear-gradient(#dfc778,#dfc778) right bottom/9px 3px no-repeat,linear-gradient(#dfc778,#dfc778) right bottom/3px 9px no-repeat}
 .desktop-map-ui .desktop-ranking-toggle{order:1;flex:none;height:37px;border:0;border-radius:7px;background:#173529ef;gap:6px;font-size:12px}
 .desktop-map-ui.ranking-open .desktop-ranking-toggle{border-radius:7px 7px 0 0}
 .desktop-top-title{display:none}.ranking-open .desktop-top-title{display:block}
 .desktop-self{display:flex;align-items:center;gap:7px;flex:1;min-width:0;border:0!important;margin:0!important;padding:0!important;background:none!important;font-size:11px}
 .desktop-self .position{flex:none;width:auto;font-size:10px}.desktop-self .flag{width:16px;height:20px;flex:none}.desktop-self .leader-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.desktop-self .leader-score{flex:none;font-size:10px}
 .ranking-open .desktop-self{display:none}
 .desktop-map-ui .standings{position:relative;inset:auto;order:2;width:100%;min-height:0;max-height:none;flex:0 1 auto!important;overflow-y:auto;padding:2px 9px 8px;border:0;border-radius:0 0 7px 7px;background:linear-gradient(to bottom,#173529ef,#173529a6);box-shadow:0 6px 12px #10241a22;scrollbar-width:thin}
 .desktop-map-ui .standings #leaders>.leader{padding:8px 3px;border-top:1px solid #bbccac18;font-size:12px}
 .desktop-map-ui .standings #leaders>.leader.me{background:#648f8c42;box-shadow:inset 2px 0 #83b7b1;border-radius:4px;padding-left:6px;padding-right:6px}
}
@media(min-width:901px) and (max-height:650px){.desktop-map-ui{width:202px}.desktop-map-ui .standings #leaders>.leader{padding-top:6px;padding-bottom:6px}}
/* Sprint is presented as a reserve meter while retaining press-and-hold input. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash{border:0;border-radius:0;background:transparent;box-shadow:none;filter:none;transform:none;padding-bottom:14px;color:#d6d7b5;overflow:visible}
 .desktop-dock .desktop-march>.dash::before{content:'';position:absolute;left:0;right:0;bottom:2px;height:8px;border-radius:4px;background:#112b20;box-shadow:inset 0 1px 2px #0b1b1466;pointer-events:none}
 .desktop-dock .desktop-march>.dash .dash-fill{inset:auto 0 2px;height:8px;border-radius:4px;background:linear-gradient(90deg,#8c773c,#c9b567 70%,#e4d697);box-shadow:0 0 5px #c8b86620,inset 0 1px #f6e9b34d}
 .desktop-dock .desktop-march>.dash strong{font-size:14px;font-weight:500;letter-spacing:.4px}
 .desktop-dock .desktop-march>.dash .dash-icon{font-size:22px;color:#cdbb7b}
 .desktop-dock .desktop-march>.dash kbd{top:1px;right:2px;font-size:9px;padding:3px 5px;color:#aeb999;border:0;background:#314535;border-radius:3px}
 .desktop-dock .desktop-march>.dash .dash-multiplier{background:#354a3670;color:#bdbb91}
 .desktop-dock .desktop-march>.dash.burst .dash-fill{background:linear-gradient(90deg,#a2863d,#eddb8f);box-shadow:0 0 7px #e5c97555}
}
@media(min-width:901px){
 .desktop-dock .dash .dash-fill{overflow:hidden}
 .desktop-dock .dash .dash-fill::after{content:'';position:absolute;inset:0;opacity:0;background:linear-gradient(100deg,transparent 25%,#fff4c999 50%,transparent 75%);transform:translateX(-110%);pointer-events:none}
 .desktop-dock .dash.charged .dash-fill::after{animation:reserve-ready .85s ease-out 1}
 .desktop-dock .dash.burst .dash-fill::after{animation:reserve-ready .65s ease-out infinite}
}
@keyframes reserve-ready{0%{opacity:0;transform:translateX(-110%)}25%{opacity:.8}100%{opacity:0;transform:translateX(110%)}}
@media(prefers-reduced-motion:reduce){.desktop-dock .dash .dash-fill::after{animation:none!important}}
/* Readable one-row HUD and a clean self summary without the inherited selection stripe. */
@media(min-width:901px){
 .desktop-hud .your-estate .eyebrow{font-size:10px;letter-spacing:.7px;color:#c2cbb0}
 .desktop-hud .your-estate strong{font-size:23px}.desktop-hud .rank{font-size:15px}
 .desktop-hud .holdings-grid{width:272px;gap:6px}.desktop-hud .holding{grid-template-columns:25px auto;gap:1px 4px;padding:2px 4px}
 .desktop-hud .holding svg{width:25px;height:25px}.desktop-hud .holding strong{font-size:21px}
 .desktop-hud .holding>span{font-size:11px;color:#bec8ac}
 .desktop-hud .troop-group small{font-size:12px;color:#c0cbb0}.desktop-hud .troop-group b{font-size:15px}
 .desktop-hud .troop-group .warrior{width:21px;height:32px}.desktop-hud .troop-group.empty{opacity:.65}
 .desktop-map-ui{width:248px}
 .desktop-map-ui .desktop-ranking-toggle{height:43px;padding:7px 9px;gap:8px;font-size:14px}
 .desktop-map-ui .desktop-ranking-toggle>svg{width:22px;height:22px;stroke-width:2}
 .desktop-map-ui .desktop-self{box-shadow:none!important;border:0!important;border-radius:0;font-size:14px;gap:8px}
 .desktop-self .position{font-size:14px;min-width:19px;color:#e5d7a4;font-weight:700}
 .desktop-self .leader-name{font-size:14px;font-weight:600;color:#e5ead6}
 .desktop-self .leader-score{font-size:14px;color:#dce5c9;font-weight:600}
 .desktop-self .flag{width:20px;height:25px}
 .desktop-map-ui .standings #leaders>.leader{font-size:14px}.desktop-map-ui .standings .leader-score{font-size:13px}
}
@media(min-width:901px) and (max-height:650px){.desktop-map-ui{width:230px}}
@media(min-width:901px){
 .desktop-self .position{order:1;min-width:0}.desktop-self .position::before{content:'#'}
 .desktop-self .flag{display:none}
 .desktop-self .leader-score{order:2;padding-left:8px;border-left:1px solid #85967b66}
 .desktop-self .leader-name{order:3;flex:1;text-align:left}
 .desktop-map-ui:not(.ranking-open) .desktop-ranking-toggle{background:#203329f2}
}
/* One compact control: the sprint reserve runs into an arched battle seal. */
@media(min-width:901px){
 .desktop-dock{flex-basis:38px;padding:0 0 2px}
 .desktop-dock .desktop-march{--march-size:36px;align-items:center}
 .desktop-dock .desktop-march>.dash{height:36px;min-height:36px;padding:0 70px 25px}
 .desktop-dock .desktop-march>.dash strong{font-size:13px}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{bottom:8px;border-radius:4px 0 0 4px}
 .desktop-dock .desktop-march>.dash kbd{top:0;right:12px}
 .desktop-dock .desktop-march .army-command-slot.available{flex-basis:82px;width:82px}
 .desktop-dock .desktop-march .army-command{width:82px;height:36px;margin:0;padding:2px 12px;display:flex;flex-direction:column;justify-content:center;gap:0;border-radius:40px 40px 12px 12px;border:1px solid #c7a16e;background:linear-gradient(160deg,#9b5946,#683c32);box-shadow:inset 0 1px #efd4a63d,0 2px 0 #14271e}
 .desktop-dock .army-command svg{width:22px;height:22px;flex:none}
 .desktop-dock .army-command::before{display:none}
 .desktop-dock .army-command::after{position:static;content:'ПРОБЕЛ';padding:0;border:0;background:none;font-size:7px;line-height:9px;letter-spacing:.6px}
 .desktop-dock .army-command[aria-pressed=true]{background:linear-gradient(160deg,#b57451,#85503c);box-shadow:inset 0 0 0 1px #efcf8c77,0 2px 0 #14271e}
 .desktop-dock .desktop-march:has(.army-command-slot.available)>.dash{margin-right:-1px}
}
/* A shallow reserve strip rises only around the battle control in the corner. */
@media(min-width:901px){
 .desktop-dock{flex-basis:24px;padding:0 0 2px;position:relative;z-index:4}
 .desktop-dock .desktop-march{--march-size:22px;align-items:flex-end}
 .desktop-dock .desktop-march>.dash{height:22px;min-height:22px;padding:0 64px 12px}
 .desktop-dock .desktop-march>.dash strong{font-size:12px}.desktop-dock .desktop-march>.dash .dash-icon{font-size:17px}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{bottom:0}
 .desktop-dock .desktop-march>.dash kbd{top:-5px;right:17px;padding:1px 4px}
 .desktop-dock .desktop-march .army-command-slot{position:relative}
 .desktop-dock .desktop-march .army-command-slot.available{width:142px;flex-basis:142px}
 .desktop-dock .army-command-slot.available::before{content:'';position:absolute;right:-1px;bottom:-4px;width:156px;height:57px;background:#203529;border-radius:48px 0 0 0;pointer-events:none}
 .desktop-dock .desktop-march .army-command{position:absolute;right:0;bottom:0;width:132px;height:44px;padding:5px 10px;display:grid;grid-template-columns:26px auto;grid-template-rows:18px 11px;column-gap:7px;row-gap:1px;align-content:center;border-radius:26px 12px 12px 12px}
 .desktop-dock .army-command svg{width:26px;height:26px;grid-column:1;grid-row:1/3}
 .desktop-dock .army-command::before{display:block;grid-column:2;grid-row:1;font-size:11px;line-height:18px}
 .desktop-dock .army-command::after{grid-column:2;grid-row:2;position:static;font-size:8px;line-height:11px;color:#cbb895}
}
/* Reserve label stays centered inside the track at every charge level. */
@media(min-width:901px){
 .desktop-dock{flex-basis:28px}
 .desktop-dock .desktop-march{--march-size:26px}
 .desktop-dock .desktop-march>.dash{height:26px;min-height:26px;padding:0 14px;gap:8px;align-items:center;justify-content:center;color:#fff1c7}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{height:24px;bottom:0;border-radius:12px 0 0 12px}
 .desktop-dock .desktop-march>.dash .dash-fill{background:linear-gradient(90deg,#88723b,#ae9550 75%,#c4b06a);box-shadow:inset 0 1px #eadba93d}
 .desktop-dock .desktop-march>.dash strong{font-size:12px;font-weight:600;line-height:18px;text-shadow:0 1px 2px #172c1b,0 0 4px #172c1b80}
 .desktop-dock .desktop-march>.dash .dash-icon{font-size:16px;color:#fff1c7}
 .desktop-dock .desktop-march>.dash kbd{position:relative;inset:auto;margin:0;padding:0 0 0 8px;border:0;border-left:1px solid #f4e4b55c;border-radius:0;background:none;color:#fff1c7;font-size:10px;line-height:14px;text-shadow:0 1px 2px #172c1b}
 .desktop-dock .dash .dash-fill::after{animation:none!important;display:none}
}
/* The map follows the compact ranking width instead of dominating the corner. */
@media(min-width:901px){
 .desktop-map-ui{width:212px}
 .desktop-map-ui .minimap-wrap{padding:5px;margin-bottom:5px}
 .desktop-map-ui .desktop-ranking-toggle{height:34px;padding:5px 7px;gap:6px}
 .desktop-map-ui .desktop-ranking-toggle>svg{width:18px;height:18px}
 .desktop-map-ui .desktop-ranking-toggle .ranking-chevron{width:14px}
 .desktop-map-ui .desktop-self{gap:5px;font-size:13px}
 .desktop-self .position,.desktop-self .leader-name,.desktop-self .leader-score{font-size:13px}
 .desktop-self .leader-score{padding-left:6px}
 .desktop-map-ui .standings #leaders>.leader{font-size:13px;padding-top:6px;padding-bottom:6px}
}
@media(min-width:901px) and (max-height:650px){.desktop-map-ui{width:202px}}

/* A raised reservoir on the left feeds the uninterrupted sprint tube. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash{padding:0}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{left:145px;border-radius:0}
 .desktop-dock .desktop-march>.dash .dash-reservoir{position:absolute;left:0;bottom:0;width:150px;height:44px;display:grid;grid-template-columns:25px auto;grid-template-rows:19px 12px;gap:1px 7px;align-content:center;justify-content:center;padding:4px 12px;border:1px solid #bda56c;border-radius:12px 27px 12px 12px;background:linear-gradient(to top,#9d8748 calc(var(--charge)*100%),#203529 0);box-shadow:0 0 0 8px #203529,inset 0 1px #ecd9a04d;z-index:1}
 .desktop-dock .desktop-march>.dash .dash-reservoir .dash-icon{grid-column:1;grid-row:1/3;align-self:center;font-size:24px;color:#f0dfab}
 .desktop-dock .desktop-march>.dash .dash-reservoir>span:not(.dash-icon){grid-column:2;grid-row:1;position:relative}
 .desktop-dock .desktop-march>.dash .dash-reservoir strong{font-size:12px;line-height:19px}
 .desktop-dock .desktop-march>.dash .dash-reservoir kbd{grid-column:2;grid-row:2;inset:auto;position:relative;justify-self:center;border:0;padding:0;line-height:12px;font-size:9px;color:#eee1bd}
}
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash .dash-reservoir{box-shadow:inset 0 1px #ecd9a04d}
 .desktop-dock .dash-reservoir::before{content:'';position:absolute;z-index:-1;left:-8px;right:-9px;top:-8px;bottom:24px;border-radius:20px 36px 0 0;background:#203529;pointer-events:none}
}
/* Status effects sit near the top-left of desktop and landscape tablet fields. */
@media(min-width:901px){.arena .status-effects{top:12px;bottom:auto;left:12px;align-items:flex-start}}
@media(min-width:768px) and (max-width:900px) and (orientation:landscape){.arena .status-effects{top:54px;bottom:auto;left:12px;align-items:flex-start}}
/* Matched end caps: the backing sits behind the vessel, never across its face. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash::after{content:'';position:absolute;left:0;bottom:-4px;width:184px;height:61px;border-radius:16px 38px 0 0;background:#203529;z-index:-1;pointer-events:none}
 .desktop-dock .dash-reservoir::before{display:none}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{left:164px}
 .desktop-dock .desktop-march>.dash .dash-reservoir{width:168px;height:48px;padding:6px 12px;grid-template-columns:28px max-content;grid-template-rows:20px 14px;column-gap:8px;row-gap:0;border-radius:12px 25px 12px 12px;overflow:hidden;box-shadow:inset 0 1px #f1dc9c55,inset 0 -1px #544c2744}
 .desktop-dock .desktop-march>.dash .dash-reservoir .dash-icon{font-size:27px;line-height:28px;justify-self:center;text-shadow:none}
 .desktop-dock .desktop-march>.dash .dash-reservoir strong{font-size:14px;line-height:20px;font-weight:700;letter-spacing:.2px;display:flex;align-items:center;justify-content:center;gap:5px;text-shadow:0 1px 2px #263d22}
 .desktop-dock .desktop-march>.dash .dash-reservoir .dash-multiplier{font-size:11px;padding:1px 4px;line-height:16px;vertical-align:middle}
 .desktop-dock .desktop-march>.dash .dash-reservoir kbd{font-size:10px;font-weight:600;line-height:14px;letter-spacing:.5px;color:#f2e7c8;text-shadow:none}
 .desktop-dock .desktop-march .army-command-slot.available{width:178px;flex-basis:178px}
 .desktop-dock .army-command-slot.available::before{width:192px;height:61px;border-radius:38px 0 0 0}
 .desktop-dock .desktop-march .army-command{width:168px;height:48px;padding:6px 12px;grid-template-columns:28px max-content;grid-template-rows:20px 14px;column-gap:8px;row-gap:0;border-radius:25px 12px 12px 12px}
 .desktop-dock .army-command svg{width:28px;height:28px;align-self:center}
 .desktop-dock .army-command::before{font-size:14px;font-weight:700;line-height:20px;letter-spacing:.1px}
 .desktop-dock .army-command::after{font-size:10px;font-weight:600;line-height:14px;letter-spacing:.5px;color:#f0ddc0}
}

/* Equal eight-pixel green rims, with mirrored curves around both end controls. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash{isolation:isolate}
 .desktop-dock .desktop-march>.dash::after{display:block;inset:auto auto 0 -8px;width:184px;height:56px;border-radius:20px 33px 0 0;animation:none;transform:none;opacity:1}
 .desktop-dock .army-command-slot.available::before{right:-8px;bottom:-8px;width:184px;height:64px;border-radius:33px 20px 20px 20px}
 .desktop-dock .desktop-march>.dash::before,.desktop-dock .desktop-march>.dash .dash-fill{border-radius:0 12px 12px 0}
 .desktop-dock .desktop-march .army-command,.desktop-dock .desktop-march .army-command[aria-pressed=true]{box-shadow:inset 0 1px #f1dc9c55,inset 0 -1px #544c2744}
}

/* Shared wind emblem: a crisp vector, independent of font glyph metrics. */
.dash-icon>svg{display:block;width:32px;height:32px}
.app>.touch-controls .dash-mobile .dash-glyph svg{width:32px;height:32px}
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash .dash-reservoir{grid-template-columns:32px max-content;column-gap:8px}
 .desktop-dock .desktop-march>.dash .dash-reservoir .dash-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;line-height:1;color:#fff0bf}
}

/* Rounded field corners above the controls and a quiet continuous outer rim. */
.app{border-radius:0;box-shadow:inset 0 0 0 2px #8d98716b}
@media(min-width:901px){
 .desktop-dock .desktop-march{position:relative}
 .desktop-dock .desktop-march>.dash::after{border-top-left-radius:0}
 .desktop-dock .army-command-slot.available::before{border-top-right-radius:0}
 .desktop-dock .desktop-march::before,.desktop-dock .army-command-slot.available::after{content:'';position:absolute;bottom:56px;width:12px;height:12px;pointer-events:none}
 .desktop-dock .desktop-march::before{left:0;background:radial-gradient(circle at 100% 0,transparent 11.5px,#203529 12px)}
 .desktop-dock .army-command-slot.available::after{right:0;background:radial-gradient(circle at 0 0,transparent 11.5px,#203529 12px)}
}

/* Match the ranking heraldry; give estate, buildings and troops clear rhythm. */
.your-estate .shield{position:relative;display:block;flex:none;width:32px;height:40px;padding:0;border:0;border-radius:0;clip-path:polygon(0 0,100% 0,100% 75%,50% 100%,0 75%)}
.your-estate .shield::after{content:'';position:absolute;width:62%;height:38%;left:19%;top:23%;background:var(--crown,#172c24);clip-path:polygon(0 5%,28% 38%,50% 0,72% 38%,100% 5%,88% 78%,88% 100%,12% 100%,12% 78%)}
@media(min-width:901px){
 .desktop-hud .rank{display:none}
 .desktop-hud .your-estate{gap:10px;align-items:flex-start}
 .desktop-hud .your-estate .shield{width:36px;height:44px;padding:0}
 .desktop-hud .your-estate .eyebrow{margin:0 0 3px}
 .desktop-hud .holdings{gap:24px;align-items:center}
 .desktop-hud .holdings-grid{width:280px;gap:7px}
 .desktop-hud .holding{min-height:44px;padding:3px 5px}
 .desktop-hud .troops{position:relative;gap:22px;padding-left:24px;align-items:center;min-height:44px}
 .desktop-hud .troops::before{content:'';position:absolute;left:0;top:3px;bottom:3px;width:1px;background:linear-gradient(to bottom,transparent,#c4bc8770 35%,#c4bc8770 65%,transparent)}
 .desktop-hud .troop-group{gap:7px}
}
@media(min-width:901px) and (max-width:1050px){
 .desktop-hud .holdings{gap:18px}.desktop-hud .holdings-grid{width:264px;gap:4px}
 .desktop-hud .troops{gap:14px;padding-left:18px}
}

/* Header actions share the warm heraldic palette and generous icon sizing. */
.topbar .top-actions{gap:8px;align-items:center}
.topbar .top-actions .icon-button{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:1px solid #b8aa7359;border-radius:9px 9px 14px 14px;background:linear-gradient(160deg,#364b36,#263c2d);color:#e1d4a4;box-shadow:inset 0 1px #f1df9d1c,0 2px 3px #10241b26;transition:background .16s,border-color .16s,color .16s;filter:none;transform:none}
.topbar .top-actions .icon-button svg{display:block;width:22px;height:22px;stroke-width:2}
.topbar .top-actions #sound[aria-pressed=false]{color:#a4b098;background:linear-gradient(160deg,#2c4032,#24382c);border-color:#86957955}
.topbar .top-actions #surrender{color:#dbc8a1}
.topbar .top-actions .icon-button:focus-visible{outline:2px solid #edcf83;outline-offset:3px}
.topbar .top-actions .icon-button:active:not(:disabled){background:#20372a;box-shadow:inset 0 2px 4px #10241b66}
@media(hover:hover){
 .topbar .top-actions .icon-button:hover:not(:disabled){background:linear-gradient(160deg,#455a3c,#304a35);border-color:#d2bd7eaa;color:#fff0bd}
 .topbar .top-actions #surrender:hover:not(:disabled){background:linear-gradient(160deg,#624937,#493b2c);border-color:#cca16e;color:#ffe1b3}
}
@media(prefers-reduced-motion:reduce){.topbar .top-actions .icon-button{transition:none}}

@media(min-width:901px){.desktop-hud .holdings{margin-left:12px}}

/* A constant, subtle translucency; controls never fade near heroes. */
@media(min-width:901px){.desktop-map-ui{opacity:.9}}

/* Large displays get breathing room; small screens keep their usable area. */
html,body{height:var(--game-height,100dvh);overflow:hidden}
body{display:flex;align-items:center;justify-content:center;background:#101d17}
.app{flex:none;width:100%;max-width:none;height:100%;max-height:none;margin:0;min-height:0}
/* Width grows gently above HD; margins cap at 18% per side and 3% vertically. */
@media(min-width:901px){
 .app{width:min(100%,max(calc(1126.4px + 12%),64%));height:min(100%,max(720px,94%))}
}
@media(min-width:1281px),(min-width:901px) and (min-height:721px){
 body{background:#101b15 url('images/game-forest.svg?v=0.8.83') center/cover no-repeat}
 .app{border-radius:14px;box-shadow:inset 0 0 0 3px #8a94644d,inset 0 0 0 5px #0d211f55,0 0 20px 8px #20352999,0 0 54px 24px #1b2e2277,0 12px 100px 36px #080f0b66}
}

/* One horizontal charge front for the raised vessel and the entire tube. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash{container-type:inline-size}
 .desktop-dock .desktop-march>.dash .dash-fill{left:0;background:linear-gradient(90deg,#9d8748,#c4b06a);border-radius:12px;transition:transform .12s linear}
 .desktop-dock .desktop-march>.dash .dash-reservoir{background:#203529}
 .desktop-dock .desktop-march>.dash .dash-reservoir::after{content:'';position:absolute;left:-1px;top:0;bottom:0;width:100cqw;background:linear-gradient(90deg,#87733d,#aa985b);transform:scaleX(var(--charge));transform-origin:left center;transition:transform .12s linear;pointer-events:none;z-index:0}
 .desktop-dock .desktop-march>.dash .dash-reservoir>*{position:relative;z-index:1}
 .desktop-dock .desktop-march>.dash.burst .dash-fill{background:linear-gradient(90deg,#9d8748,#c4b06a)}
}
@media(prefers-reduced-motion:reduce){.desktop-dock .desktop-march>.dash .dash-fill,.desktop-dock .desktop-march>.dash .dash-reservoir::after{transition:none}}


/* Blend the darker button into the tube without a vertical seam. */
@media(min-width:901px){
 .desktop-dock .desktop-march>.dash .dash-reservoir{border-right:0;border-bottom:0;border-bottom-right-radius:0;box-shadow:inset 0 1px #f1dc9c33}
 .desktop-dock .desktop-march>.dash .dash-reservoir::after{background:linear-gradient(90deg,#9d8748,#c4b06a)}
 .desktop-dock .desktop-march>.dash .dash-reservoir::before{display:block;content:'';position:absolute;inset:0;z-index:1;border-radius:inherit;background:linear-gradient(90deg,#00000042 0%,#0000003d 45%,#00000020 72%,transparent 100%);pointer-events:none}
 .desktop-dock .desktop-march>.dash .dash-reservoir>*{z-index:2}
}

/* Keep the click target stable while live ranking text is replaced. */
.desktop-ranking-toggle *{pointer-events:none}

@media(min-width:901px){.desktop-hud .holdings-grid{grid-template-columns:repeat(5,minmax(0,1fr));width:344px}}
@media(min-width:901px) and (max-width:1050px){.desktop-hud .holdings-grid{width:330px;gap:3px}.desktop-hud .holdings{gap:12px;margin-left:6px}.desktop-hud .troops{gap:10px;padding-left:12px}}

@media(min-width:901px){
 html[lang=en] .desktop-dock .army-command::before{content:'Rally here'}
 html[lang=en] .desktop-dock .army-command[aria-pressed=true]::before{content:'Dismiss'}
 html[lang=en] .desktop-dock .army-command::after{content:'SPACE'}
}

@media(min-width:901px){
 .desktop-map-ui[data-ranking-state="preview"] .standings{background:none;box-shadow:none;padding:0;cursor:pointer}
 .desktop-map-ui[data-ranking-state="preview"] #leaders>.leader{background:#173529ef;margin:0;padding:8px 9px}
 .desktop-map-ui[data-ranking-state="preview"] #leaders>.leader:nth-child(1){opacity:1}
 .desktop-map-ui[data-ranking-state="preview"] #leaders>.leader:nth-child(2){opacity:.68}
 .desktop-map-ui[data-ranking-state="preview"] #leaders>.leader:nth-child(3){opacity:.38}
 .desktop-map-ui[data-ranking-state="preview"] #leaders>.leader:nth-child(4){opacity:.14}
 .desktop-map-ui[data-ranking-state="full"] .standings{cursor:pointer}
}
