/* =====================================================================
   盯盘台 V2 组件库 + 应用外壳
   依赖：tokens.css（先加载）
   范围：按钮/卡片/chip/弹层/底导/顶栏/状态组件/比赛详情组件/动效
   ===================================================================== */

/* =====================================================================
   1. 应用外壳：玻璃顶栏 + 底部 Tab 栏 + 全屏二级页容器
   ===================================================================== */
.app-hd {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--sp-4) 10px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-line);
}
.app-hd .brand {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-17); font-weight: 800; letter-spacing: .5px;
}
.app-hd .brand .ball {
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--accent); color: var(--accent-on);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.app-hd .date-pill {
  font-size: var(--fs-12); color: var(--txt-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.app-hd .grow { flex: 1; }
.app-hd .updated { font-size: var(--fs-11); color: var(--txt-3); font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--txt); font-size: var(--fs-15);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex: 0 0 auto;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.icon-btn:active { transform: scale(.92); background: var(--surface-3); }

main { padding: var(--sp-4) var(--sp-4) var(--sp-8); max-width: 760px; margin: 0 auto; }

/* ---- 底部 Tab 栏（移动优先；桌面变侧栏感知由 media query 处理） ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-line);
}
.tabbar button {
  flex: 1; background: none; border: 0; padding: 5px 2px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--tab-off); font-size: var(--fs-11); font-family: var(--font);
  font-weight: 500; cursor: pointer; border-radius: var(--r-md);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  min-height: 48px; -webkit-user-select: none; user-select: none;
}
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button:active { transform: scale(.9); }
.tabbar button.on { color: var(--accent); font-weight: 700; }
.tabbar .tb-dot {
  position: absolute; top: 2px; right: calc(50% - 14px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--lose);  /* 红点=提醒/危险 */
}
body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

/* ---- 全屏二级页（比赛详情等，push 导航） ---- */
.subpage {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: sp-in var(--dur) var(--ease);
}
@keyframes sp-in { from { transform: translateX(18px); opacity: .4; } to { transform: none; opacity: 1; } }
.subpage .sp-hd {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--sp-4) 10px;
  border-bottom: 1px solid var(--line);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  flex: 0 0 auto;
}
.subpage .sp-hd .t { font-size: var(--fs-17); font-weight: 700; flex: 1; text-align: center; }
.subpage .sp-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   2. 按钮
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-on);
  border: 0; border-radius: var(--r-md);
  padding: 11px 16px; font-size: var(--fs-15); font-weight: 700;
  font-family: var(--font); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); filter: brightness(.92); }
.btn.wide { width: 100%; padding: 13px; }
.btn.cta { box-shadow: 0 0 24px var(--accent-glow); }   /* 唯一光晕：主 CTA */
.btn-2 {
  background: var(--surface-2); color: var(--txt);
  border: 1px solid var(--line); font-weight: 600;
}
.btn-2:active { background: var(--surface-3); }
.btn-danger { background: transparent; color: var(--lose); border: 1px solid var(--lose); }  /* 危险=红 */
.btn:disabled, .btn[disabled] { opacity: .38; pointer-events: none; }
.btn.sm { padding: 7px 12px; font-size: var(--fs-13); border-radius: var(--r-sm); }
button { font-family: var(--font); }

/* =====================================================================
   3. 卡片与表面
   ===================================================================== */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
}
.card-pad0 { padding: 0; overflow: hidden; }
.hd {
  display: flex; align-items: baseline; gap: var(--sp-2);
  font-size: var(--fs-13); font-weight: 700; color: var(--txt);
  margin: 0 0 10px;
}
.hd .sub { font-weight: 400; color: var(--txt-3); font-size: var(--fs-11); }
.muted { color: var(--txt-2); font-size: var(--fs-12); }

/* =====================================================================
   4. 数据 chip 家族（概率三层 / 赔率 / 状态）
   ===================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-11); font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--txt-2);
  border: 1px solid transparent; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* 概率三层语言：市场=中性+蓝源标 / 模型=薄荷淡彩 / 综合=薄荷实心 */
