/* 红金数据台 shared stylesheet v1 (2026-11-28): design tokens + components. Layered, so legacy unlayered rules still win until removed. */
@charset "UTF-8";
/* =============================================================================
   刹车片AI水位系统 · 最终设计令牌「红金数据台」 v1（改版提案，2026-11-27）
   -----------------------------------------------------------------------------
   状态：提案文件。未接入任何页面，未部署，未改动任何现有项目文件。
   基底：方向3「品牌延续升级」；嫁接方向1「机构级数据终端」的组件与语义纪律、
         方向2「高端编辑风」的留白、以线代框和朱印署名。

   使用约定
   1. 所有令牌带 --ds- 前缀。旧样式已在用 --ink / --line / --muted / --paper /
      --accent / --card（style00/02/13），不加前缀会互相覆盖。
   2. 全部写在 @layer 里。未分层的旧样式在迁移期始终优先于本文件，所以先引入本文件
      不会改变现有页面；新组件只用新类名，再逐块删除旧样式。
   3. 主题挂点沿用现有：html[data-app-theme="light|dark"] 和 #dashboard[data-theme]。
      两者都没有时跟随 prefers-color-scheme。
      顶栏变体：html[data-ds-header="solid"] 切成深红实底顶栏（备选方案）。
   4. 激活门闸：本文件不写任何选中 .login-card 的规则。基础元素样式都加了
      :not(.login-card, .login-card *) 守卫；继承属性（字体、颜色）由 #login 自己设定，
      不会从 body 传入卡片。注意：style00 里看似“死规则”的 .login-card h2 /
      .field input / .primary / .error / .contact-card 实际作用于门闸卡，删除旧样式前
      必须先把门闸相关规则原样冻结到 gate.css，并做逐元素 getComputedStyle 比对（差异须为 0）。
   5. 不使用 backdrop-filter、filter:blur、mix-blend-mode、无限动画、常驻 will-change，
      不下载网页字体。!important 只出现在 prefers-reduced-motion 降级里。
   断点（媒体查询里不能用变量，在此登记）：手机 ≤599 · 平板 600–1023 · 桌面 ≥1024 · ≥1440 只放宽容器。
   ============================================================================= */

@layer ds-tokens, ds-base, ds-utilities;

/* -----------------------------------------------------------------------------
   1. 颜色 · 浅色（默认，也用于 [data-theme="light"] 子树）
   对比度按 WCAG 2.1 核算（括号内为对 --ds-surface #FFF 的值，另注者除外）
   ----------------------------------------------------------------------------- */
