/* ===================================================================
 *  双色球数据分析中心 · 专业样式 v1.0.0
 *  设计语言与排列3/福彩3D 站点保持一致，主题改为「红球红 + 蓝球蓝」双色
 * =================================================================== */

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f8fafc;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* 双色球品牌：红球 #e11d48 / 蓝球 #2563eb */
  --primary: #e11d48;
  --primary-light: #fff1f2;
  --primary-dark: #9f1239;
  --primary-alpha: rgba(225, 29, 72, 0.08);
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --blue-dark: #1e40af;

  --accent: #2563eb;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --info: #0891b2;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --brand-grad: linear-gradient(135deg, #f43f5e 0%, #e11d48 45%, #2563eb 100%);
  --head-grad: linear-gradient(135deg, #e11d48 0%, #2563eb 100%);
  --page-pattern: repeating-linear-gradient(0deg, rgba(225,29,72,0.02) 0 2px, transparent 2px 26px);
  --chart-1: #e11d48; --chart-2: #2563eb; --chart-3: #16a34a;
  --chart-4: #d97706; --chart-5: #7c3aed; --chart-6: #0891b2;
  --hover-row: #fff5f6; --sel: #ffe4e6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 15px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  background-image: var(--page-pattern);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========== 顶部 ========== */
.site-header {
  background: var(--head-grad);
  color: #fff;
  padding: 20px 16px 18px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.site-header::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.16), transparent 55%);
  pointer-events: none;
}
.header-inner { max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
.brand-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand-logo {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.brand-title { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; line-height: 1.2; }
.brand-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.header-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hmeta-pill {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px;
}
.hmeta-pill b { font-weight: 700; }

/* 最新开奖条 */
.latest-bar {
  max-width: 1400px; margin: 14px auto 0; position: relative; z-index: 1;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.latest-qh { font-size: 13px; opacity: 0.9; }
.latest-nums { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.latest-extra { font-size: 12px; opacity: 0.9; margin-left: auto; text-align: right; }

/* ========== 号码球 ========== */
.ball {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ball-red  { background: linear-gradient(145deg, #fb7185, #e11d48); }
.ball-blue { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.ball-sm { width: 24px; height: 24px; font-size: 11px; }
.ball-lg { width: 34px; height: 34px; font-size: 15px; }
.ball-ghost { background: #e2e8f0; color: #94a3b8; }

/* ========== 容器 / 卡片 ========== */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(180deg, #fff, var(--bg-tertiary));
}
.card-head h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-head .hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px; }

/* ========== Tabs ========== */
.tabs {
  max-width: 1400px; margin: 16px auto 0; padding: 0 16px;
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.tabs button.active {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: var(--shadow-md);
}

.tab-panel { display: none; max-width: 1400px; margin: 0 auto; padding: 16px; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ========== 网格 ========== */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ========== 统计小卡 ========== */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}
.stat .k { font-size: 12px; color: var(--text-muted); }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.stat.red .v { color: var(--primary); }
.stat.blue .v { color: var(--blue); }
.stat.green .v { color: var(--success); }
.stat.amber .v { color: var(--warning); }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td {
  padding: 8px 10px; text-align: center;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
table.tbl th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 700;
  position: sticky; top: 0; z-index: 1;
  font-size: 12px;
}
table.tbl tbody tr { transition: background 0.12s; }
table.tbl td.l, table.tbl th.l { text-align: left; }
table.tbl td.r, table.tbl th.r { text-align: right; }
table.tbl .num { font-variant-numeric: tabular-nums; }

/* ========== 号码网格（33 红 / 16 蓝） ========== */
.numgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.numcell {
  width: 42px; padding: 6px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center; cursor: default;
  transition: transform 0.15s;
}
.numcell .n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.numcell .m { font-size: 10px; color: var(--text-muted); }
.numcell.hot { background: var(--primary-light); border-color: #fecdd3; }
.numcell.hot .n { color: var(--primary-dark); }
.numcell.cold { background: var(--blue-light); border-color: #bfdbfe; }
.numcell.cold .n { color: var(--blue-dark); }
.numcell.top { box-shadow: 0 0 0 2px var(--primary); }

/* ========== 推荐注卡片 ========== */
.combo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: linear-gradient(180deg, #fff, var(--bg-tertiary));
  box-shadow: var(--shadow-xs);
}
.combo-card .cc-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.combo-card .idx {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.combo-card .balls { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.combo-card .feats {
  margin-top: 8px; font-size: 11px; color: var(--text-muted);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.combo-card .feats span { background: var(--bg-tertiary); padding: 2px 6px; border-radius: 4px; }
.fit-badge {
  font-size: 11px; font-weight: 700; padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--success-light); color: var(--success);
}

/* ========== 按钮 / 表单 ========== */
.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.18s;
}
.btn-primary {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.ctrl-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ctrl-row label { font-size: 13px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; }
select, input[type=text], input[type=number] {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 13px;
  background: var(--surface); color: var(--text-primary);
  font-family: inherit;
}
select:focus, input:focus { outline: 2px solid var(--primary-alpha); border-color: var(--primary); }

/* ========== 提示 / 徽章 ========== */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
}
.badge-red { background: var(--primary-light); color: var(--primary-dark); }
.badge-blue { background: var(--blue-light); color: var(--blue-dark); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--warning-light); color: var(--warning); }
.badge-gray { background: var(--bg-tertiary); color: var(--text-muted); }

.alert {
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 13px; margin-bottom: 14px;
  border: 1px solid;
}
.alert-info { background: var(--blue-light); border-color: #bfdbfe; color: #1e40af; }
.alert-warn { background: var(--warning-light); border-color: #fde68a; color: #92400e; }
.alert-danger { background: var(--primary-light); border-color: #fecdd3; color: #9f1239; }

/* ========== 进度条（频次 / 分布） ========== */
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; }
.bar-row .lab { width: 46px; text-align: right; color: var(--text-secondary); flex-shrink: 0; }
.bar-track { flex: 1; height: 14px; background: var(--bg-tertiary); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 7px; background: var(--brand-grad); }
.bar-fill.blue { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.bar-row .val { width: 52px; text-align: left; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ========== 图表 ========== */
.chart { width: 100%; height: 300px; }
.chart-sm { height: 240px; }

/* ========== 遗漏数据表 ========== */
.sub-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin: 14px 0 8px; }
.tbl-sort th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl-sort th.th-sort:hover { color: var(--primary); }
.note-line { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin: 10px 0 2px; }
.note-line b { color: var(--text-secondary); }
.c-blue { color: var(--blue); }
.chart-lg { height: 420px; }

/* ========== 走势图 ========== */
.trend-wrap { overflow-x: auto; }
table.trend { border-collapse: collapse; font-size: 11px; }
table.trend th, table.trend td {
  border: 1px solid var(--border-light);
  padding: 2px; text-align: center; min-width: 22px;
}
table.trend th { background: var(--bg-tertiary); font-size: 10px; }
table.trend td.hit-red { background: var(--primary); color: #fff; border-radius: 50%; font-weight: 700; }
table.trend td.hit-blue { background: var(--blue); color: #fff; border-radius: 50%; font-weight: 700; }

/* ========== 免责声明卡片（页脚上方） ========== */
.disclaimer-card {
  max-width: 1400px; margin: 30px auto 0; padding: 18px 24px 14px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px;
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.85;
}
.disclaimer-head { font-weight: 700; color: var(--text-primary); font-size: 13.5px; margin-bottom: 8px; }
.disclaimer-list { margin: 0 0 10px; padding-left: 20px; }
.disclaimer-list li { margin: 2px 0; }
.disclaimer-foot { border-top: 1px dashed var(--border); padding-top: 9px; color: var(--text-muted); }
.disclaimer-foot a { color: var(--primary); text-decoration: none; }
.disclaimer-foot a:hover { text-decoration: underline; }
.disclaimer-foot b { color: var(--text-primary); }

/* ========== 页脚（四栏） ========== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 26px 16px 20px;
  margin-top: 26px;
  font-size: 12.5px; color: var(--text-muted);
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 0.9fr 1.5fr 1.2fr;
  gap: 30px; padding-bottom: 20px;
}
.f-logo { font-size: 15.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.footer-brand p { margin: 0 0 12px; line-height: 1.8; color: var(--text-secondary); }
.f-tags span {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 11px; margin: 2px 6px 2px 0; font-size: 11.5px;
  color: var(--text-muted); background: var(--bg-tertiary);
}
.f-title { font-weight: 700; color: var(--text-primary); font-size: 13px; margin-bottom: 4px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; line-height: 1.7; }
.footer-nav a, .footer-col a { color: var(--text-secondary); text-decoration: none; }
.footer-nav a:hover, .footer-col a:hover { color: var(--primary); }
.footer-col b { color: var(--text-primary); }
.f-copy {
  border: 1px solid var(--border); background: transparent; color: var(--primary);
  border-radius: 6px; font-size: 11px; padding: 1px 9px; cursor: pointer; margin-left: 4px;
}
.f-copy:hover { background: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center;
}
.fb-warn { color: #c0392b; font-weight: 600; }
.fb-meta { color: var(--text-muted); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ========== 加载态 ========== */
.loading { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 8px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

/* ========== 响应式 ========== */
@media (max-width: 620px) {
  .brand-title { font-size: 17px; }
  .card-body { padding: 12px; }
  .tab-panel { padding: 12px; }
  .ball { width: 26px; height: 26px; font-size: 12px; }
  .ball-lg { width: 30px; height: 30px; font-size: 13px; }
  .numcell { width: 38px; }
  .latest-extra { margin-left: 0; text-align: left; width: 100%; }
}

/* 打印 */
@media print {
  .tabs, .site-footer, .ctrl-row { display: none !important; }
  .tab-panel { display: block !important; }
}

/* FAQ（GEO/SEO 可见区块） */
.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface);
}
.faq-item[open] { border-color: var(--primary); background: var(--primary-light); }
.faq-item summary { list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '＋'; float: right; color: var(--text-muted); font-weight: 400; }
.faq-item[open] summary::after { content: '－'; }

/* 旋转矩阵 */
.wheel-out { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wheel-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 10px; background: var(--bg-tertiary); border-radius: 8px; }
.wheel-line .idx { color: var(--text-muted); font-size: 12px; width: 28px; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

/* ===================================================================
 *  v2.0 体验与响应式增强（2026-09）
 * =================================================================== */

/* ---------- 中奖面指标面板（推荐页） ---------- */
.metric-panel {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--bg-tertiary));
  overflow: hidden;
}
.mp-head {
  padding: 10px 16px;
  font-size: 14px; font-weight: 700;
  background: var(--head-grad); color: #fff;
}
.mp-grid {
  display: grid; gap: 10px; padding: 14px 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.mp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-xs);
}
.mp-stat .k { font-size: 12px; color: var(--text-muted); }
.mp-stat .v { font-size: 19px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mp-stat .s { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mp-stat.brand { border-color: #fecdd3; background: var(--primary-light); }
.mp-stat.brand .v { color: var(--primary-dark); }
.mp-stat.blue { border-color: #bfdbfe; background: var(--blue-light); }
.mp-stat.blue .v { color: var(--blue-dark); }
.mp-stat.muted .v { color: var(--text-secondary); }
.mp-note {
  padding: 10px 16px 14px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.7;
  border-top: 1px dashed var(--border);
}
.mp-note code {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; font-size: 11px;
}

/* ---------- 玩法页规则注记 ---------- */
.cell-note { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-top: 2px; white-space: normal; }
.rule-line { font-size: 13px; color: var(--text-secondary); padding: 3px 0; line-height: 1.7; }
.nowrap { white-space: nowrap; }

/* ---------- 表格横向滚动体验（移动端） ---------- */
.table-wrap, .trend-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: var(--radius-sm);
}
table.tbl td, table.tbl th { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 触屏：放大点击热区 ---------- */
@media (hover: none) and (pointer: coarse) {
  .tabs button { padding: 10px 16px; font-size: 14px; }
  .btn { padding: 9px 16px; min-height: 40px; }
  .btn-sm { padding: 6px 12px; min-height: 34px; }
  select, input[type=text], input[type=number] { padding: 8px 10px; min-height: 40px; font-size: 14px; }
  .faq-item summary { padding: 4px 0; }
}

/* 桌面才启用悬停态，避免手机点按后残留 */
@media (hover: hover) {
  .numcell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  table.tbl tbody tr:hover { background: var(--hover-row); }
  .tabs button:hover { border-color: var(--primary); color: var(--primary); }
  .btn:hover { border-color: var(--primary); color: var(--primary); }
}

/* ---------- 键盘可访问性 ---------- */
.tabs button:focus-visible, .btn:focus-visible, select:focus-visible, input:focus-visible, .faq-item summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab-panel.active { animation: none; }
  .numcell, .btn, .tabs button { transition: none; }
  .spinner { animation-duration: 1.6s; }
}

/* ---------- 窄屏（≤760px） ---------- */
@media (max-width: 760px) {
  html { font-size: 14px; }
  .wrap { padding: 0 12px; }
  .tab-panel { padding: 12px; }
  .tabs { padding: 0 12px; gap: 8px; }
  .chart { height: 240px; }
  .chart-sm { height: 200px; }
  .chart-lg { height: 320px; }
  .card-head { padding: 10px 12px; }
  .card-head h3 { font-size: 14px; }
  .stat .v { font-size: 17px; }
  .mp-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 12px; gap: 8px; }
  .combo-card { padding: 10px; }
  .latest-bar { gap: 8px; padding: 10px 12px; }
}

/* ---------- 超窄屏（≤380px） ---------- */
@media (max-width: 380px) {
  .ball { width: 24px; height: 24px; font-size: 11px; }
  .ball-sm { width: 21px; height: 21px; font-size: 10px; }
  .ball-lg { width: 28px; height: 28px; font-size: 12px; }
  .numcell { width: 34px; padding: 4px 0; }
  .numgrid { gap: 4px; }
  .brand-title { font-size: 16px; }
  .brand-sub { font-size: 11px; }
  .mp-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 宽屏（≥1600px）阅读宽度控制 ---------- */
@media (min-width: 1600px) {
  html { font-size: 16px; }
  .chart { height: 340px; }
  .chart-lg { height: 460px; }
}
