/* ===========================================================================
   YouGamePlay — Tactical HUD / Esports theme
   Near-black, single hot accent, angular cut corners, corner brackets,
   scanlines + grain, monospace data readouts. Crafted SVG art, no photos.
   =========================================================================== */

:root {
  /* --- Dark theme (default) --- */
  color-scheme: dark;
  --bg: #05070a;
  --bg-2: #080b10;
  --panel: #0b0f15;
  --panel-2: #0e131b;
  --line: rgba(120, 210, 220, 0.14);
  --line-2: rgba(120, 210, 220, 0.28);
  --text: #e9f2f4;
  --muted: #8b9aa6;
  --dim: #5c6b78;
  --acc: #1ff0d0;
  --acc-soft: rgba(31, 240, 208, 0.14);
  --acc-line: rgba(31, 240, 208, 0.55);
  --hot: #ff2e63;
  --gold: #ffcf3f;
  --chrome: rgba(5, 7, 10, 0.82);
  --scanA: 0.5;
  --vigA: 0.65;

  /* --- Shared tokens --- */
  --chamfer: 12px;
  --maxw: 1220px;
  --f-head: "Chakra Petch", system-ui, sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, monospace;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --cut: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
}

/* --- Light theme (explicit choice only — no longer the default) --- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9edf4; --bg-2: #dfe5ee; --panel: #ffffff; --panel-2: #f2f6fb;
  --line: rgba(18, 42, 66, 0.13); --line-2: rgba(18, 42, 66, 0.24);
  --text: #101a26; --muted: #46586b; --dim: #7a8899;
  --acc: #0a9d88; --acc-soft: rgba(10, 157, 136, 0.12); --acc-line: rgba(10, 157, 136, 0.5);
  --hot: #e11d54; --gold: #bd8a17;
  --chrome: rgba(255, 255, 255, 0.82); --scanA: 0.05; --vigA: 0.08;
}
/* --- "System" is an explicit user choice (data-theme="system"), not the
   default — it follows OS preference. Dark already matches the base :root,
   so only the light-OS case needs an override here. --- */
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg: #e9edf4; --bg-2: #dfe5ee; --panel: #ffffff; --panel-2: #f2f6fb;
    --line: rgba(18, 42, 66, 0.13); --line-2: rgba(18, 42, 66, 0.24);
    --text: #101a26; --muted: #46586b; --dim: #7a8899;
    --acc: #0a9d88; --acc-soft: rgba(10, 157, 136, 0.12); --acc-line: rgba(10, 157, 136, 0.5);
    --hot: #e11d54; --gold: #bd8a17;
    --chrome: rgba(255, 255, 255, 0.82); --scanA: 0.05; --vigA: 0.08;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
/* No text-select cursor outside actual form fields — this is an app, not a document. */
input, textarea, select, [contenteditable="true"] { cursor: text; user-select: text; -webkit-user-select: text; }
a, button, label, [role="button"], .btn { cursor: pointer; }

/* --- Background layers ---------------------------------------------------- */
.bg-field {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(31, 240, 208, 0.10), transparent 70%),
    radial-gradient(50% 40% at 100% 0%, rgba(255, 46, 99, 0.07), transparent 70%),
    var(--bg);
}
.bg-field::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 210, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 210, 220, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
}
#bg-stars {
  position: fixed; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; display: block;
}
.bg-scan {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: var(--scanA);
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.22) 3px 4px);
  mix-blend-mode: multiply;
}
#bg-beat-pulse {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(65% 55% at 50% 25%, hsl(172 90% 55% / .16), transparent 72%);
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, var(--vigA)) 100%);
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }

/* --- Type / helpers ------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 70px 0; }
.section-tight { padding: 42px 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--f-mono); letter-spacing: .5px; }

.mono-tag {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: 1.5px;
  color: var(--acc); text-transform: uppercase;
}
.icon { display: inline-block; vertical-align: -0.18em; flex: none; }
.icon.flip { transform: scaleX(-1); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--f-head); font-size: clamp(1.5rem, 3.6vw, 2.35rem); margin: 8px 0 0; letter-spacing: .5px; font-weight: 700; text-transform: uppercase; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: 2.5px; color: var(--muted); }
.kicker .idx { color: var(--acc); font-size: .9rem; }
.link-more { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: .82rem; letter-spacing: 1px; color: var(--acc); text-transform: uppercase; }
.link-more:hover { text-shadow: 0 0 14px var(--acc-line); }

/* --- Panels + HUD framing ------------------------------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
}
/* corner brackets on the diagonal pair */
.hud::before, .hud::after {
  content: ""; position: absolute; width: 13px; height: 13px; z-index: 4; pointer-events: none;
  border-color: var(--acc); transition: border-color .2s;
}
.hud::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.hud::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.hud:hover::before, .hud:hover::after { border-color: var(--accent, var(--acc)); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Nav ------------------------------------------------------------------ */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: var(--chrome); border-bottom: 1px solid var(--line); }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; cursor: pointer; background: rgba(120, 210, 220, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--cut); color: var(--muted); }
.theme-toggle:hover { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.music-toggle.muted { color: var(--dim); opacity: .6; }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px; display: grid; place-items: center; color: #04060a;
  background: var(--acc); clip-path: var(--cut);
  box-shadow: 0 0 18px var(--acc-line);
}
.brand-txt { font-family: var(--f-head); font-weight: 700; font-size: 1.1rem; letter-spacing: 2px; }
.brand-txt b { color: var(--acc); }
.brand-txt i { color: var(--hot); font-style: normal; }
.nav-links { display: flex; gap: 2px; margin-left: 6px; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-head); font-weight: 600; letter-spacing: .5px; font-size: .9rem;
  padding: 8px 13px; color: var(--muted); text-transform: uppercase; transition: color .15s;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--acc); border-bottom-color: var(--acc); }
.nav-links a .icon { color: var(--dim); }
.nav-links a:hover .icon, .nav-links a.active .icon { color: var(--acc); }
.nav-count {
  margin-left: 3px; font-size: .78rem; color: var(--acc);
  text-shadow: 0 0 6px var(--acc), 0 0 12px var(--acc);
  animation: nav-count-pulse 2.2s ease-in-out infinite;
}
@keyframes nav-count-pulse {
  0%, 100% { opacity: .55; text-shadow: 0 0 4px var(--acc), 0 0 8px var(--acc); }
  50% { opacity: 1; text-shadow: 0 0 8px var(--acc), 0 0 18px var(--acc); }
}
@media (prefers-reduced-motion: reduce) { .nav-count { animation: none; opacity: 1; } }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none; width: 42px; height: 42px; padding: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(120, 210, 220, 0.06); box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: var(--cut); color: var(--text);
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .22s, opacity .22s; }
body.nav-open .nav-toggle { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile slide-down menu */
.mobile-menu {
  display: none; border-top: 1px solid var(--line);
  background: var(--bg); backdrop-filter: blur(14px); padding: 14px 22px 22px;
}
body.nav-open .mobile-menu { display: block; animation: menu-in .2s ease; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-links { display: flex; flex-direction: column; }
.mobile-links a {
  display: flex; align-items: center; gap: 12px; padding: 15px 6px;
  font-family: var(--f-head); font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); font-size: 1rem;
}
.mobile-links a .chev { margin-left: auto; color: var(--dim); }
.mobile-links a.active, .mobile-links a:active { color: var(--acc); }
.mobile-links a.active .icon:first-child, .mobile-links a:active .icon:first-child { color: var(--acc); }
.mobile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  font-family: var(--f-head); font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
  padding: 12px 22px; font-size: .88rem; clip-path: var(--cut);
  transition: transform .12s, box-shadow .2s, background .2s; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--acc); color: #04070a; box-shadow: 0 0 22px var(--acc-line); }
