:root {
  --bg: #0E1116;
  --bg-alt: #11151B;
  --surface: #151A21;
  --border: #232A34;
  --border-strong: #36404D;
  --text: #E8EAED;
  --text-soft: #C9CFD8;
  --muted: #9AA3B0;
  --gold: #D8C08A;
  --gold-hover: #EBD9AE;
  --gold-line: #5A4E32;
  --on-gold: #1A1608;
  --up: #3DBE93;
  --down: #EF6B76;
  --font-body: Inter, system-ui, sans-serif;
  --font-head: "Space Grotesk", Inter, sans-serif;
  --font-logo: "Great Vibes", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 600; line-height: 1.1; }
h2 { font-size: 24px; font-weight: 600; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) { .wrap { padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); } }
/* list-style pages were capped narrow; let them use more of the screen */
main.wrap > div[style*="max-width:760px"], main.wrap > div[style*="max-width:860px"], main.wrap > div[style*="max-width:900px"] { max-width: 1100px !important; }
main.wrap { flex: 1; padding-top: 32px; padding-bottom: 64px; }

/* top bar */
.topbar { border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.topbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; }
.logo { font-family: var(--font-logo); font-size: 44px; line-height: 1; color: var(--gold); text-decoration: none; }
.logo.small { font-size: 36px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 15px; }
.nav a { color: var(--text-soft); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a.active { color: var(--text); }
.account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* buttons */
.btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text); text-decoration: none; display: inline-block; text-align: center;
}
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--on-gold); }
.btn.small { font-size: 13px; padding: 7px 14px; }
.btn.on { border-color: var(--gold); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.link-btn { font: inherit; font-size: 14px; background: none; border: none; padding: 6px 0; cursor: pointer; color: var(--muted); }
.link-btn:hover { color: var(--text); }
.link-btn.liked { color: var(--gold); }

/* layout helpers */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.lg { gap: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.row.between { justify-content: space-between; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 3 1 520px; min-width: 0; }
.col-side { flex: 1 1 280px; min-width: 0; }
.muted { color: var(--muted); }
.soft { color: var(--text-soft); }
.small-text { font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.card.gold { border-color: var(--gold-line); }
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; text-decoration: none; color: var(--text); border-top: 1px solid var(--border); }
.list-item:first-child { border-top: none; }
a.list-item:hover { background: var(--bg-alt); color: var(--text); }
.hash { color: var(--gold); }

/* forms */
label { font-weight: 500; font-size: 14px; }
input:not([type]), input[type="search"], input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px 14px;
}
textarea { resize: vertical; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 6px; }
.form-error { color: var(--down); font-size: 14px; min-height: 1.2em; }
.form-ok { color: var(--up); font-size: 14px; }

/* tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); }
.tab.active { background: var(--border); border-color: var(--border-strong); color: var(--text); }

/* posts */
.post { display: flex; flex-direction: column; gap: 10px; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--border); color: var(--text-soft); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; text-transform: uppercase; }
.handle { font-weight: 600; color: var(--text); text-decoration: none; }
.handle:hover { color: var(--gold); }
.badge { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; color: var(--gold); border: 1px solid var(--gold-line); padding: 1px 8px; border-radius: 4px; text-transform: uppercase; }
.badge.kind { color: var(--muted); border-color: var(--border-strong); }
.badge.coin { text-decoration: none; }
.post-body { color: var(--text-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; padding-top: 4px; }
.post-actions a { font-size: 14px; color: var(--muted); text-decoration: none; }
.post-actions a:hover { color: var(--text); }
.permanent { margin-left: auto; font-size: 13px; color: var(--muted); }

/* chat */
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; height: min(70vh, 640px); }
.chat-head { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; }
.msg-text { min-width: 0; overflow-wrap: anywhere; color: var(--text-soft); }
.msg-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-time { font-size: 12px; color: var(--muted); }
.chat-form { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; }

