/* Mobile uses the same Warcraft card and brown frame art. Panels move into a
   thumb-accessible dock; desktop chrome and the battle meter stay unchanged. */
#wb-mobile-dock[hidden],#wb-mobile-details[hidden]{display:none!important}
#wb-mobile-dock{display:none}
#wb-touch-menu{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:45;min-width:44px;min-height:44px;font-size:22px;line-height:1}
#wb-touch-menu[hidden]{display:none}
#wb-mobile-details{position:fixed;inset:0;z-index:1800;display:flex;align-items:flex-end;justify-content:center;pointer-events:auto;background:#070605a8;box-sizing:border-box;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));font:14px/1.5 Arial,sans-serif;color:#eee5d4}
.wb-mobile-detail-frame{position:relative;box-sizing:border-box;width:min(560px,100%);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:38px 16px 16px;border:10px solid transparent;border-image:url('./skin/dialogue-ui/brown-panel-frame.png') 80 / 10px stretch;background:linear-gradient(145deg,#322a21,#1b1712 75%);box-shadow:0 12px 60px #000a}
.wb-mobile-detail-frame button{min-height:44px;min-width:44px;box-sizing:border-box;border:1px solid #a38b5b;background:linear-gradient(#51402b,#2d2218);border-radius:3px;padding:9px 12px;color:#f3dfb5;font:14px/1.3 Arial,sans-serif;touch-action:manipulation}
.wb-mobile-detail-frame button:disabled{opacity:.45}
.wb-mobile-detail-frame [data-mobile-close]{position:absolute;top:0;right:0;background:#211910;padding:0;font-size:27px}
.wb-mobile-detail-frame :is(h2,h3,strong){color:#f1d9a3}
.wb-mobile-detail-frame .wb-tip-heading{display:flex;gap:12px;align-items:center;margin-bottom:15px}
.wb-mobile-detail-frame .wb-tip-heading img{width:52px;height:52px;object-fit:cover;border:1px solid #baa070;flex:none}
.wb-mobile-detail-frame .wb-tip-heading strong{font:20px/1.2 WarbandFriz,Georgia,serif}
.wb-mobile-detail-frame .wb-tip-heading small{display:block;color:#c7bca7;font-size:12px;margin-top:4px}
.wb-mobile-detail-frame :is(.wb-tip-action,.wb-tip-location){display:none}
.wb-mobile-detail-frame .wb-card-attributes,.wb-mobile-detail-frame .wb-tip-attributes{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}
.wb-mobile-detail-frame [data-card-tag]{width:30px;height:30px;display:inline-flex}
.wb-mobile-detail-frame [data-card-tag] img{width:28px;height:28px}
.wb-mobile-detail-frame .wb-library-stats{margin:12px 0}
.wb-mobile-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border-top:1px solid #776044;margin-top:16px;padding-top:14px}
.wb-mobile-detail-actions>[data-mobile-choice]{grid-column:1/-1}
.wb-mobile-training{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#d0c0a3;font-size:13px}
.wb-mobile-training select{min-height:44px;min-width:135px;border:1px solid #a38b5b;background:#17120e;color:#f3dfb5;font-size:16px;padding:5px 8px}
.wb-mobile-position-picker{grid-column:1/-1;display:grid;gap:6px;margin-bottom:6px}
.wb-mobile-position-picker>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.wb-mobile-position-picker small{color:#b8ac98;font-size:11px}
.wb-mobile-position-picker button.selected{background:#3b5137;border-color:#a8c88b}
.wb-mobile-position-picker button{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:6px!important;gap:3px}
.wb-mobile-position-picker button img{width:25px;height:25px;object-fit:cover;border:1px solid #8c7853}
.wb-mobile-position-picker button span{font-size:10px;line-height:12px;white-space:nowrap}
.wb-touch-input canvas{touch-action:none}
.wb-touch-input :is(button,a,input,select){-webkit-tap-highlight-color:transparent}
.wb-touch-input :is(.wb-library-content,.wb-explorer-layout,.wb-campaign-frame,.wb-lobbies-frame,.wb-graphics-frame,.wb-duel-report-scroll){touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.wb-touch-input :is(#wb-shop-cards,#wb-warband-cards,#wb-barracks-cards,#wb-heroes){touch-action:pan-x;-webkit-overflow-scrolling:touch}
.wb-touch-input #wb-ui :is([data-card],[data-field-card-id]){touch-action:pan-x}
.wb-touch-input #wb-lobby :is(.wb-faction,.wb-draft-slot-target){touch-action:pan-y}
.wb-mobile-layout{--wb-mobile-safe-bottom:env(safe-area-inset-bottom,0px);--wb-mobile-safe-top:env(safe-area-inset-top,0px);--wb-mobile-nav:52px;--wb-mobile-resources:50px;--wb-mobile-bottom:calc(var(--wb-mobile-safe-bottom) + var(--wb-mobile-nav) + var(--wb-mobile-resources));--wb-mobile-dock-height:190px}
.wb-mobile-layout #wb-ui{--wb-hud-scale:1!important;--wb-shop-scale:1!important;--wb-header-bottom:80px;--wb-chat-height:0px}
.wb-mobile-layout #wb-ui>#wb-heroes{left:8px!important;right:8px!important;top:calc(var(--wb-mobile-safe-top) + 5px)!important;width:auto!important;transform:none!important;grid-template-columns:repeat(8,140px)!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 4px!important;scrollbar-width:none;touch-action:pan-x}
.wb-mobile-layout #wb-ui.wb-campaign-active>#wb-heroes{width:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.wb-mobile-layout #wb-heroes button.wb-hero{flex:0 0 140px}
.wb-mobile-layout #wb-heroes button.wb-hero{height:66px!important;min-height:66px!important;grid-template-columns:25px minmax(0,1fr)!important;grid-template-rows:25px 19px!important;gap:3px 5px!important;padding:4px!important}
.wb-mobile-layout #wb-heroes .wb-hero-icon{width:25px;height:25px}
.wb-mobile-layout #wb-heroes .wb-hero-vitals{--wb-hero-bar-height:6px;--wb-hero-number-space:24px;height:19px;padding-top:10px}
.wb-mobile-layout #wb-heroes .wb-hero-health{font-size:9px!important;line-height:10px!important}
.wb-mobile-layout #wb-heroes .wb-hero-level{font-size:9px!important;line-height:9px!important}
.wb-mobile-layout #wb-heroes .wb-hero-name{font-size:11px;line-height:13px}
.wb-mobile-layout #wb-heroes .wb-hero-player{font-size:10px!important;line-height:11px!important}
.wb-mobile-layout #wb-ui #wb-round{top:calc(var(--wb-mobile-safe-top) + 77px)!important;transform:translateX(-50%)!important;left:50%!important;width:160px!important;pointer-events:none}
.wb-mobile-layout #wb-round #wb-timer{width:42px;height:42px;position:relative;margin:auto}
.wb-mobile-layout #wb-round #wb-clock{font-size:18px!important}
.wb-mobile-layout #wb-round :is(#wb-round-number,#wb-phase){font-size:10px!important;line-height:12px!important}
.wb-mobile-layout #wb-ui #wb-duel{top:calc(var(--wb-mobile-safe-top) + 139px)!important;left:50%!important;width:min(400px,calc(100vw - 28px))!important;max-width:none!important;transform:translateX(-50%)!important;padding:0!important}
.wb-mobile-layout #wb-ui #wb-duel :is(#wb-duel-names,#wb-duel-values){font-size:11px!important}
.wb-mobile-layout #wb-mobile-dock{position:absolute;left:0;right:0;bottom:0;display:flex;gap:2px;padding:4px max(5px,env(safe-area-inset-right)) calc(4px + var(--wb-mobile-safe-bottom)) max(5px,env(safe-area-inset-left));min-height:var(--wb-mobile-nav);box-sizing:border-box;pointer-events:auto;background:linear-gradient(#342b21,#1b1611);border-top:1px solid #a98d59;z-index:25}
.wb-mobile-layout #wb-ui #wb-mobile-dock button{min-height:44px!important;padding:5px 6px!important;border:1px solid #776145!important;border-image:none!important;font:12px/1.2 Arial,sans-serif!important;color:#ddd0b2;background:#251e17!important;flex:1;box-shadow:none!important}
.wb-mobile-layout #wb-ui #wb-mobile-dock button[aria-expanded=true]{background:linear-gradient(#695334,#392b1b)!important;border-color:#d2b572!important;color:#fff0c7}
.wb-mobile-layout #wb-ui #wb-mobile-dock :is([data-mobile-camera],[data-action=menu]){flex:0 0 44px;font-size:23px!important}
.wb-mobile-layout #wb-ui #wb-resources,.wb-mobile-layout #wb-ui.wb-battle #wb-resources{transform:none!important;left:0!important;right:0!important;top:auto!important;bottom:calc(var(--wb-mobile-nav) + var(--wb-mobile-safe-bottom))!important;width:auto!important;height:var(--wb-mobile-resources);padding:3px 8px!important;display:flex;align-items:center;gap:8px;border:0!important;border-image:none!important;border-top:1px solid #786044!important;background:#201a14f5!important;z-index:22;box-sizing:border-box}
.wb-mobile-layout #wb-resources :is(#wb-resource-phase,.wb-army-level,#wb-streak,#wb-ready-status,#wb-power){display:none!important}
.wb-mobile-layout #wb-resources .wb-resource-totals{display:flex;gap:8px;margin:0;flex:none}
.wb-mobile-layout #wb-resources .wb-resource{gap:4px;padding:0;min-width:0}
.wb-mobile-layout #wb-resources .wb-resource img{width:22px;height:22px}
.wb-mobile-layout #wb-resources .wb-resource small{display:none}
.wb-mobile-layout #wb-resources .wb-resource b{font-size:15px!important}
.wb-mobile-layout #wb-resources .wb-resource-buttons{margin:0;flex:1}
.wb-mobile-layout #wb-ui #wb-resources button{min-height:44px!important;margin:0!important;padding:4px 7px!important;font-size:12px!important;white-space:nowrap}
.wb-mobile-layout #wb-ui #wb-ready{width:auto!important;min-width:64px;flex:none}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband,#wb-barracks,#wb-minimap){position:absolute;left:7px!important;right:7px!important;top:auto!important;bottom:var(--wb-mobile-bottom)!important;width:auto!important;max-width:none!important;max-height:var(--wb-mobile-dock-height)!important;transform:none!important;transform-origin:center;box-sizing:border-box;z-index:20;overflow:visible;padding:7px!important}
.wb-mobile-layout #wb-ui:not([data-mobile-dock=shop]) #wb-shop,.wb-mobile-layout #wb-ui:not([data-mobile-dock=warband]) #wb-warband,.wb-mobile-layout #wb-ui:not([data-mobile-dock=barracks]) #wb-barracks,.wb-mobile-layout #wb-ui:not([data-mobile-dock=minimap]) #wb-minimap{display:none!important}
.wb-mobile-layout #wb-ui #wb-shop{max-height:none!important;border-width:8px!important;border-image-width:40px!important}
.wb-mobile-layout #wb-shop-cards,.wb-mobile-layout #wb-warband-cards,.wb-mobile-layout #wb-barracks-cards{display:flex!important;justify-content:flex-start!important;gap:8px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:6px 2px!important;scroll-snap-type:x proximity;scrollbar-width:thin;max-width:100%}
.wb-mobile-layout #wb-ui #wb-shop button.wb-card,.wb-mobile-layout #wb-ui #wb-warband button.wb-card,.wb-mobile-layout #wb-ui #wb-warband .wb-empty-card{flex:0 0 104px!important;width:104px!important;height:142px!important;min-height:142px!important;padding:4px!important;scroll-snap-align:start}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-art{width:40px!important;height:40px!important;margin:4px auto 3px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-art img{width:38px!important;height:38px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-name{height:30px!important;min-height:30px!important;font-size:11px!important;line-height:13px!important;margin:2px 0!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-top{height:15px!important;line-height:13px!important;font-size:8px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-tier-badge{font-size:20px!important;line-height:20px!important;width:25px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-tier-badge small{font-size:7px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-attributes{min-height:20px!important;gap:3px!important;margin:2px 0!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) [data-card-tag]{width:20px!important;height:20px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) [data-card-tag] img{width:18px!important;height:18px!important}
.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-unit-count{font-size:10px!important;line-height:12px!important}
.wb-mobile-layout #wb-shop .wb-shop-heading{margin:0 0 2px!important;min-height:44px;padding-right:48px;align-items:center}
.wb-mobile-layout #wb-ui #wb-shop-toggle{width:44px;height:44px;min-height:44px!important;top:0;right:0}
.wb-mobile-layout #wb-shop .wb-shop-actions{margin:2px 0 0!important;gap:8px!important;justify-content:flex-start!important}
.wb-mobile-layout #wb-ui #wb-shop .wb-shop-actions button{min-height:44px!important;min-width:0!important;gap:6px!important;font-size:12px!important;padding:3px 12px!important}
.wb-mobile-layout #wb-shop .wb-shop-heading h2,.wb-mobile-layout #wb-warband .wb-warband-heading h2,.wb-mobile-layout #wb-barracks h2{font-size:13px!important;line-height:17px!important}
.wb-mobile-layout #wb-shop-status{font-size:9px!important}
.wb-mobile-layout #wb-ui #wb-barracks{border-width:8px!important;border-image-width:8px!important;max-height:none!important}
.wb-mobile-layout #wb-barracks .wb-barracks-guide{display:none}
.wb-mobile-layout #wb-barracks h2 small{display:inline;margin-left:8px!important;font-size:10px!important}
.wb-mobile-layout #wb-ui #wb-barracks button.wb-card,.wb-mobile-layout #wb-ui #wb-barracks .wb-empty-card{flex:0 0 138px!important;width:138px!important;height:82px!important;min-height:82px!important}
.wb-mobile-layout #wb-ui #wb-barracks button.wb-card{grid-template-columns:32px minmax(0,1fr)!important;grid-template-rows:12px 25px 13px!important;gap:3px 6px!important;padding:5px!important}
.wb-mobile-layout #wb-ui #wb-minimap{border-width:7px!important;border-image-width:7px!important;max-height:230px!important;overflow-y:auto;touch-action:pan-y}
.wb-mobile-layout #wb-minimap #wb-minimap-zones{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
.wb-mobile-layout #wb-minimap .wb-map-ground{height:38px!important}
.wb-mobile-layout #wb-ui #wb-minimap .wb-map-commanders img{width:18px!important;height:18px!important}
.wb-mobile-layout #wb-ui #wb-minimap .wb-map-heading button,.wb-mobile-layout #wb-ui #wb-combat-report{min-height:44px!important;font-size:12px!important}
.wb-mobile-layout #wb-ui #wb-minimap #wb-combat-report{position:static;margin-top:8px;width:100%}
.wb-mobile-layout #wb-ui :is(#wb-chat,#wb-squads-left,#wb-squads-right,#wb-camera-hint,#wb-card-panel){display:none!important}
.wb-mobile-layout #wb-ui #wb-field-markers{display:none!important}
.wb-mobile-layout #wb-ui #wb-target{bottom:calc(var(--wb-mobile-bottom) + 15px)!important;left:12px!important;transform:none!important;transform-origin:left bottom;z-index:15}
.wb-mobile-layout #wb-ui[data-mobile-dock]:not([data-mobile-dock='']) #wb-target{display:none!important}
.wb-mobile-layout #wb-target-effects{max-height:130px!important}
.wb-mobile-layout #wb-ui #wb-banner{top:42%!important;width:calc(100vw - 24px)!important;max-width:600px;transform:translate(-50%,-50%)!important;padding:10px!important}
.wb-mobile-layout #wb-ui #wb-banner.wb-result-minimized{top:calc(var(--wb-mobile-safe-top) + 190px)!important;transform:translateX(-50%)!important}
.wb-mobile-layout #wb-ui #wb-toast{bottom:calc(var(--wb-mobile-bottom) + 15px)!important;width:max-content;max-width:calc(100vw - 28px);box-sizing:border-box;text-align:center;z-index:32}
.wb-mobile-layout #wb-campaign-controls{top:calc(var(--wb-mobile-safe-top) + 79px)!important;left:8px!important;max-width:calc(50vw - 76px);z-index:23}
.wb-mobile-layout #wb-campaign-controls button{font-size:10px!important;padding:6px!important;min-height:44px}
.wb-mobile-layout #wb-campaign-chapter-label{display:none}
.wb-mobile-layout #wb-campaign-speech{max-width:calc(100vw - 30px);font-size:12px;padding:8px 11px}
.wb-mobile-layout #wb-ui #wb-modal{box-sizing:border-box;padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));align-items:center;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;z-index:100}
.wb-mobile-layout #wb-ui .wb-modal-card{box-sizing:border-box;width:min(760px,100%);max-width:100%;max-height:calc(100dvh - 24px);overflow-y:auto;padding:15px!important;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.wb-mobile-layout #wb-ui .wb-modal-card>h2{font-size:23px!important;line-height:1.2!important}
.wb-mobile-layout #wb-ui .wb-choice-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:12px 0}
.wb-mobile-layout #wb-ui .wb-choice-row>button{width:auto!important;min-width:0;min-height:120px;padding:10px!important;touch-action:pan-y}
.wb-mobile-layout #wb-ui .wb-modal-card button:not(.wb-card){min-height:44px}
.wb-mobile-layout #wb-ui .wb-campaign-rewards{grid-template-columns:1fr!important;gap:10px}
.wb-mobile-layout #wb-ui .wb-campaign-item{min-height:0!important;padding:13px!important}
.wb-mobile-layout #wb-ui .wb-campaign-loot{border-width:14px!important;border-image-width:14px!important}
.wb-mobile-layout #wb-ui .wb-duel-report-scroll{max-height:52dvh!important;overflow:auto!important;touch-action:pan-y}
.wb-mobile-layout #wb-ui .wb-duel-report table{min-width:520px}
.wb-mobile-layout #wb-quick-tooltip{display:none!important}
.wb-mobile-layout #wb-lobby,.wb-mobile-layout #wb-graphics-options{box-sizing:border-box;padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
.wb-mobile-layout #wb-lobby .wb-lobby-card,.wb-mobile-layout .wb-lobbies-frame,.wb-mobile-layout .wb-graphics-frame,.wb-mobile-layout .wb-campaign-frame{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 16px)!important;box-sizing:border-box;border-width:10px!important;border-image-width:10px!important;padding:12px!important;overflow:auto;overscroll-behavior:contain}
.wb-mobile-layout #wb-lobby .wb-lobby-card{height:auto!important}
.wb-mobile-layout #wb-lobby .wb-setup-heading{gap:8px;flex-wrap:wrap;padding-bottom:12px;margin-bottom:12px}
.wb-mobile-layout #wb-lobby .wb-setup-heading h1{font-size:24px!important}
.wb-mobile-layout #wb-lobby .wb-setup-actions button{min-height:44px!important}
.wb-mobile-layout #wb-lobby .wb-explorer-layout{grid-template-columns:minmax(0,1fr)!important;gap:14px;overflow:visible;flex:none!important;height:auto;min-height:0}
.wb-mobile-layout #wb-lobby .wb-explorer-collection{min-height:0!important;max-height:none!important;overflow:visible}
.wb-mobile-layout #wb-lobby #wb-factions{grid-template-columns:repeat(auto-fill,minmax(98px,1fr))!important;grid-auto-rows:96px!important;gap:7px!important;max-height:36dvh;overflow-y:auto;touch-action:pan-y}
.wb-mobile-layout #wb-lobby #wb-factions .wb-faction{height:96px!important;gap:5px!important;padding:7px!important;touch-action:pan-y}
.wb-mobile-layout #wb-lobby #wb-factions .wb-civilization-icon{width:35px;height:35px}
.wb-mobile-layout #wb-lobby #wb-factions .wb-faction h2{font-size:12px!important}
.wb-mobile-layout #wb-lobby .wb-explorer-roster{min-height:0!important;overflow:visible!important;gap:8px}
.wb-mobile-layout #wb-lobby #wb-faction-detail{min-height:0!important;flex:none;overflow:visible;padding:12px!important}
.wb-mobile-layout #wb-lobby #wb-faction-detail .wb-draft-passive{min-height:0;max-height:150px;overflow:auto}
.wb-mobile-layout #wb-lobby #wb-faction-slots .wb-draft-slot{min-height:144px!important;height:144px!important}
.wb-mobile-layout #wb-lobby #wb-faction-slots .wb-draft-slot-target{padding:7px 5px!important;gap:5px}
.wb-mobile-layout #wb-lobby #wb-faction-slots .wb-draft-slot.wb-filled .wb-draft-slot-target{height:98px}
.wb-mobile-layout #wb-lobby #wb-faction-slots .wb-draft-slot-clear{width:100%;height:44px;min-height:44px!important;z-index:2;top:auto;bottom:0;right:0;background:#19130e!important;display:flex;align-items:center;justify-content:center;gap:5px;padding:6px!important;border-top:1px solid #675443!important}
.wb-mobile-layout #wb-lobby #wb-faction-slots .wb-draft-slot-clear::after{content:'Remove';font:11px/1.2 Arial,sans-serif}
.wb-mobile-layout #wb-lobby[hidden] .wb-draft-slot-clear::after{content:none}
.wb-mobile-layout #wb-lobby .wb-faction-confirm{position:static!important;inset:auto!important;transform:none!important;flex:none!important;display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin-top:12px!important;padding-top:12px!important}
.wb-mobile-layout #wb-lobby .wb-faction-confirm>div{grid-column:1/-1;width:100%;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));margin:0!important;gap:8px!important}
.wb-mobile-layout #wb-lobby .wb-faction-confirm [data-campaign-open]{grid-column:1/-1}
.wb-mobile-layout #wb-lobby .wb-faction-confirm :is(button,a),.wb-mobile-layout #wb-lobby #wb-faction-detail button{min-height:44px!important;min-width:0!important;font-size:13px!important}
.wb-mobile-layout #wb-lobby .wb-faction-confirm button img{width:24px;height:24px}
.wb-mobile-layout #wb-lobby #wb-faction-library{padding:6px!important}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-frame{width:100%;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:12px!important;border-width:8px!important;border-image-width:8px!important}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-heading{padding-right:50px}
.wb-mobile-layout #wb-lobby #wb-faction-library button.wb-library-close{width:44px;height:44px;min-height:44px!important;top:8px;right:8px}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-tabs{padding:0;gap:10px}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-tabs button{min-height:44px!important;min-width:0;flex:1}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-heading h1{font-size:22px!important}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-toolbar{flex-wrap:wrap;gap:8px;min-height:0;flex:none}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-tier-filters{overflow-x:auto;max-width:100%;gap:4px;flex:none;width:100%;touch-action:pan-x}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-tier-filters button{min-width:44px;min-height:44px!important;padding:5px!important;flex:none}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-search{width:100%;box-sizing:border-box;max-width:none}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-content{padding:12px!important;min-height:90px}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-card-grid{grid-template-columns:repeat(auto-fill,minmax(108px,1fr))!important;gap:13px 10px}
.wb-mobile-layout #wb-lobby #wb-faction-library button.wb-library-card{max-width:140px!important;width:100%;height:184px!important;min-height:184px!important;touch-action:pan-y}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-card .wb-card-art{width:48px;height:48px}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-card .wb-card-art img{width:48px;height:48px}
.wb-mobile-layout #wb-lobby #wb-faction-library .wb-library-leader-abilities{grid-template-columns:1fr;gap:10px}
.wb-mobile-layout :is(#wb-lobby,#wb-signup,#wb-graphics-options) input,.wb-mobile-layout :is(#wb-lobby,#wb-signup,#wb-graphics-options) select{font-size:16px!important;min-height:44px;max-width:100%;box-sizing:border-box}
.wb-mobile-layout #wb-signup [data-signup-dialog]{padding:8px;box-sizing:border-box}
.wb-mobile-layout #wb-signup .wb-signup-frame{max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box}
.wb-mobile-layout .wb-campaign-layout{grid-template-columns:1fr!important}
.wb-mobile-layout .wb-campaign-map{height:320px}
.wb-mobile-layout .wb-campaign-chapter{min-height:0}
.wb-mobile-layout .wb-campaign-frame button{min-height:44px}
.wb-mobile-layout .wb-campaign-frame .wb-campaign-checkpoint{width:44px;height:44px;min-height:44px!important}
.wb-mobile-layout :is(#wb-graphics-options,#wb-signup) .wb-stock-close{width:44px!important;height:44px;min-height:44px!important}
.wb-mobile-layout #wb-ui :is(.wb-close,.wb-round-result-minimize){width:44px!important;min-width:44px;min-height:44px!important}
.wb-mobile-layout #wb-ui .wb-round-result-reopen{min-height:44px!important}
.wb-mobile-layout #wb-ui .wb-round-result{padding-right:46px}
@media(max-height:500px){.wb-mobile-layout{--wb-mobile-dock-height:145px;--wb-mobile-resources:50px}.wb-mobile-layout #wb-ui>#wb-heroes{grid-template-columns:repeat(8,124px)!important}.wb-mobile-layout #wb-heroes button.wb-hero{flex-basis:124px;height:55px!important;min-height:55px!important;grid-template-rows:22px 16px!important;grid-template-columns:22px minmax(0,1fr)!important;gap:1px 4px!important}.wb-mobile-layout #wb-heroes .wb-hero-icon{width:22px;height:22px}.wb-mobile-layout #wb-heroes .wb-hero-player{display:none}.wb-mobile-layout #wb-heroes .wb-hero-vitals{--wb-hero-bar-height:5px;--wb-hero-number-space:22px;height:16px;padding-top:9px}.wb-mobile-layout #wb-heroes .wb-hero-health{font-size:8px!important;line-height:9px!important}.wb-mobile-layout #wb-heroes .wb-hero-level{font-size:8px!important;line-height:7px!important}.wb-mobile-layout #wb-ui #wb-round{top:calc(var(--wb-mobile-safe-top) + 63px)!important}.wb-mobile-layout #wb-ui #wb-duel{top:calc(var(--wb-mobile-safe-top) + 113px)!important}.wb-mobile-layout #wb-ui #wb-shop button.wb-card,.wb-mobile-layout #wb-ui #wb-warband button.wb-card,.wb-mobile-layout #wb-ui #wb-warband .wb-empty-card{height:108px!important;min-height:108px!important;flex-basis:94px!important;width:94px!important}.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-art{width:27px!important;height:27px!important;margin:1px auto!important}.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-art img{width:25px!important;height:25px!important}.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-name{font-size:10px!important;height:25px!important;min-height:25px!important;line-height:12px!important}.wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband) .wb-card-attributes{display:none!important}.wb-mobile-layout #wb-campaign-controls{top:calc(var(--wb-mobile-safe-top) + 63px)!important}.wb-mobile-layout #wb-ui #wb-shop .wb-shop-actions button{min-height:44px!important}.wb-mobile-detail-frame{max-height:calc(100dvh - 12px)}}
/* Short landscape screens keep the open dock to the left of the timer and
   health meter. Recruit actions share the heading row to preserve map space. */
@media(max-height:500px) and (min-width:600px){
 .wb-mobile-layout #wb-ui :is(#wb-shop,#wb-warband,#wb-barracks,#wb-minimap){right:auto!important;width:calc(50vw - 32px)!important;max-height:calc(100dvh - var(--wb-mobile-bottom) - var(--wb-mobile-safe-top) - 68px)!important;overflow-y:auto}
 .wb-mobile-layout #wb-ui #wb-round{left:75%!important}
 .wb-mobile-layout #wb-ui #wb-duel{left:75%!important;width:calc(50vw - 36px)!important}
 .wb-mobile-layout #wb-shop .wb-shop-heading{padding-right:205px;min-height:44px}
 .wb-mobile-layout #wb-shop .wb-shop-heading h2{font-size:11px!important;line-height:13px!important}
 .wb-mobile-layout #wb-shop .wb-shop-actions{position:absolute;top:7px;right:54px;gap:4px!important;margin:0!important}
 .wb-mobile-layout #wb-ui #wb-shop .wb-shop-actions button{min-height:44px!important;font-size:11px!important;padding:3px 7px!important}
 .wb-mobile-layout #wb-campaign-controls{left:auto!important;right:8px!important;max-width:calc(25vw - 46px)}
 .wb-mobile-layout #wb-ui #wb-banner.wb-result-minimized{left:75%!important;max-width:calc(50vw - 36px)}
}
@media(min-width:901px){.wb-mobile-layout .wb-explorer-layout{grid-template-columns:minmax(0,1fr) 300px!important}.wb-mobile-layout #wb-lobby .wb-explorer-layout{grid-template-columns:minmax(0,1fr) 300px!important}.wb-mobile-layout #wb-lobby #wb-factions{max-height:52dvh}.wb-mobile-layout .wb-campaign-layout{grid-template-columns:minmax(0,1fr) 260px!important}.wb-mobile-layout .wb-campaign-map{height:400px}.wb-mobile-layout #wb-heroes button.wb-hero{flex:0 1 calc((100% - 35px) / 8)}}

/* Traits share the single open dock panel, never covering recruitment or the army. */
.wb-mobile-layout #wb-ui>#wb-synergies{left:7px;right:7px;bottom:var(--wb-mobile-bottom);width:auto;max-height:min(300px,calc(100dvh - var(--wb-mobile-bottom) - 200px));z-index:20}
.wb-mobile-layout #wb-ui:not([data-mobile-dock=synergies])>#wb-synergies{display:none!important}
.wb-mobile-layout #wb-ui button.wb-trait-chip,.wb-mobile-layout #wb-ui button.wb-trait-toggle{min-height:44px}
.wb-mobile-layout .wb-trait-chips{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:520px){.wb-mobile-layout .wb-trait-chips{grid-template-columns:minmax(0,1fr)}}
.wb-mobile-layout #wb-mobile-dock{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x}
.wb-mobile-layout #wb-ui #wb-mobile-dock button{min-width:44px;flex:1 0 44px;font-size:11px!important;padding-inline:4px!important}
.wb-mobile-layout #wb-ui #wb-mobile-dock :is([data-mobile-camera],[data-action=menu]){flex:0 0 44px}