.btn-primary:hover { box-shadow: 0 0 34px var(--acc-line); }
.btn-ghost { background: rgba(120, 210, 220, 0.06); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 20px rgba(31, 240, 208, 0.2); color: var(--acc); }
.btn-hot { background: var(--hot); color: #fff; box-shadow: 0 0 22px rgba(255, 46, 99, 0.45); }
.btn-sm { padding: 9px 15px; font-size: .78rem; }
.btn-block { width: 100%; justify-content: center; }

/* --- Chips / pills -------------------------------------------------------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-head); font-weight: 600; font-size: .82rem; letter-spacing: .6px; text-transform: uppercase;
  padding: 9px 15px; clip-path: var(--cut); cursor: pointer; color: var(--muted);
  background: rgba(120, 210, 220, 0.05); box-shadow: inset 0 0 0 1px var(--line); transition: all .15s;
}
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--acc-line); }
.chip.active { color: #04070a; background: var(--acc); box-shadow: 0 0 20px var(--acc-line); }
.chip .icon { color: currentColor; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 9px; color: var(--muted); background: rgba(120, 210, 220, 0.05); box-shadow: inset 0 0 0 1px var(--line);
}
.live-tag, .pill.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .66rem; letter-spacing: 1px; padding: 3px 8px; color: var(--hot); box-shadow: inset 0 0 0 1px rgba(255, 46, 99, 0.5); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; padding: 74px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: .78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--acc); padding: 6px 12px; box-shadow: inset 0 0 0 1px var(--acc-line); clip-path: var(--cut); }
.hero h1 { font-family: var(--f-head); font-weight: 700; font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.0; margin: 20px 0 18px; letter-spacing: 1px; text-transform: uppercase; }
.hero h1 .accent { color: var(--acc); text-shadow: 0 0 30px var(--acc-line); }
.hero h1 .slash { color: var(--hot); }
.hero .lead { font-size: 1.14rem; color: var(--muted); max-width: 34rem; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 14px; margin-top: 36px; }
.hero-stats .stat { flex: 1; padding: 14px 16px; position: relative; }
.hero-stats .stat b { font-family: var(--f-head); font-size: 1.7rem; display: block; color: var(--text); letter-spacing: 1px; }
.hero-stats .stat span { font-family: var(--f-mono); font-size: .66rem; color: var(--dim); text-transform: uppercase; letter-spacing: 1.5px; }

.hero-art { position: relative; height: 420px; }
.hero-art .float { position: absolute; overflow: hidden; }
.hero-art .f1 { width: 66%; top: 4%; left: 0; z-index: 2; }
.hero-art .f2 { width: 50%; bottom: 0; right: 0; z-index: 3; }
.hero-art .f3 { width: 40%; top: 44%; left: 46%; z-index: 1; opacity: .9; }
.hero-art .float { animation: floaty 7s ease-in-out infinite; }
.hero-art .f2 { animation-delay: -2.3s; }
.hero-art .f3 { animation-delay: -4.6s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* --- Ticker --------------------------------------------------------------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); overflow: hidden; padding: 11px 0; }
.ticker-track { display: flex; gap: 42px; white-space: nowrap; animation: ticker 34s linear infinite; font-family: var(--f-mono); font-size: .82rem; }
.ticker-track span { color: var(--muted); letter-spacing: .5px; }
.ticker-track b { color: var(--acc); }
.ticker-track .icon { color: var(--acc); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Generated art -------------------------------------------------------- */
.art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(180deg, #070b10, #04070b); }
.art-glow { position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 62%, hsl(var(--h) 90% 55% / .38), transparent 62%); filter: blur(6px); }
.art-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-lines .grid-floor line { stroke: hsl(var(--h) 60% 60% / .22); stroke-width: 1; }
.art-lines .desk { stroke: hsl(var(--h) 70% 65% / .5); stroke-width: 2; }
.art-lines .screen { fill: hsl(var(--h) 90% 55% / .16); stroke: hsl(var(--h) 90% 70%); stroke-width: 1.6; filter: drop-shadow(0 0 7px hsl(var(--h) 90% 55% / .7)); }
.art-lines .stand { stroke: hsl(var(--h) 70% 65% / .7); stroke-width: 2; fill: none; }
.art-lines .scanline { stroke: hsl(var(--h) 90% 82% / .5); stroke-width: 1; }
.art-lines .ringlight { fill: none; stroke: hsl(var(--h) 90% 75%); stroke-width: 3; filter: drop-shadow(0 0 8px hsl(var(--h) 90% 65%)); }
.art-lines .ringlight-in { fill: none; stroke: hsl(var(--h) 90% 82% / .5); stroke-width: 1.5; }
.art-lines .mic { stroke: hsl(var(--h) 40% 78% / .7); stroke-width: 2.5; fill: none; }
.art-lines .reticle { stroke: var(--acc); stroke-width: 1.4; fill: none; opacity: .6; }
.art-lines .reticle circle { fill: var(--acc); stroke: none; }
.art-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px); opacity: .5; z-index: 2; }
.art-frame { position: absolute; inset: 8px; pointer-events: none; z-index: 2; }
.art-frame::before, .art-frame::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: rgba(255, 255, 255, 0.35); }
.art-frame::before { top: 0; left: 0; border-top: 1.5px solid; border-left: 1.5px solid; }
.art-frame::after { bottom: 0; right: 0; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.art-device { aspect-ratio: 16 / 10; }
.art-devgrid { position: absolute; inset: 0; background-image: linear-gradient(rgba(120, 210, 220, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 210, 220, 0.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent 85%); }
.art-devicon { position: absolute; inset: 0; display: grid; place-items: center; color: hsl(var(--h) 90% 70%); filter: drop-shadow(0 0 12px hsl(var(--h) 90% 55% / .8)); }
.art-tag { position: absolute; left: 12px; bottom: 10px; font-size: .64rem; letter-spacing: 2px; color: hsl(var(--h) 60% 80% / .8); z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* --- Rig card ------------------------------------------------------------- */
.card-art { position: relative; }
.rig-card, .gear-card, .creator-card { display: block; transition: transform .16s, box-shadow .25s; }
.rig-card:hover, .gear-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.rank-badge {
  position: absolute; top: 9px; left: 9px; z-index: 3;
  font-family: var(--f-head); font-weight: 700; font-size: .82rem; letter-spacing: 1px;
  padding: 3px 8px; color: var(--text); background: rgba(4, 7, 10, 0.8); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--cut);
}
.rank-badge.gold { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 207, 63, 0.6), 0 0 14px rgba(255, 207, 63, 0.3); }
.rank-badge.silver { color: #d6dde6; }
.rank-badge.bronze { color: #e59b63; }
.cat-chip {
  position: absolute; top: 9px; right: 9px; z-index: 3; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 8px; color: var(--text); background: rgba(4, 7, 10, 0.75); box-shadow: inset 0 0 0 1px var(--line);
}
.cat-chip .icon { color: var(--accent, var(--acc)); }
.rig-body, .gear-body { padding: 14px 16px 16px; }
.rig-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rig-card h3, .gear-card h3 { font-family: var(--f-head); font-size: 1.08rem; margin: 0; letter-spacing: .4px; }
.ver { color: var(--acc); display: grid; place-items: center; }
.rig-owner { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; margin-top: 7px; }
.rig-owner .av { width: 22px; height: 22px; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: .72rem; color: var(--acc); background: var(--acc-soft); clip-path: var(--cut); }
.rig-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.votes { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-head); font-weight: 700; font-size: 1.02rem; }
.votes .up { color: var(--acc); }
.rig-meta .mono { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; }

/* --- Gear card ------------------------------------------------------------ */
.gear-body .brand { font-size: .66rem; text-transform: uppercase; letter-spacing: 2px; color: var(--dim); }
.gear-card h3 { margin: 4px 0 8px; }
.gear-card .blurb { font-size: .84rem; margin: 0; min-height: 2.6em; }
.gear-rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.rate-num { font-size: 1.2rem; color: var(--acc); font-weight: 700; }

/* segmented rating bar */
.ratebar { display: inline-flex; gap: 3px; align-items: center; }
.ratebar .seg { width: 6px; height: 14px; background: rgba(120, 210, 220, 0.12); transform: skewX(-14deg); }
.ratebar .seg.on { background: var(--acc); box-shadow: 0 0 6px var(--acc-line); }

/* --- Amazon buy button (revenue CTA) -------------------------------------- */
.btn-buy { background: linear-gradient(180deg, #ffbe3d, #f59e0b); color: #1a1205; }
.btn-buy:hover { box-shadow: 0 0 26px rgba(245, 158, 11, 0.55); }
.gear-card .btn-buy { margin-top: 12px; }
.rate-count { font-size: .66rem; letter-spacing: 1px; margin-top: 6px; }
.affiliate-mini { font-size: .62rem; letter-spacing: .5px; margin-top: 9px; line-height: 1.4; opacity: .75; }
.affiliate-note { margin-top: 26px; padding: 12px 16px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .5px; color: var(--muted); background: rgba(245, 158, 11, 0.06); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.22); }
.affiliate-note a { display: inline; color: var(--gold); }

/* --- Category tiles ------------------------------------------------------- */
.cat-tile { position: relative; padding: 22px; overflow: hidden; display: block; transition: transform .16s, box-shadow .25s; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); }
.cat-tile::before, .cat-tile::after { border-color: var(--accent, var(--acc)); }
.cat-tile .glow-edge { position: absolute; inset: 0; background: radial-gradient(70% 80% at 100% 0%, var(--accent, var(--acc)), transparent 60%); opacity: .1; pointer-events: none; }
.cat-tile .t-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent, var(--acc)); background: rgba(120, 210, 220, 0.06); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.cat-tile h3 { font-family: var(--f-head); margin: 14px 0 4px; font-size: 1.12rem; text-transform: uppercase; letter-spacing: .5px; position: relative; }
.cat-tile p { margin: 0; color: var(--muted); font-size: .86rem; position: relative; }
.cat-tile .count { margin-top: 16px; font-family: var(--f-mono); font-size: .82rem; letter-spacing: 1px; color: var(--accent, var(--acc)); position: relative; display: inline-flex; align-items: center; gap: 6px; }

/* --- Creator card --------------------------------------------------------- */
.creator-card { padding: 16px; display: flex; gap: 14px; align-items: center; position: relative; }
.creator-rank { position: absolute; top: 10px; right: 12px; font-size: .74rem; color: var(--acc); letter-spacing: 1px; }
.gear-card h3 a { color: inherit; }
.gear-card h3 a:hover { color: var(--acc); }
.card-art { display: block; position: relative; }
.creator-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.avatar { width: 54px; height: 54px; flex: none; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; color: #04070a; clip-path: var(--cut); background: linear-gradient(140deg, hsl(var(--h) 85% 60%), hsl(calc(var(--h) + 40) 85% 48%)); box-shadow: 0 0 18px hsl(var(--h) 85% 55% / .4); }
.creator-card h3 { margin: 0; font-family: var(--f-head); font-size: 1.02rem; display: flex; align-items: center; gap: 8px; letter-spacing: .4px; }
.creator-card .plat { color: var(--muted); }

/* --- Vote widget ---------------------------------------------------------- */
.vote-box { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.vote-row { display: flex; align-items: center; gap: 16px; }
.upvote-btn { width: 60px; height: 60px; cursor: pointer; color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); display: grid; place-items: center; clip-path: var(--cut); transition: transform .12s, box-shadow .2s; }
.upvote-btn:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 24px var(--acc-line); }
.upvote-btn:active { transform: scale(.92); }
.vote-count-big { font-family: var(--f-head); font-size: 2rem; font-weight: 700; letter-spacing: 1px; }
.vote-tokens { display: flex; gap: 7px; margin-top: 7px; }
.token { width: 26px; height: 8px; background: rgba(120, 210, 220, 0.12); transform: skewX(-14deg); }
.token.filled { background: var(--acc); box-shadow: 0 0 10px var(--acc-line); }

/* --- Spec hotspots (targeting reticles) ----------------------------------- */
.rig-stage { position: relative; overflow: hidden; }
.rig-stage .art { aspect-ratio: 16 / 9; }
.hotspot { position: absolute; transform: translate(-50%, -50%); z-index: 3; width: 34px; height: 34px; cursor: pointer; }
.hotspot .brackets { position: absolute; inset: 0; }
.hotspot .brackets::before, .hotspot .brackets::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: #fff; }
.hotspot .brackets::before { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.hotspot .brackets::after { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }
.hotspot .core { position: absolute; inset: 12px; background: var(--acc); box-shadow: 0 0 12px var(--acc-line); clip-path: var(--cut); }
.hotspot .ping { position: absolute; inset: 0; box-shadow: 0 0 0 1px var(--acc-line); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.hotspot .tip { position: absolute; bottom: 128%; left: 50%; transform: translateX(-50%) translateY(6px); white-space: nowrap; padding: 7px 11px; font-family: var(--f-head); font-weight: 600; font-size: .8rem; background: rgba(6, 9, 13, 0.96); color: #fff; box-shadow: inset 0 0 0 1px var(--acc-line); clip-path: var(--cut); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.hotspot:hover { z-index: 5; }
.hotspot:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Score ring ----------------------------------------------------------- */
.score-ring { --v: 90; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--acc) calc(var(--v) * 1%), rgba(120, 210, 220, 0.1) 0); }
.score-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.score-ring b { position: relative; font-family: var(--f-head); font-size: 1.7rem; letter-spacing: 1px; }

.submetric { margin: 14px 0; }
.submetric .top { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.submetric .top b { color: var(--acc); }
.submetric .ratebar { display: flex; width: 100%; }
.submetric .ratebar .seg { flex: 1; }

/* --- Forum ---------------------------------------------------------------- */
.forum-cat { display: flex; align-items: center; gap: 15px; padding: 16px 18px; transition: transform .14s; }
.forum-cat:hover { transform: translateX(3px); }
.forum-cat .fc-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; color: var(--accent, var(--acc)); background: rgba(120, 210, 220, 0.05); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.forum-cat h3 { margin: 0; font-family: var(--f-head); font-size: 1.05rem; letter-spacing: .4px; text-transform: uppercase; }
.thread-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .14s; }
.thread-row:hover { background: rgba(31, 240, 208, 0.04); }
.thread-row:last-child { border-bottom: none; }
.thread-av { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; color: #04070a; clip-path: var(--cut); background: linear-gradient(140deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 40) 75% 46%)); }
.thread-main { flex: 1; min-width: 0; }
.thread-main h4 { margin: 0 0 4px; font-size: .98rem; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-main .sub { font-family: var(--f-mono); font-size: .72rem; color: var(--dim); letter-spacing: .5px; }
.thread-stats { display: flex; gap: 22px; flex: none; text-align: center; }
.thread-stats .n { font-family: var(--f-head); font-weight: 700; display: block; }
.thread-stats .l { font-family: var(--f-mono); font-size: .62rem; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.tag-hot { color: var(--hot); box-shadow: inset 0 0 0 1px rgba(255, 46, 99, 0.5); }
.tag-pin { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 207, 63, 0.5); }

/* --- Page band ------------------------------------------------------------ */
.page-band { padding: 56px 0 26px; }
.page-band h1 { font-family: var(--f-head); font-size: clamp(2rem, 5.2vw, 3.3rem); margin: 10px 0 12px; letter-spacing: 1px; text-transform: uppercase; }
.page-band p { color: var(--muted); max-width: 42rem; font-size: 1.04rem; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--acc); }

/* --- Detail --------------------------------------------------------------- */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.panel-pad { padding: 20px; }
.panel-h { font-family: var(--f-head); margin: 0 0 12px; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .6px; display: flex; align-items: center; gap: 8px; }
.climb-subrank { font-family: var(--f-mono); text-transform: none; font-size: .68rem; letter-spacing: .3px; font-weight: 400; }
.panel-h .icon { color: var(--acc); }
.tagged-list { list-style: none; padding: 0; margin: 0; }
.tagged-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tagged-list li:last-child { border-bottom: none; }
.tag-num { width: 26px; height: 26px; flex: none; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: .76rem; color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); clip-path: var(--cut); }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.spec-table td:first-child { color: var(--muted); font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.spec-table td:last-child { text-align: right; font-family: var(--f-head); font-weight: 600; }

/* --- Login ---------------------------------------------------------------- */
.auth-wrap { max-width: 440px; margin: 56px auto; }
.auth-card { padding: 34px 30px; text-align: center; }
.oauth-btn { display: flex; align-items: center; gap: 12px; width: 100%; justify-content: center; padding: 13px; font-family: var(--f-head); font-weight: 700; font-size: .92rem; text-transform: uppercase; letter-spacing: .8px; cursor: pointer; margin-bottom: 12px; color: #fff; clip-path: var(--cut); border: none; transition: transform .12s, box-shadow .2s; }
.oauth-btn:hover { transform: translateY(-2px); }
.oauth-btn .ic { display: grid; place-items: center; }
.oauth-twitch { background: rgba(145, 70, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(145, 70, 255, 0.55); }
.oauth-twitch:hover { box-shadow: inset 0 0 0 1px rgba(145, 70, 255, 0.8), 0 0 24px rgba(145, 70, 255, 0.4); }
.oauth-twitch .ic { color: #b18cff; }
.oauth-youtube { background: rgba(255, 40, 40, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 40, 40, 0.5); }
.oauth-youtube:hover { box-shadow: inset 0 0 0 1px rgba(255, 40, 40, 0.8), 0 0 24px rgba(255, 40, 40, 0.35); }
.oauth-youtube .ic { color: #ff6060; }
.oauth-facebook { background: rgba(24, 119, 242, 0.14); box-shadow: inset 0 0 0 1px rgba(24, 119, 242, 0.55); }
.oauth-facebook:hover { box-shadow: inset 0 0 0 1px rgba(24, 119, 242, 0.85), 0 0 24px rgba(24, 119, 242, 0.4); }
.oauth-facebook .ic { color: #4c9bff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-family: var(--f-mono); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* --- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 44px 0 30px; background: var(--chrome); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.footer h4 { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: 2px; color: var(--acc); margin: 0 0 14px; }
.footer a { display: block; color: var(--dim); font-size: .88rem; padding: 4px 0; }
.footer a:hover { color: var(--acc); }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--dim); font-family: var(--f-mono); font-size: .72rem; letter-spacing: 1px; flex-wrap: wrap; gap: 10px; }

/* --- CTA ------------------------------------------------------------------ */
.cta-band { padding: 46px; text-align: center; overflow: hidden; position: relative; }
.cta-band h2 { font-family: var(--f-head); font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 10px 0 12px; letter-spacing: 1px; text-transform: uppercase; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 320px; order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stats .stat { min-width: 40%; }
  .footer-grid { grid-template-columns: 1fr; }
  .thread-stats { display: none; }
}

/* ===========================================================================
   ARCADE
   =========================================================================== */

/* Game art extras */
.art-game .art-devicon { color: hsl(var(--h) 90% 70%); filter: drop-shadow(0 0 14px hsl(var(--h) 90% 55% / .8)); }
.art-big { aspect-ratio: 16 / 11; }
.art-mode { position: absolute; right: 12px; bottom: 10px; font-size: .62rem; letter-spacing: 1.5px; color: hsl(var(--h) 60% 82% / .85); z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.art-soon .art-devicon { opacity: .35; filter: grayscale(.4) drop-shadow(0 0 8px hsl(var(--h) 60% 45% / .4)); }
.art-soon-tag { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); letter-spacing: 3px; font-size: .8rem; color: var(--muted); background: rgba(4,7,11,.4); }

/* Game cards */
.game-card { display: block; transition: transform .16s, box-shadow .25s; }
.game-card:hover { transform: translateY(-4px); animation: card-neon-pulse 1.7s ease-in-out infinite; }
.game-card.is-soon { opacity: .82; }
.game-body { padding: 13px 15px 15px; }
.game-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-card h3 { font-family: var(--f-head); font-size: 1.04rem; margin: 0; letter-spacing: .3px; }
.mode-dot { font-size: .62rem; text-transform: uppercase; letter-spacing: 1px; color: var(--acc); padding: 2px 7px; box-shadow: inset 0 0 0 1px var(--line); }
.game-card .blurb { font-size: .82rem; margin: 6px 0 0; color: var(--muted); min-height: 2.4em; }
.lock-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center;
  width: 26px; height: 26px; color: var(--gold); background: rgba(4,7,11,.72);
  box-shadow: inset 0 0 0 1px rgba(255,207,63,.5); clip-path: var(--cut); backdrop-filter: blur(2px);
}

/* --- Premium teaser panel (Games page) ------------------------------------- */
.premium-panel { padding: 26px; overflow: hidden; position: relative; }
.premium-badge {
  display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: .68rem;
  letter-spacing: 2px; padding: 4px 10px; box-shadow: inset 0 0 0 1px rgba(255,207,63,.4); margin-bottom: 16px;
}
.premium-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: center; }
.premium-copy h2 { font-family: var(--f-head); font-size: 1.5rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.premium-benefits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.premium-benefits li { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.premium-benefits .icon { color: var(--acc); flex: none; }
.premium-cta { text-align: center; padding: 18px; background: rgba(255,207,63,.05); box-shadow: inset 0 0 0 1px rgba(255,207,63,.25); }
.premium-price { font-family: var(--f-head); margin-bottom: 14px; }
.premium-amount {
  font-size: 2.6rem; font-weight: 700; color: var(--gold);
  animation: premium-price-pulse 1.8s ease-in-out infinite;
}
.premium-period { font-size: .95rem; color: var(--muted); margin-left: 4px; }
@keyframes premium-price-pulse {
  0%, 100% { text-shadow: 0 0 10px rgba(255,207,63,.35), 0 0 22px rgba(255,207,63,.15); }
  50% { text-shadow: 0 0 18px rgba(255,207,63,.75), 0 0 42px rgba(255,207,63,.4); }
}
.premium-sub { width: 100%; background: linear-gradient(140deg, var(--gold), #ff9f3f); color: #1a1200; border: none; }
.premium-fine { margin-top: 10px; font-size: .64rem; letter-spacing: .5px; }
@media (max-width: 760px) { .premium-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .premium-amount { animation: none; text-shadow: 0 0 14px rgba(255,207,63,.5); } }

/* --- "Coming soon" popup ---------------------------------------------------- */
.cs-overlay {
  position: fixed; inset: 0; z-index: 300; display: none; place-items: center;
  background: rgba(4,7,11,.72); backdrop-filter: blur(3px);
}
.cs-overlay.show { display: grid; }
.cs-modal { position: relative; padding: 30px; text-align: center; max-width: 320px; }
.cs-close { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 4px; }
.cs-close:hover { color: var(--text); }
.cs-icon { color: var(--gold); margin-bottom: 10px; display: flex; justify-content: center; }
.cs-modal h3 { font-family: var(--f-head); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 8px; }
.cs-msg { font-size: .9rem; margin: 0; }

/* Featured strip (games page) */
.featured-strip { display: flex; gap: 20px; align-items: center; padding: 16px; overflow: hidden; }
.featured-strip .fs-art { width: 240px; flex: none; }
.featured-strip .fs-art .art { aspect-ratio: 16/10; }
.fs-body h2 { font-family: var(--f-head); font-size: 1.5rem; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .5px; }
.fs-body p { color: var(--muted); margin: 0 0 12px; }

/* Featured hero (home) */
.featured-hero { display: block; position: relative; overflow: hidden; }
.featured-hero .fh-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: .0; transition: opacity .2s; }
.featured-hero:hover .fh-play { opacity: 1; }
.featured-hero .fh-play::before { content: ""; position: absolute; width: 74px; height: 74px; border-radius: 50%; background: rgba(4,7,11,.55); box-shadow: 0 0 0 1px var(--acc-line), 0 0 30px var(--acc-line); }
.featured-hero .fh-play .icon { position: relative; }

/* Vote panel */
.vote-panel { padding: 20px; }
.vote-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; font-size: .9rem; }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vote-card { display: flex; align-items: center; gap: 12px; padding: 13px 14px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.vote-card.voted { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 20px rgba(31,240,208,.12); }
.vote-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: hsl(var(--h) 85% 65%); background: hsl(var(--h) 85% 55% / .12); clip-path: var(--cut); }
.vote-info { flex: 1; min-width: 0; }
.vote-name { font-family: var(--f-head); font-weight: 600; }
.vote-bar { height: 5px; margin-top: 6px; background: rgba(120,210,220,.1); overflow: hidden; }
.vote-bar span { display: block; height: 100%; background: var(--acc); box-shadow: 0 0 8px var(--acc-line); transition: width .3s; }
.vote-btn { flex: none; }

/* Weekly winner cards */
.winner-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.wc-crown { width: 52px; height: 52px; flex: none; display: grid; place-items: center; color: var(--gold); background: rgba(255,207,63,.1); box-shadow: inset 0 0 0 1px rgba(255,207,63,.4); clip-path: var(--cut); }
.wc-name { display: block; font-family: var(--f-head); font-size: 1.3rem; font-weight: 700; margin: 2px 0; }
.wc-name:hover { color: var(--acc); }

/* Boards + medals */
/* Needs an explicit box: client-rendered rows (leaderboard.js / climb.js) don't
   pass the inline width/height the server-side <Medal> does, and without it the
   circle collapsed to the width of its digit. */
.medal { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; font-family: var(--f-head); font-weight: 700; font-size: .78rem; color: #04070a; background: var(--dim); border-radius: 50%; }
.medal .icon { width: 13px; height: 13px; }
.medal.gold { background: linear-gradient(150deg, #ffe07a, #f5a623); box-shadow: 0 0 12px rgba(255,207,63,.5); }
.medal.silver { background: linear-gradient(150deg, #eef2f7, #b8c2cf); }
.medal.bronze { background: linear-gradient(150deg, #f0b483, #c9743e); }
.board-list, .mini-list { list-style: none; margin: 8px 0 0; padding: 0; }
.board-list li, .mini-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board-list li:last-child, .mini-list li:last-child { border-bottom: none; }
.board-name, .mini-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name:hover, .mini-name:hover { color: var(--acc); }
.board-pts, .mini-pts { font-family: var(--f-head); font-weight: 700; color: var(--acc); }
.mini-pts { font-size: .9rem; }

/* Play page — kept compact so the game area gets max height, not the header */
.play-head { padding: 18px 0 2px; }
.play-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.play-title h1 { margin: 0; font-family: var(--f-head); font-size: clamp(1.3rem, 2.6vw, 1.8rem); text-transform: uppercase; letter-spacing: 1px; }
.play-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.diff-hard { color: var(--hot); box-shadow: inset 0 0 0 1px rgba(255,46,99,.5); }
.diff-normal { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.play-how { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.play-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; padding-top: 10px; }
.game-root { padding: 0; overflow: hidden; }
.game-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); }
.game-topbar [data-score] { color: var(--acc); font-size: 1.1rem; }
.canvas-wrap { position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; background: radial-gradient(120% 120% at 50% 25%, hsl(var(--h, 190) 32% 10%), #05080d); }
.canvas-wrap.cursor-idle { cursor: none; }
#game-canvas { display: block; touch-action: none; max-width: 100%; position: relative; z-index: 1; box-shadow: 0 0 0 1px hsl(var(--h, 190) 65% 55% / .35), 0 0 26px rgba(0, 0, 0, .5); }

/* Animated stage backdrop — visible around the game (esp. fullscreen letterbox) */
.stage-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.stage-bg .sb-title { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: clamp(2rem, 12vw, 7rem); letter-spacing: 5px; text-transform: uppercase; white-space: nowrap; color: hsl(var(--h, 190) 60% 62% / .07); animation: sb-pulse 7s ease-in-out infinite; }
.stage-bg .sb-sym { position: absolute; color: hsl(var(--h, 190) 70% 60% / .08); animation: sb-spin 20s linear infinite; }
.stage-bg .sb-sym.s1 { top: 12%; left: 9%; animation-duration: 24s; }
.stage-bg .sb-sym.s2 { bottom: 13%; right: 11%; animation-duration: 16s; animation-direction: reverse; }
.stage-bg .sb-sym.s3 { top: 56%; left: 6%; animation-duration: 30s; }
.stage-bg .sb-sym.s4 { top: 18%; right: 15%; animation-duration: 19s; animation-direction: reverse; }
@keyframes sb-spin { to { transform: rotate(360deg); } }
@keyframes sb-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* Friends: highlighted rows + chips + empty state + share */
.lb2-row.friend { box-shadow: inset 3px 0 0 var(--gold); }
.lb2-row.friend .lb2-name { color: var(--gold); }
.lb2-row.friend.me { box-shadow: inset 3px 0 0 var(--acc); }
.fr-ic { margin-right: 5px; color: var(--gold); vertical-align: -0.14em; }
.friend-add { display: flex; gap: 10px; margin-top: 12px; }
.friend-add input { flex: 1; padding: 11px 14px; background: rgba(4, 7, 11, .5); border: 1px solid var(--line-2); color: var(--text); font-family: var(--f-body); clip-path: var(--cut); }
.friend-add input:focus { outline: none; border-color: var(--acc-line); }
.invite-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.invite-url { font-size: .72rem; letter-spacing: .3px; }
.friend-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.friend-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.friend-chip a { font-weight: 600; }
.friend-chip a:hover { color: var(--acc); }
.friend-x { background: none; border: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; padding: 2px; }
.friend-x:hover { color: var(--hot); }
.friend-x.approve:hover { color: var(--acc); }
.friend-chip.pending { box-shadow: inset 0 0 0 1px var(--acc-line); }
.icon.rot45 { transform: rotate(45deg); }
.friends-empty { text-align: center; padding: 40px 24px; }
.friends-empty .fe-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.friends-empty h3 { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px; }
.friends-empty .share-btn { margin-top: 18px; }
.friends-empty .share-url { margin-top: 12px; font-size: .8rem; letter-spacing: .5px; }

/* Rank-up celebration on the climb board */
.climb-board { position: relative; }
.rankup-flash { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); z-index: 6; pointer-events: none; font-family: var(--f-head); font-weight: 700; letter-spacing: 1px; font-size: 1rem; color: var(--acc); padding: 8px 16px; background: rgba(6, 9, 13, .92); box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 calc(14px + var(--rush, .4) * 30px) var(--acc-line); clip-path: var(--cut); white-space: nowrap; animation: ru-pop 1.3s cubic-bezier(.2, .9, .2, 1) forwards; }
.rankup-flash .ru-arrow { color: var(--acc); }
.rankup-flash b { color: #fff; }
@keyframes ru-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.8); }
  18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
  40% { transform: translateX(-50%) translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(1); }
}
.game-overlay { position: absolute; inset: 0; z-index: 4; display: none; place-items: center; background: rgba(4,7,11,.72); backdrop-filter: blur(3px); }
.game-overlay.show { display: grid; }

/* --- In-game player/CPU HUD avatars ---------------------------------------- */
.hud-avatar {
  position: absolute; top: 10px; z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: 5px 9px 5px 5px; background: hsl(var(--hue) 70% 10%); pointer-events: none;
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 70% 45% / .5), 0 0 14px hsl(var(--hue) 80% 50% / .35);
  clip-path: var(--cut);
}
.hud-avatar-left { left: 10px; color: hsl(var(--hue) 85% 62%); }
.hud-avatar-right { right: 10px; flex-direction: row-reverse; padding: 5px 5px 5px 9px; }
.hud-cpu { --hue: 355; } /* always ENEMY_HUE — the CPU reads as "enemy" regardless of your color */
.hud-avatar svg { display: block; }
.hud-avatar-tag { font-family: var(--f-mono); font-size: .62rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.hud-cpu-face { display: grid; place-items: center; width: 22px; height: 22px; }
@media (max-width: 560px) { .hud-avatar-tag { display: none; } }
.ov-card { text-align: center; padding: 24px; }
.ov-kicker { color: var(--acc); letter-spacing: 3px; font-size: .78rem; }
.ov-big { font-family: var(--f-head); font-size: 3rem; font-weight: 700; letter-spacing: 1px; margin: 6px 0; }
.ov-sub { color: var(--muted); font-size: .82rem; min-height: 1.2em; margin-bottom: 14px; }
.ov-hint { color: var(--dim); font-size: .72rem; margin-top: 12px; letter-spacing: 1px; }
.ov-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Touch controls */
.touch-controls { display: none; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); gap: 12px; }
.show-controls .touch-controls { display: flex; }
.dpad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); gap: 4px; }
.dbtn { display: grid; place-items: center; background: rgba(120,210,220,.06); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--acc); font-size: 1rem; border: none; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
.dbtn:active { background: var(--acc-soft); }
.d-up { grid-area: 1 / 2; } .d-left { grid-area: 2 / 1; } .d-right { grid-area: 2 / 3; } .d-down { grid-area: 3 / 2; }
.abtn { width: 74px; height: 74px; border-radius: 50%; background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); color: var(--acc); font-family: var(--f-head); font-weight: 700; font-size: 1.4rem; border: none; cursor: pointer; user-select: none; touch-action: none; }
.abtn:active { background: var(--acc); color: #04070a; }
.play-side .mini-board { }

/* Leaderboard */
.lb-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.seg-toggle { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--cut); }
.seg-toggle a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; font-family: var(--f-head); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: .84rem; color: var(--muted); }
.seg-toggle a.on { background: var(--acc); color: #04070a; }
.lb-filter select { font-family: var(--f-head); font-weight: 600; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); padding: 10px 14px; clip-path: var(--cut); cursor: pointer; }
.lb-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .74rem; letter-spacing: 1px; text-transform: uppercase; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-row.me { background: rgba(31,240,208,.06); }
.lb-rank { width: 30px; display: grid; place-items: center; }
.rank-n { color: var(--dim); font-size: .95rem; }

/* --- Rank tier badge (Bronze -> Champion; see src/ranks.ts) --------------- */
.rank-badge { display: inline-grid; place-items: center; flex: none; line-height: 0; filter: drop-shadow(0 0 5px currentColor); }
.rank-badge svg { display: block; }
.rank-badge-label { font-family: var(--f-head); font-weight: 700; font-size: .74rem; letter-spacing: .5px; text-transform: uppercase; margin-left: 6px; line-height: 1; }
.rank-badge:has(.rank-badge-label) { display: inline-flex; align-items: center; }
/* Tier + label as a standalone chip (profile, hero badge) */
.rank-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px 4px 8px; box-shadow: inset 0 0 0 1px currentColor; clip-path: var(--cut); }
.rank-locked { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .5px; color: var(--dim); }
.lb-name { flex: 1; font-weight: 600; }
.lb-name:hover { color: var(--acc); }
.lb-pts { font-family: var(--f-head); font-weight: 700; color: var(--acc); font-size: 1.05rem; }

/* Trophies + profile */
.profile-head { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.admin-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

/* Owner-only invite request queue */
.invite-req-list { list-style: none; margin: 0; padding: 0; }
.invite-req { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.invite-req:last-child { border-bottom: none; }
.invite-req-who { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 12rem; }
.invite-req-note { font-size: .84rem; }
.invite-req-actions { display: flex; gap: 8px; flex: none; }
.profile-av {
  width: 68px; height: 68px; flex: none; display: grid; place-items: center;
  background: hsl(var(--hue, 172) 70% 10%); clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px hsl(var(--hue, 172) 70% 45% / .5), 0 0 22px hsl(var(--hue, 172) 80% 50% / .4);
}
.trophy-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.trophy-icon { width: 50px; height: 50px; flex: none; display: grid; place-items: center; color: var(--gold); background: rgba(255,207,63,.1); box-shadow: inset 0 0 0 1px rgba(255,207,63,.35); clip-path: var(--cut); }
.trophy-card.rank-2 .trophy-icon { color: #d6dde6; background: rgba(214,221,230,.08); box-shadow: inset 0 0 0 1px rgba(214,221,230,.35); }
.trophy-card.rank-3 .trophy-icon { color: #e59b63; background: rgba(229,155,99,.1); box-shadow: inset 0 0 0 1px rgba(229,155,99,.35); }
.trophy-place { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.trophy-card .medal { margin-left: auto; }
.played-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.played-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); color: hsl(var(--h) 60% 80%); }
.played-chip:hover { box-shadow: inset 0 0 0 1px hsl(var(--h) 85% 60% / .5); }
.played-chip .pc-name { flex: 1; color: var(--text); font-weight: 600; font-size: .88rem; }
.played-chip .pc-best { font-family: var(--f-head); font-weight: 700; color: var(--acc); }
.panel-h { margin-top: 0; }

/* Auth forms */
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; padding: 12px 14px; background: rgba(4,7,11,.5); border: 1px solid var(--line-2); color: var(--text); font-family: var(--f-body); font-size: 1rem; clip-path: var(--cut); }
.field input:focus { outline: none; border-color: var(--acc-line); box-shadow: 0 0 16px rgba(31,240,208,.15); }
.form-error { background: rgba(255,46,99,.1); box-shadow: inset 0 0 0 1px rgba(255,46,99,.4); color: #ff9bb0; padding: 11px 14px; font-size: .86rem; margin-bottom: 16px; text-align: left; }
.form-notice { display: flex; align-items: center; gap: 8px; background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); color: var(--acc); padding: 10px 14px; font-size: .84rem; margin-bottom: 16px; text-align: left; }

/* --- Nav user badge --------------------------------------------------------- */
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.nav-avatar { display: grid; place-items: center; color: hsl(var(--hue) 85% 60%); }
.nav-avatar svg { display: block; }

/* --- Player customization --------------------------------------------------- */
.settings-card { max-width: 620px; margin: 40px auto 64px; padding: 32px 30px; }
.settings-title { font-family: var(--f-head); font-size: 1.6rem; margin: 0 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.cust-h2 { font-family: var(--f-head); font-size: .92rem; text-transform: uppercase; letter-spacing: 1px; margin: 26px 0 12px; color: var(--muted); }
.cust-preview {
  display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 8px;
  background: hsl(var(--hue) 70% 10%); clip-path: var(--cut);
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 70% 45% / .5), 0 0 26px hsl(var(--hue) 80% 50% / .4);
}
.cust-preview-icon svg { display: block; }
.swatch-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-dot {
  display: block; width: 38px; height: 38px; border-radius: 50%;
  background: hsl(var(--hue) 80% 55%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.35);
  transition: transform .12s, box-shadow .15s;
}
.swatch input:checked + .swatch-dot { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px hsl(var(--hue) 80% 60%), 0 0 16px hsl(var(--hue) 80% 55% / .7); transform: scale(1.08); }
.swatch:hover .swatch-dot { transform: scale(1.08); }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.avatar-opt { position: relative; cursor: pointer; }
.avatar-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.avatar-opt-icon {
  display: grid; place-items: center; aspect-ratio: 1; color: var(--muted);
  background: rgba(120,210,220,.05); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--cut);
  transition: color .12s, box-shadow .15s, transform .12s;
}
.avatar-opt input:checked + .avatar-opt-icon { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 14px var(--acc-line); transform: scale(1.05); }
.avatar-opt:hover .avatar-opt-icon { color: var(--text); }
@media (max-width: 560px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 860px) {
  .play-grid { grid-template-columns: 1fr; }
  .featured-strip { flex-direction: column; align-items: stretch; }
  .featured-strip .fs-art { width: 100%; }
}
@media (max-width: 560px) {
  .vote-grid { grid-template-columns: 1fr; }
  .dpad { grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(3, 42px); }
}

/* ===========================================================================
   LIVE LEADERBOARDS + effects
   =========================================================================== */
.live-board { overflow: hidden; }
.lb2-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .62rem; letter-spacing: 1px; color: var(--hot); text-transform: uppercase; }
.lb2-list { list-style: none; margin: 0; padding: 0; }
.lb2-list-paged { --lb-row-h: 43px; min-height: calc(var(--ps, 10) * var(--lb-row-h)); }
.lb2-paging { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.lb2-arrow { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 2px 6px; }
.lb2-arrow:hover { color: var(--acc); }
.lb2-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lb2-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(120, 210, 220, .22); border: none; cursor: pointer; padding: 0; }
.lb2-dot.on { background: var(--acc); box-shadow: 0 0 8px var(--acc-line); }
.lb2-dot:hover { background: var(--acc-line); }
.lb2-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); will-change: transform; }
.lb2-row:last-child { border-bottom: none; }
.lb2-row.me { background: var(--acc-soft); }
.lb2-rank { width: 30px; display: grid; place-items: center; flex: none; }
.lb2-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb2-name:hover { color: var(--acc); }
.lb2-pts { color: var(--acc); font-weight: 700; }
.lb2-empty { padding: 20px 18px; font-size: .88rem; }

/* score-up / rank-climb pulse; intensity via --rush (0..1), hotter near #1 */
.lb2-row.bumped { animation: lb-bump .9s ease; }
.lb2-row.bumped .lb2-pts { animation: pts-pulse .9s ease; }
@keyframes lb-bump {
  0% { background: rgba(31, 240, 208, calc(.06 + var(--rush, .3) * .28)); box-shadow: inset 0 0 0 1px rgba(31, 240, 208, var(--rush, .3)); }
  100% { background: transparent; box-shadow: none; }
}
@keyframes pts-pulse {
  0% { transform: scale(1); }
  28% { transform: scale(calc(1 + var(--rush, .3) * .5)); text-shadow: 0 0 calc(6px + var(--rush, 0) * 22px) var(--acc-line); }
  100% { transform: scale(1); }
}
.lb2-row.crowned { animation: lb-crown 1.1s ease; }
.lb2-row.crowned .lb2-pts { color: var(--gold); }
@keyframes lb-crown {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: inset 0 0 0 1px var(--gold), 0 0 30px rgba(255, 207, 63, .5); background: rgba(255, 207, 63, .12); }
}

/* Sound toggle in the game topbar */
.game-topbar { position: relative; }
.score-readout { flex: none; }
.game-status { flex: 1; text-align: center; }
.sound-toggle { margin-left: auto; flex: none; background: transparent; border: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 4px; position: relative; }
.sound-toggle:hover { color: var(--acc); }
.sound-toggle.muted { color: var(--dim); }
.sound-toggle.muted::after { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 2px; background: currentColor; transform: rotate(-18deg); border-radius: 2px; }

/* Real game screenshot overlaid on the generated card art */
.game-cover { position: relative; }
.game-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }

/* Subtle, faded animated background drift */
.bg-field::after {
  content: ""; position: absolute; inset: -25%;
  background:
    radial-gradient(28% 30% at 30% 38%, rgba(31, 240, 208, .06), transparent 60%),
    radial-gradient(26% 28% at 72% 62%, rgba(255, 46, 99, .05), transparent 60%),
    radial-gradient(24% 26% at 55% 80%, rgba(120, 130, 255, .045), transparent 60%);
  animation: bg-drift 46s ease-in-out infinite alternate;
  will-change: transform; pointer-events: none;
}
@keyframes bg-drift {
  0% { transform: translate3d(-3%, -2%, 0) scale(1.05) rotate(0deg); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.12) rotate(4deg); }
}

