/* ============ tokens ============ */
:root {
  --bg: #0c0c0e;
  --surface: #131316;
  --surface-2: #19191d;
  --surface-3: #202026;
  --border: #25252b;
  --border-strong: #34343c;
  --text: #ededf0;
  --text-2: #a1a1aa;
  --text-3: #6b6b75;
  --accent: #d97757;
  --accent-hover: #e38a6b;
  --accent-soft: rgba(217, 119, 87, .12);
  --accent-ink: #fff;
  --up: #22c55e;
  --up-soft: rgba(34, 197, 94, .12);
  --down: #f04438;
  --down-soft: rgba(240, 68, 56, .12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1320px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --surface-2: #f3f2ee;
    --surface-3: #eae8e2;
    --border: #e6e3dc;
    --border-strong: #d6d2c8;
    --text: #18181b;
    --text-2: #52525b;
    --text-3: #8a8a93;
    --accent: #c9623f;
    --accent-hover: #b85532;
    --accent-soft: rgba(201, 98, 63, .1);
    --up: #16a34a;
    --up-soft: rgba(22, 163, 74, .1);
    --down: #dc2626;
    --down-soft: rgba(220, 38, 38, .08);
    --shadow: 0 1px 2px rgba(20,20,20,.05), 0 12px 32px -14px rgba(20,20,20,.18);
    color-scheme: light;
  }
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px 16px 56px; outline: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

/* ============ buttons / inputs ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-buy { background: var(--up); color: #fff; }
.btn-sell { background: var(--down); color: #fff; }
.btn-buy:hover, .btn-sell:hover { filter: brightness(1.08); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 0; background: transparent; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

input, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 72px; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* ============ header ============ */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.brand .logo svg { width: 18px; height: 18px; stroke-width: 3; }
.brand.small { font-size: 15px; margin-bottom: 8px; }
.brand.small .logo { width: 24px; height: 24px; border-radius: 6px; }
.brand.small .logo svg { width: 14px; height: 14px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 6px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.search { position: relative; flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 34px; padding-right: 34px; height: 36px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; font: 11px var(--mono); color: var(--text-3); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); font: 600 13px var(--mono);
}
.wallet-pill:hover { border-color: var(--border-strong); }
.sol-dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, #9945ff, #14f195); }

.statsbar { border-top: 1px solid var(--border); background: var(--surface); }
.statsbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; height: 36px; display: flex; align-items: center; gap: 24px; overflow: hidden; }
.stats { display: flex; gap: 20px; flex: none; font-size: 12px; color: var(--text-3); }
.stats b { color: var(--text); font: 600 12px var(--mono); margin-left: 4px; }
.feed { flex: 1; display: flex; gap: 10px; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); min-width: 0; }
.feed-item {
  flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 8px 2px 3px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap;
  animation: feedIn .35s ease-out;
}
.feed-item .coin-art { --size: 18px; border-radius: 50%; }
.feed-item b { font-weight: 600; }
.feed-item.buy { border-color: color-mix(in srgb, var(--up) 35%, var(--border)); }
.feed-item.sell { border-color: color-mix(in srgb, var(--down) 35%, var(--border)); }
.feed-item.new, .feed-item.grad { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-16px); } }

/* ============ coin art ============ */
.coin-art { --size: 48px; width: var(--size); height: var(--size); flex: none; position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.coin-art svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: none; }
.coin-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coin-art .emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--size) * .5); line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.coin-art.sm { --size: 32px; border-radius: 8px; }
.coin-art.md { --size: 56px; }
.coin-art.lg { --size: 96px; border-radius: 14px; }
.coin-art.xl { --size: 112px; border-radius: 16px; }

