/* ============================================================
   Cheerfund — shared styles
   Neutral black/white/gray system. Dark default, light via tokens.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-2: #0e0e0e;
  --surface: #131313;
  --surface-2: #191919;
  --surface-3: #212121;
  --border: #262626;
  --border-2: #363636;
  --fg: #fafafa;
  --fg-2: #d4d4d4;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --inverse: #fafafa;
  --inverse-fg: #0a0a0a;
  --glow: rgba(255, 255, 255, 0.16);
  --glow-strong: rgba(255, 255, 255, 0.35);
  --grid: rgba(255, 255, 255, 0.045);
  --overlay: rgba(0, 0, 0, 0.7);
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 48px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.5), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  --noise-opacity: 0.045;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.22s;
  --dur-slow: 0.5s;

  --container: 1120px;
  --gutter: 16px;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --bg-2: #f4f4f4;
    --surface: #ffffff;
    --surface-2: #f5f5f5;
    --surface-3: #ececec;
    --border: #e5e5e5;
    --border-2: #d4d4d4;
    --fg: #0a0a0a;
    --fg-2: #262626;
    --muted: #525252;
    --muted-2: #737373;
    --inverse: #0a0a0a;
    --inverse-fg: #fafafa;
    --glow: rgba(0, 0, 0, 0.1);
    --glow-strong: rgba(0, 0, 0, 0.22);
    --grid: rgba(0, 0, 0, 0.06);
    --overlay: rgba(250, 250, 250, 0.75);
    --danger: #b91c1c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 48px -16px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.06), 0 40px 100px -30px rgba(0, 0, 0, 0.3);
    --noise-opacity: 0.06;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-2: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #ececec;
  --border: #e5e5e5;
  --border-2: #d4d4d4;
  --fg: #0a0a0a;
  --fg-2: #262626;
  --muted: #525252;
  --muted-2: #737373;
  --inverse: #0a0a0a;
  --inverse-fg: #fafafa;
  --glow: rgba(0, 0, 0, 0.1);
  --glow-strong: rgba(0, 0, 0, 0.22);
  --grid: rgba(0, 0, 0, 0.06);
  --overlay: rgba(250, 250, 250, 0.75);
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 48px -16px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.06), 0 40px 100px -30px rgba(0, 0, 0, 0.3);
  --noise-opacity: 0.06;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must win over component display rules (flex/grid). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--fg); color: var(--bg); }

/* Page fade-in (JS-gated so a broken script never hides content) */
html.js body { animation: pageIn 0.45s var(--ease-out) both; }
html.js body.pt-out { opacity: 0; transition: opacity 0.18s ease; }
/* Opacity only: animating transform on <body> would turn it into the containing
   block for position:fixed children (splash, nav, modals, toasts) and break them. */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Noise texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 24px; } }
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }
.section-head { max-width: 640px; margin-bottom: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--muted-2); }
h1, .h1 { font-size: clamp(2.2rem, 6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
h2, .h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
h3, .h3 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 600; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: grid; gap: 12px; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bg-grid { position: relative; }
.bg-grid::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, #000 50%, transparent)) {
  .nav { background: var(--bg); }
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-mark { display: inline-flex; width: 26px; height: 26px; transition: transform 0.4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px; font-size: 0.925rem; color: var(--muted);
  transition: color var(--dur) ease, background-color var(--dur) ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-menu-btn { display: inline-flex; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-menu-btn { display: none; }
}
.mobile-nav { border-top: 1px solid var(--border); background: var(--bg); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: block; padding: 14px var(--gutter); border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav a:hover { background: var(--surface-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  transition: transform var(--dur) var(--ease), background-color var(--dur), border-color var(--dur), box-shadow var(--dur);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-2); box-shadow: 0 0 0 4px var(--glow); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun, .theme-toggle .moon { position: absolute; transition: transform 0.45s var(--ease), opacity 0.3s ease; }
.theme-toggle { position: relative; }
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle .moon { opacity: 1; transform: rotate(0) scale(1); }
:root.is-light .theme-toggle .sun { opacity: 1; transform: rotate(0) scale(1); }
:root.is-light .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  transition: transform var(--dur) var(--ease), background-color var(--dur), border-color var(--dur), box-shadow var(--dur), color var(--dur), opacity var(--dur);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); box-shadow: 0 0 0 4px var(--glow); }
.btn:active { transform: scale(0.965); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.btn-primary:hover { background: var(--inverse); border-color: var(--inverse); box-shadow: 0 0 0 4px var(--glow), 0 10px 30px -10px var(--glow-strong); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0; opacity: 0;
  transition: opacity 0.2s ease;
}
:root.is-light .btn-primary::after { background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%); background-size: 250% 100%; }
.btn-primary:hover::after { opacity: 1; animation: sheen 0.9s var(--ease) forwards; }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spinner { display: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .spinner { display: block; position: absolute; color: var(--inverse-fg); }
.btn:not(.btn-primary).is-loading .spinner { color: var(--fg); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.magnetic { transition: transform 0.25s var(--ease), background-color var(--dur), border-color var(--dur), box-shadow var(--dur), color var(--dur); }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 8px; }
.label { font-size: 0.875rem; font-weight: 600; color: var(--fg-2); }
.hint { font-size: 0.8125rem; color: var(--muted-2); }
.error-msg { font-size: 0.8125rem; color: var(--danger); min-height: 1.2em; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg);
  transition: border-color var(--dur), box-shadow var(--dur), background-color var(--dur);
}
.input::placeholder { color: var(--muted-2); }
.input:hover { border-color: var(--border-2); }
.input:focus { border-color: var(--fg); box-shadow: 0 0 0 4px var(--glow); outline: none; }
.input.is-invalid { border-color: var(--danger); }
.input.mono { font-size: 0.9rem; letter-spacing: 0.01em; }
.input-wrap .input-action { position: absolute; right: 6px; }
.input-wrap.has-icon .input { padding-left: 42px; }
.input-wrap .input-icon { position: absolute; left: 14px; color: var(--muted-2); pointer-events: none; }
.input-wrap .input-icon svg { width: 18px; height: 18px; }

/* Range slider */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; }
.range:focus-visible { outline-offset: 6px; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--fg) var(--fill, 0%), var(--border-2) var(--fill, 0%)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--border-2); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--fg); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%;
  background: var(--inverse); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--border-2), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--inverse); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--border-2), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { transform: scale(1.18); box-shadow: 0 0 0 1px var(--border-2), 0 0 0 8px var(--glow); }
