/* ============================================================
   NameRush — Clean Minimal Design System v4.0
   namerush.org · Dark-first · Motion-ready
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  /* Brand — SPIDER-MAN dark: venom red + spider blue */
  --brand-1: #e62429;           /* spider red */
  --brand-2: #3b82f6;           /* spider blue */
  --grad-brand: var(--brand-1);   /* solid theme color — zero gradients */

  /* Semantic (Spider-Man dark default) */
  --bg: #0c0a10;
  --bg-soft: #14101b;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-1: #f3f4fa;
  --text-2: #a7aabd;
  --text-3: #6d7288;

  --primary: var(--brand-1);
  --on-primary: #ffffff;
  --accent: var(--brand-2);
  --danger: #f43f5e;
  --success: #34d399;
  --ring: color-mix(in srgb, var(--brand-1) 55%, transparent);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--brand-1) 35%, transparent), 0 8px 32px color-mix(in srgb, var(--brand-1) 25%, transparent);
  --shadow-lift: 0 20px 48px rgba(0, 0, 0, 0.45);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 90ms;
  --dur-med: 280ms;

  --container: 1400px;
  --header-h: 64px;
}

/* Light theme — CAPTAIN AMERICA: steel blue + liberty red */
[data-theme="light"] {
  color-scheme: light;
  --brand-1: #2563eb;
  --brand-2: #dc2626;
  --bg: #edf1f8;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --border: #dbe2f1;
  --border-strong: #c2cde6;
  --text-1: #0e1830;
  --text-2: #414b66;
  --text-3: #7d87a1;
  --shadow-1: 0 1px 2px rgba(20, 20, 40, 0.06), 0 8px 24px rgba(20, 20, 40, 0.07);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--brand-1) 30%, transparent), 0 8px 28px color-mix(in srgb, var(--brand-1) 18%, transparent);
  --shadow-lift: 0 20px 48px rgba(20, 20, 40, 0.14);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  background-color: #0c0a10;
  color: #f3f4fa;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  transition: background-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 0.9em; background: var(--surface-strong); border: 1px solid var(--border); padding: 2px 7px; border-radius: var(--radius-xs); }

::selection { background: color-mix(in srgb, var(--brand-1) 40%, transparent); color: #fff; }

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

/* Ambient background glows (fixed, ultra-light) */
body::before, body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
}
body::before { background: var(--brand-1); top: -30vmax; right: -20vmax; }
body::after  { background: var(--brand-2); bottom: -35vmax; left: -25vmax; opacity: 0.09; }
[data-theme="light"] body::before,
[data-theme="light"] body::after { opacity: 0.10; }
[data-theme="light"] body::after { opacity: 0.07; }

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.section { padding-block: clamp(32px, 5vw, 56px); }
.section-tight { padding-block: clamp(20px, 3vw, 32px); }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 48px);
}
.page-layout--single { grid-template-columns: minmax(0, 1fr); max-width: 880px; margin-inline: auto; }

/* Sticky side rail: side ads stay viewable while scrolling (desktop only) */
.page-layout > aside { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1024px) {
  .page-layout > aside { position: static; }
}

@media (max-width: 1024px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 4. Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }

.display-1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; }
.display-2 { font-size: clamp(1.85rem, 3.5vw, 2.75rem); }
.title-md  { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.lead      { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--text-2); max-width: 56ch; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-2);
  padding: 7px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-full); background: var(--surface);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.section-head { margin-bottom: clamp(14px, 2.5vw, 26px); max-width: 720px; }
.section-head .kicker {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
  font-family: var(--font-display);
}
.section-head p { color: var(--text-2); margin-top: 10px; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text-1); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-strong); transform: translateY(-2px); }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- 6. Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--bg);
}
.preloader-word {
  display: flex; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -0.03em; overflow: hidden;
}
.preloader-word .pl-char { display: inline-block; will-change: transform; }
.preloader-word .grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; }
.preloader-bar { width: min(200px, 40vw); height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.preloader-bar i { display: block; height: 100%; width: 0%; background: var(--grad-brand); }
html.preloader-done .preloader { display: none; }

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med), background var(--dur-med);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-1);
  display: grid; place-items: center; flex: none;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand-1) 40%, transparent);
}
/* SPIDEY badge (dark) / SHIELD badge (light) — pure CSS, every page */
.logo-mark img, .logo-mark > svg { display: none; }
.logo-mark::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-width='7' stroke-linecap='round'%3E%3Cellipse cx='50' cy='60' rx='10' ry='15' fill='white' stroke='none'/><circle cx='50' cy='40' r='7' fill='white' stroke='none'/><path d='M43 50Q30 44 22 30M42 58Q28 56 18 48M42 66Q30 70 22 80M44 74Q36 84 32 94M57 50Q70 44 78 30M58 58Q72 56 82 48M58 66Q70 70 78 80M56 74Q64 84 68 94'/%3E%3C/g%3E%3C/svg%3E") center / 72% no-repeat;
}
[data-theme="light"] .logo-mark::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-width='8'%3E%3Ccircle cx='50' cy='50' r='42'/%3E%3Ccircle cx='50' cy='50' r='27'/%3E%3Cpath d='M50 36L53.5 46H64L55.5 52.5L58.5 63L50 56.5L41.5 63L44.5 52.5L36 46H46.5Z' fill='white' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}
.logo-mark svg { width: 18px; height: 18px; }
.logo .rush { color: var(--brand-1); }
[data-theme="light"] .logo .rush { color: var(--brand-1); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
  transition: all var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { color: var(--text-1); border-color: var(--border-strong); background: var(--surface-strong); }
.icon-btn svg { width: 16px; height: 16px; }

.fav-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--grad-brand); color: #fff;
  font-size: 0.72rem; font-weight: 700; border-radius: var(--radius-full);
}
.fav-badge-count-pop { animation: badgePop 0.3s var(--ease-out); }
@keyframes badgePop { 50% { transform: scale(1.35); } }