/* coin chart */
.chart-box { height: 480px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* hero */
.hero { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.hero p { font-size: 18px; color: var(--muted); }

.footer { border-top: 1px solid var(--border); padding-top: 28px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.footer p { font-size: 14px; color: var(--muted); max-width: 460px; }

.notice { background: var(--surface); border: 1px solid var(--gold-line); border-radius: 10px; padding: 24px; }
.notice code { background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* notifications */
.tools { display: inline-flex; align-items: center; gap: 4px; padding-right: 10px; margin-right: 2px; border-right: 1px solid var(--border); }
.tool { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); text-decoration: none; font-size: 15px; padding: 8px 9px; border-radius: 6px; }
.tool:hover, .tool.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tool.premium-link { color: var(--gold); font-weight: 500; }
.tool.premium-link:hover, .tool.premium-link.active { color: var(--gold-hover); }
.tool .count { position: absolute; top: 0; right: 0; transform: translate(35%, -10%); }
.count { background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 600; line-height: 1; padding: 3px 7px; border-radius: 999px; }
.notif.unread { background: var(--bg-alt); }
.notif-snippet { overflow-wrap: anywhere; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; }
.dot.read { visibility: hidden; }
a.link-btn { text-decoration: none; color: var(--text-soft); }
a.link-btn:hover { color: var(--text); }

/* report dialog */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 10, 0.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); }
.msg-report { font-size: 12px; padding: 0; margin-left: auto; }

/* rules, terms, privacy */
.legal { max-width: 760px; }
.legal h2 { font-size: 20px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal .notice { font-size: 15px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* search and settings */
.search-who { min-width: 0; overflow-wrap: anywhere; }
.search-bio { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.check { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 400; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }

/* dashboard */
.ticker {
  min-height: 46px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden;
  /* CSS tokens TradingView's newer widgets read, so the strip wears CT7's own type and colours */
  --tv-widget-font-family: Inter, system-ui, sans-serif;
  --tv-widget-background-color: transparent;
  --tv-widget-text-color: var(--text-soft);
  --tv-widget-price-text-color: var(--text);
  --tv-widget-accent-color: var(--gold);
  --tv-widget-positive-color: var(--up);
  --tv-widget-negative-color: var(--down);
}

.ticker[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-soft); text-decoration: none; border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 12px; }
.chip:hover { border-color: var(--gold); color: var(--text); }
.sugg { display: flex; align-items: center; gap: 12px; }
.sugg .search-who { flex: 1; }

/* premium and groups */
.badge.premium { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
ul.plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg-text .msg-meta + * { margin: 0; }
input[readonly] { color: var(--text-soft); }

/* Posts page: people you follow */
.fp-list { display: flex; flex-direction: column; }
.fp-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--border); text-decoration: none; color: var(--text-soft); }
.fp-item:first-child { border-top: none; padding-top: 4px; }
.fp-item:hover .fp-text { color: var(--text); }
.fp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text); font-size: 14px; }
.fp-text { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.fp-new { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-gold); background: var(--gold); border-radius: 999px; padding: 2px 8px; }
.fp-item.fresh { animation: fp-pop 1.4s ease-out; }
@keyframes fp-pop { from { background: rgba(212, 184, 120, 0.22); transform: translateY(-4px); } to { background: transparent; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fp-item.fresh { animation: none; } }
@media (min-width: 900px) { .follow-side { position: sticky; top: 16px; } }

/* chatroom categories */
.chip.active { border-color: var(--gold); color: var(--text); background: rgba(212, 184, 120, 0.12); }
.coin-rooms { gap: 12px; }
.coin-name { color: var(--gold); text-decoration: none; font-size: 18px; letter-spacing: 0.02em; }
.coin-name:hover { color: var(--gold-hover); }

/* chart + chat side by side on coin pages: same height, bigger */
.chart-chat { --cc-h: clamp(560px, 82vh, 780px); display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.chart-chat.no-chat { grid-template-columns: minmax(0, 1fr); }
.chart-chat .chart-box { height: var(--cc-h); min-width: 0; }
.chart-chat-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; height: var(--cc-h); }
.chart-chat-side #cc-host { flex: 1; min-height: 0; }
.chart-chat-side .chat { height: 100%; }
button.chip { font: inherit; cursor: pointer; }
@media (max-width: 899px) {
  .chart-chat { --cc-h: 460px; grid-template-columns: minmax(0, 1fr); }
  .chart-chat-side { height: 520px; }
}
button.chip:not(.active) { background: transparent; }

/* member rooms */
.mod-tools { margin-left: auto; display: inline-flex; gap: 10px; }
.mod-tools .link-btn { font-size: 12px; color: var(--muted); }
.mod-tools .link-btn:hover { color: var(--text); }
.btn.danger { border-color: var(--down); color: var(--down); }
.btn.danger:hover { background: rgba(239, 107, 118, 0.1); }

/* group hub: signals, posts, comments */
.up { color: var(--up); }
.down { color: var(--down); }
.badge.up { color: var(--up); border-color: var(--up); }
.badge.down { color: var(--down); border-color: var(--down); }
.gp-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.6; }
.gp-title { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.signal-box { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.sig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.sig-grid > div { display: flex; flex-direction: column; gap: 2px; }
.sig-status.st-target_hit { color: var(--up); border-color: var(--up); }
.sig-status.st-stopped { color: var(--down); border-color: var(--down); }
.sig-status.st-open, .sig-status.st-closed { color: var(--muted); border-color: var(--border-strong); }
.gp-comments { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px solid var(--border); }
.gp-comment { overflow-wrap: anywhere; }
.gp-comment .gc-body { white-space: pre-wrap; margin-top: 2px; }
.gc-form input { flex: 1; min-width: 0; }

/* group page: feed and chat side by side */
.gh { max-width: 1500px; }
.gh-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: var(--soft); }
.gh-strip > span:empty { display: none; }
.gh-strip a { color: var(--gold); text-decoration: none; }
.gh-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 20px; align-items: start; }
.gh-feed { min-width: 0; }
.gh-chat { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; min-width: 0; max-height: calc(100vh - 92px); }
.gh-chat .chat { flex: 1; min-height: 420px; height: min(70vh, 720px); }
.gh-switch { display: none; }
.gh-open { gap: 8px; }
.gh-open-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.gp-quick { text-align: left; width: 100%; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.gp-quick:hover { color: var(--text); border-color: var(--gold); }
.dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.dot[hidden] { display: none; }
@media (max-width: 899px) {
  .gh-switch { display: flex; }
  .gh-cols { grid-template-columns: minmax(0, 1fr); }
  .gh-cols[data-view="feed"] .gh-chat { display: none; }
  .gh-cols[data-view="chat"] .gh-feed { display: none; }
  .gh-chat { position: static; max-height: none; }
  .gh-chat .chat { height: 70vh; }
}
[hidden] { display: none !important; }

/* profit meter */
.meter { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.meter-gauge { position: relative; width: 150px; flex: none; }
.meter-gauge svg { display: block; width: 100%; height: auto; }
.meter-gauge .m-bg { stroke: var(--border-strong); }
.meter-gauge .m-fg { stroke: var(--muted); }
.meter-gauge.up .m-fg { stroke: var(--up, #2ebd85); }
.meter-gauge.mid .m-fg { stroke: var(--gold); }
.meter-gauge.down .m-fg { stroke: var(--down, #e5534b); }
.meter-num { text-align: center; font-size: 26px; font-weight: 700; line-height: 1.1; margin-top: -34px; }
.meter-cap { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.meter-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 10px 26px; min-width: 0; }
.meter-stats div { display: flex; flex-direction: column; }
.meter-stats strong { font-size: 18px; }
.meter-stats span { font-size: 12px; color: var(--muted); }
.meter-note { flex-basis: 100%; margin: 0; }
.meter.compact { padding: 10px 14px; gap: 16px; margin-top: 12px; }
.meter.compact .meter-gauge { width: 96px; }
.meter.compact .meter-num { font-size: 18px; margin-top: -22px; }
.meter.compact .meter-cap { font-size: 11px; margin-top: 6px; }
.meter.compact .meter-stats strong { font-size: 15px; }
@media (max-width: 560px) { .meter-stats { grid-template-columns: repeat(2, auto); } }

/* library */
.lib-title { margin: 0; font-size: 20px; }
.lib-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--text-soft); }
.lib-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
textarea#lib-body { resize: vertical; }

/* creator dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-grid.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.stat-grid.small .stat { background: transparent; padding: 12px 14px; }
.stat-label { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.stat strong { font-size: 26px; line-height: 1.15; }
.stat-grid.small .stat strong { font-size: 21px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.cd-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding: 0 2px; border-bottom: 1px solid var(--border-strong); }
.bar { flex: 1; background: var(--gold); border-radius: 3px 3px 0 0; opacity: 0.85; min-width: 0; }
.bar:hover { opacity: 1; }
@media (max-width: 760px) { .cd-cols { grid-template-columns: 1fr; } }

/* page heads, compact bars and buttons that open things */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-title { font-size: clamp(34px, 5vw, 48px); font-weight: 650; line-height: 1.05; }
.page-sub { margin: 0; color: var(--muted); font-size: 16px; max-width: 44ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.compose-bar { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px 10px 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; }
.compose-bar:hover, .compose-bar:focus-visible { border-color: var(--gold); color: var(--text); }
.compose-plus { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--border); color: var(--text); font-size: 20px; line-height: 1; flex: none; }
.compose-text { flex: 1; min-width: 0; font-size: 16px; }

.finder { display: flex; flex-direction: column; gap: 12px; }
.finder-row { display: flex; gap: 10px; align-items: center; }
.searchbox { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.searchbox svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.searchbox input { width: 100%; padding-left: 38px; }
.searchbox svg + input { padding-left: 38px; }
.filter-btn .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--bg); font-size: 12px; font-weight: 700; }
.filter-btn.has { border-color: var(--gold); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .searchbox { width: 250px; flex: none; }
@media (max-width: 560px) { .inline-form { width: 100%; } .inline-form .searchbox { flex: 1; width: auto; } }

.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.coin-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; min-width: 0; }
a.coin-card:hover { border-color: var(--gold); }
.coin-sym { font-family: var(--font-head); font-size: 26px; font-weight: 650; color: var(--text); text-decoration: none; }
.coin-go, .coin-go a { font-size: 13px; color: var(--gold); text-decoration: none; margin-top: 4px; }
.coin-card .link-btn { align-self: flex-start; }

/* chat lanes */
.lane-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 20px; border-bottom: 1px solid var(--border); }
.lane-chip { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-soft); }
.lane-chip:hover, .lane-chip.open { border-color: var(--gold); color: var(--text); }
.lane-panel { padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg-alt); display: flex; flex-direction: column; gap: 6px; }
.lane-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.lane-opt:hover { border-color: var(--gold); }
.lane-opt.active { border-color: var(--gold); background: var(--surface); }
.lane-opt .badge { margin-left: auto; }
.lane-opt span.muted { flex: 1; }
.lane-opt .badge + * { margin-left: 0; }

