/* ==========================================================
   Pixelplayz2215 — site styles
   Brand colors pulled from the channel logo + banner
   ========================================================== */

:root {
  /* Logo: pixel play button */
  --teal: #0bbfbc;
  --coral: #fc354c;
  /* Logo: circle gradient */
  --magenta: #a41d70;
  --navy: #193b6d;
  /* Channel banner */
  --purple: #543d73;
  --purple-light: #68578a;

  /* Surfaces (deep tints of the brand navy/purple) */
  --bg: #0f0c22;
  --bg-2: #15112e;
  --surface: #1c173d;
  --surface-2: #251f4c;
  --border: rgba(203, 196, 215, 0.12);
  --border-strong: rgba(203, 196, 215, 0.22);

  /* Text */
  --text: #fbf9fc;
  --muted: #b8aecb;
  --subtle: #8a80a3;

  /* Gradients */
  --grad-logo: linear-gradient(135deg, var(--magenta) 0%, var(--navy) 100%);
  --grad-play: linear-gradient(90deg, var(--teal), var(--coral));
  --grad-text: linear-gradient(90deg, var(--teal) 0%, #7f8cf0 45%, var(--coral) 100%);

  /* Type */
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "Silkscreen", "Courier New", monospace; /* caps-only: labels, not handles */
  --font-mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;

  /* Layout */
  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --px: 4px; /* pixel-corner notch size */
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(164, 29, 112, 0.28), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, rgba(25, 59, 109, 0.55), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: #3fe0dc; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--teal); color: var(--bg); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.section { padding: clamp(48px, 7vw, 80px) 0; }
.section + .section { padding-top: 0; }
.section-tight { padding: clamp(40px, 6vw, 64px) 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Pixel bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; flex: none;
  background: var(--coral);
  box-shadow: 10px 0 0 var(--teal);
  margin-right: 10px;
}

.grad-text {
  background: linear-gradient(90deg, var(--teal), #7f8cf0, var(--coral), #7f8cf0, var(--teal)) 0 0 / 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.pixel-corners {
  clip-path: polygon(
    0 var(--px), var(--px) var(--px), var(--px) 0,
    calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
    var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px))
  );
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 0.98rem/1 var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  clip-path: polygon(
    0 var(--px), var(--px) var(--px), var(--px) 0,
    calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
    var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px))
  );
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--text); }
.btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }

.btn-coral { --btn-bg: var(--coral); --btn-fg: #fff; }
.btn-teal  { --btn-bg: var(--teal);  --btn-fg: #08201f; }
.btn-ghost { --btn-bg: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 2px var(--border-strong); }
.btn-ghost:hover { --btn-bg: rgba(255, 255, 255, 0.1); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }
.btn-lg { min-height: 56px; padding: 16px 28px; font-size: 1.05rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 12, 34, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--border-strong); }
.brand-name span { color: var(--teal); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  position: relative;
  color: var(--muted);
  font-weight: 600; font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--text); }
.site-nav a[aria-current="page"]:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px;
  background: var(--grad-play);
}
.site-nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 1px solid var(--border-strong); border-radius: 10px;
  cursor: pointer; color: var(--text);
}
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 14px; font-size: 1rem; }
  .site-nav a[aria-current="page"]:not(.btn) { background: rgba(255, 255, 255, 0.05); }
  .site-nav a[aria-current="page"]:not(.btn)::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .site-nav .btn { margin: 10px 0 0; }
}

