html{scrollbar-gutter:stable}
/* ============================================================
   竞彩情报站 · 站点样式（base.html 页面：about / methodology / disclaimer）
   ------------------------------------------------------------
   2026-10-03 起对齐首页模板 v2.2 设计系统（STANDARDS.md 4.6），不再对齐
   D:\足彩预测\website：品牌色 = 标准红 #DC2626，画布 = #F1F3F1，正文 =
   思源黑体 14px；顶部导航 + 下划线页签；单一明色主题（暗色开关已随
   主题分裂一并移除）。颜色换算：
   #F1F3F1 = hsl(120 9% 95%) / #1C241F = hsl(144 12% 13%) / #5A665E = hsl(140 6% 38%)
   #E4E9E5 = hsl(132 10% 90%) / #DC2626 = hsl(0 72% 51%) / #4B5563 = hsl(215 14% 34%)
   #15803D = hsl(142 72% 29%)（胜负绿加深至 WCAG AA，2026-10-03）
   ============================================================ */

/* ===== 设计令牌（对齐首页模板 v2.2，明色单主题） ===== */
:root {
  --radius: 0.65rem;
  --background: 120 9% 95%;    /* 页面画布 #F1F3F1：内容卡纯白，灰画布衬托层次 */
  --foreground: 144 12% 13%;
  --card: 0 0% 100%;
  --card-foreground: 144 12% 13%;
  --popover: 0 0% 100%;
  --popover-foreground: 144 12% 13%;
  --primary: 0 72% 51%;
  --primary-foreground: 0 0% 100%;
  --secondary: 120 9% 95%;
  --secondary-foreground: 144 12% 20%;
  --muted: 120 9% 94%;
  --muted-foreground: 140 6% 38%;
  --accent: 120 8% 93%;
  --accent-foreground: 144 12% 20%;
  --border: 132 10% 90%;
  --input: 132 10% 90%;
  --ring: 0 72% 51%;
  --brand: 0 72% 51%;          /* 标准红（同首页 --red #DC2626） */
  --brand-mark: 0 72% 51%;     /* 品牌红球底色（同首页侧栏 logo） */

  --win: 0 72% 51%;
  --draw: 215 14% 34%;
  --lose: 142 72% 29%;
  --up: 0 72% 51%;
  --down: 142 72% 29%;
}

* { box-sizing: border-box; border-color: hsl(var(--border)); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid hsl(var(--brand)); outline-offset: 2px; }
.mono, .num { font-variant-numeric: tabular-nums; }

/* ===== 布局容器 ===== */
.container-page { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.site-main { flex: 1 1 auto; width: 100%; padding-top: 24px; padding-bottom: 24px; }

/* ===== 顶部导航（60px、下划线页签） ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
}
.site-header-in { display: flex; align-items: center; gap: 32px; height: 60px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: hsl(var(--brand)); flex: none; }
.site-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: hsl(var(--brand-mark)); color: #fff;
}
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.site-nav a {
  display: flex; align-items: center; height: 60px; padding: 0 16px;
  font-size: 16px; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
  color: hsl(var(--muted-foreground));
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: hsl(var(--brand)); }
.site-nav a.on { color: hsl(var(--brand)); border-bottom-color: hsl(var(--brand)); font-weight: 700; }
.site-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.member-login-btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  border-radius: 8px; background: hsl(var(--brand)); color: #fff;
  font-size: 14px; font-weight: 600; transition: filter .15s ease;
}
.member-login-btn:hover { filter: brightness(1.08); }
.site-nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  border: 1px solid hsl(var(--border)); background: transparent;
  color: hsl(var(--foreground)); font-size: 16px; line-height: 1;
}
.site-mobile-nav { display: none; border-top: 1px solid hsl(var(--border)); }
.site-mobile-nav a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: hsl(var(--muted-foreground)); }
.site-mobile-nav a.on { color: hsl(var(--brand)); font-weight: 600; }

/* ===== 页脚 ===== */
.site-footer { margin-top: 48px; border-top: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.2); }
.site-footer-in {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 32px; padding-bottom: 32px; font-size: 14px; line-height: 20px; color: hsl(var(--muted-foreground));
}
.site-footer-title { font-weight: 700; color: hsl(var(--brand)); font-size: 16px; line-height: 22px; }
.site-footer-sub { margin-top: 4px; font-size: 13px; line-height: 18px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; line-height: 20px; }
.site-footer-links a:hover { color: hsl(var(--brand)); }
.site-footer-slogan { border-top: 1px solid hsl(var(--border) / 0.6); }
.site-footer-slogan p { padding: 16px 0; text-align: center; font-size: 13px; line-height: 18px; color: hsl(var(--muted-foreground)); }