.menu-btn { display: inline-flex; width: 40px; height: 40px; padding: 0; justify-content: center; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .icon-btn .icon-label { display: none; }
  .icon-btn { padding: 0; width: 40px; height: 40px; justify-content: center; flex-shrink: 0; }
  #favs-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  #favs-btn .fav-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    line-height: 14px;
    border: 2px solid var(--bg);
    border-radius: var(--radius-full);
    z-index: 2;
  }
}
@media (max-width: 600px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .logo { font-size: 1.15rem; gap: 8px; flex-shrink: 1; min-width: 0; }
}

/* Main nav */
.main-nav { border-top: 1px solid var(--border); }
.main-nav .nav-track {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding-block: 4px;
}
.main-nav .nav-track::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-full);
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
}
.nav-link:hover { color: var(--text-1); background: var(--surface-strong); }
.nav-link.active { color: var(--text-1); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* Desktop games strip (JS-cloned from drawer links; hidden on phone) */
.games-strip { border-top: 1px solid var(--border); position: relative; }
.games-strip .nav-track {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding-block: 4px; scroll-padding-inline: 46px;
}
.games-strip .nav-track::-webkit-scrollbar { display: none; }
.games-strip.no-scroll .nav-arrow { display: none; }
.games-strip.no-scroll .nav-progress { display: none; }
@media (max-width: 900px) {
  .games-strip { display: none; }
}

/* Nav scroll arrows + progress slider (desktop; injected by app.js) */
.main-nav, .games-strip { position: relative; }
.main-nav .nav-track, .games-strip .nav-track { scroll-padding-inline: 46px; }
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--border-strong);
  color: var(--text-2); box-shadow: var(--shadow-1);
  transition: opacity var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.nav-arrow:hover { color: var(--text-1); border-color: var(--brand-1); }
.nav-arrow svg { width: 14px; height: 14px; }
.nav-arrow.prev { left: 8px; }
.nav-arrow.next { right: 8px; }
.nav-arrow[disabled] { opacity: 0; pointer-events: none; }
.main-nav.no-scroll .nav-arrow, .games-strip.no-scroll .nav-arrow { display: none; }
.nav-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  cursor: pointer; touch-action: none;
}
.nav-progress::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 4px; height: 2px;
  border-radius: 2px; background: var(--border);
}
.nav-progress i {
  position: absolute; top: 4px; height: 2px; border-radius: 2px;
  background: var(--brand-1); min-width: 28px; left: 0;
}
.main-nav.no-scroll .nav-progress, .games-strip.no-scroll .nav-progress { display: none; }
@media (max-width: 900px) {
  .nav-arrow, .nav-progress { display: none; }
}

/* Side drawer (ALL viewports — PC + phone): slides in from the right, covers ~1/3 of the page */
.main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 300;
    width: min(80vw, 340px); height: 100dvh; max-height: none;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: none;
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(103%);
    transition: transform 0.38s var(--ease-out);
    will-change: transform;
  }
  .main-nav.open { transform: translateX(0); max-height: none; }
  .main-nav .nav-track {
    flex-direction: column; align-items: stretch;
    padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
    overflow: visible;
  }
  .nav-link { padding: 12px 14px; font-size: 0.95rem; }
  .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 2;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
  .nav-drawer-close {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); font-size: 1.25rem; line-height: 1;
    transition: all var(--dur-fast) var(--ease-out);
  }
  .nav-drawer-close:hover { color: var(--text-1); border-color: var(--border-strong); }

/* ---------- 8. Ad slots ---------- */
.ad-slot {
  margin-inline: auto;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--text-3); font-size: 0.82rem; letter-spacing: 0.04em;
}
.ad-slot--top { max-width: var(--container); margin-block: 20px; min-height: 96px; padding: 12px; }
.ad-slot--feed { min-height: 120px; margin-block: 28px; }
.ad-slot--rail { min-height: 420px; }
.ad-slot--anchor { min-height: 52px; }
.ad-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); text-align: center; padding-top: 8px; }

/* Manual slots are unused (Auto Ads injects its own placements).
   Keep them out of layout AND out of the ad-block heuristic. */
.ad-slot, .ad-label, .mobile-anchor { display: none !important; }