.range:hover::-moz-range-thumb, .range:active::-moz-range-thumb { transform: scale(1.18); box-shadow: 0 0 0 1px var(--border-2), 0 0 0 8px var(--glow); }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-value { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Cards & surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.card-hover:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-sm { padding: 16px; border-radius: var(--radius); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--border-2); color: var(--muted); background: var(--surface-2);
}
.badge-solid { background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); position: relative; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--fg); opacity: 0; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-3); border: 1px solid var(--border); }
.avatar img, .avatar svg { width: 100%; height: 100%; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 64px; height: 64px; }
.coin-img { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface-3); border: 1px solid var(--border); }
.coin-img img, .coin-img svg { width: 100%; height: 100%; }
kbd {
  font-family: var(--mono); font-size: 0.72rem; padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--muted); box-shadow: 0 1px 0 var(--border-2);
}

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; color: transparent !important; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* Address chip */
.addr {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--mono); font-size: 0.85rem; overflow: hidden;
}
.addr code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { position: relative; }
.copy-btn .check { position: absolute; opacity: 0; transform: scale(0.5); transition: transform 0.25s var(--ease), opacity 0.2s; }
.copy-btn .copy { transition: transform 0.25s var(--ease), opacity 0.2s; }
.copy-btn.is-copied .check { opacity: 1; transform: scale(1); }
.copy-btn.is-copied .copy { opacity: 0; transform: scale(0.5); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--inverse); color: var(--inverse-fg);
  font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow);
  animation: toastIn 0.35s var(--ease-out) both;
}
.toast.is-leaving { animation: toastOut 0.25s ease forwards; }
.toast svg { width: 18px; height: 18px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn 0.2s ease both; }
.modal-panel {
  position: relative; width: min(480px, 100%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s var(--ease-out) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }

/* ---------- Odometer ---------- */
.odo { display: inline-flex; align-items: baseline; font-family: var(--mono); font-variant-numeric: tabular-nums; line-height: 1; height: 1em; overflow: hidden; }
.odo-cell { display: inline-block; height: 1em; overflow: hidden; }
.odo-digit { width: 0.64em; }
.odo-col { display: flex; flex-direction: column; transition: transform 0.9s var(--ease-out); will-change: transform; }
.odo-col span { display: block; height: 1em; line-height: 1; text-align: center; }
.odo-sep { width: 0.38em; text-align: center; display: inline-block; }

/* ---------- Ticker ---------- */
.ticker { position: relative; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.ticker-track { display: flex; gap: 0; white-space: nowrap; will-change: transform; width: max-content; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px;
  font-size: 0.875rem; color: var(--muted); border-right: 1px solid var(--border);
}
.ticker-item.is-new { animation: tickerIn 0.6s var(--ease-out) both; }
@keyframes tickerIn { from { opacity: 0; transform: translateY(6px); } }
.ticker-item strong { color: var(--fg); font-weight: 600; }
.ticker-item .mono { color: var(--fg); }
.ticker-item .gem { width: 14px; height: 14px; }
.ticker-static { display: flex; flex-wrap: wrap; }
.ticker-static .ticker-item { border-right: 0; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: var(--bg); color: var(--fg);
  transition: opacity 0.35s ease;
}
.splash.is-leaving { opacity: 0; pointer-events: none; }
.splash-stage { position: relative; width: 320px; height: 240px; display: grid; place-items: center; }
.splash-gem { width: 150px; height: 150px; overflow: visible; }
.splash-gem .facet { transform-box: fill-box; transform-origin: center; opacity: 0; animation: facetIn 0.5s var(--ease-out) forwards; animation-delay: calc(var(--i) * 85ms + 120ms); }
@keyframes facetIn { from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(var(--r)); } to { opacity: 1; transform: none; } }
.splash-gem .sweep { opacity: 0; animation: sweep 0.55s var(--ease) forwards; animation-delay: 1.15s; }
@keyframes sweep { 0% { opacity: 0; transform: translateX(-70px) skewX(-20deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(70px) skewX(-20deg); } }
.splash-gem.is-shattering { animation: gemOut 0.25s ease forwards; }
@keyframes gemOut { to { opacity: 0; transform: scale(1.12); } }
.splash-canvas { position: absolute; inset: 0; pointer-events: none; }
.splash-word {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 2.4rem; font-weight: 700; letter-spacing: -0.04em; white-space: nowrap; display: flex;
}
.splash-word span { display: inline-block; opacity: 0; transform: translateY(14px); }
.splash-word.in span { animation: letterIn 0.5s var(--ease-out) forwards; animation-delay: calc(var(--i) * 32ms); }
@keyframes letterIn { to { opacity: 1; transform: none; } }
.splash-skip {
  position: absolute; right: 20px; bottom: 20px;
  font-size: 0.8rem; color: var(--muted); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
  transition: color var(--dur), border-color var(--dur), background-color var(--dur);
}
.splash-skip:hover { color: var(--fg); border-color: var(--border-2); background: var(--surface); }
.splash-skip kbd { margin-left: 6px; }
.splash.is-static .splash-gem .facet { animation: none; opacity: 1; }
.splash.is-static .splash-gem .sweep { display: none; }
.splash.is-static .splash-word span { animation: none; opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 96px 0 64px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 32px; } }
.hero-copy { max-width: 600px; }
.hero-copy .lead { margin-top: 20px; max-width: 520px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 16px; margin-top: 28px; color: var(--muted-2); font-size: 0.85rem; flex-wrap: wrap; }
.hero-proof .avatars { display: flex; }
.hero-proof .avatars .avatar { width: 28px; height: 28px; margin-left: -8px; border: 2px solid var(--bg); }
.hero-proof .avatars .avatar:first-child { margin-left: 0; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 320px; }
@media (min-width: 900px) { .hero-visual { min-height: 460px; } }
.gem-scene { position: relative; width: min(380px, 80vw); aspect-ratio: 1; perspective: 900px; touch-action: none; }
.gem-scene canvas { position: absolute; inset: -20%; width: 140%; height: 140%; pointer-events: none; }
.gem-3d { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.6s var(--ease-out); will-change: transform; }
.gem-scene.is-active .gem-3d { transition: transform 0.08s linear; }
.gem-layer { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.gem-layer .gem-float { width: 62%; height: 62%; }
.gem-layer svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.5)); }
.gem-layer.back svg { opacity: 0.22; filter: blur(8px); }
.gem-layer.back { transform: translateZ(-40px); }
.gem-layer.mid { transform: translateZ(20px); }
.gem-layer.front { transform: translateZ(60px); }
.gem-glow {
  position: absolute; inset: 15%; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-strong), transparent 65%);
  filter: blur(30px); opacity: 0.8; transform: translateZ(-80px);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: translateZ(-80px) scale(1); } 50% { opacity: 0.9; transform: translateZ(-80px) scale(1.08); } }