@layer ds-tokens {
  :root,
  :root[data-app-theme="light"],
  [data-theme="light"] {
    color-scheme: light;

    /* 中性：沿用现行 style02 的暖灰底，避免老用户观感突变 */
    --ds-bg: #F6F5F2;            /* 页面底 */
    --ds-surface: #FFFFFF;       /* 卡片、表格、顶栏、底栏、弹层 */
    --ds-surface-2: #F9F8F6;     /* 表头、芯片、输入框 */
    --ds-surface-3: #EFEDE8;     /* 悬停、分段轨道、分组行、骨架 */
    --ds-line: #E4E2DD;          /* 分隔线（只用横线） */
    --ds-line-strong: #CBC8C1;   /* 区块分隔、弹层描边 */
    --ds-line-input: #8A909A;    /* 输入框、次按钮边框（3.2:1，满足非文字 3:1） */
    --ds-ink: #19232F;           /* 正文、数字（15.9:1） */
    --ds-ink-2: #3B4654;         /* 次正文（9.6:1） */
    --ds-muted: #5B6674;         /* 辅助文字、表头（5.8:1；对 bg 5.4，对 surface-3 5.0） */
    --ds-faint: #8A94A2;         /* 仅图标、禁用、占位，不用于正文 */

    /* 品牌：只做点缀（缎带、A 标、当前导航下划线、选中行、每屏唯一主按钮） */
    --ds-brand: #AF1228;         /* 品牌红（文字/线 7.1:1） */
    --ds-brand-solid: #AF1228;   /* 主按钮、缎带底（白字 7.1:1） */
    --ds-brand-hover: #921023;
    --ds-brand-tint: #FBEEF0;    /* 选中比赛行底 */
    --ds-on-brand: #FFFFFF;
    --ds-gold: #D9AA45;          /* 装饰金：缎带金线、A 标，不承载文字 */
    --ds-gold-line: #A57B26;     /* 金色描边、★ 图标（3.9:1） */
    --ds-gold-ink: #7A5818;      /* 金色文字：「本人」、分析页眉标（6.5:1）。数据区不用 */
    --ds-gold-tint: #F7EFDF;

    /* 数据语义（同时必须配 ▲▼、文字或形状，不只靠颜色）
       赔率：红升绿降（升水 ▲ 红 / 降水 ▼ 绿），与国内赔率软件和「红单/连红」一致
       结果：红=命中/红单，黑=未中/黑单，紫=历史改向，灰虚线=待核（不计未中） */
    --ds-up: #C2361C;            /* 升水、命中文字与描边：朱红，与品牌深红区分（5.5:1） */
    --ds-up-tint: #FCEDE9;       /* 升水淡底（up 字 4.8:1） */
    --ds-down: #0B7A4B;          /* 降水（5.4:1） */
    --ds-down-tint: #E6F4EC;     /* 降水淡底（down 字 4.8:1） */
    --ds-hit: #C2361C;           /* 红单实底、近10单红格（白字 5.5:1） */
    --ds-hit-ink: #C2361C;       /* 命中文字、红圈描边 */
    --ds-hit-tint: #FCEDE9;
    --ds-on-hit: #FFFFFF;
    --ds-miss: #3F4752;          /* 黑单实底、近10单黑格（白字 9.4:1） */
    --ds-on-miss: #FFFFFF;
    --ds-alt: #6B47B5;           /* 历史方向变更（扫盘现有紫色语义，6.6:1） */
    --ds-alt-tint: #F1ECFA;
    --ds-pending: #8A909A;       /* 待核虚线边 */
    --ds-warn: #8F5E00;          /* 异动、待重审、数据过期：琥珀（5.6:1；对 warn-tint 5.0） */
    --ds-warn-tint: #FBF2E2;
    --ds-ai: #19232F;            /* AI 选择角标底（墨色反相，不占用红绿金） */
    --ds-on-ai: #FFFFFF;
    --ds-link: #1D5FBF;          /* 只用于真正的超链接（6.1:1） */
    --ds-focus: #1D5FBF;         /* 焦点环（对 bg 5.6:1） */
    --ds-selection: #D6E4F8;
    --ds-flash: #FBF0D2;         /* 增量更新单元格一次性底色 */
    --ds-scrim: rgba(15, 20, 25, .48);   /* 对话框、抽屉遮罩：实色，不模糊 */

    /* 主题相关的组合令牌（必须与上面同块声明，才能在 [data-theme] 子树里取到正确值） */
    --ds-shadow-pop: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .10);
    --ds-shadow-dialog: 0 16px 40px rgba(16, 24, 40, .18);
    --ds-header-bg: var(--ds-surface);
    --ds-header-ink: var(--ds-ink);
    --ds-header-ink-2: var(--ds-muted);
    --ds-header-line: var(--ds-line);
    --ds-header-active: var(--ds-brand);
    --ds-ribbon-red: var(--ds-brand-solid);
    --ds-ribbon-gold: var(--ds-gold);
    /* 水印方案 B（站长坚持网页水印时才用；默认方案 A 不在网页显示水印） */
    --ds-wm-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='320'%3E%3Ctext x='260' y='166' text-anchor='middle' transform='rotate(-18 260 160)' font-family='-apple-system,PingFang SC,Microsoft YaHei,sans-serif' font-size='16' font-weight='500' fill='%2319232F' fill-opacity='.05'%3E橙风 · 550371480%3C/text%3E%3C/svg%3E");
    /* <meta name="theme-color"> 对应值：#FFFFFF（meta 无法读变量，由 applyTheme 写入） */
  }

  /* ---------------------------------------------------------------------------
     2. 颜色 · 深色（与浅色同等完成；层级靠底色台阶，不靠阴影）
     对比度括号内为对 --ds-surface #161A1F 的值
     --------------------------------------------------------------------------- */
  :root[data-app-theme="dark"],
  [data-theme="dark"] {
    color-scheme: dark;
    --ds-bg: #0F1215;
    --ds-surface: #161A1F;
    --ds-surface-2: #1C2127;
    --ds-surface-3: #252B33;
    --ds-line: #2B3139;
    --ds-line-strong: #3D444E;
    --ds-line-input: #6B7480;    /* 3.7:1 */
    --ds-ink: #ECEEF1;           /* 15.0:1 */
    --ds-ink-2: #C3C9D1;         /* 10.5:1 */
    --ds-muted: #9AA2AD;         /* 6.8:1；对 surface-3 5.5 */
    --ds-faint: #6B737E;
    --ds-brand: #F06A7C;         /* 深色下作文字/下划线（5.9:1） */
    --ds-brand-solid: #A3182C;   /* 主按钮、缎带（白字 7.7:1） */
    --ds-brand-hover: #B8203A;
    --ds-brand-tint: #2D1A1F;
    --ds-on-brand: #FFFFFF;
    --ds-gold: #C9A04F;
    --ds-gold-line: #C9A04F;     /* 7.2:1 */
    --ds-gold-ink: #E3B76B;      /* 9.4:1 */
    --ds-gold-tint: #2E2616;
    --ds-up: #FF7360;            /* 6.6:1 */
    --ds-up-tint: #3A1F1A;       /* up 字 5.7:1 */
    --ds-down: #3DCB8C;          /* 8.4:1 */
    --ds-down-tint: #13291F;     /* down 字 7.4:1 */
    --ds-hit: #C7392A;           /* 红单实底（白字 5.2:1，对 surface 3.4:1） */
    --ds-hit-ink: #FF7360;       /* 命中文字、红圈描边 */
    --ds-hit-tint: #3A1F1A;
    --ds-on-hit: #FFFFFF;
    --ds-miss: #5E6773;          /* 白字 5.7:1，对 surface 3.1:1 */
    --ds-on-miss: #FFFFFF;
    --ds-alt: #B9A2FF;           /* 8.1:1 */
    --ds-alt-tint: #261F3B;
    --ds-pending: #6B7480;
    --ds-warn: #F0A54E;          /* 8.5:1 */
    --ds-warn-tint: #33250F;
    --ds-ai: #ECEEF1;
    --ds-on-ai: #161A1F;
    --ds-link: #8AB4FF;          /* 8.4:1 */
    --ds-focus: #8AB4FF;
    --ds-selection: #2A4370;
    --ds-flash: #3A3220;
    --ds-scrim: rgba(0, 0, 0, .60);
    --ds-shadow-pop: 0 0 0 1px var(--ds-line-strong), 0 8px 24px rgba(0, 0, 0, .45);
    --ds-shadow-dialog: 0 0 0 1px var(--ds-line-strong), 0 20px 48px rgba(0, 0, 0, .55);
    --ds-header-bg: var(--ds-surface);
    --ds-header-ink: var(--ds-ink);
    --ds-header-ink-2: var(--ds-muted);
    --ds-header-line: var(--ds-line);
    --ds-header-active: var(--ds-brand);
    --ds-ribbon-red: var(--ds-brand-solid);
    --ds-ribbon-gold: var(--ds-gold);
    --ds-wm-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='320'%3E%3Ctext x='260' y='166' text-anchor='middle' transform='rotate(-18 260 160)' font-family='-apple-system,PingFang SC,Microsoft YaHei,sans-serif' font-size='16' font-weight='500' fill='%23ECEEF1' fill-opacity='.05'%3E橙风 · 550371480%3C/text%3E%3C/svg%3E");
    /* theme-color：#161A1F */
  }

  /* 首帧尚未写入主题属性时跟随系统。值必须与上面的深色块保持一致（改一处改两处）。
     :where() 把特异度压到与 :root 相同，以便下面的顶栏变体可以覆盖。 */
  @media (prefers-color-scheme: dark) {
    :root:where(:not([data-app-theme]):not([data-theme])) {
      color-scheme: dark;
      --ds-bg: #0F1215;
      --ds-surface: #161A1F;
      --ds-surface-2: #1C2127;
      --ds-surface-3: #252B33;
      --ds-line: #2B3139;
      --ds-line-strong: #3D444E;
      --ds-line-input: #6B7480;
      --ds-ink: #ECEEF1;
      --ds-ink-2: #C3C9D1;
      --ds-muted: #9AA2AD;
      --ds-faint: #6B737E;
      --ds-brand: #F06A7C;
      --ds-brand-solid: #A3182C;
      --ds-brand-hover: #B8203A;
      --ds-brand-tint: #2D1A1F;
      --ds-on-brand: #FFFFFF;
      --ds-gold: #C9A04F;
      --ds-gold-line: #C9A04F;
      --ds-gold-ink: #E3B76B;
      --ds-gold-tint: #2E2616;
      --ds-up: #FF7360;
      --ds-up-tint: #3A1F1A;
      --ds-down: #3DCB8C;
      --ds-down-tint: #13291F;
      --ds-hit: #C7392A;
      --ds-hit-ink: #FF7360;
      --ds-hit-tint: #3A1F1A;
      --ds-on-hit: #FFFFFF;
      --ds-miss: #5E6773;
      --ds-on-miss: #FFFFFF;
      --ds-alt: #B9A2FF;
      --ds-alt-tint: #261F3B;
      --ds-pending: #6B7480;
      --ds-warn: #F0A54E;
      --ds-warn-tint: #33250F;
      --ds-ai: #ECEEF1;
      --ds-on-ai: #161A1F;
      --ds-link: #8AB4FF;
      --ds-focus: #8AB4FF;
      --ds-selection: #2A4370;
      --ds-flash: #3A3220;
      --ds-scrim: rgba(0, 0, 0, .60);
      --ds-shadow-pop: 0 0 0 1px var(--ds-line-strong), 0 8px 24px rgba(0, 0, 0, .45);
      --ds-shadow-dialog: 0 0 0 1px var(--ds-line-strong), 0 20px 48px rgba(0, 0, 0, .55);
      --ds-header-bg: var(--ds-surface);
      --ds-header-ink: var(--ds-ink);
      --ds-header-ink-2: var(--ds-muted);
      --ds-header-line: var(--ds-line);
      --ds-header-active: var(--ds-brand);
      --ds-ribbon-red: var(--ds-brand-solid);
      --ds-ribbon-gold: var(--ds-gold);
      --ds-wm-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='320'%3E%3Ctext x='260' y='166' text-anchor='middle' transform='rotate(-18 260 160)' font-family='-apple-system,PingFang SC,Microsoft YaHei,sans-serif' font-size='16' font-weight='500' fill='%23ECEEF1' fill-opacity='.05'%3E橙风 · 550371480%3C/text%3E%3C/svg%3E");
    }
  }

  /* 顶栏备选：深红实底（站长若觉得中性顶栏“体彩感”不足时启用，做 A/B 截图对比）。
     放在主题属性所在元素上：<html data-app-theme="…" data-ds-header="solid">
     白字对 #AF1228 为 7.1:1，对 #A3182C 为 7.7:1；次要文字 .82 白为 5.2:1 / 5.6:1；金色下划线 3.3:1 / 3.2:1（非文字 ≥3:1） */
  :root[data-ds-header="solid"],
  [data-theme][data-ds-header="solid"] {
    --ds-header-bg: var(--ds-brand-solid);
    --ds-header-ink: #FFFFFF;
    --ds-header-ink-2: rgba(255, 255, 255, .82);
    --ds-header-line: rgba(0, 0, 0, .20);
    --ds-header-active: var(--ds-gold);
    --ds-ribbon-red: var(--ds-brand-solid);
    --ds-ribbon-gold: var(--ds-gold);
  }

  /* ---------------------------------------------------------------------------
     3. 非颜色令牌
     --------------------------------------------------------------------------- */
  :root {
    /* 字体：全部系统字体，零下载。拉丁和数字取 SF / Segoe UI / Roboto，中文逐字回落 */
    --ds-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
      "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC",
      "Noto Sans SC", "Source Han Sans SC", "HarmonyOS Sans SC", "MiSans",
      "Helvetica Neue", Arial, sans-serif;
    /* 展示数字：只用于 ≥20px 的 KPI、结论卡赔率、比分大字。DIN Alternate（macOS/iOS 自带，
       只有 Bold）、Bahnschrift（Windows 10+ 自带）；Android 回落 Roboto。表格数字不用它 */
    --ds-font-figure: "DIN Alternate", Bahnschrift, -apple-system, BlinkMacSystemFont,
      "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 等宽：只用于 ⓘ 弹层里的原始时间戳、版本号 */
    --ds-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
      "Roboto Mono", "Noto Sans Mono", monospace;

    /* 字阶（字号/行高）。全站最小 12px，取消现有 33 档与 6–11px 小字 */
    --ds-fs-12: 12px; --ds-lh-12: 18px;   /* 表头、标签、角标、元信息 */
    --ds-fs-13: 13px; --ds-lh-13: 20px;   /* 密表、次要说明 */
    --ds-fs-14: 14px; --ds-lh-14: 22px;   /* 正文、表格默认 */
    --ds-fs-16: 16px; --ds-lh-16: 24px;   /* 卡片标题、对阵、强调值 */
    --ds-fs-20: 20px; --ds-lh-20: 28px;   /* 区块标题、KPI、手机页标题 */
    --ds-fs-24: 24px; --ds-lh-24: 32px;   /* 页标题、桌面对阵 */
    --ds-fs-32: 32px; --ds-lh-32: 40px;   /* 指标大数字 */
    --ds-fs-40: 40px; --ds-lh-40: 48px;   /* 仅落地页（无书法图时） */
    --ds-fw-regular: 400;
    --ds-fw-medium: 500;
    --ds-fw-semibold: 600;
    --ds-fw-bold: 700;                    /* 只配 --ds-font-figure */

    /* 文字样式（font 简写，组件直接 font: var(--ds-text-…)） */
    --ds-text-h1: 600 var(--ds-fs-24)/var(--ds-lh-24) var(--ds-font-sans);
    --ds-text-h2: 600 var(--ds-fs-20)/var(--ds-lh-20) var(--ds-font-sans);
    --ds-text-h3: 600 var(--ds-fs-16)/var(--ds-lh-16) var(--ds-font-sans);
    --ds-text-h4: 600 var(--ds-fs-14)/var(--ds-lh-14) var(--ds-font-sans);
    --ds-text-body: 400 var(--ds-fs-14)/var(--ds-lh-14) var(--ds-font-sans);
    --ds-text-dense: 400 var(--ds-fs-13)/var(--ds-lh-13) var(--ds-font-sans);
    --ds-text-meta: 400 var(--ds-fs-12)/var(--ds-lh-12) var(--ds-font-sans);
    --ds-text-label: 500 var(--ds-fs-12)/var(--ds-lh-12) var(--ds-font-sans);
    --ds-text-nav: 500 var(--ds-fs-14)/var(--ds-lh-14) var(--ds-font-sans);
    --ds-text-figure: 700 var(--ds-fs-20)/var(--ds-lh-20) var(--ds-font-figure);
    --ds-text-figure-lg: 700 var(--ds-fs-32)/var(--ds-lh-32) var(--ds-font-figure);
    --ds-measure: 68ch;                   /* 说明段落最大行宽 */

    /* 间距：4 的倍数 */
    --ds-sp-1: 4px;  --ds-sp-2: 8px;  --ds-sp-3: 12px; --ds-sp-4: 16px; --ds-sp-5: 20px;
    --ds-sp-6: 24px; --ds-sp-8: 32px; --ds-sp-10: 40px; --ds-sp-12: 48px; --ds-sp-16: 64px;
    --ds-section-gap: var(--ds-sp-6);     /* 区块间距（手机 16） */
    --ds-card-pad: var(--ds-sp-5);        /* 卡片内边距（手机 16） */
    --ds-cell-pad-x: var(--ds-sp-3);      /* 表格单元横向内边距 */

    /* 圆角：三档 + 细格 + 胶囊（激活卡保持原样，不用这些值） */
    --ds-r-xs: 2px;     /* 近10单格、细标记 */
    --ds-r-sm: 4px;     /* 芯片、徽标、按钮、输入框 */
    --ds-r-md: 8px;     /* 卡片、表格外框、比赛行、入口卡 */
    --ds-r-lg: 12px;    /* 弹层、对话框、手机抽屉顶角 */
    --ds-r-pill: 999px; /* 状态点、分段控件外框、筛选 chip */

    /* 尺寸 */
    --ds-control-sm: 28px;   /* 紧凑工具、扫盘方向芯片 */
    --ds-control: 32px;      /* 默认控件、芯片 */
    --ds-control-lg: 40px;   /* 主按钮 */
    --ds-touch: 44px;        /* 手机最小触控 */
    --ds-row-dense: 36px;
    --ds-row: 44px;
    --ds-row-chip: 52px;     /* 含芯片的表格行 */
    --ds-row-touch: 48px;
    --ds-thead-h: 36px;

    /* 布局 */
    --ds-container: 1320px;
    --ds-container-read: 960px;
    --ds-rail: 296px;          /* 看板比赛队列、复盘侧栏 */
    --ds-gutter: 24px;         /* 平板 20、手机 16 */
    --ds-header-h: 56px;       /* 手机 48 */
    --ds-ribbon-h: 4px;        /* 3px 红 + 1px 金 */
    --ds-subbar-h: 44px;       /* 手机比赛切换条、页内分段条 */
    --ds-tabbar-h: 56px;       /* 手机底栏，另加 env(safe-area-inset-bottom) */
    --ds-sticky-max-mobile: 92px;  /* 手机页内吸顶元素总高上限 */

    /* 层级：E0 平面 + 1px 线；只有弹层与对话框有阴影（见颜色块里的 --ds-shadow-*） */
    --ds-z-base: 0;
    --ds-z-sticky-head: 10;
    --ds-z-rail: 20;
    --ds-z-header: 50;
    --ds-z-tabbar: 50;
    --ds-z-pop: 60;
    --ds-z-dialog: 70;
    --ds-z-toast: 80;

    /* 动效：只动 transform / opacity / 颜色；无无限动画 */
    --ds-dur-1: 120ms;        /* 悬停、按下 */
    --ds-dur-2: 180ms;        /* 展开、页签下划线、箭头旋转 */
    --ds-dur-3: 240ms;        /* 抽屉、对话框进出 */
    --ds-dur-flash: 800ms;    /* 增量更新单元格闪一次 */
    --ds-ease-out: cubic-bezier(.2, 0, 0, 1);   /* 进入 */
    --ds-ease-in: cubic-bezier(.4, 0, 1, 1);    /* 退出 */

    /* 水印方案 B 的平铺尺寸 */
    --ds-wm-size: 520px 320px;
  }

  @media (min-width: 600px) and (max-width: 1023px) {
    :root { --ds-gutter: 20px; }
  }

  @media (max-width: 599px) {
    :root {
      --ds-gutter: 16px;
      --ds-header-h: 48px;
      --ds-ribbon-h: 3px;      /* 2px 红 + 1px 金 */
      --ds-section-gap: var(--ds-sp-4);
      --ds-card-pad: var(--ds-sp-4);
      --ds-control: 36px;
      --ds-row: 48px;
      --ds-text-h1: 600 var(--ds-fs-20)/var(--ds-lh-20) var(--ds-font-sans);
      --ds-text-h2: 600 var(--ds-fs-16)/var(--ds-lh-16) var(--ds-font-sans);
      --ds-text-figure-lg: 700 var(--ds-fs-24)/var(--ds-lh-24) var(--ds-font-figure);
      --ds-wm-size: 420px 260px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    :root { --ds-dur-1: 0ms; --ds-dur-2: 0ms; --ds-dur-3: 0ms; --ds-dur-flash: 0ms; }
  }
}