.mobile-anchor {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.mobile-anchor .close-ad {
  position: absolute; top: -14px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-strong); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 0.9rem; color: var(--text-2);
}
@media (min-width: 901px) { .mobile-anchor { display: none; } }

/* ---------- 9. Hero ---------- */
.hero { position: relative; padding-block: clamp(24px, 4vw, 56px) clamp(20px, 3vw, 40px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }

.hero-copy > * + * { margin-top: 18px; }
.hero-title { line-height: 1.05; }
.hero-sub { color: var(--text-2); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 52ch; }

.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-stats { display: flex; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.hero-stat b { font-family: var(--font-display); font-size: 1.35rem; display: block; letter-spacing: -0.02em; }
.hero-stat span { font-size: 0.82rem; color: var(--text-3); }

/* Hero visual — layered floating cards over glow orb */
.hero-visual { position: relative; min-height: 420px; }
.hero-orb {
  position: absolute; inset: 8% 4%;
  background:
    radial-gradient(45% 45% at 30% 30%, color-mix(in srgb, var(--brand-1) 50%, transparent), transparent 70%),
    radial-gradient(45% 45% at 70% 65%, color-mix(in srgb, var(--brand-2) 40%, transparent), transparent 70%);
  filter: blur(30px); border-radius: 50%;
  animation: orbDrift 12s ease-in-out infinite alternate;
}
@keyframes orbDrift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 3%, 0) scale(1.08); } }

.float-card {
  position: absolute;
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  will-change: transform;
}
.float-card .fc-name { font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.float-card .fc-meta { display: flex; justify-content: space-between; gap: 14px; margin-top: 6px; font-size: 0.74rem; color: var(--text-3); }
.float-card .fc-tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--grad-brand); color: #fff; font-size: 0.8rem; margin-bottom: 8px; }
.hero-visual .float-card { max-width: 47%; }
.hero-visual .float-card .fc-name { font-size: 0.92rem; }
.fc-1 { top: 0; left: 0; }
.fc-2 { top: 0; right: 0; }
.fc-3 { top: 36%; left: 0; }
.fc-4 { top: 36%; right: 0; }
.fc-5 { bottom: 0; left: 0; }
.fc-6 { bottom: 0; right: 0; }

.hero-scroll-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  display: none;
}
.hero-scroll-hint::after {
  content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px;
  margin-left: -1.5px; border-radius: 3px; background: var(--text-2);
  animation: hintDrop 1.6s ease-in-out infinite;
}
@keyframes hintDrop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
@media (min-width: 901px) { .hero-scroll-hint { display: block; } }

/* Marquee strip */
.marquee {
  border-block: 1px solid var(--border);
  padding-block: 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
/* NOTE: no :hover pause — a parked cursor must never freeze the strip.
   Offscreen auto-pause (.is-paused) and reduced-motion still apply. */
.marquee-track span { font-weight: 700; font-size: 0.95rem; color: var(--text-2); letter-spacing: 0.02em; white-space: nowrap; margin-right: 44px; }
.marquee-track span b { color: var(--brand-1); font-weight: 700; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 10. Tool cards grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med), box-shadow var(--dur-med), background var(--dur-med);
  overflow: hidden;
}
.tool-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(320px 160px at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand-1) 14%, transparent), transparent 70%);
  opacity: 0; transition: opacity var(--dur-med);
  pointer-events: none;
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.tool-card:hover::before { opacity: 1; }

.tool-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--border);
  color: var(--brand-1);
  transition: transform var(--dur-med) var(--ease-out);
}
.tool-card:hover .tool-icon { transform: scale(1.08) rotate(-4deg); background: var(--grad-brand); color: #fff; border-color: transparent; }
.tool-icon svg { width: 22px; height: 22px; }
.tool-card h3 { font-size: 1.08rem; }
.tool-card p { font-size: 0.9rem; color: var(--text-2); }
.tool-card .tool-go { margin-top: auto; padding-top: 8px; font-size: 0.85rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.tool-card .tool-go svg { width: 14px; height: 14px; transition: transform var(--dur-fast); }
.tool-card:hover .tool-go svg { transform: translateX(3px); }

/* ---------- 11. Generator card ---------- */
.generator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(8px);
}
.generator-card.compact { max-width: 760px; margin-inline: auto; box-shadow: none; }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-field {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 18px; height: 52px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search-field:focus-within { border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 18%, transparent); }
.search-field svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.search-field input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font-size: 0.98rem; height: 100%;
}
.search-field input::placeholder { color: var(--text-3); }

.quick-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.quick-tags .qt-label { font-size: 0.78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 2px; }
.tag-pill {
  padding: 7px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.82rem; font-weight: 600; color: var(--text-2);
  transition: all var(--dur-fast) var(--ease-out);
}
.tag-pill:hover { color: var(--text-1); border-color: var(--brand-1); transform: translateY(-1px); }

/* Filter tabs */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  padding: 8px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap; flex: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-pill:hover { color: var(--text-1); border-color: var(--border-strong); }
.filter-pill.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-1) 35%, transparent); }

/* ---------- 12. Nickname grid & cards ---------- */
.nick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.nick-grid > * { min-width: 0; }

