/* ==========================================================================
   浙BA 2026 · 全站样式表
   各页面通过 <body> 上的作用域类区分：
     · index.html    -> <body class="page-index">     首页（今天赛程 + 入口）
     · teams.html    -> <body class="page-teams">      小组积分榜
     · schedule.html -> <body class="page-schedule">   球队 / 小组赛程
     · calendar.html -> <body class="page-calendar">   订阅赛程日历
   结构：1) 共享基础  2) calendar  3) teams  4) schedule  5) index 首页
   赛程行组件 .matches 由 index「今天赛程」与 schedule 共用。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 共享基础（设计令牌 / 重置 / 顶栏骨架 / 卡片 / 页脚 / 提示）
   -------------------------------------------------------------------------- */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1e3a8a;
  --accent-hover: #1e3a8a;
  --on-accent: #ffffff;
  --border: #e5e7eb;
  /* 圆角令牌：集中可配置，改此处即全站生效（--radius 为卡片主圆角） */
  --radius: 7px;
  --radius-logo: 50%;
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 50%;
  --radius-lg: 3px;
  --radius-xl: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px -6px rgba(0,0,0,0.10);
  /* 派生表面 / 状态色：收敛原硬编码颜色，便于深色模式统一覆盖 */
  --header-grad: linear-gradient(135deg, #D2172A 0%, #2563eb 100%);
  --code-bg: rgba(0,0,0,0.05);
  --row-alt: rgba(0,0,0,0.02);
  --row-hover: rgba(37,99,235,0.10);
  --qualify-bg: rgba(37,99,235,0.08);
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --error-border: #fecaca;
}

/* 深色模式：跟随系统偏好，仅覆盖颜色令牌，布局与结构完全不变 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #141d2e;
    --text: #e6e9ef;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-dark: #93c5fd;
    --accent-hover: #3b82f6;
    --on-accent: #0b1220;
    --border: #243044;
    --shadow: 0 1px 3px rgba(0,0,0,0.40), 0 8px 24px -6px rgba(0,0,0,0.55);
    --header-grad: linear-gradient(135deg, #1e3a8a 0%, #D2172A 100%);
    --code-bg: rgba(255,255,255,0.08);
    --row-alt: rgba(255,255,255,0.035);
    --row-hover: rgba(96,165,250,0.18);
    --qualify-bg: rgba(96,165,250,0.1);
    --error-bg: #2c1416;
    --error-text: #fca5a5;
    --error-border: #7f1d1d;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
}

/* 顶栏共享外观（渐变背景满宽 + 光晕装饰）；内容布局与限宽交给 .hbar */
header {
  background: var(--header-grad);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 8px 0;
}
header::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.12) 0%, transparent 40%);
  pointer-events: none;
}
/* 顶栏内容条：单行 flex；大屏（>990px）内容限制在 990px 居中，header 背景仍满宽 */
.hbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 14px;
  min-height: 26px;
}

@media (orientation: landscape) and (min-height: 540px) {
  .hbar {
    min-height: 56px;
  }
}

/* 返回按钮（teams / schedule 顶栏用） */
.back {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.9;
  white-space: nowrap;
}
.back:hover { opacity: 1; text-decoration: underline; }

