:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;
  --gridline: #e1e0d9;
  --baseline: #c3c2b7;
  --hairline: rgba(11, 11, 11, 0.1);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19;
    --ink: #ffffff; --ink-2: #c3c2b7; --ink-3: #898781;
    --gridline: #2c2c2a; --baseline: #383835;
    --hairline: rgba(255, 255, 255, 0.1);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

.title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.fist { margin-right: 10px; }
.subtitle { margin: 6px 0 32px; font-size: 15px; color: var(--ink-2); }

.stats {
  display: flex;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
  margin-bottom: 24px;
}
.stat { flex: 1; padding: 0 20px; border-left: 1px solid var(--hairline); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat-value { display: block; font-size: 24px; font-weight: 600; }
.stat-label { font-size: 12.5px; color: var(--ink-2); }

.warning { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); }

.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 20px 16px 8px;
  height: 380px;
}

.legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-name { font-weight: 600; }
.legend-total { color: var(--ink-2); }

.table-wrap { margin-top: 32px; }
.section-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-3);
  padding: 6px 12px;
  border-bottom: 1px solid var(--baseline);
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--gridline); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .person { white-space: nowrap; }
.table .msg { white-space: pre-line; }
.table-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }

.empty { padding: 32px 0; font-size: 15px; color: var(--ink-2); }
.page-foot { margin-top: 40px; font-size: 12px; color: var(--ink-3); }

@media (max-width: 640px) {
  .page { padding: 32px 16px 32px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .stat { border-left: none; padding: 0; }
  .chart-wrap { height: 300px; }
}