/* -----------------------------------------------------------------------------
   4. 基础元素样式
   全部 :where() 零特异度；非继承属性加门闸守卫 :not(.login-card, .login-card *)。
   迁移期旧样式（未分层）总是优先；旧样式删除后这里才完全生效。
   ----------------------------------------------------------------------------- */
@layer ds-base {
  :where(html) {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* 不做全局平滑滚动：轮询刷新不能带动页面。旧样式 html{scroll-behavior:smooth}
       未分层，会压过这里，必须在 P0 直接删除。 */
    scroll-behavior: auto;
  }

  :where(body) {
    margin: 0;
    background: var(--ds-bg);
    color: var(--ds-ink);
    font: var(--ds-text-body);
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* 标题：层级靠字号和颜色，字重只用 600；不用衬线 */
  :where(h1, h2, h3, h4, h5, h6):where(:not(.login-card, .login-card *)) {
    margin: 0;
    color: var(--ds-ink);
    letter-spacing: 0;
    text-wrap: balance;
  }
  :where(h1):where(:not(.login-card *)) { font: var(--ds-text-h1); }
  :where(h2):where(:not(.login-card *)) { font: var(--ds-text-h2); }
  :where(h3):where(:not(.login-card *)) { font: var(--ds-text-h3); }
  :where(h4, h5, h6):where(:not(.login-card *)) { font: var(--ds-text-h4); }

  :where(p):where(:not(.login-card *)) { margin: 0; }
  :where(small):where(:not(.login-card *)) { font-size: var(--ds-fs-12); line-height: var(--ds-lh-12); }
  :where(strong, b):where(:not(.login-card *)) { font-weight: var(--ds-fw-semibold); }

  /* 链接：统一无下划线，悬停才出现（修复只有「全网玩法」入口带下划线） */
  :where(a):where(:not(.login-card *)) {
    color: var(--ds-link);
    text-decoration: none;
    text-underline-offset: .2em;
  }
  @media (hover: hover) {
    :where(a:hover):where(:not(.login-card *)) { text-decoration: underline; }
  }

  :where(button, input, select, textarea):where(:not(.login-card *)) {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
  }
  :where(a, button, summary, [role="button"]):where(:not(.login-card *)) {
    -webkit-tap-highlight-color: transparent;
  }

  :where(hr):where(:not(.login-card *)) {
    height: 0;
    margin: var(--ds-sp-4) 0;
    border: 0;
    border-top: 1px solid var(--ds-line);
  }

  :where(code, kbd, samp, pre):where(:not(.login-card *)) {
    font-family: var(--ds-font-mono);
    font-size: .923em;
  }

  :where(img, video):where(:not(.login-card *)) { max-width: 100%; height: auto; }

  /* 表格：只用横线；表头 12/500 次要色；数字列等宽右对齐 */
  :where(table):where(:not(.login-card *)) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--ds-fs-14);
    line-height: var(--ds-lh-14);
    font-variant-numeric: tabular-nums lining-nums;
  }
  :where(caption):where(:not(.login-card *)) {
    padding: 0 0 var(--ds-sp-2);
    font: var(--ds-text-h3);
    color: var(--ds-ink);
    text-align: start;
  }
  :where(th):where(:not(.login-card *)) {
    height: var(--ds-thead-h);
    padding: 0 var(--ds-cell-pad-x);
    background: var(--ds-surface-2);
    color: var(--ds-muted);
    font: var(--ds-text-label);
    text-align: start;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid var(--ds-line);
  }
  :where(td):where(:not(.login-card *)) {
    height: var(--ds-row);
    padding: 0 var(--ds-cell-pad-x);
    color: var(--ds-ink);
    vertical-align: middle;
    border-bottom: 1px solid var(--ds-line);
  }
  :where(tbody tr:last-child > td):where(:not(.login-card *)) { border-bottom: 0; }
  :where(td, th):where([data-num], .ds-num):where(:not(.login-card *)) {
    text-align: end;
    font-variant-numeric: tabular-nums lining-nums;
  }
  @media (hover: hover) {
    :where(tbody tr:hover > td):where(:not(.login-card *)) { background: var(--ds-surface-2); }
  }
  :where(tr[aria-selected="true"] > td):where(:not(.login-card *)) { background: var(--ds-brand-tint); }
  :where(tr[aria-selected="true"] > td:first-child):where(:not(.login-card *)) {
    box-shadow: inset 3px 0 0 var(--ds-brand);
  }

  /* 数字：时间、数据元素默认等宽数字 */
  :where(time, data, output, [data-ds-app]):where(:not(.login-card *)) {
    font-variant-numeric: tabular-nums lining-nums;
  }

  /* 焦点环：只对键盘焦点显示，2px，偏移 2px，所有主题 ≥3:1 */
  :where(:focus-visible):where(:not(.login-card, .login-card *)) {
    outline: 2px solid var(--ds-focus);
    outline-offset: 2px;
  }
  :where(:focus:not(:focus-visible)):where(:not(.login-card, .login-card *)) { outline: none; }

  :where(:not(.login-card, .login-card *))::selection { background: var(--ds-selection); color: var(--ds-ink); }

  /* 减少动效：本文件里唯一的 !important。门闸卡由其原有规则处理，不在此列 */
  @media (prefers-reduced-motion: reduce) {
    *:where(:not(.login-card, .login-card *)),
    *:where(:not(.login-card, .login-card *))::before,
    *:where(:not(.login-card, .login-card *))::after {
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* -----------------------------------------------------------------------------
   5. 工具类（新类名，不与旧样式冲突）
   ----------------------------------------------------------------------------- */
@layer ds-utilities {
  /* 等宽数字（表格外的赔率、比分、命中率、时间） */
  .ds-num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }

  /* 展示数字：≥20px 的 KPI、结论卡赔率 */
  .ds-figure {
    font-family: var(--ds-font-figure);
    font-weight: var(--ds-fw-bold);
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0;
  }

  /* 仅读屏可见 */
  .ds-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* 水印方案 B：画在内容区自身背景上，随内容滚动，不单独建合成层，不用 fixed。
     区内单元格、芯片保持透明或半透明底。只加在看板报价表、扫盘主表、计划单票据、
     全网玩法高置信区。默认方案 A 不使用此类。 */
  .ds-wm-zone {
    background-color: var(--ds-surface);
    background-image: var(--ds-wm-image);
    background-size: var(--ds-wm-size);
    background-repeat: repeat;
  }
}

@charset "UTF-8";
/* =============================================================================
   刹车片AI水位系统 · 共享外壳与组件（效果图 · 红金数据台 v1）
   -----------------------------------------------------------------------------
   依赖：先引入 design-tokens.css，再引入本文件。
   规则：只用 --ds-* 令牌；无 hex、无 !important、无 backdrop-filter / blur / mix-blend-mode；
        无无限动画、无全屏 fixed 覆盖层、无常驻 will-change；阴影只用于弹层和对话框。
   断点：手机 ≤599 · 平板 600–1023 · 桌面 ≥1024（页面级用 @media，组件内部用 @container）。
   激活卡 .login-card 不在本文件，任何规则都不会命中它。
   ============================================================================= */
@layer ds-components {

/* ---------------------------------------------------------------- 0 骨架 */
:where(.ds-app, .ds-app *:not(.login-card, .login-card *)),
:where(.ds-app *:not(.login-card, .login-card *))::before,
:where(.ds-app *:not(.login-card, .login-card *))::after { box-sizing: border-box; }

.ds-app { min-height: 100vh; display: flex; flex-direction: column; }
.ds-main { flex: 1 0 auto; }
.ds-page {
  width: 100%;
  max-width: calc(var(--ds-container) + 2 * var(--ds-gutter));
  margin: 0 auto;
  padding: var(--ds-sp-6) var(--ds-gutter) var(--ds-sp-12);
}
.ds-page--read { max-width: calc(var(--ds-container-read) + 2 * var(--ds-gutter)); }
.ds-section { margin-top: var(--ds-sp-8); }
.ds-stack { display: grid; gap: var(--ds-section-gap); }
.ds-split { display: grid; grid-template-columns: var(--ds-rail) minmax(0, 1fr); gap: var(--ds-sp-6); align-items: start; }
.ds-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-sp-6); align-items: start; }

