      /* Hallmark · macrostructure: Workbench · tone: technical
 * theme: studied-DNA (source: https://gg257.bet/cn/league-of-legends)
 * paper #1C1C1C · accent #FF4800 橙红(锚点) · odds #00FF85 荧光绿(赔率) · display: heavy black(Klapt-role)
 * studied: yes · DNA-source: url */
      :root {
        /* 设计 token（gg257 博彩 DNA：橙红锚点 + 荧光绿赔率，语义色仅限直播/错误） */
        --bg: #1c1c1c;
        --bg2: #262626;
        --card: #262626;
        --card2: #3b3b3c;
        --border: #3b3b3c;
        --text: #f2f2f2;
        --muted: #9d9d9d;
        --dim: #6e6e76; /* 弱化文字（回测工作台同款 token，L4：避免 html.js 依赖回退值） */
        --accent: #ff4800; /* 锚点色：链接/文字/焦点环/激活（on 深底 5.0:1） */
        --accent-strong: #d13c00; /* 按钮/激活 tab 底色（白字 4.82:1） */
        --on-accent: #ffffff; /* 深色按钮上的文字 */
        --green: #00ff85; /* 强调色：赔率（核心数据，12.9:1） */
        --red: #f85149; /* 语义色：直播/错误 */
        --tag-red: #ff5a5a; /* 重点标签：强强对决（语义红，沿用既有 UI） */
        --tag-gold: #ffb020; /* 重点标签：高赔价值（语义金，沿用既有 UI） */
      }
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      body {
        background: var(--bg);
        color: var(--text);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
        min-height: 100vh;
      }
      .wrap {
        max-width: 1180px;
        margin: 0 auto;
        padding: 20px 16px 60px;
      }

      header.top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        margin-bottom: 16px;
      }
      /* 展示级标题 */
      header.top h1 {
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 0.3px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      header.top h1 .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--accent);
        display: inline-block;
      }
      .status-line {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 20px;
        color: var(--muted);
        font-size: 13px;
        margin-left: auto;
      }
      .status-line b {
        color: var(--text);
        font-weight: 600;
      }
      .status-line .badge {
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 12px;
      }
      .badge.ok {
        background: rgba(0, 255, 133, 0.15);
        color: var(--green);
      }
      .badge.err {
        background: rgba(248, 81, 73, 0.15);
        color: var(--red);
      }
      .badge.run {
        background: rgba(248, 81, 73, 0.2);
        color: var(--red);
        animation: pulse 1.2s infinite;
      }
      @keyframes pulse {
        50% {
          opacity: 0.5;
        }
      }

      .toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        margin-bottom: 14px;
      }
      .tabs {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
      }
      .tab {
        padding: 6px 14px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: var(--bg2);
        color: var(--muted);
        cursor: pointer;
        font-size: 13px;
        user-select: none;
      }
      .tab.active {
        background: var(--accent-strong);
        color: var(--on-accent);
        border-color: var(--accent-strong);
      }
      .tab .n {
        opacity: 0.75;
        font-size: 12px;
        margin-left: 4px;
      }
      /* 回测工作台入口（独立页面 /backtest.html） */
      a.bt-nav {
        padding: 6px 14px;
        border-radius: 8px;
        border: 1px solid var(--accent);
        color: var(--accent);
        background: transparent;
        font-size: 13px;
        text-decoration: none;
        cursor: pointer;
        user-select: none;
      }
      a.bt-nav:hover {
        background: rgba(255, 72, 0, 0.12);
      }
      .search {
        margin-left: auto;
        display: flex;
        gap: 8px;
      }
      .search input {
        background: var(--bg2);
        border: 1px solid var(--border);
        color: var(--text);
        border-radius: 8px;
        padding: 7px 12px;
        font-size: 13px;
        width: 200px;
        outline: none;
      }
      .search input:focus {
        border-color: var(--accent);
      }
      button {
        background: var(--accent-strong);
        color: var(--on-accent);
        border: none;
        border-radius: 8px;
        padding: 7px 14px;
        font-size: 13px;
        cursor: pointer;
      }
      button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }
      button.ghost {
        background: var(--bg2);
        color: var(--muted);
        border: 1px solid var(--border);
      }
      /* 按压反馈（interaction-and-states: active 状态） */
      button:not(:disabled):active,
      .tab:active,
      button.hist:active {
        transform: translateY(1px);
      }
      button:not(:disabled):active {
        opacity: 0.85;
      }
      /* 按钮 loading（ThreeUI Thinking Button/Uplink Loader 理念的克制版）：左侧环形 spinner */
      button.loading {
        position: relative;
        padding-left: 30px;
      }
      button.loading::before {
        content: '';
        position: absolute;
        left: 11px;
        top: 50%;
        width: 12px;
        height: 12px;
        margin-top: -6px;
        border: 2px solid rgba(255, 255, 255, 0.35);
        border-top-color: var(--on-accent);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
      }
      button.ghost.loading::before {
        border-color: rgba(255, 255, 255, 0.2);
        border-top-color: var(--muted);
      }
      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }
      /* 键盘可达性（Gate 40-41）：所有可交互元素 focus-visible 高亮 */
      button:focus-visible,
      .tab:focus-visible,
      .search input:focus-visible,
      button.hist:focus-visible,
      .modal .close:focus-visible,
      .c-head:focus-visible,
      .pred-head:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }

      .hint {
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 12px;
      }

      .group {
        margin-bottom: 20px;
      }
      .group-title {
        font-size: 13px;
        color: var(--muted);
        font-weight: 600;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .group-title::before {
        content: '';
        width: 3px;
        height: 14px;
        background: var(--accent);
        border-radius: 2px;
      }

      /* 今日比赛区块（与联赛分组区分：accent 边框 + 浅色底，突出"今天要看"） */
      .today-group {
        border: 1px solid var(--accent);
        border-radius: 12px;
        padding: 12px 12px 2px;
        margin-bottom: 18px;
        background: rgba(255, 72, 0, 0.05);
      }
      .today-title {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 800;
        color: var(--accent);
        margin-bottom: 6px;
      }
      .today-title::before {
        content: '';
        width: 4px;
        height: 15px;
        background: var(--accent);
        border-radius: 2px;
      }

      /* 今日比赛子分组标题（进行中/未开赛/已结束）：色块旗标 + 计数，与卡片状态色呼应 */
      .today-sub {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.4px;
        margin: 10px 2px 8px;
      }
      .today-sub .ts-flag {
        width: 8px;
        height: 8px;
        border-radius: 2px;
        flex-shrink: 0;
      }
      .today-sub .ts-n {
        color: var(--muted);
        font-weight: 600;
      }
      .today-sub.is-live {
        color: var(--red);
      }
      .today-sub.is-live .ts-flag {
        background: var(--red);
        animation: live-pulse 1.2s infinite;
      }
      .today-sub.is-wait {
        color: var(--accent);
      }
      .today-sub.is-wait .ts-flag {
        background: var(--accent);
      }
      .today-sub.is-done {
        color: var(--muted);
      }
      .today-sub.is-done .ts-flag {
        background: var(--muted);
      }

      .match-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 10px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 20px;
      }
      .match-card:hover {
        border-color: var(--card2);
      }
      /* 进行中比赛：红系卡片级高亮（语义色=直播），左侧红条 + 微红底，扫一眼即分 */
      .match-card.live {
        border-color: rgba(248, 81, 73, 0.55);
        background: rgba(248, 81, 73, 0.06);
        box-shadow: inset 3px 0 0 var(--red);
      }
      .match-card.live:hover {
        border-color: rgba(248, 81, 73, 0.8);
      }
      /* 进行中比分：红系胶囊放大呈现（此刻最关键的信息） */
      .match-card.live .score-tag {
        background: rgba(248, 81, 73, 0.15);
        border: 1px solid rgba(248, 81, 73, 0.45);
        border-radius: 8px;
        padding: 0 7px;
        font-size: 13px;
      }
      .match-card.ended {
        border-style: dashed;
      }
      .mc-main {
        flex: 1 1 320px;
        min-width: 260px;
      }
      .mc-time {
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 6px;
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
        font-variant-numeric: tabular-nums;
      }
      /* 三态状态徽标：进行中=红系脉冲 / 未开赛=橙系倒计时胶囊 / 已结束=灰（一眼可辨） */
      .mc-time .live-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(248, 81, 73, 0.15);
        color: var(--red);
        border: 1px solid rgba(248, 81, 73, 0.45);
        border-radius: 9px;
        padding: 1px 8px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.5px;
      }
      .mc-time .live-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--red);
        animation: live-pulse 1.2s infinite;
      }
      @keyframes live-pulse {
        50% {
          opacity: 0.35;
        }
      }
      .mc-time .cd-chip {
        display: inline-flex;
        align-items: center;
        background: rgba(255, 72, 0, 0.1);
        color: var(--accent);
        border: 1px solid rgba(255, 72, 0, 0.35);
        border-radius: 9px;
        padding: 1px 8px;
        font-size: 11px;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
      }
      .mc-time .ended-chip {
        background: var(--card2);
        color: var(--muted);
        border-radius: 9px;
        padding: 1px 8px;
        font-size: 11px;
        font-weight: 700;
      }
      .mc-time .live-elapsed {
        color: var(--red);
        font-variant-numeric: tabular-nums;
      }
      .mc-time .betstop-tag {
        color: var(--red);
        font-weight: 700;
      }
      .mc-time .score-tag {
        color: var(--text);
        font-weight: 700;
        font-variant-numeric: tabular-nums;
      }
      /* 展示级：队名 */
      .mc-teams {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 17px;
        font-weight: 800;
        flex-wrap: wrap;
      }
      .mc-teams .vs {
        color: var(--muted);
        font-weight: 400;
        font-size: 13px;
      }
      .mc-teams .team {
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .mc-teams img {
        width: 22px;
        height: 22px;
        border-radius: 4px;
        object-fit: contain;
        background: #fff2;
      }
      .mc-teams .home {
        color: var(--accent);
      }
      .mc-teams .away {
        color: var(--text);
      }

      .mc-odds {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
      }
      .odd-block {
        background: var(--bg2);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 6px 10px;
        min-width: 108px;
      }
      .odd-block .ob-name {
        font-size: 11px;
        color: var(--muted);
        margin-bottom: 4px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
      }
      .odd-block .ob-row {
        display: flex;
        gap: 6px;
        align-items: stretch;
      }
      .odd-block .ob-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        min-width: 46px;
        padding: 2px 5px;
        background: var(--card);
        border-radius: 6px;
        border: 1px solid transparent;
      }
      .odd-block .ob-item:hover {
        border-color: var(--border);
      }
      .odd-block .ob-label {
        font-size: 11px;
        color: var(--muted);
        white-space: nowrap;
        line-height: 1.3;
      }
      /* 展示级：赔率（核心数据，唯一强调色） */
      .odd-block .ob-row .o {
        color: var(--green);
        font-weight: 800;
        font-size: 16px;
        font-variant-numeric: tabular-nums;
        line-height: 1.25;
      }
      .odd-block .ob-row .o.inactive {
        color: var(--muted);
        text-decoration: line-through;
      }
      .odd-block button.hist {
        background: none;
        border: none;
        color: var(--accent);
        font-size: 11px;
        cursor: pointer;
        padding: 2px 0 0;
      }
      .odd-block button.hist:hover {
        text-decoration: underline;
      }

      /* 赛前预测（🔮 徽标 + 概率 + 建议，accent 色系；理由展开显示） */
      .mc-pred {
        background: var(--bg2);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px 10px;
        margin-top: 8px;
        max-width: 720px;
        width: 100%;
      }
      .pred-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        font-size: 12px;
      }
      .mc-pred .pred-badge {
        font-size: 13px;
      }
      .mc-pred b {
        color: var(--green);
        font-weight: 800;
        font-variant-numeric: tabular-nums;
      }
      /* 展示级：预测胜率数字（与环形仪表并存：数字=核心数据，仪表=置信度一眼可读） */
      .mc-pred .pred-pct {
        color: var(--green);
        font-size: 16px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
      }
      /* 胜率环形仪表（ThreeUI Performance Gauges 理念的零依赖实现）：
       * 轨道=card2、弧/文字=置信度语义色（高=荧光绿/中=橙红/低=灰，与 .pred-conf 一致），
       * 全部引用设计 token，未引入新色 */
      .gauge {
        display: inline-block;
        flex-shrink: 0;
        margin: 0 2px;
        vertical-align: -9px;
      }
      .gauge .g-track {
        fill: none;
        stroke: var(--card2);
        stroke-width: 3.5;
      }
      .gauge .g-arc {
        fill: none;
        stroke: var(--green);
        stroke-width: 3.5;
        stroke-linecap: round;
      }
      .gauge.medium .g-arc {
        stroke: var(--accent);
      }
      .gauge.low .g-arc {
        stroke: var(--muted);
      }
      .gauge .g-text {
        fill: var(--green);
        font-size: 10.5px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
      }
      .gauge.medium .g-text {
        fill: var(--accent);
      }
      .gauge.low .g-text {
        fill: var(--muted);
      }
      .mc-pred .pred-compare {
        color: var(--muted);
        font-size: 11px;
      }
      .mc-pred .pred-advice {
        color: var(--text);
        white-space: nowrap;
      }
      .mc-pred .pred-advice b {
        color: var(--accent);
      }
      .mc-pred .pred-advice.pred-value {
        color: var(--accent);
      }
      .mc-pred .pred-advice.pred-value b {
        color: var(--accent);
      }
      .mc-pred .pred-conf {
        font-size: 11px;
        color: var(--muted);
      }
      .mc-pred .pred-conf.high {
        color: var(--green);
      }
      .mc-pred .pred-conf.medium {
        color: var(--accent);
      }
      .mc-pred .pred-conf.low {
        color: var(--muted);
      }
      /* 重点比赛标注：🔥 强强对抗（红色·激烈对决） / 💎 高赔价值（金色·高收益机会） */
      .pred-tag {
        font-size: 10px;
        font-weight: 800;
        padding: 1px 7px;
        border-radius: 9px;
        white-space: nowrap;
        letter-spacing: 0.3px;
      }
      .pred-tag.big {
        background: rgba(255, 90, 90, 0.13);
        color: var(--tag-red);
        border: 1px solid rgba(255, 90, 90, 0.45);
      }
      .pred-tag.value {
        background: rgba(255, 176, 32, 0.1);
        color: var(--tag-gold);
        border: 1px solid rgba(255, 176, 32, 0.45);
      }
      .mc-pred.featured-big {
        border-color: rgba(255, 90, 90, 0.55);
      }
      .mc-pred.featured-value {
        border-color: rgba(255, 176, 32, 0.55);
      }
      .mc-pred .pred-time {
        font-size: 11px;
        color: var(--dim);
        white-space: nowrap;
      }
      .mc-pred button.hist {
        background: none;
        border: none;
        color: var(--accent);
        font-size: 11px;
        cursor: pointer;
        padding: 0;
        margin-left: auto;
      }
      .mc-pred button.hist:hover {
        text-decoration: underline;
      }
      .pred-body {
        border-top: 1px solid var(--border);
        margin-top: 7px;
        padding-top: 6px;
      }
      /* 每场比赛预测详情：默认折叠，点击标题行展开（与 ROI 面板同款交互） */
      .mc-pred .pred-head {
        cursor: pointer;
        user-select: none;
      }
      .pred-caret {
        display: inline-block;
        transition: transform 0.15s ease;
        font-size: 10px;
        color: var(--accent);
      }
      .mc-pred.c-open .pred-caret {
        transform: rotate(90deg);
      }
      .pred-body {
        display: none;
      }
      .mc-pred.c-open .pred-body {
        display: block;
      }
      .pred-label {
        font-size: 11px;
        color: var(--muted);
        font-weight: 600;
        margin-bottom: 2px;
      }
      .pred-reason {
        font-size: 11px;
        color: var(--muted);
        line-height: 1.7;
        padding-left: 2px;
      }
      .pred-reason.pred-hot {
        color: var(--text);
        font-weight: 600;
      }
      .pred-conclusion .pred-reason {
        color: var(--text);
        font-weight: 600;
      }
      .pred-risk {
        font-size: 11px;
        color: var(--dim);
        line-height: 1.7;
        padding-left: 2px;
      }
      #modalBody .pred-hot-li {
        color: var(--text);
        font-weight: 600;
      }

      .empty {
        color: var(--muted);
        text-align: center;
        padding: 40px 0;
        font-size: 14px;
      }

      /* 加载骨架（Gate：loading 态） */
      .match-card.skeleton {
        pointer-events: none;
      }
      .skeleton .sk-line {
        height: 14px;
        border-radius: 6px;
        background: var(--card2);
        margin: 8px 0;
        animation: shimmer 1.2s infinite;
      }
      @keyframes shimmer {
        50% {
          opacity: 0.45;
        }
      }

      /* 弹窗 */
      .modal-mask {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 50;
        padding: 20px;
      }
      .modal-mask.show {
        display: flex;
      }
      .modal {
        background: var(--bg2);
        border: 1px solid var(--border);
        border-radius: 14px;
        max-width: 720px;
        width: 100%;
        max-height: 80vh;
        overflow: auto;
        padding: 20px;
      }
      .modal h3 {
        font-size: 15px;
        margin-bottom: 4px;
      }
      .modal .sub {
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 14px;
      }
      .modal table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
      }
      .modal th,
      .modal td {
        padding: 6px 8px;
        border-bottom: 1px solid var(--border);
        text-align: left;
      }
      .modal th {
        color: var(--muted);
        font-weight: 500;
        font-size: 12px;
      }
      .modal .close {
        float: right;
        background: none;
        border: none;
        color: var(--muted);
        font-size: 18px;
        cursor: pointer;
      }
      .modal .close:hover {
        color: var(--text);
      }
      /* 配置开关（ThreeUI Skeuomorphic Toggle 的去拟物化版本）：扁平暗色 + 锚点色滑块，
       * 真 checkbox 保留（可访问性 + 保存逻辑不变），视觉由 .sw-track 呈现 */
      .switch {
        position: relative;
        display: inline-block;
        width: 40px;
        height: 22px;
        flex-shrink: 0;
      }
      .switch input {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        opacity: 0;
        cursor: pointer;
      }
      .switch .sw-track {
        position: absolute;
        inset: 0;
        border-radius: 11px;
        background: var(--card2);
        border: 1px solid var(--border);
        transition: background 0.15s ease, border-color 0.15s ease;
        pointer-events: none;
      }
      .switch .sw-track::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--muted);
        transition: transform 0.15s ease, background 0.15s ease;
      }
      .switch input:checked + .sw-track {
        background: rgba(255, 72, 0, 0.22);
        border-color: var(--accent);
      }
      .switch input:checked + .sw-track::after {
        transform: translateX(18px);
        background: var(--accent);
      }
      .switch input:focus-visible + .sw-track {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }
      .modal .delta {
        font-size: 11px;
        color: var(--muted);
        font-variant-numeric: tabular-nums;
      }
      .modal .delta.up {
        color: var(--green);
      }
      .modal .delta.down {
        color: var(--red);
      }

      footer {
        color: var(--muted);
        font-size: 11px;
        margin-top: 30px;
      }

      /* 卡片入场微动效（ThreeUI Motion Design 理念的克制版）：
       * 仅用户触发渲染时由 app.js 加 .card-in（60s 自动刷新不重播）；
       * 动效只做 6px 上移 + 淡入，不位移排版、不改变最终布局 */
      .match-card.card-in {
        animation: card-in 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
      }
      @keyframes card-in {
        from {
          opacity: 0;
          transform: translateY(6px);
        }
      }
      /* 无障碍：用户系统开启"减少动态效果"时，关闭入场动效与脉冲类动画 */
      @media (prefers-reduced-motion: reduce) {
        .match-card.card-in {
          animation: none;
        }
        .badge.run,
        .skeleton .sk-line,
        .mc-time .live-dot,
        .today-sub.is-live .ts-flag {
          animation: none;
        }
      }

      /* 响应式（Gate 34：320/375/414/768 四档无水平滚动） */
      @media (max-width: 768px) {
        .mc-odds {
          width: 100%;
        }
        .odd-block {
          flex: 1 1 calc(33.33% - 8px);
          min-width: 100px;
        }
      }
      @media (max-width: 640px) {
        .status-line {
          margin-left: 0;
          width: 100%;
        }
        .search {
          margin-left: 0;
          width: 100%;
        }
        .search input {
          flex: 1;
          width: auto;
        }
        .match-card {
          padding: 12px;
        }
        .mc-main {
          min-width: 0;
          flex: 1 1 100%;
        }
        .odd-block {
          flex: 1 1 calc(50% - 8px);
          min-width: 0;
        }
        .modal {
          padding: 14px;
        }
      }
      @media (max-width: 380px) {
        .wrap {
          padding: 14px 10px 48px;
        }
        header.top h1 {
          font-size: 18px;
        }
        .mc-teams {
          font-size: 15px;
          gap: 6px;
        }
        .odd-block {
          flex: 1 1 100%;
        } /* 320px 下盘口块单列，保证 3 个选项完整不溢出 */
        .mc-time {
          gap: 6px;
        }
      }
