/* ======================================================================
   Thub — warm-black design system
   Inspired by Linear, Vercel, Arc. Orange accent kept, palette warmed.
   ====================================================================== */

:root {
  --bg-0:       #0B0A09;
  --bg-1:       #141210;
  --bg-2:       #1C1A17;
  --bg-3:       #252220;
  --border:     #2A2623;
  --border-hi:  #3A342F;

  --text-hi:    #F5F1EB;
  --text-md:    #A8A09A;
  --text-lo:    #6B635E;

  --accent:     #FF6A00;
  --accent-hi:  #FF8A2C;
  --accent-dim: rgba(255, 106, 0, 0.15);
  --accent-glow:rgba(255, 106, 0, 0.45);

  --ok:         #4ADE80;
  --warn:       #F5A524;
  --bad:        #F43F5E;
  --cold:       #7DD3FC;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
  --shadow-md:  0 4px 20px -4px rgba(0,0,0,.6);
  --shadow-glow:0 0 0 3px var(--accent-dim), 0 0 24px -4px var(--accent-glow);

  --ease-out:   cubic-bezier(.2,.8,.2,1);
  --dur-fast:   120ms;
  --dur-mid:    220ms;
  --dur-slow:   400ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg-0);
  color: var(--text-hi);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Subtle noise texture */
  background-image:
    radial-gradient(circle at 90% -10%, rgba(255,106,0,.05), transparent 50%),
    radial-gradient(circle at -10% 100%, rgba(125,211,252,.03), transparent 40%);
}

.mono, code, pre {
  font-family: "Geist Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  font-variant-ligatures: none;
}

a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--accent-hi); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(20, 18, 16, .78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
nav { display: flex; align-items: center; gap: 6px; }
nav a {
  color: var(--text-md);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
nav a:hover { color: var(--text-hi); background: var(--bg-2); }
.user { color: var(--text-lo); padding: 0 10px; font-size: 13px; }

/* ---------- Main ---------- */
main { padding: 40px 28px; max-width: 1280px; margin: 0 auto; }

.hero { text-align: center; padding: 80px 20px 40px; }
.hero h1 {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-hi);
  margin: 0 0 16px;
}
.hero p { color: var(--text-md); margin: 0 0 32px; font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #1a0c00;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-ghost {
  background: transparent;
  color: var(--text-hi);
  border: 1px solid var(--border-hi);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--accent); color: var(--accent); }

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent);
  color: #1a0c00;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-sm:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn-sm:active { transform: scale(.96); }
.btn-sm.copied { background: var(--ok); color: #062e12; }
.btn-sm.danger { background: var(--bad); color: #3b0a13; }
.btn-sm.danger:hover { background: #ff5670; }

/* ---------- Search bar ---------- */
.search-hero {
  padding: 80px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.search-hero h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}
.search-hero .subtitle { color: var(--text-md); margin: 0; }

.searchbar-dock {
  position: sticky;
  top: 58px;
  z-index: 40;
  background: rgba(11, 10, 9, .78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  margin: -40px -28px 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}
.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.searchbar.hero-mode {
  flex-direction: column;
  max-width: 640px;
  width: 100%;
  gap: 12px;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  width: 100%;
}
.search-input-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8A09A' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.searchbar input[type="search"] {
  width: 100%;
  background: var(--bg-1);
  color: var(--text-hi);
  border: 1px solid var(--border);
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.searchbar.hero-mode input[type="search"] {
  font-size: 18px;
  padding: 18px 20px 18px 48px;
  border-radius: var(--radius-lg);
}
.searchbar.hero-mode .search-input-wrap::before {
  left: 18px; width: 20px; height: 20px;
}
.searchbar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: var(--bg-1);
}
.searchbar input[type="search"]::placeholder { color: var(--text-lo); }

/* ---------- Category pills ---------- */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-1);
  color: var(--text-md);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
}
.pill:hover { background: var(--bg-2); color: var(--text-hi); border-color: var(--border-hi); }
.pill.active {
  background: var(--accent-dim);
  color: var(--accent-hi);
  border-color: var(--accent);
}

.pills-sub {
  margin-top: 6px;
  padding-left: 20px;
  border-left: 2px solid var(--accent-dim);
}
.pill-sub {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 400;
  background: transparent;
}
.pill-sub.active {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}

/* ---------- Result meta bar ---------- */
.meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 12px;
  font-size: 13px;
  color: var(--text-md);
}
.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-md);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.sort-chip:hover { border-color: var(--border-hi); color: var(--text-hi); }
.sort-chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.sort-chip .caret { opacity: .6; font-size: 10px; }