.ds-icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.25;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.ds-icon--20 { width: 20px; height: 20px; stroke-width: 1.8; }
.ds-icon--12 { width: 12px; height: 12px; stroke-width: 2.6; }
.ds-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ds-mono { font-family: var(--ds-font-mono); font-size: var(--ds-fs-12); }
.ds-muted { color: var(--ds-muted); }
.ds-warnmark { color: var(--ds-warn); }

/* ------------------------------------------------- 1 顶栏 TopBar（组件内部用 container query） */
.ds-topbar {
  container: ds-topbar / inline-size;
  position: sticky; top: 0; z-index: var(--ds-z-header);
  background: var(--ds-header-bg);
  color: var(--ds-header-ink);
  border-bottom: 1px solid var(--ds-header-line);
}
.ds-topbar::before {
  content: ""; display: block; height: var(--ds-ribbon-h);
  background: linear-gradient(to bottom, var(--ds-ribbon-red) calc(100% - 1px), var(--ds-ribbon-gold) 0);
}
.ds-topbar--static { position: relative; z-index: auto; }
.ds-topbar__in {
  display: flex; align-items: center; gap: var(--ds-sp-8);
  max-width: calc(var(--ds-container) + 2 * var(--ds-gutter));
  height: 56px; margin: 0 auto; padding: 0 var(--ds-gutter);
}
.ds-brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  color: inherit; text-decoration: none; white-space: nowrap;
  font: var(--ds-fw-semibold) var(--ds-fs-16)/var(--ds-lh-16) var(--ds-font-sans);
}
.ds-brand:hover { text-decoration: none; }
.ds-brand__page { display: none; }
.ds-amark { width: 28px; height: 28px; flex: none; }
.ds-amark__a { fill: var(--ds-gold); }
.ds-amark__s { fill: var(--ds-ribbon-red); }

.ds-nav { display: flex; align-self: stretch; gap: var(--ds-sp-6); min-width: 0; }
.ds-nav__item {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: var(--ds-text-nav); color: var(--ds-header-ink-2);
  text-decoration: none; white-space: nowrap;
  transition: color var(--ds-dur-1) var(--ds-ease-out);
}
.ds-nav__item:hover { color: var(--ds-header-ink); text-decoration: none; }
.ds-nav__item[aria-current="page"] { color: var(--ds-header-ink); font-weight: var(--ds-fw-semibold); }
.ds-nav__item[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--ds-header-active);
}
.ds-nav__more { display: none; }

.ds-topbar__tools { display: flex; align-items: center; gap: var(--ds-sp-5); margin-left: auto; }
.ds-topbar .ds-status { color: var(--ds-header-ink-2); }
.ds-freeze {
  display: inline-flex; align-items: center; gap: 6px; height: 32px;
  font: var(--ds-text-nav); color: var(--ds-header-ink-2);
  text-decoration: none; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer;
}
.ds-freeze:hover { color: var(--ds-header-ink); text-decoration: none; }
.ds-freeze[aria-current="page"] { color: var(--ds-header-ink); font-weight: var(--ds-fw-semibold); }
.ds-freeze__me { color: var(--ds-gold-ink); font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans); }
.ds-topbar:not(.ds-topbar--static) .ds-topbar__settings { anchor-name: --ds-settings; }
.ds-topbar .ds-topbar__more { display: none; }
:where([data-ds-header="solid"]) .ds-freeze__me { color: var(--ds-gold); }
:where([data-ds-header="solid"]) .ds-iconbtn--40 { border-color: var(--ds-header-line); color: var(--ds-header-ink); }

@container ds-topbar (max-width: 1023px) {
  .ds-topbar__in { gap: var(--ds-sp-6); }
  .ds-nav { gap: var(--ds-sp-5); }
  .ds-nav__item--wide, .ds-freeze, .ds-status__lbl { display: none; }
  .ds-nav__more { display: inline-flex; }
}
@container ds-topbar (max-width: 599px) {
  .ds-topbar__in { height: 48px; gap: var(--ds-sp-2); padding: 0 var(--ds-sp-1) 0 var(--ds-sp-4); }
  .ds-amark { width: 24px; height: 24px; }
  .ds-brand { gap: var(--ds-sp-2); }
  .ds-brand__name, .ds-nav, .ds-topbar .ds-topbar__settings { display: none; }
  .ds-brand__page { display: inline; }
  .ds-topbar__tools { gap: 0; }
  .ds-topbar .ds-topbar__more { display: inline-grid; width: 44px; height: 44px; }
  .ds-topbar .ds-topbar__more::before { inset: 0; }
}

/* 设置弹层（E2，宽 280）：代理现有 select#theme 与 .app-language-switch */
.ds-pop {
  width: 280px; padding: var(--ds-sp-4);
  background: var(--ds-surface); color: var(--ds-ink);
  border: 0; border-radius: var(--ds-r-lg);
  box-shadow: var(--ds-shadow-pop);
}
.ds-pop:not([popover]), .ds-pop:popover-open { display: grid; gap: var(--ds-sp-4); }
.ds-pop[popover] {
  position: fixed; inset: auto; margin: var(--ds-sp-2) 0 0;
  position-anchor: --ds-settings; position-area: bottom span-left;
}
.ds-pop__group { display: grid; gap: var(--ds-sp-2); }
.ds-pop__label { font: var(--ds-text-label); color: var(--ds-muted); }
.ds-pop .ds-seg { display: flex; }

/* ------------------------------------------- 2 手机底栏 TabBar（≤599 才显示）与「更多」抽屉 */
.ds-tabbar {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--ds-tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ds-surface);
  border-top: 1px solid var(--ds-line);
  contain: layout paint;
}
.ds-tabbar--static { display: grid; }
.ds-tabbar__item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ds-muted); text-decoration: none;
  font: var(--ds-fw-medium) var(--ds-fs-12)/16px var(--ds-font-sans);
}
.ds-tabbar__item:hover { text-decoration: none; }
.ds-tabbar__item[aria-current="page"] { color: var(--ds-brand); font-weight: var(--ds-fw-semibold); }
.ds-tabbar__item[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px;
  background: var(--ds-brand); border-radius: 0 0 2px 2px;
}
@media (max-width: 599px) {
  .ds-topbar { position: relative; z-index: auto; }
  .ds-tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--ds-z-tabbar); }
  .ds-app--tabbar { padding-bottom: calc(var(--ds-tabbar-h) + env(safe-area-inset-bottom)); }
}

.ds-menu { display: grid; }
.ds-menu__item {
  display: flex; align-items: center; gap: var(--ds-sp-3); width: 100%; min-height: 52px;
  padding: 0; border: 0; border-bottom: 1px solid var(--ds-line); background: none; cursor: pointer;
  color: var(--ds-ink); text-align: start; text-decoration: none;
  font: var(--ds-fw-medium) var(--ds-fs-14)/var(--ds-lh-14) var(--ds-font-sans);
}
.ds-menu__item:hover { text-decoration: none; }
.ds-menu__item > .ds-icon:first-child { color: var(--ds-muted); }
.ds-menu__item > .ds-icon:last-child { margin-left: auto; color: var(--ds-faint); }
.ds-menu__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ds-sp-3);
  min-height: 56px; border-bottom: 1px solid var(--ds-line);
  font: var(--ds-fw-medium) var(--ds-fs-14)/var(--ds-lh-14) var(--ds-font-sans);
}
.ds-menu__row > span { display: inline-flex; align-items: center; gap: var(--ds-sp-3); }
.ds-menu__row > span > .ds-icon { color: var(--ds-muted); }
.ds-menu__sub { display: block; font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-menu__legal { padding: var(--ds-sp-3) 0 var(--ds-sp-1); font: var(--ds-text-meta); color: var(--ds-muted); }

/* ------------------------------------------------------------- 3 页脚与朱印 */
.ds-footer { border-top: 1px solid var(--ds-line); }
.ds-footer__in {
  display: grid; gap: 6px;
  max-width: calc(var(--ds-container) + 2 * var(--ds-gutter));
  margin: 0 auto; padding: var(--ds-sp-5) var(--ds-gutter) var(--ds-sp-8);
}
.ds-footer__brand {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; column-gap: 10px;
  font: var(--ds-text-dense); color: var(--ds-muted);
}
.ds-footer__brand > .ds-seal { margin-top: 0; }
.ds-footer__brand > span { display: flex; flex-wrap: wrap; column-gap: .3em; }
.ds-footer__brand > span > span { white-space: nowrap; }
.ds-footer__contact::before { content: "· "; }
.ds-footer__legal { padding-left: 30px; }
.ds-footer__brand a { color: inherit; }
.ds-footer__brand button { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.ds-footer__brand button:hover { color: var(--ds-ink); }
.ds-footer__legal { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-seal { width: 20px; height: 20px; flex: none; }
.ds-seal__bg { fill: var(--ds-hit); }
.ds-seal__line { fill: none; stroke: var(--ds-on-hit); stroke-width: .8; opacity: .85; }
.ds-seal__ch { fill: var(--ds-on-hit); font-family: "Kaiti SC", STKaiti, KaiTi, "Songti SC", serif; font-size: 8.4px; font-weight: var(--ds-fw-bold); }

/* ------------------------------------------------- 4 页头、区块标题、卡片 */
.ds-pagehead { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--ds-sp-4) var(--ds-sp-6); }
.ds-pagehead__text { min-width: 0; }
.ds-eyebrow { margin: 0 0 var(--ds-sp-1); font: var(--ds-text-label); color: var(--ds-muted); }
.ds-eyebrow--gold { color: var(--ds-gold-ink); }
.ds-pagehead__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px var(--ds-sp-3); margin-top: 6px; font: var(--ds-text-dense); color: var(--ds-muted); }
.ds-pagehead__actions { display: flex; align-items: center; gap: var(--ds-sp-2); }

.ds-sechead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px var(--ds-sp-3); margin-bottom: var(--ds-sp-3); }
.ds-sechead__title { font: var(--ds-text-h2); color: var(--ds-ink); }
.ds-sechead__title[data-main]::before {
  content: ""; display: inline-block; width: 3px; height: 16px; margin-right: 10px; vertical-align: -1px;
  border-radius: 1px; background: var(--ds-brand);
}
.ds-sechead__meta { display: inline-flex; align-items: center; gap: var(--ds-sp-2); font: var(--ds-text-dense); color: var(--ds-muted); }