/* ===========================================================================
   THE DAILY TRIO
   =========================================================================== */
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-head { max-width: 42rem; margin-bottom: 30px; }
.trio-grid, .trio-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* --- Hero rank badge: gets more energetic as you climb tiers --------------- */
.hero-rank {
  position: relative; flex: none; min-width: 210px; padding: 18px 25px; text-align: center;
  margin-right: 18px; background: rgba(120, 210, 220, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--cut);
}
.hero-rank::before, .hero-rank::after {
  content: ""; position: absolute; width: 13px; height: 13px; pointer-events: none;
  border-color: var(--acc); transition: border-color .2s;
}
.hero-rank::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.hero-rank::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.hero-rank-label { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .82rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.hero-rank-month { display: block; font-size: .62rem; letter-spacing: 1.2px; color: var(--dim); margin-top: 1px; }
.hero-rank-num { font-family: var(--f-head); font-weight: 700; font-size: 2.6rem; letter-spacing: .5px; margin-top: 3px; color: var(--text); }
.hero-rank-prev { font-size: .82rem; letter-spacing: .3px; margin-top: 5px; }

.hero-rank.tier-top1000 { box-shadow: inset 0 0 0 1px var(--acc-line); }
.hero-rank.tier-top1000 .hero-rank-num { color: var(--acc); }

.hero-rank.tier-top500 { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 18px var(--acc-line); }
.hero-rank.tier-top500 .hero-rank-num { color: var(--acc); text-shadow: 0 0 12px var(--acc-line); }

.hero-rank.tier-top100 { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 24px var(--acc-line); animation: hero-rank-pulse 2.4s ease-in-out infinite; }
.hero-rank.tier-top100 .hero-rank-num { color: var(--acc); text-shadow: 0 0 16px var(--acc-line); }

.hero-rank.tier-top50 { box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .55), 0 0 26px rgba(255, 207, 63, .4); animation: hero-rank-pulse 1.8s ease-in-out infinite; }
.hero-rank.tier-top50 .hero-rank-num { color: var(--gold); text-shadow: 0 0 18px rgba(255, 207, 63, .55); }
.hero-rank.tier-top50 .hero-rank-label { color: var(--gold); }
.hero-rank.tier-top50::before, .hero-rank.tier-top50::after { border-color: var(--gold); }