/* social posts */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.post-body a.cashtag { color: var(--gold); font-weight: 600; text-decoration: none; }
.post-body a.mention { color: var(--text); font-weight: 600; text-decoration: none; }
.post-body a.cashtag:hover, .post-body a.mention:hover { text-decoration: underline; }
.post-body a.ext-link { color: var(--gold); overflow-wrap: anywhere; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }

.post-img { display: block; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-alt); cursor: zoom-in; max-width: 560px; }
.post-img img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.quote-embed { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border: 1px solid var(--border-strong); border-left: 3px solid var(--gold); border-radius: 8px; text-decoration: none; color: inherit; background: var(--bg-alt); }
.quote-embed .q-body { color: var(--text-soft); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.price-chip { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 8px; background: var(--bg-alt); align-self: flex-start; }
.price-chip strong { color: var(--text); }
.chip-now:empty { display: none; }

.react-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.react { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; cursor: pointer; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); }
.react b { font-weight: 600; min-width: 1ch; }
.react:hover { border-color: var(--gold); color: var(--text); }
.react[aria-pressed="true"] { border-color: var(--gold); background: var(--surface); color: var(--text); }
.sentiment { display: flex; width: 90px; height: 6px; border-radius: 3px; overflow: hidden; margin-left: 8px; background: var(--border); }
.sentiment .s-bull { background: var(--up); flex-basis: 0; }
.sentiment .s-bear { background: var(--down); flex-basis: 0; }
.post-actions [data-save][aria-pressed="true"] { color: var(--gold); }

