/* JewHack.cc — shared styles
   Tailwind via CDN does the heavy lifting. This file:
   - Loads webfonts
   - Defines design tokens as CSS vars
   - Defines reusable components: card, btn, btn-danger, btn-soft, status badge, toggle pill,
     stat tile, flash banner, table, input — usable from any page.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined');

:root {
  --bg:        #09090b;
  --panel:     #0f0f12;
  --panel-2:   #18181b;
  --panel-3:   #1f1f23;
  --border:    #27272a;
  --border-soft:#1f1f23;
  --accent:    #facc15;
  --accent-hi: #fde047;
  --accent-lo: #ca8a04;
  --success:   #22c55e;
  --danger:    #ef4444;
  --warn:      #f59e0b;
  --info:      #38bdf8;
  --text:      #e4e4e7;
  --text-dim:  #a1a1aa;
  --text-mute: #71717a;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.font-sans { font-family: 'Inter', system-ui, sans-serif; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  font-size: 20px;
  line-height: 1;
  vertical-align: -3px;
}
.icon-sm { font-size: 16px; vertical-align: -2px; }
.icon-lg { font-size: 24px; vertical-align: -5px; }
.icon-xl { font-size: 36px; vertical-align: -8px; }

/* ─── Card ─────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.card-pad   { padding: 1.25rem; }
.card-pad-lg{ padding: 1.75rem; }
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
}
.card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.card-title .material-symbols-outlined { color: var(--text-mute); font-size: 16px; }

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: 6px;
  background: var(--accent);
  color: #09090b;
  border: 1px solid var(--accent-hi);
  cursor: pointer;
  transition: background .12s ease, transform .04s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] {
  background: #3f3f46; color: #a1a1aa; border-color: #3f3f46; cursor: not-allowed;
}
.btn .material-symbols-outlined { color: #09090b; font-size: 18px; }

.btn-danger {
  background: var(--danger); color: #fff; border-color: #f87171;
}
.btn-danger:hover { background: #dc2626; }
.btn-danger .material-symbols-outlined { color: #fff; }

.btn-soft {
  background: var(--panel-2); color: var(--text); border-color: var(--border);
}
.btn-soft:hover { background: var(--panel-3); border-color: #3f3f46; }
.btn-soft .material-symbols-outlined { color: var(--text-dim); font-size: 18px; }

.btn-ghost {
  background: transparent; color: var(--text-dim); border-color: transparent;
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }
.btn-ghost .material-symbols-outlined { color: inherit; font-size: 18px; }

.btn-sm { padding: 0.4375rem 0.75rem; font-size: 0.8125rem; }
.btn-sm .material-symbols-outlined { font-size: 16px; }

.btn-block { width: 100%; }

/* ─── Inputs ───────────────────────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  background: #0a0a0d;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: border-color .12s, background .12s;
}
.input.mono, .textarea.mono { font-family: 'JetBrains Mono', monospace; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  background: #0c0c10;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.textarea { resize: vertical; min-height: 6rem; }

.input-group { position: relative; }
.input-group .input-prefix {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-mute); font-family: 'JetBrains Mono', monospace; pointer-events: none;
  font-size: 0.8125rem;
}
.input-group .input.with-prefix { padding-left: 1.75rem; }

/* Hide number-input spinners */
.no-spin::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.no-spin { -moz-appearance: textfield; appearance: textfield; }

/* Hide native number spinners on every .input[type="number"] (opt-out via .show-spin if ever needed) */
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* File input — theme the wrapper and the browser-rendered upload button */
.input[type="file"] {
  padding: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.6;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}
