/* ============================================================
   竞彩情报站 · 兼容层样式
   ------------------------------------------------------------
   非首页模板（leagues / league_detail / match_detail / search /
   about / methodology / disclaimer）仍在使用旧类名。本文件把
   这些类按新设计令牌等值重写，保证全站观感统一。
   顺序：须在 site.css 之后加载。
   ============================================================ */

.t2 { font-size: 12px; }
.t3 { font-size: 14px; }
.t4 { font-size: 16px; font-weight: 600; }
.t5 { font-size: 20px; font-weight: 600; }
.t6 { font-size: 26px; font-weight: 700; }
.muted { color: hsl(var(--muted-foreground)); }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.ta-l { text-align: left; }

.c-win { color: hsl(var(--win)); }
.c-draw { color: hsl(var(--draw)); }
.c-lose { color: hsl(var(--lose)); }

/* ---- 卡片 ---- */
.card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 10px; padding: 16px; margin-bottom: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid hsl(var(--border)); }
.page-title { font-size: 20px; font-weight: 700; margin: 8px 0 16px; }
.page-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.empty { color: hsl(var(--muted-foreground)); padding: 24px 0; text-align: center; }

/* ---- 场次列表 ---- */
.badge-diff { background: hsl(var(--win)); color: #fff; border-radius: 6px; padding: 0 8px; font-weight: 600; }
.chip { background: hsl(var(--muted)); border-radius: 6px; padding: 0 8px; font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.chip-dan { background: hsl(var(--win)); color: #fff; }
.score-wrap { overflow-x: auto; }
.score-table { border-top: 1px solid hsl(var(--border)); min-width: 760px; }
.score-head, .score-row {
  display: grid; grid-template-columns: 96px 116px 64px minmax(0, 1fr) 80px minmax(0, 1fr) 100px 100px;
  gap: 8px; align-items: center;
}
.score-head { padding: 8px; font-size: 12px; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .5); }
.score-row { padding: 12px 8px; border-top: 1px solid hsl(var(--border)); }
.score-row:hover { background: hsl(var(--muted) / .3); }
.cell-league { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.jc-no { font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.row-time { font-size: 16px; font-weight: 500; white-space: nowrap; }
.row-status { font-size: 12px; }
.st-live { font-weight: 600; }
.team-cell { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-cell { font-size: 16px; font-weight: 700; }
.row-metric { font-size: 12px; }

/* ---- 联赛 / 磁贴 ---- */
.empty-leagues { margin-top: 16px; }
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.league-card { border: 1px solid hsl(var(--border)); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.league-card:hover { border-color: hsl(var(--brand)); background: hsl(var(--muted) / .4); }
.lib-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.lib-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 10px; border: 1px solid transparent; }
.lib-tile:hover { border-color: hsl(var(--border)); background: hsl(var(--muted) / .4); }
.lib-mark { width: 44px; height: 44px; border-radius: 6px; background: hsl(var(--muted)); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.lib-count { font-size: 10px; }

/* ---- 积分榜（旧表格） ---- */
.standings-panel { margin-top: 12px; }
.panel-meta { margin-bottom: 8px; }
.st-table { border: 1px solid hsl(var(--border)); border-radius: 6px; overflow: hidden; }
.st-head, .st-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 72px; gap: 8px; padding: 4px 12px; align-items: center; }
.st-head { background: hsl(var(--muted) / .5); font-size: 12px; color: hsl(var(--muted-foreground)); }
.st-row { border-top: 1px solid hsl(var(--border)); }
.st-rank { display: inline-flex; align-items: center; gap: 4px; color: hsl(var(--muted-foreground)); }
.st-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-dot { display: inline-block; width: 4px; height: 14px; border-radius: 999px; flex: none; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.st-legend span { display: inline-flex; align-items: center; gap: 4px; }
.st-row:nth-child(2) .st-rank { color: hsl(var(--win)); font-weight: 700; }
.st-row:nth-child(3) .st-rank, .st-row:nth-child(4) .st-rank { color: hsl(var(--foreground)); font-weight: 700; }

/* ---- 比赛详情 ---- */
.match-hero-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.status-badge { border-radius: 999px; padding: 1px 8px; font-size: 12px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.st-scheduled { background: hsl(var(--brand) / .12); color: hsl(var(--brand)); }
.st-finished { background: hsl(var(--muted)); }
.match-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 0; }
.side { text-align: center; }
.team-name { font-size: 26px; font-weight: 700; }
.vs-mid { text-align: center; }
.vs .score { font-size: 26px; font-weight: 700; }
.market-block { border-top: 1px solid hsl(var(--border)); padding: 12px 0; }
.market-title { margin-bottom: 8px; }
.odds-table { width: 100%; border-collapse: collapse; }
.odds-table th, .odds-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid hsl(var(--border)); }
.odds-table thead th { font-size: 12px; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .5); }
.odds-table tbody th { font-weight: 600; white-space: nowrap; }
.support-row { display: flex; gap: 24px; flex-wrap: wrap; }
.sup-cell { display: flex; flex-direction: column; gap: 2px; }
.payload { background: hsl(var(--muted) / .5); border: 1px solid hsl(var(--border)); border-radius: 6px; padding: 8px 12px; font-size: 12px; overflow-x: auto; font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow-y: auto; }

/* ---- 搜索 / 长文 ---- */
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form input { flex: 1; border: 1px solid hsl(var(--border)); border-radius: 10px; padding: 8px 12px; font-size: 14px; background: hsl(var(--background)); color: hsl(var(--foreground)); font-family: inherit; }
.search-form button { border: 0; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-radius: 10px; padding: 8px 16px; font-size: 14px; cursor: pointer; font-family: inherit; }
.team-list { line-height: 2.2; }
.prose p, .prose li { margin-bottom: 8px; }
.prose h2 { margin: 16px 0 8px; }
.prose a { color: hsl(var(--brand)); }
.prose ul, .prose ol { padding-left: 24px; margin: 8px 0; }

@media (max-width: 720px) {
  .match-vs { grid-template-columns: 1fr; text-align: center; }
  .lib-grid { grid-template-columns: repeat(4, 1fr); }
}
