/* Lee Wyatt Corp shared site chrome, scoped for pages that own their whole screen (a player,
   a game, a canvas). The rules are the homepage header, nav, account button, footer and back to
   top from /site-chrome.css, value for value, but every selector reaches ONLY the elements
   /account/lwc-chrome.js injects, so nothing here touches the page's own html, body, main, nav,
   header, footer, buttons or links. Load it with /account/lwc-chrome.js alone, never with the global
   /site-chrome.css or /account/lwc-chrome.css. */

header:has(> .header-inner), footer[data-lwc-kevin-sig], .back-to-top {
  --text: #ffffff;
  --text-muted: #8888a0;
  --text-dim: #555566;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --accent3: #ec4899;
  --card-border: rgba(255, 255, 255, 0.08);
  --lwc-safe-top: env(safe-area-inset-top);
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
header:has(> .header-inner) *, footer[data-lwc-kevin-sig] * { box-sizing: border-box; }

header:has(> .header-inner) {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 100;
  margin: 0;
  padding: calc(20px + var(--lwc-safe-top)) 0 20px;
  background: #050508;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 -80px 0 80px #050508;
  line-height: normal;
  text-align: left;
}
header:has(> .header-inner) .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header:has(> .header-inner) .logo {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.5px;
  position: relative;
}
header:has(> .header-inner) .logo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent3), transparent);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
header:has(> .header-inner) .logo:hover::after { opacity: 1; transform: scaleX(1); }
header:has(> .header-inner) .logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#primaryNav { display: flex; gap: 32px; }
#primaryNav a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s; }
#primaryNav a:hover { color: var(--text); }
#primaryNav a[href*="affiliates"] { border-left: 1px solid rgba(255,255,255,0.12); padding-left: 20px; margin-left: -12px; }
header:has(> .header-inner) .menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}
header:has(> .header-inner) .header-actions { display: flex; align-items: center; gap: 10px; }
header:has(> .header-inner) .login-cta {
  min-height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(99,102,241,0.34), rgba(236,72,153,0.24));
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
header:has(> .header-inner) .login-cta.profile-avatar {
  /* The picture is round because the button is a circle, not because the image is square.
     A tall or wide photo with no height here stretched the circle into an oval on every
     scoped page (Brandon 2026-09-27). Fixed size, fixed ratio, and the photo is clipped. */
  width: 42px;
  height: 42px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(99,102,241,0.72), rgba(236,72,153,0.52));
}
footer[data-lwc-kevin-sig] {
  padding: 24px;
  border-top: 1px solid var(--card-border);
  background: #050508;
  color: var(--text-dim);
  line-height: 1.6;
}
footer[data-lwc-kevin-sig] p { text-align: center; color: var(--text-dim); font-size: 14px; max-width: none; }
footer[data-lwc-kevin-sig] a { color: var(--text-dim); text-decoration: none; }
footer[data-lwc-kevin-sig] a:hover { color: var(--text-muted); }
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(10, 10, 16, 0.78);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(236, 72, 153, 0.85));
  transform: translateY(-3px) scale(1.03);
}
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 768px) {
  header:has(> .header-inner) .menu-toggle { display: inline-flex; }
  #primaryNav {
    position: absolute;
    top: 70px;
    left: 24px;
    right: 24px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(10, 10, 16, 0.94);
    border: 1px solid var(--card-border);
  }
  #primaryNav a { padding: 12px; }
  body.nav-open #primaryNav { display: flex; }
}
/* The /account/lwc-chrome.css layer every other page gets on top of the homepage rules. */
header:has(> .header-inner) { border-bottom-color: transparent; }
header:has(> .header-inner) .login-cta.profile-avatar img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; display: block; border-radius: 50%; }
header:has(> .header-inner) #accountAction { position: relative; overflow: visible; }
header:has(> .header-inner) .account-badge {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #ec4899); color: #fff; font: 800 11px/1 Inter, sans-serif;
  display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  border: 2px solid #050508; pointer-events: none;
}
header:has(> .header-inner) .account-badge.show { display: inline-flex; }
@media (max-width: 860px) {
  header:has(> .header-inner) .menu-toggle { display: inline-flex; }
  #primaryNav {
    position: absolute; top: calc(100% - 8px); left: 16px; right: 16px;
    display: none; flex-direction: column; gap: 0;
    padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px;
    background: rgba(5,5,8,0.96); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  }
  body.nav-open #primaryNav { display: flex; }
  header:has(> .header-inner) .header-inner { padding-left: 16px; padding-right: 16px; }
}
footer[data-lwc-kevin-sig] { padding: 40px 24px; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); color: #9aa0b5; font-size: 13px; }
footer[data-lwc-kevin-sig] nav.lwc-foot-nav { position: static; display: flex; flex-direction: row; background: transparent; border: none; box-shadow: none; padding: 0; }
footer[data-lwc-kevin-sig] .lwc-kevin-sig { margin: 8px 0 0; font-size: 10px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.18); user-select: none; text-align: center; }

