:root {
  --header-ink: #080909;
  --header-line: #2a2d30;
  --header-text: #f1f2f2;
  --header-muted: #94999e;
  --header-mint: #79d8c4;
  --header-focus: #ffffff;
}

.universal-header,
.universal-header *,
.universal-footer,
.universal-footer * { box-sizing: border-box; }

.universal-header {
  position: relative;
  z-index: 10000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 2vw, 34px);
  align-items: center;
  width: min(1500px, 100%);
  min-height: 78px;
  margin: 0 auto;
  padding: 0 42px;
  border-bottom: 1px solid var(--header-line);
  color: var(--header-text);
  background: rgba(8,9,9,.98);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.universal-header.is-landing-top,
.universal-header.is-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.universal-header.is-landing-top {
  border-bottom-color: transparent;
  background: linear-gradient(180deg, rgba(8, 9, 9, .78), rgba(8, 9, 9, 0));
  box-shadow: none;
}

.universal-header.is-scrolled {
  border-bottom-color: var(--header-line);
  background: rgba(17, 19, 21, .96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.universal-brand,
.universal-nav-link,
.universal-mobile-menu summary,
.universal-socials a,
.universal-legal {
  min-width: 44px;
  min-height: 44px;
}

.universal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--header-text);
  text-decoration: none;
}

.universal-brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.universal-brand strong {
  font: 700 22px/1 "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.01em;
}

.universal-desktop-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 2vw, 34px);
  min-width: 0;
}

.universal-nav-link {
  position: relative;
  display: grid;
  gap: 3px;
  align-content: center;
  flex: 0 0 auto;
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.universal-nav-link:hover,
.universal-nav-link.is-active { color: var(--header-text); }

.universal-nav-link.is-shop { color: var(--header-mint); }

.universal-nav-link:focus-visible {
  color: var(--header-focus);
  outline: 3px solid var(--header-focus);
  outline-offset: 3px;
}

.shop-rewards-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.shop-rewards-action:focus-visible {
  outline: 3px solid var(--header-focus);
  outline-offset: 3px;
}

.universal-nav-link small {
  width: fit-content;
  padding: 2px 6px;
  color: #fff;
  background: #e32219;
  clip-path: polygon(3% 13%,96% 0,100% 84%,4% 100%,0 58%);
  font: 700 8px/1.2 "Barlow Condensed", sans-serif;
  letter-spacing: .04em;
  transform: rotate(-2deg);
}

.universal-network {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c3c7ca;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.universal-network i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--header-mint);
  box-shadow: 0 0 12px rgba(121,216,196,.72);
}

.universal-mobile-menu { display: none; }

body.universal-game-page #wrap { height: calc(100vh - 156px); }
body.universal-game-page .universal-footer { margin-top: 0; }
body.universal-nest-page { justify-content: flex-start; }

.universal-footer {
  position: relative;
  z-index: 9999;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  width: min(1500px, 100%);
  min-height: 78px;
  margin: 42px auto 0;
  padding: 0 42px;
  border-top: 1px solid var(--header-line);
  color: #707776;
  background: var(--header-ink);
  font: 600 10px/1 "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.universal-socials {
  display: flex;
  gap: 8px;
  align-items: center;
}

.universal-socials a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: border-color .18s ease, background .18s ease;
}

.universal-socials a:hover {
  border-color: #3b3f43;
  background: #101112;
}

.universal-socials a:focus-visible {
  border-color: var(--header-focus);
  background: #101112;
  outline: 3px solid var(--header-focus);
  outline-offset: 3px;
}

.universal-socials img {
  width: 17px;
  height: 17px;
  opacity: .67;
  filter: invert(1);
  transition: opacity .18s ease;
}

.universal-socials a:hover img,
.universal-socials a:focus-visible img { opacity: 1; }

.universal-legal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a9afae;
  text-decoration: underline;
  text-decoration-color: #555d5c;
  text-underline-offset: 4px;
}

.universal-legal:hover { color: var(--header-mint); }
.universal-legal:focus-visible {
  color: var(--header-focus);
  outline: 3px solid var(--header-focus);
  outline-offset: 3px;
}
.universal-city { justify-self: end; }

@media (max-width: 1280px) {
  .universal-header { padding: 0 24px; }
  .universal-desktop-nav { gap: 17px; }
  .universal-nav-link { font-size: 10px; }
  .universal-brand strong { font-size: 19px; }
  .universal-brand img { width: 38px; height: 38px; }
}

@media (max-width: 980px) {
  .universal-header {
    grid-template-columns: 1fr auto auto;
    min-height: 68px;
    padding: 0 20px;
  }
  .universal-desktop-nav { display: none; }
  .universal-mobile-menu { position: relative; display: block; }
  .universal-mobile-menu summary {
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid var(--header-line);
    cursor: pointer;
    list-style: none;
  }
  .universal-mobile-menu summary::-webkit-details-marker { display: none; }
  .universal-mobile-menu summary span { display: block; width: 17px; height: 1px; background: var(--header-text); }
  .universal-mobile-menu nav {
    position: absolute;
    top: 44px;
    right: 0;
    display: grid;
    width: min(320px, calc(100vw - 28px));
    padding: 8px 18px;
    border: 1px solid #3b3f43;
    background: #101112;
    box-shadow: 0 24px 60px rgba(0,0,0,.7);
  }
  .universal-mobile-menu .universal-nav-link {
    min-height: 46px;
    align-content: center;
    border-bottom: 1px solid var(--header-line);
    font-size: 11px;
  }
  .universal-mobile-menu .universal-nav-link:last-child { border-bottom: 0; }
  body.universal-game-page #wrap { height: calc(100vh - 180px); }
  .universal-footer {
    grid-template-columns: 1fr auto;
    gap: 18px;
    min-height: 112px;
    padding: 18px 20px;
  }
  .universal-socials { grid-column: 1 / -1; grid-row: 1; flex-wrap: wrap; }
  .universal-legal { grid-column: 2; grid-row: 2; justify-self: end; }
  .universal-city { display: none; }
}

@media (max-width: 520px) {
  .universal-network { font-size: 9px; }
  .universal-brand strong { font-size: 18px; }
  .universal-brand img { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .universal-header.is-landing-top,
  .universal-header.is-scrolled { transition: none; }
}