/* In page layouts with a 300px sidebar, 3 columns on desktop gives ample card width */
.page-layout .nick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px) {
  .nick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-layout .nick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-layout .nick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .nick-grid,
  .page-layout .nick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nick-card {
    padding: 12px 10px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 126px;
  }

  .nick-info {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 4px;
  }

  .nick-string {
    font-size: clamp(0.88rem, 3.2vw, 1rem);
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    color: var(--text-1);
  }

  .nick-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 5px;
    width: 100%;
    margin-top: auto;
  }

  .nick-actions .chip-btn {
    margin: 0;
    border-radius: var(--radius-full);
  }

  /* Row 1: Reaction buttons */
  .nick-actions .btn-vote {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 28px;
    padding: 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    justify-content: center;
  }

  .nick-actions .btn-fav {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 28px;
    padding: 0 4px;
    font-size: 0.8rem;
    justify-content: center;
  }

  /* Row 2: Action buttons */
  .nick-actions .btn-edit {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 32px;
    padding: 0 4px;
    font-size: 0;
    font-weight: 600;
    justify-content: center;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    white-space: nowrap;
  }
  .nick-actions .btn-edit::before {
    content: "✨ Edit";
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
  }

  .nick-actions .btn-copy {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 32px;
    padding: 0 4px;
    font-size: 0.76rem;
    font-weight: 700;
    justify-content: center;
    background: var(--grad-brand);
    color: #fff;
    border-color: transparent;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .nick-grid,
  .page-layout .nick-grid {
    gap: 6px;
  }

  .nick-card {
    padding: 10px 8px;
    gap: 6px;
  }

  .nick-actions {
    gap: 4px;
  }

  .nick-actions .btn-edit::before {
    font-size: 0.71rem;
  }

  .nick-actions .btn-copy {
    font-size: 0.73rem;
  }
}


.nick-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.nick-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-brand);
  opacity: 0; transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
}
.nick-card:hover::before { opacity: 1; }
.nick-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand-1) 50%, transparent); box-shadow: var(--shadow-1); }

.nick-string {
  font-size: 1.08rem; font-weight: 700; line-height: 1.4;
  word-break: break-word; cursor: pointer;
  display: block;
}
.nick-card:hover .nick-string { color: var(--brand-1); }
[data-theme="light"] .nick-card:hover .nick-string { color: var(--brand-1); }

.nick-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.76rem; color: var(--text-3); }
.nick-actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap !important;
  align-items: center;
  width: 100%;
}

.chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 5px 8px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface-strong);
  font-size: 0.72rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap; flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.nick-actions .btn-vote,
.nick-actions .btn-fav {
  flex: 0 0 auto;
  padding: 5px 7px;
}
.nick-actions .btn-edit {
  flex: 1 1 auto;
  padding: 5px 6px;
  text-align: center;
}
.nick-actions .btn-copy {
  flex: 1 1 auto;
  padding: 5px 8px;
  min-width: 44px;
  text-align: center;
}
.chip-btn:hover { color: var(--text-1); border-color: var(--border-strong); }
.chip-btn.fav-active { color: var(--danger); border-color: rgba(244, 63, 94, 0.4); }
.chip-btn.btn-copy { background: var(--grad-brand); color: #fff; border-color: transparent; }
.chip-btn.btn-copy:hover { filter: brightness(1.1); }

/* Card extras (nickname grids, customizer, favs) */
.nick-info { display: block; cursor: pointer; }

.btn-vote { color: var(--text-2); }
.btn-vote:hover { color: var(--brand-2); border-color: var(--brand-2); }
.btn-vote.vote-active, .comm-up.vote-active {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  font-weight: 700;
}
.btn-vote .up-val { font-variant-numeric: tabular-nums; }

.btn-remove {
  background: rgba(244, 63, 94, 0.12);
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.35);
}
.btn-remove:hover { background: rgba(244, 63, 94, 0.2); color: var(--danger); }

/* Count badge pop */
.cnt { font-variant-numeric: tabular-nums; }

/* ---------- 13. Symbols ---------- */
.symbol-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.symbol-chip {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.25rem; line-height: 1;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.symbol-chip:hover { transform: translateY(-3px) scale(1.06); border-color: var(--brand-1); background: var(--surface-strong); }

.builder-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 28px;
}
.builder-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.builder-box .search-field { height: 48px; }
.builder-hint { font-size: 0.85rem; color: var(--text-2); margin-top: 6px; }

/* ---------- 14. Trending rail ---------- */
.rail-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.rail-box + .rail-box { margin-top: 18px; }
.rail-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; font-family: var(--font-display); }
.rail-title svg { width: 16px; height: 16px; color: var(--accent); }

.trending-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
}
.trending-row:hover { background: var(--surface-strong); }
.trending-row .tr-name { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.trending-row .tr-rank { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--brand-1); flex: none; }
.trending-row .tr-text { font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 15. Showcase (scroll parallax band) ---------- */
.showcase {
  position: relative;
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
  padding-block: clamp(36px, 5vw, 64px);
}
.showcase-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 900px) { .showcase-grid { grid-template-columns: 1fr; } }

