/* One artwork-backed header. Profile and Perfect 5 sit above the navigation. */
html body header:has(>.elb-battle-5v5){position:relative!important;isolation:isolate;display:grid!important;grid-template-columns:minmax(0,1fr) 420px!important;grid-template-rows:430px auto!important;gap:0!important;padding:0!important;background:#080c13!important;overflow:hidden!important}
html body header:has(>.elb-battle-5v5)>.elb-battle-5v5{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;grid-column:auto!important;grid-row:auto!important;aspect-ratio:auto!important;z-index:0!important;overflow:hidden!important;background:transparent!important;pointer-events:none!important}
html body header:has(>.elb-battle-5v5) .elb-premium-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;object-position:center!important;aspect-ratio:auto!important}
html body header:has(>.elb-battle-5v5)>.brand{position:absolute!important;top:0!important;left:0!important;width:calc(100% - 420px)!important;height:430px!important;z-index:1!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{grid-column:2!important;grid-row:1!important;align-self:start!important;justify-self:stretch!important;z-index:3!important;margin:0!important;width:100%!important;max-width:100%!important;height:auto!important;background:linear-gradient(145deg,#1d2939ed,#111924e8)!important}
html body header:has(>.elb-battle-5v5)>.perfect5-link{grid-column:2!important;grid-row:1!important;align-self:end!important;justify-self:center!important;position:relative!important;z-index:3!important;display:flex!important;align-items:center!important;justify-content:center!important;width:calc(100% - 32px)!important;max-width:388px!important;padding:0!important;margin:8px 16px 12px!important;border:0!important;background:transparent!important;line-height:0!important;box-shadow:none!important}
html body header .perfect5-link img{display:block!important;width:100%!important;height:auto!important;max-height:148px!important;object-fit:contain!important}
html body header:has(>.elb-battle-5v5)>nav{grid-column:1/-1!important;grid-row:2!important;position:relative!important;z-index:4!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;align-content:center!important;gap:8px!important;width:100%!important;height:auto!important;min-height:92px!important;min-width:0!important;padding:10px!important;margin:0!important;box-sizing:border-box!important;background:linear-gradient(0deg,#060a1099,#060a101c)!important;border:0!important;overflow:visible!important}
html body header nav>a.elb-art-clicker,html body header nav>button.elb-art-clicker,html body header.elb-has-perfect5>nav>.elb-art-clicker{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:calc((100% - 48px)/7)!important;max-width:240px!important;min-width:0!important;flex:1 1 0!important;min-height:44px!important;height:auto!important;padding:0!important;margin:0!important;line-height:0!important;background:transparent!important;border:0!important;border-radius:4px!important;box-shadow:none!important;order:0!important;overflow:visible!important;transition:filter .18s,transform .18s}
html body header nav .elb-art-clicker img{display:block!important;width:100%!important;height:auto!important;max-height:94px!important;object-fit:contain!important;margin:0!important}
html body header nav .elb-art-clicker:hover,html body header .perfect5-link:hover{filter:drop-shadow(0 0 8px #f5c45499)!important;transform:translateY(-2px)}
html body header nav .elb-art-clicker:focus-visible,html body header .perfect5-link:focus-visible{outline:2px solid #ffd471!important;outline-offset:4px!important}
@media(max-width:1000px){html body header:has(>.elb-battle-5v5){grid-template-columns:minmax(0,1fr) 360px!important;grid-template-rows:418px auto!important}html body header:has(>.elb-battle-5v5) .header-player-panel{grid-column:2!important;grid-row:1!important;padding:12px!important}html body header:has(>.elb-battle-5v5)>.perfect5-link{grid-column:2!important;grid-row:1!important;max-width:340px!important}html body header:has(>.elb-battle-5v5)>.brand{width:calc(100% - 360px)!important;height:418px!important}html body header:has(>.elb-battle-5v5)>nav{grid-column:1/-1!important;grid-row:2!important}html body header nav>a.elb-art-clicker,html body header nav>button.elb-art-clicker,html body header.elb-has-perfect5>nav>.elb-art-clicker{width:calc((100% - 24px)/4)!important;flex:0 1 calc((100% - 24px)/4)!important}}
@media(max-width:650px){html body header:has(>.elb-battle-5v5){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:160px auto auto auto!important}html body header:has(>.elb-battle-5v5)>.brand{width:100%!important;height:160px!important}html body header:has(>.elb-battle-5v5) .header-player-panel{grid-column:1!important;grid-row:2!important}html body header:has(>.elb-battle-5v5)>.perfect5-link{grid-column:1!important;grid-row:3!important;align-self:center!important;margin:12px auto!important}html body header:has(>.elb-battle-5v5)>nav{grid-row:4!important}html body header nav>a.elb-art-clicker,html body header nav>button.elb-art-clicker,html body header.elb-has-perfect5>nav>.elb-art-clicker{width:calc((100% - 16px)/3)!important;flex:0 1 calc((100% - 16px)/3)!important}}
@media(prefers-reduced-motion:reduce){html body header nav .elb-art-clicker,html body header .perfect5-link{transition:none!important;transform:none!important}}

/* Keep the right column clear for profile menus. */
html body header:has(>.elb-battle-5v5){grid-template-rows:300px auto!important;overflow:visible!important;z-index:20!important}
html body header:has(>.elb-battle-5v5)>.brand{height:300px!important}
html body header:has(>.elb-battle-5v5)>nav{grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px 8px!important;align-self:start!important;padding:10px 12px 14px!important;background:linear-gradient(0deg,#070b12a6,#070b1220)!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{z-index:30!important;overflow:visible!important}
html body header:has(>.elb-battle-5v5)>nav>.elb-art-clicker,html body header:has(>.elb-battle-5v5)>nav>.perfect5-link{display:flex!important;position:relative!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:44px!important;height:auto!important;padding:0!important;margin:0!important;grid-column:auto!important;grid-row:auto!important;align-self:center!important;justify-self:stretch!important;line-height:0!important;background:transparent!important;border:0!important;box-shadow:none!important;order:0!important}
html body header:has(>.elb-battle-5v5)>nav>.perfect5-link img{display:block!important;width:100%!important;max-height:94px!important;height:auto!important;object-fit:contain!important}
@media(max-width:1000px) and (min-width:651px){html body header:has(>.elb-battle-5v5){grid-template-rows:300px auto!important}html body header:has(>.elb-battle-5v5)>nav{grid-column:1!important;grid-row:2!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}html body header:has(>.elb-battle-5v5)>.brand{height:300px!important}}
@media(max-width:650px){html body header:has(>.elb-battle-5v5){grid-template-rows:160px auto auto!important}html body header:has(>.elb-battle-5v5)>nav{grid-column:1!important;grid-row:3!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}html body header:has(>.elb-battle-5v5)>.brand{height:160px!important}}

/* The profile sets the header height; navigation overlays the left artwork. */
html body header:has(>.elb-battle-5v5){grid-template-columns:minmax(0,1fr) 420px!important;grid-template-rows:auto!important;align-items:start!important;min-height:0!important;height:auto!important;gap:0!important;padding:0!important;margin-bottom:0!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{grid-column:2!important;grid-row:1!important;position:relative!important;align-self:start!important;height:auto!important;margin:0!important}
html body header:has(>.elb-battle-5v5)>.elb-battle-5v5{position:absolute!important;inset:0 auto 0 0!important;width:calc(100% - 420px)!important;height:100%!important;overflow:hidden!important}
html body header:has(>.elb-battle-5v5) .elb-premium-art{object-fit:fill!important}
html body header:has(>.elb-battle-5v5)>.brand{position:absolute!important;inset:0 auto auto 0!important;width:calc(100% - 420px)!important;height:100%!important}
html body header:has(>.elb-battle-5v5)>nav{position:absolute!important;left:0!important;right:420px!important;bottom:0!important;top:auto!important;width:auto!important;min-height:0!important;height:auto!important;grid-column:auto!important;grid-row:auto!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;padding:0!important;margin:0!important;align-content:end!important;align-items:end!important;background:linear-gradient(0deg,#070b1299,#070b1200)!important;border-radius:0!important}
html body header:has(>.elb-battle-5v5)>nav>.elb-art-clicker,html body header:has(>.elb-battle-5v5)>nav>.perfect5-link{width:100%!important;max-width:none!important;min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;align-self:end!important;line-height:0!important}
html body header:has(>.elb-battle-5v5)>nav>.elb-art-clicker img,html body header:has(>.elb-battle-5v5)>nav>.perfect5-link img{width:100%!important;height:auto!important;max-height:none!important;display:block!important;object-fit:contain!important}
@media(max-width:1000px) and (min-width:651px){html body header:has(>.elb-battle-5v5){grid-template-columns:minmax(0,1fr) 360px!important;grid-template-rows:auto!important}html body header:has(>.elb-battle-5v5)>.elb-battle-5v5,html body header:has(>.elb-battle-5v5)>.brand{width:calc(100% - 360px)!important}html body header:has(>.elb-battle-5v5)>nav{right:360px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:650px){html body header:has(>.elb-battle-5v5){display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important}html body header:has(>.elb-battle-5v5) .header-player-panel{grid-column:1!important;grid-row:1!important}html body header:has(>.elb-battle-5v5)>nav{position:relative!important;inset:auto!important;grid-column:1!important;grid-row:2!important;width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}html body header:has(>.elb-battle-5v5)>.elb-battle-5v5{width:100%!important}html body header:has(>.elb-battle-5v5)>.brand{display:none!important}}

/* Links sit below the artwork/profile row and leave the profile column clear. */
html body header:has(>.elb-battle-5v5){grid-template-rows:auto auto!important;overflow:visible!important}
html body header:has(>.elb-battle-5v5)>.elb-battle-5v5{position:relative!important;inset:auto!important;grid-column:1!important;grid-row:1!important;width:100%!important;height:100%!important;align-self:stretch!important;min-height:0!important}
html body header:has(>.elb-battle-5v5)>nav{position:relative!important;inset:auto!important;grid-column:1!important;grid-row:2!important;width:100%!important;z-index:4!important;background:#080c13!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{z-index:50!important;overflow:visible!important}
@media(max-width:650px){html body header:has(>.elb-battle-5v5)>nav{grid-column:1!important;grid-row:2!important}html body header:has(>.elb-battle-5v5)>.elb-battle-5v5{position:absolute!important;height:0!important}}

/* One compact full-width row; profile popovers remain in the higher layer. */
html body header:has(>.elb-battle-5v5)>nav{grid-column:1/-1!important;grid-row:2!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:0!important;width:100%!important;z-index:4!important;isolation:isolate!important}
html body header:has(>.elb-battle-5v5)>nav>.elb-art-clicker,html body header:has(>.elb-battle-5v5)>nav>.perfect5-link{min-width:0!important;min-height:0!important;width:100%!important;max-width:none!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{position:relative!important;z-index:100!important;overflow:visible!important}
@media(max-width:650px){html body header:has(>.elb-battle-5v5)>nav{grid-column:1/-1!important;grid-template-columns:repeat(8,minmax(0,1fr))!important}}

/* Bring the picture row over the header edge without a divider below. */
html body header:has(>.elb-battle-5v5){border-bottom:0!important;box-shadow:none!important}
html body header:has(>.elb-battle-5v5)>nav{margin-top:-8px!important;background:transparent!important;border:0!important;box-shadow:none!important}
html body header:has(>.elb-battle-5v5)>nav::before,html body header:has(>.elb-battle-5v5)>nav::after{display:none!important;content:none!important}

/* Keep the homepage story and match panels close to the picture navigation. */
html body main:has(>.cs-hub){padding-top:4px!important;margin-top:0!important}
html body main>.cs-hub{margin-top:0!important;padding-top:0!important}

/* Gold battle artwork joins the dark page and navigation plaques. */
html body header:has(>.elb-battle-5v5){background:#101119!important}
html body header:has(>.elb-battle-5v5) .elb-premium-art{object-fit:fill!important}
html body header:has(>.elb-battle-5v5) .header-player-panel{background:linear-gradient(135deg,#22212b,#171c26 65%,#12151d)!important;border-color:#68502c55!important}
html body header .elb-premium-motion,html body header .elb-premium-flash{display:none!important}
html body header:has(>.elb-battle-5v5) .elb-battle-5v5>.elb-trophy-glow{left:34%!important;top:-8%!important;width:32%!important;height:63%!important;background:radial-gradient(ellipse at 50% 50%,#fffadbbb 0%,#ffe49570 15%,#ffc54244 34%,#ffa71b18 57%,transparent 74%)!important;mix-blend-mode:screen!important;filter:drop-shadow(0 0 14px #ffbc3f)!important;animation:elb-solar-breathe 4s ease-in-out infinite!important;overflow:visible!important}
html body header .elb-trophy-glow::before{content:"";position:absolute;inset:-18%;background:repeating-conic-gradient(from 0deg,transparent 0deg 12deg,#ffdf9740 13deg 15deg,transparent 17deg 30deg);mask-image:radial-gradient(ellipse,black 8%,#0008 33%,transparent 68%);animation:elb-solar-rays 45s linear infinite!important}
html body header .elb-trophy-glow::after{content:"";position:absolute;left:49%;top:29%;width:32%;height:32%;background:linear-gradient(90deg,transparent 44%,#fff9d8 50%,transparent 56%),linear-gradient(0deg,transparent 44%,#fff9d8 50%,transparent 56%);filter:drop-shadow(0 0 7px #ffd467);animation:elb-solar-glint 5s ease-in-out infinite!important}
html body header:has(>.elb-battle-5v5) .elb-battle-5v5>.elb-trophy-particle{animation:elb-trophy-rise var(--speed) linear var(--delay) infinite!important}
@keyframes elb-solar-breathe{0%,100%{opacity:.72;transform:scale(.96)}50%{opacity:1;transform:scale(1.06)}}
@keyframes elb-solar-rays{to{transform:rotate(360deg)}}
@keyframes elb-solar-glint{0%,66%,100%{opacity:.1;transform:scale(.35) rotate(0deg)}76%{opacity:1;transform:scale(1) rotate(12deg)}86%{opacity:.2;transform:scale(.6) rotate(25deg)}}
@media(prefers-reduced-motion:reduce){html body header .elb-trophy-glow,html body header .elb-trophy-glow::before,html body header .elb-trophy-glow::after,html body header .elb-trophy-particle{animation:none!important}}