.hero-rank.tier-top10 { box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .7), 0 0 34px rgba(255, 207, 63, .55); animation: hero-rank-pulse 1.3s ease-in-out infinite; }
.hero-rank.tier-top10 .hero-rank-num { color: var(--gold); text-shadow: 0 0 22px rgba(255, 207, 63, .7); }
.hero-rank.tier-top10 .hero-rank-label { color: var(--gold); }
.hero-rank.tier-top10::before, .hero-rank.tier-top10::after { border-color: var(--gold); }

.hero-rank.tier-champion {
  background: linear-gradient(160deg, rgba(255, 207, 63, .12), rgba(255, 46, 99, .08));
  box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .85), 0 0 46px rgba(255, 207, 63, .65);
  animation: hero-rank-pulse 1s ease-in-out infinite;
}
.hero-rank.tier-champion .hero-rank-num { color: var(--gold); text-shadow: 0 0 28px rgba(255, 207, 63, .85); }
.hero-rank.tier-champion .hero-rank-label { color: var(--gold); }
.hero-rank.tier-champion::before, .hero-rank.tier-champion::after { border-color: var(--hot); }

@keyframes hero-rank-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) { .hero-rank { animation: none !important; } }
@media (max-width: 760px) { .hero-top { flex-direction: column; } .hero-rank { align-self: flex-start; } }
.trio-card { display: block; overflow: hidden; transition: transform .16s, box-shadow .25s; }
.trio-card:hover { transform: translateY(-4px); animation: card-neon-pulse 1.7s ease-in-out infinite; }