/* ---------- Home hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px; }
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 560px; margin-bottom: 32px; }

.hero-art { position: relative; justify-self: center; width: min(100%, 400px); aspect-ratio: 1; }
.avatar-ring {
  position: absolute; inset: 10%;
  border-radius: 50%;
  padding: 6px;
  isolation: isolate;
  box-shadow: 0 30px 80px -20px rgba(164, 29, 112, 0.55), 0 0 0 1px var(--border);
}
.avatar-ring::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--teal), var(--navy), var(--magenta), var(--coral), var(--teal));
}
.avatar-ring img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--grad-logo); }

/* Floating shapes echo the channel banner */
.shape { position: absolute; width: 44px; height: 44px; animation: float 6s ease-in-out infinite; }
.shape svg { width: 100%; height: 100%; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.shape-tri  { top: 2%;  left: 4%;   stroke: var(--coral); }
.shape-circ { top: 6%;  right: 2%;  stroke: var(--teal); animation-delay: -1.5s; }
.shape-x    { bottom: 6%; left: 0;  stroke: var(--teal); animation-delay: -3s; }
.shape-sq   { bottom: 0; right: 8%; stroke: var(--magenta); animation-delay: -4.5s; }
.shape-tri svg, .shape-circ svg, .shape-x svg, .shape-sq svg { stroke: inherit; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .shape { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; width: min(72%, 300px); }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.stat-value { display: block; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { display: block; margin-top: 6px; font-family: var(--font-pixel); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.stat:nth-child(4n+1) .stat-value { color: var(--teal); }
.stat:nth-child(4n+2) .stat-value { color: var(--coral); }
.stat:nth-child(4n+3) .stat-value { color: #e25aa8; }
.stat:nth-child(4n+4) .stat-value { color: #8fa6ff; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; }
.about-grid p { color: var(--muted); font-size: 1.05rem; }
.about-grid p strong { color: var(--text); }
.about-grid p a strong { color: inherit; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.panel h3 { margin-bottom: 18px; }

.chip-list { display: flex; flex-direction: column; gap: 10px; }
.chip-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.chip-num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  font-family: var(--font-pixel); font-size: 0.9rem;
  color: var(--bg);
  background: var(--teal);
}
.chip-list li:nth-child(even) .chip-num { background: var(--coral); color: #fff; }

/* ---------- Platform cards (home) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.platform-card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.platform-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--accent, var(--grad-play));
}
.platform-card:hover { color: var(--text); transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.platform-card h3 { margin: 0; }
.platform-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.platform-card .go { margin-top: auto; font-weight: 700; font-size: 0.92rem; color: var(--teal); display: inline-flex; align-items: center; gap: 6px; }
.platform-card:hover .go { gap: 10px; }
.platform-card .go::after { content: "→"; transition: transform 0.2s ease; }

.icon-badge {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  background: var(--badge-bg, var(--surface-2));
  color: var(--badge-fg, var(--text));
}
.icon-badge svg { width: 26px; height: 26px; fill: currentColor; }
.icon-badge.lg { width: 72px; height: 72px; border-radius: 20px; }
.icon-badge.lg svg { width: 36px; height: 36px; }

.is-youtube   { --accent: var(--coral);   --badge-bg: rgba(252, 53, 76, 0.16);  --badge-fg: var(--coral); }
.is-instagram { --accent: linear-gradient(90deg, var(--magenta), var(--coral)); --badge-bg: rgba(164, 29, 112, 0.25); --badge-fg: #f064b4; }
.is-tiktok    { --accent: var(--grad-play); --badge-bg: rgba(11, 191, 188, 0.14); --badge-fg: var(--teal); }
.is-discord   { --accent: linear-gradient(90deg, var(--navy), #5a74d6); --badge-bg: rgba(90, 116, 214, 0.2); --badge-fg: #9fb1ff; }
.is-donate    { --accent: linear-gradient(90deg, var(--coral), #ff8a5c); --badge-bg: rgba(252, 53, 76, 0.16); --badge-fg: #ff7a8a; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(28px, 5vw, 48px);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(252, 53, 76, 0.28), transparent 70%),
    linear-gradient(135deg, var(--purple) 0%, #3a2a63 50%, var(--navy) 100%);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.cta-banner h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-banner p { margin: 0; color: #ddd5ea; max-width: 520px; }

/* ---------- Sub-page hero ---------- */
.page-hero { padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 56px); }
.page-hero-inner { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 640px; margin-bottom: 28px; }
.handle {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .page-hero-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.feature-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.feature {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature .icon-badge { margin-bottom: 18px; width: 46px; height: 46px; border-radius: 12px; }
.feature .icon-badge svg, .callout .icon-badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.feature:nth-child(4n+1) .icon-badge { background: rgba(11, 191, 188, 0.14); color: var(--teal); }
.feature:nth-child(4n+2) .icon-badge { background: rgba(252, 53, 76, 0.16); color: var(--coral); }
.feature:nth-child(4n+3) .icon-badge { background: rgba(164, 29, 112, 0.25); color: #f064b4; }
.feature:nth-child(4n+4) .icon-badge { background: rgba(90, 116, 214, 0.2); color: #9fb1ff; }

/* ---------- Video cards ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.video-card { display: flex; flex-direction: column; color: var(--text); }
.video-card:hover { color: var(--text); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.video-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(15, 12, 34, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23fff'/%3E%3Cpath d='M26 20 46 32 26 44z' fill='%23fc354c' stroke='%23fc354c' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E") center / 44px no-repeat;
  opacity: 0;
  transition: opacity 0.2s ease, background-size 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.video-card:hover .video-thumb::after, .video-card:focus-visible .video-thumb::after { opacity: 1; background-size: 60px; }
.video-tag {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  font-family: var(--font-pixel); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 8px;
  background: var(--bg); color: var(--teal);
}
.video-tag.reaction { color: var(--coral); }
.video-tag.tutorial { color: #f064b4; }
.video-title { margin: 12px 0 0; font-weight: 600; font-size: 1rem; line-height: 1.4; }

/* ---------- Callout ---------- */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  padding: 28px;
  background: linear-gradient(135deg, rgba(11, 191, 188, 0.1), rgba(164, 29, 112, 0.14));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.callout h3 { margin-bottom: 8px; }
.callout p { margin: 0; color: var(--muted); }
.callout p + p { margin-top: 10px; }
@media (max-width: 560px) { .callout { grid-template-columns: 1fr; } }

/* ---------- Discord invite ---------- */
.invite-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: clamp(24px, 4vw, 36px);
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(90, 116, 214, 0.28), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
}
.invite-card h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin-bottom: 4px; }
.invite-card p { margin: 0; color: var(--muted); }
.invite-link { font-family: var(--font-mono); font-weight: 600; color: var(--text); font-size: 1rem; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .invite-card { grid-template-columns: 1fr; }
  .invite-card .btn { width: 100%; }
}

/* ---------- Donate ---------- */
.donate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.donate-card {
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  position: relative;
  overflow: hidden;
}
.donate-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--accent); }
.donate-card.cashapp { --accent: var(--teal); }
.donate-card.bmc { --accent: var(--coral); }
.donate-card h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 0; }
.donate-card p { margin: 0; color: var(--muted); }
.donate-card .btn-row { margin-top: auto; }
.donate-card .icon-badge { background: rgba(11, 191, 188, 0.14); color: var(--teal); }
.donate-card.bmc .icon-badge { background: rgba(252, 53, 76, 0.16); color: var(--coral); }
.copy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.copy-row code { font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; color: var(--text); overflow-wrap: anywhere; }
.copy-btn {
  flex: none;
  min-height: 38px; padding: 6px 14px;
  font: 600 0.85rem var(--font-body);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}
.copy-btn:hover { background: #2f2860; }
.copy-btn.copied { color: var(--bg); background: var(--teal); border-color: var(--teal); }
@media (max-width: 760px) { .donate-grid { grid-template-columns: 1fr; } }

.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.check-list li::before {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.55em;
  background: var(--teal);
}
.check-list li:nth-child(even)::before { background: var(--coral); }
.check-list strong { color: var(--text); }

.note { color: var(--subtle); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.site-footer::before { content: ""; display: block; height: 4px; background: var(--grad-play); }
.footer-wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding-top: 36px; padding-bottom: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-brand strong { display: block; line-height: 1.2; }
.footer-brand small { font-family: var(--font-pixel); color: var(--subtle); font-size: 0.75rem; letter-spacing: 0.04em; }
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.socials a:hover { color: var(--text); background: var(--surface-2); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.copyright { margin: 0; width: 100%; color: var(--subtle); font-size: 0.88rem; }
@media (min-width: 720px) { .copyright { width: auto; } }

/* ---------- Live follower cards ---------- */
.live-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.live-grid > * { min-width: 0; }
.live-copy h2 { margin-bottom: 12px; }
.live-copy p { color: var(--muted); }
.live-copy .btn-row { margin-top: 24px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 6px 12px;
  font-family: var(--font-pixel); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #ff7a8a; background: rgba(252, 53, 76, 0.12);
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.live-frame {
  padding: 6px;
  border-radius: 22px;
  background: var(--accent) 0 0 / 200% 200%;
  box-shadow: 0 30px 80px -30px rgba(164, 29, 112, 0.6);
}
.live-inner { display: flex; justify-content: center; padding: 28px 20px; border-radius: 16px; background: var(--surface); }
.live-embed { display: block; width: 100%; height: 370px; border: 0; background: #fff; }
.live-widget .tiktok-embed { background: #fff; margin: 0; }

/* Dark mode for the platform widgets: they can't be restyled from outside, so flip their
   colors, tint them to --surface, and cover the (now flipped) profile picture with the real logo.
   The widgets are held at 320px so their layout, and the picture's position, never changes. */
.live-widget { position: relative; width: 320px; max-width: 100%; border-radius: 12px; overflow: hidden; }
.live-widget > iframe, .live-widget > blockquote { filter: invert(1) hue-rotate(180deg); }
.live-tint { position: absolute; inset: 0; background: rgba(112, 92, 244, 0.25); pointer-events: none; }
.live-avatar { position: absolute; border-radius: 50%; object-fit: cover; pointer-events: none; }
.live-widget.ig .live-avatar { left: 23px; top: 44px; width: 58px; height: 58px; }
.live-widget.tt .live-avatar { left: 16px; top: 16px; width: 50px; height: 50px; }
@media (max-width: 400px) { .live-inner { padding: 12px 4px; } }
@media (max-width: 820px) { .live-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- Discord invites ---------- */
.invite-list { display: grid; gap: 16px; }
.invite-card p + p { margin-top: 6px; }
.invite-card.sysbot { background: radial-gradient(400px 200px at 0% 0%, rgba(11, 191, 188, 0.2), transparent 70%), var(--surface); }
.icon-badge.line svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================
   Motion
   ========================================================== */

/* Floating pixels behind heroes (added by main.js) */
.hero, .page-hero { position: relative; overflow: hidden; }
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }
.pixels { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.pixels i {
  position: absolute; bottom: -20px;
  width: var(--s); height: var(--s);
  background: var(--c);
  opacity: 0;
  animation: pixel-rise var(--t) linear var(--delay) infinite;
}
@keyframes pixel-rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.55; }
  80%  { opacity: 0.35; }
  100% { transform: translate(var(--drift), -110vh); opacity: 0; }
}

/* Scroll reveal: only hides things once JS is running */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}

@media (prefers-reduced-motion: no-preference) {
  /* Logo ring spins, avatar bobs */
  .avatar-ring { animation: bob 6s ease-in-out infinite; }
  .avatar-ring::before { animation: spin 8s linear infinite; }
  .hero-art::after {
    content: ""; position: absolute; inset: 14%; z-index: -1; border-radius: 50%;
    background: radial-gradient(circle, rgba(252, 53, 76, 0.35), rgba(11, 191, 188, 0.15) 60%, transparent 70%);
    filter: blur(30px);
    animation: glow 4s ease-in-out infinite alternate;
  }

  /* Shimmering name */
  .grad-text { animation: shimmer 6s linear infinite; }

  /* Pixel squares in eyebrows swap colors */
  .eyebrow::before { animation: pixel-swap 1.6s steps(1) infinite; }

  /* Header logo does a spin on hover */
  .brand-mark { transition: transform 0.8s cubic-bezier(0.3, 1.4, 0.5, 1); }
  .brand:hover .brand-mark { transform: rotate(360deg) scale(1.08); }

  /* Buttons get a light sweep */
  .btn { position: relative; }
  .btn::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-120%);
  }
  .btn:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }

  /* Cards lift and their icons pop */
  .icon-badge { transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .platform-card:hover .icon-badge { transform: rotate(-8deg) scale(1.12); }
  .feature, .stat { transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease; }
  .feature:hover, .stat:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
  .feature:hover .icon-badge { transform: scale(1.15) rotate(6deg); }
  .page-hero .icon-badge.lg { animation: bob 5s ease-in-out infinite; }
  .invite-card .icon-badge.lg { animation: bob 5s ease-in-out infinite; }
  .invite-card.sysbot .icon-badge.lg { animation-delay: -2.5s; }

  /* Live cards */
  .live-dot { animation: live-pulse 1.6s ease-out infinite; }
  .live-frame { animation: border-flow 6s ease infinite; }

  /* Footer color bar flows */
  .site-footer::before { background: linear-gradient(90deg, var(--teal), var(--coral), var(--magenta), var(--teal)) 0 0 / 300% 100%; animation: border-flow 8s linear infinite; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes glow { from { opacity: 0.5; transform: scale(0.95); } to { opacity: 1; transform: scale(1.08); } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes pixel-swap {
  0%  { background: var(--coral); box-shadow: 10px 0 0 var(--teal); }
  50% { background: var(--teal);  box-shadow: 10px 0 0 var(--coral); }
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(252, 53, 76, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(252, 53, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 53, 76, 0); }
}
@keyframes border-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ---------- Latest upload ---------- */
.video-embed {
  position: relative;
  max-width: 920px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -30px rgba(252, 53, 76, 0.45);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Sysbots ---------- */
.bot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.bot-card {
  position: relative;
  padding: 30px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}
.bot-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--teal); }
.bot-card.wip::before { background: repeating-linear-gradient(135deg, var(--coral) 0 10px, transparent 10px 20px); }
.bot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.bot-card .icon-badge { background: rgba(11, 191, 188, 0.14); color: var(--teal); }
.bot-card.wip .icon-badge { background: rgba(252, 53, 76, 0.16); color: var(--coral); }
.bot-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  font-family: var(--font-pixel); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.bot-status.ok { color: var(--teal); background: rgba(11, 191, 188, 0.12); }
.bot-status.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.bot-status.wip { color: #ff7a8a; background: rgba(252, 53, 76, 0.12); }
.bot-card h3 { font-size: 1.7rem; margin-bottom: 2px; }
.bot-card p { margin: 0; color: var(--muted); }
.bot-card .bot-game { margin-bottom: 10px; color: var(--text); font-weight: 600; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.step { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 16px;
  font-family: var(--font-pixel); font-size: 1.1rem;
  color: var(--bg); background: var(--teal);
}
.step:nth-child(even) .step-num { color: #fff; background: var(--coral); }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .bot-card, .step { transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease; }
  .bot-card:hover, .step:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
  .bot-card:hover .icon-badge { transform: rotate(-8deg) scale(1.12); }
  .bot-status.ok::before { animation: bot-pulse 1.6s ease-out infinite; }
  .bot-card.wip::before { background-size: 28px 100%; animation: stripes 1.2s linear infinite; }
}
@keyframes bot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(11, 191, 188, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(11, 191, 188, 0); }
  100% { box-shadow: 0 0 0 0 rgba(11, 191, 188, 0); }
}
@keyframes stripes { to { background-position: 28px 0; } }

/* ---------- Business email ---------- */
.contact-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: clamp(24px, 4vw, 36px);
  background: radial-gradient(400px 200px at 0% 0%, rgba(11, 191, 188, 0.16), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
}
.contact-card h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin-bottom: 4px; }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card p a { overflow-wrap: anywhere; }
.contact-card .icon-badge { background: rgba(11, 191, 188, 0.14); color: var(--teal); }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; } }

.footer-mail { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.footer-mail:hover { color: var(--text); }
.footer-mail svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact form ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 28px; align-items: start; }
.form-card {
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
}
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  font: 500 1rem/1.5 var(--font-body);
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 180px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--subtle); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 191, 188, 0.25); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--coral); }
/* Browsers paint autofilled boxes light blue; keep them on-theme */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  transition: background-color 9999s ease-out 0s;
}
.field input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--bg-2) inset, 0 0 0 3px rgba(11, 191, 188, 0.25); }
.field input:autofill { background-color: var(--bg-2); color: var(--text); }
.form-card .btn svg, .form-success .btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-card .btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: 0.95rem; }
.form-status.error { color: #ff7a8a; }
.form-success { text-align: center; padding: 24px 8px; }
.form-success .icon-badge { margin: 0 auto 18px; background: rgba(11, 191, 188, 0.14); color: var(--teal); }
.form-success h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 8px; }
.form-success p { color: var(--muted); margin-bottom: 24px; }
.form-success strong { color: var(--text); overflow-wrap: anywhere; }
.contact-aside h3 { margin-bottom: 14px; }
.contact-aside h3:not(:first-child) { margin-top: 28px; }
.contact-aside .copy-row { flex-wrap: wrap; }
.contact-aside { container-type: inline-size; }
/* As big as 1.1rem, but shrinks to fit the panel so the address never wraps */
.contact-aside .copy-row code { font-size: min(1.1rem, calc((100cqi - 30px) / 14)); white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) {
  .form-success:not([hidden]) { animation: pop-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.notfound-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.notfound h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.notfound .btn-row { justify-content: center; }
.gameover {
  margin: 0 0 24px;
  font-family: var(--font-pixel);
  font-size: clamp(3rem, 12vw, 7rem);
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--teal) 0 50%, var(--coral) 50% 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 rgba(164, 29, 112, 0.7));
}
.continue { margin: 4px 0 24px; font-family: var(--font-pixel); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- New Year's Eve countdown ---------- */
.nye-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(252, 53, 76, 0.25), transparent 70%),
    linear-gradient(135deg, var(--purple) 0%, #2a2058 60%, var(--navy) 100%);
  border: 1px solid var(--border-strong);
}
.nye-card .eyebrow { margin-bottom: 12px; }
.nye-card h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.nye-sub { margin: 0; max-width: 460px; color: #ddd5ea; }
.nye-right { display: grid; gap: 10px; justify-items: center; }
.nye-clock { display: flex; gap: 10px; }
.nye-clock div {
  min-width: 74px; padding: 12px 8px; text-align: center;
  background: rgba(15, 12, 34, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.nye-clock span { display: block; font-family: var(--font-pixel); font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.nye-clock small { display: block; margin-top: 4px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nye-caption { margin: 0; font-family: var(--font-pixel); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); text-align: center; }
.nye-card.is-today .nye-caption { color: #ff7a8a; }
.nye-card.is-today .nye-caption a { color: inherit; text-decoration: underline; }
.nye-celebrate { margin: 0; font-family: var(--font-pixel); font-size: clamp(1.4rem, 3vw, 2rem); text-align: center; }
@media (max-width: 760px) {
  .nye-card { grid-template-columns: minmax(0, 1fr); }
  .nye-right { justify-items: stretch; }
  .nye-clock div { flex: 1; min-width: 0; }
}

/* ---------- Live now banner ---------- */
.live-banner { position: relative; z-index: 60; background: var(--coral); color: #fff; }
.live-banner-inner { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
.live-banner strong { font-family: var(--font-pixel); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.live-banner .live-dot { flex: none; background: #fff; }
.live-banner .live-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.live-banner .btn { --btn-bg: #fff; --btn-fg: #b8132a; flex: none; }
.live-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.live-close:hover { background: rgba(255, 255, 255, 0.15); }
@media (max-width: 560px) { .live-banner .live-title { display: none; } .live-banner-inner { justify-content: space-between; } }

@media (prefers-reduced-motion: no-preference) {
  .continue { animation: blink 1.2s steps(1) infinite; }
  .gameover { animation: bob 4s ease-in-out infinite; }
  .live-banner .live-dot { animation: live-pulse-white 1.6s ease-out infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes live-pulse-white {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ---------- Sysbots: server stats + bot status ---------- */
.server-stats { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 0.92rem; color: var(--muted); }
.server-stats .live-dot { background: #3ddc84; animation: none; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.2); }
.bot-status.off { color: var(--muted); background: rgba(255, 255, 255, 0.06); }
.bot-status.off::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }

/* ---------- Sysbots: trade builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 24px; align-items: start; color-scheme: dark; }
.builder-form { display: grid; gap: 16px; min-width: 0; }
.b-group { min-width: 0; margin: 0; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.b-group legend { padding: 0 8px; font-family: var(--font-pixel); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.b-wide { grid-column: 1 / -1; }
.b-field { display: grid; gap: 6px; align-content: start; }
.b-field > span { font-size: 0.88rem; font-weight: 600; }
.b-field small { font-weight: 500; color: var(--subtle); }
.builder input:not([type="checkbox"]), .builder select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: 500 0.95rem/1.4 var(--font-body); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.builder input::placeholder { color: var(--subtle); }
.builder input:focus, .builder select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 191, 188, 0.25); }
.builder select:disabled { opacity: 0.7; }
.builder input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.builder input[type="number"]::-webkit-inner-spin-button, .builder input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.b-field input[name="size-custom"] { margin-top: 6px; }
.b-check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 44px; font-weight: 600; cursor: pointer; }
.b-check input { width: 20px; height: 20px; accent-color: var(--coral); }
.b-moves { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.b-stats { display: grid; grid-template-columns: 44px repeat(6, minmax(0, 1fr)); gap: 8px; align-items: center; }
.b-stats input:not([type="checkbox"]) { min-height: 40px; padding: 8px 4px; text-align: center; }
.b-stat-head { font-family: var(--font-pixel); font-size: 0.72rem; letter-spacing: 0.04em; text-align: center; color: var(--muted); }
.b-row-label { font-family: var(--font-pixel); font-size: 0.75rem; color: var(--teal); }
.b-stat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.b-ev-total { margin-right: auto; font-family: var(--font-mono); font-weight: 600; color: var(--muted); }
.b-ev-total.over { color: #ff7a8a; }
.b-chip {
  padding: 6px 12px; font: 600 0.82rem var(--font-body); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer;
}
.b-chip:hover { background: #2f2860; }

.b-more summary { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.b-more summary::-webkit-details-marker { display: none; }
.b-more summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px;
  font-family: var(--font-pixel); color: var(--bg); background: var(--teal);
}
.b-more[open] summary::before { content: "\2212"; background: var(--coral); color: #fff; }
.b-more[open] summary { margin-bottom: 16px; }
.b-hint { margin: 12px 0 0; font-size: 0.88rem; color: var(--subtle); }
.b-hint strong { color: var(--muted); }

.builder-preview {
  position: sticky; top: calc(var(--header-h) + 16px);
  display: grid; gap: 14px; min-width: 0;
  padding: 22px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: calc(var(--radius) + 4px);
}
.b-mon { display: flex; align-items: center; gap: 14px; min-height: 96px; }
.b-sprite { flex: none; display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; background: var(--bg-2); border-radius: 50%; }
.b-sprite img { width: 100%; height: 100%; object-fit: contain; }
.b-mon strong { font-size: 1.2rem; }
.b-output {
  margin: 0; min-height: 180px;
  padding: 14px 16px;
  font: 500 0.9rem/1.55 var(--font-mono); color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.builder:not(.is-loaded) .b-output, .b-output:empty { color: var(--subtle); }
.b-warnings {
  margin: 0; padding: 10px 14px 10px 30px; list-style: disc;
  font-size: 0.88rem; color: #ffb3bd;
  background: rgba(252, 53, 76, 0.1); border: 1px solid rgba(252, 53, 76, 0.3); border-radius: var(--radius-sm);
}
.b-warnings li + li { margin-top: 4px; }
.b-warnings li.soft { color: #f6d58b; }
.b-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.b-actions .btn { flex: 1 1 auto; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.builder-preview .b-hint { margin: 0; }
.builder-preview code { padding: 1px 6px; font-family: var(--font-mono); background: var(--bg-2); border-radius: 6px; }
.b-reset { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--subtle); font: 500 0.85rem var(--font-body); text-decoration: underline; cursor: pointer; }
.b-reset:hover { color: var(--text); }

@media (max-width: 900px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-preview { position: static; }
}
@media (max-width: 560px) {
  .b-group { padding: 16px; }
  .b-stats { grid-template-columns: 34px repeat(6, minmax(0, 1fr)); gap: 5px; }
  .b-stats input:not([type="checkbox"]) { padding: 8px 2px; font-size: 0.85rem; }
  .b-stat-head { font-size: 0.62rem; }
}

/* Builder suggestion lists + dark native menus */
.b-combo { position: relative; }
.b-combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  max-height: 264px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin; scrollbar-color: var(--purple-light) transparent;
}
.b-combo-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.95rem; color: var(--text); cursor: pointer;
}
.b-combo-list li small { font-family: var(--font-mono); font-size: 0.78rem; color: var(--subtle); }
.b-combo-list li:hover, .b-combo-list li[aria-selected="true"] { background: rgba(11, 191, 188, 0.16); }
.b-combo-list li[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--teal); }
.builder select option { background-color: var(--bg-2); color: var(--text); }
.b-sprite:has(img[hidden]) { border: 1px dashed var(--border-strong); }

/* Builder game switch */
.b-games {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
}
.b-games button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font: 700 0.95rem var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.b-games button[aria-checked="true"] { background: var(--coral); color: #fff; }
.b-games button:not([aria-checked="true"]):not(:disabled):hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.b-games button.is-locked { cursor: not-allowed; opacity: 0.6; }
.b-soon {
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-pixel); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 560px) {
  .b-games { justify-self: stretch; }
  .b-games button { flex: 1; gap: 6px; padding: 10px 8px; font-size: 0.82rem; }
  .b-soon { padding: 1px 4px; font-size: 0.58rem; }
}

/* Pokemon box layout. Scarlet/Violet: checkboxes sit in the grid as before.
   Legends: Z-A: Level centered under Nickname/Gender, then Shiny/Alpha/Mega, then Which Mega. */
.b-checks { display: contents; }
[data-active-game="za"] .b-mon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-active-game="za"] .b-mon-grid .b-level {
  grid-column: 1 / -1; justify-self: center;
  width: max(calc(50% - 7px), min(100%, 220px));
}
[data-active-game="za"] .b-checks {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 22px;
  grid-column: 1 / -1;
}
[data-active-game="za"] .b-checks .b-check { align-self: center; }
.b-mega-pick { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; }
.builder .b-mega-pick select { width: auto; min-width: 180px; }
@media (max-width: 560px) { [data-active-game="za"] .b-checks { gap: 4px 18px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* A long set makes the preview tall; stop pinning it so the copy buttons never get cut off */
.builder-preview.is-tall { position: static; }
