/* Loadout: a compact roster and an always-visible match action. */
#menu.picking{justify-content:flex-start;gap:14px;padding:16px 20px 24px;scroll-padding-top:110px}
.picking #logo{flex:none;gap:4px}
.picking #logo h1{font-size:28px;letter-spacing:3px}
.picking #logo .mark{display:none}
.picking #logo .sub{font-size:10px;letter-spacing:2px}
.picking #screens{flex:none;gap:12px}
.picking #mfoot{position:static;flex:none;width:100%;gap:12px;flex-wrap:wrap;max-width:1100px;margin-top:8px}
.pick-start{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;box-sizing:border-box;padding:12px 16px;border:1px solid #53627c;border-radius:14px;background:#111d31;box-shadow:0 8px 24px #0008}
.pick-selected{display:flex;align-items:center;gap:12px;min-width:0}
.pick-portrait{display:block;flex:none;width:60px;height:60px;border-radius:10px;background-size:cover;background-position:center;border:1px solid #8a7955}
.pick-selected h2{margin:2px 0;font-size:22px;color:var(--gold)}
.pick-selected small,.pick-selected div>span{color:var(--dim);font-size:12px}
.pick-actions{display:flex;align-items:center;gap:8px;flex:none}
.pick-actions .gold{min-width:156px;min-height:48px;font-size:17px}
.pick-roster-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.pick-roster-heading h3{margin:0;font-size:17px}.pick-roster-heading small{font-size:12px;font-weight:400;color:var(--dim);margin-left:6px}
.picking #heroes.compact{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;padding:4px 4px 10px;box-sizing:border-box;scroll-padding-inline:4px;scrollbar-width:thin}
.picking #heroes.compact .hero{flex:0 0 128px;padding-bottom:8px;border-radius:12px}
.picking #heroes.compact .hero .pic{height:94px;background-position:center 26%}
.picking #heroes.compact .hero h3{font-size:14px;margin:6px 8px 0}
.picking #heroes.compact .hero h3 small{font-size:10px}
.picking #heroes.compact .hero .role{top:6px;left:4px;font-size:9px;padding:2px 4px}
.picking #heroes.compact .hero .newp,.picking #heroes.compact .hero .ab,.picking #heroes.compact .hero .diff{display:none}
.picking #heroes.expanded{grid-template-columns:repeat(auto-fit,minmax(142px,1fr))}
.picking #heroes.expanded .pic{height:116px}
.picking #heroes.expanded .hero h3{font-size:16px}
.pick-loadout{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px;width:100%;align-items:start}
.picking #hdesc{box-sizing:border-box;max-width:none;width:100%;min-height:0;text-align:left;line-height:1.5}
.picking #hdesc details{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.picking summary{cursor:pointer;color:#dcd0b2;padding:5px 0}
.pick-options{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0}
.pick-options>.row{justify-content:flex-start}.pick-options .spellpick{width:100%;box-sizing:border-box}
.pick-options .mapnote{text-align:left}.pick-options .seg{flex-wrap:wrap}
.pick-start button:focus-visible,.pick-roster-heading button:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media(max-width:700px){
 #menu.picking{padding:10px 12px 20px;gap:10px;scroll-padding-top:160px}
 .picking #logo h1{font-size:20px;letter-spacing:1px}.picking #logo>span{display:none}
 .pick-start{top:0;padding:10px;gap:8px;flex-wrap:wrap;border-radius:12px}
 .pick-selected{gap:8px;flex:1 1 100%}.pick-selected h2{font-size:18px}.pick-portrait{width:44px;height:44px}
 .pick-actions{width:100%}.pick-actions .gold{flex:1;min-width:0;min-height:46px;font-size:16px}.pick-actions .small{min-height:46px}
 .pick-roster-heading h3{font-size:15px}.pick-roster-heading small{display:none}.pick-roster-heading .btn{font-size:12px;min-height:42px}
 .picking #heroes.compact .hero{flex-basis:110px}.picking #heroes.compact .hero .pic{height:78px}
 .pick-loadout{grid-template-columns:1fr;gap:12px}.pick-options .row{flex-wrap:wrap}
 .picking #heroes.expanded{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .picking #heroes.expanded .hero .ab{gap:3px;margin:6px}.picking #heroes.expanded .hero .ab span{width:24px;height:24px}
 .pick-options .spdesc{font-size:12px}.pick-options .precord{overflow-wrap:anywhere}
}
@media(max-height:480px) and (min-width:701px){.picking #logo{display:none}.pick-start{padding:7px 12px}.pick-portrait{width:42px;height:42px}.pick-selected h2{font-size:18px}}

/* Hero discovery, role plans, and readable tactical feedback. */
.hero-browser{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.hero-filter-row{display:flex;gap:5px;flex-wrap:wrap}.hero-filter-row .btn{min-height:38px;font-size:12px}
.hero-search{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:12px;color:#c9d4e4}
.hero-search input{width:170px;min-height:38px;box-sizing:border-box;background:#101b2b;color:#fff;border:1px solid #59677d;border-radius:8px;padding:8px}
#hero-results{width:100%;color:#c2cede;font-size:12px;min-height:16px}
.hero-guide{border-top:1px solid #43516a;margin-top:12px;padding-top:10px}
.hero-guide h4{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#9bd8ff;margin:0}
.hero-guide p{margin:8px 0;font-size:13px}.hero-guide .guide-caution{color:#ffd39b}
.guide-build>small{display:block;margin:9px 0 4px;color:#b7c8dd}
.guide-build>div{display:flex;flex-wrap:wrap;gap:5px}.guide-item{background:#203049;border:1px solid #52627b;border-radius:6px;padding:5px 7px;font-size:12px}
.pick-options{background:#0c1624e8;border:1px solid #33435a;border-radius:14px;padding:14px;box-sizing:border-box}
.pick-options .dim,.pick-options .note{color:#c1cddd}
.shop-guide,.build-progress{grid-column:1/-1;border:1px solid #465c79;background:#101e32;padding:12px;border-radius:10px;line-height:1.5}
.shop-guide b{color:#f6d285}.shop-guide p{margin:5px 0;font-size:13px}.shop-guide small,.counter-picks>small{color:#b7c8dd}
.build-progress span{display:block;font-size:13px}.build-progress progress{display:block;width:100%;height:8px;margin-top:9px;accent-color:#f5c35f}
.item-purpose{color:#a8d8f8;font-size:12px;line-height:1.55}
#shopGrid>.note{grid-column:1/-1;text-align:left;width:100%;box-sizing:border-box}
.counter-choice{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #30425c}
.counter-choice .si{flex:0 0 104px}.counter-choice p{font-size:12px;color:#c4d2e4;line-height:1.5;margin:0}
.hb .cc-status{position:absolute;bottom:calc(100% + 3px);left:50%;transform:translateX(-50%);background:#29152af2;border:1px solid #ffbd75;color:#fff2ce;font-size:10px;font-weight:800;letter-spacing:.05em;padding:3px 6px;border-radius:4px;white-space:nowrap}
#buffbar:not(:empty){background:#101b2ce8;border:1px solid #5b6580;border-radius:8px;padding:6px 10px;max-width:65vw;text-align:center;line-height:1.5}
@media(max-width:700px){.hero-filter-row{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:3px}.hero-filter-row .btn{flex:none;min-height:42px}.hero-search{margin-left:0;width:100%;justify-content:space-between}.hero-search input{flex:1;min-width:0}.pick-options{padding:12px}.counter-choice{gap:8px}.counter-choice .si{flex-basis:86px}.hb .cc-status{font-size:9px}#buffbar:not(:empty){font-size:10px;max-width:58vw;padding:4px 7px}}

#deathRecap{position:absolute;top:92px;left:16px;z-index:12;display:flex;flex-direction:column;width:300px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 240px);overflow:hidden;box-sizing:border-box;padding:14px;background:#101b2cf5;border:1px solid #ba8a62;border-radius:12px;box-shadow:0 12px 36px #0009;color:#e1e8f1;font-size:13px;line-height:1.5;pointer-events:auto}
.recap-body{min-height:0;overflow:auto}#deathRecap header,#deathRecap>[data-recap-shop]{flex:none}#deathRecap>[data-recap-shop]{margin-top:8px}
#deathRecap header{display:flex;align-items:center;justify-content:space-between;gap:8px}#deathRecap h3{margin:0;color:#f4cc94;font-size:18px}#deathRecap p{margin:9px 0}#deathRecap .dim{font-size:11px}
#deathRecap ul{list-style:none;margin:12px 0;padding:0}#deathRecap li{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #354358;padding:5px 0}#deathRecap li span{overflow-wrap:anywhere}
.damage-types{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.damage-types span{border-radius:5px;padding:4px 6px;font-size:11px;background:#243044}.damage-p{color:#ffc89b}.damage-m{color:#cfb0ff}.damage-t{color:#f7f7fb}
#deathRecap>[data-recap-shop]{width:100%;font-size:13px;min-height:42px}
@media(max-height:500px){#deathRecap{top:60px;width:260px;max-height:calc(100dvh - 160px);padding:10px;font-size:12px}}

/* Lobby/profile menus must scroll as one page: no footer over account controls. */
#menu:not(.picking){justify-content:safe center}
#menu:not(.picking)>#logo,#menu:not(.picking)>#screens{flex:none}
#menu:not(.picking) #logo h1{font-size:clamp(32px,6vw,64px)}
#menu:not(.picking) #mfoot{position:static;flex:none;display:flex;gap:10px 16px;flex-wrap:wrap;width:100%;max-width:1100px;box-sizing:border-box;margin-top:8px;line-height:1.5}
@media(max-width:700px){#menu:not(.picking){padding:16px 12px;justify-content:flex-start}#menu:not(.picking) #logo h1{font-size:clamp(26px,6.5vw,44px)}#menu:not(.picking) #mfoot{font-size:11px}}

/* Universal base-to-tower travel, shared by mouse and touch shop controls. */
#objectiveToggle{position:fixed;left:12px;top:12px;z-index:44;pointer-events:auto;min-height:36px}#objectivePanel{position:fixed;left:12px;top:56px;width:min(300px,calc(100vw - 24px));max-height:55vh;overflow:auto;z-index:45;pointer-events:auto;padding:14px;border:1px solid #526580;border-radius:12px;background:#101b2bf5;box-shadow:0 8px 28px #0008;font:13px system-ui;color:#e5edf6}#objectivePanel[hidden]{display:none!important}#objectivePanel header{display:flex;align-items:center;justify-content:space-between;gap:10px}#objectivePanel article{border-top:1px solid #42516a;padding:12px 0}#objectivePanel article div{display:flex;gap:8px;flex-direction:column}#objectivePanel article strong{font-size:12px;color:#f1cc7b}#objectivePanel small{display:block;color:#acbdd2;line-height:1.45;margin:6px 0}#objectivePanel article button{margin-top:6px}@media(max-width:600px){#objectiveToggle{top:65px;left:8px}#objectivePanel{top:107px;left:8px;max-height:45vh}}
#goldrow{flex-wrap:wrap} .market-return{font-size:12px;padding:7px 10px;white-space:nowrap} #marketHud{flex-basis:100%} #shop header{flex-wrap:wrap} #marketShop{order:5} .market-return:disabled{opacity:.55;cursor:default}

.wardrobe{max-width:1100px;margin:auto}.wardrobe h2{margin:0}.outfit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.outfit-card{border:1px solid #42516a;border-radius:12px;background:linear-gradient(150deg,#192438,#101722);padding:18px;display:flex;flex-direction:column;gap:10px}.outfit-card.selected{border-color:var(--outfit);box-shadow:0 0 0 1px var(--outfit)}.outfit-card h3,.outfit-card p{margin:0}.outfit-card p{color:#bcc8dc;min-height:60px;font-size:13px;line-height:1.5}.outfit-card>small{color:var(--outfit);font-weight:800;letter-spacing:2px}.outfit-swatch{height:92px;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:8px;background:radial-gradient(ellipse at center,#34415f,#0b111d)}.outfit-swatch span{font-size:50px;color:var(--outfit);text-shadow:0 0 25px var(--outfit);margin-right:20px}.outfit-swatch i{width:18px;height:38px;border-radius:3px;transform:skew(-10deg);border:1px solid #ffffff40}.outfit-paths{display:grid;gap:4px;font-size:11px;color:#a4b4ca}.outfit-upgrade{padding:18px;border:1px solid #495974;border-radius:12px}.outfit-tiers{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.outfit-tiers button{white-space:normal;text-align:left}.outfit-tiers small{display:block;font-size:12px;line-height:1.4;margin-top:5px}.outfit-card.mythic{background:linear-gradient(150deg,#302445,#111a2a)}@media(max-width:760px){.outfit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.outfit-tiers{grid-template-columns:1fr}}@media(max-width:430px){.outfit-grid{grid-template-columns:1fr}}

/* Selected item and explicit purchase stay reachable in compact shops. */
.mobile-buy-row{display:flex;align-items:center;gap:10px;width:100%;min-width:0}.mobile-buy-row>div{flex:1;min-width:0}.mobile-buy-row b{display:block;font-size:13px}.mobile-buy-row small{display:block;color:#c7d8ec;font-size:10px;line-height:1.35}.mobile-buy-row button{flex:0 0 auto;min-height:42px;max-width:52%;white-space:normal;font-size:12px;padding:8px 10px}@media(max-width:760px),(max-height:500px){#shopInvM{max-height:40vh;overflow-y:auto;flex-shrink:0}.sh-body{min-height:80px}}

/* shop-compact-tabs: consistent vertical categories on phones and short windows. */
@media(max-width:760px),(max-height:500px){.sh-body{grid-template-columns:96px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}#shopTabs{flex-direction:column;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;padding:6px 4px}#shopTabs button{flex:0 0 auto;min-height:38px;max-width:100%;white-space:normal}}

/* Desktop HUD background does not swallow movement; controls remain usable. */
body:not(.touch) #panel{pointer-events:none;background:rgba(10,17,29,.65);backdrop-filter:none}body:not(.touch) #panel button,body:not(.touch) #panel .ab-b,body:not(.touch) #panel .it{pointer-events:auto}

/* compact-combat-hud: one inventory row; retain all actual controls. */
body:not(.touch) #right{width:212px}
body:not(.touch) #items{grid-template-columns:repeat(6,32px);gap:4px}
body:not(.touch) #items .it{width:32px;height:32px;font-size:18px}
body:not(.touch) #abil .lvup{left:auto;right:-4px;top:0;width:24px;height:24px;font-size:16px;animation:none;box-shadow:0 0 6px rgba(255,214,90,.6)}
@media(min-width:1121px) and (max-width:1300px){body:not(.touch) #mini:not(.sq){width:212px;height:126px}}
@media(max-width:1120px){body:not(.touch) #mini{left:10px;right:auto;top:64px;bottom:auto;width:170px;height:101px}body:not(.touch) #mini.sq{height:170px}}
@media(max-width:760px){body:not(.touch) #panel{transform:translateX(-50%) scale(.82);transform-origin:bottom center}}
@media(max-width:560px){body:not(.touch) #panel{transform:translateX(-50%) scale(.72)}}
/* Touch objectives sit below the look/ping row, clear of the minimap. */
body.touch:not(.portrait) #objectiveToggle{left:calc(12px + var(--sl) + 150px * var(--s));top:calc(12px + var(--st) + 42px * var(--s));min-height:30px;font-size:11px;padding:5px 8px}
body.touch:not(.portrait) #objectivePanel{left:calc(6px + var(--sl));top:calc(50px + var(--st) + 42px * var(--s))}
/* Portrait: score, toolbar, then separate vitals and minimap columns. */
body.touch.portrait #topbar{left:calc(6px + var(--sl));right:calc(6px + var(--sr));top:calc(5px + var(--st));width:auto;transform:none}
body.touch.portrait #topbar .score{font-size:13px;padding:2px 9px}
body.touch.portrait #topbar .score b{font-size:17px;line-height:20px}
body.touch.portrait #corehp{padding:1px 5px 3px}
body.touch.portrait #corehp .ch{height:9px}
body.touch.portrait #corehp .ch b{font-size:8px;line-height:9px}
body.touch.portrait #clock{font-size:12px}
body.touch.portrait #topbtns{top:calc(48px + var(--st))}
body.touch.portrait #objectiveToggle{left:calc(6px + var(--sl));top:calc(48px + var(--st));min-height:30px;font-size:11px;padding:5px 8px}
body.touch.portrait #objectivePanel{left:calc(6px + var(--sl));top:calc(88px + var(--st))}
body.touch.portrait #panel{top:calc(88px + var(--st));display:grid;grid-template-columns:40px 150px;gap:5px}
body.touch.portrait #mid{width:150px}
body.touch.portrait #right{grid-column:1/-1;width:195px;min-width:0}
body.touch.portrait #goldrow{min-width:0}
body.touch.portrait #bShop{min-width:0}
body.touch.portrait #bRecall,body.touch.portrait #bWard{width:30px;flex:none}
body.touch.portrait #mini{top:calc(88px + var(--st))}
body.touch.portrait #tLook{left:auto;right:calc(12px + var(--sr) + 42px * var(--s));top:calc(96px + var(--st) + 112px * var(--s))}
body.touch.portrait #tPing{left:auto;right:calc(6px + var(--sr));top:calc(96px + var(--st) + 112px * var(--s))}

/* phone-roster-roles: every category reachable without a nested horizontal scrollbar. */
@media(max-width:600px){
 .hero-filter-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:1 0 100%;width:100%;max-width:100%;overflow:visible}
 .hero-filter-row .btn{min-width:0;width:auto;min-height:44px;padding:8px 6px;font-size:12px;white-space:normal}
}

/* Voluntary cover status stays legible above the existing menu/shop overlays. */
#coverStatus{position:fixed;z-index:21;top:calc(8px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);max-width:calc(100vw - 24px);display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 10px;background:var(--panel);border:1px solid var(--gold);border-radius:12px;color:var(--gold);font-size:12px;box-shadow:0 4px 16px rgba(0,0,0,.35);pointer-events:none}
#coverStatus[hidden]{display:none}#coverStatus>span{min-width:0}#coverStatus button{pointer-events:auto;white-space:nowrap;min-height:36px}body.touch #coverStatus{flex-wrap:wrap;text-align:center}body.touch #coverStatus button{min-height:44px}

/* Cover layout v2: reserve real overlay space; retain all status/menu/shop controls. */
#coverStatus{width:min(480px,calc(100vw - 24px))}
#coverStatus>span{flex:1 1 0}#coverStatus button{flex:0 0 auto}body.touch #coverStatus{flex-wrap:nowrap}
body:has(#coverStatus:not([hidden])){--cover-ui-reserve:calc(80px + env(safe-area-inset-top,0px))}
body:has(#coverStatus:not([hidden])) #menu.ingame{padding-top:var(--cover-ui-reserve);justify-content:flex-start}
body:has(#coverStatus:not([hidden])) #shop{padding-top:var(--cover-ui-reserve);padding-bottom:12px}
body:has(#coverStatus:not([hidden])) #shop .sh-wrap{max-height:calc(100vh - var(--cover-ui-reserve) - 24px);max-height:calc(100dvh - var(--cover-ui-reserve) - 24px)}