/* ============ hero ============ */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch; margin-bottom: 32px; }
.hero-main {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { color: var(--text-2); font-size: 15px; max-width: 480px; margin: 12px 0 24px; }
.pair-form { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 6px 6px 14px; max-width: 520px; transition: border-color .15s, box-shadow .15s; }
.pair-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pair-form .prefix { font-weight: 700; color: var(--accent); white-space: nowrap; }
.pair-form input { border: 0; background: transparent; padding: 8px 0; box-shadow: none !important; font-size: 15px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; max-width: 540px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

.koth { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color .15s; position: relative; overflow: hidden; }
.koth:hover { border-color: var(--border-strong); }
.koth::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, #f5c542, var(--accent)); }
.koth-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #e9b949; text-transform: uppercase; letter-spacing: .06em; }
.koth-top { display: flex; gap: 16px; align-items: center; }
.koth h2 { font-size: 22px; }
.koth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kstat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.kstat .l { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.kstat .v { font: 600 15px var(--mono); margin-top: 2px; }

/* ============ board ============ */
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.board-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--up); background: var(--up-soft); padding: 2px 8px; border-radius: 999px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: pulse 1.8s infinite; box-shadow: 0 0 0 0 var(--up); }
.live.paused { color: var(--text-3); background: var(--surface-2); }
.live.paused i { background: var(--text-3); animation: none; }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: transparent; color: var(--text-2); font-weight: 500; font-size: 13px; padding: 5px 12px; border-radius: 7px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card {
  display: flex; gap: 14px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; min-width: 0;
  transition: border-color .15s, background .15s;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.card .coin-art { --size: 88px; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.card-by { font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.card-by .addr { color: var(--text-2); }
.card-title { font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.card-title .tk { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.card-desc { font-size: 12.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.card-mc { font: 600 12.5px var(--mono); }
.card-mc .l { font-family: var(--font); color: var(--text-3); font-weight: 500; margin-right: 4px; }
.card-chg { font: 600 12px var(--mono); }
.card-replies { margin-left: auto; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.card-replies svg { width: 13px; height: 13px; }
.progress { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f0b35a); transition: width .5s ease; }
.progress.done > span { background: var(--up); }
.card.tick-up { animation: tickUp .7s; }
.card.tick-down { animation: tickDown .7s; }
@keyframes tickUp { 0% { box-shadow: inset 0 0 0 1px var(--up); } 100% { box-shadow: inset 0 0 0 1px transparent; } }
@keyframes tickDown { 0% { box-shadow: inset 0 0 0 1px var(--down); } 100% { box-shadow: inset 0 0 0 1px transparent; } }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.badge.grad { background: var(--up-soft); color: var(--up); }
.badge.you { background: var(--accent-soft); color: var(--accent); }
.empty { text-align: center; padding: 64px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ============ coin page ============ */
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; margin-bottom: 16px; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 14px; height: 14px; }
.coin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.coin-main, .coin-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.coin-side { position: sticky; top: 116px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
.panel-pad { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-size: 14px; }
.coin-header { display: flex; gap: 16px; align-items: center; padding: 16px; }
.coin-header h1 { font-size: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.coin-header h1 .tk { font-size: 15px; color: var(--text-3); font-weight: 600; }
.coin-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.coin-meta .addr-btn { display: inline-flex; align-items: center; gap: 5px; font: 12px var(--mono); color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }
.coin-meta .addr-btn:hover { color: var(--text); border-color: var(--border-strong); }
.coin-meta .addr-btn svg { width: 12px; height: 12px; }
.coin-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.kpi { padding: 12px 16px; border-right: 1px solid var(--border); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.kpi .v { font: 600 16px var(--mono); margin-top: 2px; white-space: nowrap; }

.chart-panel .panel-head .ohlc { font: 12px var(--mono); color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.chart-panel .panel-head .ohlc b { color: var(--text-2); font-weight: 500; }
.chart-box { position: relative; height: 380px; padding: 8px 0 0; }
.chart-box canvas { display: block; width: 100%; height: 100%; }
.tf { display: inline-flex; gap: 2px; }
.tf button { border: 0; background: transparent; color: var(--text-3); font: 500 12px var(--mono); padding: 4px 8px; border-radius: 6px; }
.tf button:hover { color: var(--text); }
.tf button.active { color: var(--text); background: var(--surface-3); }

.tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: transparent; color: var(--text-3); font-weight: 600; font-size: 13.5px; padding: 12px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text-2); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font: 500 11px var(--mono); color: var(--text-3); margin-left: 4px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 9px 16px; border-bottom: 1px solid var(--border); font-family: var(--mono); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl tr.new-row td { animation: rowIn .8s; }
@keyframes rowIn { from { background: var(--accent-soft); } }
.tbl-wrap { max-height: 440px; overflow: auto; }
.side-tag { display: inline-block; font: 600 11px var(--font); padding: 1px 7px; border-radius: 5px; }
.side-tag.buy { color: var(--up); background: var(--up-soft); }
.side-tag.sell { color: var(--down); background: var(--down-soft); }
.you-tag { color: var(--accent); font-weight: 600; }

.thread { list-style: none; margin: 0; padding: 0; }
.thread li { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.thread li:last-child { border-bottom: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.thread .who { font: 600 12px var(--mono); }
.thread .when { color: var(--text-3); font-size: 11.5px; margin-left: 6px; }
.thread .txt { margin-top: 2px; overflow-wrap: anywhere; }
.reply-form { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }

/* trade panel */
.trade { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; }
.bs button { border: 0; background: transparent; color: var(--text-2); font-weight: 600; height: 34px; border-radius: 7px; }
.bs button.on.buy { background: var(--up); color: #fff; }
.bs button.on.sell { background: var(--down); color: #fff; }
.trade-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.trade-row b { color: var(--text-2); font: 500 12px var(--mono); }
.amount { position: relative; }
.amount input { height: 48px; font: 600 18px var(--mono); padding-right: 70px; }
.amount .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.quick button { height: 28px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px; font: 500 12px var(--mono); color: var(--text-2); }
.quick button:hover { color: var(--text); border-color: var(--border-strong); }
.quote { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.quote div { display: flex; justify-content: space-between; gap: 8px; }
.quote span:first-child { color: var(--text-3); }
.quote span:last-child { font-family: var(--mono); }
.pos { border-top: 1px solid var(--border); padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos .l { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.pos .v { font: 600 14px var(--mono); }
.grad-note { display: flex; gap: 10px; align-items: flex-start; background: var(--up-soft); color: var(--text); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; }

.curve { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.curve-top { display: flex; justify-content: space-between; align-items: baseline; }
.curve-top b { font: 700 18px var(--mono); }
.curve .progress { height: 8px; }
.curve p { margin: 0; font-size: 12.5px; color: var(--text-2); }

.holders { list-style: none; margin: 0; padding: 6px 0; }
.holders li { display: flex; align-items: center; gap: 8px; padding: 6px 16px; font: 12.5px var(--mono); }
.holders li .n { color: var(--text-3); width: 18px; }
.holders li .pct { margin-left: auto; }
.holders li .bar { flex: 0 0 60px; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.holders li .bar span { display: block; height: 100%; background: var(--accent); }
.holders .tag { font: 600 10.5px var(--font); color: var(--text-3); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 4px; }

/* ============ portfolio / static pages ============ */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.summary .panel { padding: 16px; }
.summary .l { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.summary .v { font: 700 22px var(--mono); margin-top: 4px; }
.coin-cell { display: flex; align-items: center; gap: 10px; font-family: var(--font); }
.coin-cell b { font-weight: 600; }
.coin-cell .dim { font-size: 12px; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover td { background: var(--surface-2); }

.how { max-width: 820px; margin: 0 auto; }
.how h1 { font-size: 30px; margin-bottom: 8px; }
.how .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.how .step { padding: 18px; }
.how .step .num { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.how .step h3 { font-size: 15px; margin-bottom: 4px; }
.how .step p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.how .faq { padding: 4px 20px; }
.how details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.how details:last-child { border-bottom: 0; }
.how summary { cursor: pointer; font-weight: 600; }
.how details p { color: var(--text-2); margin: 8px 0 0; }
.formula { font: 13px var(--mono); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; color: var(--text); overflow-x: auto; }

/* ============ dialog ============ */
.dlg {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.dlg[open] { animation: dlgIn .18s ease-out; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 4px; }
.dlg-head h2 { font-size: 18px; }
.dlg-head p { margin: 2px 0 0; font-size: 13px; }
.dlg-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { margin: 0; font-size: 12px; color: var(--text-3); }
.hint.err { color: var(--down); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create-grid { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.create-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.input-affix { display: flex; gap: 8px; }
.input-affix .btn { height: auto; }
.input-prefix, .input-suffix { position: relative; display: flex; align-items: center; }
.input-prefix span { position: absolute; left: 12px; color: var(--text-3); font-weight: 600; }
.input-prefix input { padding-left: 24px; text-transform: uppercase; font-family: var(--mono); }
.input-suffix span { position: absolute; right: 12px; color: var(--text-3); font-weight: 600; font-size: 13px; }
.input-suffix input { padding-right: 48px; font-family: var(--mono); }
.img-drop { position: relative; border-radius: 16px; cursor: pointer; outline-offset: 3px; }
.img-drop .img-hint {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s;
}
.img-drop:hover .img-hint, .img-drop:focus-visible .img-hint, .img-drop.drag .img-hint { opacity: 1; }

/* ============ toasts ============ */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(380px, calc(100vw - 32px));
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .2s ease-out; pointer-events: auto;
}
.toast .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; }
.toast.ok .ic { background: var(--up-soft); color: var(--up); }
.toast.err .ic { background: var(--down-soft); color: var(--down); }
.toast.info .ic { background: var(--accent-soft); color: var(--accent); }
.toast.out { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ============ footer ============ */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 24px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.footer p { margin: 0; font-size: 12.5px; max-width: 620px; }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .coin-layout { grid-template-columns: 1fr; }
  .coin-side { position: static; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .statsbar .stats > :nth-child(n+3) { display: none; }
  .summary { grid-template-columns: 1fr 1fr; }
  .coin-kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .topbar-inner { gap: 10px; }
  .brand-name { display: none; }
  #launchTop span { display: none; }
  #launchTop { width: 36px; padding: 0; }
  .wallet-pill .dim { display: none; }
  .hero-main { padding: 22px; }
  .grid { grid-template-columns: 1fr; }
  .card .coin-art { --size: 72px; }
  .chart-box { height: 280px; }
  .koth-stats { grid-template-columns: 1fr 1fr; }
  .koth-stats .kstat:last-child { display: none; }
  .footer-inner { flex-direction: column; }
  .tbl th, .tbl td { padding-left: 12px; padding-right: 12px; }
  .create-grid { grid-template-columns: 1fr; justify-items: start; }
  .statsbar .stats { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
