/* Wüstenlegion: bone-and-sinew frames (button 9-slice with horned ends, building panel with four slots) */
:root{--lgframe:url(../assets/img/ui/frame-legion.webp)}
body.leg :is(#bRestart,#bVoice,#bVoiceWait,#mpToggle,#bGo,#bHost,#bHost4,#bStart,#bReady,#joinForm button,#race button,#diff button,#bCancel,#bResume,#bRestartGame,#bQuit,#bEndMenu,#bBuildDone){border-width:7px 24px!important;border-image:var(--lgframe) 72 268 72 268 fill / 7px 24px stretch!important}
body.leg #console .ub,body.leg #console .units .ub{border-width:6px 18px!important;border-image:var(--lgframe) 72 268 72 268 fill / 6px 18px stretch!important}
body.leg #console .mini{border-width:5px 15px!important;border-image:var(--lgframe) 72 268 72 268 fill / 5px 15px stretch!important}
body.leg .hud .side:not(.r) .stats{border-width:6px 20px!important;border-image:var(--lgframe) 72 268 72 268 fill / 6px 20px stretch!important}
body.leg .minimap{border-width:8px 22px!important;border-image:var(--lgframe) 72 268 72 268 / 8px 22px stretch!important}
body.leg .field.vert .minimap{border-width:10px 12px!important;border-image-width:10px 12px!important}
body.leg :is(#bRestart,#bVoice,#bVoiceWait,#mpToggle,#bGo,#bHost,#bHost4,#bStart,#bReady,#joinForm button,#race button,#diff button,#bCancel,#bResume,#bRestartGame,#bQuit,#bEndMenu,#bBuildDone,.console .ub,.console .mini,.hud .side:not(.r) .stats)::before{display:none!important}
body.leg .console[data-mode="bld"]:has(.avatar.on){aspect-ratio:3.2015!important;background:url(../assets/img/ui/panel-legion.webp) center/100% 100% no-repeat!important}
body.leg .console[data-mode="bld"]:has(.avatar.on) .avatar{left:4.58%;top:34.4%;right:69.55%;bottom:9.33%}
body.leg #console[data-mode="bld"]:has(.avatar.on) .ucard.sel .ub{left:32.39%;top:34.67%;right:6.94%;bottom:48.0%;border-width:0!important;border-image:none!important}
body.leg #console[data-mode="bld"]:has(.avatar.on) .uprow .mini{border-width:0!important;border-image:none!important}
body.leg .console[data-mode="bld"]:has(.avatar.on) .uprow .mini:nth-child(1){left:33.2%;top:59.26%;right:38.45%;bottom:9.33%}
body.leg .console[data-mode="bld"]:has(.avatar.on) .uprow .mini:nth-child(2){left:65.06%;top:59.26%;right:4.72%;bottom:9.33%}
body.leg .console[data-mode="bld"]:has(.avatar.on) .avatar img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:cover;animation:none;border-radius:6px}
body.leg .console .ub .n{color:#f6e6c8;text-shadow:0 1px 2px #000}
/* name slot: left inset equal to the gap above the text */
#console[data-mode="bld"]:has(.avatar.on) .ucard.sel .ub{padding:0 2.4cqw 0 1.9cqw!important}

/* start screen: each race button wears its own frame — the legion gets the bone-and-sinew one */
#race button[data-r="0"]{border-width:9px 30px!important;border-image:var(--lgframe) 72 268 72 268 fill / 9px 30px stretch!important}
#race button[data-r="0"]::before{display:none!important}
