:root {
  /* ── 视觉基调：复刻目标站 2225789.top 的绿 + 黄 ── */
  --gold: #ffb300;               /* 强调黄（目标站 #ff0 系） */
  --gold-light: #fff89a;         /* 浅黄底（跑马灯/高亮） */
  --gold-dark: #b37e00;
  --green: #019c3a;              /* 主绿（目标站 cgi-nav #019c3a） */
  --green-dark: #01832a;         /* 深绿 hover */
  --green-light: #06ae44;
  --blue: #1565c0;
  --red: #e60012;
  --bg: #fff89a;                 /* 页面底（目标站 html background: #fff89a 浅黄） */
  --panel: #ffffff;
  --text: #1a1a1a;
  --muted: #5c6b5f;
  --border: #b9d9bf;

  /* 五行色（目标站 kj.css：金/木/水/火/土） */
  --wx-jin: #ffcc00;
  --wx-mu: #33cc33;
  --wx-shui: #3399ff;
  --wx-huo: #ff0000;
  --wx-tu: #cc9900;

  /* ── 资料区统一样式开关（中式老土 / 老年友好大风）─────────
     改这里，前台首页 + 后台管理页同时生效 ──────────────────── */
  --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: #019c3a;               /* 表头：目标站绿底 */
  --pred-head-color: #fff;               /* 表头：白字 */
  --pred-line: #cdeacf;                  /* 行分隔线（浅绿）*/
  --pred-stripe: #f2fbf4;                /* 斑马纹（浅绿白）*/
  --pred-hover: #e3f5e8;
  --pred-title-bg: linear-gradient(180deg, #06ae44, #019c3a);      /* 站外资料：绿 */
  --pred-title-bg-gen: linear-gradient(180deg, #ffb300, #e69500);  /* 本站资料：黄 */
  --pred-title-bg-local: linear-gradient(180deg, #0b7d3a, #015a28); /* 本站统计：深绿 */
}
* { 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;
}

/* ── 全局风格：导向站示例图风格（蓝天背景 + 紫红/蓝描边大字）；号码球类保持原样 ──
   注意：target-skin.css（后加载）会覆盖 body 背景，这里用 !important 强制压过皮肤层 */
body {
  background-color: #8fd0f9 !important;
  background-image: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 48%), linear-gradient(180deg, #5db9f2 0%, #8fd0f9 42%, #c9ecfe 72%, #eef9ff 100%) !important;
  background-attachment: fixed !important;
}
/* 顶部一道白云光带（仿示例图） */
body::before {
  content: ''; position: fixed; left: -4%; right: -4%; top: 16%; height: 20%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85) 22%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.85) 78%, rgba(255,255,255,0));
  border-radius: 50%; filter: blur(4px); z-index: -1; pointer-events: none;
}
/* 顶部 header（对齐目标站 cgi-head：#019c3a 实心绿条 + 白字） */
.site-header {
  background: #019c3a;
  padding: 10px 14px;
  border-bottom: 2px solid #01832a;
  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: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.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;
  border: 3px solid #d9a520; border-radius: 8px;
  background:
    radial-gradient(circle at 50% 52%, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 46%),
    repeating-conic-gradient(from 8deg at 50% 52%, #2e8ce0 0deg 5deg, #4fa8ee 5deg 10deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}
.banner-poster .banner-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: none;
}
/* banner 号码球：与开奖区同款精灵球，位置仿原海报布局 */
.banner-ball {
  position: absolute; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.banner-ball .big-ball {
  width: clamp(30px, 6.5vw, 50px); height: clamp(30px, 6.5vw, 50px);
  box-shadow: 0 2px 6px rgba(0, 40, 90, .35);
}
.banner-ball .bn { font-size: clamp(13px, 2.8vw, 21px); }
.banner-ball .bz { color: #000; text-shadow: none; font-weight: 700; }
.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: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(26px, 7vw, 52px); font-weight: 900; line-height: 1.1;
  letter-spacing: .12em; color: #e60012;
  -webkit-text-stroke: 3px #fff; paint-order: stroke fill;
}
.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: #e7f6ea;
  color: var(--green-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(--green); color: #fff; }

/* 顶部导航矩阵（复刻目标站 cgi-nav：#019c3a 平铺、每格 25%、白字 18px、hover 深绿） */
.cat-nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-bottom: 12px; overflow: hidden;
  background: #019c3a; border: none; border-radius: 0;
}
.cat-nav-cap {
  min-height: 50px; padding: 6px 4px; border: none; cursor: pointer;
  background: #019c3a; color: #fff; font-size: 18px; font-weight: 700;
  line-height: 1.2; text-align: center; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cat-nav-cap:hover { background: #01832a; }
.cat-nav-cap.cat-nav-ref { background: #06ae44; }
@media (max-width: 420px) {
  .cat-nav-cap { font-size: 15px; }
}
@media (max-width: 360px) {
  .cat-nav-cap { font-size: 13px; min-height: 44px; }
}

/* 主结果卡片 */
.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; }
/* 手机端也要排成 1 排：不换行 + 球径随视口宽度自适应缩小（宽屏封顶 58px，与原来一致） */
.balls-row {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
  gap: clamp(2px, 1.2vw, 8px);
  margin-bottom: 12px;
}
.big-ball-wrap { display: flex; align-items: flex-start; min-width: 0; }
.bb-item { display: flex; flex-direction: column; align-items: center; }
/* 球：照目标站 kj/1.html 用红/蓝/绿球精灵图作背景，号码在白色球心，生肖/五行在球下方 */
.big-ball {
  width: clamp(34px, 11vw, 56px); height: clamp(34px, 11vw, 56px); border-radius: 50%;
  background: #eee no-repeat center; background-size: 100% 100%;
  display: flex; align-items: center; justify-content: center;
}
.big-ball.red { background-image: url('/images/goclone/r.png'); }
.big-ball.blue { background-image: url('/images/goclone/b.png'); }
.big-ball.green { background-image: url('/images/goclone/g.png'); }
/* 兜底：查不到波色时给红球去色，不留纯黑圈 */
.big-ball.gray { background-image: url('/images/goclone/r.png'); filter: grayscale(1); }
.big-ball .bn { font-size: clamp(15px, 4.4vw, 23px); font-weight: 800; line-height: 1; color: #333; padding-bottom: clamp(3px, 1vw, 6px); font-family: Arial, "Microsoft YaHei", sans-serif; }
.bz { font-size: clamp(9px, 2.4vw, 13px); color: #000; margin-top: 3px; white-space: nowrap; font-weight: 600; }
.plus { font-size: clamp(16px, 4vw, 26px); color: #c00; font-weight: 700; align-self: flex-start; margin-top: clamp(6px, 2.2vw, 14px); margin-right: 1px; }

.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: clamp(32px, 10.4vw, 52px); height: clamp(32px, 10.4vw, 52px); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: clamp(2px, .5vw, 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: clamp(14px, 4vw, 22px); font-weight: 800; line-height: 1; }
.ssc-ball .sx { font-size: clamp(6px, 1.7vw, 10px); color: var(--muted); margin-top: 1px; white-space: nowrap; }
.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); }

/* 广告位实际内容 */
.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 { background: #ececec; border: 2px dashed #c9c2a0; }
.big-ball.pending .bn { color: #b5ad8a; padding-bottom: 0; }

/* 后台：时间选择 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; }

/* ── 后台轻提示浮层（保存/排序/同步等操作的成功·失败反馈）── */
.admin-toast {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.admin-toast-item {
  max-width: 78vw; padding: 10px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 700; line-height: 1.4; color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}
.admin-toast-item.show { opacity: 1; transform: translateY(0); }
.admin-toast-item.ok { background: #2e7d32; }
.admin-toast-item.bad { background: #c62828; }
.admin-toast-item.info { background: #0277bd; }

/* ── 资料排序：拖拽行（鼠标 + 手机手指通用）───────────── */
#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;
  cursor: pointer;   /* 去掉 href 后需显式给手型（原靠 <a href> 的默认样式） */
}
#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: none;
  border-radius: 4px;
  overflow: hidden; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.pred-block-title {
  display: flex; align-items: center; justify-content: center; gap: 2px; position: relative;
  padding: 8px 12px; background: #06ae44; color: #fff;
  font-family: "楷体", "STKaiti", var(--pred-font); font-size: 20px; font-weight: 800; letter-spacing: 1px;
  border-top: 3px double rgba(255,255,255,.85); border-bottom: 3px double rgba(255,255,255,.85);
}
.pred-block-title .pb-caiku { color: #ff0; }
.pred-block-title .pb-cat { color: #fff; }
.pred-block-title .pb-right { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; }
.pred-block-title .pb-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: 1px;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); color: #fff;
}
.pred-block-title .pb-count { font-size: 11px; font-weight: 500; color: #fff; opacity: .9; }
.pred-block-body { padding: 0; }
/* 自建资料的行内格式（照目标站 type/*.js：期号:内容【…】开:号准/中/错） */
.pred-inline {
  text-align: center; font-family: "微软雅黑", "Microsoft YaHei", var(--pred-font);
  font-size: 16px; font-weight: 700; color: #333; line-height: 1.6;
  padding: 8px 6px; margin: 0; border-bottom: 1px dashed #e6e6e6;
}
.pred-inline:last-child { border-bottom: none; }
.pred-inline .pi-issue { color: #333; margin-right: 2px; }
.pred-inline .pi-body { color: #f00; }                 /* 内容【】：目标站行内表红字 */
.pred-inline .pi-body span { color: #f00; background: #ff0; padding: 0 2px; border-radius: 2px; }   /* 命中字：黄底高亮（照目标站 rgb(255,255,0)） */
.pred-inline .pi-open { color: #0000FF; margin-left: 4px; }   /* 结果：行内表蓝字（中/错 由内联 font 另着色） */
.pred-inline .pi-wait { color: #0000FF; }
.pred-inline .num.red { color: #e00; } .pred-inline .num.blue { color: #06c; } .pred-inline .num.green { color: #0a0; }
/* 自建资料（kindOf=gen）逐类变化（照目标站：节目名逐类着色，有的带外边框有的不带）
   --pc 由 pred-view.js 按分类注入到块上：节目名用强调色 + 左侧色条；lp-box 类再加整圈彩色边框 */
.pred-block.gen { border: none; border-left: 5px solid var(--pc, #06ae44); }
.pred-block.gen.lp-box { border: 2px solid var(--pc, #06ae44); border-left-width: 5px; border-radius: 8px; }
.pred-block.gen .pi-issue { color: var(--pc, #333); }
.pred-block.gen .pred-inline:nth-child(even) { background: #f6f7fb; }

/* 资料表格 */
.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 .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 table:not(.pred-grow) tbody tr:nth-child(3n+1) td { color: #e53935; }
.pred-block.gen .pred-html-wrap table:not(.pred-grow) tbody tr:nth-child(3n+2) td { color: #2e7d32; }
.pred-block.gen .pred-html-wrap table:not(.pred-grow) 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; }
}

/* ── 资料表手机适配（≤520px）：字号与内距整体收窄，宽表横向滚动，尽量一屏看全 ──
   ⚠️ 覆盖上方桌面端的超大字（站外/自建资料 19~20px + 900 粗），手机端收到可读又不撑破宽度 */
@media (max-width: 520px) {
  /* 资料块标题 */
  .pred-block-title { font-size: 14px; padding: 8px 10px; letter-spacing: 1px; gap: 6px; }
  .pred-block-title .pb-tag { font-size: 10px; padding: 1px 6px; }
  .pred-block-title .pb-count { font-size: 10px; }
  .pred-slot-title { padding: 7px 9px; gap: 6px; }
  .pred-slot-name { font-size: 15px; }
  .pred-slot-issue { font-size: 11px; }

  /* 三类资料表正文统一收到手机可读字号 + 紧凑内距 */
  .pred-table { font-size: 14px; }
  .pred-table th { font-size: 12px; padding: 6px; letter-spacing: 0; }
  .pred-table td { font-size: 14px; padding: 6px; line-height: 1.5; }
  .pred-table .num { font-size: 16px; }
  .pred-block.ext .pred-table,
  .pred-block.gen .pred-table,
  .pred-block.local .pred-table { font-size: 14px; }
  .pred-block.ext .pred-table td,
  .pred-block.gen .pred-table td,
  .pred-block.local .pred-table td { font-size: 14px; padding: 6px; line-height: 1.5; }
  .pred-block.ext .pred-table th,
  .pred-block.gen .pred-table th,
  .pred-block.local .pred-table th { font-size: 12px; padding: 6px; letter-spacing: 0; }
  .pred-block.ext .pred-table .num,
  .pred-block.gen .pred-table .num,
  .pred-block.local .pred-table .num { font-size: 16px; }

  /* 站外 / 自建资料正文 + 直渲 HTML：去掉桌面超大字 */
  .pred-block.ext .pred-block-body,
  .pred-block.gen .pred-block-body { font-size: 15px; }
  .pred-block.ext .pred-html-wrap,
  .pred-block.gen .pred-html-wrap { font-size: 15px; line-height: 1.6; padding: 8px 9px; }
  .pred-html-wrap { font-size: 14px; line-height: 1.6; padding: 8px 9px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pred-html-wrap td, .pred-html-wrap th { padding: 4px 6px; font-size: 13px; }
  .pred-block.ext .pred-html-wrap td { padding: 5px 6px; font-size: 14px; }
  .pred-html-wrap table { min-width: 100%; }

  /* 徽标 / 命中 / 命中率：随正文缩小，别把行撑高 */
  .pred-tag { font-size: 12px; padding: 1px 6px; letter-spacing: 1px; margin-left: 2px; }
  .pred-block.ext .pred-tag, .pred-block.gen .pred-tag { font-size: 13px; }
  .pred-hit { font-size: 14px; }
  .pred-block.ext .pred-hit, .pred-block.gen .pred-hit { font-size: 15px; }
  .pred-rate { font-size: 14px; padding: 1px 4px; }
  .pred-block.ext .pred-rate, .pred-block.gen .pred-rate { font-size: 14px; }

  /* JSON 号码卡：球再收一档 */
  .pred-json-card { padding: 10px 8px; margin: 8px 0; }
  .pred-json-head { font-size: 15px; margin-bottom: 8px; }
  .pred-json-balls { gap: 4px; padding: 4px 0 10px; }
  .pred-json-balls .big-ball { width: 46px; height: 46px; }
  .pred-json-balls .big-ball .bn { font-size: 18px; }
  .pred-json-balls .bz { font-size: 10px; }

  /* 图库图片：占满卡片、去多余留白 */
  .pred-pic { padding: 6px; }

  /* 间距收紧，减少滚动距离 */
  .pred-slot { margin-bottom: 12px; }
  .pred-slot .pred-block { margin-bottom: 8px; }
  .pred-block { margin-bottom: 10px; }
  .pred-content { padding: 8px 0 0; }
}

/* ===== 资料更新：单幅图宽度、自动左滑轮播 ===== */
.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); }
/* 弹窗整体收窄：手机上原来 360px 宽 + 大内边距显得撑满屏，现在一屏能看完 */
.entry-popup-box {
  position: relative; z-index: 1;
  width: min(88vw, 320px); max-height: 76vh; 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: 15px;
  text-align: center; padding: 8px 12px; letter-spacing: 1px;
}
.entry-popup-body { padding: 12px 12px 6px; text-align: center; }
.ep-block { margin-bottom: 12px; }
.ep-line { color: #222; font-size: 14px; line-height: 1.75; }
.ep-issue { color: #e00000; font-weight: 700; }
.ep-pick { color: #e00000; font-weight: 700; font-size: 16px; margin: 3px 0; }
.ep-numbers { color: #e00000; font-weight: 700; font-size: 16px; 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; }
/* 小屏手机（≤420px）：弹窗再收一档，避免顶到屏幕边缘 */
@media (max-width: 420px) {
  .entry-popup { padding: 10px; }
  .entry-popup-box { width: min(92vw, 296px); max-height: 72vh; }
  .entry-popup-title { font-size: 14px; padding: 7px 10px; }
  .entry-popup-body { padding: 10px 10px 4px; }
  .ep-block { margin-bottom: 10px; }
  .ep-line, .ep-urls-title, .ep-url { font-size: 13px; line-height: 1.7; }
  .ep-pick, .ep-numbers { font-size: 15px; }
  .entry-popup-foot { padding: 8px; }
  .entry-popup-foot button { padding: 6px 22px; font-size: 14px; }
}

/* ===== 浮动工具：回到顶部 + 资料导航 ===== */
.float-tools {
  position: fixed; right: 12px; bottom: 76px; z-index: 900;
  display: flex; flex-direction: column; gap: 10px;
}
.ft-btn {
  width: auto; height: 40px; border-radius: 20px; padding: 0 13px; gap: 5px;
  border: 1px solid var(--gold-dark); background: var(--panel); color: var(--gold-dark);
  font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  display: flex; align-items: center; justify-content: center;
}
.ft-btn .ft-ico { font-size: 16px; line-height: 1; }
.ft-btn .ft-txt { font-size: 13px; font-weight: 700; }
.ft-btn:active { background: var(--gold); color: #fff; }
.ft-nav-panel {
  position: fixed; right: 10px; bottom: 132px; z-index: 901;
  width: min(94vw, 340px); max-height: 72vh; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.ft-nav-head {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(90deg, #b8860b, #d4af37); color: #fff;
  font-weight: 700; font-size: 14px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.ft-nav-head button { background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; }
/* 一屏看全：多列网格排所有表名，对照表整行固定在最下面 */
.ft-nav-list {
  padding: 6px; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.ft-nav-item {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; padding: 8px 4px; border: 1px solid #f0e2b6; border-radius: 6px; background: #fff;
  font-size: 12px; line-height: 1.3; color: #4e342e; cursor: pointer; word-break: break-all;
}
.ft-nav-item:hover { background: var(--panel); }
/* 导航里的「号码属性对照表」单独标红、整行铺满，固定在最下面 */
.ft-nav-item.ft-nav-ref { grid-column: 1 / -1; color: #b71c1c; font-weight: 700; background: #fff5f5; border-color: #eec2c2; }
/* 导航跳转时给锚点留点余量，别贴着屏幕顶 */
.pred-block, .ref-block { scroll-margin-top: 10px; }
@media (max-width: 480px) {
  .float-tools { right: 10px; bottom: 66px; gap: 8px; }
  .ft-btn { height: 38px; padding: 0 11px; }
  .ft-btn .ft-ico { font-size: 15px; }
  .ft-btn .ft-txt { font-size: 12px; }
  .ft-nav-panel { bottom: 112px; width: min(94vw, 320px); max-height: 60vh; }
  .ft-nav-list { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}

/* =========================================================================
   后台手机适配（≤720px / ≤480px）
   -------------------------------------------------------------------------
   目标：手机上单手能操作完后台全部功能。四件事：
     ① 管理菜单「吸顶 + 横滑一行」——原来在手机上换行成 2~3 排，且往下滑就点不到
     ② 所有输入控件统一 16px 字号 + ≥44px 高（字号 <16px 时 iOS 会自动放大整个页面）
     ③ 宽表横向滚动 + 首列冻结，左右滑时始终有参照
     ④ 编辑弹层接近全屏，隐藏「实时预览」（小屏塞不下三栏）
   ⚠️ 改后台样式请优先动这里，集中一处便于维护。
   ========================================================================= */
@media (max-width: 720px) {
  /* ① 菜单移到左侧竖排（跟电脑端一致），窄屏适配：窄列 + 小字 + 大点击区 */
  .admin-layout { flex-direction: row; gap: 10px; align-items: flex-start; }
  .admin-side {
    width: 88px; flex: 0 0 88px; position: sticky; top: 8px; align-self: flex-start; z-index: 60;
    padding: 8px 6px; border-radius: 10px; box-shadow: none;
  }
  .side-title { display: none; }
  .side-menu { display: block; flex-wrap: nowrap; overflow-x: visible; }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-menu li {
    display: block; flex: none; white-space: normal; text-align: center;
    margin-bottom: 6px; min-height: 40px; padding: 8px 4px; font-size: 12px; line-height: 1.25;
    border: 1px solid var(--border); background: #fff;
  }
  .side-menu li.active { border-color: var(--gold-dark); }
  .admin-main { flex: 1; width: auto; min-width: 0; scroll-margin-top: 0; }

  /* ② 输入控件：16px 防 iOS 缩放 + 大触摸区 */
  .sim-controls input:not([type="checkbox"]), .sim-controls select, .sim-controls textarea,
  .draw-form input, .draw-form select, .draw-form textarea,
  .admin-table-wrap input:not([type="checkbox"]), .admin-table-wrap select, .admin-table-wrap textarea,
  #loginView input {
    font-size: 16px; min-height: 44px; padding: 9px 10px;
    width: 100%; box-sizing: border-box;
  }
  .admin-table-wrap textarea, .sim-controls textarea, .draw-form textarea { min-height: 120px; }
  .inline-check input[type="checkbox"], .perm-box input[type="checkbox"] {
    width: 20px !important; height: 20px; min-height: 0;
  }
  .inline-check { display: flex; align-items: center; gap: 8px; min-height: 44px; }

  /* 预设号码：横排等宽格子，7 个框两行排完（原来一行一个数太长）*/
  .preset-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
  .preset-row .inline-label { display: none; }
  .preset-row .plus-sign { display: none; }
  .preset-row .preset-num {
    flex: 1 1 calc(25% - 8px); min-width: 0; width: auto;
    min-height: 46px; font-size: 16px; text-align: center; padding: 9px 4px;
  }
  .preset-row .preset-special { flex: 1 1 calc(25% - 8px); }
  .preset-row button { width: auto; flex: 1 1 calc(33.33% - 8px); min-height: 44px; }

  /* ③ 表格：横向滚动 + 首列冻结 */
  .admin-table-wrap { padding: 0 10px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .draw-table th:first-child, .draw-table td:first-child,
  .admin-table th:first-child, .admin-table td:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--panel);
  }
  .draw-table th:first-child, .admin-table th:first-child { background: var(--gold-light); }
  /* 操作列允许换行，免得几个按钮硬塞成一行 */
  .draw-table td:last-child, .admin-table td:last-child { white-space: normal; }
  .draw-table td button, .admin-table td button { padding: 8px 10px; min-height: 38px; }

  /* ④ 按钮：换行铺满，手指好按 */
  .adm-tab-bar button, .admin-bar button { flex: 1 1 auto; min-height: 44px; }
  .sim-controls button { min-height: 44px; padding: 0 14px; }

  /* ⑤ 编辑弹层：接近全屏 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal-box { width: 100%; max-width: 100%; max-height: 92vh; border-radius: 12px 12px 0 0; }
  .modal-preview { display: none; }
  .modal-body { max-height: 68vh; }
  .modal-foot button { flex: 1 1 auto; min-height: 44px; }
  .modal-toolbar .seg { min-height: 40px; padding: 6px 16px; }
  .pred-grid-table input { min-height: 42px; font-size: 15px; }
  .pred-grid-del button { width: 38px; height: 38px; }
  /* 权限勾选项很多 → 给个滚动区，别把页面撑到很长 */
  .perm-box { max-height: 240px; overflow: auto; }
}

@media (max-width: 480px) {
  .side-menu li { font-size: 11px; padding: 8px 2px; min-height: 38px; }
  .admin-bar { flex-direction: column; }
  .admin-bar button { width: 100%; }
  .block-title { padding: 9px 12px; font-size: 14px; }
  .sim-controls { padding: 12px; gap: 10px; }
  .draw-form { padding: 12px; gap: 12px; }
  .admin-table-wrap { padding: 0 8px 10px; }
  .admin-main .block { margin-bottom: 14px; }
  .pwd-tip, .ad-tip, .toolbar-hint { font-size: 12px; }
  .preset-row .preset-num, .preset-row .preset-special { flex: 1 1 calc(25% - 8px); }
}

/* ===== 号码属性对照表（统计表下方）===== */
.ref-block {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; margin: 12px 0; overflow: hidden;
}
.ref-head {
  background: linear-gradient(180deg, #e53935, #b71c1c); color: #ffe082;
  font-weight: 700; font-size: 15px; padding: 9px 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.ref-toggle { font-size: 12px; font-weight: 400; color: #fff3c4; }
.ref-body { padding: 10px; background: #fffdf3; }
.ref-tip { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.ref-group { margin-bottom: 8px; }
.ref-gname {
  font-size: 13px; font-weight: 700; color: #6d4a00; background: #fdf0c8;
  border: 1px solid #ecd28a; border-radius: 4px; padding: 3px 8px; margin-bottom: 4px;
}
.ref-gitems { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 2px 2px 4px; }
.ref-gitem {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; background: #fff; border: 1px dashed var(--border); border-radius: 4px; padding: 2px 4px;
}
.ref-gitem i { font-style: normal; font-weight: 700; color: var(--pred-red-dark); margin-right: 2px; }
.ref-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.ref-table th, .ref-table td { padding: 5px 6px; border: 1px solid var(--pred-line); text-align: center; }
.ref-table th { background: #c62828; color: #ffe082; font-weight: 700; position: sticky; left: auto; }
.ref-table tbody tr:nth-child(even) { background: var(--pred-stripe); }
.ref-table td:first-child { font-weight: 700; }
/* 号码取色：原样式作用域只在 .pred-table 内（.pred-table .num.red），对照表要单独补一份 */
.ref-block .num { font-weight: 900; letter-spacing: .5px; }
.ref-block .num.red { color: #d32f2f; }
.ref-block .num.blue { color: #1565c0; }
.ref-block .num.green { color: #1b7a3d; }
.ref-gitem b { margin-right: 1px; }

/* 对照表：天地肖 / 家野肖 / 琴棋书画 / 吴魏蜀 / 春夏秋冬 直接显示生肖（非号码）*/
.ref-gitem b.ref-z {
  font-weight: 700; color: #6d4a00; background: #fdf0c8; border: 1px solid #ecd28a;
  border-radius: 3px; padding: 1px 5px; margin-right: 3px; font-size: 12px;
}

/* 资料排序表（新澳下半场资料库）：手机端收窄，不用横滑也能看全整行 */
@media (max-width: 720px) {
  #sscOrderBody .ord-grip { padding: 8px 0; font-size: 15px; letter-spacing: -3px; }
  #sscOrderBody .ord-no { min-width: 0; font-size: 13px; }
  #sscOrderBody .ord-name { display: inline; word-break: break-all; white-space: normal; border: none; }
  #sscOrderBody td button { padding: 6px 5px; min-height: 36px; font-size: 13px; }
  .ord-kind { display: none; }
  #sscOrderBody .ord-key, #sscOrderBody .pred-lottery-tag { display: none; }
  #sscOrderBody.ord-sorting, #sscOrderBody.ord-sorting * { touch-action: none !important; }
}

/* ============================================================================
   目标站行式资料表排版（2026-10-10）
   目标站（2225789.top）的资料表没有绿表头，行内容「期号 内容 开:xx」直接排，
   且不同源站排版不同：有的左对齐（type/30.js 风格），有的居中（四季生肖风格），
   行间用细线 / 虚线分隔。pred-view.js 按分类键给无表头的外站表打
   .lines（左对齐）/ .rows-center（居中）两类；带 <thead> 的真表格维持原样式。
   本段放在红绿蓝整行着色之后，以便覆盖整行颜色：内容黑字、期号彩色轮换。
   ============================================================================ */
.pred-table.lines thead,
.pred-table.rows-center thead { display: none; }

/* ── 行式 A：左对齐（目标站 30.js：「283期七码：龙蛇流鸡鸡虎牛」） ── */
.pred-table.lines td {
  text-align: left; background: #fff; border: none;
  border-bottom: 1px solid #ececec; font-weight: 700; padding: 8px 10px;
}
.pred-table.lines tbody tr:nth-child(even) { background: #fff; }
.pred-table.lines td.c1 { white-space: nowrap; }
/* 内容黑字（覆盖红绿蓝整行着色），结果列红色靠后 */
.pred-block.ext .pred-table.lines tbody tr td,
.pred-block.gen .pred-table.lines tbody tr td { color: #111; }
.pred-block.ext .pred-table.lines td:last-child,
.pred-block.gen .pred-table.lines td:last-child,
.pred-table.rows-center td:last-child { color: #d32f2f; }
/* 期号蓝/绿/紫三色轮换（照目标站各源表的彩色期号） */
.pred-block.ext .pred-table.lines tbody tr:nth-child(3n+1) td.c1 { color: #00c; }
.pred-block.ext .pred-table.lines tbody tr:nth-child(3n+2) td.c1 { color: #090; }
.pred-block.ext .pred-table.lines tbody tr:nth-child(3n)   td.c1 { color: #90c; }
/* 自建（gen）行式：期号用该分类的强调色 */
.pred-block.gen .pred-table.lines tbody tr td.c1 { color: var(--pc, #00c); }

/* ── 行式 B：居中（目标站四季生肖/三头中转：「285期【猪兔龙】开：00准」） ── */
.pred-table.rows-center td {
  text-align: center; background: #fff; border: none;
  border-bottom: 1px dashed #e3e3e3; font-weight: 700; padding: 8px 10px;
}
.pred-table.rows-center tbody tr:nth-child(even) { background: #fff; }
.pred-table.rows-center td.c1 { color: #333; white-space: nowrap; }

/* ext/gen 行式的字重字号落回目标站档位（覆盖 ext/gen 默认的 20px/900 大字） */
.pred-block.ext .pred-table.lines td,
.pred-block.ext .pred-table.rows-center td,
.pred-block.gen .pred-table.lines td,
.pred-block.gen .pred-table.rows-center td {
  font-size: 17px; font-weight: 700; line-height: 1.7; padding: 8px 10px;
}

/* ── 自建资料（gen·行内格式）同样分两种排版（pred-view.js 按分类键打 lines-mode）──
   lines-mode = 目标站 30.js 行式：左对齐、期号蓝、内容黑字、命中红、实线分隔；
   未打类的保持居中（目标站四季生肖/代名肖风格）。 */
.pred-block.gen.lines-mode .pred-inline {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid #ececec;
}
.pred-block.gen.lines-mode .pred-inline:nth-child(even) { background: #fbfbfb; }
.pred-block.gen.lines-mode .pred-inline .pi-issue { color: #00c; }
.pred-block.gen.lines-mode .pred-inline .pi-body { color: #111; }
.pred-block.gen.lines-mode .pred-inline .pi-body span { color: #d32f2f; }

/* ── 后台预测资料：列表每个分类默认只显示最新一行（2026-10-11）── */
.pred-cat-body { max-height: 340px; overflow: auto; }
.pred-empty-inline { color: #999; font-size: 12px; }

/* 手机端：行式表字号与内边距随全局资料表断点走，但保持左右对齐设定 */
@media (max-width: 720px) {
  .pred-table.lines td, .pred-table.rows-center td { padding: 7px 8px; }
  .pred-block.ext .pred-table.lines td,
  .pred-block.ext .pred-table.rows-center td,
  .pred-block.gen .pred-table.lines td,
  .pred-block.gen .pred-table.rows-center td { font-size: 15px; padding: 7px 8px; }
}

/* ============================================================================
   目标站网格三列资料表（照 type/30.js「必中六肖」：每行一个蓝色边框小表）
   行结构：期号(左, 灰) | 内容(中, 蓝字·命中字黄底) | 结果(右, 红字)
   localPred.js 对 layout:'grid' 的分类输出 <table class="pred-grow">，
   pred-view.js 直接透传进 .pred-gen-wrap（不走 parseRows），本段负责其外观。
   与行内表（.pred-inline）形成「有表格 / 无表格」两种排版，丰富视觉。
   ============================================================================ */
.pred-grow { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0 0 6px; }
.pred-block .pred-grow td {
  border: 1px solid rgb(66, 146, 239); padding: 7px 6px; text-align: center;
  font-family: "微软雅黑", "Microsoft YaHei", var(--pred-font); line-height: 1.4;
  background: #fff; vertical-align: middle;
}
.pred-block .pred-grow .gr-i { width: 20%; color: #333; font-size: 16px; font-weight: 700; white-space: nowrap; }
.pred-block .pred-grow .gr-c { color: #0000FF; font-size: 18px; font-weight: 700; word-break: break-all; letter-spacing: .5px; }
/* 内容列按行轮换配色（蓝/绿/红/黑），打破整列单调蓝、丰富视觉；命中字仍走 .gr-hit 黄底黑字不受影响 */
.pred-gen-wrap .pred-grow:nth-of-type(4n+1) .gr-c { color: #0000FF; } /* 蓝 */
.pred-gen-wrap .pred-grow:nth-of-type(4n+2) .gr-c { color: #2e7d32; } /* 绿 */
.pred-gen-wrap .pred-grow:nth-of-type(4n+3) .gr-c { color: #c62828; } /* 红 */
.pred-gen-wrap .pred-grow:nth-of-type(4n+4) .gr-c { color: #222; }    /* 黑 */
.pred-block .pred-grow .gr-hit { background: rgb(255, 255, 0); color: #000; padding: 0 2px; border-radius: 2px; }
.pred-block .pred-grow .gr-o { width: 20%; color: #FF0000; font-size: 16px; font-weight: 800; white-space: nowrap; }
/* 手机端：网格表收窄内距、字号随全局断点回落 */
@media (max-width: 520px) {
  .pred-block .pred-grow td { padding: 5px 4px; }
  .pred-block .pred-grow .gr-i { font-size: 13px; }
  .pred-block .pred-grow .gr-c { font-size: 15px; }
  .pred-block .pred-grow .gr-o { font-size: 13px; }
}

/* ── 新澳下半场四肖四码卡片表（local_pred 自建，照参考图复刻：无网址/logo/注册码/舰长）── */
.xc-card {
  position: relative; margin: 0 0 14px; padding: 12px 14px 14px;
  background: linear-gradient(180deg, #fffef5, #fff3c4);
  border: 2px solid #e0a800; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  font-family: "微软雅黑", "Microsoft YaHei", var(--pred-font);
}
.xc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.xc-issue { font-weight: 800; font-size: 16px; color: #333; }
.xc-wait {
  font-size: 13px; font-weight: 800; color: #8a6d00;
  background: #fff3b0; border: 1px solid #e0a800; border-radius: 10px; padding: 1px 10px;
}
.xc-ok, .xc-bad { font-size: 13px; font-weight: 800; border-radius: 10px; padding: 1px 10px; color: #fff; }
.xc-ok { background: #2e9e4f; }
.xc-bad { background: #d33; }
.xc-open { color: #c62828; font-size: 14px; font-weight: 800; }
.xc-row { display: flex; align-items: baseline; line-height: 2; }
.xc-label { flex: 0 0 auto; color: #d33; font-weight: 800; font-size: 16px; }
.xc-val { color: #111; font-weight: 800; font-size: 17px; letter-spacing: 1px; }
.xc-val.xc-nums { word-break: keep-all; letter-spacing: 2px; line-height: 1.7; }
.xc-val.xc-pt {
  display: inline-flex; width: 32px; height: 32px; align-self: center;
  align-items: center; justify-content: center; border-radius: 50%;
  background: #ffd400; color: #000; font-size: 16px; letter-spacing: 0;
}
.xc-hit { background: #ffff00; color: #000; padding: 0 3px; border-radius: 2px; }
.xc-hit-c { outline: 3px solid #7cffb0; outline-offset: 2px; }

/* 版块底部：红色「四肖四码」横幅（独立随机生成，宽屏两期并排 → 窄屏单列） */
.xc-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.xc-banner {
  padding: 12px 8px 10px; text-align: center;
  border: 3px solid #ffd76e; border-radius: 10px;
  background: radial-gradient(circle at 50% 0%, #e02020, #a80000);
  box-shadow: inset 0 0 0 2px #7a0000;
}
.xc-bt {
  color: #ffe259; font-size: 20px; font-weight: 900; letter-spacing: 2px; margin-bottom: 10px;
  text-shadow: 0 0 6px rgba(255, 60, 0, .9), 0 1px 0 #7a0000;
}
.xc-zcs, .xc-nbs { display: flex; justify-content: center; gap: 12px; margin-bottom: 9px; }
.xc-zc {
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7ae, #ffd400 70%);
  color: #000; font-size: 24px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35), inset 0 -3px 6px rgba(0, 0, 0, .12);
}
.xc-nb {
  min-width: 52px; height: 52px; padding: 0 8px; border-radius: 6px;
  background: #2fbf3f; color: #d40000; font-size: 24px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35), inset 0 2px 3px rgba(255, 255, 255, .45);
}
.xc-bi {
  color: #ffe259; font-size: 17px; font-weight: 900; letter-spacing: 4px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.xc-bm { letter-spacing: 0; font-size: 13px; }
@media (max-width: 520px) {
  .xc-card { padding: 10px 10px 12px; }
  .xc-label { font-size: 14px; }
  .xc-val { font-size: 15px; }
}
@media (max-width: 640px) {
  .xc-foot { grid-template-columns: minmax(0, 1fr); }
}

/* 卡片网格：一个版块 4 期，按「十字格」2×2 排布（中间一竖一横交叉分隔），
   格子共用外框，卡片不再各自独立成块。窄屏退化为 1 列、只留横向分隔线。 */
.xc-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 2px solid #e0a800; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #fffef5, #fff3c4);
}
.xc-grid .xc-card {
  margin: 0; padding: 12px 14px 14px; border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
  border-right: 1px solid #e0a800;    /* 竖线：两列之间 */
  border-bottom: 1px solid #e0a800;   /* 横线：两行之间 */
}
.xc-grid .xc-card:nth-child(2n) { border-right: 0; }          /* 右列不画竖线 */
.xc-grid .xc-card:nth-last-child(-n+2) { border-bottom: 0; }  /* 末行不画横线 */
.xc-grid .xc-head { margin-bottom: 4px; }
.xc-grid .xc-issue { font-size: 16px; }
.xc-grid .xc-open { font-size: 13px; }
.xc-grid .xc-row { line-height: 1.95; }
.xc-grid .xc-label { font-size: 15px; }
.xc-grid .xc-val { font-size: 16px; letter-spacing: .5px; }
.xc-grid .xc-val.xc-nums { letter-spacing: 1.5px; line-height: 1.7; }
.xc-grid .xc-val.xc-pt { width: 30px; height: 30px; font-size: 15px; }
@media (max-width: 640px) {
  .xc-grid { grid-template-columns: minmax(0, 1fr); }
  .xc-grid .xc-card { border-right: 0; border-bottom: 1px solid #e0a800; }
  .xc-grid .xc-card:last-child { border-bottom: 0; }
  .xc-grid .xc-label { font-size: 14px; }
  .xc-grid .xc-val { font-size: 15px; }
}
