/* Compact language selector, shared by the public site and player panel. */
html body #topo.webpw-site-header .language-switch,
html body #topo.webpw-site-header .panel-language-switch{position:relative;flex:0 0 auto!important;width:auto!important;min-width:0!important;height:auto!important;align-self:center}
html body #topo.webpw-site-header .language-current,
html body #topo.webpw-site-header .panel-flag-current{display:flex!important;align-items:center;gap:6px!important;width:auto!important;min-width:0!important;height:36px!important;padding:4px 8px!important;border:1px solid var(--border-color,#454039)!important;border-radius:6px;white-space:nowrap;cursor:pointer;color:inherit;background:transparent}
html body #topo.webpw-site-header .language-menu,
html body #topo.webpw-site-header .panel-flag-menu{width:190px!important;min-width:190px!important;padding:4px!important;gap:0!important;right:0;left:auto;max-height:70vh;overflow:auto;grid-template-columns:1fr!important}
html body #topo.webpw-site-header .language-menu button,
html body #topo.webpw-site-header .panel-flag-menu button{display:flex!important;align-items:center;justify-content:flex-start!important;gap:8px!important;width:100%!important;height:36px!important;min-height:36px!important;margin:0!important;padding:4px 8px!important;border:0!important;border-radius:4px;white-space:nowrap;font-size:12px;cursor:pointer}
html body #topo.webpw-site-header .language-menu button:hover,
html body #topo.webpw-site-header .panel-flag-menu button:hover,
html body #topo.webpw-site-header [data-lang][aria-pressed=true],
html body #topo.webpw-site-header [data-panel-lang][aria-pressed=true]{background:rgba(255,204,51,.14)!important}
html body #topo.webpw-site-header .language-switch img,
html body #topo.webpw-site-header .panel-language-switch img{width:22px!important;height:22px!important;min-width:22px!important;border-radius:50%;object-fit:cover}
.webpw-language-label{font:600 11px/1.2 Arial,sans-serif}.webpw-language-name{font:500 12px/1.2 Arial,sans-serif}.webpw-language-chevron{font-size:11px}
html body .panel-flag-menu[hidden]{display:none!important}
@media(min-width:1001px){html body #topo.webpw-site-header{column-gap:14px!important}html body .webpw-site-nav{gap:14px!important}}
@media(max-width:600px){html body #topo.webpw-site-header .language-current,html body #topo.webpw-site-header .panel-flag-current{padding:4px 6px!important;gap:4px!important}.webpw-language-label{max-width:100px;overflow:hidden;text-overflow:ellipsis;font-size:10px}}
/* Reserve intrinsic menu width; extra breathing room without edge-to-edge branding. */
@media(min-width:1451px){
 html body #topo.webpw-site-header{padding-inline:max(24px,calc((100% - 1600px)/2))!important;column-gap:20px!important}
 html body #topo.webpw-site-header .webpw-site-brand{flex:0 0 110px!important}
 html body #topo.webpw-site-header .webpw-site-brand img{width:110px!important}
 html body #topo.webpw-site-header .webpw-site-nav{min-width:0!important;gap:12px!important;overflow-x:auto;scrollbar-width:thin;justify-content:safe center!important}
 html body #topo.webpw-site-header .webpw-site-nav a{font-size:clamp(12px,.85vw,15px)!important;padding-inline:0!important}
 html body #topo.webpw-site-header .webpw-site-account{gap:10px!important}
}
@media(min-width:1451px) and (max-width:1550px){
 html body #topo.webpw-site-header{column-gap:12px!important}
 html body #topo.webpw-site-header .webpw-site-nav{gap:9px!important}
 html body #topo.webpw-site-header .webpw-site-account{gap:7px!important}
}
@media(min-width:1451px){html[lang="ru"] body #topo.webpw-site-header .webpw-site-nav a{font-size:12px!important}html[lang="ru"] body #topo.webpw-site-header .webpw-site-nav{gap:8px!important}}
html[lang="ru"] .server-presence strong{font-size:13px!important;overflow-wrap:anywhere}
html[lang="ru"] .server-presence__version{flex-shrink:0}
html[lang="ru"] .server-presence__version small{font-size:9px!important;letter-spacing:0!important}
/* Separate text and artwork into real layout columns in every language. */
body.home-ranking.hero-brand-layout .hero .hero-content{
 display:grid!important;grid-template-columns:minmax(0,360px) minmax(0,380px)!important;
 grid-template-rows:auto auto auto;gap:12px 28px!important;align-content:start;align-items:center!important;justify-content:start!important;
}
body.home-ranking.hero-brand-layout .hero .hero-content .hero-logo{
 position:static!important;inset:auto!important;transform:none!important;animation:none!important;
 grid-column:2;grid-row:1 / 4;width:100%!important;max-width:380px!important;height:auto!important;max-height:none!important;margin:0!important;object-fit:contain;
}
body.home-ranking.hero-brand-layout .hero .hero-content h1{
 grid-column:1;grid-row:1;min-width:0;width:100%!important;max-width:100%!important;
 white-space:normal!important;overflow-wrap:anywhere;font-size:clamp(25px,2.35vw,34px)!important;line-height:1.18!important;margin:0!important;
}
body.home-ranking.hero-brand-layout .hero .hero-content h1 em{display:block;white-space:normal!important}
body.home-ranking.hero-brand-layout .hero .hero-content .hero-public-subtitle{
 grid-column:1;grid-row:2;min-width:0;max-width:100%!important;width:100%!important;
 font-size:13px!important;line-height:1.5!important;white-space:normal!important;margin:0!important;
}
body.home-ranking.hero-brand-layout .hero .hero-content .hero-buttons{
 grid-column:1;grid-row:3;display:flex!important;flex-wrap:wrap;gap:10px!important;min-width:0;max-width:100%!important;margin:4px 0 0!important;
}
body.home-ranking.hero-brand-layout .hero .hero-content .hero-buttons .button{min-width:0!important;white-space:normal!important;text-align:center;max-width:100%;font-size:11px!important}
@media(max-width:780px){
 body.home-ranking.hero-brand-layout .hero .hero-content{
  grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto auto!important;
  padding:26px 0 24px!important;gap:14px!important;text-align:center!important;justify-items:center;
 }
 body.home-ranking.hero-brand-layout .hero .hero-content .hero-logo{grid-column:1;grid-row:1;width:min(230px,75%)!important;max-width:100%!important}
 body.home-ranking.hero-brand-layout .hero .hero-content h1{grid-row:2;font-size:clamp(23px,6vw,30px)!important}
 body.home-ranking.hero-brand-layout .hero .hero-content .hero-public-subtitle{grid-row:3;max-width:340px!important}
 body.home-ranking.hero-brand-layout .hero .hero-content .hero-buttons{grid-row:4;justify-content:center!important;width:100%!important}
 body.home-ranking.hero-brand-layout .hero .hero-content .hero-buttons .button{flex:1 1 130px;width:auto!important;max-width:210px}
}


/* Keep the panel language label inside its own header control. */
html body #topo.webpw-site-header .panel-language-switch{flex-shrink:0!important;min-width:max-content!important}
html body #topo.webpw-site-header .panel-language-switch>button{width:auto!important;min-width:max-content!important;flex-shrink:0!important}

/* Gold hover/focus text remains legible on the dark language dropdown. */
html:not([data-theme="light"]) body #topo.webpw-site-header :is(.language-menu,.panel-flag-menu) button:is(:hover,:focus-visible,[aria-pressed="true"]),
html:not([data-theme="light"]) body #topo.webpw-site-header :is(.language-menu,.panel-flag-menu) button:is(:hover,:focus-visible,[aria-pressed="true"]) span{
 color:#f3cd72!important;
}

/* Restore hero breathing room and original emblem motion without text overlap. */
html[data-theme] body.home-ranking.hero-brand-layout .hero{padding-top:150px!important}
@media(max-width:1100px){html[data-theme] body.home-ranking.hero-brand-layout .hero{padding-top:90px!important}}
@media(max-width:780px){html[data-theme] body.home-ranking.hero-brand-layout .hero{padding-top:50px!important}}
@media(prefers-reduced-motion:no-preference){
 html[data-theme] body.home-ranking.hero-brand-layout .hero .hero-content .hero-logo{animation:webpw-emblem-float 6s ease-in-out infinite!important}
}