.ds-card { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); padding: var(--ds-card-pad); }
.ds-card--flush { padding: 0; }

/* ------------------------------------------------ 5 状态点 StatusDot、横幅 Banner */
.ds-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: var(--ds-text-dense); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-status__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ds-faint); }
.ds-status[data-state="updating"] .ds-status__dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ds-faint); }
.ds-status[data-state="stale"] .ds-status__dot,
.ds-status[data-state="down"] .ds-status__dot { position: relative; background: var(--ds-warn); }
.ds-status[data-state="stale"] .ds-status__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ds-warn);
  opacity: 0; animation: ds-pulse 1.2s var(--ds-ease-out) 3;
}
.ds-status[data-state="stale"], .ds-status[data-state="down"] { color: var(--ds-warn); }
@keyframes ds-pulse { from { transform: scale(1); opacity: .5; } to { transform: scale(2.6); opacity: 0; } }

.ds-banner {
  display: flex; align-items: center; gap: var(--ds-sp-3);
  padding: 10px var(--ds-sp-3) 10px var(--ds-sp-4);
  background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md);
  box-shadow: inset 3px 0 0 var(--ds-warn);
  font: var(--ds-text-body); color: var(--ds-ink-2);
}
.ds-banner__icon { flex: none; color: var(--ds-warn); }
.ds-banner__text { flex: 1; min-width: 0; }
.ds-banner__text b { color: var(--ds-ink); font-weight: var(--ds-fw-semibold); }

/* -------------------------------------------- 6 页签 Tabs 与分段 Segmented、筛选 chip */
.ds-tabs { display: flex; gap: var(--ds-sp-6); border-bottom: 1px solid var(--ds-line); overflow-x: auto; scrollbar-width: none; }
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-fade { mask-image: linear-gradient(to right, var(--ds-ink) calc(100% - 24px), transparent); padding-right: 24px; }
.ds-tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap; text-decoration: none;
  font: var(--ds-text-nav); color: var(--ds-muted);
}
.ds-tab:hover { color: var(--ds-ink); text-decoration: none; }
.ds-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ds-brand); transform: scaleX(0); transition: transform var(--ds-dur-2) var(--ds-ease-out);
}
.ds-tab[aria-selected="true"], .ds-tab[aria-current="page"] { color: var(--ds-ink); font-weight: var(--ds-fw-semibold); }
.ds-tab[aria-selected="true"]::after, .ds-tab[aria-current="page"]::after { transform: scaleX(1); }
.ds-tab[aria-disabled="true"] { color: var(--ds-faint); cursor: default; }
.ds-tab__n { font: var(--ds-text-meta); color: var(--ds-muted); font-variant-numeric: tabular-nums; font-weight: var(--ds-fw-regular); }

.ds-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--ds-surface-3); border-radius: var(--ds-r-pill); vertical-align: middle; }
.ds-seg--block { display: flex; width: 100%; }
.ds-seg > button, .ds-seg > a {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: calc(var(--ds-control) - 4px); padding: 0 var(--ds-sp-3);
  border: 1px solid transparent; border-radius: var(--ds-r-pill); background: none; cursor: pointer;
  color: var(--ds-muted); text-decoration: none; white-space: nowrap;
  font: var(--ds-fw-medium) var(--ds-fs-13)/1 var(--ds-font-sans);
  transition: color var(--ds-dur-1) var(--ds-ease-out), background-color var(--ds-dur-1) var(--ds-ease-out);
}
.ds-seg > :hover { color: var(--ds-ink); text-decoration: none; }
.ds-seg > [aria-pressed="true"], .ds-seg > [aria-selected="true"], .ds-seg > [aria-current="page"] {
  background: var(--ds-surface); border-color: var(--ds-line); color: var(--ds-ink); font-weight: var(--ds-fw-semibold);
}
.ds-seg__n { font: var(--ds-text-meta); font-variant-numeric: tabular-nums; color: var(--ds-muted); }

.ds-filters { display: flex; flex-wrap: wrap; gap: var(--ds-sp-2); }
.ds-filters--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ds-filter {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 var(--ds-sp-3);
  border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-pill); background: var(--ds-surface); cursor: pointer;
  color: var(--ds-ink-2); white-space: nowrap;
  font: var(--ds-fw-medium) var(--ds-fs-13)/1 var(--ds-font-sans);
}
.ds-filter:hover { border-color: var(--ds-line-input); }
.ds-filter__n { font: var(--ds-text-meta); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-filter[aria-pressed="true"] { background: var(--ds-ink); border-color: var(--ds-ink); color: var(--ds-surface); }
.ds-filter[aria-pressed="true"] .ds-filter__n { color: inherit; opacity: .72; }

/* ------------------------------------------------------ 7 按钮、输入框 */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ds-control); padding: 0 var(--ds-sp-3);
  border: 1px solid transparent; border-radius: var(--ds-r-sm); background: none; cursor: pointer;
  color: var(--ds-ink-2); text-decoration: none; white-space: nowrap;
  font: var(--ds-fw-medium) var(--ds-fs-14)/1 var(--ds-font-sans);
  transition: background-color var(--ds-dur-1) var(--ds-ease-out), border-color var(--ds-dur-1) var(--ds-ease-out), color var(--ds-dur-1) var(--ds-ease-out);
}
.ds-btn:hover { text-decoration: none; }
.ds-btn--primary { height: var(--ds-control-lg); padding: 0 var(--ds-sp-5); background: var(--ds-brand-solid); color: var(--ds-on-brand); font-weight: var(--ds-fw-semibold); }
.ds-btn--primary:hover { background: var(--ds-brand-hover); }
.ds-btn--secondary { background: var(--ds-surface); border-color: var(--ds-line-input); color: var(--ds-ink); }
.ds-btn--secondary:hover { background: var(--ds-surface-2); }
.ds-btn--ghost:hover { background: var(--ds-surface-3); color: var(--ds-ink); }
.ds-btn--sm { height: var(--ds-control-sm); padding: 0 var(--ds-sp-2); font-size: var(--ds-fs-13); }
.ds-btn:disabled { opacity: .45; cursor: not-allowed; }

.ds-iconbtn {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px;
  padding: 0; border: 1px solid transparent; border-radius: var(--ds-r-sm); background: none; cursor: pointer;
  color: var(--ds-ink-2);
  transition: background-color var(--ds-dur-1) var(--ds-ease-out), color var(--ds-dur-1) var(--ds-ease-out);
}
.ds-iconbtn::before { content: ""; position: absolute; inset: -6px; }
.ds-iconbtn:hover { background: var(--ds-surface-3); color: var(--ds-ink); }
.ds-iconbtn--40 { width: 40px; height: 40px; border-color: var(--ds-line); }
.ds-iconbtn--40::before { inset: -2px; }

.ds-input {
  height: var(--ds-control); min-width: 0; padding: 0 10px;
  border: 1px solid var(--ds-line-input); border-radius: var(--ds-r-sm);
  background: var(--ds-surface); color: var(--ds-ink);
  font: var(--ds-text-body);
}
.ds-input::placeholder { color: var(--ds-muted); }
.ds-input:hover { border-color: var(--ds-ink-2); }
.ds-field { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
.ds-field > .ds-icon { position: absolute; left: 10px; color: var(--ds-muted); pointer-events: none; }
.ds-field > .ds-input { width: 100%; padding-left: 32px; }
.ds-field--select > .ds-icon { left: auto; right: 8px; }
.ds-field--search { width: 280px; }
.ds-field--select > .ds-input { padding-left: 10px; padding-right: 30px; appearance: none; cursor: pointer; }
.ds-label { display: block; margin-bottom: 6px; font: var(--ds-text-label); color: var(--ds-muted); }
.ds-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-sp-3); }
.ds-toolbar__end { margin-left: auto; font: var(--ds-text-dense); color: var(--ds-muted); }

/* -------------------------------------------------------- 8 标签 Tag */
.ds-tag {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px;
  border: 1px solid currentColor; border-radius: var(--ds-r-sm); background: transparent;
  color: var(--ds-ink-2); white-space: nowrap; vertical-align: middle;
  font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans);
}
.ds-tag[data-tone="ink"], .ds-tag[data-conf="mid"], .ds-tag[data-conf="high"] { color: var(--ds-ink); }
.ds-tag[data-tone="muted"], .ds-tag[data-conf="low"] { color: var(--ds-muted); }
.ds-tag[data-conf="high"]::after { content: "★"; color: var(--ds-gold-line); }
.ds-tag[data-tone="warn"] { color: var(--ds-warn); background: var(--ds-warn-tint); border-color: transparent; }
.ds-tag[data-tone="warn"]::before { content: "◆"; font-size: 10px; }
.ds-tag[data-tone="warn-line"] { color: var(--ds-warn); }
.ds-tag[data-tone="gold"] { color: var(--ds-gold-ink); }
.ds-tag--lg { height: 28px; padding: 0 10px; font-size: var(--ds-fs-14); }

