/* Echoes of Aether v1.3.0 | isolated boss / multi-monster heads-up displays. */
body:not(.inBoss) #bossHud,body.inHorde #breakBanner,body.inHorde #warning{display:none!important}
body:not(.inHorde) #hordeHud{display:none!important}
/* Keep arena and player status as two separate mini cards at upper-left. */
body.inHorde #heroHud{
 top:clamp(56px,9.5vh,74px);left:max(9px,env(safe-area-inset-left));
 width:clamp(146px,19vw,185px);max-width:none;max-height:150px;
 padding:6px 8px;border-radius:9px;background:#131c26ea;
}
body.inHorde #heroHud .heroHead{margin-bottom:5px;gap:6px}
body.inHorde #heroHud .portrait{width:27px;height:27px;font-size:13px;flex-shrink:0}
body.inHorde #heroHud .heroHead b{font-size:9px;line-height:1.05}
body.inHorde #heroHud .heroHead span{font-size:7px}
body.inHorde #heroHud .stat{margin-top:4px;gap:4px}
body.inHorde #heroHud .stat>span{width:14px;font-size:8px}
body.inHorde #heroHud .stat strong{min-width:47px;font-size:8px}
body.inHorde #heroHud .objective{display:none}
body.inHorde #hordeHud{
 top:clamp(56px,9.5vh,74px);left:calc(max(9px,env(safe-area-inset-left)) + clamp(153px,20vw,194px));
 width:clamp(155px,21vw,205px);max-width:none;max-height:min(44dvh,183px);
 padding:7px 8px;z-index:9;overflow:hidden;border-radius:9px;
 background:linear-gradient(180deg,#13251fef,#101d1beb);
}
body.inHorde #hordeHud .hordeTitle{display:block;white-space:normal;line-height:1.08}
body.inHorde #hordeHud .hordeTitle b{display:block;font-size:clamp(9px,1.1vw,12px);letter-spacing:.05em}
body.inHorde #hordeHud .hordeTitle span{display:block;margin-top:3px;font-size:8px}
body.inHorde #hordeHud .hordeStats{margin-top:6px;font-size:8px;gap:3px 5px}
body.inHorde #hordeHud .hordeStats span{padding:2px 3px}
body.inHorde #hordeHud .hordeTargetTitle{margin-top:4px;font-size:8px}
body.inHorde #hordeHud .hordeTargetTitle #hordeTarget{font-size:9px}
body.inHorde #hordeHud .hordeTargetTitle small{display:none}
body.inHorde #hordeHud .hordeTargetBar{margin-top:3px}
body.inHorde #hordeExitBtn{font-size:8px;padding:4px 6px;margin-top:5px;min-height:24px;touch-action:manipulation}
@media (orientation:landscape) and (max-height:420px){
 body.inHorde #heroHud,body.inHorde #hordeHud{top:clamp(49px,14vh,59px)}
 body.inHorde #hordeHud{max-height:min(52dvh,175px)}
}
@media(max-width:700px){
 body.inHorde #heroHud{width:clamp(128px,22vw,148px);padding:5px}
 body.inHorde #hordeHud{left:calc(max(6px,env(safe-area-inset-left)) + clamp(135px,23vw,157px));width:clamp(145px,23vw,175px);padding:5px}
 body.inHorde #hordeHud .hordeTitle b{font-size:9px}
}
@media(orientation:portrait){body.inHorde #hordeHud{max-height:31dvh}}

/* v1.3.1 | Mission widget. Minimized by default; 44px finger target. */
body.inHorde #hordeHud .hordeTitle{display:flex;align-items:center;gap:5px;min-height:35px;flex-wrap:wrap}
body.inHorde #hordeHud .hordeTitle .hordeLongTitle{flex:1 1 100%;min-width:0}
body.inHorde #hordeHud .hordeTitle .hordeShortTitle{display:none}
body.inHorde #hordeHud .hordeTitle #hordePhase{flex:1 1 auto;margin:0}
body.inHorde #hordeHud .hordeTitle #hordeToggleBtn{
 min-width:42px;min-height:40px;width:42px;height:40px;display:grid;place-items:center;
 border:1px solid #b5e1bf9c;border-radius:9px;background:#1d4038;
 color:#e6f7df;font-size:24px;line-height:1;font-weight:900;
 cursor:pointer;touch-action:manipulation;user-select:none;flex-shrink:0;
}
body.inHorde #hordeHud .hordeTitle #hordeToggleBtn:active{background:#346d59;transform:scale(.96)}
body.inHorde #hordeHud #hordeCompactInfo{display:none}
body.inHorde #hordeHud #hordeDetails[hidden]{display:none!important}
body.inHorde #hordeHud.isCollapsed{
 width:clamp(163px,20vw,205px);max-height:none;min-height:0;
 padding:3px 4px 3px 9px;border-color:#789d8b95;
 box-shadow:0 3px 10px #050e0bcc;
}
body.inHorde #hordeHud.isCollapsed .hordeTitle{flex-wrap:nowrap;gap:4px;min-height:40px}
body.inHorde #hordeHud.isCollapsed .hordeTitle .hordeLongTitle,
body.inHorde #hordeHud.isCollapsed .hordeTitle #hordePhase{display:none}
body.inHorde #hordeHud.isCollapsed .hordeTitle .hordeShortTitle{display:block;flex:0 0 auto;font-size:9px;letter-spacing:.03em;white-space:nowrap}
body.inHorde #hordeHud.isCollapsed #hordeCompactInfo{display:block;flex:1 1 auto;min-width:0;font-size:8px;white-space:nowrap;line-height:1.1;color:#d4e5bd}
body.inHorde #hordeHud.isCollapsed .hordeTitle #hordeToggleBtn{width:42px;min-width:42px;height:40px;font-size:19px}
@media (max-width:700px){body.inHorde #hordeHud.isCollapsed{width:clamp(153px,26vw,185px)}}
@media (orientation:portrait){body.inHorde #hordeHud.isCollapsed{left:8px;top:210px}}
/* Arena container stays click-through, but both deliberate buttons receive touch input. */
body.inHorde #hordeHud #hordeToggleBtn,body.inHorde #hordeHud #hordeExitBtn{pointer-events:auto;position:relative;z-index:1}

body.inHorde #hordeHud.isCollapsed #hordeCompactInfo{display:flex;flex-direction:column;justify-content:center;gap:2px;text-overflow:ellipsis;overflow:hidden}
body.inHorde #hordeHud.isCollapsed #hordeCompactInfo b{font:900 10px/1 system-ui,sans-serif;color:#faf1c2;white-space:nowrap}
body.inHorde #hordeHud.isCollapsed #hordeCompactInfo small{font:700 8px/1 system-ui,sans-serif;color:#aedbba;white-space:nowrap}
