:root {
  --red: #e11d48;
  --green: #059669;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

header {
  background: linear-gradient(135deg, #1e3a5f, #2b4a73);
  color: #fff;
  padding: 20px 16px;
}
.head-inner { max-width: 1600px; margin: 0 auto; }
header h1 { font-size: 22px; letter-spacing: 1px; }
.subtitle { color: #cbd5e1; font-size: 13px; margin-top: 4px; }

main { max-width: 1600px; margin: 0 auto; padding: 16px; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.panel-head h2 { font-size: 16px; }
.hint { color: var(--muted); font-size: 12px; }
.desc { color: var(--muted); font-size: 12px; margin-bottom: 6px; }

select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  max-width: 180px;
}
.chart { width: 100%; height: 380px; }
.holder-grid { display: grid; gap: 16px; }
#holder-rank { height: 420px; }
#holder-trend { height: 280px; }
@media (min-width: 1000px) {
  .holder-grid { grid-template-columns: 1fr 1fr; }
  #holder-rank, #holder-trend { height: 400px; }
}

/* ── 表格 ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th {
  color: var(--muted);
  font-weight: 500;
  background: #fafafa;
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f9fafb; }
.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: var(--muted); }

.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 11px; display: block; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}
.badge.up { background: #fef2f2; }
.badge.down { background: #ecfdf5; }
.badge.flag { background: #fffbeb; color: #b45309; }

footer { max-width: 1600px; margin: 0 auto; padding: 12px 16px 32px; }
footer p { color: var(--muted); font-size: 12px; }

.empty { color: var(--muted); text-align: center; padding: 40px; font-size: 14px; }

@media (max-width: 600px) {
  .chart { height: 300px; }
  header h1 { font-size: 18px; }
  th, td { padding: 7px 9px; font-size: 12px; }
  #overview-table { table-layout: fixed; }
  #overview-table th, #overview-table td { padding: 7px 5px; font-size: 11.5px; }
  #overview-table th:nth-child(1), #overview-table td:nth-child(1) { width: 30%; white-space: normal; }
  #overview-table th:nth-child(2), #overview-table td:nth-child(2) { width: 18%; }
  #overview-table th:nth-child(3), #overview-table td:nth-child(3) { width: 18%; }
  #overview-table th:nth-child(4), #overview-table td:nth-child(4) { width: 20%; }
  #overview-table th:nth-child(5), #overview-table td:nth-child(5) { width: 14%; }
  #signal-table { table-layout: fixed; }
  #signal-table th, #signal-table td { padding: 7px 5px; font-size: 11.5px; }
  #signal-table th:nth-child(1), #signal-table td:nth-child(1) { width: 10%; }
  #signal-table th:nth-child(2), #signal-table td:nth-child(2) { width: 50%; white-space: normal; }
  #signal-table th:nth-child(3), #signal-table td:nth-child(3) { width: 25%; }
  #signal-table th:nth-child(4), #signal-table td:nth-child(4) { width: 15%; }
}