/* Pulsating neon glow on card hover, tinted to the game's own hue (--h). */
@keyframes card-neon-pulse {
  0%, 100% { box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px hsl(var(--h, 190) 80% 55% / .35), 0 0 16px hsl(var(--h, 190) 85% 55% / .3); }
  50% { box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px hsl(var(--h, 190) 80% 62% / .8), 0 0 34px hsl(var(--h, 190) 85% 60% / .75); }
}
@media (prefers-reduced-motion: reduce) {
  .game-card:hover, .trio-card:hover { animation: none; box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 20px hsl(var(--h, 190) 85% 55% / .5); }
}
.trio-slot { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--acc); font-size: .68rem; letter-spacing: 2px; }
.trio-art .art { aspect-ratio: 16 / 9; }
.trio-body { padding: 14px 16px 16px; }
.trio-body h3 { font-family: var(--f-head); font-size: 1.15rem; margin: 0 0 4px; letter-spacing: .4px; }
.trio-body p { margin: 0 0 12px; color: var(--muted); font-size: .86rem; min-height: 2.4em; }
.trio-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trio-play { margin-left: auto; }
@media (max-width: 860px) {
  .trio-grid, .trio-strip { grid-template-columns: 1fr; }
}

/* ===========================================================================
   GAME TOOLS: fullscreen + help
   =========================================================================== */
