:root {
  --bg: #0e1117;
  --bg2: #151a23;
  --bg3: #1c2330;
  --line: #26303f;
  --fg: #e6edf7;
  --fg2: #9aa8bd;
  --fg3: #6b7a90;
  --ok: #2ebd85;
  --brand: #4c8dff;
  --up: #f6465d;
  --down: #2ebd85;
  --radius: 10px;
}
html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg2: #ffffff;
  --bg3: #eef2f8;
  --line: #e2e8f2;
  --fg: #10151d;
  --fg2: #5b6a80;
  --fg3: #8a97a8;
  --ok: #0a9b6c;
  --brand: #2f6fe4;
  --up: #d92b3f;
  --down: #0a9b6c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1240px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.logo {
  height: 28px; padding: 0 10px; border-radius: 8px;
  background: linear-gradient(135deg, #5b9cff, #2f6fe4);
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center; letter-spacing: .1px;
}
.spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg2);
  background: var(--bg3); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.dot.warn { background: #f5a623; }
.dot.off { background: var(--fg3); }
.icon-btn {
  background: var(--bg3); border: 1px solid var(--line); color: var(--fg2);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 14px;
}
.icon-btn:hover { color: var(--fg); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 18px; }
.cards {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.card .k { font-size: 12px; color: var(--fg2); }
.card .v { font-size: 22px; font-weight: 650; margin-top: 4px; letter-spacing: -.3px; }
.card .s { font-size: 11px; color: var(--fg3); margin-top: 4px; }

/* QQ 群横幅 */
.join {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background:
    linear-gradient(90deg, rgba(255,208,130,.10), rgba(255,208,130,.02) 62%),
    var(--bg2);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.join-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.join-ic {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(46,189,133,.12); color: #3fbf8f;
}
html[data-theme="light"] .join-ic { background: rgba(10,155,108,.10); color: #0a9b6c; }
.join-title { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.join-sub { font-size: 12px; color: var(--fg3); margin-top: 3px; }
.join-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  background: linear-gradient(180deg, #ffe3a6, #f3bd5b);
  color: #3a2a05; font-weight: 650; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; white-space: nowrap;
  transition: filter .15s ease;
}
.join-btn:hover { filter: brightness(1.05); }
.join-btn:active { filter: brightness(.95); }

/* 概览卡：左右分栏（在售种数 | 退市图） */
.card.split { display: flex; justify-content: space-between; gap: 12px; }
.card .side { text-align: right; }
.card .side .v { font-size: 18px; }

/* 大盘情绪（第三张卡） */
.mood-bar { display: flex; gap: 3px; height: 8px; margin: 16px 0 10px; }
.mood-bar .seg { display: block; height: 100%; border-radius: 4px; }
.mood-bar .up { background: var(--up); }
.mood-bar .flat { background: var(--bg3); }
.mood-bar .dn { background: var(--down); }
.mood-legend { display: flex; gap: 18px; font-size: 12px; color: var(--fg2); }
.mood-legend b { margin-left: 5px; font-weight: 650; font-size: 15px; color: var(--fg); font-variant-numeric: tabular-nums; }
.mood-legend b.up { color: var(--up); }
.mood-legend b.dn { color: var(--down); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }.tabs { display: inline-flex; background: var(--bg3); border-radius: 9px; padding: 3px; gap: 2px; }
.tab {
  border: 0; background: transparent; color: var(--fg2); cursor: pointer;
  padding: 7px 14px; border-radius: 7px; font-size: 13px;
}
.tab.on { background: var(--bg2); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.18); }

.table-wrap {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg3); color: var(--fg2); font-weight: 500; font-size: 12px;
  text-align: left; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--bg3); }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; color: var(--fg3); font-size: 12px; }
.name { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.thumb {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
  background: var(--bg3); flex: none;
}
.nm { font-weight: 500; }
.sub-name { font-size: 11px; color: var(--fg3); }
.dim { color: var(--fg3); }
.empty { padding: 48px 20px; text-align: center; color: var(--fg3); }

.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.rank-item:last-child { border-bottom: 0; }
.rank-no {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; background: var(--bg3); color: var(--fg2); flex: none;
}
.bar { height: 3px; background: var(--brand); border-radius: 2px; margin-top: 5px; opacity: .55; }

/* 近十分钟买入榜 */
.recent-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-weight: 650; font-size: 14px;
}
.recent-head .dim { font-weight: 400; font-size: 12px; }


.note {
  margin-top: 14px; font-size: 12px; color: var(--fg3);
  display: flex; gap: 6px; align-items: flex-start; line-height: 1.6;
}
@media (max-width: 780px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wrap { padding: 12px; }
  .hide-sm { display: none; }
}

/* 全部藏品：板块/子区树 */
.tree-board td { background: rgba(76,141,255,.06); }
.tree-board .nm { font-weight: 600; }
.tree-sum td { border-top: 1px solid var(--line); font-weight: 600; }

@media (max-width: 560px) {
  .join { flex-direction: column; align-items: stretch; gap: 12px; }
  .join-btn { justify-content: center; }
  .mood-legend { gap: 18px; }
}

/* 其他帮助（QQ 群入口卡） */
.help-wrap { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.help-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  color: inherit; text-decoration: none; transition: border-color .15s ease;
}
.help-card:hover { border-color: rgba(243,189,91,.55); }
.help-card:active { filter: brightness(.97); }
.help-ic {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(243,189,91,.14); color: #f3bd5b; font-weight: 700;
}
html[data-theme="light"] .help-ic { background: rgba(214,158,46,.14); color: #b8860b; }