/* ------------------------------------- 9 赔率芯片 OddsChip、变化 Delta、迷你走势 Sparkline */
.ds-chip {
  --_bw: 1px; --_bc: var(--ds-line-strong);
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: var(--ds-control); padding: 0 calc(11px - var(--_bw));
  border: var(--_bw) solid var(--_bc); border-radius: var(--ds-r-sm);
  background: var(--ds-surface); color: var(--ds-ink);
  white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums lining-nums;
}
.ds-chip__k { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-chip__v { font: var(--ds-fw-semibold) var(--ds-fs-14)/1 var(--ds-font-sans); font-variant-numeric: tabular-nums lining-nums; }
.ds-chip--sm { height: var(--ds-control-sm); }
.ds-chip--lg { height: 44px; gap: 8px; }
.ds-chip--lg .ds-chip__k { font: var(--ds-text-body); color: var(--ds-ink-2); }
.ds-chip--lg .ds-chip__v { font: var(--ds-text-figure); }
.ds-chip--dir { background: transparent; font: var(--ds-fw-semibold) var(--ds-fs-13)/1 var(--ds-font-sans); }
.ds-chip[data-state="ai"] { --_bw: 1.5px; --_bc: var(--ds-ink); }
.ds-chip[data-state="hit"] { --_bw: 2px; --_bc: var(--ds-hit-ink); background: var(--ds-hit-tint); }
.ds-chip[data-state="hit"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-hit-ink); }
.ds-chip[data-state="alt"] { --_bw: 1.5px; --_bc: var(--ds-alt); border-style: dashed; }
.ds-chip[data-state="alt"]::after { content: "改"; color: var(--ds-alt); font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans); }
.ds-chip[data-state="miss"] { background: transparent; color: var(--ds-muted); }
.ds-chip[data-state="miss"] .ds-chip__v { font-weight: var(--ds-fw-medium); }
.ds-chip[data-state="void"] { background: transparent; color: var(--ds-faint); text-decoration: line-through; }
.ds-chip[data-state="void"] .ds-chip__k { color: inherit; }
.ds-ai {
  display: inline-grid; place-items: center; height: 16px; padding: 0 4px; border-radius: 3px;
  background: var(--ds-ai); color: var(--ds-on-ai); font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans); font-style: normal;
}
.ds-chip > .ds-ai { position: absolute; top: -9px; right: -7px; }
.ds-chiprow { display: flex; flex-wrap: wrap; gap: var(--ds-sp-2); }
.ds-chipgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-sp-2); }
.ds-chipgrid > .ds-chip { justify-content: center; }

.ds-delta { white-space: nowrap; color: var(--ds-muted); font: var(--ds-fw-medium) var(--ds-fs-12)/var(--ds-lh-12) var(--ds-font-sans); font-variant-numeric: tabular-nums; }
.ds-delta[data-dir="up"] { color: var(--ds-up); }
.ds-delta[data-dir="down"] { color: var(--ds-down); }
.ds-pp { color: var(--ds-ink-2); font: var(--ds-text-meta); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-spark { display: block; width: 64px; height: 20px; overflow: visible; }
.ds-spark polyline { fill: none; stroke: var(--ds-ink-2); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.ds-spark circle { r: 1.5px; fill: var(--ds-muted); }
.ds-spark[data-dir="up"] circle { fill: var(--ds-up); }
.ds-spark[data-dir="down"] circle { fill: var(--ds-down); }

/* ------------------------------------------- 10 命中徽标 HitBadge、近10单条 FormStrip */
.ds-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px;
  border: 1px solid transparent; border-radius: var(--ds-r-sm); white-space: nowrap; vertical-align: middle;
  font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans);
}
.ds-badge[data-state="hit"] { background: var(--ds-hit); color: var(--ds-on-hit); }
.ds-badge[data-state="miss"] { background: var(--ds-miss); color: var(--ds-on-miss); }
.ds-badge[data-state="pending"] { border: 1px dashed var(--ds-pending); color: var(--ds-muted); }
.ds-badge[data-state="push"] { background: var(--ds-surface-3); color: var(--ds-ink-2); }
.ds-badge[data-state="void"] { background: var(--ds-surface-3); color: var(--ds-muted); }

.ds-form { display: inline-flex; align-items: center; gap: var(--ds-sp-2); white-space: nowrap; vertical-align: middle; }
.ds-form__bars {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 6px; gap: 2px; height: 14px;
  background: linear-gradient(var(--ds-line-strong), var(--ds-line-strong)) center / 100% 1px no-repeat;
}
.ds-form__bars > i { display: block; height: 14px; border-radius: 1px; }
.ds-form__bars > [data-r="h"] { background: linear-gradient(to bottom, var(--ds-hit) 50%, transparent 0); }
.ds-form__bars > [data-r="m"] { background: linear-gradient(to bottom, transparent 50%, var(--ds-miss) 0); }
.ds-form__bars > [data-r="p"] { background: linear-gradient(to bottom, transparent 6px, var(--ds-pending) 0 8px, transparent 0); }
.ds-form__sum { font: var(--ds-fw-semibold) var(--ds-fs-13)/var(--ds-lh-13) var(--ds-font-sans); color: var(--ds-ink); font-variant-numeric: tabular-nums; }

/* -------------------------------------- 11 比赛行 MatchRow、队列 Rail、切换条、比赛头 */
.ds-rail {
  position: sticky; top: calc(var(--ds-header-h) + var(--ds-ribbon-h) + var(--ds-sp-4));
  max-height: calc(100dvh - 92px); overflow: auto; overscroll-behavior: contain;
  background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md);
}
.ds-rail__head { display: grid; gap: 10px; padding: 14px var(--ds-sp-4) var(--ds-sp-3); border-bottom: 1px solid var(--ds-line); }
.ds-rail__title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ds-sp-2); font: var(--ds-text-h4); }
.ds-rail__title small { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-mlist { margin: 0; padding: 0; list-style: none; }
.ds-mrow {
  display: grid; gap: 2px; width: 100%; padding: 10px var(--ds-sp-4);
  border: 0; border-bottom: 1px solid var(--ds-line); background: var(--ds-surface); cursor: pointer;
  color: var(--ds-ink); text-align: start; text-decoration: none; font: inherit;
}
.ds-mlist > li:last-child > .ds-mrow { border-bottom: 0; }
.ds-mrow:hover { background: var(--ds-surface-2); text-decoration: none; }
.ds-mrow[aria-current="true"] { background: var(--ds-brand-tint); box-shadow: inset 3px 0 0 var(--ds-brand); }
.ds-mrow__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-sp-2); min-height: 20px; font: var(--ds-fw-semibold) var(--ds-fs-12)/var(--ds-lh-12) var(--ds-font-sans); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-mrow__teams { font: var(--ds-text-h4); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ds-mrow__sum { font: var(--ds-text-meta); color: var(--ds-muted); }

.ds-switcher {
  position: sticky; top: 0; z-index: var(--ds-z-rail);
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; height: var(--ds-subbar-h);
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-line);
}
.ds-switcher > button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ds-ink-2); }
.ds-switcher__cur { font: var(--ds-text-h4); color: var(--ds-ink); }
.ds-switcher__idx { font: var(--ds-fw-semibold) var(--ds-fs-12)/1 var(--ds-font-sans); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-switcher__teams { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-switcher__time { font: var(--ds-text-dense); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-subbar {
  position: sticky; top: var(--ds-subbar-h); z-index: var(--ds-z-rail);
  display: flex; align-items: center; height: var(--ds-subbar-h); padding: 0 var(--ds-sp-4);
  background: var(--ds-bg); border-bottom: 1px solid var(--ds-line);
}
.ds-subbar .ds-seg > button { height: 32px; }

.ds-mhead { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--ds-sp-3) var(--ds-sp-6); }
.ds-mhead__meta { margin: 0; font: var(--ds-text-meta); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-mhead__teams { margin-top: var(--ds-sp-1); font: var(--ds-text-h1); }
.ds-vs { margin: 0 .3em; font-size: .7em; font-weight: var(--ds-fw-regular); color: var(--ds-muted); }
.ds-mhead__side { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-sp-2); padding-top: var(--ds-sp-1); }

/* --------------------------------------------- 12 结论卡 VerdictCard（container query） */
.ds-verdict { container: ds-verdict / inline-size; }
.ds-verdict__head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-sp-2) var(--ds-sp-3); padding-bottom: var(--ds-sp-3); border-bottom: 1px solid var(--ds-line); }
.ds-verdict__title { font: var(--ds-text-h4); }
.ds-verdict__time { font: var(--ds-text-dense); color: var(--ds-muted); }
.ds-verdict__flag { margin-left: auto; display: inline-flex; align-items: center; gap: var(--ds-sp-2); }
.ds-verdict__kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-sp-5) var(--ds-sp-6); margin: 0; padding: var(--ds-sp-5) 0 var(--ds-sp-4); }
.ds-verdict__kv dt { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-verdict__kv dd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--ds-sp-2); min-height: 28px; margin: 6px 0 0; font: var(--ds-text-h3); }
.ds-verdict__why {
  max-width: 72ch; font: var(--ds-text-body); color: var(--ds-ink-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ds-verdict > .ds-disclosure { margin: var(--ds-sp-3) calc(-1 * var(--ds-card-pad)) calc(-1 * var(--ds-card-pad)); padding: 0 var(--ds-card-pad); border-top: 1px solid var(--ds-line); }
@container ds-verdict (max-width: 559px) {
  .ds-verdict__kv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-sp-4); }
  .ds-verdict__flag { margin-left: 0; }
}