.game-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tool-btn { width: 30px; height: 30px; display: grid; place-items: center; background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 0; border-radius: 6px; position: relative; }
.tool-btn:hover { color: var(--acc); background: var(--acc-soft); }
.game-tools .sound-toggle { margin-left: 0; }

.help-overlay { position: absolute; inset: 0; display: none; place-items: center; background: rgba(4, 7, 11, .8); backdrop-filter: blur(3px); z-index: 5; padding: 20px; }
.help-overlay.show { display: grid; }
.help-card { max-width: 350px; padding: 22px; text-align: left; }
.help-card .panel-h { margin-bottom: 8px; }
.help-legend { display: grid; gap: 8px; margin: 14px 0 16px; }
.help-legend > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--muted); }
.help-legend .key { font-family: var(--f-mono); font-size: .7rem; color: var(--acc); box-shadow: inset 0 0 0 1px var(--line-2); padding: 3px 7px; }

/* Fullscreen: the whole play area fills the screen as a row — game + board */
.play-grid.fs { position: fixed; inset: 0; z-index: 200; width: 100vw; height: 100vh; display: flex; flex-direction: row; gap: 0; padding: 0; background: radial-gradient(120% 90% at 40% 12%, var(--bg-2), var(--bg)); }
body.fs-lock { overflow: hidden; }
.play-grid.fs #game-root { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; border: none; }
.play-grid.fs #game-root::before, .play-grid.fs #game-root::after { display: none; }
.play-grid.fs .game-topbar, .play-grid.fs .touch-controls { flex: none; }
/* Game area fills the column; canvas centered in a framed container */
.play-grid.fs .canvas-wrap { flex: 1 1 auto; width: auto; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line-2), 0 0 60px rgba(0, 0, 0, .5); }
.play-grid.fs .play-side { width: 340px; flex: none; height: 100%; overflow-y: auto; border-left: 1px solid var(--line); padding: 16px; background: var(--bg); }
.play-grid.fs .play-side > * { margin-top: 0; }
@media (max-width: 760px) { .play-grid.fs .play-side { display: none; } }