.chip-pm { background: var(--surface-2); color: var(--txt); border-color: var(--line); }
.chip-pm .src { color: var(--blue); font-weight: 700; }
.chip-pmod { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip-pcomp { background: var(--accent); color: var(--accent-on); font-weight: 800; }
/* 赔率 */
.chip-odds { background: var(--surface-2); color: var(--txt); border-color: var(--line); }
.chip-odds b { font-weight: 800; }
.chip-odds .up { color: var(--up); }     /* 赔率涨=绿（绿赚：回报变高） */
.chip-odds .dn { color: var(--dn); }     /* 赔率跌=红（红赔：回报变少） */
/* 比赛状态 */
.chip-live { background: var(--accent-soft); color: var(--accent); }
.chip-warn { background: var(--warn-dim); color: var(--warn); }
.chip-win  { background: var(--win-dim); color: var(--win); }
.chip-lose { background: var(--lose-dim); color: var(--lose); }
/* LIVE 呼吸点（克制：仅状态徽标一处） */
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* 数据来源 + 更新时间角标（概率/赔率/情报必备） */
.src-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--txt-3); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.src-tag i { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); display: inline-block; }

/* 情报可信度四级：official > media > expected > unknown */
.conf { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--r-sm); }
.conf-official { background: var(--accent-soft); color: var(--accent); }
.conf-media { background: rgba(10,132,255,.14); color: var(--blue); }
.conf-expected { background: var(--warn-dim); color: var(--warn); }
.conf-unknown { background: var(--surface-3); color: var(--txt-3); }

/* =====================================================================
   5. 列表行 / 分段控件 / 表单
   ===================================================================== */
.lrow {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 13px var(--sp-4); background: var(--surface-1);
  border-bottom: 1px solid var(--line); cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.lrow:active { background: var(--surface-2); }
.lrow .t { flex: 1; font-size: var(--fs-15); }
.lrow .v { color: var(--txt-2); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.lrow .chev { color: var(--txt-3); font-size: var(--fs-13); }
.lgroup { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--sp-3); }
.lgroup .lrow:last-child { border-bottom: 0; }

.seg {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: var(--txt-2);
  font-size: var(--fs-13); font-weight: 600; padding: 6px 14px;
  border-radius: 9px; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.seg button.on { background: var(--accent); color: var(--accent-on); }

.fld {
  width: 100%; background: var(--surface-2); color: var(--txt);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px; font-size: var(--fs-15); outline: none;
  transition: border-color var(--dur-fast) var(--ease);
  font-family: var(--font);
}
.fld:focus { border-color: var(--accent); }
.fld::placeholder { color: var(--txt-3); }

/* =====================================================================
   6. 弹层 / 底部面板 / Toast
   ===================================================================== */
.sheet-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in var(--dur) var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 86vh; max-height: 86dvh;
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  animation: sheet-up var(--dur) var(--ease);
  margin-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet .sh-hd {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-4) var(--sp-2); flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
.sheet .sh-hd .t { flex: 1; font-size: var(--fs-17); font-weight: 700; }
.sheet .sh-body { padding: var(--sp-4); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet .sh-x {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-3); color: var(--txt-2); border: 0;
  font-size: var(--fs-15); cursor: pointer; flex: 0 0 auto;
}

#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  background: var(--surface-3); color: var(--txt);
  border: 1px solid var(--line-strong);
  padding: 9px 16px; border-radius: 999px;
  font-size: var(--fs-13); font-weight: 600; z-index: 90;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  box-shadow: var(--shadow-2); max-width: 82vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   7. 状态：骨架屏 / 空 / 错误 / 进度
   ===================================================================== */
.skel {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s var(--ease) infinite;
}
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty {
  text-align: center; color: var(--txt-2);
  padding: var(--sp-8) var(--sp-4); font-size: var(--fs-13); line-height: 1.9;
}
.empty .ic { font-size: 30px; display: block; margin-bottom: var(--sp-2); opacity: .55; }
.err-box {
  background: var(--warn-dim); border: 1px solid var(--warn);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-13); color: var(--txt); line-height: 1.7;
}
/* 真实进度（不伪造百分比）：阶段条 */
.stage-bar { display: flex; gap: 6px; align-items: center; }
.stage-bar .st {
  flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden;
}
.stage-bar .st.done { background: var(--accent); }
.stage-bar .st.run { background: var(--accent-soft); }
.stage-bar .st.run::after {
  content: ""; display: block; height: 100%; width: 40%;
  background: var(--accent); border-radius: 2px;
  animation: indet 1.1s var(--ease) infinite;
}
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* =====================================================================
   8.5 「我的」页组件（阶段 5）
   ===================================================================== */
/* 个人头卡：徽章头像 + 昵称身份 + 截图用量 */
.me-hero { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); }
.me-hero .me-av {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-press));
  color: var(--accent-on); font-size: var(--fs-22); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.me-hero .me-id { flex: 1; min-width: 0; }
