@font-face {
  font-family: Geist;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/geist:vf@5.2.8/latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #0b0b0e;
  --text: #e4e4e7;
  --bright: #fafafa;
  --muted: #71717a;
  --dim: #a1a1aa;
  --line: #232327;
  --chip: #18181b;
  --buy: #86efac;
  --ink: #052e16;
  --red: #fb7185;
  --green: #4ade80;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.top {
  flex: none;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 28px;
}
.mark { width: 26px; height: 26px; flex: none; display: block; }
.word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--bright);
  line-height: 1;
}
.word span { color: var(--buy); }
.search {
  flex: 1;
  width: auto;
  min-width: 0;
  max-width: 520px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111113;
  padding: 0 12px;
  outline: none;
  font-size: 13px;
}
.search:focus { border-color: #3f3f46; }
.tape {
  flex: none;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 12px;
  height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tape a { display: inline-flex; gap: 6px; align-items: baseline; color: #d4d4d8; }
.tape .up { color: var(--green); }
.tape .down { color: var(--red); }
.main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 320px;
}
.rail, .stage, .trade { min-height: 0; min-width: 0; }
.rail { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; padding: 8px; flex: none; }
.tabs button, .wins button, .tf button, .chips button, .tabs2 button {
  cursor: pointer;
}
.tabs button {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-size: 12px;
}
.tabs button.on { background: #18181b; color: var(--bright); }
.list { overflow: auto; padding: 0 6px 12px; }
.row {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.row:hover { background: #141416; }
.row.on { background: #18181b; }
.av, .ph {
  width: 32px; height: 32px; border-radius: 8px; background: #18181b; object-fit: cover;
}
.ph { display: grid; place-items: center; font-size: 12px; color: var(--dim); font-weight: 600; }
.sym { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--bright); }
.sym i {
  width: 6px; height: 6px; border-radius: 99px; background: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12);
}
.sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.right b { display: block; font-size: 13px; font-weight: 600; color: var(--bright); }
.right span { font-size: 11px; color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }
.empty { padding: 24px 10px; color: var(--muted); font-size: 13px; }
.stage { display: flex; flex-direction: column; }
.coinhead { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px 6px; }
.who { display: flex; gap: 10px; min-width: 0; align-items: flex-start; }
.who img { width: 40px; height: 40px; border-radius: 8px; background: #18181b; object-fit: cover; }
.who h1 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; color: var(--bright); }
.name-row { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.subname { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pills { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.pill { border: 0; background: transparent; color: var(--dim); font-size: 12px; padding: 0; cursor: pointer; }
.back { display: none; border: 0; background: transparent; color: var(--dim); padding: 0; cursor: pointer; font-size: 16px; }
.metrics { display: flex; gap: 16px; align-items: flex-end; }
.metrics div { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.metrics b { font-size: 11px; font-weight: 400; color: var(--muted); }
.metrics strong { font-size: 13px; font-weight: 500; }
.metrics .big strong { font-size: 20px; font-weight: 600; color: var(--bright); }
.tf { display: flex; gap: 2px; align-items: center; padding: 0 8px 4px; }
.tf button { background: transparent; border: 0; color: var(--muted); padding: 4px 7px; border-radius: 4px; font-size: 12px; }
.tf button.on { color: var(--bright); }
.chartwrap { position: relative; flex: 1; min-height: 180px; }
.chartmeta { position: absolute; z-index: 1; left: 12px; top: 8px; font-size: 12px; color: var(--dim); pointer-events: none; }
canvas#chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.trade {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-left: 1px solid var(--line);
}
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tabs2 button { height: 32px; border-radius: 4px; border: 1px solid var(--line); background: transparent; color: var(--dim); }
.tabs2 button.buy.on { background: var(--buy); color: var(--ink); border-color: var(--buy); }
.tabs2 button.sell.on { background: #3f1d24; color: #fecdd3; border-color: #7f1d1d; }
.amt { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); }
.amt input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 14px; }
.amt span { color: var(--dim); font-size: 13px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chips button { height: 28px; border-radius: 4px; border: 1px solid var(--line); background: var(--chip); font-size: 12px; }
.go { height: 40px; border-radius: 6px; background: var(--buy); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.go.sell { background: #f43f5e; color: white; }
.stat { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.wins { display: flex; gap: 2px; }
.wins button { border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.wins button.on { color: var(--bright); background: #18181b; }
.bar { display: flex; height: 4px; border-radius: 99px; overflow: hidden; background: #3f1d24; }
.bar i { display: block; height: 100%; background: var(--green); }
.ca { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.ca button { border: 0; background: transparent; color: var(--dim); font-size: 11px; text-align: left; word-break: break-all; cursor: pointer; padding: 0; }
@media (max-width: 980px) {
  body { overflow: auto; height: auto; }
  .main { display: flex; flex-direction: column; }
  .rail { border-right: 0; }
  .trade { border-left: 0; border-top: 1px solid var(--line); }
  .chartwrap { height: 46vh; }
  .back { display: inline; }
  body:not(.open) .stage, body:not(.open) .trade { display: none; }
  body.open .rail, body.open .tape { display: none; }
  .coinhead { flex-wrap: wrap; }
  .metrics div { align-items: flex-start; }
}
body:not(.coin) .main { display: none; }
body.coin #home, body.coin .ptabs { display: none; }
body:not(.coin):not(.player) { overflow: auto; height: auto; }
.cols {
  flex: 1;
  min-height: 0;
  display: block;
  padding: 4px 12px 48px;
}
.cols section {
  display: none;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}
.cols section.on { display: block; }
.cols h2 { display: none; }
.cols.single section.on h2 {
  display: block;
  position: static;
  margin: 0;
  padding: 10px 8px 2px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--bright);
}
#trend, #live, #fresh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
  padding: 6px 4px 24px;
}
body:not(.coin):not(.player) .row {
  padding: 11px 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}
body:not(.coin):not(.player) .av,
body:not(.coin):not(.player) .ph { width: 42px; height: 42px; border-radius: 10px; }
body:not(.coin):not(.player) .sym,
body:not(.coin):not(.player) .right b { font-size: 14px; }
.cols .hide { display: none; }
a.row { color: inherit; }
@media (max-width: 860px) {
  #trend, #live, #fresh { grid-template-columns: 1fr; }
  .ptabs { grid-template-columns: repeat(3, 1fr); }
}
.liveflag { display: none; }
.ptabs {
  display: none;
  flex: none;
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
  gap: 8px;
  padding: 12px 16px 0;
  border-bottom: 0;
}
body:not(.coin) .ptabs { display: grid; }
.ptabs button {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ptabs button.on { background: #18181b; color: var(--bright); border-color: #3f3f46; }
body.player {
  overflow: hidden;
  height: 100dvh;
  min-height: 0;
}
body.player .top { height: 44px; }
body.player .liveflag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}
body.player .liveflag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--green);
}
body.player .ptabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
body.player #home.cols {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 0;
  padding: 0;
}
body.player .cols section {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.player .cols section.on { display: block; }
body.player .cols h2 { display: none; }
body.player #trend,
body.player #live,
body.player #fresh { display: block; padding: 0 6px 20px; }