.gem-float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.gem-ring {
  position: absolute; inset: 8%; border-radius: 50%; border: 1px solid var(--border-2);
  transform: rotateX(72deg) translateZ(-60px); opacity: 0.6;
}
.gem-ring.r2 { inset: -2%; opacity: 0.35; }
.gem-hint { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--muted-2); font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

.share-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 28px; font-size: 0.9rem; }
.share-banner[hidden] { display: none; }

/* ---------- How it works ---------- */
.steps { display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; overflow: hidden; }
.step-num { font-family: var(--mono); font-size: 0.75rem; color: var(--muted-2); letter-spacing: 0.1em; }
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--muted); font-size: 0.925rem; }
.step-art { height: 120px; margin: 0 -24px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: relative; overflow: hidden; display: grid; place-items: center; }
.step-art svg { width: 100%; height: 100%; }
.art-link .plug { animation: plugIn 2.6s var(--ease) infinite; }
@keyframes plugIn { 0%, 15% { transform: translateX(-14px); } 45%, 70% { transform: translateX(0); } 100% { transform: translateX(-14px); } }
.art-link .spark { opacity: 0; animation: spark 2.6s ease infinite; }
@keyframes spark { 45% { opacity: 0; } 50% { opacity: 1; } 62% { opacity: 0; } }
.art-accrue .drop { animation: dropIn 2.2s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.art-accrue .drop.d2 { animation-delay: 0.7s; }
.art-accrue .drop.d3 { animation-delay: 1.4s; }
@keyframes dropIn { 0% { transform: translateY(-40px) scale(0.6); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(0) scale(1); opacity: 0; } }
.art-accrue .fill { animation: fillUp 2.2s var(--ease) infinite; transform-origin: bottom; transform-box: fill-box; }
@keyframes fillUp { 0% { transform: scaleY(0.3); } 70% { transform: scaleY(1); } 100% { transform: scaleY(1); } }
.art-cheer .hand { stroke-dasharray: 60; stroke-dashoffset: 60; animation: clockHand 3s linear infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes clockHand { to { transform: rotate(360deg); } }
.art-cheer .ring { stroke-dasharray: 100; stroke-dashoffset: 100; animation: ringFill 3s linear infinite; }
@keyframes ringFill { to { stroke-dashoffset: 0; } }
.art-cheer .line { animation: chatPop 3s var(--ease-out) infinite; transform-box: fill-box; transform-origin: left center; }
@keyframes chatPop { 0%, 88% { opacity: 0; transform: translateX(-6px) scale(0.96); } 94%, 100% { opacity: 1; transform: none; } }
.art-cheer .line.old { animation: none; opacity: 0.55; }

/* ---------- Leaderboard ---------- */
.lb-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .lb-grid { grid-template-columns: 1.2fr 0.8fr; } }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.segmented { position: relative; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { position: relative; z-index: 1; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); transition: color var(--dur); }
.segmented button[aria-pressed="true"] { color: var(--inverse-fg); }
.segmented .seg-pill { position: absolute; top: 3px; left: 3px; height: 30px; border-radius: 8px; background: var(--inverse); transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out); }
.lb-list { display: grid; gap: 6px; }
.lb-row {
  display: grid; grid-template-columns: 28px 40px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; position: relative; overflow: hidden;
  transition: background-color var(--dur), transform 0.3s var(--ease);
}
.lb-row:hover { background: var(--surface-2); transform: translateX(3px); }
.lb-row .rank { font-family: var(--mono); font-size: 0.8rem; color: var(--muted-2); text-align: center; }
.lb-list > :nth-child(-n+3) .rank { color: var(--fg); font-weight: 700; }
.lb-row .name { font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-row .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Keep the name/ticker whole; only the secondary line truncates. */
.lb-row .name > span:first-child { flex-shrink: 0; max-width: 60%; }
.lb-row .name .sub { flex: 1 1 auto; min-width: 0; }
.lb-row .sub { font-size: 0.78rem; color: var(--muted-2); font-weight: 400; }
.lb-row .val { font-family: var(--mono); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-row .val small { display: block; font-size: 0.72rem; color: var(--muted-2); font-weight: 400; }
.lb-row .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--fg); opacity: 0.35; width: 0; transition: width 1s var(--ease-out); }
.lb-coin-row { grid-template-columns: 28px 40px 1fr auto; }
.coin-tile { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); flex: none; }
.coin-tile svg, .coin-tile img { width: 100%; height: 100%; }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 28px; }
@media (min-width: 900px) { .calc { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.calc-controls { display: grid; gap: 28px; }
.calc-result { text-align: center; padding: 40px 24px; }
.calc-result .big { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 700; letter-spacing: -0.03em; }
.calc-result .big .odo { font-family: var(--font); }
.calc-result .big .odo-digit { width: 0.62em; }
.calc-result .unit { color: var(--muted); font-size: 1rem; margin-top: 6px; }
.calc-result .sub { color: var(--muted-2); font-family: var(--mono); font-size: 0.85rem; margin-top: 14px; }
.calc-note { font-size: 0.8rem; color: var(--muted-2); margin-top: 18px; max-width: 360px; margin-inline: auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; text-align: left; font-weight: 600; font-size: 1.05rem;
  transition: color var(--dur);
}
.faq-q:hover { color: var(--fg); }
.faq-q .plus { width: 28px; height: 28px; flex: none; border: 1px solid var(--border-2); border-radius: 50%; display: grid; place-items: center; position: relative; transition: transform 0.4s var(--ease), background-color var(--dur), border-color var(--dur); }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: currentColor; transition: transform 0.4s var(--ease); }
.faq-q .plus::before { width: 12px; height: 1.5px; }
.faq-q .plus::after { width: 1.5px; height: 12px; }
.faq-q[aria-expanded="true"] .plus { transform: rotate(45deg); background: var(--inverse); border-color: var(--inverse); color: var(--inverse-fg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--muted); padding: 0 4px 22px; max-width: 640px; }
.faq-a.open { grid-template-rows: 1fr; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted-2); font-size: 0.85rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-start; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--fg); }
.footer .disclaimer { width: 100%; max-width: 640px; }