/* The header's height, for a page to clear it: 20 + safe top, the 42 point row, 20. */
:root { --lwc-header-h: calc(82px + env(safe-area-inset-top)); }

@media (max-width: 480px) {
  /* On a phone the sign-in pill sat 4px from the logo's period. Same button, less padding,
     so the header has air (Brandon 2026-09-27). */
  header:has(> .header-inner) .login-cta { padding: 9px 11px; font-size: 13px; letter-spacing: -0.01em; }
  header:has(> .header-inner) .login-cta.profile-avatar { padding: 0; font-size: 15px; }
  header:has(> .header-inner) .header-inner { gap: 8px; }
}

/* The homepage menu, value for value (Brandon 2026-10-04: the navigation, the Discord button
   and the open menu did not match the other pages). Kept level with /account/lwc-chrome.css by
   tools/verify-scoped-chrome-parity.py. The open menu sits above the page's own content. */
header:has(> .header-inner) { z-index: 60; }
header:has(> .header-inner) .menu-toggle { border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: #fff; }
header:has(> .header-inner) nav#primaryNav { z-index: 61; }
header:has(> .header-inner) nav#primaryNav a { color: #9aa0b5; text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s; }
header:has(> .header-inner) nav#primaryNav a:hover { color: #fff; }
header:has(> .header-inner) nav#primaryNav a[href*="affiliates"] { border-left: 1px solid rgba(255,255,255,0.12); padding-left: 20px; margin-left: -12px; }
header:has(> .header-inner) nav#primaryNav a.nav-discord {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; margin: -7px 0; border-radius: 999px;
  background: linear-gradient(135deg, #2b3180, #373fa0); color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(30,36,120,0.28), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
header:has(> .header-inner) nav#primaryNav a.nav-discord:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(40,48,160,0.40), inset 0 1px 0 rgba(255,255,255,0.18); }
header:has(> .header-inner) nav#primaryNav a.nav-discord svg { flex: 0 0 auto; }
@media (max-width: 1180px) and (min-width: 861px) { header:has(> .header-inner) nav#primaryNav { gap: 22px; } }
@media (max-width: 860px) {
  header:has(> .header-inner) nav#primaryNav {
    position: absolute; top: calc(100% - 8px);
    left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
    display: none; flex-direction: column; gap: 0;
    padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px;
    background: rgba(5,5,8,0.96); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
  body.nav-open header:has(> .header-inner) nav#primaryNav { display: flex; }
  header:has(> .header-inner) nav#primaryNav a { padding: 12px 10px; }
  header:has(> .header-inner) nav#primaryNav a[href*="affiliates"] { border-left: 0; padding-left: 10px; margin-left: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  header:has(> .header-inner) nav#primaryNav a.nav-discord { margin: 8px 0 2px; padding: 12px 14px; justify-content: center; }
}
html.lwc-nav-compact header:has(> .header-inner) .menu-toggle { display: inline-flex; }
html.lwc-nav-compact header:has(> .header-inner) nav#primaryNav {
  position: absolute; top: calc(100% - 8px);
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  display: none; flex-direction: column; gap: 0;
  padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px;
  background: rgba(5,5,8,0.96); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  max-height: calc(100vh - 100px); overflow-y: auto;
}
html.lwc-nav-compact body.nav-open header:has(> .header-inner) nav#primaryNav { display: flex; }
html.lwc-nav-compact header:has(> .header-inner) nav#primaryNav a { padding: 12px 10px; }
html.lwc-nav-compact header:has(> .header-inner) nav#primaryNav a[href*="affiliates"] { border-left: 0; padding-left: 10px; margin-left: 0; border-top: 1px solid rgba(255,255,255,0.08); }
html.lwc-nav-compact header:has(> .header-inner) nav#primaryNav a.nav-discord { margin: 8px 0 2px; padding: 12px 14px; justify-content: center; }
@media (max-height: 560px) {
  body.nav-open header:has(> .header-inner) nav#primaryNav,
  html.lwc-nav-compact body.nav-open header:has(> .header-inner) nav#primaryNav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 6px;
  }
  body.nav-open header:has(> .header-inner) nav#primaryNav a[href*="affiliates"] { border-top: 0; }
  body.nav-open header:has(> .header-inner) nav#primaryNav a.nav-discord { grid-column: 1 / -1; }
}