.me-hero .me-id b { display: block; font-size: var(--fs-17); font-weight: 800; }
.me-hero .me-id span { font-size: var(--fs-12); }
.me-hero .me-quota {
  flex: 0 0 auto; font-size: var(--fs-12); font-weight: 700; color: var(--txt-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px;
}
/* 设置分组（账号/通知/外观…）：组头 + 组卡 */
.set-g { margin: var(--sp-5) 0 var(--sp-2); padding: 0 var(--sp-1); }
.set-g .sg-t { font-size: var(--fs-12); font-weight: 700; color: var(--txt-3); letter-spacing: .5px; }
/* 外观选择说明行 */
.theme-note { font-size: var(--fs-12); color: var(--txt-2); line-height: 1.7; margin-bottom: var(--sp-3); }
#themeSeg { width: 100%; }
#themeSeg button { flex: 1; padding: 8px 0; }

/* =====================================================================
   8.6 公告页组件（阶段 5）
   ===================================================================== */
.cl-item {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-4); margin-bottom: var(--sp-3);
}
.cl-item .cl-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.cl-item .cl-ver {
  font-size: var(--fs-12); font-weight: 800; font-family: var(--font-num);
  background: var(--accent-soft); color: var(--accent);
  padding: 3px 10px; border-radius: 999px;
}
.cl-item .cl-date { font-size: var(--fs-11); color: var(--txt-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.cl-item .cl-title { font-size: var(--fs-15); font-weight: 800; line-height: 1.5; margin-bottom: var(--sp-2); }
.cl-sec { margin-top: var(--sp-3); }
.cl-sec .cs-t {
  font-size: var(--fs-11); font-weight: 700; color: var(--txt-3);
  letter-spacing: .8px; margin-bottom: var(--sp-1);
  display: flex; align-items: center; gap: 5px;
}
.cl-sec ul { margin: 0; padding: 0; list-style: none; }
.cl-sec li { font-size: var(--fs-13); line-height: 1.75; padding: 3px 0 3px 14px; position: relative; color: var(--txt); }
.cl-sec li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cl-sec.cs-limits li { color: var(--txt-2); font-size: var(--fs-12); }
.cl-sec.cs-limits li::before { background: var(--warn); }
.cl-sec.cs-cost { font-size: var(--fs-12); color: var(--txt-2); line-height: 1.8; }
.cl-empty-ic { font-size: 34px; display: block; margin-bottom: var(--sp-2); opacity: .5; }

/* 公告页默认折叠（R15）：只展开「用户能得到什么」三条，其余进 details。
   原来 22 条全展开 27,035px（约 32 屏），手机上翻不到头。 */
.cl-top { margin: var(--sp-2) 0 0; padding: 0; list-style: none; }
.cl-top li {
  font-size: var(--fs-13); line-height: 1.7; padding: 3px 0 3px 14px;
  position: relative; color: var(--txt);
}
.cl-top li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.cl-more { margin-top: var(--sp-3); border-top: 1px dashed var(--line); padding-top: var(--sp-2); }
.cl-more summary {
  cursor: pointer; font-size: var(--fs-12); color: var(--txt-3);
  display: flex; align-items: center; gap: 6px; list-style: none;
  padding: 4px 0; user-select: none;
}
.cl-more summary::-webkit-details-marker { display: none; }
.cl-more summary::before {
  content: "▸"; display: inline-block; transition: transform .15s; font-size: 10px;
}
.cl-more[open] summary::before { transform: rotate(90deg); }

/* =====================================================================
   8.7 历史页组件（阶段 5）
   ===================================================================== */
/* 统计三卡：V2 化（大数字 + 语义色） */
.hstats { display: grid; grid-template-columns:repeat(3,1fr); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.hst {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-2); text-align: center;
}
.hst-l { font-size: var(--fs-11); color: var(--txt-3); margin-bottom: 4px; font-weight: 600; }
.hst-p { font-size: var(--fs-22); font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.hst-p.plus { color: var(--win); }
.hst-p.minus { color: var(--lose); }
.hst-s { font-size: 10.5px; color: var(--txt-3); margin-top: 4px; line-height: 1.5; }
/* 月度小计：跨天汇总（只统计已结算票，待赛果单独提示） */
.hm-h {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 16px 2px 8px; padding: 0 2px;
  font-size: var(--fs-12); color: var(--txt-3);
}
.hm-h b { font-size: var(--fs-13); color: var(--txt); font-weight: 800; }
.hm-h .grow { flex: 1; }
.hm-h .hm-p { font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-h .hm-p.plus { color: var(--win); }
.hm-h .hm-p.minus { color: var(--lose); }
.hm-h .hm-pend { font-size: 10.5px; color: var(--txt-3); }
/* 日期组头：粘顶 + 毛玻璃（滚动时日期不丢） */
.hgroup { margin-bottom: var(--sp-4); }
.hg-h {
  display: flex; align-items: center; gap: var(--sp-2);
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 52px); z-index: 10;
  padding: 7px 10px; margin: 0 -2px var(--sp-2);
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: var(--r-md); border: 1px solid var(--glass-line);
  font-size: var(--fs-12); color: var(--txt-2);
}
.hg-h b { font-size: var(--fs-13); color: var(--txt); font-weight: 800; }
.hg-h .grow { flex: 1; }
/* 票卡：状态色条 + 展开明细 */
.hcard {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2); cursor: pointer; position: relative; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease);
}
.hcard:active { transform: scale(.985); background: var(--surface-2); }
.hcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-strong); }
.hcard.st-win::before { background: var(--win); }
.hcard.st-partial::before { background: var(--warn); }
.hcard.st-dead::before, .hcard.st-lose::before { background: var(--lose); }
.hcard.st-live::before, .hcard.st-halftime::before { background: var(--live); }
.hcard.st-expired { opacity: .8; }
.hcard.st-expired::before { background: var(--line-strong); }
.hc-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hc-owner { font-size: var(--fs-11); color: var(--txt-3); }
.hc-m { margin-top: 5px; font-size: var(--fs-12); color: var(--txt-2); font-variant-numeric: tabular-nums; }
.hc-legs { margin-top: var(--sp-2); border-top: 1px dashed var(--line); padding-top: var(--sp-2); }
.hl { font-size: var(--fs-12); padding: 3px 0; color: var(--txt-2); font-variant-numeric: tabular-nums; line-height: 1.6; }
.hl.ok { color: var(--win); }
.hl.bad { color: var(--lose); }
.hl b { font-weight: 800; color: var(--txt); margin-right: 2px; }
.hl .hl-t { color: var(--txt-3); }
.hpick { font-size: var(--fs-11); margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.hpick.ok { color: var(--win); background: var(--win-dim); }
.hpick.bad { color: var(--lose); background: var(--lose-dim); }
.hpick.soon { color: var(--txt-3); }
/* 历史页顶部工具栏 */
.hist-bar { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.hist-bar .hb-t { flex: 1; font-size: var(--fs-13); font-weight: 700; }
.hist-bar .hb-t .muted { font-weight: 400; }
/* 历史筛选：全部/今年/近30天/自定义 */
.hist-filter {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: -2px 0 var(--sp-3);
}
.hist-filter select,
.hist-filter input[type="date"] {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 5px 7px; font-size: 12px; max-width: 132px;
}
.hist-filter .hf-dates { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hist-filter .hf-dates span { font-size: 11px; color: var(--txt-3); }

/* ---- 视图切换淡入（Tab 切换/首屏，轻量不抢戏） ---- */
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-in { animation: view-in var(--dur) var(--ease); }

/* =====================================================================
   9. 比赛详情组件（阶段 3 使用）
   ===================================================================== */
/* 对阵 Hero：队徽 + 队名 + 比分 + 状态 */
.mp-hero { text-align: center; padding: var(--sp-5) var(--sp-4) var(--sp-4); }
.mp-hero .mp-league { font-size: var(--fs-12); color: var(--txt-2); margin-bottom: var(--sp-4); }
.mp-teams { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); }
.mp-team { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 34%; }
.mp-team .crest { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: var(--surface-2); }
.mp-team .nm { font-size: var(--fs-15); font-weight: 700; line-height: 1.3; }
.mp-team .sub { font-size: var(--fs-11); color: var(--txt-3); }
.mp-sc { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; }
.mp-sc .sc { font-size: var(--fs-28); font-weight: 800; font-family: var(--font-num); letter-spacing: 1px; }
.mp-sc .st { font-size: var(--fs-11); color: var(--txt-2); }
.mp-sc .st.live { color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }

/* 队徽兜底：首字母徽章 */
.crest-fb {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--txt-2); font-size: var(--fs-22); font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font);
}
/* 小号队徽（今日列表行） */
.crest-wrap.sm { width: 24px; height: 24px; }
.crest-wrap.sm .crest-fb { width: 24px; height: 24px; border-radius: 7px; font-size: var(--fs-12); }
.crest-wrap.sm > img { border-radius: 7px; }

