/* Public brand masthead. These selectors never target game or dialog headers. */
html body header.ng-brand-header {
  position: relative;
  isolation: isolate;
  display: block;
  box-sizing: border-box;
  width: min(1180px, calc(100% - 28px));
  min-height: 70px;
  margin: max(12px, env(safe-area-inset-top, 0px)) auto 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ng-shell-line, #e4eaf2) 86%, var(--ng-shell-primary, #2f6bff) 14%);
  border-radius: 22px;
  color: var(--ng-shell-text, #182337);
  background: var(--ng-shell-card-bg, #fff);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ng-shell-text) 5%, transparent), 0 14px 38px color-mix(in srgb, var(--ng-shell-text) 9%, transparent), inset 0 1px color-mix(in srgb, #fff 40%, transparent);
  top: auto;
  z-index: 1;
}
html body .ng-brand-header > .ng-brand-header__row {
  position: relative;
  z-index: 2;
  display: flex;
  box-sizing: border-box;
  min-height: 68px;
  width: 100%;
  padding: 7px 18px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
html body .ng-brand-header .brand {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 0;
}
html body .ng-brand-header .brand-logo {
  display: block;
  width: min(252px, 100%);
  max-width: 252px;
  height: 49px;
  object-fit: contain;
  object-position: left center;
  filter: none;
}
html body .ng-brand-header .brand-logo[hidden],
html body .ng-brand-header [hidden] { display: none !important; }
.ng-brand-header__name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
/* The shared masthead never inherits the legacy page-header grid texture. */
html body .ng-brand-header::before {
  content: none;
  display: none;
}
html[data-ui-theme="particles"] body header.ng-brand-header {
  background: var(--ng-shell-card-bg, #fff) !important;
}
.ng-load-recovery {
  display: flex;
  min-height: 150px;
  padding: 24px 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ng-shell-text, #182337);
  text-align: center;
}
.ng-load-recovery strong { font-size: 16px; font-weight: 700; }
.ng-load-recovery p { max-width: 42ch; margin: 0; color: var(--ng-shell-muted, #73809a); font-size: 14px; }
.ng-load-recovery button {
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid var(--ng-shell-primary, #2f6bff);
  border-radius: 12px;
  color: var(--ng-shell-action-text, #07111f);
  background: var(--ng-shell-primary, #2f6bff);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.ng-load-recovery button:focus-visible { outline: 3px solid var(--ng-shell-primary, #2f6bff); outline-offset: 3px; }
html body header.ng-brand-header::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 2px;
  display: block;
  background: linear-gradient(90deg, transparent, var(--ng-shell-primary), var(--ng-shell-accent), transparent);
  opacity: .65;
  animation: none;
  pointer-events: none;
}
html body .ng-brand-header .ng-member-entry {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-width: 106px;
  min-height: 44px;
  margin: 0;
}
/* Keep the semantic page name without retaining the superseded title card. */
html body .ng-page-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
body.ng-hub-page > .ng-brand-header + .ng-hub-shell { padding-top: 0; }
html.lottery-embed .ng-brand-header,
body:is(.gh-player-open, .trial-game-open, .collector-detail-open, .ng-fullscreen-experience) .ng-brand-header { display: none !important; }
@media (max-width: 720px) {
  html body header.ng-brand-header {
    width: calc(100% - 24px);
    min-height: 58px;
    margin-top: max(10px, env(safe-area-inset-top, 0px));
    border-radius: 20px;
  }
  html body .ng-brand-header > .ng-brand-header__row {
    min-height: 56px;
    padding: 6px 12px;
    gap: 10px;
  }
  html body .ng-brand-header .brand-logo {
    width: min(189px, 100%);
    max-width: 189px;
    height: 36px;
  }
  html body .ng-brand-header .ng-member-entry {
    min-width: 92px;
    min-height: 40px;
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ng-brand-header, .ng-brand-header * { transition: none !important; }
}
