/* A calmer HUD around the battlefield (owner, 2026-10-22): the player strip, the battlefield minimap, the Garrison and
   the upkeep panel each shrink a little, and everything hung below the strip moves up into the space it frees. The
   scales multiply the existing HUD scale (deployment-polish.css); phone docks keep their own layout. */
body:not(.wb-mobile-layout) #wb-ui#wb-ui{--wb-map-w:clamp(166px,12.5vw,190px);--wb-strip-scale:calc(var(--wb-hud-scale,1) * .86)}
body:not(.wb-mobile-layout) #wb-ui#wb-ui > #wb-heroes{transform:translateX(-50%) scale(var(--wb-strip-scale))!important;transform-origin:center top}
/* The minimap takes the top-right corner level with the strip. The strip stays centred and balanced: it keeps the
   minimap's width clear on both sides (campaigns keep their short centred strip). */
body:not(.wb-mobile-layout) #wb-ui#wb-ui:not(.wb-campaign-active) > #wb-heroes{
 left:50%!important;right:auto!important;
 width:min(1560px,calc((100vw - 2 * (22px + var(--wb-map-w) * var(--wb-hud-scale,1))) / var(--wb-strip-scale)))!important;
}
body:not(.wb-mobile-layout) #wb-ui#wb-ui > #wb-minimap{top:6px!important}
/* View Deck is placed by client.mjs directly under your strip box, so it follows the strip by itself. */
body:not(.wb-mobile-layout) #wb-ui#wb-ui > :is(#wb-barracks,#wb-round,#wb-duel,#wb-shop){margin-top:calc(-10px * var(--wb-hud-scale,1))!important}
/* The Garrison starts level with the recruitment board (the same top as deployment-polish.css gives #wb-shop). */
body:not(.wb-mobile-layout) #wb-ui#wb-ui #wb-barracks{top:calc(100px * var(--wb-hud-scale,1) + 56px)!important;transform:scale(calc(var(--wb-hud-scale,1) * .88))!important;transform-origin:left top}
body:not(.wb-mobile-layout) #wb-ui#wb-ui #wb-resources{transform:scale(calc(var(--wb-hud-scale,1) * .88))!important;transform-origin:left bottom}

/* Fixed selected-unit anchor above the reserved Traits space, including when no trait is active or shown.
   The 174px reserve contains the 74px frame and at most 100px of buffs/actions. Extra buffs scroll inside it;
   neither a new buff row nor a shorter trait list moves the portrait or bleeds into the Traits panel. */
body:not(.wb-mobile-layout) #wb-ui#wb-ui > #wb-target{
 left:auto!important;right:12px!important;bottom:auto!important;
 top:calc(100% - var(--wb-trait-panel-height) - 36px - 174px * var(--wb-hud-scale,1))!important;
 transform:scale(var(--wb-hud-scale,1))!important;transform-origin:right top;
}
body:not(.wb-mobile-layout) #wb-ui#wb-ui #wb-target-effects{
 max-height:100px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;overscroll-behavior:contain;
}
body:not(.wb-mobile-layout) #wb-ui#wb-ui.wb-has-target #wb-squads-right{
 max-height:max(0px,calc(var(--wb-target-top,100dvh) - var(--wb-map-bottom) - 20px))!important;overflow-y:auto;
}

/* Minimap: four arena tiles only. No heading, "Your fight" button or arena numbers; your own tile returns you to your fight. */
body:not(.wb-mobile-layout) #wb-ui#wb-ui #wb-minimap{width:var(--wb-map-w)!important;padding:5px!important}
#wb-ui#wb-ui #wb-minimap #wb-minimap-zones{gap:5px}
#wb-ui#wb-ui #wb-minimap .wb-map-commanders{left:5px;right:5px;bottom:5px;gap:4px;height:20px!important;min-height:20px!important}
#wb-ui#wb-ui #wb-minimap .wb-map-commanders>span{height:20px!important;min-height:20px!important;line-height:20px}
#wb-ui#wb-ui #wb-minimap .wb-map-commanders img{width:20px!important;height:20px!important}
/* A Ready commander gets the player strip's green tick at the bottom centre of its crest instead of a "Ready" label. */
#wb-ui#wb-ui #wb-minimap .wb-map-ready{position:absolute;left:50%;right:auto;top:auto;bottom:-2px;z-index:3;display:block;transform:translateX(-50%);line-height:0;pointer-events:none}
#wb-ui#wb-ui #wb-minimap .wb-map-ready .wb-check{display:block;width:15px;height:13px;background-image:url('./skin/checkmarks/check-green.png?art=check-green-v1');filter:drop-shadow(0 1px 1px #000) drop-shadow(0 0 2px #000)}