/* 特征分析对比条（对标足球计算器） */
.cmp-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row .lbl { font-size: var(--fs-12); color: var(--txt-2); text-align: center; margin-bottom: 7px; }
.cmp-bar { display: flex; align-items: center; gap: 8px; }
.cmp-bar .side { font-size: var(--fs-13); font-weight: 700; width: 74px; font-variant-numeric: tabular-nums; }
.cmp-bar .side.a { text-align: right; }
.cmp-bar .side.b { text-align: left; }
.cmp-bar .track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; position: relative; overflow: hidden; }
.cmp-bar .track .fa { position: absolute; left: 50%; top: 0; bottom: 0; background: var(--accent); border-radius: 4px 0 0 4px; }
.cmp-bar .track .fb { position: absolute; right: 50%; top: 0; bottom: 0; background: var(--line-strong); border-radius: 0 4px 4px 0; }
.cmp-bar .track .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }

/* 阵型图占位（阶段 3） */
.pitch {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-2); position: relative;
}
.pitch .pl {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 62px; text-align: center;
}
.pitch .pl .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-3); border: 2px solid var(--accent);
  color: var(--txt); font-size: var(--fs-12); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-family: var(--font-num);
}
.pitch .pl .av img { width: 100%; height: 100%; object-fit: cover; }
.pitch .pl .nm { font-size: 10px; color: var(--txt-2); line-height: 1.25; }
.pitch .ln { display: flex; justify-content: space-around; margin-bottom: var(--sp-3); }

