:root {
      color-scheme: light;
      --ink: #17212f;
      --muted: #5e6878;
      --line: #d9dee7;
      --paper: #f6f7fa;
      --panel: #ffffff;
      --header: #133a34;
      --gold: #c7a453;
      --green: #11715f;
      --red: #a3303d;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
      line-height: 1.45;
    }

    .dashboard-hero {
      padding: 22px clamp(18px, 4vw, 48px) 18px;
      background: var(--header);
      color: #fff;
      border-bottom: 4px solid var(--gold);
    }

    h1 {
      margin: 0 0 8px;
      font-size: clamp(26px, 3.2vw, 40px);
      font-weight: 760;
      letter-spacing: 0;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .dashboard-hero p {
      max-width: 980px;
      margin: 0;
      color: #deebe8;
      font-size: 15px;
    }

    main {
      width: min(1280px, calc(100% - 32px));
      margin: 24px auto 48px;
    }

    .toolbar,
    .filters {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .toolbar { margin-bottom: 16px; }
    .filters { justify-content: flex-end; }

    a.button,
    button,
    select,
    input {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #fff;
      color: var(--ink);
      font: inherit;
      padding: 8px 10px;
    }

    a.button,
    button {
      text-decoration: none;
      cursor: pointer;
    }

    button.primary {
      background: var(--green);
      border-color: var(--green);
      color: #fff;
    }

    button.secondary {
      background: #fff;
      border-color: #b9c3d1;
      color: var(--ink);
    }

    .notice {
      border: 1px solid #dec675;
      background: #fff8df;
      color: #55400c;
      padding: 10px 12px;
      border-radius: 6px;
      margin-bottom: 18px;
      font-size: 14px;
    }

    .seo-summary,
    .trust-panel {
      padding: 16px;
    }

    .seo-summary h2,
    .trust-panel h2 {
      margin: 0 0 8px;
      font-size: 20px;
    }

    .seo-summary p,
    .trust-panel p {
      margin: 6px 0;
      color: var(--muted);
      line-height: 1.65;
    }

    .seo-facts,
    .trust-grid,
    .faq-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-top: 12px;
    }

    .seo-fact,
    .trust-card,
    .faq-card {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      background: #fbfcfe;
      padding: 12px;
      min-width: 0;
    }

    .seo-fact strong,
    .trust-card strong,
    .faq-card strong {
      display: block;
      margin-bottom: 5px;
      overflow-wrap: anywhere;
    }

    .seo-fact span,
    .trust-card span,
    .faq-card span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .comparison-kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      padding: 14px;
      border-bottom: 1px solid var(--line);
      background: #fff;
    }

    .comparison-kpi {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      padding: 10px;
      background: #fbfcfe;
    }

    .comparison-kpi span {
      display: block;
      color: var(--muted);
      font-size: 12px;
    }

    .comparison-kpi strong {
      display: block;
      margin-top: 4px;
      font-size: 20px;
    }

    .stats,
    .highlights {
      display: grid;
      gap: 14px;
    }

    .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .highlights {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      margin-top: 18px;
    }

    .stat,
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
    }

    .stat {
      min-height: 86px;
      padding: 14px;
    }

    .stat span {
      display: block;
      color: var(--muted);
      font-size: 12px;
    }

    .stat strong {
      display: block;
      margin-top: 4px;
      font-size: 23px;
    }

    .highlight { padding: 14px; }
    .highlight h3 { margin: 0 0 10px; font-size: 15px; }

    .viz-section {
      margin-top: 22px;
    }

    .viz-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 12px;
    }

    .viz-header p {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .viz-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .viz-card {
      min-height: 360px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 14px;
      box-shadow: 0 14px 32px rgba(23, 33, 47, 0.06);
    }

    .viz-card.wide {
      grid-column: 1 / -1;
    }

    .viz-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      min-height: 54px;
      margin-bottom: 8px;
    }

    .viz-card h3 {
      margin: 0;
      font-size: 15px;
    }

    .viz-card p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
    }

    .viz-canvas {
      width: 100%;
      height: 310px;
    }

    .viz-card.wide .viz-canvas {
      height: 390px;
    }

    .matrix-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 14px;
      border-bottom: 1px solid var(--line);
      background: #fbfcfe;
    }

    .matrix-kpi {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      padding: 12px;
      background: #fff;
    }

    .matrix-kpi span {
      display: block;
      color: var(--muted);
      font-size: 12px;
    }

    .matrix-kpi strong {
      display: block;
      margin-top: 4px;
      font-size: 19px;
    }

    .matrix-wrap {
      overflow-x: hidden;
      overflow-y: auto;
      max-height: 760px;
    }

    .matrix-wrap.exporting {
      max-height: none;
      overflow: visible;
    }

    .analysis-table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
      font-size: 11px;
    }

    .analysis-table th {
      white-space: normal;
      vertical-align: bottom;
      line-height: 1.25;
      padding: 7px 5px;
      word-break: keep-all;
    }

    .analysis-table td {
      vertical-align: top;
      white-space: normal;
      border-right: 1px solid #edf0f5;
      padding: 7px 5px;
      line-height: 1.32;
      overflow-wrap: anywhere;
    }

    .match-cell {
      min-width: 0;
    }

    .match-index {
      display: inline-grid;
      place-items: center;
      width: 22px;
      height: 22px;
      margin-right: 7px;
      border-radius: 50%;
      background: #e8f4ef;
      color: var(--green);
      font-weight: 800;
      font-size: 12px;
    }

    .mini-lines {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .mini-line {
      display: grid;
      grid-template-columns: 28px minmax(24px, 1fr) 38px;
      gap: 4px;
      align-items: center;
      color: #2e3a4d;
      font-size: 10px;
    }

    .mini-track {
      height: 6px;
      border-radius: 999px;
      background: #e7ecf2;
      overflow: hidden;
    }

    .mini-fill {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: var(--green);
    }

    .signal {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 58px;
      border-radius: 6px;
      padding: 5px 6px;
      color: #fff;
      font-weight: 800;
      text-align: center;
    }

    .signal.home { background: #11715f; }
    .signal.draw { background: #6b7280; }
    .signal.away { background: #2f6fb2; }
    .signal.watch { background: #a3303d; }

    .stars {
      color: var(--gold);
      letter-spacing: 1px;
      font-size: 13px;
      white-space: nowrap;
    }

    .spark {
      width: 88px;
      height: 28px;
      max-width: 100%;
    }

    .spark path {
      fill: none;
      stroke: var(--green);
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .spark circle {
      fill: #fff;
      stroke: var(--green);
      stroke-width: 2;
    }

    .muted-note {
      color: var(--muted);
      font-size: 12px;
      margin-top: 4px;
    }

    .analysis-table .muted-note {
      font-size: 10px;
      line-height: 1.3;
    }

    .analysis-table .stars {
      font-size: 10px;
      letter-spacing: 0;
    }

    .analysis-table strong {
      font-size: 11px;
    }

    .export-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .date-filter {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .date-filter input {
      width: 136px;
    }

    .date-filter span {
      color: var(--muted);
      font-size: 12px;
    }

    .overview-section {
      margin-top: 18px;
    }

    .overview-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .overview-head h2 {
      margin: 0;
    }

    .standings-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      padding: 14px;
    }

    .standings-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    .standings-card h3 {
      margin: 0;
      padding: 10px 12px;
      background: #f3f6fa;
      font-size: 14px;
    }

    .standings-card table {
      min-width: 0;
      font-size: 12px;
    }

    .standings-card th,
    .standings-card td {
      padding: 7px 8px;
    }

    .standings-card th {
      position: static;
      cursor: default;
    }

    .standings-card .team {
      white-space: normal;
    }

    .ai-panel {
      padding: 14px;
      display: grid;
      gap: 14px;
    }

    .ai-output {
      min-height: 180px;
      border: 1px solid #dce3ed;
      border-radius: 8px;
      background: #fbfcfe;
      padding: 14px;
      white-space: pre-wrap;
      font-size: 14px;
      line-height: 1.65;
    }

    .ai-meta {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .ai-chip {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      background: #fff;
      padding: 10px;
      font-size: 12px;
    }

    .ai-chip span {
      display: block;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .lineup-panel {
      padding: 14px;
      display: grid;
      gap: 14px;
    }

    .lineup-status {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .lineup-status-item,
    .player-leader-card {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      background: #fbfcfe;
      padding: 10px;
      min-width: 0;
    }

    .lineup-status-item span,
    .player-leader-card span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 4px;
    }

    .lineup-status-item strong,
    .player-leader-card strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .lineup-board {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .lineup-insight-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .lineup-insight-card {
      border: 1px solid #dfe7f0;
      border-radius: 8px;
      background: #fff;
      padding: 12px;
      min-width: 0;
    }

    .lineup-insight-card span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 6px;
    }

    .lineup-insight-card strong {
      display: block;
      font-size: 18px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .lineup-insight-card p {
      margin: 7px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .team-lineup-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    .team-lineup-head {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 12px;
      background: #f3f6fa;
      border-bottom: 1px solid var(--line);
    }

    .team-logo {
      width: 36px;
      height: 36px;
      object-fit: contain;
    }

    .team-lineup-head h3 {
      margin: 0;
      font-size: 15px;
    }

    .team-lineup-head p {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 12px;
    }

    .formation-badge,
    .player-score {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      background: #e8f4ef;
      color: var(--green);
      font-weight: 800;
      min-width: 54px;
      padding: 5px 8px;
      font-size: 12px;
    }

    .formation-pitch {
      min-height: 470px;
      display: grid;
      gap: 10px;
      align-content: space-between;
      padding: 14px;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        #236b55;
      background-size: 25% 100%, 100% 20%;
    }

    .formation-row {
      display: grid;
      grid-template-columns: repeat(var(--slots), minmax(0, 1fr));
      gap: 8px;
      align-items: stretch;
    }

    .player-token {
      min-height: 74px;
      border: 1px solid rgba(255, 255, 255, 0.32);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.94);
      padding: 8px;
      text-align: center;
      box-shadow: 0 10px 20px rgba(15, 43, 35, 0.16);
      overflow: hidden;
    }

    .player-token strong {
      display: block;
      color: var(--ink);
      font-size: 12px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .player-token span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      margin-top: 3px;
    }

    .bench-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 12px;
    }

    .bench-player {
      border: 1px solid #e4e9f1;
      border-radius: 8px;
      padding: 8px;
      font-size: 12px;
      min-width: 0;
    }

    .bench-player strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .player-leader-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .player-leader-grid .lineup-empty {
      grid-column: 1 / -1;
    }

    .player-leader-card {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
    }

    .lineup-empty {
      border: 1px dashed #c9d2df;
      border-radius: 8px;
      padding: 18px;
      color: var(--muted);
      background: #fbfcfe;
    }

    .rank-list {
      display: grid;
      gap: 8px;
    }

    .rank-item {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: center;
      font-size: 14px;
    }

    .rank-item strong { font-weight: 700; }
    .rank-item span { color: var(--muted); }

    section {
      margin-top: 22px;
      overflow: hidden;
    }

    .badge {
      display: inline-block;
      min-width: 66px;
      border-radius: 999px;
      padding: 4px 8px;
      text-align: center;
      font-size: 12px;
      font-weight: 700;
    }

    .badge.hit {
      background: #e3f4ed;
      color: #0b5f47;
    }

    .badge.miss {
      background: #f9e6e8;
      color: #862532;
    }

    .section-head {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: #fbfcfe;
    }

    h2 { margin: 0; font-size: 18px; }

    .section-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .table-wrap {
      overflow: auto;
      max-height: 620px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      min-width: 820px;
    }

    th,
    td {
      padding: 9px 10px;
      border-bottom: 1px solid #edf0f5;
      text-align: left;
      white-space: nowrap;
    }

    th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #f3f6fa;
      color: #344154;
      font-weight: 650;
      cursor: pointer;
      user-select: none;
    }

    td.num,
    th.num {
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .team { font-weight: 650; }

    .bar {
      display: inline-grid;
      grid-template-columns: 62px minmax(86px, 1fr);
      gap: 8px;
      align-items: center;
      width: 178px;
      max-width: 100%;
    }

    .bar-track {
      height: 8px;
      background: #e7ecf2;
      border-radius: 999px;
      overflow: hidden;
    }

    .bar-fill {
      display: block;
      height: 100%;
      background: var(--green);
    }

    .charts,
    .groups {
      display: grid;
      gap: 14px;
      padding: 14px;
    }

    .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    figure {
      margin: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: #fff;
    }

    figure img {
      display: block;
      width: 100%;
      height: auto;
    }

    figcaption {
      padding: 9px 10px;
      border-top: 1px solid var(--line);
      color: var(--muted);
      font-size: 13px;
    }

    footer {
      width: min(1280px, calc(100% - 32px));
      margin: 28px auto 0;
      padding: 18px 0 30px;
      color: var(--muted);
      font-size: 13px;
    }

    .dashboard-footer {
      border-top: 1px solid var(--line);
    }

    .footer-nav {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .footer-nav a {
      color: var(--green);
      font-weight: 700;
      text-decoration: none;
    }

    .footer-nav a:hover {
      text-decoration: underline;
    }

    .footer-disclaimer {
      margin: 0;
      line-height: 1.7;
    }

    @media (max-width: 900px) {
      main { width: min(100% - 20px, 1280px); }
      .stats,
      .highlights,
      .charts,
      .groups,
      .viz-grid,
      .standings-grid,
      .lineup-status,
      .lineup-insight-grid,
      .lineup-board,
      .player-leader-grid,
      .seo-facts,
      .trust-grid,
      .faq-grid,
      .comparison-kpis,
      .ai-meta,
      .matrix-summary { grid-template-columns: 1fr; }
      .section-head { align-items: flex-start; flex-direction: column; }
      .viz-header,
      .viz-card-head { align-items: flex-start; flex-direction: column; }
      .filters { justify-content: flex-start; }
      .export-tools { justify-content: flex-start; }
      .date-filter { flex-wrap: wrap; }
      .viz-card.wide { grid-column: auto; }
      .viz-canvas,
      .viz-card.wide .viz-canvas { height: 330px; }
      .matrix-wrap { overflow-x: hidden; }
      .analysis-table {
        min-width: 0;
        table-layout: auto;
      }
      .analysis-table thead,
      .analysis-table colgroup {
        display: none;
      }
      .analysis-table,
      .analysis-table tbody,
      .analysis-table tr,
      .analysis-table td {
        display: block;
        width: 100%;
      }
      .analysis-table tr {
        border-bottom: 1px solid var(--line);
        padding: 8px 0;
      }
      .analysis-table td {
        border-right: 0;
        border-bottom: 1px solid #edf0f5;
        padding: 8px 10px 8px 92px;
        position: relative;
        min-height: 38px;
      }
      .analysis-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 8px;
        width: 72px;
        color: var(--muted);
        font-weight: 700;
      }
    }