/* Stretch-to-fill toggle (only shown in fullscreen) */
.stretch-btn { display: none; }
.game-root.is-fullscreen .stretch-btn { display: grid; }
.tool-btn.on { color: var(--acc); }
.game-root.is-fullscreen.stretch .canvas-wrap { box-shadow: none; }
.game-root.is-fullscreen.stretch #game-canvas { max-width: none; }

/* Your climb — live progression board on the play page */
.play-side { display: flex; flex-direction: column; gap: 16px; }
.climb-board .lb2-list { min-height: 110px; }
/* Friends board shares the column with the global one — same total space, split. */
.play-side-split .climb-board .lb2-list { min-height: 64px; }
.climb-now { background: rgba(31, 240, 208, calc(.10 + var(--rush, .3) * .22)) !important; box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 calc(8px + var(--rush, 0) * 26px) rgba(31, 240, 208, .45); position: relative; z-index: 1; }
.climb-now .lb2-name, .climb-now .lb2-pts { color: var(--acc); font-weight: 700; }
.climb-now.crowned { background: rgba(255, 207, 63, .15) !important; box-shadow: inset 0 0 0 1px var(--gold), 0 0 34px rgba(255, 207, 63, .5); }
.climb-now.crowned .lb2-name, .climb-now.crowned .lb2-pts { color: var(--gold); }
.climb-best .lb2-name, .climb-best .lb2-pts { color: var(--muted); }
.climb-sep { text-align: center; color: var(--dim); padding: 3px 0; letter-spacing: 3px; font-family: var(--f-mono); font-size: .7rem; }
.climb-note { padding: 10px 18px; border-top: 1px solid var(--line); font-size: .64rem; letter-spacing: .5px; }

