:root {
  --gold: #c9a227;
  --gold-light: #f7e9a8;
  --gold-dark: #8f6b08;
  --green: #2e7d32;
  --green-light: #4caf50;
  --blue: #1565c0;
  --red: #c62828;
  --bg: #f5f0d5;
  --panel: #fff8dc;
  --text: #2e2a1a;
  --muted: #6d6435;
  --border: #d4c480;

  /* ── 资料区统一样式开关（中式老土 / 老年友好大风）─────────
     改这里，前台首页 + 后台管理页同时生效 ──────────────────── */
  --pred-fs: 17px;                       /* 表格正文字号（大字，老年人友好）*/
  --pred-fs-head: 15px;                  /* 表头字号 */
  --pred-fs-title: 18px;                 /* 资料块标题字号 */
  --pred-fs-slot: 18px;                  /* 档位 Tab 字号 */
  --pred-cell-pad: 11px 12px;            /* 单元格内边距 */
  --pred-head-pad: 10px 12px;            /* 表头内边距 */
  --pred-radius: 4px;                    /* 老式直角小圆角 */
  --pred-gap: 14px;                      /* 资料块间距 */
  --pred-border-w: 2px;                  /* 边框粗细（老土风要粗一点）*/
  --pred-font: "SimSun", "Songti SC", "STSong", "Microsoft YaHei", serif;

  --pred-red: #c62828;                   /* 主红 */
  --pred-red-dark: #8e1c1c;              /* 深红（边框/描边）*/
  --pred-gold: #ffd54f;                  /* 金字 */
  --pred-ink: #4e342e;                   /* 墨色正文 */

  --pred-head-bg: #c62828;               /* 表头：红底 */
  --pred-head-color: #ffe082;            /* 表头：金字 */
  --pred-line: #e3c99b;                  /* 行分隔线 */
  --pred-stripe: #fffaec;                /* 斑马纹（浅米黄）*/
  --pred-hover: #fff2d0;
  --pred-title-bg: linear-gradient(180deg, #e53935, #b71c1c);      /* 站外资料 */
  --pred-title-bg-gen: linear-gradient(180deg, #1e88e5, #0d47a1);  /* 本站资料 */
  --pred-title-bg-local: linear-gradient(180deg, #00897b, #005b4f); /* 本站统计 */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* 顶部 header */
.site-header {
  background: linear-gradient(180deg, #e6c86a, #c9a227);
  padding: 10px 14px;
  border-bottom: 2px solid var(--gold-dark);
  width: calc(100% - 24px); max-width: 616px; margin: 0 auto;
}
.logo-row {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: #5a1e1e; text-shadow: 1px 1px 0 #fff2b3;
}
.logo-icon { font-size: 26px; }
.badge {
  background: #b71c1c; color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px; border: 1px solid #ffd700;
}

/* 横幅广告位 */
.banner {
  background: linear-gradient(90deg, #1e88e5, #0d47a1);
  color: #fff; text-align: center;
  padding: 18px 12px;
  border-bottom: 3px solid var(--gold);
}
.banner-inner { max-width: 640px; margin: 0 auto; }
.banner-text { display: block; font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.banner-size { display: block; font-size: 11px; color: #bbdefb; margin-top: 4px; }

/* 横幅海报：宽度对齐下方内容列（开奖/资料），手机自适应高度 + 标题叠加（新新彩） */
.banner-poster {
  position: relative; padding: 0; overflow: hidden;
  width: calc(100% - 24px); max-width: 616px; margin: 0 auto;
}
.banner-poster .banner-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
.banner-poster .banner-overlay {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: clamp(96px, 24vw, 210px);
  text-align: center; pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.75);
}
.banner-poster .banner-title {
  font-family: "STKaiti", "KaiTi", "Ma Shan Zheng", var(--pred-font, serif);
  font-size: clamp(26px, 7vw, 52px); font-weight: 900; line-height: 1.1;
  letter-spacing: .12em; color: #ffe9a8;
  -webkit-text-stroke: 1px rgba(120,20,20,.35);
}
.banner-poster .banner-sub {
  margin-top: 6px; font-size: clamp(11px, 3vw, 17px); font-weight: 600;
  letter-spacing: .18em; color: #fff5d6;
}

/* 公告滚动条 */
.marquee-wrap {
  display: flex; align-items: center;
  background: var(--gold-light); border-bottom: 1px solid var(--border);
  padding: 8px 12px; overflow: hidden;
  width: calc(100% - 24px); max-width: 616px; margin: 0 auto;
}
.marquee-icon { font-size: 16px; margin-right: 8px; flex-shrink: 0; }
.marquee {
  flex: 1; white-space: nowrap; overflow: hidden;
  font-size: 12px; color: var(--muted);
}
/* 公告跑马灯：文字超出栏宽才滚动（不超出时静止，不做无意义动画） */
.marquee .marquee-item { display: inline-block; padding-right: 48px; }
.marquee.scrolling .marquee-item {
  animation: marquee-scroll var(--marquee-dur, 20s) linear infinite;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee.scrolling .marquee-item { animation: none; }
}

/* 品牌区 */
.brand-row {
  display: flex; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #d4af37, #b8860b);
  padding: 14px 10px;
  border-bottom: 3px solid var(--gold-dark);
  width: calc(100% - 24px); max-width: 616px; margin: 0 auto;
}
.diamond {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green-light), var(--green));
  color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25);
}

/* 主容器 */
.container { max-width: 640px; margin: 0 auto; padding: 12px; }

/* 搜索 */
.search-bar { margin-bottom: 10px; }
.search-bar input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 14px;
}

/* 资料更新（源站同步） */
.news-section { margin-bottom: 14px; }
.news-section .block-title { border-radius: 10px 10px 0 0; }
.news-grid {
  background: var(--panel); padding: 10px; border-radius: 0 0 10px 10px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.news-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.news-item img { width: 100%; display: block; }
.news-meta { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.news-meta b { font-size: 13px; color: var(--text); }
.news-meta span { font-size: 12px; color: var(--muted); }
.news-meta i { font-size: 11px; color: var(--muted); font-style: normal; }
.draw-table td.empty { text-align: center; color: var(--muted); padding: 16px 0; }

/* 彩种 Tab */
.lottery-tabs {
  display: flex; gap: 0; margin-bottom: 12px;
  border-radius: 8px; overflow: hidden; border: 1px solid var(--border);
}
.tab {
  flex: 1; padding: 12px 4px; border: none; background: var(--gold-light);
  color: var(--gold-dark); font-weight: 700; font-size: 14px; cursor: pointer;
  border-right: 1px solid var(--border);
}
.tab:last-child { border-right: none; }
.tab.active { background: var(--gold); color: #fff; }

/* 主结果卡片 */
.result-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.result-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap; gap: 6px;
}
.issue { font-size: 18px; font-weight: 800; color: #b71c1c; }
.countdown { font-size: 13px; color: var(--muted); font-weight: 600; }
.balls-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px;
  margin-bottom: 12px;
}
.big-ball-wrap { position: relative; display: flex; align-items: center; }
.big-ball {
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px solid #999; box-shadow: inset 0 -4px 8px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.15);
}
.big-ball.red { border-color: var(--red); color: var(--red); }
.big-ball.blue { border-color: var(--blue); color: var(--blue); }
.big-ball.green { border-color: var(--green); color: var(--green); }
/* 兜底：号码属性表里查不到波色时别显示成纯黑字（老数据 / 后台 mapping 缺号时会命中） */
.big-ball.gray { border-color: #7a6a4f; color: #6d5b3a; }
.big-ball .bn { font-size: 22px; font-weight: 800; line-height: 1; }
.big-ball .bz { font-size: 10px; color: var(--muted); margin-top: 2px; }
.plus { font-size: 20px; color: var(--gold-dark); margin-right: 2px; font-weight: 700; }

.result-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--pred-red-dark); border-top: 1px dashed var(--border); padding-top: 10px;
}
.result-meta a { color: var(--blue); text-decoration: none; }
.meta-link { margin-left: 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.meta-link:hover { text-decoration: underline; }
.history-section.flash { animation: histFlash 1.4s ease; border-radius: 10px; }
@keyframes histFlash {
  0% { box-shadow: 0 0 0 0 rgba(21,101,192,0); }
  20% { box-shadow: 0 0 0 3px rgba(21,101,192,.55); }
  100% { box-shadow: 0 0 0 0 rgba(21,101,192,0); }
}

/* 历史记录 */
.history-section { margin-bottom: 14px; }
.history-section .block-title { border-radius: 10px 10px 0 0; }
.table-wrap { background: var(--panel); padding: 10px; border-radius: 0 0 10px 10px; overflow-x: auto; }
.draw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.draw-table th, .draw-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); }
.draw-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.nums { display: flex; gap: 4px; flex-wrap: wrap; }
.small-ball {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: #fff; font-size: 11px; font-weight: 700;
  border: 2px solid #999;
}
.small-ball.red { border-color: var(--red); color: var(--red); }
.small-ball.blue { border-color: var(--blue); color: var(--blue); }
.small-ball.green { border-color: var(--green); color: var(--green); }
.small-ball i { position: absolute; bottom: -10px; left: 0; right: 0; font-style: normal; font-size: 8px; color: var(--muted); text-align: center; }

/* 广告位占位 */
.ad-section { margin-bottom: 14px; }
.ad-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: var(--panel); padding: 12px; border-radius: 0 0 10px 10px;
}
.ad-slot {
  min-height: 120px; border: 2px dashed var(--border); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; background: #fff;
}
.ad-slot small { font-size: 11px; color: #aaa; }

/* 块标题（通用） */
.block-title {
  background: linear-gradient(90deg, #b8860b, #d4af37);
  color: #fff; font-weight: 700; font-size: 15px; padding: 10px 14px;
  border-radius: 10px 10px 0 0;
}
.block-title .hint { font-size: 12px; font-weight: 400; color: #fff8dc; margin-left: 6px; }

/* 走势图 */
.trend { margin-bottom: 20px; }
.trend-scroll { overflow-x: auto; background: var(--panel); border-radius: 0 0 10px 10px; padding: 6px; }
.trend-table { border-collapse: collapse; font-size: 11px; }
.trend-table th, .trend-table td { border: 1px solid var(--border); text-align: center; padding: 3px 1px; min-width: 22px; }
.trend-table thead th { color: var(--muted); background: #fff; position: sticky; top: 0; }
.trend-table th.sp, .trend-table td.sp { background: #e8f5e9; color: var(--green); font-weight: 700; }
.trend-table th.sticky, .trend-table td.sticky { position: sticky; left: 0; background: #fff; z-index: 2; }
.trend-table td.iss { color: var(--muted); white-space: nowrap; }
.trend-table td.cell.hit { background: var(--blue); color: #fff; font-weight: 700; }
.trend-table td.cell.sp { color: #fff; }

/* 频率条 */
.freq { background: var(--panel); padding: 12px; border-radius: 0 0 10px 10px; }
.freq h3 { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.freq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px 10px; }
.freq-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.freq-num { width: 20px; text-align: right; color: var(--muted); }
.freq-bar { flex: 1; height: 8px; background: #e0d6a6; border-radius: 4px; overflow: hidden; }
.freq-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); }
.freq-c { width: 16px; color: var(--muted); }

/* 分页 */
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.pager button { padding: 6px 12px; border: none; border-radius: 6px; background: var(--gold-light); color: var(--text); cursor: pointer; border: 1px solid var(--border); }
.pager button:disabled { opacity: .5; cursor: not-allowed; }
.pager-info { color: var(--muted); font-size: 12px; }

/* 底部 */
.footer { text-align: center; padding: 20px 12px; font-size: 12px; color: var(--muted); background: #e6dcb8; }
.footer a { color: var(--blue); text-decoration: none; }
.footer p { margin: 6px 0 0; }
.disclaimer { max-width: 900px; margin: 14px auto 0; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); font-size: 12px; line-height: 1.9; color: var(--muted); }
.disclaimer p { margin: 8px 0; }

/* 后台 */
#loginForm { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 20px auto; }
input {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 14px;
}
button {
  padding: 10px 16px; border: none; border-radius: 8px; background: var(--gold-light); color: var(--text); cursor: pointer; font-size: 14px; border: 1px solid var(--border);
}
button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.admin-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.sim-controls { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; background: var(--panel); border-radius: 0 0 10px 10px; }
.draw-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 14px 16px; background: var(--panel); border-radius: 0 0 10px 10px; }
.msg { color: #c62828; text-align: center; margin-top: 8px; }
.admin-table-wrap { padding: 0 16px 16px; background: var(--panel); border-radius: 0 0 10px 10px; }

/* 后台区块间距 */
.block { margin-bottom: 18px; }

/* 后台同步日志 */
.pred-log {
  background: #fffdf7; border: 1px solid var(--pred-line); border-radius: 4px;
  padding: 8px 12px; font-size: 12px; max-height: 140px; overflow-y: auto;
}

/* 后台内嵌页（预测资料管理）*/
.admin-frame {
  display: block; width: 100%; min-height: 1000px;
  border: none; background: #fff; border-radius: 0 0 10px 10px;
}

/* 时时彩数字球 */
.ssc-ball {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px solid var(--gold); background: #fff;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.15);
}
.ssc-ball.big { border-color: var(--red); color: var(--red); }
.ssc-ball.small { border-color: var(--blue); color: var(--blue); }
.ssc-ball .sd { font-size: 22px; font-weight: 800; line-height: 1; }
.ssc-ball .sx { font-size: 10px; color: var(--muted); margin-top: 2px; }
.ssc-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  font-size: 11px; font-weight: 700; border: 2px solid var(--gold);
}

/* 结果卡片右侧操作区 */
.meta-right { display: flex; align-items: center; gap: 10px; }
#sscToggle, #simReplayBtn { padding: 4px 10px; font-size: 12px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); background: #fff; }
#simReplayBtn { color: var(--gold-dark); }

/* 网站横幅（后台设置优先于广告位） */
.banner.has-ad { display: flex; align-items: center; justify-content: center; min-height: 90px; }
.banner.has-ad img { width: 100%; height: auto; display: block; }
.site-banner-text { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #fff; padding: 10px; text-align: center; }
.site-banner-text b { font-size: 20px; }
.site-banner-text span { font-size: 13px; opacity: .9; margin-top: 2px; }

/* 广告位实际内容 */
.ad-slot.has-ad { padding: 0; overflow: hidden; }
.ad-slot img { max-width: 100%; height: auto; display: block; }
.ad-text { display: block; font-size: 14px; color: var(--text); text-align: center; padding: 10px; }
.ad-number { display: block; font-size: 32px; font-weight: 800; color: var(--gold-dark); letter-spacing: 2px; text-align: center; }
.ad-link { display: block; text-decoration: none; color: inherit; }
.banner .ad-text { color: #fff; font-size: 18px; font-weight: 700; }
.banner .ad-number { color: #ffd700; }

/* 后台广告位编辑 */
.ads-container { padding: 14px 16px; background: var(--panel); border-radius: 0 0 10px 10px; }
.ad-edit { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #fff; }
.ad-edit-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.ad-edit-head b { color: var(--gold-dark); }
.ad-edit-head small { color: var(--muted); }
.ad-edit-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ad-edit-row > label { width: 92px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.ad-edit-row input, .ad-edit-row select, .ad-edit-row textarea { flex: 1; min-width: 150px; }
.ad-edit-row textarea { width: 100%; font-family: monospace; font-size: 12px; }
.ad-check { width: auto !important; display: flex; align-items: center; gap: 6px; }
.ad-check input { width: auto !important; flex: none; min-width: 0; }
.ad-msg { color: var(--green); font-size: 12px; margin-left: 8px; }
/* 广告位：后台预览 + 上传 + 排序 */
.ad-preview {
  flex: 1; min-height: 64px; padding: 8px; border: 1px dashed var(--border); border-radius: 6px;
  background: #fffdf7; text-align: center; overflow: auto;
}
.ad-preview img { display: block; max-width: 100%; max-height: 220px; height: auto; margin: 0 auto; }
.ad-preview .ad-text, .ad-preview .ad-number { font-size: 16px; font-weight: 800; color: var(--pred-red-dark); }
.ad-tip { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ad-tip.err { color: #c62828; font-weight: 700; }
.ad-edit-row input[type="file"] { flex: 1; min-width: 150px; font-size: 12px; }
.ad-order-row button { padding: 3px 10px; font-size: 12px; cursor: pointer; }
.ad-pos { font-size: 12px; color: var(--muted); }
/* 前台：每个广告位独立模块 */
.ad-block .ad-slot { min-height: 60px; }
.ad-block .block-title small { font-size: 11px; color: var(--muted); margin-left: 6px; }

/* 后台顶部栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #e6c86a, #c9a227);
  padding: 10px 16px; border-bottom: 2px solid var(--gold-dark);
}
.topbar .brand { font-size: 18px; font-weight: 800; color: #5a1e1e; }
.topbar nav a { color: #5a1e1e; text-decoration: none; font-weight: 600; }

/* 后台布局：左侧菜单 + 右侧内容 */
.admin-layout { display: flex; gap: 14px; align-items: flex-start; }
.admin-side {
  width: 170px; flex-shrink: 0; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  position: sticky; top: 10px;
}
.side-title { font-size: 13px; color: var(--muted); padding: 4px 8px 8px; font-weight: 700; }
.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu li { padding: 10px 12px; margin-bottom: 4px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.side-menu li:hover { background: var(--gold-light); }
.side-menu li.active { background: var(--gold); color: #fff; font-weight: 700; }
.admin-main { flex: 1; min-width: 0; }

@media (max-width: 720px) {
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; position: static; }
  .side-menu { display: flex; flex-wrap: wrap; gap: 6px; }
  .side-menu li { margin-bottom: 0; text-align: center; flex: 1 1 auto; min-height: 40px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
  .admin-bar, .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar nav a { padding: 6px 10px; display: inline-block; }
  /* 表单：标签与输入上下堆叠、占满宽度，触控友好 */
  .ad-edit-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .ad-edit-row > label { width: auto; }
  .ad-edit-row input, .ad-edit-row select, .ad-edit-row textarea { width: 100%; min-width: 0; font-size: 16px; }
  .ad-edit-row input[type="file"] { font-size: 13px; }
  .draw-form { grid-template-columns: 1fr; }
  .sim-controls { flex-direction: column; align-items: stretch; }
  .sim-controls > * { width: 100%; }
  .admin-table-wrap { overflow-x: auto; }
  .admin-table, .draw-table { width: 100%; }
  .admin-table th, .admin-table td, .draw-table th, .draw-table td { white-space: nowrap; font-size: 13px; padding: 6px 8px; }
  button { min-height: 40px; }
  .adm-tab-bar button { flex: 1 1 auto; min-height: 40px; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .topbar .brand { font-size: 16px; }
  .block-title { font-size: 15px; }
  .ad-edit { padding: 10px; }
  .container { padding: 8px; }
  .side-menu li { font-size: 12px; padding: 8px 6px; }
  .ad-edit-head { flex-wrap: wrap; }
}

/* 预测资料编辑弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 16px; }
.modal-box { background: #fff; width: min(820px, 96vw); max-height: 90vh; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #f6e9b8; font-weight: 700; }
.modal-head button { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #6d6435; }
.modal-body { display: flex; gap: 12px; padding: 12px 16px; overflow: auto; }
.modal-body textarea { flex: 1; min-height: 340px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.modal-preview { flex: 1; overflow: auto; border: 1px dashed var(--border); border-radius: 8px; padding: 10px; background: #fafafa; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .modal-body { flex-direction: column; } }

/* 弹层：工具栏 + 表格/源码切换 */
.modal-toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #fcfaf0; flex-wrap: wrap; }
.modal-toolbar .seg { padding: 5px 14px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; }
.modal-toolbar .seg.active { background: #e7c34a; border-color: #d4ad2a; font-weight: 700; }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.toolbar-hint { color: #8a8358; font-size: 12px; }
.modal-body { display: flex; flex: 1; min-height: 0; padding: 12px 16px; overflow: hidden; }
.modal-edit-row { display: flex; gap: 12px; flex: 1; min-height: 0; }
.pred-grid { flex: 1; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: #fff; min-width: 0; }
.pred-grid-table { width: 100%; border-collapse: collapse; }
.pred-grid-table td { padding: 4px 6px; border-bottom: 1px solid #f0ead2; vertical-align: middle; }
.pred-grid-table input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.pred-grid-del button { border: none; background: #fbeaea; color: #c0392b; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; }
.pred-grid-empty { padding: 20px; text-align: center; color: #8a8358; }
#predEditArea { flex: 1; min-height: 340px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.pe-hidden { display: none !important; }
@media (max-width: 720px) { .modal-edit-row { flex-direction: column; } .modal-body { overflow: auto; } }

/* 资料表名后跟随的「归属彩种」小标签 */
.pred-lottery-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; color: #6d4a00; background: #fdf0c8; border: 1px solid #ecd28a; border-radius: 10px; vertical-align: middle; }

/* 号码属性编辑 */
.map-group-title {
  font-weight: 700; color: var(--gold-dark); margin: 12px 0 6px;
  border-left: 4px solid var(--gold); padding-left: 8px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.map-inline { font-size: 12px; font-weight: 400; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.map-inline input { width: 90px; }
.map-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.map-row label { width: 56px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.map-row input { flex: 1; min-width: 0; }

/* 属性预览 */
.map-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.map-cell {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 2px; background: #fff;
}
.map-cell b { font-size: 14px; }
.map-cell i { font-style: normal; font-size: 11px; color: var(--muted); }
.map-cell u { text-decoration: none; font-size: 10px; color: var(--gold-dark); }
.map-cell.r b { color: var(--red); }
.map-cell.b b { color: var(--blue); }
.map-cell.g b { color: var(--green); }

/* 内联复选框 */
.inline-check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.inline-check input { width: auto; }

/* 等待开出的号码球 */
.big-ball.pending { border-color: #c9c2a0; opacity: .8; }
.big-ball.pending .bn { color: #b5ad8a; }

/* 后台：时间选择 chips / 预设号码输入 */
.inline-label { font-size: 14px; color: var(--muted); align-self: center; }
.time-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; background: var(--panel); }
.time-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--gold-light); font-size: 13px;
}
.time-chip button { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.preset-row { align-items: center; }
.preset-row .preset-num { width: 58px; }
.preset-row .preset-special { border-color: var(--red, #d33); }
.preset-row .plus-sign { font-size: 18px; font-weight: 700; color: var(--gold-dark); }
.pwd-tip { color: var(--muted); font-size: 12px; padding: 0 16px 12px; margin: 0; }

/* ── 资料排序：拖拽行（鼠标 + 手机手指通用）───────────── */
#sscOrderBody tr[data-key] {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
#sscOrderBody tr[data-key]:active { cursor: grabbing; }
#sscOrderBody tr.ord-dragging {
  opacity: .75; background: #fff8e1;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: relative; z-index: 2;
}
/* 把手：手机上按住这里拖（touch-action:none 保证不会被当成页面滚动）*/
#sscOrderBody .ord-grip {
  text-align: center; color: #b0a06a; font-size: 17px; letter-spacing: -2px;
  cursor: grab; user-select: none;
  touch-action: none;
  width: 44px; padding: 8px 0;
}
#sscOrderBody tr[data-key]:hover .ord-grip { color: var(--gold-dark); }
/* 分类名：点击可查看 / 编辑该表内容 */
#sscOrderBody .ord-name {
  color: #0d47a1; text-decoration: none; border-bottom: 1px dashed currentColor;
}
#sscOrderBody .ord-name:hover { color: #b71c1c; }
#sscOrderBody .ord-no {
  display: inline-block; min-width: 22px; text-align: center;
  font-size: 14px; color: var(--gold-dark);
}
.perm-box { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-item { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.perm-item input { width: auto; }

/* ===== 资料区前台展示（中式老土风）===== */
.pred-section { padding: 0 0 24px; }
/* 资料区大标题：红底金字 + 宽字距 */
.pred-section .block-title {
  background: linear-gradient(180deg, #e53935, #b71c1c);
  border: var(--pred-border-w) solid var(--pred-red-dark);
  border-radius: var(--pred-radius) var(--pred-radius) 0 0;
  font-size: 19px; letter-spacing: 3px; text-align: center;
  text-shadow: 1px 1px 0 #5c0f0f;
  font-family: var(--pred-font);
}
.pred-section .block-title .hint { font-size: 13px; letter-spacing: 0; color: #ffe082; }

/* 档位 Tab（如新新彩 22:30 / 23:30）：紧跟彩种 Tab 下方，互斥切换 */
.pred-slots {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 10px 0 0;
}
.pred-slot-btn {
  flex: 1; min-width: 130px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px; border-radius: var(--pred-radius);
  border: var(--pred-border-w) solid var(--pred-red-dark); background: #fffdf7;
  color: var(--pred-red-dark); font-size: var(--pred-fs-slot); font-weight: 800; letter-spacing: 3px;
  cursor: pointer; transition: all .15s ease; font-family: var(--pred-font);
  box-shadow: 0 2px 0 var(--pred-red-dark);
}
.pred-slot-btn i {
  font-style: normal; font-size: 13px; font-weight: 700; padding: 2px 8px;
  border-radius: 2px; background: #ffecb3; color: var(--pred-red-dark); letter-spacing: 1px;
}
.pred-slot-btn:hover { background: #fff3d0; }
.pred-slot-btn.active {
  background: linear-gradient(180deg, #e53935, #b71c1c); border-color: var(--pred-red-dark);
  color: var(--pred-gold); text-shadow: 1px 1px 0 #5c0f0f; box-shadow: 0 3px 0 #7f1212;
}
.pred-slot-btn.active i { background: rgba(255,255,255,.24); color: #fff8e1; }

/* 档位容器（如新新彩的 22:30 档 / 23:30 档），档内资料块样式与主档完全一致 */
.pred-slot { margin-bottom: 18px; }
.pred-slot:last-child { margin-bottom: 0; }
.pred-slot .pred-block { margin-bottom: 10px; }
.pred-slot-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 10px;
  background: #fff; border: 1px dashed var(--border); border-radius: var(--pred-radius);
}
.pred-slot-name { font-size: var(--pred-fs-slot); font-weight: 800; color: #4527a0; letter-spacing: .5px; }
.pred-slot-time,
.pred-slot-win {
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.pred-slot-time { background: #ede7f6; color: #4527a0; }
.pred-slot-win { background: #e8f5e9; color: #2e7d32; }
.pred-slot-issue { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }

/* 来源切换：全部 / 站外资料 / 本站统计 */
.pred-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 0;
}
.pred-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--pred-radius);
  border: var(--pred-border-w) solid var(--pred-red-dark); background: #fffdf7;
  color: var(--pred-red-dark); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .15s ease; font-family: var(--pred-font); letter-spacing: 1px;
}
.pred-chip i {
  font-style: normal; font-size: 12px; min-width: 20px; padding: 1px 6px;
  border-radius: 2px; background: #ffecb3; color: var(--pred-red-dark); text-align: center;
}
.pred-chip:hover { background: #fff3d0; }
.pred-chip.active {
  background: linear-gradient(180deg, #e53935, #b71c1c); border-color: var(--pred-red-dark);
  color: var(--pred-gold); box-shadow: 0 2px 0 #7f1212;
}
.pred-chip.active i { background: rgba(255,255,255,.24); color: #fff8e1; }

.pred-content {
  background: transparent; border: none; border-radius: 0; padding: 10px 0 0; min-height: 80px;
}
.pred-loading, .pred-empty {
  color: var(--pred-ink); font-size: 16px; text-align: center; padding: 28px 12px; line-height: 2;
  font-family: var(--pred-font);
}
.pred-empty small { font-size: 13px; color: #8d6e63; }

/* 单个资料块：粗红边 + 红底金字标题 */
.pred-block {
  margin-bottom: var(--pred-gap);
  border: var(--pred-border-w) solid var(--pred-red-dark);
  border-radius: var(--pred-radius);
  overflow: hidden; background: #fffdf7;
  box-shadow: 0 2px 0 var(--pred-red-dark), 0 3px 8px rgba(0,0,0,.10);
}
.pred-block.local { border-color: #005b4f; box-shadow: 0 2px 0 #005b4f, 0 3px 8px rgba(0,0,0,.10); }
.pred-block.gen { border-color: #0d47a1; box-shadow: 0 2px 0 #0d47a1, 0 3px 8px rgba(0,0,0,.10); }
.pred-block.tuku { border-color: #ad1457; box-shadow: 0 2px 0 #ad1457, 0 3px 8px rgba(0,0,0,.10); }
.pred-block.tuku .pred-block-title { background: linear-gradient(180deg, #d81b60, #ad1457); }
.pred-block-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: var(--pred-title-bg);
  color: #fff8e1; font-size: var(--pred-fs-title); font-weight: 800; letter-spacing: 2px;
  font-family: var(--pred-font); text-shadow: 1px 1px 0 rgba(0,0,0,.25);
  border-bottom: var(--pred-border-w) solid rgba(0,0,0,.15);
}
.pred-block.local .pred-block-title { background: var(--pred-title-bg-local); }
.pred-block.gen .pred-block-title { background: var(--pred-title-bg-gen); }
.pred-block-title .pb-tag {
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.55);
  letter-spacing: 1px;
}
.pred-block-title .pb-name { flex: 1; min-width: 0; }
.pred-block-title .pb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pred-block-title .pb-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.35);
}
.pred-block-title .pb-count { font-size: 11px; font-weight: 500; opacity: .85; }
.pred-block-body { padding: 0; }

/* 资料表格 */
.pred-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pred-table {
  width: 100%; border-collapse: collapse; font-size: var(--pred-fs);
  font-family: var(--pred-font);
}
.pred-table th {
  background: var(--pred-head-bg); color: var(--pred-head-color); font-size: var(--pred-fs-head); font-weight: 800;
  text-align: left; padding: var(--pred-head-pad); white-space: nowrap; letter-spacing: 2px;
  border: 1px solid var(--pred-red-dark);
}
.pred-table td {
  padding: var(--pred-cell-pad); font-size: var(--pred-fs); line-height: 1.7; color: var(--pred-ink);
  border: 1px solid var(--pred-line); vertical-align: middle; word-break: break-all;
}
.pred-table tbody tr:nth-child(even) { background: var(--pred-stripe); }
.pred-table tbody tr:hover { background: var(--pred-hover); }
.pred-table tbody tr:last-child td { border-bottom: none; }
.pred-table td.c1 { font-weight: 800; color: var(--pred-red-dark); white-space: nowrap; }
.pred-table.has-issue td.c1 { color: var(--pred-red); }
.pred-table tr.row-first td { background: #fff6d5; font-weight: 600; }
/* 号码：大红 / 大蓝 / 大绿，加粗放大（老年友好）*/
.pred-table .num {
  font-size: 19px; font-weight: 900; letter-spacing: 1px;
  padding: 0 3px; text-shadow: 1px 1px 0 rgba(0,0,0,.08);
}
.pred-table .num.red { color: #d32f2f; }
.pred-table .num.blue { color: #1565c0; }
.pred-table .num.green { color: #1b7a3d; }

/* 命中率着色：高=大绿、中=橙、低=灰红（数据一眼看出好坏）*/
.pred-rate { font-weight: 900; font-size: 17px; padding: 1px 6px; border-radius: 3px; }
.pred-rate.hi { color: #fff; background: #1b7a3d; border: 1px solid #0d4d26; }
.pred-rate.mid { color: #fff; background: #ef6c00; border: 1px solid #b45000; }
.pred-rate.lo { color: #fff; background: #8d6e63; border: 1px solid #5d4037; }

/* ── 高手论坛精选（直渲原站 HTML，保留其紫/红配色）────── */
.forum-post { border-bottom: 2px dashed var(--gold); padding: 12px 3px; }
.forum-post:last-child { border-bottom: 0; }
.forum-head { font-weight: 900; font-size: 18px; margin-bottom: 6px; }
.forum-author { font-weight: 700; font-size: 14px; margin-left: 8px; }
.forum-issue { font-weight: 700; font-size: 14px; margin-left: 6px; }
.forum-body { font-size: 17px; line-height: 1.85; font-weight: 700; }
.forum-body p { margin: 3px 0; }

/* 高手论坛精选：虚线分隔的「每一组」各用一个颜色（红 → 绿 → 蓝循环），正文不再用黑色 */
.forum-post:nth-child(3n+1) { border-bottom-color: #e53935; }
.forum-post:nth-child(3n+2) { border-bottom-color: #2e7d32; }
.forum-post:nth-child(3n)   { border-bottom-color: #1565c0; }
.forum-post:nth-child(3n+1) .forum-head,
.forum-post:nth-child(3n+1) .forum-body,
.forum-post:nth-child(3n+1) .forum-author,
.forum-post:nth-child(3n+1) .forum-issue { color: #e53935; }
.forum-post:nth-child(3n+2) .forum-head,
.forum-post:nth-child(3n+2) .forum-body,
.forum-post:nth-child(3n+2) .forum-author,
.forum-post:nth-child(3n+2) .forum-issue { color: #2e7d32; }
.forum-post:nth-child(3n) .forum-head,
.forum-post:nth-child(3n) .forum-body,
.forum-post:nth-child(3n) .forum-author,
.forum-post:nth-child(3n) .forum-issue { color: #1565c0; }
@media (max-width: 520px) {
  .forum-head { font-size: 16px; }
  .forum-body { font-size: 15px; }
}

/* 命中 / 未命中 / 待开 标签 + 重点标注（中式：中=红底金字，错=灰底墨字）*/
.pred-tag {
  display: inline-block; padding: 2px 10px; margin-left: 4px; border-radius: 3px;
  font-size: 15px; font-weight: 800; line-height: 1.6; letter-spacing: 2px;
  font-family: var(--pred-font);
}
.pred-tag.ok { background: var(--pred-red); color: var(--pred-gold); border: 1px solid var(--pred-red-dark); }
.pred-tag.bad { background: #eceff1; color: #546e7a; border: 1px solid #b0bec5; }
.pred-tag.wait { background: #fff8e1; color: #e65100; border: 1px solid #ffb74d; }
.pred-hit {
  font-style: normal; font-weight: 800; padding: 1px 4px; border-radius: 2px;
  background: #ffe082; color: #b71c1c; border-bottom: 2px solid #b71c1c;
}

/* JSON 通道号码卡 */
.pred-json-card {
  background: linear-gradient(180deg, #fffdf1, #fff6dc);
  border: 1px solid var(--border); border-radius: 8px; padding: 14px 12px; margin: 10px;
}
.pred-json-head { font-size: 17px; font-weight: 800; color: #7a5c0a; margin-bottom: 12px; }
.pred-json-issue { font-size: 14px; color: var(--muted); margin-left: 8px; font-weight: 600; }
.pred-json-balls { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px 0 14px; }
.pred-json-balls .big-ball { width: 62px; height: 62px; }
.pred-json-balls .big-ball .bn { font-size: 24px; }
.pred-json-balls .big-ball .bz { font-size: 11px; }
.pred-json-balls .plus { font-size: 22px; color: var(--red); font-weight: 700; margin: 0 2px; }
.pred-json-balls .big-ball.special { box-shadow: 0 0 0 3px rgba(198,40,40,.35); }
.pred-json-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pred-json-meta .meta-tag { padding: 3px 10px; background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; }
.pred-json-meta .meta-tag.muted { color: #999; }
/* 图库：图片资料整块显示 */
.pred-pic { padding: 10px; background: #fffdf7; text-align: center; }
.pred-pic img {
  display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto;
  border: 1px solid var(--pred-line); border-radius: 2px; background: #fff;
}
.pred-html-wrap { font-size: 15px; line-height: 1.7; overflow-x: auto; padding: 10px 12px; }
.pred-html-wrap img { display: block; width: 100%; max-width: 100%; height: auto; margin: 4px auto; }
.pred-html-wrap table { border-collapse: collapse; width: 100%; }
.pred-html-wrap td, .pred-html-wrap th { padding: 6px 10px; border: 1px solid #eee; font-size: 14px; }
.pred-html-wrap th { background: #f0f0f0; }
.pred-plain { padding: 12px; background: #fff; border-radius: 4px; white-space: pre-wrap; word-break: break-all; font-size: 14px; line-height: 1.7; }

/* 站外资料表（xg13688 / 热买 / 论坛等外部源）：红绿蓝配色大粗体，增强视觉冲击 */
.pred-block.ext { border-color: #e53935; box-shadow: 0 2px 0 #e53935, 0 5px 16px rgba(229,57,53,.22); }
.pred-block.ext .pred-block-title {
  background: linear-gradient(90deg, #e53935 0%, #2e7d32 50%, #1565c0 100%);
  color: #fff; font-weight: 800; letter-spacing: .5px;
}
.pred-block.ext .pred-html-wrap { font-size: 17px; line-height: 1.85; font-weight: 800; overflow-x: auto; padding: 12px 14px; }
.pred-block.ext .pred-html-wrap table { border-collapse: collapse; width: 100%; }
.pred-block.ext .pred-html-wrap th {
  background: #e53935; color: #fff; font-size: 16px; font-weight: 800;
  border: 2px solid #b71c1c; padding: 8px 10px;
}
.pred-block.ext .pred-html-wrap td { border: 1px solid #ddd; padding: 7px 10px; font-weight: 800; }
.pred-block.ext .pred-html-wrap tbody tr:nth-child(3n+1) td { color: #e53935; }
.pred-block.ext .pred-html-wrap tbody tr:nth-child(3n+2) td { color: #2e7d32; }
.pred-block.ext .pred-html-wrap tbody tr:nth-child(3n)   td { color: #1565c0; }
.pred-block.ext .pred-html-wrap b,
.pred-block.ext .pred-html-wrap strong { font-weight: 900; }

/* 站外资料大多走结构化表格分支（xg13688 等的 <tr><td> 会被 parseRows 解析成 pred-table） */
.pred-block.ext .pred-block-body { font-size: 17px; }
.pred-block.ext .pred-block-body,
.pred-block.ext .pred-block-body * { font-weight: 800; }
.pred-block.ext .pred-table { font-size: 17px; }
.pred-block.ext .pred-table th { background: #e53935; color: #fff; font-size: 16px; font-weight: 800; border: 2px solid #b71c1c; }
.pred-block.ext .pred-table tbody tr:nth-child(3n+1) td { color: #e53935; }
.pred-block.ext .pred-table tbody tr:nth-child(3n+2) td { color: #2e7d32; }
.pred-block.ext .pred-table tbody tr:nth-child(3n)   td { color: #1565c0; }
.pred-block.ext .pred-plain { font-size: 17px; }

/* 字体再加粗加大（仅站外资料表 .pred-block.ext） */
.pred-block.ext .pred-block-body,
.pred-block.ext .pred-block-body * { font-weight: 900; }
.pred-block.ext .pred-block-body { font-size: 19px; }
.pred-block.ext .pred-html-wrap { font-size: 19px; }
.pred-block.ext .pred-table { font-size: 19px; }
.pred-block.ext .pred-table th { font-size: 17px; font-weight: 900; }
.pred-block.ext .pred-plain { font-size: 19px; }
/* ⚠️ 关键：上面只给 table 设了字号，td 自己有 font-size（含媒体查询），必须单独覆盖才生效 */
.pred-block.ext .pred-table td { font-size: 20px; font-weight: 900; line-height: 1.75; }
.pred-block.ext .pred-table .num { font-size: 22px; font-weight: 900; }
.pred-block.ext .pred-tag { font-size: 17px; }
.pred-block.ext .pred-hit { font-size: 19px; }
.pred-block.ext .pred-rate { font-size: 18px; }

/* 本站按外站格式自建的资料（local_pred → .pred-block.gen）：内容与站外资料同源同格式，
   表格内文字同样用红绿蓝大字（保留蓝色边框/标题以区分「本站自建」与「站外抓取」） */
.pred-block.gen .pred-table { font-size: 19px; }
.pred-block.gen .pred-table td { font-size: 20px; font-weight: 900; line-height: 1.75; }
.pred-block.gen .pred-table th { font-size: 17px; font-weight: 900; }
.pred-block.gen .pred-table tbody tr:nth-child(3n+1) td { color: #e53935; }
.pred-block.gen .pred-table tbody tr:nth-child(3n+2) td { color: #2e7d32; }
.pred-block.gen .pred-table tbody tr:nth-child(3n)   td { color: #1565c0; }
.pred-block.gen .pred-table .num { font-size: 22px; font-weight: 900; }
.pred-block.gen .pred-tag { font-size: 17px; }
.pred-block.gen .pred-hit { font-size: 19px; }
.pred-block.gen .pred-rate { font-size: 18px; }
.pred-block.gen .pred-block-body,
.pred-block.gen .pred-block-body * { font-weight: 900; }
.pred-block.gen .pred-html-wrap { font-size: 19px; font-weight: 900; }
.pred-block.gen .pred-html-wrap tbody tr:nth-child(3n+1) td { color: #e53935; }
.pred-block.gen .pred-html-wrap tbody tr:nth-child(3n+2) td { color: #2e7d32; }
.pred-block.gen .pred-html-wrap tbody tr:nth-child(3n)   td { color: #1565c0; }
.pred-disclaimer {
  margin-top: 4px; padding: 8px 12px; border-radius: 8px; background: #fff6d5;
  border: 1px dashed var(--border); color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center;
}

/* 本站统计表（local_*）：字号加大，每个表用一种颜色区分 */
.pred-block.local .pred-table { font-size: 19px; }
.pred-block.local .pred-table th { font-size: 16px; letter-spacing: 1px; }
.pred-block.local .pred-table td { font-size: 19px; line-height: 1.85; font-weight: 800; }
.pred-block.local.c0 .pb-name,
.pred-block.local.c0 .pred-table td { color: #d32f2f; }
.pred-block.local.c1 .pb-name,
.pred-block.local.c1 .pred-table td { color: #1565c0; }
.pred-block.local.c2 .pb-name,
.pred-block.local.c2 .pred-table td { color: #1b7a3d; }
.pred-block.local.c3 .pb-name,
.pred-block.local.c3 .pred-table td { color: #6a1b9a; }
.pred-block.local.c4 .pb-name,
.pred-block.local.c4 .pred-table td { color: #e65100; }
.pred-block.local.c5 .pb-name,
.pred-block.local.c5 .pred-table td { color: #00838f; }
.pred-block.local.c6 .pb-name,
.pred-block.local.c6 .pred-table td { color: #5d4037; }
.pred-block.local.c7 .pb-name,
.pred-block.local.c7 .pred-table td { color: #ad1457; }

@media (max-width: 520px) {
  .pred-toolbar, .pred-slots { padding: 10px 4px 0; }
  .pred-slot-btn { min-width: 0; padding: 10px 12px; }
  .pred-chip { padding: 6px 11px; font-size: 13px; }
  .pred-block-title { font-size: 14px; padding: 9px 11px; }
  .pred-table th { font-size: 12px; padding: 8px 9px; }
  .pred-table td { font-size: 14px; padding: 9px; }
  /* 手机端同样保持站外资料的大字号（覆盖上面 .pred-table td 的 14px） */
  .pred-block.ext .pred-table td { font-size: 17px; padding: 8px 7px; }
  .pred-block.ext .pred-table th { font-size: 14px; }
  .pred-block.ext .pred-table .num { font-size: 19px; }
  .pred-block.gen .pred-table td { font-size: 17px; padding: 8px 7px; }
  .pred-block.gen .pred-table th { font-size: 14px; }
  .pred-block.gen .pred-table .num { font-size: 19px; }
  .pred-json-balls .big-ball { width: 54px; height: 54px; }
  .pred-json-balls .big-ball .bn { font-size: 21px; }
}

/* ===== 资料更新：单幅图宽度、自动左滑轮播 ===== */
.news-carousel { width: 100%; overflow: hidden; }
.news-track { display: flex; width: 100%; }
.news-slide { flex: 0 0 100%; max-width: 100%; }
.news-slide img { width: 100%; height: auto; display: block; }

/* ===== 后台：广告位 / 资料更新图位 切换 ===== */
.adm-tab-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-tab-bar button {
  padding: 6px 16px; border: 1px solid var(--border); background: #fff;
  color: #333; cursor: pointer; border-radius: 4px; font-size: 14px;
}
.adm-tab-bar button.active { background: var(--gold-dark); color: #fff; border-color: var(--gold-dark); }
.news-slide-row {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
  background: #fffdf6;
}

/* ===== 进入网站弹窗（「关于我们」）===== */
.entry-popup {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.entry-popup-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); }
.entry-popup-box {
  position: relative; z-index: 1;
  width: min(92vw, 360px); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column;
}
.entry-popup-title {
  background: #d81b60; color: #fff; font-weight: 700; font-size: 17px;
  text-align: center; padding: 10px 12px; letter-spacing: 1px;
}
.entry-popup-body { padding: 16px 16px 8px; text-align: center; }
.ep-block { margin-bottom: 16px; }
.ep-line { color: #222; font-size: 15px; line-height: 1.9; }
.ep-issue { color: #e00000; font-weight: 700; }
.ep-pick { color: #e00000; font-weight: 700; font-size: 17px; margin: 3px 0; }
.ep-numbers { color: #e00000; font-weight: 700; font-size: 17px; letter-spacing: 1px; margin: 2px 0 4px; }
.ep-urls-title { color: #222; font-size: 15px; line-height: 1.9; margin-top: 4px; }
.ep-url { color: #e00000; font-weight: 700; font-size: 15px; line-height: 1.9; }
.entry-popup-foot { padding: 10px; text-align: center; border-top: 1px solid #eee; }
.entry-popup-foot button {
  background: #fff; border: 1px solid #333; color: #111; border-radius: 4px;
  padding: 7px 26px; font-size: 15px; cursor: pointer;
}
.entry-popup-foot button:hover { background: #f5f5f5; }