.showcase-copy .display-2 { margin-bottom: 16px; }
.showcase-points { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.showcase-point { display: flex; gap: 12px; align-items: flex-start; }
.showcase-point .sp-icon {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--accent);
}
.showcase-point .sp-icon svg { width: 16px; height: 16px; }
.showcase-point b { display: block; font-size: 0.95rem; }
.showcase-point span { font-size: 0.87rem; color: var(--text-2); }

.showcase-art { position: relative; min-height: 380px; }
.art-tile {
  position: absolute;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  will-change: transform;
}
.art-tile svg { width: 100%; height: 100%; }
.at-1 { width: 62%; aspect-ratio: 16 / 11; top: 2%; left: 0; }
.at-2 { width: 40%; aspect-ratio: 3 / 4; top: 18%; right: 2%; z-index: 2; }
.at-3 { width: 46%; aspect-ratio: 16 / 10; bottom: 4%; left: 12%; z-index: 3; }

/* ---------- 16. Article & FAQ ---------- */
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px);
}
.article-card h2 { margin-bottom: 14px; }
.article-card p { color: var(--text-2); margin-bottom: 12px; max-width: 72ch; }
.article-card strong { color: var(--text-1); }
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.keyword-cloud span {
  font-size: 0.78rem; font-weight: 600; color: var(--text-3);
  padding: 5px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
}

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--dur-fast);
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; font-weight: 600; font-size: 0.95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--font-display); font-size: 1.2rem; color: var(--text-3);
  transition: transform var(--dur-fast);
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--brand-1); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--text-2); font-size: 0.92rem; max-width: 68ch; }

/* ---------- 17. Forms (contact etc.) ---------- */
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.form-input {
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.95rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
textarea.form-input { height: auto; padding: 12px 16px; resize: vertical; }
.form-input:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 16%, transparent); }

/* ---------- 18. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: clamp(40px, 7vw, 80px); background: var(--bg-soft); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(40px, 6vw, 64px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 16px; font-family: var(--font-display); }
.footer-col a { display: block; padding-block: 5px; font-size: 0.9rem; color: var(--text-2); transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--text-1); }
.footer-about { display: flex; flex-direction: column; gap: 12px; }
.footer-about p { font-size: 0.9rem; color: var(--text-2); max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--text-3);
}

/* ---------- 19. Modals / drawer / toast ---------- */
body.modal-open,
body:has(.modal-overlay.open) {
  overflow: hidden !important;
  touch-action: none;
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(5, 5, 10, 0.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 18px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
  overscroll-behavior: contain;
}
.modal-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--dur-med) var(--ease-out); }

.modal-panel {
  width: 100%; max-width: 560px; max-height: min(84dvh, 720px);
  display: flex; flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--dur-med) var(--ease-out);
  overscroll-behavior: contain;
}
.modal-overlay.open .modal-panel { transform: translateY(0) scale(1); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 1rem;
  transition: all var(--dur-fast);
}
.modal-close:hover { color: var(--text-1); border-color: var(--border-strong); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; overscroll-behavior: contain; touch-action: pan-y; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.customizer-preview {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 16px; margin-bottom: 18px;
}
.customizer-preview .cp-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-3); margin-bottom: 8px; }
.customizer-preview .cp-text { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; word-break: break-word; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field select, .field input {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.92rem;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--brand-1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* ══════════ FULL-SPACE CUSTOMIZER STUDIO ══════════ */
#customize-modal {
  padding: 16px;
  z-index: 600;
}
#customize-modal .modal-panel {
  width: 96vw;
  max-width: 1260px;
  height: 94vh;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft, #0e121a);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

@media (max-width: 768px) {
  #customize-modal { padding: 0; }
  #customize-modal .modal-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
}

.cz-top-sticky {
  background: var(--bg, #080b11);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.cz-preview-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md, 12px);
  padding: 14px 20px;
}

.cz-preview-display {
  flex: 1;
  text-align: left;
}

.cz-preview-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-1, #818cf8);
  font-weight: 700;
  margin-bottom: 4px;
}

.cz-preview-text,
.cz-preview-input {
  width: 100%;
  font-family: var(--font-display, inherit);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-1, #fff);
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 0;
  margin: 0;
  display: block;
  letter-spacing: 0.02em;
  word-break: break-word;
  line-height: 1.25;
}
.cz-preview-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  font-size: 1.25rem;
}
.cz-preview-input:focus {
  outline: none;
}
@media (max-width: 640px) {
  .cz-preview-input {
    font-size: 1.35rem;
  }
}