.thread { display: flex; flex-direction: column; gap: 10px; margin-left: 28px; padding-left: 16px; border-left: 2px solid var(--border); }
.post.reply { padding: 14px 16px; }
.quote-chip { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px; border-left: 3px solid var(--gold); background: var(--bg-alt); border-radius: 6px; }
.quote-chip .q-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; color: var(--text-soft); }
label.attach { cursor: pointer; }
.c-img-thumb { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(5, 7, 10, 0.88); cursor: zoom-out; }
.lightbox img { max-width: min(96vw, 1400px); max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 16px; right: 16px; }
.style-toggle { gap: 0; flex-wrap: nowrap; }
.style-toggle .tab { padding: 6px 12px; font-size: 13px; border-radius: 0; }
.style-toggle .tab:first-child { border-radius: 6px 0 0 6px; }
.style-toggle .tab:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }

/* compact feed: less space per post, still readable */
.feed-compact #feed .post, .feed-compact #pf-list .post, .feed-compact #profile-feed .post, .feed-compact #saved-list .post { padding: 10px 14px; gap: 6px; }
.feed-compact #feed .post-body, .feed-compact #pf-list .post-body, .feed-compact #profile-feed .post-body, .feed-compact #saved-list .post-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-compact #feed .post-img, .feed-compact #pf-list .post-img, .feed-compact #profile-feed .post-img, .feed-compact #saved-list .post-img { max-width: 160px; }
.feed-compact #feed .post-img img, .feed-compact #pf-list .post-img img, .feed-compact #profile-feed .post-img img, .feed-compact #saved-list .post-img img { max-height: 90px; }
.feed-compact #feed .quote-embed, .feed-compact #pf-list .quote-embed, .feed-compact #saved-list .quote-embed, .feed-compact #profile-feed .quote-embed { display: none; }
.feed-compact .post .avatar { width: 26px; height: 26px; font-size: 11px; }