/* 容器 / 卡片 / 页脚：共享骨架，尺寸差异见各页作用域 */
.wrap { width: 100%; margin: 0 auto; flex: 1; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.footer { text-align: center; color: var(--muted); }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* 加载 / 错误提示（teams / schedule 用） */
.msg { text-align: center; color: var(--muted); }
.msg.error { background: var(--error-bg); color: var(--error-text); }

/* --------------------------------------------------------------------------
   2. calendar.html —— 日历订阅落地页（body.page-calendar）
   -------------------------------------------------------------------------- */
body.page-calendar { line-height: 1.6; }
.page-calendar header h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: calc(100% - 40px);
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-calendar .wrap { max-width: 620px; padding: 28px 20px 48px; }
.page-calendar .card { padding: 28px 24px 24px; text-align: center; }
.page-calendar .footer { padding: 16px 0 32px; font-size: 0.75rem; }

.page-calendar .cal-name { font-size: 1.25rem; font-weight: 700; }
.page-calendar .cal-desc { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.page-calendar .stat-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 18px 0 22px;
  font-size: 0.8rem;
  color: var(--muted);
}
.page-calendar .stat-row b { display: block; font-size: 1.3rem; color: var(--accent); font-weight: 700; }
.page-calendar .btn-group { display: grid; gap: 12px; }
.page-calendar .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.page-calendar .btn .icon { font-size: 1.2rem; line-height: 1; }
.page-calendar .btn .badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}
.page-calendar .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.page-calendar .btn.primary .badge { background: var(--on-accent); color: var(--accent); }
.page-calendar .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.page-calendar .btn:hover:not(.primary) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.page-calendar .hint { margin-top: 16px; font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.page-calendar .hint a { color: var(--accent); text-decoration: none; }
.page-calendar .hint a:hover { text-decoration: underline; }
.page-calendar .toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 10px 20px; border-radius: var(--radius-pill);
  font-size: 0.85rem; opacity: 0; pointer-events: none;
  transition: all 0.3s ease; z-index: 50;
}
.page-calendar .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.page-calendar .guide {
  margin-top: 18px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-xl);
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.7;
}
.page-calendar .guide-title { font-weight: 700; margin-bottom: 8px; color: var(--text); }
.page-calendar .guide-item { color: var(--muted); margin-bottom: 4px; }
.page-calendar .guide-item b { color: var(--text); margin-right: 4px; }
.page-calendar .guide-note { margin-top: 10px; color: var(--muted); font-size: 0.75rem; }

/* --------------------------------------------------------------------------
   3. teams.html —— 小组积分榜（body.page-teams）
   -------------------------------------------------------------------------- */
.page-teams header h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: calc(100% - 140px);
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-teams .wrap { max-width: 1024px; padding: 16px 12px 32px; }
.page-teams .card { padding: 10px 8px; overflow: hidden; }
.page-teams .footer { padding: 12px 16px 28px; font-size: 0.72rem; }
.page-teams .msg { grid-column: 1 / -1; padding: 30px 10px; font-size: 0.85rem; }
.page-teams .msg.error { border: 1px solid var(--error-border); border-radius: var(--radius-xl); padding: 18px; line-height: 1.8; }