/* 事件流 */
.ev { display: flex; gap: var(--sp-3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-13); }
.ev:last-child { border-bottom: 0; }
.ev .min { font-family: var(--font-num); font-weight: 800; color: var(--txt-2); width: 30px; flex: 0 0 auto; }
.ev .ic { flex: 0 0 auto; }
.ev .tx { flex: 1; line-height: 1.5; }
.ev .tx b { font-weight: 700; }
.ev .tx i { font-style: normal; font-size: 10.5px; color: var(--txt-3); margin-left: 5px; }
.ev.goal .ic { color: var(--win); }   /* 进球=绿（胜利语义） */
.ev.red .ic { color: var(--lose); }   /* 红牌=红（惩罚语义） */
.ev.sub .ic { color: var(--blue); }

/* 统计条（技术统计） */
.stat-row { display: flex; align-items: center; gap: var(--sp-2); padding: 7px 0; font-size: var(--fs-13); }
.stat-row .k { flex: 1; text-align: center; font-size: var(--fs-12); color: var(--txt-2); }
.stat-row .v { width: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-row .v.a { text-align: right; }
.stat-row .t { flex: 1.2; height: 6px; background: var(--surface-2); border-radius: 3px; display: flex; overflow: hidden; }
.stat-row .t .i1 { background: var(--accent); height: 100%; }
.stat-row .t .i2 { background: var(--line-strong); height: 100%; }

/* 概率三层卡 */
.prob-layer { display: flex; align-items: center; gap: var(--sp-3); padding: 11px 0; border-bottom: 1px solid var(--line); }
.prob-layer:last-child { border-bottom: 0; }
.prob-layer .k { flex: 1; }
.prob-layer .k .n { font-size: var(--fs-13); font-weight: 700; }
.prob-layer .k .d { font-size: var(--fs-11); color: var(--txt-3); margin-top: 2px; line-height: 1.5; }

/* 依据卡（计算依据/样本/限制） */
.basis { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); font-size: var(--fs-12); color: var(--txt-2); line-height: 1.8; }
.basis b { color: var(--txt); }
.basis .warnline { color: var(--warn); }

