/* Account header logos keep the original image shape. Fallback icons are unchanged. */
.r2-command-title .r2-command-title-icon:has(> img),
.r2-account-command .r2-membership-settings-header .r2as-brand-icon:has(> img),
.r2-multisystem-dashboard .r2-command-header .r2-brand-mark:has(> img),
.r2-free-shell .r2-free-hero .r2-free-logo:has(> img){
  --r2-header-logo-height:2.7rem;
  --r2-header-logo-width:10rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:auto;
  height:auto;
  max-width:min(var(--r2-header-logo-width),100%);
  padding:0;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.r2-command-title .r2-command-title-icon:has(> img)>img,
.r2-account-command .r2-membership-settings-header .r2as-brand-icon:has(> img)>img,
.r2-multisystem-dashboard .r2-command-header .r2-brand-mark:has(> img)>img,
.r2-free-shell .r2-free-hero .r2-free-logo:has(> img)>img{
  display:block;
  flex:0 1 auto;
  width:auto;
  height:auto;
  max-width:var(--r2-header-logo-width);
  max-height:var(--r2-header-logo-height);
  padding:0;
  border-radius:0;
  object-fit:contain;
  background:transparent;
}
.r2-command-title:has(> .r2-command-title-icon>img),
.r2as-command-title:has(> .r2as-brand-icon>img){flex-wrap:wrap;row-gap:.4rem}
.r2-command-title:has(> .r2-command-title-icon>img)>span:last-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:575.98px){
  .r2-command-title .r2-command-title-icon:has(> img),
  .r2-account-command .r2-membership-settings-header .r2as-brand-icon:has(> img),
  .r2-multisystem-dashboard .r2-command-header .r2-brand-mark:has(> img),
  .r2-free-shell .r2-free-hero .r2-free-logo:has(> img){--r2-header-logo-height:2.35rem;--r2-header-logo-width:8rem}
}