.input[type="file"]::file-selector-button {
  background: var(--panel-2);
  color: var(--text);
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 5px 0 0 5px;
  padding: 0.625rem 0.875rem;
  margin: 0 0.75rem 0 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.input[type="file"]::file-selector-button:hover { background: var(--panel-3); }
.input[type="file"]::-webkit-file-upload-button {
  background: var(--panel-2);
  color: var(--text);
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 5px 0 0 5px;
  padding: 0.625rem 0.875rem;
  margin: 0 0.75rem 0 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.input[type="file"]::-webkit-file-upload-button:hover { background: var(--panel-3); }
.input[type="file"].compact-input { padding: 0; }
.input[type="file"].compact-input::file-selector-button {
  padding: 0.4375rem 0.75rem;
  font-size: 0.75rem;
  margin-right: 0.625rem;
}
.input[type="file"].compact-input::-webkit-file-upload-button {
  padding: 0.4375rem 0.75rem;
  font-size: 0.75rem;
  margin-right: 0.625rem;
}

/* Styled checkbox pill */
.check-pill {
  display: inline-flex; align-items: center; gap: 0.4375rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--border);
  background: #0a0a0d;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition: border-color .12s, color .12s;
}
.check-pill:hover { border-color: #3f3f46; color: var(--text); }
.check-pill input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.check-pill input[type=checkbox]:checked {
  background: var(--danger); border-color: var(--danger);
}
.check-pill input[type=checkbox]:checked::after {
  content: "\2713";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  font-family: 'Inter', system-ui, sans-serif;
}
.check-pill:has(input:checked) { border-color: rgba(239,68,68,.4); color: #fca5a5; }

.label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.5rem;
}

/* ─── Status badge ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
  display: inline-block;
}
.badge-dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50%     { opacity: 0.7; box-shadow: 0 0 0 4px transparent; }
}

.badge-success { color: #4ade80; border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.08); }
.badge-warn    { color: #facc15; border-color: rgba(250,204,21,.25); background: rgba(250,204,21,.08); }
.badge-danger  { color: #f87171; border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.08); }
.badge-info    { color: #38bdf8; border-color: rgba(56,189,248,.25); background: rgba(56,189,248,.08); }
.badge-mute    { color: var(--text-mute); }
.badge-accent  { color: var(--accent); border-color: rgba(250,204,21,.3); background: rgba(250,204,21,.1); }

/* ─── Toggle pill group ────────────────────────────────────────── */
.toggle-group {
  display: inline-flex;
  background: #0a0a0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.toggle-group input { display: none; }
.toggle-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4375rem 0.875rem;
  border-radius: 4px;
  color: var(--text-mute);
  cursor: pointer;
  transition: background .12s, color .12s;
  user-select: none;
}
.toggle-group label:hover { color: var(--text-dim); }
.toggle-group input:checked + label,
.toggle-group label.active {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.5);
}
.toggle-group label.active.is-accent { color: var(--accent); }

/* ─── Stat tile ────────────────────────────────────────────────── */
.stat {
  background: linear-gradient(180deg, #131316 0%, #0d0d10 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.125rem;
  display: flex; flex-direction: column; gap: 0.375rem;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex; align-items: center; gap: 0.375rem;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.stat-value.accent { color: var(--accent); }
.stat-value.success { color: #4ade80; }
.stat-value.danger { color: #f87171; }
.stat-sub { font-size: 0.75rem; color: var(--text-mute); }

/* ─── Flash banner ─────────────────────────────────────────────── */
.flash {
  display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid;
  font-size: 0.875rem;
  line-height: 1.4;
}
.flash-success {
  background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.25); color: #86efac;
}
.flash-error {
  background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.25); color: #fca5a5;
}
.flash-info {
  background: rgba(56,189,248,.06); border-color: rgba(56,189,248,.25); color: #7dd3fc;
}
.flash-warn {
  background: rgba(250,204,21,.06); border-color: rgba(250,204,21,.25); color: #fde047;
}
.flash .material-symbols-outlined { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ─── Table ────────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: left;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.01);
}
.tbl tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(255,255,255,.015); }
.tbl .num { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.tbl-dense thead th { padding: 0.5rem 0.875rem; }
.tbl-dense tbody td { padding: 0.5rem 0.875rem; }

/* ─── Avatar ───────────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #27272a, #18181b);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 0.75rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 0.625rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; border-width: 2px; }

/* role color tints — subtle ring */
.avatar.role-priv  { color: #fca5a5; border-color: rgba(239,68,68,.4); background: linear-gradient(135deg,#3f1d1d,#1f1212); }
.avatar.role-sub   { color: #fdba74; border-color: rgba(251,146,60,.4); background: linear-gradient(135deg,#3a1f0e,#1f1410); }
.avatar.role-std   { color: var(--text-dim); }

.role-priv { color: #f87171; }
.role-sub  { color: #fb923c; }
.role-std  { color: var(--text); }

/* ─── Logo / wordmark ──────────────────────────────────────────── */
.brand-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; }
.brand-mark.lg { width: 44px; height: 44px; }
.brand-mark.xl { width: 64px; height: 64px; }

@keyframes logo-spin-kf { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.logo-spin { animation: logo-spin-kf 10s linear infinite; }

.wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1rem;
}
.wordmark .accent { color: var(--accent); }
.wordmark .rest   { color: #fff; }

/* ─── Product card image placeholder ──────────────────────────── */
.product-img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #0a0a0d;
}
.product-img::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.product-img.rust    { background: radial-gradient(ellipse at 30% 30%, #3a1d0e 0%, #0a0a0d 70%); }
.product-img.spoofer { background: radial-gradient(ellipse at 70% 30%, #0e2a3a 0%, #0a0a0d 70%); }
.product-img.combo   { background: radial-gradient(ellipse at center, #3a2d0e 0%, #0a0a0d 70%); }
.product-img .material-symbols-outlined {
  font-size: 64px; color: rgba(255,255,255,.55); position: relative; z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.product-img-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.product-img:has(.product-img-photo) .product-img-icon { display: none; }
.product-img:has(.product-img-photo)::before { display: none; }
.product-img .corner-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
}
.product-img .price-tag {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(9,9,11,.75); backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem; border-radius: 4px;
  color: var(--accent);
}

/* ─── Section header (mono uppercase) ─────────────────────────── */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex; align-items: center; gap: 0.5rem;
}
.eyebrow::before {
  content: ">";
  color: var(--accent);
  font-weight: 600;
}
.eyebrow.no-prompt::before { content: none; }

/* ─── Divider ──────────────────────────────────────────────────── */
.hr {
  border: none; border-top: 1px solid var(--border-soft); margin: 1rem 0;
}

/* ─── Scrollbar (dark) ─────────────────────────────────────────── */
.scroll-area { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
.scroll-area::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-area::-webkit-scrollbar-track { background: transparent; }
.scroll-area::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
.scroll-area::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* ─── Tab bar (top-level: panel/gambling/suggestions/admin) ───── */
.tabbar {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .12s;
  text-decoration: none;
}
.tab:hover { color: var(--text-dim); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .material-symbols-outlined { font-size: 18px; }

/* ─── Internal/admin sub-tabs (pill-ish) ──────────────────────── */
.subtab-bar {
  display: inline-flex; gap: 4px;
  background: #0a0a0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  flex-wrap: wrap;
}
.subtab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.4375rem 0.75rem;
  border-radius: 4px;
  color: var(--text-mute);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.375rem;
  transition: color .12s, background .12s;
  text-decoration: none;
}
.subtab:hover { color: var(--text-dim); }
.subtab.active {
  background: var(--panel-2); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.subtab .material-symbols-outlined { font-size: 14px; }

/* ─── Chat widget ──────────────────────────────────────────────── */
#chat-widget {
  position: fixed; bottom: 16px; left: 16px;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
  display: flex; flex-direction: column;
  z-index: 40;
  transition: max-height .2s ease;
  overflow: hidden;
  max-height: 44px; /* collapsed */
}
#chat-widget.expanded { max-height: 460px; }
#chat-widget .chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  background: var(--panel-2);
}
#chat-widget.expanded .chat-head { border-bottom-color: var(--border); }
#chat-widget .chat-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
#chat-widget .chat-title .material-symbols-outlined { color: var(--accent); font-size: 16px; }
#chat-widget .chat-online {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--text-mute);
}
#chat-widget .chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 0.5rem 0.875rem;
  display: flex; flex-direction: column; gap: 0.375rem;
  font-size: 0.8125rem;
  min-height: 280px;
}
#chat-widget .chat-msg { line-height: 1.4; }
#chat-widget .chat-msg .name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.75rem;
}
#chat-widget .chat-msg .body { color: var(--text-dim); margin-left: 4px; word-wrap: break-word; }
#chat-widget .chat-form {
  display: flex; gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
}
#chat-widget .chat-form input {
  flex: 1; background: #0a0a0d; border: 1px solid var(--border);
  border-radius: 4px; padding: 0.4375rem 0.625rem;
  font-size: 0.8125rem; color: var(--text);
  font-family: 'Inter', sans-serif;
}
#chat-widget .chat-form input:focus { outline: none; border-color: var(--accent); }
#chat-widget .chat-form button {
  background: var(--accent); color: #09090b;
  border: none; border-radius: 4px;
  padding: 0 0.625rem;
  cursor: pointer;
  display: inline-flex; align-items: center;
}

@media (max-width: 640px) {
  #chat-widget { left: 8px; right: 8px; bottom: 8px; width: auto; }
}

/* ─── Top nav ──────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9,9,11,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}
.nav-meta {
  display: flex; align-items: center; gap: 0.875rem;
  font-size: 0.875rem;
}
.nav-meta-item {
  display: inline-flex; align-items: center; gap: 0.4375rem;
  color: var(--text-dim);
}
.nav-meta-item .num { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.nav-meta-item .material-symbols-outlined { color: var(--text-mute); font-size: 18px; }
.nav-divider { width: 1px; height: 18px; background: var(--border); }

/* mobile nav */
@media (max-width: 768px) {
  .nav-meta-desktop { display: none; }
}
@media (min-width: 769px) {
  .nav-meta-mobile { display: none; }
  .nav-burger { display: none; }
}
.nav-burger {
  background: var(--panel-2); border: 1px solid var(--border);
  width: 36px; height: 36px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim); cursor: pointer;
}
.mobile-drawer {
  display: none;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  flex-direction: column; gap: 0.5rem;
}
.mobile-drawer.open { display: flex; }
.mobile-drawer .item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  font-size: 0.875rem;
}

/* ─── Misc utilities used in pages ─────────────────────────────── */
.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--text-dim);
  background: var(--panel-2);
}
.divider-vert { width: 1px; background: var(--border); align-self: stretch; }

