  :root {
    --bg-main:    #070b14;
    --bg-panel:   rgba(15,23,42,.86);
    --bg-card:    rgba(22,31,52,.9);
    --bg-elevated: rgba(30,41,59,.92);
    --border:     rgba(100,116,139,.34);
    --border-strong: rgba(148,163,184,.42);
    --accent:     #8b5cf6;
    --accent-2:   #38bdf8;
    --accent-3:   #f59e0b;
    --accent-4:   #2dd4bf;
    --accent-glow: 0 0 16px rgba(56,189,248,.28);
    --text-main:  #f8fafc;
    --text-mute:  #cbd5e1;
    --text-dim:   #94a3b8;
  }
  html, body { background: var(--bg-main); color: var(--text-main); }
  #mobile-back { display: none; }
  body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #070b14 0%, #101426 48%, #050712 100%);
    min-height: 100vh;
  }
  .app-shell { min-height: 100vh; }
  .panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
  }
  .card  { background: var(--bg-card);  border: 1px solid var(--border); border-radius: 8px; }
  .glow-border { box-shadow: 0 0 0 1px rgba(56,189,248,.28), 0 16px 40px rgba(0,0,0,.25); }
  .neon-text { background: linear-gradient(135deg, #38bdf8 0%, #c4b5fd 60%, #fbbf24 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .match-row { cursor: pointer; transition: all .15s; border-left: 3px solid transparent; }
  .match-row:hover { background: rgba(56,189,248,.08); }
  .match-row.selected { background: rgba(56,189,248,.13); border-left-color: var(--accent-2); box-shadow: inset 0 0 20px rgba(56,189,248,.08); }
  .tab-btn {
    transition: all .15s; background: rgba(56,189,248,.08); color: var(--text-mute);
    border: 1px solid var(--border); backdrop-filter: blur(10px);
  }
  .tab-btn:hover { background: rgba(56,189,248,.14); color: var(--text-main); }
  .tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    color: #fff; border-color: rgba(56,189,248,.7); box-shadow: var(--accent-glow);
  }
  select, input[type="text"] {
    background: rgba(15,23,42,.9); color: var(--text-main);
    border: 1px solid var(--border); border-radius: 8px;
  }
  select:focus, input[type="text"]:focus {
    outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(56,189,248,.22);
  }
  select option { background: var(--bg-card); color: var(--text-main); }
  input[type="checkbox"] { accent-color: var(--accent); }
  button:hover { transition: all .15s; }
  .btn-purple {
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    color: #fff; border: none; box-shadow: var(--accent-glow);
  }
  .btn-purple:hover { box-shadow: 0 0 18px rgba(56,189,248,.42); transform: translateY(-1px); }
  .stat-chip {
    background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.3);
    color: var(--text-main); border-radius: 999px;
  }
  .stat-chip .num { color: var(--accent-2); font-weight: 700; }
  .workbench {
    border-bottom: 1px solid var(--border);
    background: rgba(11,18,32,.72);
  }
  .workbench-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
  }
  .workbench-kicker {
    color: var(--accent-4);
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
  }
  .workbench-title {
    color: var(--text-main);
    font-size: 18px;
    font-weight: 800;
    margin-top: 3px;
  }
  .workbench-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .workbench-actions button {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,.28);
    background: rgba(56,189,248,.08);
    color: #dbeafe;
    cursor: pointer;
    font-size: 12px;
  }
  .workbench-actions button:hover {
    background: rgba(56,189,248,.16);
    border-color: rgba(56,189,248,.5);
  }
  .workbench-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
  .metric-card {
    min-width: 0;
    min-height: 74px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(15,23,42,.72);
    padding: 10px 12px;
  }
  .metric-card span,
  .metric-card small {
    display: block;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .metric-card b {
    display: block;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.25;
    margin: 3px 0;
    font-family: ui-monospace, "PingFang SC", monospace;
  }
  .metric-card.primary { border-color: rgba(56,189,248,.34); background: rgba(14,116,144,.14); }
  .metric-card.good { border-color: rgba(45,212,191,.34); }
  .metric-card.good b { color: #99f6e4; }
  .metric-card.warn { border-color: rgba(245,158,11,.4); }
  .metric-card.warn b { color: #fde68a; }
  .metric-card.bad { border-color: rgba(248,113,113,.36); }
  .metric-card.bad b { color: #fecaca; }
  #toast-wrap {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .toast-item {
    min-width: 220px;
    max-width: min(360px, calc(100vw - 36px));
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(15,23,42,.94);
    color: var(--text-main);
    box-shadow: 0 18px 40px rgba(0,0,0,.32);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s, transform .18s;
  }
  .toast-item.show {
    opacity: 1;
    transform: translateY(0);
  }
  .toast-item.success { border-color: rgba(45,212,191,.48); color: #ccfbf1; }
  .toast-item.warn { border-color: rgba(245,158,11,.48); color: #fde68a; }
  .toast-item.error { border-color: rgba(248,113,113,.48); color: #fecaca; }
  .loading-card {
    width: min(520px, 90%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(56,189,248,.24);
    border-radius: 8px;
    background: rgba(15,23,42,.72);
  }
  .loading-card b,
  .loading-card span {
    display: block;
  }
  .loading-card b { color: var(--text-main); font-size: 14px; }
  .loading-card span { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
  .skeleton-list {
    width: min(520px, 90%);
    display: grid;
    gap: 8px;
  }
  .skeleton-list span {
    display: block;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(148,163,184,.08), rgba(148,163,184,.18), rgba(148,163,184,.08));
    background-size: 220% 100%;
    animation: shimmer 1.2s linear infinite;
  }
  @keyframes shimmer { to { background-position: -220% 0; } }
  #slogan {
    display: none !important;
  }
  .data-health-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(15,118,110,.12), rgba(30,64,175,.08));
    color: var(--text-mute);
    font-size: 11px;
    line-height: 1.35;
  }
  .data-health-summary.hidden { display: none !important; }
  .data-health-summary span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border: 1px solid rgba(167,139,250,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    white-space: nowrap;
  }
  .data-health-summary .health-title {
    color: #99f6e4;
    border-color: rgba(45,212,191,.35);
    background: rgba(20,184,166,.1);
    font-weight: 700;
  }
  .data-health-summary b {
    color: #7dd3fc;
    font-family: ui-monospace, monospace;
  }
  .data-health-summary .health-action {
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(45,212,191,.4);
    background: rgba(20,184,166,.14);
    color: #ccfbf1;
    font-size: 11px;
    cursor: pointer;
  }
  .data-health-summary .health-action:hover { background: rgba(20,184,166,.24); }
  .empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-mute);
    text-align: center;
    padding: 24px;
  }
  .empty-state b {
    color: var(--text-main);
    font-size: 15px;
  }
  .empty-state span {
    color: var(--text-dim);
    font-size: 12px;
  }
  .empty-state button {
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,.34);
    background: rgba(56,189,248,.1);
    color: #dbeafe;
    cursor: pointer;
    font-size: 12px;
  }
  .empty-state button:hover {
    background: rgba(56,189,248,.18);
  }
  #match-list.list-loading {
    opacity: .72;
    transition: opacity .15s;
  }
  .page-size-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,.12);
    color: var(--text-mute);
  }
  .page-size-control select {
    width: 58px;
    height: 26px;
    padding: 2px 6px;
    border-radius: 6px;
  }
  .match-data-badges {
    display: inline-flex;
    justify-content: center;
    gap: 3px;
    min-width: 0;
  }
  .data-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.12);
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    font-family: ui-monospace, "PingFang SC", monospace;
    text-decoration: none;
  }
  .data-badge-link {
    cursor: pointer;
    transition: transform .12s, border-color .12s, background .12s;
  }
  .data-badge-link:hover {
    transform: translateY(-1px);
    border-color: rgba(56,189,248,.62);
    background: rgba(56,189,248,.16);
  }
  .data-badge.ok {
    color: #bbf7d0;
    border-color: rgba(52,211,153,.38);
    background: rgba(22,163,74,.16);
  }
  .data-badge.missing {
    color: #fecaca;
    border-color: rgba(248,113,113,.35);
    background: rgba(185,28,28,.14);
  }
  .data-badge.pending {
    color: #fde68a;
    border-color: rgba(250,204,21,.42);
    background: rgba(161,98,7,.16);
  }
  .data-badge.failed {
    color: #fecdd3;
    border-color: rgba(244,63,94,.52);
    background: rgba(159,18,57,.2);
  }
  .quality-modal {
    width: 920px;
    max-width: 94vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  .quality-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border);
  }
  .quality-head h3 {
    margin: 0;
    color: var(--accent-2);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .quality-head p {
    margin: 4px 0 0;
    color: var(--text-mute);
    font-size: 12px;
  }
  .quality-head button {
    align-self: flex-start;
    color: var(--text-dim);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 18px;
  }
  .quality-summary, .quality-tabs, .quality-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(45,45,90,.55);
  }
  .quality-summary span {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    border: 1px solid rgba(167,139,250,.25);
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--text-mute);
    font-size: 12px;
  }
  .quality-summary b {
    color: var(--accent-2);
    font-family: ui-monospace, monospace;
  }
  .quality-tabs button, .quality-actions button {
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: rgba(139,92,246,.08);
    color: var(--text-main);
    cursor: pointer;
    font-size: 12px;
  }
  .quality-tabs button.active {
    border-color: var(--accent-2);
    background: rgba(139,92,246,.28);
    color: #fff;
  }
  .quality-actions {
    justify-content: space-between;
    color: var(--text-mute);
    font-size: 12px;
  }
  .quality-table-wrap { overflow: auto; }
  .quality-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .quality-table th, .quality-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(45,45,90,.45);
    white-space: nowrap;
    text-align: left;
  }
  .quality-table th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .quality-table .mono {
    font-family: ui-monospace, monospace;
    color: var(--accent-2);
  }
  .quality-more {
    text-align: center !important;
    color: var(--text-mute);
  }
  .management-modal {
    width: 1040px;
    max-width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  #data-management-dialog.fullscreen {
    background: rgba(7,11,20,.94) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  #data-management-dialog.fullscreen .management-modal {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: 0;
  }
  .management-head-actions {
    display: inline-flex;
    gap: 8px;
  }
  .management-head-actions button {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(30,41,59,.74);
  }
  .management-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(45,45,90,.55);
  }
  .management-tabs {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .management-tabs button {
    padding: 6px 10px;
    border-radius: 7px;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(30,41,59,.74);
    color: var(--text-mute);
    cursor: pointer;
    font-size: 12px;
  }
  .management-tabs button.active {
    color: #e0f2fe;
    border-color: rgba(56,189,248,.45);
    background: rgba(56,189,248,.14);
  }
  .management-toolbar input {
    width: 220px;
    padding: 7px 10px;
    font-size: 12px;
  }
  .management-toolbar button {
    padding: 6px 11px;
    border-radius: 7px;
    border: 1px solid rgba(45,212,191,.35);
    background: rgba(20,184,166,.12);
    color: #ccfbf1;
    cursor: pointer;
    font-size: 12px;
  }
  .management-table td:nth-child(4),
  .management-table td:nth-child(5),
  .management-table td:nth-child(6),
  .management-table td:nth-child(7) {
    color: #bbf7d0;
  }
  .management-table td:nth-child(8),
  .management-table td:nth-child(10),
  .management-table td:nth-child(11) {
    color: #fecaca;
  }
  .management-section-row td {
    color: #67e8f9;
    background: rgba(14,165,233,.09);
    font-weight: 800;
    letter-spacing: 0;
  }
  .management-subrow td {
    color: var(--text-mute);
    background: rgba(15,23,42,.34);
  }
  .management-control-row td {
    background: rgba(15,23,42,.62);
  }
  .collector-queue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(45,212,191,.26);
    border-radius: 8px;
    background: rgba(8,47,73,.28);
  }
  .collector-crawl-card {
    margin-top: 10px;
    border-color: rgba(56,189,248,.26);
    background: rgba(12,74,110,.22);
  }
  .collector-queue-card b {
    display: block;
    color: #ccfbf1;
    font-size: 13px;
  }
  .collector-queue-card span {
    color: var(--text-mute);
    font-size: 12px;
  }
  .collector-queue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
  .collector-queue-actions button {
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid rgba(45,212,191,.35);
    background: rgba(20,184,166,.14);
    color: #ccfbf1;
    cursor: pointer;
    font-size: 12px;
  }
  .collector-queue-actions button.danger {
    border-color: rgba(244,63,94,.42);
    background: rgba(159,18,57,.18);
    color: #fecdd3;
  }
  .collector-queue-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
  }
  .collector-trend-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(56,189,248,.24);
    border-radius: 8px;
    background: rgba(14,116,144,.16);
  }
  .collector-trend-card b {
    display: block;
    color: #bae6fd;
    font-size: 13px;
  }
  .collector-trend-card span {
    color: var(--text-mute);
    font-size: 12px;
  }
  .collector-trend-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
  }
  .trend-sparkline {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 36px;
    min-width: 74px;
    vertical-align: middle;
    margin-left: 6px;
  }
  .trend-sparkline i {
    display: block;
    width: 4px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #67e8f9, #22c55e);
  }
  .trend-sparkline.empty {
    align-items: center;
    min-width: auto;
  }
  .table-action-btn {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(45,212,191,.34);
    background: rgba(20,184,166,.12);
    color: #ccfbf1;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
  }
  .table-action-btn:hover {
    background: rgba(20,184,166,.2);
  }
  .table-action-btn.danger {
    border-color: rgba(244,63,94,.42);
    background: rgba(159,18,57,.18);
    color: #fecdd3;
  }
  .table-action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
  }
  .permission-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 10px;
  }
  .permission-matrix div {
    padding: 10px;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 8px;
    background: rgba(15,23,42,.48);
  }
  .permission-matrix b {
    display: block;
    color: #bae6fd;
    margin-bottom: 6px;
  }
  .permission-matrix span {
    display: inline-block;
    margin: 0 8px 5px 0;
    color: var(--text-mute);
    font-size: 12px;
  }
  .detail-data-coverage {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 9px;
  }
  .team-strength-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148,163,184,.16);
  }
  .strength-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-mute);
    font-size: 12px;
  }
  .strength-header span {
    color: var(--text-main);
    font-weight: 700;
  }
  .strength-header small {
    color: var(--text-dim);
    font-size: 11px;
    text-align: right;
  }
  .strength-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .9fr) minmax(0, 1fr);
    gap: 8px;
  }
  .strength-team,
  .strength-line-card {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(15,23,42,.48);
  }
  .strength-team.home { border-color: rgba(56,189,248,.28); }
  .strength-team.away { border-color: rgba(167,139,250,.28); }
  .strength-team-name {
    color: var(--text-main);
    font-weight: 700;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .strength-level {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: #bae6fd;
    font-size: 16px;
    font-weight: 800;
  }
  .strength-level b {
    color: #fde68a;
    font-size: 20px;
    font-family: ui-monospace, monospace;
  }
  .strength-meta {
    margin-top: 5px;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.35;
  }
  .strength-line-card {
    text-align: center;
    border-color: rgba(45,212,191,.26);
    background: linear-gradient(180deg, rgba(20,184,166,.12), rgba(15,23,42,.48));
  }
  .strength-line-card span,
  .strength-line-card small,
  .strength-line-card em {
    display: block;
  }
  .strength-line-card span {
    color: var(--text-mute);
    font-size: 11px;
  }
  .strength-line-card b {
    display: block;
    margin-top: 5px;
    color: #5eead4;
    font-size: 15px;
  }
  .strength-line-card small {
    margin-top: 5px;
    color: var(--text-dim);
    font-size: 11px;
  }
  .strength-line-card em {
    margin-top: 6px;
    font-style: normal;
    font-size: 11px;
  }
  .strength-line-card em.deep { color: #fbbf24; }
  .strength-line-card em.shallow { color: #fca5a5; }
  .strength-line-card em.even { color: #bbf7d0; }
  .match-insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .match-insights .insight {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.2);
    background: rgba(15,23,42,.5);
  }
  .match-insights .insight b,
  .match-insights .insight span {
    display: block;
  }
  .match-insights .insight b {
    color: var(--text-main);
    font-size: 12px;
    margin-bottom: 4px;
  }
  .match-insights .insight span {
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.45;
  }
  .match-insights .insight.good { border-color: rgba(45,212,191,.32); }
  .match-insights .insight.warn { border-color: rgba(245,158,11,.36); }
  .match-insights .insight.bad { border-color: rgba(248,113,113,.34); }
  .odds-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(45,45,90,.45);
    background: rgba(139,92,246,.05);
    color: var(--text-mute);
    font-size: 11px;
  }
  .odds-summary span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(167,139,250,.2);
    white-space: nowrap;
  }
  .odds-summary b {
    color: var(--accent-2);
    font-family: ui-monospace, monospace;
  }
  .odds-summary .empty {
    color: #fecaca;
    border-color: rgba(248,113,113,.28);
    background: rgba(185,28,28,.1);
  }
  .odds-trend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(45,45,90,.45);
    background: rgba(15,23,42,.45);
  }
  .trend-card {
    min-width: 0;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 8px;
    padding: 8px;
    background: rgba(30,41,59,.48);
  }
  .trend-card .trend-label {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    color: var(--text-mute);
    font-size: 11px;
    margin-bottom: 7px;
  }
  .trend-line {
    height: 6px;
    border-radius: 999px;
    background: rgba(100,116,139,.25);
    overflow: hidden;
  }
  .trend-line span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2dd4bf, #38bdf8);
  }
  .trend-delta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: ui-monospace, monospace;
  }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(139,92,246,.3); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.5); }
  .spinner {
    border: 3px solid rgba(139,92,246,.15); border-top-color: var(--accent);
    border-radius: 50%; width: 36px; height: 36px;
    animation: spin .7s linear infinite; box-shadow: var(--accent-glow);
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .win  { color: #34d399; font-weight: 600; text-shadow: 0 0 8px rgba(52,211,153,.4); }
  .lose { color: #f87171; font-weight: 600; }
  .draw { color: var(--text-mute); }
  table { color: var(--text-main); }
  thead th { color: var(--text-mute) !important; background: rgba(139,92,246,.08); border-bottom: 1px solid var(--border); }
  tbody tr { border-bottom: 1px solid rgba(45,45,90,.4); }
  tbody tr:hover { background: rgba(139,92,246,.05); }
  .section-title { color: var(--text-mute); font-weight: 500; letter-spacing: .5px; }
  .logo-mark {
    background: linear-gradient(135deg, #38bdf8 0%, #c4b5fd 58%, #fbbf24 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-weight: 800; letter-spacing: 2px;
  }
  .divider-header {
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    background: rgba(15,23,42,.82);
    box-shadow: 0 1px 0 rgba(255,255,255,.03);
  }
  .header-actions {
    min-width: 260px;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    align-self: center;
  }
  .header-actions #auth-area {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .update-data-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }
  .update-data-btn {
    min-width: 112px;
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(45,212,191,.38);
    background: rgba(20,184,166,.12);
    color: #ccfbf1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(45,212,191,.08);
  }
  .update-data-btn.secondary {
    border-color: rgba(56,189,248,.34);
    background: rgba(56,189,248,.1);
    color: #dbeafe;
  }
  .update-data-btn:hover:not(:disabled) {
    border-color: rgba(45,212,191,.68);
    background: rgba(20,184,166,.2);
  }
  .update-data-btn.secondary:hover:not(:disabled) {
    border-color: rgba(56,189,248,.64);
    background: rgba(56,189,248,.18);
  }
  .update-data-btn.running,
  .update-data-btn:disabled {
    cursor: wait;
    opacity: .72;
  }
  .profile-center-btn,
  .profile-logout-btn,
  .profile-soft-btn {
    border-radius: 999px;
    border: 1px solid rgba(139,92,246,.42);
    background: rgba(139,92,246,.12);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 700;
    transition: all .15s;
  }
  .profile-center-btn,
  .profile-logout-btn {
    min-height: 32px;
    padding: 6px 14px;
    font-size: 12px;
  }
  .profile-center-btn {
    border-color: rgba(45,212,191,.42);
    background: rgba(20,184,166,.13);
    color: #ccfbf1;
  }
  .profile-center-btn:hover,
  .profile-soft-btn:hover {
    border-color: rgba(56,189,248,.7);
    background: rgba(56,189,248,.14);
  }
  .profile-modal {
    width: min(860px, calc(100vw - 32px));
    max-height: min(760px, calc(100dvh - 32px));
    overflow: auto;
    padding: 22px;
    position: relative;
  }
  .profile-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
  }
  .profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 34px;
    margin-bottom: 18px;
  }
  .profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #e0f2fe;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(56,189,248,.32), rgba(139,92,246,.26));
    border: 1px solid rgba(56,189,248,.34);
    box-shadow: inset 0 0 20px rgba(56,189,248,.12);
  }
  .profile-head h3 {
    margin: 0;
    color: var(--accent-2);
    font-size: 22px;
    font-weight: 900;
  }
  .profile-head p {
    margin: 4px 0 0;
    color: var(--text-mute);
    font-size: 13px;
  }
  .profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-section,
  .profile-admin-panel {
    border: 1px solid rgba(148,163,184,.2);
    background: rgba(15,23,42,.55);
    border-radius: 8px;
    padding: 14px;
  }
  .profile-section h4,
  .profile-admin-panel h4 {
    margin: 0 0 10px;
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 900;
  }
  .profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    border-top: 1px solid rgba(148,163,184,.12);
    color: var(--text-mute);
    font-size: 12px;
  }
  .profile-row:first-of-type { border-top: 0; }
  .profile-row b {
    color: var(--text-main);
    font-weight: 800;
    text-align: right;
  }
  .profile-soft-btn {
    width: 100%;
    min-height: 34px;
    margin-top: 10px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .profile-admin-panel {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, auto) minmax(240px, auto);
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    border-color: rgba(45,212,191,.32);
    background: linear-gradient(135deg, rgba(20,184,166,.1), rgba(56,189,248,.07));
  }
  .profile-admin-panel p {
    margin: 0;
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.5;
  }
  .profile-admin-panel .data-mode-status {
    max-width: none;
    min-width: 250px;
    justify-content: flex-start;
  }
  .profile-admin-panel .update-data-group {
    flex-wrap: nowrap;
  }
  [data-label] { color: var(--text-dim); font-size: 11px; }

  #filter-bar {
    align-items: end;
    background: rgba(11,18,32,.9);
    position: sticky !important;
    z-index: 40 !important;
  }
  #filter-bar select,
  #filter-bar input[type="text"] {
    min-height: 32px;
  }
  #btn-reset-filters {
    min-height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.3);
    background: rgba(30,41,59,.8);
    color: var(--text-mute);
    cursor: pointer;
  }
  #btn-reset-filters:hover {
    border-color: rgba(56,189,248,.5);
    color: #e0f2fe;
    background: rgba(56,189,248,.1);
  }

  .data-mode-status {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,.35);
    background: rgba(56,189,248,.1);
    color: var(--text-mute);
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .data-mode-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2dd4bf;
    box-shadow: 0 0 8px rgba(45,212,191,.7);
    margin-right: 7px;
    flex: 0 0 auto;
  }
  .data-mode-status.csv-mode {
    border-color: rgba(251,191,36,.45);
    background: rgba(251,191,36,.1);
    color: #fde68a;
  }
  .data-mode-status.csv-mode::before {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251,191,36,.7);
  }
  .data-mode-status.loading-mode::before {
    background: var(--accent-2);
    box-shadow: 0 0 8px rgba(167,139,250,.7);
  }

  /* 首页模式：隐藏筛选栏、不显示底部统计栏 */
  body.view-home #filter-bar { display: none !important; }
  body.view-home #main-content { height: calc(100vh - 18rem) !important; }
  body.view-home #detail-placeholder span { font-size: 15px; }
  /* 历史数据模式：隐藏分区导航栏，并将筛选栏位置回归 */
  body.view-history #sub-nav { display: none !important; }
  body.view-history #filter-bar { top: 132px !important; }
  /* 首页 ↔ 历史 按钮切换 */
  body.view-home    #btn-home    { display: none !important; }
  body.view-history #btn-history { display: none !important; }

  /* 竞彩模式：保持左右分栏，隐藏原统计栏，显示下注栏 */
  body.view-jc footer#stat-footer { display: none !important; }
  body.view-jc #jc-bet-bar { display: flex !important; }
  body:not(.view-jc) #jc-bet-bar { display: none !important; }

  /* —— 竞彩下注列表 —— */
  .jc-date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(139,92,246,.06);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
  }
  .jc-date-toggle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 9px solid var(--accent-2);
    filter: drop-shadow(0 0 6px rgba(56,189,248,.36));
  }
  .jc-date-title {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0;
  }
  .jc-show-cutoff {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mute);
    cursor: pointer;
    font-size: 12px;
  }
  .jc-show-cutoff input {
    width: 16px;
    height: 16px;
  }
  .jc-row {
    display: grid;
    grid-template-columns: 2.5rem 4.3rem 4rem minmax(26rem, 1fr);
    align-items: stretch;
    padding: 0;
    font-size: 12px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(45,45,90,.3);
    cursor: default;
    transition: background .12s;
  }
  .jc-row:hover { background: rgba(56,189,248,.035); }
  .jc-row.selected { background: rgba(56,189,248,.08); }
  .jc-no {
    color: var(--text-dim); font-family: ui-monospace,monospace; font-size: 13px;
    text-align: center;
    align-self: center;
  }
  .jc-league { display:flex; justify-content:center; align-items:center; }
  .jc-league-badge {
    display: inline-block;
    min-width: 3.25rem;
    padding: 5px 7px;
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }
  .jc-cutoff {
    color: var(--text-mute);
    font-size: 15px;
    text-align:center;
    font-family: ui-monospace,monospace;
    align-self: center;
    line-height: 1.15;
  }
  .jc-board {
    position: relative;
    min-width: 0;
    margin: 3px 4px 3px 0;
    border: 1px solid rgba(56,189,248,.18);
    background: rgba(56,189,248,.055);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
  }
  .jc-row.selected .jc-board {
    border-color: rgba(56,189,248,.72);
    box-shadow: 0 0 0 1px rgba(56,189,248,.25), inset 0 0 0 1px rgba(255,255,255,.03);
  }
  .jc-main-grid {
    display: grid;
    grid-template-columns: 3rem minmax(9rem, 1fr) 4.8rem 4.8rem 4.8rem minmax(9rem, 1fr);
    min-height: 48px;
    align-items: stretch;
  }
  .jc-main-grid > * {
    border-left: 1px solid rgba(147,197,253,.16);
  }
  .jc-main-grid > *:first-child {
    border-left: 0;
  }
  .jc-single-corner {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dbeafe;
    font-size: 12px;
    font-weight: 800;
    border-left: 0 !important;
    background: rgba(37,99,235,.42);
  }
  .jc-single-corner.empty {
    background: transparent;
  }
  .jc-home { text-align: right; display:flex; gap:7px; align-items:center; justify-content:flex-end; min-width:0; padding: 0 12px; }
  .jc-away { text-align: left;  display:flex; gap:7px; align-items:center; justify-content:flex-start; min-width:0; padding: 0 12px; }
  .jc-home .team-name, .jc-away .team-name {
    color: var(--text-main); font-weight: 800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size: 14px;
  }
  .jc-rank { color: var(--text-dim); font-size: 12px; font-family: ui-monospace,monospace; flex: 0 0 auto; }
  .jc-odds {
    display: inline-flex; align-items: center; justify-content: center; gap:2px;
    padding: 0 8px;
    background: rgba(15,23,42,.16);
    border: 0;
    border-radius: 0;
    color: var(--accent-2);
    font-family: ui-monospace,monospace;
    font-weight: 800;
    cursor: pointer;
    transition: all .12s;
    text-align: center;
    min-width: 0;
    font-size: 16px;
    line-height: 1.2;
  }
  .jc-odds:hover:not(.disabled) { background: rgba(56,189,248,.14); }
  .jc-odds.picked {
    background: linear-gradient(135deg, rgba(56,189,248,.9) 0%, rgba(139,92,246,.92) 100%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 10px rgba(56,189,248,.34);
  }
  .jc-odds.disabled { color: var(--text-dim); cursor: not-allowed; background: rgba(15,23,42,.08); }
  .jc-let-grid {
    display: grid;
    grid-template-columns: 3rem minmax(9rem, 1fr) 4.8rem 4.8rem 4.8rem minmax(9rem, 1fr);
    border-top: 1px solid rgba(147,197,253,.13);
    min-height: 28px;
  }
  .jc-let-label {
    grid-column: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    color: var(--text-dim);
    font-size: 11px;
    font-family: ui-monospace,monospace;
  }
  .jc-let-grid .jc-odds {
    font-size: 12px;
    color: #38bdf8;
    background: rgba(15,23,42,.26);
    border-left: 1px solid rgba(147,197,253,.13);
  }
  .jc-let-grid .jc-odds:nth-child(5) {
    grid-column: 5 / 6;
  }
  .jc-let-grid::after {
    content: '';
    grid-column: 6 / 7;
  }
  .jc-hc-label { color: inherit; font-size: 10px; opacity: .75; font-weight: 500; }
  .jc-odds.picked .jc-hc-label { opacity: 1; }
  .jc-more { color: var(--text-dim); cursor: pointer; text-align:center; font-size:10px; }
  .jc-more:hover { color: var(--accent-2); }
  .jc-single {
    display: inline-block; margin-left: 4px; padding: 0 4px;
    background: #2563eb; color: #fff; border-radius: 3px;
    font-size: 9px; line-height: 1.4; font-weight: 600;
    vertical-align: middle;
  }
  .jc-row.ended { opacity: 0.55; }

  #data-freshness {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(56,189,248,.08);
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.45;
  }
  #data-freshness.visible { display: block !important; }
  #data-freshness.freshness-stale {
    background: rgba(245,158,11,.13);
    color: #fde68a;
  }
  #data-freshness .freshness-title {
    font-weight: 700;
    color: #7dd3fc;
    margin-right: 8px;
  }
  #data-freshness.freshness-stale .freshness-title { color: #fbbf24; }
  #data-freshness code {
    color: #fff;
    background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
  }
  body.view-history #data-freshness { display: none !important; }

  /* 下注栏（仅占左半栏，与竞彩表格同宽）*/
  #jc-bet-bar {
    position: fixed;
    bottom: 0; left: 0;
    width: 50%;
    z-index: 20;
    display: none;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(20,20,50,.96);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    font-size: 13px;
  }
  @media (max-width: 767px) {
    .data-mode-status {
      max-width: 112px;
      padding: 5px 8px;
      font-size: 10px;
    }
    .data-mode-status .status-detail { display: none; }
    #jc-bet-bar { width: 100%; border-right: none; }
    #mobile-bottom-nav {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 28;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      border-top: 1px solid var(--border);
      background: rgba(15,23,42,.95);
      backdrop-filter: blur(18px);
      padding: 6px 8px env(safe-area-inset-bottom);
      gap: 6px;
    }
    #mobile-bottom-nav button {
      min-height: 34px;
      border-radius: 8px;
      border: 1px solid rgba(148,163,184,.2);
      background: rgba(30,41,59,.72);
      color: var(--text-mute);
      font-size: 12px;
    }
    body { padding-bottom: 54px; }
  }
  #jc-bet-bar .bet-num { color: var(--accent-2); font-weight: 700; font-family: ui-monospace,monospace; }
  #jc-bet-bar .bet-hint { color: #fbbf24; font-weight: 500; letter-spacing: 1px; }
  #jc-bet-bar button.mul-btn {
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main);
    font-size: 16px; cursor: pointer;
  }
  #jc-bet-bar button.mul-btn:hover { background: rgba(139,92,246,.18); }
  #jc-bet-bar input#jc-mul {
    width: 56px; height: 28px; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main);
    border-radius: 6px; font-family: ui-monospace,monospace;
  }
  #jc-bet-bar .link {
    color: var(--accent-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  }
  #jc-bet-bar .link:hover { color: #c4b5fd; }
  .bet-max-prize-clickable { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .bet-max-prize-clickable:hover { color: #fbbf24; }
  #prize-eval-table td { padding: 8px 10px; border-bottom: 1px solid rgba(45,45,90,.4); }
  #prize-eval-table tbody tr:hover { background: rgba(139,92,246,.06); }
  #prize-eval-table .col-n   { text-align: center; font-weight: 700; color: var(--accent-2); font-family: ui-monospace, monospace; }
  #prize-eval-table .col-rng { text-align: center; color: #f87171; font-family: ui-monospace, monospace; }
  #jc-bet-bar .bet-left, #jc-bet-bar .bet-middle, #jc-bet-bar .bet-right {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  #jc-bet-bar .bet-middle { flex: 1 1 auto; justify-content: center; }
  #jc-bet-bar .parlay-lbl {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--text-main); cursor: pointer;
    padding: 2px 6px; border-radius: 4px;
    transition: background .12s;
  }
  #jc-bet-bar .parlay-lbl:hover:not(.disabled) { background: rgba(139,92,246,.12); }
  #jc-bet-bar .parlay-lbl.disabled { color: var(--text-dim); cursor: not-allowed; opacity: 0.5; }
  #jc-bet-bar .parlay-lbl input { cursor: inherit; }

  /* 更多方式 弹窗 */
  #parlay-more-popup {
    display: none;
    position: absolute;
    bottom: 26px;
    right: 0;
    width: 440px;
    max-width: 46vw;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px 16px 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.6), 0 0 0 1px rgba(139,92,246,.2);
    z-index: 30;
    font-size: 13px;
    text-align: left;
  }
  #parlay-more-popup.open { display: block; }
  #parlay-more-popup .popup-head {
    display: flex; justify-content: flex-end;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
  }
  #parlay-more-popup .popup-body {
    display: flex; flex-direction: column; gap: 8px;
  }
  #parlay-more-popup .popup-row {
    display: flex; gap: 14px; flex-wrap: wrap;
  }
  #parlay-more-popup .popup-pointer {
    position: absolute;
    bottom: -7px;
    right: 40px;
    width: 12px; height: 12px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
  }
  body.view-jc #main-content { height: calc(100vh - 24rem) !important; }

  /* 顶部导航 */
  .nav-item {
    color: var(--text-mute);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all .15s;
    font-weight: 500;
    border: 1px solid transparent;
  }
  .nav-item:hover {
    color: var(--text-main);
    background: rgba(56,189,248,.08);
    border-color: rgba(56,189,248,.22);
  }
  .nav-item.active {
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(37,99,235,.24), rgba(15,118,110,.2));
    border-color: rgba(56,189,248,.34);
    box-shadow: inset 0 0 12px rgba(56,189,248,.1);
  }
  .nav-item.locked::after {
    content: '会员';
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(245,158,11,.16);
    border: 1px solid rgba(245,158,11,.34);
    color: #fde68a;
    font-size: 10px;
  }
  #top-nav {
    position: relative !important;
    top: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 58vw;
    margin: 0 24px;
    padding: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    justify-content: center;
    gap: 10px !important;
    z-index: 1;
    scrollbar-width: none;
  }
  #top-nav::-webkit-scrollbar { display: none; }
  #top-nav .nav-item {
    padding: 7px 11px;
  }
  #sub-nav {
    top: 88px !important;
  }
  #filter-bar {
    top: 152px !important;
  }
  body.view-history #filter-bar {
    top: 88px !important;
  }
  .user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mute);
    font-size: 13px;
    white-space: nowrap;
  }
  .user-pill span { color: var(--accent-2); font-weight: 700; }
  .user-pill b {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(45,212,191,.12);
    border: 1px solid rgba(45,212,191,.3);
    color: #ccfbf1;
    font-size: 11px;
  }
  .premium-modal {
    width: 430px;
    max-width: 92vw;
    padding: 22px;
    position: relative;
  }
  .premium-modal > button {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
  }
  .premium-modal h3 {
    color: var(--accent-2);
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px;
  }
  .premium-modal p {
    color: var(--text-mute);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 14px;
  }
  .premium-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .premium-grid span {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,.22);
    background: rgba(56,189,248,.08);
    color: #dbeafe;
    font-size: 12px;
  }
  #mobile-bottom-nav { display: none; }

  /* ══════════════ 移动端适配（屏幕 < 768px）══════════════ */
  @media (max-width: 767px) {
    html, body { min-width: 0; overflow-x: hidden; }
    body { font-size: 13px; padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
    .app-shell { overflow-x: hidden; }

    /* 顶栏：移动端优先保留品牌、数据状态和登录入口 */
    header {
      min-height: 56px !important;
      padding: 7px 10px !important;
      gap: 8px !important;
      flex-wrap: wrap;
    }
    header a > div { display: none !important; }
    header a svg { width: 34px !important; height: 34px !important; }
    header a { gap: 0 !important; min-width: 34px; }
    .header-actions {
      flex: 1 1 auto;
      min-width: 0;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 6px !important;
      align-self: center;
      padding: 0;
      overflow: hidden;
    }
    .data-mode-status {
      display: inline-flex !important;
      flex: 1 1 auto;
      max-width: none;
      min-width: 0;
      min-height: 28px;
      padding: 4px 7px;
      font-size: 10px;
      overflow: visible;
      text-overflow: clip;
      white-space: nowrap;
      justify-content: flex-start;
    }
    .data-mode-status span {
      min-width: 0;
      overflow: visible;
      text-overflow: clip;
      white-space: nowrap;
    }
    .data-mode-status::before {
      width: 6px;
      height: 6px;
      margin-right: 5px;
    }
    #mobile-bottom-nav {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 48;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
      border-top: 1px solid var(--border);
      background: rgba(15,23,42,.96);
      backdrop-filter: blur(18px);
    }
    #mobile-bottom-nav button {
      min-height: 34px;
      border-radius: 8px;
      border: 1px solid rgba(148,163,184,.2);
      background: rgba(30,41,59,.72);
      color: var(--text-mute);
      font-size: 12px;
    }
    #auth-area { gap: 5px !important; flex: 0 0 auto; }
    #auth-area button { padding: 4px 9px !important; font-size: 11px !important; min-height: 28px; }
    #auth-area .user-pill { font-size: 11px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
    #auth-area .user-pill b { display: none; }
    header .update-data-group {
      display: none;
    }
    .profile-modal {
      width: calc(100vw - 18px);
      max-height: calc(100dvh - 18px);
      padding: 16px;
    }
    .profile-head {
      gap: 10px;
      margin-bottom: 12px;
    }
    .profile-avatar {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      font-size: 18px;
    }
    .profile-head h3 { font-size: 18px; }
    .profile-head p { font-size: 11px; }
    .profile-grid {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .profile-section,
    .profile-admin-panel {
      padding: 11px;
    }
    .profile-admin-panel {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .profile-admin-panel .data-mode-status {
      width: 100%;
      min-width: 0;
    }
    .profile-admin-panel .update-data-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      width: 100%;
    }
    .profile-admin-panel .update-data-btn {
      min-width: 0;
      width: 100%;
    }

    /* 顶部导航：横向滑动，减少占高 */
    #top-nav {
      order: 3;
      flex: 0 0 100%;
      max-width: none;
      margin: 4px 0 0;
      top: auto !important;
      display: grid !important;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      padding: 0 !important;
      gap: 6px !important;
      font-size: 11px !important;
      overflow: hidden !important;
      scrollbar-width: none;
    }
    #top-nav::-webkit-scrollbar { display: none; }
    #top-nav .nav-item:not([data-nav="home"]):not([data-nav="history"]):not([data-premium-only]) {
      display: none !important;
    }
    .nav-item {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      padding: 6px 5px !important;
      border-radius: 999px !important;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .nav-item.locked::after {
      display: inline-flex;
      content: '会员';
      margin-left: 3px;
      padding: 0 4px;
      font-size: 8px;
      line-height: 1.4;
    }

    #sub-nav {
      top: 98px !important;
      padding: 6px 8px !important;
    }
    #sub-nav-left {
      border-right: 0 !important;
      width: 100%;
      flex: 1 1 100%;
      justify-content: flex-start !important;
      overflow-x: auto;
      scrollbar-width: none;
    }
    #sub-nav-left::-webkit-scrollbar { display: none; }
    #sub-nav .sub-nav-tab {
      flex: 0 0 auto;
      font-size: 13px !important;
      letter-spacing: 0 !important;
      padding: 5px 10px;
      border-radius: 999px;
      background: rgba(56,189,248,.08);
      border: 1px solid rgba(56,189,248,.18);
    }
    #sub-nav #sub-nav-right { display: none !important; }

    /* 工作台：手机上隐藏，优先把空间留给比赛列表 */
    .workbench { display: none !important; }
    .workbench-main {
      align-items: flex-start;
      flex-direction: column;
      gap: 7px;
      margin-bottom: 7px;
    }
    .workbench-kicker { display: none; }
    .workbench-title { font-size: 15px; line-height: 1.3; }
    .workbench-actions {
      width: 100%;
      display: flex;
      flex-wrap: nowrap;
      overflow-x: auto;
      gap: 6px;
      scrollbar-width: none;
    }
    .workbench-actions::-webkit-scrollbar { display: none; }
    .workbench-actions button {
      flex: 0 0 auto;
      font-size: 11px;
      padding: 4px 8px;
      min-height: 28px;
    }
    .workbench-metrics {
      display: flex;
      overflow-x: auto;
      gap: 7px;
      padding-bottom: 1px;
      scrollbar-width: none;
    }
    .workbench-metrics::-webkit-scrollbar { display: none; }
    .metric-card {
      flex: 0 0 126px;
      min-height: 58px;
      padding: 7px 8px;
    }
    .metric-card b { font-size: 15px; }
    .metric-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* 筛选栏：两列紧凑排列 */
    #filter-bar {
      top: 98px !important;
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: end;
      padding: 8px 10px !important;
      gap: 8px !important;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
    }
    div.divider-header:not(header) > div { gap: 2px !important; }
    div.divider-header:not(header) span[data-label] { font-size: 10px !important; }
    #filter-bar > div,
    #filter-bar > input,
    #filter-bar > button,
    #filter-bar > span,
    #filter-bar > label {
      width: 100%;
      min-width: 0;
      align-self: end !important;
      margin-left: 0 !important;
    }
    #filter-bar select,
    #filter-bar input[type="text"],
    #filter-bar button {
      width: 100% !important;
      min-height: 32px;
      padding: 5px 8px !important;
      font-size: 12px !important;
    }
    #filter-bar label {
      justify-content: flex-start;
      min-height: 32px;
    }
    #match-count { font-size: 11px !important; }

    /* 主内容区：手机上左右改为单列，列表和详情位于同一层叠 */
    #main-content {
      flex-direction: column !important;
      height: calc(100dvh - 150px) !important;
      min-height: 320px;
      padding: 0 6px 6px !important;
      gap: 6px !important;
    }
    body.view-home #main-content,
    body.view-jc #main-content {
      height: calc(100dvh - 150px) !important;
    }
    body.view-history #main-content {
      height: calc(100dvh - 150px) !important;
    }
    #main-content > div:first-child {
      width: 100% !important;
      flex: 1 1 0 !important;
    }

    /* 详情面板：手机上默认隐藏，选中比赛后全屏覆盖 */
    #detail-column {
      display: none !important;
    }
    body.mobile-detail header,
    body.mobile-detail #top-nav,
    body.mobile-detail #sub-nav,
    body.mobile-detail .workbench,
    body.mobile-detail #filter-bar,
    body.mobile-detail #mobile-bottom-nav {
      display: none !important;
    }
    body.mobile-detail #main-content {
      height: 100dvh !important;
      padding: 48px 6px 6px !important;
    }
    body.mobile-detail #main-content > div:first-child {
      display: none !important;
    }
    body.mobile-detail #detail-column {
      display: flex !important;
      flex: 1 1 0 !important;
      width: 100% !important;
    }
    /* 返回按钮（仅手机且在详情页显示） */
    body.mobile-detail #mobile-back {
      display: inline-flex !important;
      align-items: center; gap: 4px;
      position: fixed; top: max(8px, env(safe-area-inset-top)); left: 10px; z-index: 80;
      padding: 6px 12px; border-radius: 999px;
      background: rgba(139,92,246,.9); color: #fff; border: none;
      font-size: 13px; box-shadow: 0 2px 12px rgba(139,92,246,.5);
    }

    body.view-home #filter-bar { display: none !important; }

    /* 历史比赛行：保留关键信息，压缩数据列 */
    #match-list > .grid.sticky {
      grid-template-columns: 1.25rem 3.4rem 3.4rem minmax(4.8rem,1fr) 2.4rem minmax(4.8rem,1fr) 4.8rem !important;
      gap: 4px !important;
      padding: 8px 6px !important;
      font-size: 11px !important;
    }
    #match-list > .grid.sticky span:nth-child(7) { text-align: right; }
    .match-row { padding: 8px !important; font-size: 12px !important; }
    #match-list .match-row {
      grid-template-columns: 1.25rem 3.4rem 3.4rem minmax(4.8rem,1fr) 2.4rem minmax(4.8rem,1fr) 4.8rem !important;
      gap: 4px !important;
    }
    .match-row > span { font-size: 12px !important; }
    .match-data-badges { gap: 2px; }
    .data-badge { width: 22px; height: 18px; font-size: 9px; }

    /* 竞彩今日比赛：手机上改为“上方序号/赛事/截止，下方整宽赔率板” */
    .jc-date-row {
      gap: 8px;
      padding: 8px 10px;
      font-size: 12px;
      position: sticky;
      top: 0;
    }
    .jc-date-toggle { border-left-width: 6px; border-right-width: 6px; border-bottom-width: 7px; }
    .jc-show-cutoff { margin-left: auto; font-size: 11px; gap: 4px; }
    .jc-show-cutoff input { width: 15px; height: 15px; }
    .jc-row {
      grid-template-columns: 2.4rem 3.8rem minmax(4rem, 1fr);
      align-items: center;
      padding: 6px 6px 8px;
      row-gap: 5px;
    }
    .jc-no { font-size: 12px; }
    .jc-league { justify-content: flex-start; }
    .jc-league-badge {
      min-width: 3.2rem;
      max-width: 3.8rem;
      padding: 4px 6px;
      font-size: 12px;
    }
    .jc-cutoff {
      text-align: left;
      font-size: 15px;
      font-weight: 700;
    }
    .jc-board {
      grid-column: 1 / -1;
      width: 100%;
      margin: 0;
      overflow: hidden;
    }
    .jc-main-grid,
    .jc-let-grid {
      grid-template-columns: 1.5rem minmax(0, 1.2fr) 3.05rem 3.05rem 3.05rem minmax(0, 1.2fr);
    }
    .jc-main-grid { min-height: 43px; }
    .jc-let-grid { min-height: 27px; }
    .jc-single-corner { font-size: 11px; }
    .jc-home,
    .jc-away {
      gap: 3px;
      padding: 0 6px;
    }
    .jc-home .team-name,
    .jc-away .team-name {
      font-size: 12px;
      max-width: 100%;
    }
    .jc-rank { font-size: 10px; }
    .jc-odds {
      font-size: 13px;
      padding: 0 2px;
    }
    .jc-let-label {
      padding: 0 6px;
      font-size: 10px;
      white-space: nowrap;
    }
    .jc-let-grid .jc-odds { font-size: 12px; }
    .jc-hc-label { font-size: 9px; }

    /* 详情卡片：内边距缩小 */
    #detail-panel { padding-bottom: 12px !important; }
    #detail-panel .card { padding: 10px !important; }
    #detail-title { font-size: 15px !important; flex-wrap: wrap; justify-content: center; }
    #home-hist-ranks, #away-hist-ranks { display: none !important; }  /* 移动端隐藏历史排名节省空间 */
    #detail-meta { font-size: 11px !important; }
    .match-insights { grid-template-columns: 1fr; }

    /* Tab 按钮：字小 + 紧凑 */
    .tab-btn { padding: 5px 10px !important; font-size: 11px !important; }

    /* 赔率表：字小 + 紧凑 */
    #odds-table { font-size: 11px !important; }
    #odds-table th, #odds-table td { padding: 6px 4px !important; }
    #odds-table-wrap,
    #odds-table,
    .overflow-x-auto {
      -webkit-overflow-scrolling: touch;
    }

    /* 底部统计栏：缩小 */
    footer { padding: 8px !important; }
    .stat-chip { padding: 3px 8px !important; font-size: 10px !important; }

    /* 翻页按钮 */
    #btn-prev, #btn-next { padding: 5px 12px !important; font-size: 11px !important; }
    .page-size-control { display: none !important; }

    body.view-jc #mobile-bottom-nav {
      bottom: calc(92px + env(safe-area-inset-bottom));
    }
    body.view-jc #jc-bet-bar {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas:
        "left right"
        "middle middle";
      align-items: center;
      gap: 6px 10px;
      min-height: 92px;
      padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
      font-size: 12px;
      z-index: 52;
    }
    #jc-bet-bar .bet-left,
    #jc-bet-bar .bet-middle,
    #jc-bet-bar .bet-right {
      gap: 6px;
      align-items: center;
    }
    #jc-bet-bar .bet-left {
      grid-area: left;
      flex-direction: row;
      align-items: center;
      min-width: 0;
      flex-wrap: nowrap;
    }
    #jc-bet-bar .bet-middle {
      grid-area: middle;
      justify-content: flex-start;
      align-content: center;
      flex-wrap: nowrap;
      min-width: 0;
      overflow-x: auto;
      scrollbar-width: none;
      padding-bottom: 1px;
    }
    #jc-bet-bar .bet-middle::-webkit-scrollbar { display: none; }
    #jc-bet-bar .bet-middle > span:first-child {
      flex: 0 0 auto;
      color: var(--text-mute) !important;
    }
    #jc-bet-bar .bet-middle > .parlay-lbl {
      flex: 0 0 auto;
      min-height: 26px;
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(30,41,59,.54);
      border: 1px solid rgba(148,163,184,.16);
    }
    #jc-bet-bar .bet-middle > .main-parlay-extra {
      display: none;
    }
    #parlay-more-btn {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(56,189,248,.1);
      border: 1px solid rgba(56,189,248,.28);
      text-decoration: none !important;
      white-space: nowrap;
    }
    #parlay-more-popup {
      position: fixed;
      left: 10px;
      right: 10px;
      bottom: calc(154px + env(safe-area-inset-bottom));
      width: auto;
      max-width: none;
      max-height: 42vh;
      overflow: auto;
      z-index: 70;
      padding: 12px;
    }
    #parlay-more-popup .popup-row {
      gap: 8px;
    }
    #parlay-more-popup .parlay-lbl {
      min-height: 28px;
      padding: 4px 8px;
      border: 1px solid rgba(148,163,184,.18);
      border-radius: 999px;
      background: rgba(30,41,59,.54);
    }
    #parlay-more-popup .popup-pointer {
      display: none;
    }
    #jc-bet-bar .bet-right {
      grid-area: right;
      justify-content: flex-end;
      flex-wrap: nowrap;
      min-width: 0;
      display: flex;
      gap: 5px;
      align-items: center;
    }
    #jc-bet-bar .bet-right > span:first-child {
      display: inline-flex;
      color: var(--text-mute);
      white-space: nowrap;
    }
    #jc-bet-bar button.mul-btn {
      width: 28px;
      height: 28px;
      flex: 0 0 auto;
    }
    #jc-bet-bar input#jc-mul {
      width: 44px;
      height: 28px;
      flex: 0 0 auto;
    }
    #jc-bet-bar .bet-right > span:nth-last-child(-n+2) span[style] {
      display: none;
    }
    #jc-bet-bar .bet-right > span:nth-last-child(2) {
      display: inline-flex;
      justify-content: center;
      font-size: 11px;
      color: var(--text-mute);
      white-space: nowrap;
    }
    #jc-bet-bar .bet-right > span:nth-last-child(1) {
      display: inline-flex;
      justify-content: center;
      font-size: 11px;
      color: var(--text-mute);
      white-space: nowrap;
    }
  }

  /* 导出弹窗字段选项 */
  .export-opt {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; font-size: 13px; color: var(--text-main);
    cursor: pointer; user-select: none;
  }
  .export-opt input[type="checkbox"] { cursor: pointer; width: 14px; height: 14px; accent-color: #8b5cf6; }
  .export-opt:hover { color: var(--accent-2); }

  /* 列表中的复选框外观 */
  .match-row .sel-match, #sel-all-page {
    cursor: pointer; accent-color: #8b5cf6;
    width: 14px; height: 14px; vertical-align: middle;
  }

  /* 导出弹窗筛选区 */
  .export-section { margin-bottom: 14px; }
  .export-section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-main); font-weight: 600; margin-bottom: 6px;
  }
  .export-hint { color: var(--text-mute); font-weight: 400; font-size: 11px; margin-right: auto; }
  .export-mini-btn {
    padding: 1px 8px; font-size: 11px; border-radius: 4px;
    background: rgba(139,92,246,.12); border: 1px solid var(--border);
    color: var(--text-main); cursor: pointer;
  }
  .export-mini-btn:hover { background: rgba(139,92,246,.25); }
  .export-chips { display: flex; flex-wrap: wrap; gap: 5px; }
  .export-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; font-size: 12px;
    background: rgba(139,92,246,.06); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer; user-select: none;
    color: var(--text-main);
  }
  .export-chip input { margin: 0; cursor: pointer; accent-color: #8b5cf6; width: 12px; height: 12px; }
  .export-chip:has(input:checked) { background: rgba(139,92,246,.25); border-color: var(--accent-2); }
  .export-chip:hover { background: rgba(139,92,246,.18); }
  .export-input {
    width: 100%; padding: 6px 10px; font-size: 12px;
    background: rgba(139,92,246,.05); border: 1px solid var(--border);
    border-radius: 4px; color: var(--text-main); outline: none;
  }
  .export-input:focus { border-color: var(--accent-2); }
