:root {
  --bg: #060510;
  --bg-2: #12111a;
  --bg-3: #161522;
  --bg-4: #1e1d2a;
  --line: rgba(203, 208, 235, 0.1);
  --line-soft: rgba(203, 208, 235, 0.06);
  --text: #f7f7f7;
  --text-2: #9899a3;
  --text-3: #474b52;
  --up: #21c95e;
  --up-bg: rgba(33, 201, 94, 0.16);
  --down: #ff622e;
  --down-bg: rgba(255, 98, 46, 0.16);
  --blue: #516af6;
  --blue-bg: rgba(81, 106, 246, 0.16);
  --warn: #ffc74f;
  --warn-bg: rgba(255, 199, 79, 0.1);
  --pink: #fd5dd3;
  --left: 340px;
  --right: 364px;
  --gap: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 12px/16px "Geist", "Aeonik", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.tri { font-size: 7px; vertical-align: 1px; margin-right: 2px; }
sub { font-size: 0.72em; vertical-align: -0.28em; line-height: 0; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(203, 208, 235, 0.16); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* header */
.top {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr 616px 1fr;
  align-items: center;
  padding: 0 16px 0 20px;
}
.top-left { display: flex; align-items: center; gap: 34px; }
.wordmark { font-size: 30px; line-height: 30px; font-weight: 700; letter-spacing: -1.2px; margin-top: -2px; }
.top-nav { font-size: 16px; line-height: 24px; color: var(--text-2); margin-top: 4px; }
.top-nav:hover, .top-nav.active { color: var(--text); }
.search {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: text;
}
.search:hover, .search:focus-within { border-color: rgba(203, 208, 235, 0.2); }
.search .ico { color: var(--text-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; line-height: 20px; }
.search input::placeholder { color: var(--text-2); }
.chip { height: 20px; padding: 0 6px; border-radius: 4px; background: var(--bg-4); color: var(--text-2); font: 500 10px/20px inherit; font-family: inherit; }
.search-results {
  position: absolute;
  top: 54px; left: 0; right: 0;
  max-height: 520px;
  overflow: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.search-results .empty { padding: 18px; text-align: center; color: var(--text-2); }
.top-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.wallet { height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.wallet .v { font-size: 14px; line-height: 18px; }
.wallet .muted { font-size: 12px; }
.wallet-pnl { border: 0; padding: 6px 4px; }
.link-blue { color: var(--blue); font-size: 12px; line-height: 16px; }
.me { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; color: #fff; margin-left: 4px; }

/* layout */
#app { height: calc(100vh - 72px - 28px); padding: 0 16px 4px; }
.token-layout { height: 100%; display: grid; grid-template-columns: var(--left) minmax(0, 1fr) var(--right); gap: var(--gap); }
.token-layout.no-left { grid-template-columns: minmax(0, 1fr) var(--right); }
.col { min-height: 0; display: flex; flex-direction: column; }

/* left panel */
.side { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; padding-bottom: 8px; }
.side-head { height: 36px; flex: none; display: flex; align-items: center; padding: 8px 8px 8px 12px; background: var(--bg-2); border-radius: 12px 12px 0 0; font-size: 14px; line-height: 20px; }
.side-head button { color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.side-head button.active { color: var(--text); }
.side-head .sep { width: 1px; height: 14px; background: var(--line); margin: 0 8px; }
.side-head .collapse { margin-left: auto; color: var(--text-3); }
.pills { flex: none; display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); font-size: 12px; line-height: 22px; white-space: nowrap; }
.pill:hover { color: var(--text); }
.pill.active { background: var(--line); color: var(--text); border-color: transparent; }
.tlist { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 0 8px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 8px; height: 53px; border-radius: 8px; }
.trow:hover { background: var(--bg-3); }
.trow.current { background: var(--bg-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-4); display: grid; place-items: center; font-size: 12px; color: var(--text-2); overflow: hidden; }
.avatar.lg { width: 40px; height: 40px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.trow .meta { min-width: 0; flex: 1; }
.trow .sym { font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .px { color: var(--text-2); }
.trow .right { text-align: right; }
.trow .mc { font-size: 14px; line-height: 20px; white-space: nowrap; }
.side-empty { padding: 32px 20px; text-align: center; color: var(--text-2); line-height: 18px; }
.side-empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.side-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 8px 0; }
.ghost-btn { height: 28px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: not-allowed; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* token header */
.thead { flex: none; height: 55px; display: flex; align-items: center; gap: 12px; padding: 0 0 7px; }
.tid { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tid .n1 { display: flex; align-items: center; gap: 6px; font-size: 16px; line-height: 20px; }
.tid .n2 { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin-top: 2px; }
.tid .n2 .age { color: var(--text); }
.icon-box { width: 20px; height: 20px; border-radius: 4px; background: var(--bg-4); display: inline-grid; place-items: center; color: var(--text-2); }
.icon-box svg { width: 12px; height: 12px; }
.icon-btn { color: var(--text-2); display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; }
.star.on { color: var(--warn); }
.star.on svg { fill: var(--warn); }
.ca { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.ca:hover { color: var(--text-2); }
.ca svg { width: 12px; height: 12px; }
.stats { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.stat-mc { padding: 0 16px; text-align: center; }
.stat-mc .l { font-size: 12px; line-height: 16px; }
.stat-mc .v { font-size: 18px; line-height: 22px; }
.stat { min-width: 76px; height: 44px; padding: 6px 12px; background: var(--bg-2); border-radius: 8px; text-align: center; }
.stat .l { color: var(--text-2); font-size: 12px; line-height: 16px; white-space: nowrap; }
.stat .v { font-size: 14px; line-height: 20px; white-space: nowrap; }

/* chart */
.chart-wrap { flex: none; height: 527px; background: var(--bg-2); display: flex; flex-direction: column; position: relative; }
.chart-tools { height: 38px; flex: none; display: flex; align-items: center; padding: 0 8px; gap: 4px; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 14px; }
.chart-tools .tool { height: 30px; padding: 0 8px; border-radius: 4px; display: flex; align-items: center; gap: 6px; }
.chart-tools .tool:hover { background: var(--bg-4); }
.chart-tools .vsep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.chart-tools .pm { font-size: 13px; }
.chart-tools .pm b { font-weight: 500; color: var(--text); }
.chart-tools .pm .on { color: var(--blue); }
.chart-tools .pm .off { color: var(--text); }
.chart-tools .right { margin-left: auto; display: flex; gap: 2px; }
.chart-tools .dis { color: var(--text-3); cursor: default; }
.tf-menu { position: absolute; top: 40px; left: 8px; z-index: 20; background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 4px; min-width: 120px; }
.tf-menu button { display: block; width: 100%; text-align: left; padding: 6px 10px; border-radius: 4px; font-size: 13px; }
.tf-menu button:hover, .tf-menu button.active { background: var(--bg-4); }
.chart-body { flex: 1; min-height: 0; position: relative; }
#chart { position: absolute; inset: 0; }
.legend { position: absolute; top: 8px; left: 12px; z-index: 5; pointer-events: none; font-size: 13px; line-height: 20px; }
.legend .row1 { display: flex; gap: 6px; flex-wrap: wrap; }
.legend .row1 .title { color: var(--text); }
.legend .ohlc span { margin-right: 6px; }
.legend .ohlc i { font-style: normal; color: var(--text); }
.legend .vol { color: var(--text-2); }
.chart-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); z-index: 4; pointer-events: none; }
.chart-foot { height: 34px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 8px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.chart-foot button { height: 26px; padding: 0 8px; border-radius: 4px; }
.chart-foot button:hover { background: var(--bg-4); }
.chart-foot button.active { color: var(--blue); }
.chart-foot .right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.chart-foot .clock { color: var(--text); margin-right: 8px; font-variant-numeric: tabular-nums; }
.chart-foot .vsep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.chart-foot .auto { background: var(--bg-4); }

.overlays { flex: none; height: 40px; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 12px; }
.overlays .t { color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { display: none; }
.check .box { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--text-3); display: grid; place-items: center; }
.check input:checked + .box { background: var(--blue); border-color: var(--blue); }
.check input:checked + .box::after { content: ""; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.check.disabled { opacity: 0.45; cursor: not-allowed; }
.check svg { width: 12px; height: 12px; }
.resize-grip { flex: none; height: 6px; display: grid; place-items: center; }
.resize-grip::after { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--bg-4); }

/* table panel */
.panel { flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.panel-head { height: 40px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; background: var(--bg-2); }
.ptabs { display: flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; }
.ptabs button { color: var(--text-3); padding: 0 4px; }
.ptabs button.active { color: var(--text); }
.ptabs .sep { width: 1px; height: 14px; background: var(--line); margin: 0 4px; }
.panel-opts { display: flex; gap: 16px; align-items: center; font-size: 12px; }
.grid-head, .grow { display: grid; align-items: center; padding: 0 12px; gap: 8px; }
.grid-head { height: 28px; flex: none; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--line-soft); }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; }
.grow { min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
.grow:hover { background: var(--bg-3); }
.holders .grid-head, .holders .grow { grid-template-columns: 240px 144px 124px 125px minmax(0, 1fr); }
.swaps .grid-head, .swaps .grow { grid-template-columns: minmax(0, 1fr) 66px 108px 108px 52px; }
.swaps .grow { min-height: 35px; padding-top: 2px; padding-bottom: 2px; }
.swaps .t-right { text-align: right; }
.trader { display: flex; align-items: center; gap: 10px; min-width: 0; }
.trader .nm { font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trader .sub { color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.trader .sub svg { width: 11px; height: 11px; }
.cell .a { font-size: 14px; line-height: 20px; }
.cell .b { color: var(--text-2); }
.cell .a .unit { color: var(--text-2); font-size: 12px; }
.badge { display: inline-block; height: 18px; padding: 0 5px; border-radius: 4px; font-size: 11px; line-height: 18px; }
.badge.buy { color: var(--up); background: var(--up-bg); }
.badge.sell { color: var(--down); background: var(--down-bg); }
.panel-empty { padding: 40px 20px; text-align: center; color: var(--text-2); line-height: 18px; }
.panel-empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.panel-note { padding: 8px 12px; color: var(--text-3); font-size: 11px; }
a.tx:hover .nm { text-decoration: underline; }

/* right column */
.right-col { overflow-y: auto; padding-bottom: 8px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.bs { display: grid; grid-template-columns: 1fr 1fr 28px; gap: 8px; align-items: center; }
.bs button { height: 40px; border-radius: 10px; font-size: 16px; line-height: 24px; background: var(--bg-2); color: var(--text-2); }
.bs button.buy.active { background: rgba(33, 201, 94, 0.14); color: var(--up); }
.bs button.sell.active { background: rgba(255, 98, 46, 0.14); color: var(--down); }
.bs .gear { background: none; color: var(--text-2); height: 28px; display: grid; place-items: center; }
.amount { height: 70px; background: var(--bg-2); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid transparent; }
.amount:focus-within { border-color: var(--line); }
.amount input { width: 60%; background: none; border: 0; outline: 0; font-size: 30px; line-height: 36px; color: var(--text); }
.amount input::placeholder { color: var(--text-3); }
.amount .hint { color: var(--text-3); font-size: 14px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.presets button { height: 32px; border-radius: 8px; background: var(--bg-2); font-size: 14px; }
.presets button:hover { background: var(--bg-3); }
.bal { font-size: 14px; color: var(--text-2); padding: 0 4px; }
.bal b { color: var(--blue); font-weight: 500; }
.cta { height: 44px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--bg-2); color: var(--text-2); font-size: 16px; cursor: not-allowed; }
.warn { border-radius: 12px; background: var(--warn-bg); overflow: hidden; }
.warn-head { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--warn); font-size: 14px; width: 100%; }
.warn-head svg { width: 16px; height: 16px; }
.warn-head .chev { margin-left: auto; color: var(--text-2); transition: transform 0.15s; }
.warn.open .chev { transform: rotate(180deg); }
.warn-list { display: none; padding: 0 12px 12px 36px; }
.warn.open .warn-list { display: block; }
.warn-list div { margin-top: 8px; }
.warn-list b { display: block; color: var(--text); font-weight: 500; }
.warn-list span { color: var(--text-2); }

.about { margin-top: 16px; border-radius: 12px; padding: 8px 8px 20px; position: relative; margin-bottom: 24px; }
.about h3 { margin: 4px 4px 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.about .desc { margin: 0 4px 6px; color: var(--text-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.about .desc.has { color: var(--text-2); }
.wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wins button { height: 44px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--text-2); }
.wins button.active { background: var(--bg-4); border-color: transparent; }
.flow { margin: 6px 4px 0; }
.flow .lbl { display: flex; justify-content: space-between; font-size: 14px; line-height: 20px; margin-top: 8px; }
.flow .lbl span { color: var(--text-2); font-size: 12px; }
.flow .bar { display: flex; gap: 4px; height: 4px; margin-top: 4px; }
.flow .bar i { display: block; height: 100%; border-radius: 2px; min-width: 4px; }
.flow .bar i.g { background: var(--up); }
.flow .bar i.r { background: var(--down); }
.flow .bar.empty i { background: var(--bg-4); }
.links { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 4px 4px; }
.links a { height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.links a:hover { background: var(--bg-3); }
.links svg { width: 12px; height: 12px; }
.more { margin: 12px 4px 0; display: none; }
.about.open .more { display: block; }
.more .kv { display: flex; align-items: baseline; gap: 8px; height: 28px; line-height: 28px; }
.more .kv .k { color: var(--text-2); }
.more .kv .dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.more .kv .v { display: inline-flex; align-items: center; gap: 4px; }
.more .kv .v img { width: 14px; height: 14px; border-radius: 3px; }
.view-more { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg-4); color: var(--text-2); font-size: 12px; }
.view-more:hover { color: var(--text); }

.positions { padding: 0 8px; }
.positions .ph { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.positions h3 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 500; }
.positions h3 span { color: var(--text-2); font-size: 14px; margin-left: 4px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; font-size: 12px; }
.seg button { height: 22px; padding: 0 6px; border-radius: 6px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.seg button.active { background: var(--blue-bg); color: var(--blue); }
.seg button.active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.positions .empty { padding: 24px 0; color: var(--text-2); text-align: center; }

/* discover */
.disc { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.disc .pills { padding: 12px; }
.disc-grid { display: grid; grid-template-columns: 40px minmax(0, 2fr) repeat(3, minmax(0, 1fr)); align-items: center; gap: 12px; padding: 0 16px; }
.disc-head { height: 32px; color: var(--text-2); border-bottom: 1px solid var(--line-soft); }
.disc-body { flex: 1; overflow-y: auto; }
.disc-body .disc-grid { height: 56px; font-size: 14px; }
.disc-body .disc-grid:hover { background: var(--bg-3); }
.disc-body .rank { color: var(--text-3); }
.disc .r { text-align: right; }

/* footer */
.foot { position: fixed; inset: auto 0 0 0; height: 28px; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: var(--bg); border-top: 1px solid var(--line); }
.ticker { display: flex; gap: 16px; }
.tick { display: flex; align-items: center; gap: 6px; }
.tick img { width: 14px; height: 14px; border-radius: 50%; }
.foot-right { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.foot-right a:hover { color: var(--text); }
.foot-right svg { width: 14px; height: 14px; }
.status { display: flex; align-items: center; gap: 6px; color: var(--up); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.bad { color: var(--warn); }

.toast { position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px; z-index: 100; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.notfound { height: 100%; display: grid; place-items: center; text-align: center; color: var(--text-2); }
.notfound b { display: block; font-size: 20px; color: var(--text); margin-bottom: 8px; }