/* Your standing + month-winner countdown */
.standing-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px 32px; padding: 20px 24px; flex-wrap: wrap; }
.standing-cd { flex: 1 1 260px; }
.countdown { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.cd-seg { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.cd-seg b { font-family: var(--f-head); font-size: 2rem; font-weight: 700; letter-spacing: 1px; color: var(--acc); line-height: 1; }
.cd-seg span { font-family: var(--f-mono); font-size: .58rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); margin-top: 5px; }
.cd-sep { font-family: var(--f-head); font-size: 1.5rem; color: var(--dim); padding-bottom: 15px; }
.cd-done { color: var(--gold); letter-spacing: 1px; margin-top: 10px; }
.standing-you { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 22px; }
.you-title { flex-basis: 100%; text-align: right; font-size: .62rem; letter-spacing: 2px; color: var(--dim); }
.you-stat { display: flex; align-items: center; gap: 10px; }
.you-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.you-pts { font-family: var(--f-head); font-size: 1.45rem; font-weight: 700; display: block; line-height: 1; }
a.you-pts.wc-link { color: var(--text); }
a.you-pts.wc-link:hover { color: var(--acc); }
.you-meta { font-family: var(--f-mono); font-size: .66rem; color: var(--muted); letter-spacing: .5px; }
@media (max-width: 620px) {
  .standing-you { justify-content: flex-start; }
  .you-title { text-align: left; }
}

/* Ambient homepage background: floating score toasts (public/bg-feed.js) */
.bg-feed { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bg-toast {
  position: absolute; left: 0; top: 0; opacity: 0;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .4px; white-space: nowrap;
  color: var(--acc); text-shadow: 0 0 10px var(--acc-line);
  animation: bg-toast-rise 4.4s ease-out forwards;
}
@keyframes bg-toast-rise {
  0% { opacity: 0; transform: translateY(0); }
  12% { opacity: .55; }
  72% { opacity: .45; }
  100% { opacity: 0; transform: translateY(-200px); }
}
/* Fire streak trailing below each toast as it rises, like a comet tail. */
.bg-toast::before {
  content: ""; position: absolute; left: 10%; top: 100%; width: 3px; height: 0;
  background: linear-gradient(to bottom, rgba(255, 170, 60, .95), rgba(255, 46, 99, .6) 45%, transparent 92%);
  filter: blur(2px); border-radius: 2px; z-index: -1; pointer-events: none;
  animation: bg-toast-flame 4.4s ease-out forwards;
}
@keyframes bg-toast-flame {
  0% { height: 0; opacity: 0; }
  8% { height: 24px; opacity: .95; }
  45% { height: 52px; opacity: .55; }
  100% { height: 84px; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .bg-toast::before { animation: none; display: none; } }

/* Vote-for-tomorrow's-trio nudge */
.vote-nudge { display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--acc-line); background: var(--acc-soft); color: var(--acc); font-family: var(--f-head); font-weight: 600; font-size: .88rem; }

/* --- Legal pages (Terms / Disclaimer) --------------------------------------- */
.legal-doc { max-width: 52rem; margin: 0 auto; padding: 34px; }
.legal-section { margin-bottom: 30px; }
.legal-section:last-of-type { margin-bottom: 22px; }
.legal-section h2 { font-family: var(--f-head); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 10px; color: var(--acc); }
.legal-section p { color: var(--muted); line-height: 1.7; margin: 0 0 10px; font-size: .93rem; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.legal-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; background: rgba(255, 207, 63, .06); box-shadow: inset 0 0 0 1px rgba(255, 207, 63, .3); color: var(--muted); font-size: .82rem; line-height: 1.6; }
.legal-note .icon { flex: none; color: var(--gold); margin-top: 2px; }
.vote-nudge .dot { flex: none; }