/* ---------- Batch B: polls, hover cards, profile pictures, leaderboard ---------- */
.avatar.has-img { overflow: hidden; background: var(--surface); }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge.earned { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, var(--border)); }

.poll { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.poll-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.poll-opt { font: inherit; text-align: left; color: var(--text); background: transparent; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 14px; cursor: pointer; min-height: 44px; }
.poll-opt:hover { border-color: var(--gold); }
.poll-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; overflow: hidden; min-height: 44px; }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--gold) 16%, transparent); }
.poll-row.mine { border-color: var(--gold); }
.poll-row.right { border-color: var(--up); }
.poll-row.right .poll-fill { background: color-mix(in srgb, var(--up) 22%, transparent); }
.poll-label, .poll-pct { position: relative; }
.poll-label em { font-style: normal; color: var(--muted); font-size: 13px; }
.poll-pct { font-weight: 600; }
.poll-resolve { display: flex; flex-direction: column; gap: 8px; }
.poll-msg:empty { display: none; }
.poll-builder { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 0; min-width: 0; }
.poll-builder legend { padding: 0 6px; }
.poll-builder .cp-opt { width: 100%; }

.hovercard { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.hovercard .hc-bio { margin: 0; overflow-wrap: anywhere; }

.lead-list { display: flex; flex-direction: column; gap: 0; }
.lead-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lead-row:first-child { border-top: 0; }
.lead-rank { flex: none; width: 24px; text-align: center; font-weight: 700; color: var(--gold); }
.lead-row .search-who { flex: 1 1 120px; min-width: 0; }
.lead-score { margin-left: auto; }
.col-side .lead-row { padding: 8px 0; gap: 10px; }
.col-side .lead-row .small-text { display: none; }

/* ---------- Post page (nineteenth update) ---------- */
.post-page { padding-bottom: 24px; }
body:has(#dock)::after { content: ''; display: block; height: 130px; }
.post-main { gap: 14px; padding: 26px; }
.post-main .post-body { font-size: 20px; line-height: 1.55; color: var(--text); }
.pp-head { align-items: center; flex-wrap: nowrap; gap: 14px; }
.pp-head > .stack { flex: 1 1 auto; }
.pp-handle { font-size: 18px; }
.pp-follow { margin-left: auto; flex: none; }
.stats-bar { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pp-stat { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; }
.pp-stat b { color: var(--text); font-weight: 700; }
.pp-stat:hover { color: var(--gold); }
.more-strip { display: flex; flex-direction: column; gap: 10px; }
.more-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.more-card { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-soft); text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.more-card:hover { border-color: var(--gold-line); color: var(--text); }

.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment .c-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.c-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.comment.best { padding: 12px; border: 1px solid color-mix(in srgb, var(--up) 45%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--up) 7%, transparent); }
.thread { margin: 10px 0 4px 18px; padding-left: 18px; border-left: 2px solid var(--border-strong); display: flex; flex-direction: column; gap: 14px; }
.thread[hidden] { display: none !important; }
.view-replies { align-self: flex-start; margin-left: 50px; }
.badge.author { color: var(--text-soft); border-color: var(--border-strong); }

.pp-price { font-size: 14px; }
.spark { width: 100%; height: 56px; display: block; }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }
.up { color: var(--up); }
.down { color: var(--down); }
.sentiment-big { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--border); gap: 2px; }
.sentiment-big .s-bull { background: var(--up); flex-basis: 0; }
.sentiment-big .s-bear { background: var(--down); flex-basis: 0; }
.rel-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); text-decoration: none; color: var(--text); }
.rel-item:first-child { border-top: 0; }
.rel-item:hover strong { color: var(--gold); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.dock-in { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.dock-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dock-actions::-webkit-scrollbar { display: none; }
.dock-actions .react-row, .dock-actions .post-actions { flex: none; flex-wrap: nowrap; padding: 0; margin: 0; }
.dock-actions .sentiment { display: none; }
.dock-form { display: flex; flex-direction: column; gap: 4px; }
.dock-input { display: flex; align-items: flex-end; gap: 10px; }
.dock-input textarea { flex: 1 1 auto; min-width: 0; resize: none; min-height: 40px; max-height: 140px; border-radius: 20px; padding: 9px 16px; line-height: 1.4; }
.dock-form .form-error:empty { display: none; }
.dock-form .form-error { margin: 0; }
.dock-login { margin: 6px 0; text-align: center; }
.dock-form #cm-replying { margin: 0 0 0 44px; }

.sheet-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { width: 420px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.sheet-body { overflow-y: auto; }

@media (max-width: 760px) {
  .post-main { padding: 18px; }
  .post-main .post-body { font-size: 18px; }
  .thread { margin-left: 8px; padding-left: 12px; }
  .view-replies { margin-left: 24px; }
}