/* dot indicators */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-success { background: var(--success); box-shadow: 0 0 8px rgba(34,197,94,.5); }
.dot-danger  { background: var(--danger);  box-shadow: 0 0 8px rgba(239,68,68,.5); }
.dot-warn    { background: var(--warn);    box-shadow: 0 0 8px rgba(245,158,11,.4); }
.dot-mute    { background: #52525b; }
.dot-pulse   { animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 currentColor, 0 0 8px currentColor; }
  50%     { box-shadow: 0 0 0 4px transparent, 0 0 4px currentColor; }
}

/* tiny grid texture for hero bg */
.grid-bg {
  background-image:
    radial-gradient(rgba(250,204,21,.08) 1px, transparent 1px),
    radial-gradient(rgba(250,204,21,.04) 1px, transparent 1px);
  background-size: 32px 32px, 96px 96px;
  background-position: 0 0, 16px 16px;
}

/* coin */
.coin-stage { perspective: 1000px; }
.coin {
  width: 220px; height: 220px;
  position: relative; transform-style: preserve-3d;
  transition: transform 2.4s cubic-bezier(.22,.85,.34,1);
}
.coin-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 3rem;
  border: 4px solid;
  backface-visibility: hidden;
  letter-spacing: 0.05em;
}
.coin-face.heads {
  background: radial-gradient(circle at 35% 30%, #fde047, #facc15 40%, #ca8a04 90%);
  border-color: #713f12; color: #422006;
}
.coin-face.tails {
  background: radial-gradient(circle at 35% 30%, #d4d4d8, #a1a1aa 40%, #52525b 90%);
  border-color: #27272a; color: #18181b;
  transform: rotateY(180deg);
}
.coin.spin-heads { transform: rotateY(1800deg); }
.coin.spin-tails { transform: rotateY(1980deg); }