/* 小组网格：默认（手机竖屏）2 行 2 列 */
.page-teams .groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.page-teams .group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
  padding-bottom: 7px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--border);
}
.page-teams .group-title a { color: inherit; text-decoration: none; }
.page-teams .group-title a:hover { color: var(--accent); text-decoration: underline; }
.page-teams .row { display: flex; align-items: center; gap: 6px; padding: 6px 4px; border-radius: var(--radius-lg); }
.page-teams .row.head { font-size: 0.66rem; color: var(--muted); font-weight: 500; padding: 2px 4px 6px; }
.page-teams .team.alt { background: var(--row-alt); }
.page-teams .team.qualify { background: var(--qualify-bg); }
.page-teams a.row { text-decoration: none; color: inherit; }
.page-teams a.row.team { cursor: pointer; transition: background .15s ease; margin: 2px 0; }
.page-teams a.row.team:hover { background: var(--row-hover); }
.page-teams .rank {
  flex: 0 0 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
}
.page-teams .rank.top { color: var(--on-accent); background: var(--accent); border-radius: var(--radius-md); }
.page-teams .row.head .rank { color: var(--muted); background: none; }
.page-teams .logo { flex: 0 0 24px; width: 24px; height: 24px; border-radius: var(--radius-logo); }
.page-teams .name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-teams .diff {
  flex: 0 0 34px;
  text-align: center;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
}
.page-teams .row.head .diff { color: var(--muted); font-weight: 500; font-size: 0.66rem; }
.page-teams .wl {
  flex: 0 0 30px;
  text-align: center;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
}
.page-teams .row.head .wl { color: var(--muted); font-weight: 500; font-size: 0.66rem; }
.page-teams .pts {
  flex: 0 0 26px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.page-teams .row.head .pts { color: var(--muted); font-weight: 500; font-size: 0.66rem; }

/* 手机横屏及更宽屏幕：4 个小组并列一排 */
@media (orientation: landscape) {
  .page-teams .groups { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .page-teams .wrap { padding: 22px 18px 22px; }
}


@media (max-width: 1000px) and (orientation: landscape) {
  .page-teams .diff { display: none; }
}
@media (max-width: 840px) and (orientation: landscape) {
  .page-teams .wl { display: none; }
}

/* --------------------------------------------------------------------------
   4. schedule.html —— 球队赛程（body.page-schedule）
   -------------------------------------------------------------------------- */
.page-schedule .htitle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 220px);
}
.page-schedule .hlogo {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  padding: 2px;
}
.page-schedule header h1 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-schedule .hcount {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.85;
  white-space: nowrap;
}
/* 队名后的场均得失分：字号略小、透明度降低，随 h1 一起在空间不足时截断尾部 */
.page-schedule .havg {
  margin-left: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.page-schedule .wrap { max-width: 560px; padding: 16px 12px 32px; }
.page-schedule .card { overflow: hidden; }
.page-schedule .footer { padding: 12px 16px 28px; font-size: 0.72rem; }
.page-schedule .msg { padding: 34px 14px; font-size: 0.88rem; line-height: 1.9; }
.page-schedule .msg a { color: var(--accent); }

/* 赛程行组件（index「今天赛程」与 schedule 共用）：左主队 / 中日期时间+比分或场馆 / 右客队 */
.matches .match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}
.matches .match:last-child { border-bottom: none; }
.matches .match:nth-child(even) { background: var(--row-alt); }
.matches .side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
.matches .side.home { justify-content: flex-start; }
.matches .side.away { justify-content: flex-end; }
.matches .mlogo { flex: 0 0 24px; width: 24px; height: 24px; border-radius: var(--radius-logo); }
.matches .mname {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.matches .side.away .mname { text-align: right; }
.matches .mname.me { color: var(--accent); font-weight: 700; }
.matches .center { flex: 1.3 1 0; min-width: 0; text-align: center; }
.matches .when { font-size: 0.68rem; color: var(--muted); line-height: 1.35; white-space: nowrap; }
.matches .when .date { margin-right: 5px; }
.matches .score {
  margin-top: 3px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.matches .venue { margin-top: 3px; font-size: 0.68rem; color: var(--muted); line-height: 1.3; }

@media (max-width: 380px) {
  .matches .match { gap: 5px; padding: 9px 8px; }
  .matches .side { gap: 5px; }
  .matches .mlogo { flex-basis: 20px; width: 20px; height: 20px; }
  .matches .mname { font-size: 0.82rem; }
  .matches .score { font-size: 0.95rem; }
  .matches .venue, .matches .when { font-size: 0.62rem; }
  .page-schedule .hcount { display: none; }
}

/* 窄屏：隐藏右侧计数并放宽标题限宽，让队名后的场均得失分有足够展示空间 */
@media (max-width: 520px) {
  .page-schedule .hcount { display: none; }
  .page-schedule .htitle { max-width: calc(100% - 120px); }
  .page-schedule .havg { font-size: 0.66rem; }
}

/* --------------------------------------------------------------------------
   5. index.html —— 首页（body.page-index）：今天赛程 + 积分榜 / 日历入口
   -------------------------------------------------------------------------- */
.page-index header h1 {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: calc(100% - 40px);
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-index .wrap { max-width: 680px; padding: 16px 12px 32px; }
.page-index .footer { padding: 12px 16px 28px; font-size: 0.72rem; }

/* 区块标题 */
.page-index .sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-dark);
  border-bottom: 2px solid var(--border);
}
.page-index .sec-title .date { font-size: 0.75rem; font-weight: 500; color: var(--muted); white-space: nowrap; }

/* 可折叠标题：点击标题收起 / 展开该卡片的赛程列表 */
.page-index .sec-title { cursor: pointer; -webkit-user-select: none; user-select: none; }
.page-index .sec-title > span:first-child { flex: 1 1 auto; }
.page-index .sec-title:hover { background: var(--row-alt); }
.page-index .sec-title .caret {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  align-self: center;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);            /* 展开：箭头朝下 */
  transition: transform .15s ease;
}
.page-index .day-card.collapsed .sec-title .caret { transform: rotate(-45deg); } /* 收起：箭头朝右 */
.page-index .day-card.collapsed .matches { display: none; }

