/* Shared public-page shell, based on Inventory's button treatment.
   Load after page styles. Keep navigation in DOM order:
   Live Game, Dailies, Shop, Inventory, Leaderboards, Achievements, Profile,
   About, How to Play. Each page selects the destinations relevant to it. */
:root {
  --mcf-page-width: 1240px;
  --mcf-page-gutter: clamp(16px, 3vw, 32px);
}

.mcfPageHeader {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 68px;
  margin: 0;
  padding: 14px max(var(--mcf-page-gutter), calc((100% - var(--mcf-page-width)) / 2 + var(--mcf-page-gutter)));
  border-bottom: 1px solid #2f3f4e;
  background: rgba(12, 16, 18, 0.96);
  backdrop-filter: blur(10px);
}

.mcfPageHeader .mcfPageBrand {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #e3edf7;
  text-decoration: none;
  font: 400 14px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
}
.mcfPageBrand > strong {
  font: 700 16px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
}
.mcfPageBrand > span {
  display: block;
  color: #95a9ba;
  font: 400 12px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
}
.mcfPageBrand:focus-visible { outline: 2px solid #8fd1ff; outline-offset: 5px; border-radius: 3px; }

main.mcfPageContent,
.mcfPageFooter {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--mcf-page-width);
  min-width: 0;
  margin-inline: auto;
  padding: 32px var(--mcf-page-gutter) 48px;
}
.mcfPageFooter { padding-block: 24px; }
.mcfInfoFooter { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mcfPageFooter a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #8fd1ff;
  text-underline-offset: 4px;
}
.mcfPageFooter a:focus-visible, .site-footer a:focus-visible {
  outline: 2px solid #8fd1ff;
  outline-offset: 3px;
}
.mcfPageContent > .document { max-width: 80ch; }
.achievementExplorer { top: 80px; }

nav.mcfPageNav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

nav.mcfPageNav > :is(a, button),
a.mcfNavLink {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #2f3f4e;
  border-radius: 6px;
  background: #111822;
  color: #e3edf7;
  font: 400 14px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
  cursor: pointer;
}

nav.mcfPageNav > :is(a, button):hover,
a.mcfNavLink:hover {
  border-color: #456079;
  background: #1b2938;
  color: #fff;
  text-decoration: none;
}

nav.mcfPageNav > :is(a, button)[aria-current="page"] {
  border-color: #6ebce9;
  background: #173247;
  color: #bce5ff;
}

nav.mcfPageNav > :is(a, button):focus-visible,
a.mcfNavLink:focus-visible {
  outline: 2px solid #8fd1ff;
  outline-offset: 3px;
}

nav.mcfPageNav > [hidden] { display: none; }

/* The live arena owns its control-rail layout; it shares button appearance. */
nav.mcfPageNav--game { flex-wrap: nowrap; }
nav.mcfPageNav--game > button { font-size: 12px; white-space: nowrap; }
/* Mobile utility menus retain their purchase action. */
[data-layout-mode="desktop"] [data-role="nav-region"] > [data-role="buy-diamonds-nav"] { display: none !important; }

@media (max-width: 980px) {
  .mcfPageHeader {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .mcfPageHeader > nav.mcfPageNav {
    width: 100%;
    justify-content: flex-start;
  }
  .achievementExplorer { top: 6px; }
}

@media (max-width: 640px) {
  main.mcfPageContent { padding-block: 24px 36px; }
}

@media (max-width: 640px), (pointer: coarse) {
  nav.mcfPageNav:not(.mcfPageNav--game) > :is(a, button),
  a.mcfNavLink { min-height: 44px; }
}
