:root {
  --bg: #0c0c0e;
  --bg-2: #101114;
  --line: #22242b;
  --text: #f3f4f6;
  --muted: #8d929c;
  --dim: #5c616b;
  --green: #3dd68c;
  --green-2: #7dffa8;
  --ink: #04140c;
  --red: #ff6b78;
  --amber: #f0b90b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; }

.top {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  background: #09090b;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 7px; flex: none; }
.brand i {
  width: 22px; height: 22px; border-radius: 5px;
  display: grid; place-items: center;
  background: var(--green); color: var(--ink);
  font-style: normal; font-weight: 800; font-size: 11px;
}
.brand b { font-size: 15px; letter-spacing: -0.04em; }
.desk { display: flex; gap: 2px; flex: none; }
.desk a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
}
.desk a.on, .desk a:hover { color: var(--text); }
.search {
  margin-left: auto;
  width: min(340px, 28vw);
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  border-radius: 8px;
  background: #16171c;
  border: 1px solid #2a2c33;
  color: var(--muted);
}
.search svg { width: 14px; height: 14px; flex: none; }
.search span { flex: 1; white-space: nowrap; overflow: hidden; }
.search kbd {
  border: 1px solid #34363e;
  border-radius: 4px;
  padding: 0 5px;
  color: var(--dim);
  font-family: inherit;
  font-size: 11px;
}
.top-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.cook, .chain {
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
}
.cook i, .chain i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.cook i { background: #3a3d46; }
.chain i { background: linear-gradient(135deg, #9945ff, #14f195); }
.ghost-ico {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid #2a2c33;
}
.wallet {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #2a2c33;
  background: #14151a;
}
.wallet svg { width: 14px; height: 14px; color: var(--green); }
.wallet span { display: flex; flex-direction: column; line-height: 1.1; }
.wallet b { font-size: 12px; font-weight: 650; }
.wallet small { color: var(--dim); font-size: 10px; }

.sub {
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #09090b;
}
.sub-l, .sub-r { display: flex; align-items: center; gap: 6px; }
.drop { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 13px; }
.drop svg, .ib svg, .textbtn svg { width: 14px; height: 14px; }
.ib {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; color: var(--muted);
}
.textbtn {
  height: 24px; display: inline-flex; align-items: center; gap: 4px;
  padding: 0 6px; color: var(--muted); font-weight: 550;
}
.count {
  min-width: 22px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  border: 1px solid #2a2c33; border-radius: 4px; color: var(--muted);
}
.switch {
  height: 22px; display: inline-flex; align-items: center; gap: 5px;
  color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.switch i {
  width: 26px; height: 14px; border-radius: 99px; background: #2a2c33; position: relative;
}
.switch i::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 10px; height: 10px; border-radius: 50%; background: #8d929c;
}

.board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.col:last-child { border-right: 0; }
.chead {
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.chead h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -0.02em; }
.ksearch {
  margin-left: 4px;
  flex: 1;
  min-width: 0;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 6px;
  background: #14151a;
  border: 1px solid #2a2c33;
  color: var(--dim);
}
.ksearch svg { width: 12px; height: 12px; flex: none; }
.ksearch span { overflow: hidden; white-space: nowrap; }
.mini, .pset {
  height: 20px; min-width: 20px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 4px; border: 1px solid #2a2c33;
  color: var(--muted); font-size: 10px; font-weight: 650;
}
.pset.on { color: var(--green-2); border-color: #1d5c3d; }
.rows { overflow: auto; min-height: 0; }
.rows::-webkit-scrollbar { width: 8px; }
.rows::-webkit-scrollbar-thumb { background: #2c2e36; border-radius: 4px; }

.row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "ava name nums"
    "ava meta nums"
    "ava code buy"
    "ava pills buy";
  column-gap: 8px;
  row-gap: 2px;
  padding: 8px 8px 8px 10px;
  border-bottom: 1px solid #191b20;
  align-items: center;
}
.row:hover { background: #121318; }
.ava {
  grid-area: ava;
  width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 11px; letter-spacing: -0.03em;
  position: relative; align-self: start; margin-top: 2px;
}
.ava.g { background: linear-gradient(160deg, #1c8f55, #0c3324); color: #e7fff2; }
.ava.b { background: linear-gradient(160deg, #3d4e86, #1a213c); }
.ava.a { background: linear-gradient(160deg, #8a6824, #3a2a0e); color: #ffe8b0; }
.ava.r { background: linear-gradient(160deg, #8a3144, #2c1219); }
.ava.n { background: #1a1c22; color: #d5d8de; border: 1px solid #2c2e36; }
.ava.ring::after {
  content: "";
  position: absolute; inset: -3px; border-radius: 11px;
  border: 1.5px solid rgba(61, 214, 140, 0.45);
}
.name { grid-area: name; min-width: 0; display: flex; align-items: center; gap: 4px; }
.name b { font-size: 13px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.name span {
  color: var(--muted); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ext { width: 11px; height: 11px; color: var(--dim); flex: none; }
.meta, .code { color: var(--dim); font-size: 11px; display: flex; align-items: center; gap: 5px; min-width: 0; }
.meta { grid-area: meta; }
.code { grid-area: code; }
.meta em { color: var(--muted); font-style: normal; font-weight: 600; }
.meta s { text-decoration: none; }
.sq { width: 9px; height: 9px; border: 1px solid #3a3e48; border-radius: 2px; display: inline-block; }
.sq.g { background: #143728; border-color: #1f8f55; }
.pills { grid-area: pills; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.pills span, .meter {
  height: 16px; display: inline-flex; align-items: center;
  padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: 650;
}
.ok { background: rgba(61, 214, 140, 0.12); color: var(--green-2); }
.bad { background: rgba(255, 107, 120, 0.12); color: var(--red); }
.dim { background: #1a1c22; color: var(--muted); }
.nums {
  grid-area: nums;
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 12px;
  justify-items: end;
  align-self: start;
  padding-top: 1px;
}
.nums span { display: inline-flex; gap: 4px; align-items: baseline; }
.nums i { font-style: normal; color: var(--dim); font-size: 10px; font-weight: 600; }
.nums b { font-weight: 650; font-size: 12px; }
.nums b.g, .g { color: var(--green); }
.buy {
  grid-area: buy;
  justify-self: end;
  align-self: end;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--green);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.buy svg { width: 11px; height: 11px; }

.dockbar {
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  background: #09090b;
  color: var(--muted);
  font-size: 11px;
}
.dockbar .grow { flex: 1; }
.dockbar .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #3a3d46; display: inline-block; margin-right: 5px;
}
.amber { color: var(--amber); font-weight: 650; }
.legal {
  margin: 0;
  flex: none;
  padding: 4px 10px 6px;
  background: #09090b;
  color: #4e535c;
  font-size: 10px;
  line-height: 1.4;
}
.dock { display: none; }

@media (max-width: 1100px) {
  .ghost-ico { display: none; }
  .desk a { padding: 6px; }
  .pset, .ksearch { display: none; }
}

@media (max-width: 860px) {
  body { overflow: auto; height: auto; padding-bottom: 46px; }
  .desk, .search, .cook, .ghost-ico { display: none; }
  .board { display: block; }
  .col { border-right: 0; border-top: 1px solid var(--line); }
  .rows { overflow: visible; }
  .name span { white-space: normal; }
  .nums { gap: 1px 8px; }
  .dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 46px;
    background: #09090b;
    border-top: 1px solid var(--line);
    z-index: 5;
  }
  .dock a {
    display: grid; place-items: center;
    color: var(--muted); font-size: 12px; font-weight: 600;
  }
}