/* ---------- App: link flow ---------- */
.app-layout { display: grid; gap: 32px; padding: 40px 0 96px; }
@media (min-width: 900px) { .app-layout { grid-template-columns: 240px 1fr; gap: 48px; padding: 64px 0 120px; } }
.rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 900px) { .rail { flex-direction: column; gap: 0; position: sticky; top: 88px; overflow: visible; } }
.rail-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted-2); font-size: 0.9rem; font-weight: 500; white-space: nowrap; transition: color var(--dur), background-color var(--dur); position: relative; }
@media (min-width: 900px) { .rail-item { padding: 12px 12px 12px 8px; } .rail-item + .rail-item::before { content: ""; position: absolute; left: 21px; top: -14px; height: 14px; width: 1px; background: var(--border-2); } }
.rail-item .dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-2); display: grid; place-items: center; font-family: var(--mono); font-size: 0.72rem; flex: none; transition: all 0.35s var(--ease); background: var(--bg); }
.rail-item .dot svg { width: 12px; height: 12px; display: none; }
.rail-item.is-active { color: var(--fg); }
.rail-item.is-active .dot { border-color: var(--fg); box-shadow: 0 0 0 4px var(--glow); }
.rail-item.is-done { color: var(--fg-2); }
.rail-item.is-done .dot { background: var(--inverse); color: var(--inverse-fg); border-color: var(--inverse); }
.rail-item.is-done .dot span { display: none; }
.rail-item.is-done .dot svg { display: block; }
.rail-item.is-done { cursor: pointer; }
.rail-item.is-done:hover { background: var(--surface-2); }