.cz-controls-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.cz-input-group input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  background: var(--surface, #141923);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: var(--radius-sm, 8px);
  color: var(--text-1, #fff);
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.cz-input-group input:focus {
  outline: none;
  border-color: var(--brand-1, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.cz-chip-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.cz-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px 0;
  background: var(--bg-soft, #0e121a);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  flex-wrap: nowrap !important;
}
.cz-tabs::-webkit-scrollbar { display: none; }

.cz-tab-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--text-3, #94a3b8);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cz-tab-btn:hover {
  color: var(--text-1, #fff);
  background: rgba(255, 255, 255, 0.04);
}

.cz-tab-btn.active {
  color: var(--text-1, #fff);
  background: var(--surface, #151a24);
  border-color: var(--border, rgba(255, 255, 255, 0.1));
  border-bottom: 2px solid var(--brand-1, #6366f1);
}

.cz-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.cz-panel {
  display: none;
}
.cz-panel.active {
  display: block;
}

.cz-section-header {
  margin-bottom: 14px;
}
.cz-section-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-1, #fff);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cz-section-header p {
  font-size: 0.8rem;
  color: var(--text-3, #94a3b8);
  margin-top: 2px;
}

.cz-grid {
  display: grid;
  gap: 10px;
}

.cz-grid-pairs {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.cz-grid-styles {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.cz-grid-symbols {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.cz-item-card {
  background: var(--surface, #141923);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
}

.cz-item-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
}

.cz-item-card.active {
  border-color: var(--brand-1, #6366f1);
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 0 0 2px var(--brand-1, #6366f1), 0 6px 18px rgba(99, 102, 241, 0.25);
}

.cz-item-card.active .cz-active-check {
  display: flex;
}

.cz-active-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: var(--brand-1, #6366f1);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}

.cz-item-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3, #94a3b8);
}

.cz-item-preview {
  font-family: var(--font-display, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1, #fff);
  word-break: break-word;
  line-height: 1.25;
}

.cz-sym-card {
  text-align: center;
  padding: 14px 10px;
  align-items: center;
}
.cz-sym-card .cz-sym-display {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1, #fff);
  margin-bottom: 4px;
}

/* Clean Favorites Modal Studio */
.favs-panel {
  max-width: 540px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fav-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fav-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.fav-header-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 500;
}
.fav-tabs-bar {
  display: flex;
  padding: 8px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.fav-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--dur-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fav-tab-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
}
.fav-tab-btn.active {
  color: #fff;
  background: var(--brand-1);
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.25);
}
.fav-list {
  padding: 16px 20px;
  max-height: 420px;
  overflow-y: auto;
}
.fav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: transform var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.fav-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-1) 40%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.fav-card-string {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
  word-break: break-all;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.fav-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fav-card-actions .btn-copy {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
}
.fav-card-actions .btn-edit {
  padding: 5px 10px;
  font-size: 0.78rem;
  background: var(--surface-strong);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
}
.fav-card-actions .btn-edit:hover {
  color: var(--text-1);
  border-color: var(--border-strong);
}
.fav-card-actions .btn-remove {
  padding: 5px 8px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-3);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all var(--dur-fast);
}
.fav-card-actions .btn-remove:hover {
  color: var(--danger);
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
}
.fav-empty-box {
  text-align: center;
  padding: 36px 16px;
}
.fav-empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}
.fav-empty-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-1);
}
.fav-empty-box p {
  font-size: 0.85rem;
  color: var(--text-3);
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.5;
}
.favs-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.btn-danger { background: rgba(244, 63, 94, 0.12); color: var(--danger); border: 1px solid rgba(244, 63, 94, 0.35); }
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }

.modal-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.modal-foot label.btn { cursor: pointer; }
.modal-foot input[type="file"] { display: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 500;
  transform: translateX(-50%) translateY(8px);
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); color: var(--text-1);
  border: 1px solid var(--border-strong); border-radius: var(--radius-full);
  padding: 11px 20px; font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--shadow-lift);
  opacity: 0; transition: opacity var(--dur-med), transform var(--dur-med) var(--ease-out);
  max-width: min(92vw, 480px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; color: var(--success); flex: none; }

/* Ad-blocker nudge modal */
#adb-modal { opacity: 0; transition: opacity 0.2s var(--ease-out); }
#adb-modal.open { opacity: 1; }
#adb-modal .modal-panel { transform: translateY(16px) scale(0.98); transition: transform 0.2s var(--ease-out); }
#adb-modal.open .modal-panel { transform: translateY(0) scale(1); }

/* ---------- 20. Motion states ---------- */
html.gsap-ready [data-reveal] { opacity: 0; transform: translateY(24px); }
html.gsap-ready [data-reveal].is-revealed { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
html.gsap-ready .hero-copy > * { opacity: 0; }
html.gsap-ready .hero-visual .float-card { opacity: 0; }
html.motion-done .hero-copy > *,
html.motion-done .hero-visual .float-card { opacity: 1 !important; }

/* ---------- 21. Page hero (inner pages) — compact so names show without scroll ---------- */
.page-hero { padding-block: clamp(18px, 3vw, 30px) clamp(10px, 2vw, 18px); text-align: center; }
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.page-hero .hero-sub { margin: 8px auto 0; font-size: clamp(0.92rem, 1.2vw, 1.02rem); }
.page-hero .hero-sub { margin: 14px auto 0; }

@media (max-width: 640px) {
  .search-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }
  .search-field {
    flex: 1 1 140px;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    gap: 6px;
  }
  .search-field svg {
    width: 15px;
    height: 15px;
    flex: none;
  }
  .search-field input {
    font-size: 0.90rem;
    min-width: 0;
  }
  .search-row .btn {
    flex: 0 0 auto;
    width: auto;
    height: 42px;
    padding: 0 10px;
    font-size: 0.82rem;
    gap: 5px;
    white-space: nowrap;
    max-width: 100%;
  }
  .search-row .btn svg {
    width: 14px;
    height: 14px;
    flex: none;
  }
  #btn-hero-copy {
    flex: 0 0 auto;
    font-weight: 700;
  }
  #btn-random-gen {
    flex: 0 0 auto;
    width: auto;
  }
}
@media (max-width: 560px) {
  .hero-stats { gap: 18px; }
  .modal-panel { max-height: 90dvh; }
}
@media (max-width: 360px) {
  .search-row {
    gap: 5px;
  }
  .search-field {
    flex: 1 1 100%;
    width: 100%;
  }
  .search-row .btn {
    padding: 0 8px;
    font-size: 0.80rem;
  }
}

/* ---------- 23. Smooth-scroll & mobile perf ---------- */
section[id], div[id="generator"], div[id="community"] { scroll-margin-top: calc(var(--header-h) + 24px); }

/* Reserve space for the mobile anchor ad */
@media (max-width: 900px) {
  body { padding-bottom: 64px; }
  /* Large fixed blur layers are expensive on low-end phones — drop them */
  body::before, body::after { filter: blur(48px); opacity: 0.10; }
  .float-card, .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .float-card { background: color-mix(in srgb, var(--bg-soft) 96%, transparent); }
}

/* NOTE: no content-visibility on grids — the 1600px size estimate caused
   layout jumps that broke ScrollTrigger positions on fast scroll
   (sections revealed late going down, fine coming back up). */
#main-output-grid,
#community-grid,
#home-symbols-grid {
  content-visibility: visible;
}

.nick-card { contain: layout style; }

/* Quick-jump bar: every section one tap away (minimum scroll) */
.jumpbar {
  position: sticky; top: var(--header-h); z-index: 150;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.jumpbar-track {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-block: 8px;
}
.jumpbar-track::-webkit-scrollbar { display: none; }
.jumpbar-track a {
  flex: none; font-size: 0.82rem; font-weight: 600; color: var(--text-2);
  padding: 7px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  transition: all var(--dur-fast) var(--ease-out);
}
.jumpbar-track a:hover, .jumpbar-track a:active { color: var(--text-1); border-color: var(--brand-1); }

/* Marquee on its own layer: no page repaint per frame */
.marquee-track { transform: translateZ(0); }

/* Show-more control & pagination */
.show-more-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 16px;
  width: 100%;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand-1) 0%, #6366f1 100%);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.35);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  min-height: 48px;
  text-decoration: none;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.55);
  background: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 100%);
}