/* ------------------------------------ 13 数据表 .ds-table（手机转卡片，container query） */
.ds-tablewrap { container: ds-table / inline-size; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); overflow: clip; }
.ds-table th { position: sticky; top: calc(var(--ds-header-h) + var(--ds-ribbon-h) + 1px); z-index: var(--ds-z-sticky-head); }
.ds-table tbody th { position: static; }
.ds-table--chip td { height: var(--ds-row-chip); }
.ds-table--dense td { height: var(--ds-row-dense); }
.ds-table .ds-group > th {
  height: 36px; background: var(--ds-surface-3); color: var(--ds-ink-2);
  font: var(--ds-fw-semibold) var(--ds-fs-13)/var(--ds-lh-13) var(--ds-font-sans);
}
.ds-table tbody.ds-lazy { content-visibility: auto; contain-intrinsic-size: auto 520px; }
/* 生产环境：长列表的行加 .ds-cv-row（手机作者行 64）。效果图不加：整页截图时屏外行会是空白 */
.ds-cv-row { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.ds-cell-2 { display: grid; gap: 2px; line-height: var(--ds-lh-13); }
.ds-cell-2 > small { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-cell-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-teams { font: var(--ds-text-h4); }
@container ds-table (max-width: 599px) {
  .ds-table--cards, .ds-table--cards tbody { display: block; }
  .ds-table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ds-table--cards tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--ds-sp-2);
    padding: 6px var(--ds-sp-2) 10px var(--ds-sp-4); border-bottom: 1px solid var(--ds-line);
  }
  .ds-table--cards tbody tr:last-child { border-bottom: 0; }
  .ds-table--cards td {
    grid-column: 1 / -1; display: grid; grid-template-columns: 3.5em minmax(0, 1fr); align-items: center; gap: var(--ds-sp-2);
    height: auto; min-height: 26px; padding: 1px var(--ds-sp-2) 1px 0; border: 0; background: none; box-shadow: none;
  }
  .ds-table--cards td[data-label]::before { content: attr(data-label); white-space: nowrap; font: var(--ds-text-meta); color: var(--ds-muted); }
  .ds-table--cards td.ds-cardhead { grid-column: auto; grid-row: 1; display: block; min-height: 36px; padding: 0; align-content: center; }
  .ds-table--cards .ds-cardhead .ds-cell-2 { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
  .ds-table--cards .ds-cardhead + .ds-cardhead small { display: none; }
  .ds-table--cards .ds-cardhead .ds-teams { overflow: hidden; text-overflow: ellipsis; }
  .ds-table--cards td.ds-cell-end { grid-column: 3; grid-row: 1; display: block; padding: 0; }
  .ds-table--cards .ds-chip--sm { height: 24px; padding: 0 7px; }
  .ds-table--cards tr[aria-selected="true"] { background: var(--ds-brand-tint); box-shadow: inset 3px 0 0 var(--ds-brand); }
  .ds-table--cards tr.ds-group { display: block; padding: 0; }
  .ds-table--cards .ds-group > th { display: block; height: auto; padding: 8px var(--ds-sp-4); }
}

/* ------------------------------ 14 五玩法报价表 MarketTable（桌面分组表 / 手机分玩法格子） */
.ds-market { --_ai: inset 2px 0 0 var(--ds-ink); }
.ds-market td { height: var(--ds-row); }
.ds-market__head > th {
  height: 40px; padding-top: 0; padding-bottom: 0; background: var(--ds-surface-3); color: var(--ds-ink-2);
  font: var(--ds-text-dense); white-space: normal;
}
.ds-market__head b { color: var(--ds-ink); font: var(--ds-text-h4); margin-right: 6px; }
.ds-market__opt { font: var(--ds-text-h4); white-space: nowrap; }
.ds-market__opt .ds-ai { margin-left: 6px; vertical-align: 1px; }
.ds-market .is-ai > td:first-child { box-shadow: var(--_ai); }
.ds-market__odds { font: var(--ds-fw-semibold) var(--ds-fs-16)/var(--ds-lh-16) var(--ds-font-sans); }
.ds-market__move { white-space: nowrap; }
.ds-market__from { color: var(--ds-ink-2); font-variant-numeric: tabular-nums; margin-right: var(--ds-sp-2); }
.ds-market__pp { color: var(--ds-ink-2); }
.ds-market__mkt { color: var(--ds-ink-2); font: var(--ds-text-dense); }
.ds-market__more > td { height: 40px; }
.ds-market > thead th:nth-child(1) { width: 18%; }
.ds-market > thead th:nth-child(2) { width: 10%; }
.ds-market > thead th:nth-child(3) { width: 20%; }
.ds-market > thead th:nth-child(4) { width: 12%; }
.ds-market > thead th:nth-child(5) { width: 14%; }
.ds-market > thead .ds-info { margin-left: 2px; }
.ds-marketwrap { container: ds-market / inline-size; }
@container ds-market (max-width: 599px) {
  .ds-marketwrap > .ds-tablewrap { background: none; border: 0; border-radius: 0; overflow: visible; }
  .ds-market, .ds-market > tbody { display: block; }
  .ds-market > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ds-market > tbody { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-sp-2); padding-bottom: var(--ds-sp-5); }
  .ds-market > tbody[data-cols="auto"] { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .ds-market__head, .ds-market__more { grid-column: 1 / -1; display: block; }
  .ds-market__head > th { display: block; height: auto; padding: 0 0 2px; background: none; border: 0; }
  .ds-market__head b { display: block; font: var(--ds-text-h3); margin: 0 0 2px; }
  .ds-market > tbody > tr:not(.ds-market__head, .ds-market__more) {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "o o" "v v" "d p";
    align-items: baseline; column-gap: 4px; padding: 8px 10px;
    border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-sm); background: var(--ds-surface);
  }
  .ds-market > tbody > tr.is-ai { border: 1.5px solid var(--ds-ink); padding: 7.5px 9.5px; }
  .ds-market td { display: block; height: auto; padding: 0; border: 0; background: none; text-align: start; box-shadow: none; }
  .ds-market .is-ai > td:first-child { box-shadow: none; }
  .ds-market__opt { grid-area: o; font: var(--ds-text-meta); color: var(--ds-muted); }
  .ds-market__opt .ds-ai { position: absolute; top: -9px; right: -7px; margin: 0; }
  .ds-market__odds { grid-area: v; margin: 2px 0; font-weight: var(--ds-fw-semibold); }
  .ds-market__move { grid-area: d; }
  .ds-market .ds-market__from, .ds-market td.ds-market__spark, .ds-market td.ds-market__mkt { display: none; }
  .ds-market__pp { grid-area: p; font: var(--ds-text-meta); }
  .ds-market__pp::before { content: "· "; color: var(--ds-faint); }
  .ds-market__pp::after { content: "pp"; }
  .ds-market__more > td { height: auto; }
}

/* ------------------------------------------- 15 作者行 AuthorRow 与票据卡 TicketCard */
.ds-authors td { height: 56px; }
.ds-author__who { display: flex; align-items: center; gap: var(--ds-sp-3); height: 56px; }
.ds-author__who b { font: var(--ds-text-h4); white-space: nowrap; }
.ds-avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--ds-surface-3); color: var(--ds-ink-2); font: var(--ds-fw-semibold) var(--ds-fs-13)/1 var(--ds-font-sans);
  overflow: hidden;
}
.ds-author__streak { white-space: nowrap; color: var(--ds-ink-2); font-variant-numeric: tabular-nums; }
.ds-author__streak[data-hot] { color: var(--ds-hit-ink); font-weight: var(--ds-fw-semibold); }
.ds-author__go { width: 44px; color: var(--ds-faint); text-align: end; }
.ds-author[aria-expanded="true"] > td { background: var(--ds-surface-2); border-bottom-color: transparent; }
.ds-author__more > td { height: auto; padding: 0 var(--ds-sp-4) var(--ds-sp-4); background: var(--ds-surface-2); }
.ds-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: var(--ds-sp-3); }
@container ds-table (max-width: 599px) {
  .ds-authors, .ds-authors > tbody { display: block; }
  .ds-authors > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ds-authors tr.ds-author { border-bottom: 1px solid var(--ds-line); }
  .ds-authors tbody tr:last-child { border-bottom: 0; }
  .ds-authors tr.ds-author[aria-expanded="true"] { background: var(--ds-surface-2); border-bottom: 0; }
  .ds-authors tr.ds-author > td:first-child { display: contents; }
  .ds-authors tbody tr.ds-author {
    display: grid; grid-template-columns: 32px auto minmax(0, 1fr) auto 16px;
    grid-template-areas: "av nm st cu go" "av fm rt cu go";
    align-items: center; column-gap: var(--ds-sp-2); row-gap: 2px; min-height: 64px; padding: 10px var(--ds-sp-3) 10px var(--ds-sp-4);
  }
  .ds-authors .ds-unit { display: none; }
  .ds-authors td { display: block; height: auto; padding: 0; border: 0; }
  .ds-authors .ds-author__who { display: contents; }
  .ds-authors .ds-avatar { grid-area: av; }
  .ds-authors .ds-author__who b { grid-area: nm; }
  .ds-authors .ds-author__streak { grid-area: st; font: var(--ds-text-meta); }
  .ds-authors .ds-author__form { grid-area: fm; }
  .ds-authors .ds-author__ret { grid-area: rt; font: var(--ds-text-meta); color: var(--ds-ink-2); text-align: start; white-space: nowrap; }
  .ds-authors .ds-author__ret::before { content: "· 月回报 "; color: var(--ds-muted); }
  .ds-authors .ds-author__cur { grid-area: cu; font: var(--ds-text-dense); }
  .ds-authors .ds-author__cur::before { content: "当期 "; color: var(--ds-muted); }
  .ds-authors .ds-author__go { grid-area: go; width: auto; }
  .ds-authors .ds-author__more, .ds-authors .ds-author__more > td { display: block; }
  .ds-authors .ds-author__more { border-bottom: 1px solid var(--ds-line); }
  .ds-authors .ds-author__more > td { padding: 0 var(--ds-sp-3) var(--ds-sp-3); }
}