.panel { display: none; }
.panel.is-active { display: block; animation: panelIn 0.45s var(--ease-out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel-head { margin-bottom: 28px; }
.panel-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.panel-head p { margin-top: 8px; color: var(--muted); }
.panel-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }

.coin-card { display: grid; gap: 16px; margin-top: 20px; }
.coin-card.is-loaded { animation: coinIn 0.6s var(--ease-out) both; }
@keyframes coinIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.coin-head { display: flex; align-items: center; gap: 16px; }
.coin-head .coin-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.coin-head .coin-ticker { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }
.coin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .coin-stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat .k, .stat .v { display: block; }
.stat .k { font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .v { font-family: var(--mono); font-weight: 600; margin-top: 4px; font-size: 0.95rem; }
.stat-inline { display: flex; align-items: baseline; gap: 6px; }

.results { position: relative; margin-top: 8px; display: grid; gap: 4px; padding: 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); max-height: 360px; overflow-y: auto; }
.results[hidden] { display: none; }
.result-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background-color var(--dur); text-align: left; width: 100%; }
.result-item:hover, .result-item[aria-selected="true"] { background: var(--surface-2); }
.result-item .meta { min-width: 0; flex: 1; }
.result-item .nm { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.result-item .fl { font-size: 0.8rem; color: var(--muted-2); }
.result-empty { padding: 16px; color: var(--muted-2); text-align: center; font-size: 0.9rem; }
.selected-streamer { display: flex; align-items: center; gap: 14px; margin-top: 20px; }

.warning {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--border-2); background: var(--surface-2);
  margin-top: 24px;
}
.warning svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.warning strong { display: block; margin-bottom: 4px; }
.warning p { color: var(--muted); font-size: 0.9rem; }
.check-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); cursor: pointer; }
.split-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.split-preview .stat .v { font-size: 1.2rem; }
.split-bar { height: 8px; border-radius: 8px; background: var(--border-2); overflow: hidden; margin-top: 12px; }
.split-bar i { display: block; height: 100%; background: var(--fg); width: 0; transition: width 0.4s var(--ease-out); }

