:root {
  --bg: #0d0d13;
  --panel: #12121c;
  --panel2: #181826;
  --line: #24243a;
  --ink: #f4f4f8;
  --mute: #8585a1;
  --dim: #5a5a74;
  --orange: #f54b00;
  --violet: #6e45ff;
  --up: #2bd47d;
  --down: #ff4d5e;
  --grad: linear-gradient(90deg, var(--violet), var(--orange));
  --r: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .mono { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.mute { color: var(--mute); }
.dim { color: var(--dim); }
.up { color: var(--up); }
.down { color: var(--down); }
.hide { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13, 13, 19, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand .mark { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--mute); font-weight: 500; }
.nav a.on, .nav a:hover { color: var(--ink); background: var(--panel2); }
.spacer { flex: 1; }
.net { font-size: 12px; color: var(--mute); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #34344f; }
.btn.primary { border: 0; background: var(--grad); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; height: 46px; font-size: 15px; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel > h3, .panel > .head { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; }
.panel .body { padding: 16px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 920px) { .cols-2 { grid-template-columns: 1fr; } .hide-sm { display: none !important; } }
main { padding: 24px 0 60px; }
h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -0.01em; }

/* coin tiles */
.tile { width: 44px; height: 44px; border-radius: 10px; flex: none; background: hsl(var(--h, 260) 50% 30%); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.tile.lg { width: 72px; height: 72px; border-radius: 14px; font-size: 18px; }
.tile.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; }

/* board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.15s; }
.card:hover { border-color: #3a3a58; }
.card .row1 { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tick { color: var(--mute); font-size: 12px; }
.card .stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); }
.card .stats b { display: block; color: var(--ink); font-size: 14px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.tag.live { color: var(--up); border-color: rgba(43, 212, 125, 0.35); }
.tag.soon { color: var(--orange); border-color: rgba(245, 75, 0, 0.4); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.tabs button { background: none; border: 1px solid transparent; color: var(--mute); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tabs button.on { color: var(--ink); background: var(--panel2); border-color: var(--line); }

/* tape */
.tape { display: flex; gap: 8px; overflow: hidden; white-space: nowrap; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tape span { padding: 3px 9px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 12px; font-weight: 600; color: var(--mute); margin-bottom: 6px; }
.in, select.in, textarea.in { width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); outline: none; }
textarea.in { height: 76px; padding: 10px 12px; resize: vertical; }
.in:focus { border-color: var(--violet); }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 56px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--mute); font-weight: 600; cursor: pointer; padding: 0 8px; }
.seg button.on { color: var(--ink); border-color: var(--violet); background: rgba(110, 69, 255, 0.14); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.sect { padding: 18px 16px; border-bottom: 1px solid var(--line); }
.sect:last-child { border-bottom: 0; }
.sect > .t { font-weight: 700; margin-bottom: 14px; display: flex; gap: 8px; align-items: baseline; }
.sect > .t small { color: var(--dim); font-weight: 500; }
.drop { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; cursor: pointer; }
.drop:hover { border-color: var(--violet); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.switch input { accent-color: var(--violet); width: 18px; height: 18px; }

/* key-value list */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.total b { font-size: 22px; }

/* charts */
.chart { width: 100%; display: block; }
.chart .bar-s { fill: url(#sg); }
.chart .axis { fill: var(--dim); font-size: 10px; }
.legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 6px; }

/* coin page */
.coinhead { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.ca { font-size: 12px; color: var(--mute); cursor: pointer; border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 16px; }
.stats4 > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.stats4 > div:last-child { border-right: 0; }
.stats4 small { display: block; color: var(--mute); font-size: 12px; margin-bottom: 4px; }
.stats4 b { font-size: 18px; }
@media (max-width: 640px) { .stats4 { grid-template-columns: 1fr 1fr; } .stats4 > div:nth-child(2) { border-right: 0; } .stats4 > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); } }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 16px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
.amt { position: relative; }
.amt .in { height: 48px; font-size: 18px; padding-right: 70px; }
.amt .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); font-weight: 600; }
.quick { display: flex; gap: 6px; margin: 8px 0 14px; }
.quick button { flex: 1; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--mute); font-size: 12px; cursor: pointer; }
.quick button:hover { color: var(--ink); }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.side button { height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--mute); font-weight: 700; cursor: pointer; }
.side button.on.buy { color: #fff; background: rgba(43, 212, 125, 0.18); border-color: var(--up); }
.side button.on.sell { color: #fff; background: rgba(255, 77, 94, 0.16); border-color: var(--down); }
.msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.msg.err { color: var(--down); }
.msg.ok { color: var(--up); }
.countdown { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--dim); }
.steps li i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done i { border-color: var(--up); background: var(--up); }
.steps li.run { color: var(--ink); }
.steps li.run i { border-color: var(--orange); border-top-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; inset: 0; background: rgba(5, 5, 9, 0.72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal .panel { width: 100%; max-width: 440px; }
.foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--dim); font-size: 12px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.empty { padding: 40px 16px; text-align: center; color: var(--mute); }
.lock { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 9px; background: rgba(43, 212, 125, 0.08); border: 1px solid rgba(43, 212, 125, 0.25); font-size: 13px; }
.grid > * { min-width: 0; }
.brand span { white-space: nowrap; }
@media (max-width: 640px) {
  .net { display: none; }
  .bar { gap: 8px; }
  #connect { max-width: 150px; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 38px; }
  h1 { font-size: 22px; }
  .tile.lg { width: 56px; height: 56px; }
  .coinhead { gap: 12px; }
}

/* wordmark + logo */
.wm { font-family: 'Bricolage Grotesque', Inter, sans-serif; font-size: 21px; letter-spacing: -0.03em; line-height: 1; display: inline-flex; align-items: baseline; gap: 3px; }
.wm b { font-weight: 800; }
.wm i { font-style: normal; font-weight: 500; color: var(--mute); }
.brand .mark { overflow: visible; }
.lb { transform-box: fill-box; transform-origin: center; animation: breathe 2.4s ease-in-out infinite; animation-delay: var(--d); }
.brand:hover .lb { animation-duration: 0.9s; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.72); } }
@media (prefers-reduced-motion: reduce) { .lb, .rise, .marker, .flow li, .feed-row { animation: none !important; transition: none !important; } }
h1, h2, .display { font-family: 'Bricolage Grotesque', Inter, sans-serif; }
.pos { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pos:first-child { padding-top: 0; }
.pos-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pos-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