/* ---------- Results table ---------- */
.results {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.results thead th {
  background: var(--bg-1);
  color: var(--text-lo);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.results thead th.sortable { cursor: pointer; transition: color var(--dur-fast) var(--ease-out); }
.results thead th.sortable:hover { color: var(--text-md); }
.results thead th.active { color: var(--accent); }
.results thead th .caret { opacity: .6; margin-left: 4px; }
.results tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
  vertical-align: middle;
}
.results tbody tr {
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  animation: fadeInRow var(--dur-mid) var(--ease-out) both;
}
@keyframes fadeInRow { from { opacity: 0; } to { opacity: 1; } }
.results tbody tr:hover { background: var(--bg-2); }
.results tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.results tbody tr:last-child td { border-bottom: 0; }
.results td.title {
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.results td.title a {
  color: var(--text-hi);
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out);
}
.results td.title a:hover { color: var(--accent); }
.results td.cat-cell { white-space: nowrap; }

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--bg-3);
  color: var(--text-md);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cat-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cold);
}
.cat-badge.movie   .dot { background: #f97316; }
.cat-badge.tv      .dot { background: #a78bfa; }
.cat-badge.audio   .dot { background: #f472b6; }
.cat-badge.anim    .dot { background: #fb7185; }
.cat-badge.game    .dot { background: #4ade80; }
.cat-badge.app     .dot { background: #60a5fa; }
.cat-badge.book    .dot { background: #fbbf24; }

.seed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(74, 222, 128, .08);
  color: var(--ok);
  border: 1px solid rgba(74, 222, 128, .2);
}
.seed-pill.warn  { background: rgba(245,165,36,.08); color: var(--warn); border-color: rgba(245,165,36,.2); }
.seed-pill.dead  { background: rgba(244,63,94,.08); color: var(--bad); border-color: rgba(244,63,94,.2); }
.leech-num { color: var(--text-lo); font-size: 11px; font-variant-numeric: tabular-nums; }

.size-cell { font-variant-numeric: tabular-nums; color: var(--text-md); white-space: nowrap; }
.completed-cell { color: var(--text-lo); font-size: 12px; font-variant-numeric: tabular-nums; }

.src-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-lo);
  background: var(--bg-3);
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}
.src-badge.src-ygg        { color: #FF6A00; background: rgba(255,106,0,0.10); }
.src-badge.src-fitgirl    { color: #EC4899; background: rgba(236,72,153,0.10); }
.src-badge.src-skidrowreloaded { color: #22D3EE; background: rgba(34,211,238,0.10); }
.src-badge.src-dodi       { color: #A78BFA; background: rgba(167,139,250,0.12); }
.src-badge.src-prowlarr   { color: #4ADE80; background: rgba(74,222,128,0.10); }

.age-label {
  display: inline-block;
  font-size: 11px;
  color: var(--text-lo);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.invite-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.invite-link-box input {
  flex: 1;
  min-width: 360px;
  padding: 6px 10px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--accent-dim, rgba(255,106,0,0.2));
  border-radius: 4px;
  color: var(--accent, #FF6A00);
  cursor: pointer;
}
.invite-link-box .copy-hint {
  font-size: 10px;
  color: var(--text-lo);
  white-space: nowrap;
}

.safety-pill {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  margin-left: 6px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: help;
}
.safety-pill.sf-safe {
  color: var(--ok, #4ADE80);
  background: rgba(74, 222, 128, 0.10);
  border-color: rgba(74, 222, 128, 0.25);
}
.safety-pill.sf-ok {
  color: var(--text-md);
  background: var(--bg-3);
}
.safety-pill.sf-warn {
  color: var(--warn, #F5A524);
  background: rgba(245, 165, 36, 0.10);
  border-color: rgba(245, 165, 36, 0.3);
}
.safety-pill.sf-bad {
  color: var(--bad, #F43F5E);
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  font-weight: 700;
}

.safety-detail { margin: 14px 0 22px; }
.safety-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.safety-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(.4,.0,.2,1);
}
.safety-bar-fill.sf-safe { background: linear-gradient(90deg, #4ADE80, #22C55E); }
.safety-bar-fill.sf-ok   { background: linear-gradient(90deg, #A8A09A, #6B635E); }
.safety-bar-fill.sf-warn { background: linear-gradient(90deg, #F5A524, #EAB308); }
.safety-bar-fill.sf-bad  { background: linear-gradient(90deg, #F43F5E, #E11D48); }

.safety-flags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sf-flag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--text-md);
  font-family: var(--font-mono, monospace);
}
.sf-flag-good { color: #4ADE80; background: rgba(74,222,128,0.08); }
.sf-flag-warn { color: #F5A524; background: rgba(245,165,36,0.08); }
.sf-flag-bad  { color: #F43F5E; background: rgba(244,63,94,0.10); }

.right { text-align: right; }

/* ---------- Pager ---------- */
.pager {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  margin: 32px 0 16px;
  color: var(--text-md);
  font-size: 13px;
}
.pager a {
  color: var(--text-hi);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: all var(--dur-fast) var(--ease-out);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Gate (login/register) ---------- */
body.gate {
  display: flex;
  min-height: 100vh;
  margin: 0;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255,106,0,.08), transparent 60%);
}
.gate-main { width: 100%; }
.auth-box {
  max-width: 400px;
  margin: 40px auto;
  padding: 36px 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.auth-box h2 {
  margin: 0 0 4px;
  color: var(--text-hi);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.auth-box label {
  display: block;
  margin: 18px 0 6px;
  font-size: 12px;
  color: var(--text-md);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-box input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-0);
  color: var(--text-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.auth-box input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-glow); }
.auth-box button { margin-top: 24px; width: 100%; justify-content: center; }
.auth-box .muted { margin-top: 20px; text-align: center; color: var(--text-lo); font-size: 13px; }
.muted { color: var(--text-md); font-size: 13px; }

.error {
  background: rgba(244, 63, 94, .08);
  color: #fda4af;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid rgba(244, 63, 94, .2);
}

/* ---------- Detail page ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr; } }

.poster {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
}
.poster::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
}
.poster .label {
  position: relative; z-index: 1;
  color: rgba(255,255,255,.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-side { display: flex; flex-direction: column; gap: 16px; }
.detail-side .btn { justify-content: center; }
.detail-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.detail-meta dt { color: var(--text-lo); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; align-self: center; }
.detail-meta dd { margin: 0; color: var(--text-hi); font-variant-numeric: tabular-nums; word-break: break-all; }
.detail-meta dd.mono { font-size: 12px; }

.detail-main h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.detail-main .chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 16px;
  color: var(--text-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-fast) var(--ease-out);
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
}
.tab:hover { color: var(--text-hi); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; animation: fadeIn var(--dur-mid) var(--ease-out); }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.file-tree {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.file-tree .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.file-tree .row:last-child { border-bottom: 0; }
.file-tree .row:hover { background: var(--bg-2); }
.file-tree .name { color: var(--text-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.file-tree .size { color: var(--text-lo); font-variant-numeric: tabular-nums; white-space: nowrap; }

.desc-body {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  line-height: 1.7;
  color: var(--text-hi);
  font-size: 14px;
}
.desc-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; display: block; }
.desc-body a { word-break: break-all; }
.desc-body blockquote { margin: 12px 0; padding: 8px 14px; border-left: 2px solid var(--accent); color: var(--text-md); background: var(--bg-0); }
.desc-body pre { background: var(--bg-0); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; }
.desc-body details.spoiler { margin: 10px 0; padding: 10px 14px; background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.desc-body details.spoiler summary { cursor: pointer; color: var(--text-md); font-weight: 500; }
.desc-body ul { padding-left: 20px; }

.tracker-list { list-style: none; padding: 0; margin: 0; }
.tracker-list li {
  padding: 8px 14px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-md);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  word-break: break-all;
}

.magnet-box {
  display: flex;
  gap: 8px;
}
.magnet-box input {
  flex: 1;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  padding: 8px 12px;
  background: var(--bg-0);
  color: var(--text-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.related-card {
  display: block;
  padding: 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out);
  color: var(--text-hi);
}
.related-card:hover { border-color: var(--accent); background: var(--bg-2); transform: translateY(-2px); }
.related-card .t { font-size: 13px; font-weight: 500; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-card .m { color: var(--text-lo); font-size: 11px; display: flex; gap: 10px; }

.breadcrumb {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-md);
}
.breadcrumb a { color: var(--text-md); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Admin ---------- */
.admin-section {
  margin: 24px 0;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-section h3 { margin-top: 0; color: var(--text-hi); font-weight: 600; letter-spacing: -0.01em; }
.inline-form { display: inline-flex; gap: 8px; margin: 0; }
.inline-form input[type="text"] {
  background: var(--bg-0);
  color: var(--text-hi);
  border: 1px solid var(--border);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  min-width: 240px;
  font-family: inherit;
}

code {
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
}

/* ---------- Skeleton / shimmer ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
  color: transparent;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Motion helpers ---------- */
.fade-in-up {
  animation: fadeInUp var(--dur-mid) var(--ease-out) both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Admin stats */
.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-card {
  background: var(--surface, #1a1a1e); border: 1px solid var(--border, #2a2a30);
  border-radius: 10px; padding: 14px 18px; min-width: 130px;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--accent, #ff9a55); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-lo, #8a8a92); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-title { margin: 16px 0 6px; font-size: 13px; color: var(--text-lo, #8a8a92); font-weight: 500; }
.bars-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 80px; padding: 4px 0; border-bottom: 1px solid var(--border, #2a2a30);
  margin-bottom: 18px;
}
.bars-chart.bars-wide { gap: 6px; height: 90px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 10px; }
.bar { width: 100%; background: linear-gradient(180deg, #ff9a55, #ff6a2a); border-radius: 2px 2px 0 0; transition: height 0.3s ease; }
.bar-alt { background: linear-gradient(180deg, #5aa0ff, #2a6adf); }
.bar-alt2 { background: linear-gradient(180deg, #c58dff, #8842d4); }
.bar-label { font-size: 9px; color: var(--text-lo, #8a8a92); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Invite greeting */
.invite-greeting {
  text-align: center; font-size: 20px; font-weight: 600;
  margin: 0 0 12px; color: var(--text, #eaeaf0);
}
.invite-greeting strong { color: var(--accent, #ff9a55); }

/* Publié column */
.age-cell { font-size: 12px; color: var(--text-lo, #8a8a92); white-space: nowrap; font-variant-numeric: tabular-nums; }