/* 当日赛程卡片（今天 / 明天共用） */
.page-index .day-card { overflow: hidden; margin-bottom: 14px; }
.page-index .day-card .msg { padding: 30px 14px; font-size: 0.85rem; line-height: 1.9; }
.page-index .day-card .msg a { color: var(--accent); }

/* 入口卡片：小组积分榜 / 订阅赛程日历 */
.page-index .nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.page-index .nav-card {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.page-index .nav-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px -4px rgba(37,99,235,0.28); }
.page-index .nav-card .ico { font-size: 1.7rem; line-height: 1; }
.page-index .nav-card .t { margin-top: 10px; font-size: 1rem; font-weight: 700; }
.page-index .nav-card .d { margin-top: 3px; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.page-index .nav-card .go { margin-top: 10px; font-size: 0.8rem; font-weight: 600; color: var(--accent); }

@media (max-width: 380px) {
  .page-index .nav { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   6. newTeams.html —— 直播风格积分榜（body.page-newteams）
   直播海报风：左上蓝→右下红渐变 + 模糊球体底纹 + 顶部授权标/联赛标题/
   积分榜标牌 + 白色胶囊战报栏 + 双栏小组积分榜（GROUP C 蓝 / GROUP D 红）
   + 新闻滚动条。固定设计不随深色模式切换，颜色以本作用域变量收敛。
   -------------------------------------------------------------------------- */
body.page-newteams {
  --zb-ink: #0a1c3a;
  --zb-blue: #1e5fd0;
  --zb-red: #d43a2f;
  --zb-red-deep: #a12722;
  --zb-orange: #ff7a1a;
  --zb-orange-light: #ffa14d;
  --zb-gold: #ffd54f;
  /* 本页固定海报设计的圆角令牌（不受全站 --radius 影响） */
  --zb-radius: 10px;
  --zb-radius-panel: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 30px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 30px),
    linear-gradient(135deg, #1e90ff 0%, #4a90e2 30%, #c0502e 70%, #ff4500 100%);
  color: #fff;
}
/* 模糊球体底纹（左右下角装饰光斑） */
body.page-newteams::before,
body.page-newteams::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
body.page-newteams::before { width: 420px; height: 420px; top: -120px; left: -100px; background: rgba(255,255,255,0.22); }
body.page-newteams::after { width: 460px; height: 460px; bottom: -140px; right: -120px; background: rgba(255,122,26,0.3); }
.page-newteams .zb-wrap { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1060px; margin: 0 auto; padding: 18px 14px 26px; }

/* 顶部：授权标识 + 联赛标题 + 积分榜标牌 */
.page-newteams .zb-topline { display: flex; align-items: center; gap: 14px; }
.page-newteams .zb-auth {
  flex: 0 0 auto;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff3c4 0%, var(--zb-gold) 45%, #ef9b00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(122,77,0,0.9)) drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
.page-newteams .zb-league {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(1.05rem, 3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.page-newteams .zb-plate {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--zb-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translateY(4px); /* 原图标牌略低于标题 */
}

/* 最新战报比分栏：白底灰边胶囊，比分紧贴队名两侧 */
.page-newteams .zb-score { margin-top: 16px; text-align: center; }
.page-newteams .zb-score-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  max-width: 100%;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid #c3ccd6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
.page-newteams .zb-s-side { flex: 0 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-newteams .zb-s-name { font-size: 1.05rem; font-weight: 700; color: #1f2937; white-space: nowrap; }
.page-newteams .zb-s-side img {
  width: 34px; height: 34px;
  object-fit: contain;
  border-radius: 50%;
  background: #eef1f5;
  padding: 2px;
}
.page-newteams .zb-s-num { font-size: 2rem; font-weight: 900; color: #111827; font-variant-numeric: tabular-nums; }
.page-newteams .zb-s-tag {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #eef1f5;
  color: #6b7280;
}
.page-newteams .zb-s-venue { margin-top: 8px; font-size: 0.75rem; color: rgba(255,255,255,0.85); }

/* 双栏小组面板：GROUP C 蓝 / GROUP D 红 */
.page-newteams .zb-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.page-newteams .msg { grid-column: 1 / -1; padding: 30px 10px; font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.page-newteams .msg.error {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--zb-radius);
  line-height: 1.8;
  color: #fff;
}
.page-newteams .zb-group { border-radius: var(--zb-radius-panel); padding: 14px 12px; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.page-newteams .zb-group.is-c { background: linear-gradient(165deg, #1d55b0 0%, #2e7de0 100%); }
.page-newteams .zb-group.is-d { background: linear-gradient(165deg, #c03a2b 0%, #e0572f 100%); }
.page-newteams .zb-g-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 行：左侧名称区（前 4 名橙底 / 5-7 名蓝底，右端圆形端帽）+ 右侧白底统计区（竖线分隔） */
.page-newteams .zb-row {
  display: flex;
  align-items: stretch;
  margin: 5px 0;
  border-radius: var(--zb-radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #ffffff; /* 行底为白：名称区右侧圆形边界外露处 */
}
.page-newteams a.zb-row { transition: filter .15s ease; }
.page-newteams a.zb-row:hover { filter: brightness(1.12); }
.page-newteams .zb-left {
  flex: 0 1 auto; /* 宽度贴合内容，不占满整行 */
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 10px;
  padding: 7px 20px 7px 10px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0; /* 右端半圆端帽 */
  background: linear-gradient(90deg, #2f74d8 0%, #4a90e2 100%);
}
.page-newteams .zb-row.is-played .zb-left { background: linear-gradient(90deg, #f45a1d 0%, #ff7a1a 100%); }
/* 右侧白底统计区：三列黑字，竖线分隔，右对齐行尾（与表头标签对齐） */
.page-newteams .zb-stats {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  margin-left: auto;
  background: #ffffff;
}
.page-newteams .zb-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-left: 1px solid #dbe1e8;
  color: #111827;
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.page-newteams .zb-cell:first-child { border-left: none; }
.page-newteams .zb-cell.wl { flex: 0 0 58px; }
.page-newteams .zb-cell.net { flex: 0 0 60px; }
.page-newteams .zb-cell.pts { flex: 0 0 52px; }

/* 表头行：左侧留白与数据行对齐，标签列宽一致，下方浅色分隔线 */
.page-newteams .zb-row.zb-head {
  background: none;
  margin: 0 0 4px;
  border-radius: 0;
  overflow: visible;
  border-bottom: 1px solid rgba(255,255,255,0.28);
}
.page-newteams .zb-row.zb-head .zb-left { flex: 1 1 auto; padding: 2px 10px; margin-right: 0; background: none; border-radius: 0; }
.page-newteams .zb-row.zb-head .zb-stats { background: none; }
.page-newteams .zb-row.zb-head .zb-cell {
  color: rgba(255,255,255,0.85);
  border-left-color: transparent;
  font-weight: 500;
  font-size: 0.66rem;
}
/* 排名：纯数字（无背景、无边框）；积分：橙色圆形徽章 */
.page-newteams .zb-rank {
  flex: 0 0 auto;
  min-width: 16px;
  text-align: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.page-newteams .zb-pts {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--zb-orange-light) 0%, var(--zb-orange) 100%);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.28), 0 1px 3px rgba(0,0,0,0.3);
}
.page-newteams .zb-logo { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.16); }
.page-newteams .zb-name {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 新闻滚动条（红底白字，双份内容无缝循环） */
.page-newteams .zb-news {
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  border-radius: var(--zb-radius);
  overflow: hidden;
  background: linear-gradient(90deg, var(--zb-red-deep), var(--zb-red));
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
}
.page-newteams .zb-news-tag {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 9px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
  background: rgba(0,0,0,0.28);
}
.page-newteams .zb-news-view { flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; }
.page-newteams .zb-news-track { display: inline-flex; white-space: nowrap; animation: zb-news-run 30s linear infinite; font-size: 0.82rem; }
.page-newteams .zb-news-seg { padding-right: 48px; }
@keyframes zb-news-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .page-newteams .zb-news-track { animation: none; } }

.page-newteams .footer { padding: 14px 16px 30px; font-size: 0.72rem; color: rgba(255,255,255,0.6); }

@media (max-width: 700px) {
  .page-newteams .zb-groups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page-newteams .zb-topline { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .page-newteams .zb-league { order: 3; flex-basis: 100%; font-size: 1.05rem; }
  .page-newteams .zb-plate { transform: none; }
  .page-newteams .zb-score-row { gap: 8px; padding: 8px 16px; }
  .page-newteams .zb-s-name { font-size: 0.9rem; }
  .page-newteams .zb-s-num { font-size: 1.5rem; }
  .page-newteams .zb-s-side { gap: 6px; }
  .page-newteams .zb-s-side img { width: 26px; height: 26px; }
  .page-newteams .zb-left { gap: 6px; margin-right: 6px; padding: 6px 16px 6px 8px; }
  .page-newteams .zb-cell { padding: 0 6px; }
  .page-newteams .zb-cell.wl { flex-basis: 46px; }
  .page-newteams .zb-cell.net { flex-basis: 48px; }
  .page-newteams .zb-cell.pts { flex-basis: 42px; }
}

/* --------------------------------------------------------------------------
   7. finals.html —— 总决赛对阵（body.page-finals）
   左右两列分区向中间靠拢：四强半决赛汇向中央总决赛
   -------------------------------------------------------------------------- */
.page-finals .wrap { max-width: 1320px; padding: 16px 12px 32px; }
.page-finals .footer { padding: 12px 16px 28px; font-size: 0.72rem; }
.page-finals .msg { padding: 34px 14px; font-size: 0.88rem; }
.page-finals .note { margin: 12px 0 0; text-align: center; font-size: 0.7rem; color: var(--muted); }

/* 初始队伍配置面板 */
.page-finals .configpanel { margin: 18px 0 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); padding: 10px 14px 14px; }
.page-finals .configpanel summary { cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--accent); }
.page-finals .cfg-hint { margin: 8px 0 10px; font-size: 0.68rem; color: var(--muted); }
.page-finals .cfg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.page-finals .cfg-quad { display: flex; flex-direction: column; gap: 6px; }
.page-finals .cfg-quad h4 { margin: 0; font-size: 0.72rem; font-weight: 700; color: var(--accent); }
.page-finals .cfg-item { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; }
.page-finals .cfg-item label { flex: 0 0 34px; color: var(--muted); font-variant-numeric: tabular-nums; }
.page-finals .cfg-item select { flex: 1 1 auto; min-width: 0; padding: 3px 6px; font-size: 0.72rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.page-finals .cfg-actions { display: flex; gap: 8px; margin-top: 12px; }
.page-finals .cfg-actions button { padding: 5px 12px; font-size: 0.72rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); cursor: pointer; }
.page-finals .cfg-actions button:hover { border-color: var(--accent); color: var(--accent); }
.page-finals .cfg-output { width: 100%; margin-top: 10px; padding: 8px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.66rem; line-height: 1.5; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--muted); resize: vertical; }
@media (max-width: 860px) {
  .page-finals .cfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .page-finals .cfg-grid { grid-template-columns: 1fr; }
}

/* 三栏骨架：左分区 | 汇流线 | 中央四强 | 汇流线 | 右分区 */
.page-finals .bracket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.6fr) 40px minmax(0, 1fr);
  align-items: stretch;
}
.page-finals .side { display: flex; flex-direction: column; justify-content: space-around; gap: 18px; }
.page-finals .conn { position: relative; }
.page-finals .conn::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--border);
}
.page-finals .center { display: flex; align-items: center; justify-content: center; gap: 28px; }
.page-finals .fblock { flex: 1 1 0; max-width: 150px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-finals .fcaption { text-align: center; font-size: 0.66rem; color: var(--muted); font-weight: 500; }
.page-finals .final .fcaption { color: var(--accent); font-weight: 700; }

/* 分区卡片 */
.page-finals .quad {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 10px 12px;
}
.page-finals .qtitle { margin: 0 0 10px; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--accent); }

/* 分区内排布：首轮两场（r1）→ 分区决赛（r2） */
.page-finals .qbracket {
  --fm-h: 56px;
  --fm-gap: 18px;
  display: flex;
  align-items: center;
  gap: var(--fm-gap);
}
.page-finals .qcol { position: relative; min-width: 0; }
.page-finals .qcol.r1 { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--fm-gap); }
.page-finals .qcol.r2 { flex: 0 0 120px; }

/* 对阵框（两行：队名 / 队名） */
.page-finals .qmatch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  height: var(--fm-h);
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.72rem;
}
.page-finals .final .qmatch.done { border-color: var(--accent); }
.page-finals .trow { display: flex; align-items: center; gap: 4px; min-width: 0; }
.page-finals .trow .tname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.page-finals .tlogo { flex: 0 0 16px; width: 16px; height: 16px; border-radius: var(--radius-logo); }
.page-finals .qmatch.done .trow:not(.win) { opacity: 0.5; }
.page-finals .trow.win .tname { font-weight: 700; color: var(--accent); }
.page-finals .trow.win .wmark { font-style: normal; font-weight: 700; color: var(--accent); }
.page-finals .tcode {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.page-finals .trow.win .tcode { color: var(--accent); }
.page-finals .tseries {
  margin-left: auto;
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.page-finals .trow.win .tseries { color: var(--accent); }
.page-finals .tgames {
  display: block;
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.page-finals .trow.tbd .tname { color: var(--muted); font-weight: 400; }

/* 连接线：左分区（向右汇入） */
.page-finals .side.left .qcol.r1 .qmatch::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--fm-gap));
  width: var(--fm-gap);
  height: 2px;
  background: var(--border);
}
.page-finals .side.left .qcol.r1::before {
  content: '';
  position: absolute;
  top: calc(var(--fm-h) / 2);
  right: calc(-1 * var(--fm-gap));
  width: 2px;
  height: calc(var(--fm-h) + var(--fm-gap));
  background: var(--border);
}
.page-finals .side.left .qcol.r2 .qmatch::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--fm-gap));
  width: var(--fm-gap);
  height: 2px;
  background: var(--border);
}
.page-finals .side.left .qcol.r2 .qmatch::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20px;
  width: 20px;
  height: 2px;
  background: var(--border);
}

/* 连接线：右分区（镜像，向左汇入） */
.page-finals .side.right .qbracket { flex-direction: row-reverse; }
.page-finals .side.right .qcol.r1 .qmatch::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--fm-gap));
  width: var(--fm-gap);
  height: 2px;
  background: var(--border);
}
.page-finals .side.right .qcol.r1::before {
  content: '';
  position: absolute;
  top: calc(var(--fm-h) / 2);
  left: calc(-1 * var(--fm-gap));
  width: 2px;
  height: calc(var(--fm-h) + var(--fm-gap));
  background: var(--border);
}
.page-finals .side.right .qcol.r2 .qmatch::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -20px;
  width: 20px;
  height: 2px;
  background: var(--border);
}
.page-finals .side.right .qcol.r2 .qmatch::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--fm-gap));
  width: var(--fm-gap);
  height: 2px;
  background: var(--border);
}

