:root {
  --bg: #f7f4ec;
  --card: #ffffff;
  --text: #1c2128;
  --muted: #5c6470;
  --line: #e5dfd3;
  --chn-brand: #2f60b2;
  --chn-text: #3f5fa8;
  --chn-solid: #a9c6e8;
  --chn-tint: rgba(169, 198, 232, 0.24);
  --opp-brand: #b33171;
  --opp-text: #9c4777;
  --opp-solid: #e3a8c4;
  --opp-tint: rgba(227, 168, 196, 0.18);
  --win: #166534;
  --win-soft: #e7f6ec;
  --loss: #64748b;
  --loss-soft: #f1f5f9;
  --nav-bg: #24396f;
  --nav-edge: #5b75b5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--chn-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  background: var(--nav-bg);
  border-bottom: 2px solid var(--nav-edge);
  color: #fff;
  padding: 12px 20px;
}
.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { font-weight: 700; font-size: 17px; color: #fff; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: #e2e8f0; }
.container {
  max-width: 1040px;
  margin: 20px auto 40px;
  padding: 0 16px;
}
.site-hero {
  margin-bottom: 16px;
}
.site-hero h1 { font-size: 24px; margin: 0 0 4px; color: var(--nav-bg); }
.site-hero .subtitle { color: var(--muted); font-size: 14px; margin: 0; }
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--chn-brand);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(36, 57, 111, 0.04);
}
h1.page-title { font-size: 22px; margin: 0 0 8px; color: var(--nav-bg); }
h2 { font-size: 17px; margin: 0 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; color: var(--nav-bg); }
.team-chn { color: var(--chn-text); font-weight: 700; }
.team-opp { color: var(--opp-text); font-weight: 700; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.kpi {
  background: #fbf9f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-val { font-size: 20px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--chn-text); }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
th:first-child, td:first-child, th.left, td.left { text-align: left; }
th {
  background: #fbf9f4;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}
tr:hover td { background: #faf8f2; }
tr.chn-row td { background: var(--chn-tint); }
tr.chn-row td:first-child { color: var(--chn-text); font-weight: 700; }
tr.opp-row td { background: var(--opp-tint); }
tr.opp-row td:first-child { color: var(--opp-text); font-weight: 700; }
.chn-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chn-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.opp-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--opp-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-win { background: var(--win-soft); color: var(--win); }
.badge-loss { background: var(--loss-soft); color: var(--loss); }
.linescore td, .linescore th { text-align: center; min-width: 30px; }
.linescore td:first-child, .linescore th:first-child { text-align: left; min-width: 80px; }
.linescore .total-col { font-weight: 700; background: #fbf9f4; }
.linescore tr.chn-row .total-col { background: var(--chn-solid); color: var(--nav-bg); }
.linescore tr.opp-row .total-col { background: var(--opp-solid); color: #3b1228; }
.table-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.moment-list { list-style: none; padding: 0; margin: 0; }
.moment-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--chn-brand);
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fcfbf8;
  font-size: 14px;
}
.moment-list li.moment-opp {
  border-left-color: var(--opp-brand);
}
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.mobile-cards { display: none; }
.m-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--chn-brand);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fcfbf8;
}
.m-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.m-card-meta { font-size: 12px; color: var(--muted); }
.m-card-score { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--nav-bg); }
.m-card-src { font-size: 12px; color: var(--muted); }
.footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 20px 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.footer p { margin: 4px 0; }
@media (max-width: 640px) {
  body { font-size: 14px; }
  .card { padding: 14px 12px; }
  th, td { padding: 7px 8px; font-size: 13px; }
  .desktop-game-table { display: none; }
  .mobile-cards { display: block; }
}