.load-more-btn:active {
  transform: translateY(0) scale(0.98);
}

.load-more-btn .more-left {
  font-size: 0.82em;
  font-weight: 500;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* End-of-list card & switch to other games */
.end-of-names-card {
  width: 100%;
  margin-top: 26px;
  padding: clamp(22px, 3.5vw, 36px) clamp(16px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  text-align: center;
  animation: cardFadeIn 0.35s ease forwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.end-card-header {
  margin-bottom: 20px;
}

.end-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.32);
  margin-bottom: 12px;
}

.end-title {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.end-desc {
  font-size: clamp(0.88rem, 1.5vw, 0.95rem);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

.switch-games-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.switch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.switch-chip:hover {
  border-color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 14%, var(--surface));
  color: var(--brand-1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.22);
}

.switch-chip:active {
  transform: translateY(0);
}

.switch-chip .chip-emoji {
  font-size: 1.1em;
  line-height: 1;
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}

/* ---------- 24. GAMER MODE — neon grid bg, snappy motion, glow ---------- */
:root {
  --dur-fast: 90ms;
  --dur-med: 160ms;
}

/* Gamer grid backdrop + SPIDEY watermark (dark) */
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-width='4' stroke-linecap='round' opacity='0.05'%3E%3Cellipse cx='50' cy='60' rx='10' ry='15' fill='white' stroke='none'/%3E%3Ccircle cx='50' cy='40' r='7' fill='white' stroke='none'/%3E%3Cpath d='M43 50Q30 44 22 30M42 58Q28 56 18 48M42 66Q30 70 22 80M44 74Q36 84 32 94M57 50Q70 44 78 30M58 58Q72 56 82 48M58 66Q70 70 78 80M56 74Q64 84 68 94'/%3E%3C/g%3E%3C/svg%3E") right -110px top 90px / 500px auto no-repeat,
    radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--brand-1) 7%, transparent), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}