/* 连接线：中央四强（半决赛 ↔ 总决赛） */
.page-finals .sf1 .qmatch::before,
.page-finals .sf1 .qmatch::after,
.page-finals .final .qmatch::before,
.page-finals .final .qmatch::after,
.page-finals .sf2 .qmatch::before,
.page-finals .sf2 .qmatch::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 2px;
  background: var(--border);
}
.page-finals .sf1 .qmatch::before { left: -20px; width: 20px; }
.page-finals .sf1 .qmatch::after { right: -14px; width: 14px; }
.page-finals .final .qmatch::before { left: -14px; width: 14px; }
.page-finals .final .qmatch::after { right: -14px; width: 14px; }
.page-finals .sf2 .qmatch::before { left: -14px; width: 14px; }
.page-finals .sf2 .qmatch::after { right: -20px; width: 20px; }

/* 窄屏：纵向堆叠，隐藏跨栏连接线 */
@media (max-width: 1180px) {
  .page-finals .bracket { display: flex; flex-direction: column; gap: 18px; }
  .page-finals .conn { display: none; }
  .page-finals .center { flex-direction: column; gap: 12px; }
  .page-finals .center .qmatch::before,
  .page-finals .center .qmatch::after { display: none; }
  .page-finals .side.left .qcol.r2 .qmatch::after,
  .page-finals .side.right .qcol.r2 .qmatch::before { display: none; }
  .page-finals .sf1 { order: 1; }
  .page-finals .sf2 { order: 2; }
  .page-finals .final { order: 3; }
  .page-finals .fblock { flex: none; width: 100%; max-width: none; }
}
