/**
 * Starlight site chrome — Pokémon TCG header adapted to magical-girl palette.
 * ~76px dark bar, large logo + badge lockup left, nav + account right.
 */
:root {
  --st-chrome-max: none;
  --st-chrome-pad-inline: clamp(18px, 3vw, 40px);
  --st-chrome-bar-h: 76px;
  --st-chrome-bar: #0d0d0f;
  --st-chrome-bar-ink: #fff;
  --st-chrome-bar-muted: rgba(255, 255, 255, 0.82);
  --st-chrome-bar-line: rgba(255, 130, 200, 0.28);
  --st-masthead-nav-break: 2000px;
  --st-masthead-nav-expand: 2000px;
  --st-magic-lavender: #e8d4ff;
  --st-magic-rose: #ffe8f4;
  --st-magic-sky: #e8f6ff;
}

body.unified-shell.shell-masthead-layout:not(.shell-hybrid-layout) {
  background: #fff;
}

body.unified-shell.shell-masthead-layout:not(.shell-hybrid-layout) .sky {
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(255, 130, 200, 0.1) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 0%, rgba(107, 198, 248, 0.07), transparent 40%);
  background-size: 36px 36px, 100% 100%;
}

/* —— Pokémon-height dark top bar —— */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead {
  border-bottom: 0;
  background: var(--st-chrome-bar);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner {
  container-type: inline-size;
  container-name: shell-masthead;
  max-width: none;
  margin: 0;
  padding: 0 var(--st-chrome-pad-inline);
  min-height: var(--st-chrome-bar-h);
  height: var(--st-chrome-bar-h);
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav actions";
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  justify-self: end;
  margin-inline-end: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-nav {
  grid-area: nav;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand {
  grid-area: brand;
  justify-self: start;
}

/* Brand lockup: logo + Collectible Card Hub ribbon */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0;
  color: var(--st-chrome-bar-ink) !important;
  text-decoration: none;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(520px, 48vw);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-brand-lockup {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand .logo {
  width: auto !important;
  height: 40px !important;
  max-width: min(300px, 100%) !important;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 2px 8px rgba(255, 130, 200, 0.35));
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand .binder-ribbon {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 0.55rem + 0.35vw, 0.78rem);
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, rgba(107, 198, 248, 0.42), rgba(255, 130, 200, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-menu-button {
  display: inline-grid;
  place-items: center;
  color: var(--st-chrome-bar-ink);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  width: 40px;
  height: 40px;
}

/* Nav packed against the profile/actions cluster on the right */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-nav {
  display: none;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link {
  flex: 0 1 auto;
  min-width: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega-trigger,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link {
  min-height: var(--st-chrome-bar-h);
  max-width: 100%;
  padding: 0 clamp(8px, 1vw, 16px);
  border-radius: 0;
  font-size: clamp(0.66rem, 0.62rem + 0.18vw, 0.78rem);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-chrome-bar-muted);
  white-space: nowrap;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega-trigger:hover,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega-trigger:focus-visible,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega.is-open .shell-mega-trigger,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link:hover,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link:focus-visible,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link.shell-daily-top-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: visible;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link.shell-daily-top-link > span:not(.shell-daily-ready-badge) {
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link .shell-daily-ready-badge {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  bottom: auto;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 8px);
  margin: 0 auto !important;
  padding: 2px 7px !important;
  font-size: 0.55rem !important;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  transform: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 12px rgba(255, 130, 200, 0.55);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-top-link .shell-daily-ready-badge[hidden] {
  display: none !important;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-nav,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega {
  overflow: visible;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .site {
  padding-inline: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-mega-panel {
  border-radius: 8px;
  border: 1px solid rgba(107, 198, 248, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  left: auto;
  right: 0;
  transform: none;
}

/* Account cluster — flush to the far right beside the profile icon */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions {
  gap: 0;
  flex: 0 0 auto;
  min-width: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-account-menu-button {
  max-width: none;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-account-menu {
  left: auto;
  right: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-sfx-button,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-notify-bell {
  width: 38px;
  height: 38px;
  min-width: 38px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: none;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-notify-bell-icon {
  width: 18px;
  height: 18px;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-account-menu-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 0;
  max-width: none;
  padding: 0;
  gap: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-avatar {
  width: 42px;
  height: 42px;
  flex: none;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-avatar-silhouette {
  width: 22px;
  height: 22px;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-account-menu-summary {
  background: linear-gradient(135deg, rgba(107, 198, 248, 0.14), rgba(255, 130, 200, 0.12));
  border-color: rgba(107, 198, 248, 0.28);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-account-menu-summary .shell-profile-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  color: #405fa1;
  font-size: 0.78rem;
  font-weight: 850;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-account-menu-summary .shell-account-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(107, 198, 248, 0.28);
  white-space: nowrap;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-account-menu-summary .star-bit-icon {
  width: 12px;
  height: 12px;
}

/* LIVE footer */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed {
  background: linear-gradient(180deg, #1a1528, #0d0d0f);
  border-top-color: rgba(255, 130, 200, 0.35);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.35);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-title,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-state,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-ticker-item,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-ticker-copy {
  color: #fff;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-state {
  color: rgba(255, 255, 255, 0.72);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-open,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-body {
  background: rgba(13, 13, 15, 0.98);
  border-bottom-color: rgba(255, 130, 200, 0.2);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-copy strong {
  color: #fff;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-copy span,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-live-strip-bottom .shell-live-feed-empty {
  color: rgba(255, 255, 255, 0.7);
}

/* Full-bleed content under the bar */
body.shell-masthead-layout:not(.shell-hybrid-layout) .site {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .main {
  margin: 0;
  padding: 0;
  width: 100%;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-view-frame,
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-view-frame.active {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-view-frame iframe {
  background: #fff;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-native-view,
body.shell-masthead-layout:not(.shell-hybrid-layout) .card-gallery-page {
  max-width: var(--st-chrome-max);
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 28px) var(--st-chrome-pad-inline) 40px;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-event-banner {
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 130, 200, 0.25);
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-drawer {
  background: linear-gradient(180deg, #0d0d0f, #2a2140);
  border-right: 1px solid rgba(255, 130, 200, 0.25);
  color: #fff;
}

/* Collapsed by default — expand only when the masthead container is wide enough */
body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner.shell-masthead--force-collapse .shell-masthead-nav {
  display: none !important;
}

body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner.shell-masthead--force-collapse .shell-menu-button {
  display: inline-grid !important;
  place-items: center;
}

@container shell-masthead (min-width: 2000px) {
  .shell-masthead-nav {
    display: flex !important;
  }

  .shell-menu-button {
    display: none !important;
  }

  .shell-masthead-inner {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "brand nav actions" !important;
  }
}

@container shell-masthead (min-width: 2000px) {
  .shell-masthead-inner.shell-masthead--force-collapse .shell-masthead-nav {
    display: none !important;
  }

  .shell-masthead-inner.shell-masthead--force-collapse .shell-menu-button {
    display: inline-grid !important;
    place-items: center;
  }
}

@media (min-width: 2000px) {
  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-nav {
    display: flex;
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-menu-button {
    display: none;
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav actions";
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner.shell-masthead--force-collapse .shell-masthead-nav {
    display: none !important;
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner.shell-masthead--force-collapse .shell-menu-button {
    display: inline-grid !important;
    place-items: center;
  }
}

@media (max-width: 1999px) {
  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-actions .shell-account-menu-button {
    max-width: none;
    padding: 0;
    border-radius: 999px;
  }
}

@media (max-width: 600px) {
  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand .logo {
    height: 48px !important;
    max-width: min(340px, 72vw) !important;
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-brand .binder-ribbon {
    display: none;
  }

  body.shell-masthead-layout:not(.shell-hybrid-layout) .shell-masthead-inner {
    --st-chrome-bar-h: 68px;
  }
}