[data-theme="light"] body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%232563eb' stroke-width='5' opacity='0.06'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Ccircle cx='50' cy='50' r='29'/%3E%3Cpath d='M50 36L53.5 46H64L55.5 52.5L58.5 63L50 56.5L41.5 63L44.5 52.5L36 46H46.5Z' fill='%232563eb' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right -110px top 90px / 500px auto no-repeat,
    radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--brand-1) 10%, transparent), transparent 70%),
    linear-gradient(rgba(20, 20, 40, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 40, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

/* Sticky controls: search + filters always in view (no hunting) */
/* Sticky filter bar ONLY as a direct rail child (symbols page).
   The homepage generator card is intentionally NOT sticky — nested
   sticky contexts made long walls flicker and jump while scrolling. */
.generator-card { position: static; }
.rail-box > .filter-bar { position: sticky; top: calc(var(--header-h) + 10px); z-index: 119; background: var(--bg-soft); }
.generator-card .filter-bar { position: static; background: none; backdrop-filter: none; }

/* Slim header on scroll — stays stuck, takes less room */
.header-inner { transition: height var(--dur-med) var(--ease-out); }
.site-header.scrolled .header-inner { height: 56px; }

/* Card stream-in: fast stagger, GPU-only transform/opacity */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.nick-card.card-in {
  animation: cardIn var(--dur-med) var(--ease-out) both;
  animation-delay: var(--card-d, 0ms);
}
[data-hero] { animation: none; }
.nick-card:hover .nick-string { transition: none; }

/* Neon hover: border ignites + lift (no text-shadow on hover — causes paint lag) */
.nick-card { transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast); }
.nick-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand-1) 65%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-1) 35%, transparent), 0 12px 32px color-mix(in srgb, var(--brand-1) 22%, transparent);
}
.nick-card:hover .nick-string { color: color-mix(in srgb, var(--brand-1) 85%, var(--text-1)); }
.nick-string { transition: color var(--dur-fast); }

/* Gradient text glow — soft, cheap shadow */
.grad-text { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--brand-1) 28%, transparent)); }

/* Buttons: punchy press, electric hover */
.btn { transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), filter var(--dur-fast); }
.btn:active { transform: scale(0.95); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-1) 50%, transparent), 0 10px 36px color-mix(in srgb, var(--brand-1) 45%, transparent); }
.chip-btn.btn-copy:hover { box-shadow: 0 0 14px color-mix(in srgb, var(--brand-1) 55%, transparent); filter: brightness(1.12); }
.chip-btn.btn-edit {
  border-color: color-mix(in srgb, var(--brand-1) 55%, transparent);
  color: var(--brand-1);
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand-1) 22%, transparent);
}
.chip-btn.btn-edit:hover { background: var(--brand-1); color: #fff; border-color: transparent; }

/* Ad slots stay visible as placeholders so AdSense can attempt to fill them.
   Auto-ads will inject into these slots when allowed. */
.ad-label { display: none; } /* only hide the "Sponsored" label until ads render */
.chip-btn:active { transform: scale(0.93); }
.tag-pill:active, .filter-pill:active { transform: scale(0.94); }

/* Live-dot pulse + faster marquee = alive feed */
.eyebrow .dot { animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse { 50% { box-shadow: 0 0 14px var(--success); transform: scale(1.25); } }
.marquee-track { animation-duration: 16s; }
.hero-scroll-hint { animation: none; }

/* Tool cards: snappier ignite */
.tool-card { transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med), box-shadow var(--dur-med), background var(--dur-med); }
.tool-card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-1) 30%, transparent), var(--shadow-lift); }

/* Gamer scrollbar (desktop) — slim */
html { scrollbar-width: thin; scrollbar-color: var(--brand-1) var(--bg); }
@media (min-width: 901px) {
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--brand-1); border-radius: 6px; }
}

/* Reduced motion: kill the stream-in, keep content instant */
@media (prefers-reduced-motion: reduce) {
  .nick-card.card-in { animation: none; }
  .eyebrow .dot { animation: none; }
}

/* Customizer game-limit meter + download row spacing */
.cp-meter {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.cp-meter b { color: var(--brand-1); font-variant-numeric: tabular-nums; }
.cp-meter.over { color: var(--danger); }
.show-more-wrap { gap: 10px; }
.cp-avail { margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.cp-avail a { color: var(--accent); }
.cp-avail a:hover { color: var(--text-1); }
.related-links a {
  font-size: 0.82rem; font-weight: 600; color: var(--text-2);
  padding: 7px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  transition: all var(--dur-fast) var(--ease-out);
}
.related-links a:hover { color: var(--text-1); border-color: var(--brand-1); transform: translateY(-1px); }

/* ---------- 25. THEME FX — toggle flash wipe + logo spin ---------- */
.theme-flash {
  position: fixed; z-index: 999; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--brand-2) 0%, var(--brand-1) 45%, transparent 70%);
  opacity: 0.9; transform: scale(1);
  transition: transform 0.65s var(--ease-out), opacity 0.65s var(--ease-out);
}
.theme-flash.go { transform: scale(60); opacity: 0; }
.logo-mark.spin { animation: logoSpin 0.6s var(--ease-out); }
@keyframes logoSpin { 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .theme-flash { display: none; }
  .logo-mark.spin { animation: none; }
}

/* Brand logo + reveal video */
.logo-mark { overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; object-position: 18% 50%; }
.cta-video {
  display: block; width: min(560px, 100%); aspect-ratio: 16 / 9;
  margin: 0 auto 22px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lift);
  background: #000;
}
