:root {
  --bg: #0c0d10;
  --panel: #14161a;
  --panel-2: #1a1d22;
  --line: #23262c;
  --line-2: #30343c;
  --text: #eceef1;
  --muted: #9198a2;
  --faint: #5b616b;
  --blue: #2aabee;
  --blue-dim: rgba(42, 171, 238, .14);
  --green: #3ecf8e;
  --amber: #f5b83d;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(16px, 3vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
code { font-family: var(--mono); }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }

/* ——— top bar ——— */
.top { position: sticky; top: 0; z-index: 20; background: rgba(12, 13, 16, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mc-chip { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.mc-chip span { color: var(--muted); }
.mc-chip b { color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; }
.mc-chip:hover { border-color: var(--line-2); }
.ca-chip { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.ca-chip b { font-weight: 600; }
.ca-chip code { color: var(--muted); font-size: 12px; }
.ca-chip em { font-style: normal; color: var(--blue); font-size: 12px; font-weight: 500; }
.ca-chip:hover { border-color: var(--line-2); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.icon-btn svg { width: 15px; height: 15px; fill: var(--text); }
.icon-btn:hover { border-color: var(--line-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-2); }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.muted { color: var(--muted); cursor: default; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: live 1.8s infinite; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(62,207,142,.55); } 70% { box-shadow: 0 0 0 7px rgba(62,207,142,0); } 100% { box-shadow: 0 0 0 0 rgba(62,207,142,0); } }

.card-trade { font-size: 12px; color: var(--muted); min-height: 18px; transition: color .3s; }
.card-trade b.buy { color: var(--green); }
.card-trade b.sell { color: #f87171; }
.card-trade.ping { animation: ping 1.6s ease-out; }
@keyframes ping { 0% { color: var(--text); background: rgba(62,207,142,.12); } 100% { background: transparent; } }
.card-trade.ping.sell { animation-name: ping-red; }
@keyframes ping-red { 0% { color: var(--text); background: rgba(248,113,113,.12); } 100% { background: transparent; } }

/* ——— panels ——— */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.panel-h a { color: var(--blue); font-weight: 500; }
.panel-h small { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ——— overview ——— */
.overview { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; padding-top: 24px; padding-bottom: 16px; }
.side { display: flex; flex-direction: column; gap: 16px; }
.intro { padding: 4px 2px; }
.wordmark { display: flex; align-items: center; gap: 14px; font-size: 52px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin: 0 0 14px; }
.wordmark img { width: 56px; height: 56px; border-radius: 14px; }
.intro h1 { font-size: 20px; color: var(--text); line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 700; }
.intro p { margin: 0 0 16px; color: var(--muted); }
.why { color: var(--text) !important; font-weight: 600; font-size: 15px; margin: 0 0 8px !important; }
.links-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.kv div { padding: 14px 16px; }
.kv div:nth-child(odd) { border-right: 1px solid var(--line); }
.kv div:nth-child(n+3) { border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 3px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.treasury { padding: 14px 16px 16px; }
.t-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.t-row b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-row span { color: var(--muted); font-size: 12px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; margin: 10px 0; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .6s ease; }
.t-note { color: var(--muted); font-size: 12px; margin: 0; }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin: 0; }
.t-grid div { padding: 12px 16px; }
.t-grid div + div { border-left: 1px solid var(--line); }
.t-grid dt { color: var(--muted); font-size: 12px; }
.t-grid dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }

.map-panel { position: relative; min-height: 600px; display: flex; flex-direction: column; }
.legend { display: flex; gap: 16px; font-weight: 400; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg.c { background: var(--blue); }
.lg.q { border: 1px dashed var(--muted); }
.lg.w { background: var(--amber); }
.map { position: relative; flex: 1; margin: 12px; }
.bub { position: absolute; border-radius: 50%; padding: 0; border: 1px solid var(--line-2); background: var(--panel-2); overflow: hidden; cursor: pointer; display: grid; place-items: center; transition: transform .15s, border-color .15s; animation: bob var(--d, 6s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
.bub img { width: 100%; height: 100%; object-fit: cover; }
.bub .ph { color: var(--faint); font-weight: 700; }
.bub .lbl { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); font: 600 11px var(--sans); background: rgba(12,13,16,.85); color: var(--text); border-radius: 6px; padding: 1px 6px; white-space: nowrap; max-width: 88%; overflow: hidden; text-overflow: ellipsis; }
.bub.created { border: 2px solid var(--blue); box-shadow: 0 0 0 4px var(--blue-dim); }
.bub.queued { border-style: dashed; }
.bub.queued img { opacity: .45; filter: grayscale(.7); transition: opacity .15s, filter .15s; }
.bub:hover { transform: scale(1.06); z-index: 2; border-color: var(--text); }
.bub.queued:hover img { opacity: 1; filter: none; }
.bub.creating { border: 2px solid var(--amber); animation: bob 6s ease-in-out infinite alternate, creating 1.2s ease-in-out infinite; }
@keyframes bob { from { translate: 0 -3px; } to { translate: 0 4px; } }
@keyframes creating { 50% { box-shadow: 0 0 0 6px rgba(245, 184, 61, .3); } }

.latest { padding-bottom: 28px; }

/* ——— tables ——— */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--panel-2); }
.table .r { text-align: right; }
.table a.tg { color: var(--blue); font-weight: 500; }
.coin-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coin-cell .av { width: 28px; height: 28px; border-radius: 6px; background: var(--panel-2) center / cover; flex: none; display: grid; place-items: center; color: var(--faint); font-weight: 700; font-size: 12px; }
.coin-cell b { font-weight: 600; }
.coin-cell span { color: var(--muted); }
.empty-row td { padding: 28px 16px; color: var(--muted); text-align: center; cursor: default; }
.empty-row:hover td { background: none !important; }

/* ——— pulse ——— */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 16px; }
.page-h h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.page-h p { margin: 4px 0 0; color: var(--muted); }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--panel-2); color: var(--text); }
.search { height: 36px; width: 260px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; outline: none; }
.search:focus { border-color: var(--blue); }
.stats-line { display: flex; gap: 24px; color: var(--muted); padding-bottom: 16px; flex-wrap: wrap; }
.stats-line b { color: var(--text); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; padding-bottom: 28px; }
.card { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .12s, transform .12s; }
.card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.card-img { width: 100px; height: 100px; border-radius: 8px; background: var(--panel-2) center / cover; display: grid; place-items: center; color: var(--faint); font-weight: 700; font-size: 28px; }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.card-name { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.card-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name span { color: var(--muted); white-space: nowrap; }
.card-name .lp { margin-left: auto; font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }
.card-meta { color: var(--muted); font-size: 12px; }
.card-row { display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.card-row b { color: var(--text); font-weight: 600; }
.card-row .mc { color: var(--green); }
.card-links { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.card-links a { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.card-links a:hover { border-color: var(--line-2); }
.card-links a.go { background: var(--blue); color: #fff; border-color: var(--blue); }
/* a coin that just got its Telegram community */
.card.fresh { animation: shake .5s ease-in-out 2, flash 2.4s ease-out; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes flash { 0% { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); } 100% { border-color: var(--line); box-shadow: none; } }

.empty { border: 1px dashed var(--line-2); border-radius: 12px; padding: 36px 20px; text-align: center; color: var(--muted); margin-bottom: 28px; }
.empty b { color: var(--text); }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.chips span { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 12px; }
.chips i { width: 20px; height: 20px; border-radius: 50%; background: var(--panel-2) center / cover; }

/* ——— $COMMUNITY ——— */
.token-page { padding-top: 24px; padding-bottom: 28px; }
.tk-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-id { display: flex; align-items: center; gap: 14px; }
.tk-img { width: 56px; height: 56px; border-radius: 12px; background: var(--panel-2) url('/logo.svg') center / cover; flex: none; }
.tk-id h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.tk-id p { margin: 2px 0 0; color: var(--muted); }
.tk-head code { font-size: 12px; color: var(--muted); }
.tk-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.tk-stats dl { margin: 0; padding: 14px 16px; }
.tk-stats dt { color: var(--muted); font-size: 12px; }
.tk-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-stats small { font-size: 12px; font-weight: 600; }
.tk-stats small.up { color: var(--green); }
.tk-stats small.down { color: #f87171; }
.tk-stats .progress { margin: 8px 0 0; }
.tk-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.chart-panel { grid-row: span 2; }
.chart-panel iframe { display: block; width: 100%; height: 560px; border: 0; }
.claims-panel .table td a { color: var(--blue); }
@media (max-width: 1000px) { .tk-stats { grid-template-columns: repeat(2, 1fr); } .tk-grid { grid-template-columns: 1fr; } .chart-panel iframe { height: 420px; } }

.router li { padding: 12px 16px; }

/* ——— how it works ——— */
.doc { max-width: 860px; padding-top: 28px; padding-bottom: 40px; }
.doc h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 6px; }
.doc > p { color: var(--muted); margin: 0 0 24px; }
.doc .panel { margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 6px; background: var(--blue-dim); color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.steps b { color: var(--text); font-weight: 600; display: block; margin-bottom: 1px; }
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.rows div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font-weight: 600; text-align: right; }

/* ——— bottom bar ——— */
body { padding-bottom: 40px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 36px; background: rgba(20, 22, 26, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.bottombar .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.online { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.online b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bb-note { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottombar a { color: var(--muted); white-space: nowrap; }
.bottombar a:hover { color: var(--text); }

/* ——— first visit ——— */
.intro-modal { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.intro-box { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.intro-box h2 { font-size: 20px; margin: 0 0 16px; letter-spacing: -0.01em; }
.intro-steps { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: i; display: grid; gap: 14px; }
.intro-steps li { counter-increment: i; display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--muted); font-size: 14px; }
.intro-steps li::before { content: counter(i); width: 24px; height: 24px; border-radius: 6px; background: var(--blue-dim); color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.intro-steps b { color: var(--text); display: block; font-weight: 600; margin-bottom: 2px; }
.intro-ok { width: 100%; height: 42px; font-size: 15px; }
.intro-more { display: block; text-align: center; margin-top: 12px; color: var(--muted); font-size: 13px; }
.intro-more:hover { color: var(--text); }

/* ——— detail drawer ——— */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 31; background: var(--panel); border-left: 1px solid var(--line); padding: 20px; overflow: auto; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 16px; }
.d-head { display: flex; gap: 14px; align-items: center; margin: 8px 0 18px; }
.d-img { width: 64px; height: 64px; border-radius: 10px; background: var(--panel-2) center / cover; display: grid; place-items: center; color: var(--faint); font-weight: 700; font-size: 22px; flex: none; }
.d-head b { font-size: 18px; display: block; }
.d-head span { color: var(--muted); }
.status { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-top: 4px; }
.status.created { background: var(--blue-dim); color: var(--blue); }
.status.queued { background: var(--panel-2); color: var(--muted); }
.status.creating { background: rgba(245,184,61,.14); color: var(--amber); }
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.d-kv div { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }
.d-kv dt { color: var(--muted); font-size: 12px; }
.d-kv dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.d-ca { font: 12px var(--mono); color: var(--muted); background: var(--panel-2); border-radius: 8px; padding: 10px 12px; word-break: break-all; margin: 0 0 14px; cursor: pointer; }
.d-btns { display: grid; gap: 8px; }
.d-btns .btn { height: 40px; }
.d-note { color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  .overview { grid-template-columns: 1fr; }
  .map-panel { min-height: 440px; }
}
@media (max-width: 700px) {
  .top .wrap { gap: 10px; }
  .brand span, .ca-chip code, .top-right .btn, .icon-btn { display: none; }
  .nav a { padding: 7px 8px; }
  .search { width: 100%; }
  .controls { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .table .hide-s, .coin-cell span:not(.av) { display: none; }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
  .bb-note { display: none; }
  .bottombar a { margin-left: auto; }
}