/* ============================================================
   首页版块（类名与 Next app/home.css 一一对应）
   ============================================================ */
.home-root { --hm-radius: 4px; --hm-card-radius: 12px; --hm-logo: 22px; --hm-logo-rank: 16px; }

/* ---- 卡片通用 ----
   2026-09-26 起与详情页统一：单层纯白圆角卡（12px、无边框、无投影），
   靠浅灰画布（--background）色差分层；页签/磁贴等小控件仍用 --hm-radius(4px)。 */
.home-card { background: hsl(var(--card)); border-radius: var(--hm-card-radius); overflow: hidden; }
.home-card-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 16px; border-bottom: 1px solid hsl(var(--border));
}
.home-card-header h2 {
  font-size: 16px; font-weight: 600; line-height: 1.2;
  padding-left: 12px; border-left: 3px solid hsl(var(--brand));
}
.home-more { font-size: 13px; color: hsl(var(--muted-foreground)); }
.home-more:hover { color: hsl(var(--brand)); }

/* ---- 页签 ---- */
.home-tab-bar { display: flex; gap: 8px; }
.home-tab {
  padding: 4px 12px; font-size: 13px; line-height: 1.5;
  color: hsl(var(--muted-foreground)); background: transparent;
  border: 1px solid hsl(var(--border)); border-radius: var(--hm-radius);
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.home-tab:hover { color: hsl(var(--brand)); border-color: hsl(var(--brand)); }
.home-tab[data-active="true"] { color: #fff; background: hsl(var(--brand)); border-color: hsl(var(--brand)); }

/* ---- 主布局：内容列 + 340px 侧栏 ---- */
.home-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.home-content-col, .home-side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- 比赛列表 ---- */
.home-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px 0; }
.home-filterbar select {
  padding: 4px 8px; font-size: 13px; color: hsl(var(--foreground));
  background: hsl(var(--background)); border: 1px solid hsl(var(--border));
  border-radius: var(--hm-radius); font-family: inherit;
}
.home-filter-count { margin-left: auto; font-size: 13px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.home-empty { padding: 32px 16px; text-align: center; font-size: 13px; color: hsl(var(--muted-foreground)); }
.home-match-scroll { overflow-x: auto; }
.home-match-table { min-width: 560px; padding-bottom: 8px; }
.home-match-head, .home-match-row {
  display: grid; grid-template-columns: 136px 72px minmax(0, 1fr) 120px minmax(0, 1fr);
  gap: 8px; align-items: center;
}
.home-match-head {
  padding: 8px 16px; font-size: 12px; color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
}
.hm-head-home { text-align: right; }
.hm-head-score { text-align: center; }
a.home-match-row { padding: 10px 16px; border-top: 1px solid hsl(var(--border)); transition: background .15s ease; }
a.home-match-row:hover { background: hsl(var(--muted) / 0.4); }

/* ---- 竞彩期次分组（组头 + 组内行） ---- */
#match-rows > :first-child { border-top: 0; }
.hm-period {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-top: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.55);
  font-size: 12px; line-height: 16px;
}
.hm-period-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border-radius: var(--hm-radius); background: hsl(var(--brand)); color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hm-period-week { font-size: 12px; font-weight: 500; color: hsl(var(--foreground)); }
.hm-period-hint { font-size: 12px; color: hsl(var(--brand)); }
.hm-period-count { margin-left: auto; font-size: 12px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.hm-match-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-comp { font-size: 12px; color: hsl(var(--muted-foreground)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-time { font-size: 12px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-status { font-size: 12px; white-space: nowrap; }
.hm-status-live { color: hsl(var(--up)); font-weight: 600; }
.hm-status-await { color: hsl(var(--draw)); }
.hm-muted { color: hsl(var(--muted-foreground)); }
.hm-team { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hm-home { text-align: right; }
.hm-away { text-align: left; }
.hm-score { text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-score-vs { color: hsl(var(--muted-foreground)); font-weight: 400; font-size: 13px; }

/* ---- 队徽（比分区：主队徽 · 比分/VS · 客队徽） ---- */
.hm-score-cell {
  display: grid; grid-template-columns: var(--hm-logo) minmax(0, 1fr) var(--hm-logo);
  gap: 7px; align-items: center; min-width: 0;
}
/* 槽位固定尺寸：没有队徽时也占位，否则比分/VS 的居中会左右漂移 */
.hm-logo-slot { display: inline-flex; align-items: center; justify-content: center; width: var(--hm-logo); height: var(--hm-logo); flex: none; }
.hm-logo { display: block; width: var(--hm-logo); height: var(--hm-logo); object-fit: contain; }
.home-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px 16px; }
.home-pager-info { font-size: 13px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.home-page-btn {
  padding: 4px 12px; font-size: 13px; color: hsl(var(--foreground));
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--hm-radius); cursor: pointer; font-family: inherit;
}
.home-page-btn:hover:not(:disabled) { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.home-page-btn:disabled { opacity: .4; cursor: default; }

/* ---- 赛事数据（联赛卡片） ---- */
.home-data-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
.home-data-cell {
  height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; border: 1px solid hsl(var(--border)); border-radius: var(--hm-radius);
  transition: border-color .15s ease, background .15s ease;
}
.home-data-cell:hover { border-color: hsl(var(--brand)); background: hsl(var(--muted) / 0.4); }
.home-data-league { font-size: 14px; font-weight: 600; }
.home-data-count { font-size: 12px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }

/* ---- 积分榜 ---- */
.home-rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 0; }
.home-rank-body { display: flex; flex-direction: column; padding: 8px 12px 12px; }
.home-rank-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 26px 46px 34px 34px 48px 26px;
  gap: 4px; align-items: center; height: 30px; font-size: 12px; font-variant-numeric: tabular-nums;
}
.home-rank-head { height: 24px; font-size: 11px; color: hsl(var(--muted-foreground)); }
.home-rank-team { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; min-width: 0; }
.home-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 队徽槽同样固定尺寸，保证各行队名起始位置一致 */
.home-rank-logo { display: block; width: var(--hm-logo-rank); height: var(--hm-logo-rank); flex: none; object-fit: contain; }
.home-logo-blank { display: block; flex: none; }
.hm-num { text-align: center; white-space: nowrap; }
.home-rank-pts { font-weight: 600; }
.home-rank-foot { padding: 0 12px 12px; font-size: 12px; color: hsl(var(--muted-foreground)); }

/* ---- 快捷入口 ---- */
.home-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }
.home-quick-cell {
  height: 56px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; border: 1px solid hsl(var(--border)); border-radius: var(--hm-radius);
  transition: border-color .15s ease, color .15s ease;
}
.home-quick-cell:hover { color: hsl(var(--brand)); border-color: hsl(var(--brand)); }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .home-main { grid-template-columns: 1fr; }
  .home-data-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .site-nav-toggle { display: inline-flex; }
  .site-mobile-nav.open { display: block; }
}
@media (min-width: 993px) {
  .site-footer-in { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* 会员登录入口（header 右侧，2026-10） */
.member-login-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: hsl(var(--brand)); color: #fff;
  font-size: 13.5px; font-weight: 600; line-height: 1.2;
  text-decoration: none; transition: filter .15s, transform .1s;
}
.member-login-btn:hover { filter: brightness(1.12); color: #fff; }
.member-login-btn:active { transform: translateY(1px); }
