.portal-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-width: 0;
}

.portal-brand-lockup .portal-brand-mark {
  justify-self: start;
}

.portal-brand-mark,
.header > a.portal-brand-mark,
.header > .portal-brand-mark,
.header-brand.portal-brand-mark {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0;
  line-height: 1;
  min-width: max-content;
  text-decoration: none;
  color: inherit;
}

a.portal-brand-mark:hover .portal-brand-art,
a.portal-brand-mark:focus-visible .portal-brand-art {
  opacity: 0.92;
}

.portal-brand-mark--center {
  justify-self: center;
  text-align: center;
}

.portal-brand-art {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(420px, 58vw);
  margin: 0;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  flex: 0 0 auto;
  border-radius: 0;
  filter: none;
}

.portal-brand-meta {
  display: none !important;
}

.header .logo-tcgl-link,
.header-v2 .logo-tcgl-link,
.portal-brand-lockup .logo-tcgl-link,
.header a:has(> img.logo-tcgl),
.header a:has(> img.logo-right),
.header img.logo-tcgl,
.header img.logo-right,
.header-actions > a:has(> img.logo-tcgl),
.header-actions > a:has(> img.logo-right) {
  display: none !important;
}

.header .portal-brand-lockup,
.header-v2 .portal-brand-lockup {
  justify-self: start;
}

.login-brand-v2.portal-brand-mark,
.login-brand.portal-brand-mark {
  align-items: flex-end !important;
  gap: 0;
  margin-bottom: 0;
  min-width: 0 !important;
  width: min(380px, 78vw);
  max-width: 78vw;
  justify-self: end;
}

.login-brand-v2 .portal-brand-art,
.login-brand .portal-brand-art,
body.login-v2 .portal-brand-art {
  width: min(380px, 78vw) !important;
  height: auto !important;
  max-width: 78vw !important;
  max-height: none !important;
  margin: 0;
  object-fit: contain;
  object-position: right top;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

@media (max-width: 900px) {
  .header-v2 .portal-brand-mark,
  .header .portal-brand-mark,
  .header-brand.portal-brand-mark,
  .header > a.portal-brand-mark {
    justify-self: center;
  }

  .portal-brand-art {
    height: 46px;
    max-width: min(340px, 78vw);
  }
}

@media (max-width: 520px) {
  .portal-brand-art {
    height: 38px;
    max-width: min(280px, 82vw);
  }

  .login-brand-v2 .portal-brand-art,
  .login-brand .portal-brand-art,
  body.login-v2 .portal-brand-art {
    width: min(420px, 88vw) !important;
    max-height: none !important;
  }
}

html.dk-dark .portal-brand-art,
html.dk-dark body:has(.bg-wall) .portal-brand-art,
html.dk-dark body:has(.body-bg-wall) .portal-brand-art {
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.45)) !important;
  opacity: 1 !important;
}