.ds-ticket { container: ds-ticket / inline-size; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); padding: var(--ds-sp-3) var(--ds-sp-4); }
.ds-ticket__head { display: flex; align-items: center; gap: var(--ds-sp-2); min-height: 28px; font: var(--ds-text-h4); }
.ds-ticket__head time { font: var(--ds-text-dense); color: var(--ds-muted); font-weight: var(--ds-fw-regular); }
.ds-ticket__head .ds-badge { margin-left: auto; }
.ds-ticket__legs { margin: var(--ds-sp-2) 0; padding: 0; list-style: none; }
.ds-ticket__leg {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 36px 36px; align-items: center; gap: 2px var(--ds-sp-3);
  min-height: 40px; padding: 6px 0; border-top: 1px solid var(--ds-line); font: var(--ds-text-dense);
}
.ds-ticket__no { color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-ticket__match { min-width: 0; }
.ds-ticket__match b { display: block; font-weight: var(--ds-fw-semibold); color: var(--ds-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-ticket__match small { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-ticket__pick { font-weight: var(--ds-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-ticket__score { color: var(--ds-ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.ds-ticket__leg > .ds-badge { justify-self: end; }
.ds-ticket__foot { font: var(--ds-text-meta); color: var(--ds-muted); font-variant-numeric: tabular-nums; }
@container ds-ticket (max-width: 459px) {
  .ds-ticket__leg { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "no pk pk" "ma sc bd"; row-gap: 2px; }
  .ds-ticket__no { grid-area: no; font: var(--ds-text-meta); }
  .ds-ticket__match { grid-area: ma; }
  .ds-ticket__pick { grid-area: pk; justify-self: end; }
  .ds-ticket__score { grid-area: sc; }
  .ds-ticket__leg > .ds-badge { grid-area: bd; }
}
.ds-collapsed {
  display: flex; align-items: center; gap: var(--ds-sp-2); width: 100%; min-height: 40px; padding: 0 var(--ds-sp-3);
  border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-r-md); background: none; cursor: pointer;
  color: var(--ds-ink-2); font: var(--ds-text-dense); text-align: start;
}
.ds-collapsed > .ds-icon:last-child { margin-left: auto; color: var(--ds-muted); }

/* -------------------------------------------------------- 16 指标条 StatStrip */
.ds-stats { display: flex; margin: 0; overflow-x: auto; scrollbar-width: none; }
.ds-stat { flex: 1 0 auto; min-width: 128px; display: grid; align-content: center; height: 64px; padding: 0 var(--ds-sp-5); border-left: 1px solid var(--ds-line); }
.ds-stat:first-child { padding-left: 0; border-left: 0; }
.ds-stat dt { font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-stat dd { display: flex; align-items: baseline; gap: var(--ds-sp-2); margin: 2px 0 0; }
.ds-stat__v { font: var(--ds-text-figure); color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.ds-stat__note { font: var(--ds-text-meta); color: var(--ds-muted); white-space: nowrap; }
.ds-pill {
  display: inline-flex; align-items: center; gap: var(--ds-sp-2); height: 32px; padding: 0 2px 0 14px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-pill); background: var(--ds-surface);
  font: var(--ds-text-dense); color: var(--ds-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ds-pill b { color: var(--ds-ink); font-weight: var(--ds-fw-semibold); }
@media (max-width: 599px) {
  .ds-stat { min-width: 96px; height: 56px; padding: 0 var(--ds-sp-3); }
  .ds-stat__note { display: none; }
}

/* --------------------------------------------- 17 提示 ⓘ、附注、折叠 Disclosure */
.ds-info {
  position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -8px -6px;
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--ds-muted); vertical-align: middle;
}
.ds-info:hover, .ds-info[aria-expanded="true"] { background: var(--ds-surface-3); color: var(--ds-ink); }
.ds-tip {
  width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: var(--ds-sp-3) 14px;
  background: var(--ds-surface); color: var(--ds-ink-2); border: 0; border-radius: var(--ds-r-lg);
  box-shadow: var(--ds-shadow-pop); font: var(--ds-text-meta);
}
.ds-tip[popover] { position: fixed; inset: auto; margin: 6px 0 0; position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline; }
.ds-tip__title { margin-bottom: 6px; font: var(--ds-fw-semibold) var(--ds-fs-12)/var(--ds-lh-12) var(--ds-font-sans); color: var(--ds-ink); }
.ds-tip dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--ds-sp-3); margin: 0; }
.ds-tip dt { color: var(--ds-muted); }
.ds-tip dd { margin: 0; font-variant-numeric: tabular-nums; }
.ds-footnote { font: var(--ds-text-meta); color: var(--ds-muted); max-width: var(--ds-measure); }

.ds-disclosure > summary {
  display: flex; align-items: center; gap: var(--ds-sp-2); min-height: 44px; list-style: none; cursor: pointer;
  font: var(--ds-text-h4); color: var(--ds-ink);
}
.ds-disclosure > summary::-webkit-details-marker { display: none; }
.ds-disclosure > summary > .ds-icon { color: var(--ds-muted); transition: transform var(--ds-dur-2) var(--ds-ease-out); }
.ds-disclosure[open] > summary > .ds-icon { transform: rotate(90deg); }
.ds-disclosure__meta { margin-left: auto; font: var(--ds-text-dense); color: var(--ds-muted); }
.ds-disclosure__body { padding: 0 0 var(--ds-sp-4) var(--ds-sp-6); font: var(--ds-text-body); color: var(--ds-ink-2); }
.ds-disclosure--line { border-top: 1px solid var(--ds-line); }
.ds-disclosure--line:last-child { border-bottom: 1px solid var(--ds-line); }

/* ------------------------------------------------------ 18 空、加载、刷新 */
.ds-empty {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 48px; padding: 0 var(--ds-sp-4);
  background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md);
  font: var(--ds-text-body); color: var(--ds-ink-2);
}
.ds-empty > .ds-icon { color: var(--ds-muted); }
.ds-empty__links { display: inline-flex; gap: var(--ds-sp-3); }
.ds-empty--block { flex-direction: column; justify-content: center; gap: 6px; min-height: 112px; max-height: 120px; text-align: center; }
.ds-skel { display: block; height: 12px; border-radius: var(--ds-r-sm); background: var(--ds-surface-3); }
.ds-skel--line { height: 14px; }
.ds-loading { font: var(--ds-text-meta); color: var(--ds-muted); }
.is-changed { position: relative; isolation: isolate; }
.is-changed::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--ds-flash); opacity: 0; animation: ds-flash var(--ds-dur-flash) var(--ds-ease-in) 1;
}
@keyframes ds-flash { from { opacity: 1; } to { opacity: 0; } }

/* ------------------------------------------------ 19 对话框 Dialog / 底部抽屉 Sheet */
.ds-dialog {
  width: min(640px, 92vw); max-width: none; max-height: min(85vh, 760px);
  padding: 0; border: 0; border-radius: var(--ds-r-lg);
  background: var(--ds-surface); color: var(--ds-ink); box-shadow: var(--ds-shadow-dialog);
  overflow: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--ds-dur-3) var(--ds-ease-in), transform var(--ds-dur-3) var(--ds-ease-in),
    overlay var(--ds-dur-3) allow-discrete, display var(--ds-dur-3) allow-discrete;
}
.ds-dialog[open] { opacity: 1; transform: none; transition-timing-function: var(--ds-ease-out); }
@starting-style { .ds-dialog[open] { opacity: 0; transform: translateY(8px); } }
.ds-dialog::backdrop { background: var(--ds-scrim); }
.ds-dialog--demo { display: block; position: static; width: 100%; max-height: none; margin: 0; opacity: 1; transform: none; }
.ds-dialog__head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--ds-sp-3);
  min-height: 56px; padding: 0 var(--ds-sp-3) 0 var(--ds-sp-5);
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-line);
}
.ds-dialog__title { flex: 1; min-width: 0; font: var(--ds-text-h3); }
.ds-dialog__title small { display: block; font: var(--ds-text-meta); color: var(--ds-muted); }
.ds-dialog__body { padding: var(--ds-sp-4) var(--ds-sp-5) var(--ds-sp-5); }
.ds-dialog__foot { display: flex; justify-content: flex-end; gap: var(--ds-sp-2); padding: var(--ds-sp-3) var(--ds-sp-5); border-top: 1px solid var(--ds-line); }
.ds-kv { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 10px var(--ds-sp-4); margin: 0; font: var(--ds-text-body); }
.ds-kv dt { color: var(--ds-muted); }
.ds-kv dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--ds-sp-2); font-variant-numeric: tabular-nums; }
.ds-sheet .ds-dialog__body { padding-top: 0; padding-bottom: var(--ds-sp-3); }
@media (max-width: 599px) {
  .ds-dialog:not(.ds-dialog--demo) { width: 100%; max-height: 90vh; margin: auto 0 0; border-radius: var(--ds-r-lg) var(--ds-r-lg) 0 0; transform: translateY(24px); }
  .ds-dialog[open]:not(.ds-dialog--demo) { transform: none; }
  .ds-dialog__head { min-height: 48px; padding: 0 0 0 var(--ds-sp-4); }
  .ds-dialog__head > .ds-iconbtn { width: 44px; height: 44px; }
  .ds-dialog__body { padding: var(--ds-sp-3) var(--ds-sp-4) calc(var(--ds-sp-4) + env(safe-area-inset-bottom)); }
  .ds-sheet .ds-dialog__body { padding-top: 0; }
  .ds-pagehead__actions .ds-btn--primary { height: var(--ds-touch); }
  .ds-info { width: 44px; height: 44px; margin: -14px -12px; }
  .ds-disclosure > summary { min-height: 48px; }
  .ds-seg > button, .ds-seg > a { font-size: var(--ds-fs-14); }
  .ds-filter { height: 36px; }
  .ds-split, .ds-cols-2 { grid-template-columns: minmax(0, 1fr); gap: var(--ds-section-gap); }
  .ds-field--search { width: 100%; }
  .ds-footer__legal { padding-left: 0; }
  /* 手机：联系方式整行另起，不让「·」落在行首 */
  .ds-footer__contact { flex-basis: 100%; }
  .ds-footer__contact::before { content: none; }
  /* 手机：页顶与看板一致 16；h1 只重复页头页名时视觉隐藏（读屏保留），一个事实只出现一次 */
  .ds-page { padding-top: var(--ds-sp-4); }
  .ds-h1--echo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ds-h1--echo + .ds-pagehead__meta { margin-top: 0; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .ds-split { grid-template-columns: minmax(0, 1fr); }
}

[hidden] { display: none; }
}