.result-hero { text-align: center; padding: 36px 24px; position: relative; overflow: hidden; }
.result-hero .gem-big { width: 88px; height: 88px; margin: 0 auto 16px; animation: gemDrop 0.9s var(--ease-out) both; }
@keyframes gemDrop { from { opacity: 0; transform: translateY(-30px) scale(0.6) rotate(-12deg); } 60% { transform: translateY(4px) scale(1.04); } to { opacity: 1; transform: none; } }
.result-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.result-hero .vault { margin-top: 22px; display: grid; gap: 10px; justify-items: center; }
.vault-addr { font-family: var(--mono); font-size: clamp(0.72rem, 2.2vw, 0.95rem); word-break: break-all; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--border-2); background: var(--surface-2); max-width: 100%; }
.checklist { counter-reset: step; display: grid; gap: 14px; margin-top: 8px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-2); display: grid; place-items: center; font-family: var(--mono); font-size: 0.75rem; flex: none; }
.checklist li p { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.share-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); margin-top: 8px; }
.share-card .url { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.two-col { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- Channel page ---------- */
.channel-head { display: grid; gap: 28px; padding: 40px 0 28px; }
@media (min-width: 900px) { .channel-head { grid-template-columns: 1fr auto; align-items: center; padding: 64px 0 36px; } }
.channel-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.channel-id .avatar { width: 84px; height: 84px; }
.channel-id h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.channel-id .handle { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.channel-id .handle a:hover { color: var(--fg); text-decoration: underline; }
.channel-total { display: grid; gap: 4px; }
@media (min-width: 900px) { .channel-total { text-align: right; justify-items: end; } }
.channel-total .k { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.channel-total .big { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.035em; display: flex; align-items: baseline; gap: 10px; }
.channel-total .big .odo { font-family: var(--font); }
.channel-total .big .odo-digit { width: 0.62em; }
.channel-total .big .unit { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.channel-total .sub { font-family: var(--mono); font-size: 0.85rem; color: var(--muted-2); }

.callout { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.callout strong { display: block; margin-bottom: 2px; }
.callout p { color: var(--muted); font-size: 0.9rem; }

.channel-grid { display: grid; gap: 20px; padding: 24px 0 96px; }
@media (min-width: 960px) { .channel-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.link-cards { display: grid; gap: 12px; }
.link-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.link-card .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.link-card .who .nm { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-card .who .sb { font-size: 0.8rem; color: var(--muted-2); font-family: var(--mono); }
.link-card .msg { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; }
.link-card .msg b { color: var(--fg); }
.window-stats { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.window-stats b { color: var(--fg); font-family: var(--mono); font-weight: 600; }
.window-stats .carry { color: var(--muted-2); font-size: 0.78rem; width: 100%; }

.countdown { position: relative; width: 96px; height: 96px; display: grid; place-items: center; flex: none; text-align: center; }
.countdown svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.countdown circle { fill: none; stroke-width: 4; }
.countdown .track { stroke: var(--border-2); }
.countdown .prog { stroke: var(--fg); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.countdown .inner { position: relative; display: grid; gap: 1px; }
.countdown .time { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; line-height: 1; }
.countdown .lbl { font-size: 0.58rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.12em; }
.countdown.is-firing .prog { transition: none; stroke-dashoffset: 0 !important; }
.countdown.is-firing .inner { animation: numberPop 0.6s var(--ease-out); }
.countdown.is-firing::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--fg); animation: ping 0.9s var(--ease-out) forwards; }

.chat { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.04em; }
.chat-head .live-dot { margin-left: auto; }
.chat-lines { display: grid; gap: 2px; padding: 10px 8px; max-height: 540px; overflow-y: auto; align-content: start; }
.chat-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; font-size: 0.9rem; line-height: 1.45; }
.chat-line:hover { background: var(--surface-2); }
.chat-line.is-new { animation: chatIn 0.5s var(--ease-out) both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); background: var(--surface-3); } }
.chat-line .ts { font-family: var(--mono); font-size: 0.72rem; color: var(--muted-2); padding-top: 4px; flex: none; }
.chat-line .badge-bot { font-size: 0.55rem; height: 16px; padding: 0 5px; margin-top: 3px; flex: none; letter-spacing: 0.08em; }
.chat-line .user { font-weight: 700; flex: none; }
.chat-line.system { color: var(--muted-2); font-size: 0.8rem; font-style: italic; }
.chat-line .user::after { content: ":"; font-weight: 400; color: var(--muted); }
.chat-line .text { color: var(--fg-2); overflow-wrap: anywhere; min-width: 0; }
.chat-line .text .tick { font-family: var(--mono); font-weight: 600; color: var(--fg); }
.chat-line.viewer .user { color: var(--muted); }
.chat-line.viewer .text { color: var(--muted); }
.cheermote { display: inline-flex; align-items: center; gap: 5px; vertical-align: -3px; font-weight: 800; padding: 1px 7px 1px 4px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--border-2); margin-right: 5px; font-variant-numeric: tabular-nums; }
.cheermote svg { width: 15px; height: 15px; }
.chat-line.is-new .cheermote svg { animation: cheerGem 0.8s var(--ease-out) both; transform-origin: center; }
@keyframes cheerGem { 0% { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
.chat-empty { padding: 28px; text-align: center; color: var(--muted-2); font-size: 0.9rem; }
.chat-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--muted-2); }
.not-found { text-align: center; padding: 96px 0; }
.not-found .gem-big { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.5; }

/* ---------- Misc ---------- */
.fx-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 950; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.8rem; color: var(--muted); transition: all var(--dur); cursor: pointer; }
.chip:hover { color: var(--fg); border-color: var(--border-2); transform: translateY(-1px); }
.gem { display: inline-block; }
.pulse-ring { position: relative; }
.number-pop { animation: numberPop 0.5s var(--ease-out); }
@keyframes numberPop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur), border-color var(--dur); font-size: 0.925rem; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 1.05rem; }
.cta-band { text-align: center; padding: 64px 24px; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(circle at 50% 120%, var(--glow), transparent 55%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band .row { justify-content: center; margin-top: 24px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  html.js body { animation: none; opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; }
  .odo-col { transition: none; }
  .gem-float, .gem-glow { animation: none; }
  .live-dot::after { display: none; }
  .skeleton::after { display: none; }
  .btn-primary::after { display: none; }
  .countdown .prog { transition: none; }
  .countdown.is-firing::after { display: none; }
  .lb-row:hover { transform: none; }
}
