/* Preserve the supplied transparent PNG; crop only its empty vertical margins in layout. */
.sidebar img.logo{display:block;width:calc(100% - 8px);max-width:none;height:auto;aspect-ratio:2048/330;object-fit:cover;object-position:center;margin:20px 4px 38px;background:transparent}
.login-aside img.logo{height:auto;aspect-ratio:2048/330;object-fit:cover;object-position:center;background:transparent}
.brand-logo-shell{background:transparent!important;border:0!important;box-shadow:none!important}
.brand-logo-img{height:auto!important;aspect-ratio:2048/330;object-fit:cover!important;object-position:center!important;background:transparent!important}
.print-report-header img{aspect-ratio:2048/330;object-fit:cover;object-position:center}
@media(max-width:820px){.sidebar img.logo{width:calc(100% - 8px);margin:16px 4px 28px}}

/* Player sheet: keep the logo legible and give the language control its own row. */
@media screen {
  .topbar:has(#playerLangSwitch){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"brand lang" "actions actions"!important;column-gap:20px!important;row-gap:10px!important;height:auto!important;align-items:center!important}
  .topbar:has(#playerLangSwitch) .brand-logo-shell{grid-area:brand;min-width:0;max-width:100%;overflow:hidden;background:transparent!important;padding:0!important}
  .topbar:has(#playerLangSwitch) .brand-logo-img{display:block!important;width:clamp(170px,28vw,272px)!important;max-width:100%!important;height:54px!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:left center!important;background:transparent!important}
  .topbar:has(#playerLangSwitch) .brand-logo-context{display:none!important}
  .topbar:has(#playerLangSwitch) #playerLangSwitch{grid-area:lang;position:static!important;justify-self:end;flex:none;width:max-content!important;margin:0!important;white-space:nowrap}
  .topbar:has(#playerLangSwitch) .top-actions{grid-area:actions;min-width:0;justify-self:stretch;flex-wrap:wrap!important}
  @media(max-width:640px){.topbar:has(#playerLangSwitch){grid-template-columns:1fr!important;grid-template-areas:"brand" "lang" "actions"!important}.topbar:has(#playerLangSwitch) #playerLangSwitch{justify-self:start}.topbar:has(#playerLangSwitch) .brand-logo-img{width:min(272px,100%)!important}}
}