/* 历史交锋行 */
.h2h-row { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-12); }
.h2h-row:last-child { border-bottom: 0; }
.h2h-row .dt { color: var(--txt-3); font-variant-numeric: tabular-nums; width: 64px; flex: 0 0 auto; }
.h2h-row .ms { flex: 1; }
.h2h-row .sc { font-family: var(--font-num); font-weight: 800; }

/* 近期战况序列（W/D/L 圆点） */
.form-seq { display: inline-flex; gap: 3px; }
.form-seq i {
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 9px; font-style: normal; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-num);
}
.form-seq i.w { background: var(--win); color: #fff; }
.form-seq i.d { background: var(--surface-3); color: var(--txt-2); }
.form-seq i.l { background: var(--lose); color: #fff; }

/* 积分榜表 */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.table th { color: var(--txt-3); font-weight: 600; text-align: right; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: var(--fs-11); }
.table th:first-child, .table td:first-child { text-align: left; }
.table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.table tr.me td { background: var(--accent-soft); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }

/* 球队名可点（统一入口） */
.tlink { color: var(--txt); font-weight: 600; cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.tlink:active { color: var(--accent); }

/* 队徽容器：兜底徽章在底，远端/本地图盖上；图失败自动移除露出兜底 */
.crest-wrap { position: relative; display: inline-block; width: 56px; height: 56px; flex: 0 0 auto; }
.crest-wrap > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 14px; object-fit: contain; }

/* 情报可信度四级 chip：c1 官方实时 / c2 官方接口 / c3 历史回溯·模型 / c4 AI 未核实 */
.conf { display: inline-block; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 6px; vertical-align: middle; margin-left: 6px;
  border: 1px solid var(--line-strong); color: var(--txt-2); background: var(--surface-2); }
.conf.c1 { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.conf.c2 { color: var(--blue); border-color: var(--blue); }
.conf.c3 { color: var(--txt-2); }
.conf.c4 { color: var(--warn); border-color: var(--warn); }

/* 卡片小节标题（V2 详情页复用） */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.card-t { font-size: var(--fs-13); font-weight: 700; margin-bottom: var(--sp-2); }

/* 详情页通用行（沿用旧 .item 版式，但不止于弹层内） */
.sp-body .item { font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.7; }
.sp-body .item:last-child { border-bottom: 0; }
.sp-body .sec { font-size: var(--fs-12); font-weight: 700; color: var(--txt-2); margin: 10px 0 4px; }

/* 阵容页球员 chip：圆形头像（圆=人，与队徽圆角方底区分）+ 姓名 */
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px;
  margin: 0 6px 6px 0; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 12px; line-height: 1.4; }
.pchip .pav { width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--surface-3); object-fit: cover; }
