/* 奖表页样式 —— 一比一复刻【图规我要发】截图
 * 配色：号码绿 #2ba84a / 最新期红 #e62129 / 表格线淡粉 #f2caca */
:root {
  --green: #2cbb50;
  --green-dark: #28a745;
  --red: #e62129;
  --line: #eba8a8;        /* 组界竖线2px：期号|和值、和值|A、D|E（竞品930宽采样 #eba8a8） */
  --line-soft: #e6cfd0;   /* 组内细竖线1px：A|B、B|C、C|D、E|日期（竞品采样 #e6cfd0） */
  --line-row: #d8c7c7;    /* 普通横向行线1px（竞品采样 #d8c7c7） */
  --line-sep4: #f4a2a2;   /* 四期分割线2px（竞品采样核心 #f4a1a3，每 qi%4==0 行后） */
  --ink: #222;
  --gray: #999;
  --bg: #fff;
  --topbar-h: 46px;
  --tabbar-h: calc(58px + env(safe-area-inset-bottom));
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }

/* ================= 顶部栏（一比一：← 独立 | 大胶囊 | 外置▼ | 操作） ================= */
.topbar {
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center;
  padding-left: 4px; padding-right: 8px;
  background: #fff;
  position: relative; z-index: 30;
}
.tb-back {
  width: 38px; height: 44px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #111;
}
.tb-back svg { width: 20px; height: 20px; }
/* 大胶囊：灰底圆头容器，包住 放大镜 + 三个白胶囊按键 + ▼（竞品顶部口径）
 * 实测（竞品图 1152 系 / 基准行高 52CSS，换算比 k=1.2077）：
 *   胶囊高 37 图px → 30.6CSS ｜ 底色 #f5f6f8（采样 245,246,248）
 *   按键白胶囊高 27 图px → 22.4CSS ｜ 按键宽 95 图px → 78.7CSS（本机视口窄按比例收缩） */
.tb-capsule {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between;
  background: #f5f6f8; border-radius: 999px;
  height: 30.5px; margin: 0 4px;
  padding: 0 9px;
}
.tb-icon {
  width: 18px; height: 18px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #8a8a8a;
}
.tb-icon svg { width: 17px; height: 17px; }
/* 三个按键各自成一颗白胶囊（嵌在大胶囊内）；字号比旧版 15px 小一号 */
.tb-link {
  font-size: 13px; color: #1f1f1f; font-weight: 500;
  background: #fff; border-radius: 999px;
  padding: 0 9px; height: 22.4px; line-height: 22.4px;
  white-space: nowrap; flex: 0 1 auto; min-width: 0;
  display: flex; align-items: center;
}
.tb-link:active { background: #eceef0; }
/* ▼：跟在「排列五」白胶囊**内部**（老K 2026-10-14 三次修订：小胶囊文字后带 ▼，
 * 同时去掉原先挂在大胶囊右端的那个独立三角，避免两个下拉指示并存）。
 * 墨迹口径沿用竞品 ▼ 测量值 9图px ÷ 1.2077 = 7.5CSS ⇒ svg 框 18px（path 宽占 viewBox 10/24）。 */
.tb-tri {
  width: 18px; height: 18px; flex: none; margin-left: 2px;
  display: flex; align-items: center; justify-content: center;
  color: #8a8a8a;
}
.tb-tri svg { width: 18px; height: 18px; }
/* 彩种下拉：按键下方竖形弹出（口径同「操作」菜单：白底 + 10px 圆角 + 阴影） */
.game-mask { position: fixed; inset: 0; background: transparent; z-index: 94; }
.game-menu {
  position: fixed; min-width: 96px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 95; overflow: hidden; padding: 4px 0;
}
.game-item {
  width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; font-size: 14px; color: #333; min-height: 42px;
}
.game-item:active { background: #f5f5f5; }
.game-item.on { color: #fd3d44; font-weight: 700; }
/* 操作：上方三个灰点 + 下方黑粗体
 * 逐像素（同图 k=1.2077）：墨迹「操作」二字高 16图px → 13.2CSS（旧版 18px 偏大，老K 指出口径不符）；
 * 三个点 y31~35 图px → 直径 4.1CSS、横向跨度 20图px → 16.6CSS；
 * svg 改用扁平 viewBox(0 0 24 6) + 24×6 落地，使缩放比恰为 1 ⇒ 点直径 4.4CSS、跨度 20.4CSS（误差 <0.5）。 */
.tb-op {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; flex: none;
  padding: 2px 2px 2px 8px;
}
.tb-op-dots { width: 24px; height: 6px; color: #8a8a8a; }
.tb-op span { font-size: 13px; font-weight: 700; color: #111; line-height: 1.1; }

/* ================= 操作菜单 ================= */
.op-mask, .q-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.42);
  z-index: 90;
}
.op-mask { background: transparent; }
.op-menu {
  position: fixed;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 4px);
  right: 8px;
  width: 168px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 95; overflow: hidden;
  padding: 4px 0;
}
.op-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 15px; color: #333;
  min-height: 46px;
}
.op-item:active { background: #f5f5f5; }
.op-item svg { width: 20px; height: 20px; color: #666; flex: none; }
.op-item.hot { color: #e8a020; font-weight: 700; }
.op-item.hot svg { color: #e8a020; }

/* ================= 下拉刷新指示层（竞品四态） ================= */
.ptr {
  height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #fff;
  transition: height .2s ease;
}
.ptr.no-anim { transition: none; } /* 跟手拖动时关动画 */
.ptr-ico { width: 26px; height: 26px; color: #4a4a4a; flex: none; display: flex; align-items: center; justify-content: center; }
.ptr-ico svg { width: 100%; height: 100%; }
.ptr-ico.spin svg { animation: ptr-rot .9s linear infinite; }
@keyframes ptr-rot { to { transform: rotate(360deg); } }
.ptr-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ptr-txt b { font-size: 17px; font-weight: 600; color: #4a4a4a; line-height: 1.15; }
.ptr-txt i { font-style: normal; font-size: 11px; color: #a8a8a8; line-height: 1.1; }

/* ================= 回到底部：半透明半胶囊（右缘贴边） ================= */
.to-bottom {
  position: absolute;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 60px);
  right: 0;
  z-index: 15;
  display: flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, .38);
  color: #fff;
  border-radius: 20px 0 0 20px;
  padding: 9px 10px 9px 13px;
  font-size: 13px; line-height: 1;
  min-height: 36px;
}
.to-bottom svg { width: 15px; height: 15px; }
.to-bottom:active { background: rgba(0, 0, 0, .5); }

/* ================= 奖表表格 ================= */
.table-wrap {
  position: absolute;
  top: calc(var(--topbar-h) + env(safe-area-inset-top));
  bottom: calc(var(--tabbar-h) + 64px);
  left: 0; right: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

/* ---- 表头：三个圆角块（ sticky ），右下角实心灰三角角标 ---- */
.head-row {
  position: sticky; top: 0; z-index: 6;
  display: flex; gap: 2px; /* 缝隙调小（竞品三块几乎相贴） */
  background: #fff;
  /* 左右内边距与表格边框(左2右1)对齐：表头块右缘贴到表格右边框，无尾部留白 */
  padding: 3px 1px 4px 2px;
}
.h-cell {
  position: relative;
  border: 1px solid #dedede; border-radius: 8px;
  background: #fff;
  height: calc(40px * var(--fsk, 1)); /* 宽视口整体等比缩放（老K 2026-10-20） */
  display: flex; align-items: center;
  font-size: calc(15px * var(--fsk, 1)); font-weight: 600; color: #2c2c2c;
  overflow: hidden;
}
.h-cell.h-qisum { justify-content: center; }
.h-cell > span { flex: 1; text-align: center; }
/* 右下角角标（竞品折角在右下角；加深加大保证清晰） */
.h-cell .corner {
  position: absolute; right: 0; bottom: 0;
  width: 0; height: 0;
  border-bottom: calc(10px * var(--fsk, 1)) solid #c6c6c6;
  border-left: calc(10px * var(--fsk, 1)) solid transparent;
}

.award {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  border-left: 2px solid var(--line);
  border-right: 1px solid var(--line);
}
.award td {
  border-right: 1px solid var(--line-soft);   /* 组内细线 */
  border-bottom: 1px solid var(--line-row);   /* 普通横向行线 */
  text-align: center; vertical-align: middle;
  overflow: hidden;
}
.award td:last-child { border-right: none; }
/* 组界竖线（2px粉）：期号|和值、和值|A、D|E */
.award td.td-qi, .award td.td-sum, .award td.td-pos4 { border-right: 2px solid var(--line); }
/* 彩色模式：ABCD 组内竖线消失（竞品色块相贴），组界线保留 */
.award td.td-mode.td-pos { border-right-color: transparent; }
/* 四期分割线：每 qi%4==0 的行底 2px 粉线（竞品口径） */
.award tr.row-sep4 td { border-bottom: 2px solid var(--line-sep4); }

/* 行高：默认 52；宽触屏（折叠展开/平板）由 award.js syncRowH() 设 --row-h 跟随格宽 */
.award td { height: var(--row-h, 52px); background: #fff; }
.td-qi { font-size: calc(14px * var(--fsk, 1)); color: var(--green-dark); font-weight: 500; }
.td-sum { font-size: calc(14px * var(--fsk, 1)); color: var(--green); font-weight: 700; }
.td-num {
  font-size: calc(30px * var(--fsk, 1)); font-weight: 700; color: var(--green);
  font-family: "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0;
}
.td-date { font-size: calc(11px * var(--fsk, 1)); line-height: 1.35; }
.td-date .wk { display: block; color: var(--green); }
.td-date .md { display: block; color: #b5b5b5; }

/* 点号标记（竞品采样）：整格浅粉底 #ffdcdc + 红字 #fd4349（含彩色模式的大字小字） */
.award td.td-mark { background: #ffdcdc !important; color: #fd4349 !important; }
.award td.td-mark .cv, .award td.td-mark .cs { color: #fd4349 !important; }

/* 最新一期整行红 */
tr.row-latest .td-qi,
tr.row-latest .td-sum,
tr.row-latest .td-num { color: var(--red); }
tr.row-latest .td-date .wk { color: var(--red); }
tr.row-latest .td-date .md { color: #e88; }

/* 选中那期（从查询结果行点进来定位的那期，老K 2026-10-12 图二/图四）：
 * 整行浅粉底 #ffdcdc + 红字 #fd4349（竞品像素实测：底 rgb(255,220,220)、字 rgb(243,61,74)）；
 * 与「点号标记」同色族，故沿用同一组色值。彩色模式（012路等）单元格是内联样式，
 * 必须 !important 才压得住；四期分割线（row-sep4）在该行照常加粗显示（竞品图二 26268 即如此）。 */
tr.row-sel td { background: #ffdcdc !important; }
tr.row-sel .td-qi,
tr.row-sel .td-sum,
tr.row-sel .td-num,
tr.row-sel .td-date .wk { color: #fd4349 !important; }
tr.row-sel .td-date .md { color: #e88 !important; }
tr.row-sel .cv, tr.row-sel .cs,
tr.row-sel .bi-lbl, tr.row-sel .bi-v,
tr.row-sel .he-lbl, tr.row-sel .he-val { color: #fd4349 !important; }

/* 待开奖空期 */
tr.row-future .td-qi { color: #8fca9d; }

/* 表尾红色装饰条（截图底部渐变红条） */
/* ================= 底部奖表设置条 ================= */
.setbar-zone {
  position: absolute;
  bottom: calc(var(--tabbar-h) + 8px);
  left: 10px; right: 10px;
  display: flex; align-items: center; gap: 10px;
  z-index: 20;
}
.setbar {
  flex: 1; display: flex; align-items: center;
  background: #f7f7f7; border-radius: 10px;
  padding: 9px 12px; text-align: left;
  min-height: 52px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sb-main { flex: 1; display: flex; flex-direction: column; }
.sb-main b { font-size: 15px; color: var(--red); font-weight: 700; }
.sb-main em { font-style: normal; font-size: 11px; color: #aaa; margin-top: 2px; }
.sb-arrow { width: 15px; height: 15px; color: #c5c5c5; }
.setbar-reset {
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; color: #aaa; white-space: nowrap;
  padding: 8px 2px; min-height: 46px;
}
.setbar-reset svg { width: 15px; height: 15px; }

/* ================= 底部 Tab 栏 ================= */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--tabbar-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: #fff;
  border-top: 1px solid #f0f0f0;
  z-index: 25;
}
.tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: #777;
  min-height: 46px;
}
.tab-ico {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.16);
}
.tab-ico svg { width: 18px; height: 18px; }
.t-live   { background: linear-gradient(135deg, #ffd35c, #ff9a1f); }
.t-master { background: linear-gradient(135deg, #4fd6e8, #1e9fd8); }
.t-stat   { background: linear-gradient(135deg, #ff7a6b, #e62129); }
.t-strip  { background: linear-gradient(135deg, #ff9db8, #f1437a); }

/* ================= 查询方式弹窗 ================= */
.q-mask { display: flex; align-items: center; justify-content: center; padding: 0 34px; }
.q-card { width: 100%; max-width: 340px; }
.q-item {
  position: relative;
  width: 100%; display: flex; flex-direction: column; gap: 7px;
  background: #fff; border-radius: 12px;
  padding: 17px 40px 17px 18px; text-align: left;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.q-item .q-title { font-size: 17px; font-weight: 700; color: #222; }
.q-item .q-desc { font-size: 12px; color: #999; line-height: 1.55; }
.q-item .q-arrow {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px; color: #c8c8c8;
}
.q-item.hot { background: linear-gradient(180deg, #fff6df, #ffefc8); }
.q-item.hot .q-title { color: #e8a020; }
.q-item.hot .q-desc { color: #c9a35a; }
.q-item.hot .q-arrow { color: #e0b25f; }
.q-item:last-child { margin-bottom: 0; }

/* ================= 彩种胶囊条（弹窗内，老K 2026-10-14 订正版） =================
 * 老K 原话「保留胶囊彩种按键，底部的大四方形去掉」→ **不要白色圆角外框**，
 * 4 个胶囊按键直接裸排在弹窗顶部（遮罩半透明黑底上，灰底胶囊依然看得清）。
 * 作用是选择「进哪个彩种的号码查询页」，不是切奖表彩种。
 * 彩种变多时 flex-shrink:0 撑出宽度 → 横向滑动。 */
.q-games {
  display: flex; gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.q-games::-webkit-scrollbar { display: none; }
.q-game {
  /* flex-grow 让彩种少时等分铺满「通栏」（4 个彩种在 393 视口下每个 71px 宽、恰好不滚动）；
   * flex-shrink 0 保证彩种多时不被挤扁，而是撑出宽度横向滑动（老K 要的「过多可左右滑」） */
  flex: 1 0 auto; min-width: 64px; height: 36px;
  border-radius: 999px; background: #f2f2f3; color: #444;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.q-game.on { background: var(--green); color: #fff; }

/* ================= 模式单元格（单双/大小/质合/012路/大中小） =================
 * 底色/文字色由 JS 按色族内联（同色=浅深中 / 不同色=深浅中，竞品截图像素采样） */
.td-mode .cv { display: block; font-size: calc(24px * var(--fsk, 1)); line-height: 1.1; font-weight: 700; }
.td-mode .cs { display: block; font-size: calc(11px * var(--fsk, 1)); line-height: 1; margin-top: 1px; font-family: Arial, sans-serif; }
.td-etail .cv { display: block; font-size: calc(24px * var(--fsk, 1)); line-height: 1.1; font-weight: 700; }
.td-etail .cs { display: block; font-size: calc(11px * var(--fsk, 1)); line-height: 1; opacity: .7; margin-top: 1px; font-family: Arial, sans-serif; }

/* 尾列比值（竞品口径）：E 格两行——上行小绿字标签「ABCD 单双比」，下行比值 2:2 / 1:1:2 */
/* 注意：td 上不能 display:flex（会丢 table-cell 特性、colspan 塌陷），用内部 .bi-wrap 做弹性布局 */
.td-ratio .bi-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; }
.td-ratio .bi-lbl { font-size: calc(11px * var(--fsk, 1)); font-weight: 600; color: var(--green); line-height: 1.15; font-family: Arial, sans-serif; white-space: nowrap; }
.td-ratio .bi-v { font-size: calc(19px * var(--fsk, 1)); font-weight: 700; color: var(--green); line-height: 1.1; font-family: Arial, sans-serif; }
.td-ratio.r3 .bi-v { font-size: calc(15px * var(--fsk, 1)); }
/* 最新期整行红（覆盖绿） */
tr.row-latest .td-ratio .bi-lbl, tr.row-latest .td-ratio .bi-v { color: var(--red); }
/* 尾列表头的合分组标签（ABCD 合分，整块居中） */
.h-edate .h-he { font-size: calc(14px * var(--fsk, 1)); font-weight: 600; }

/* 尾列合分组：E+日期合并格内的子列（合分/重号/跨度 或 二数合/三数合） */
.td-he { padding: 0 !important; }
.he-wrap { display: flex; align-items: stretch; }
.he-sub {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-right: 1px solid var(--line-soft);
  padding: 3px 0;
}
.he-sub:last-child { border-right: none; }
.he-lbl { font-size: calc(11px * var(--fsk, 1)); color: var(--green); line-height: 1.3; }
.he-val {
  font-size: calc(16px * var(--fsk, 1)); font-weight: 700; color: var(--green); line-height: 1.25;
  font-family: "Arial Narrow", Arial, sans-serif;
}
/* 二/三数合：数字串最长6位，字号调小防溢出 */
.td-he.he-2 .he-val { font-size: calc(12px * var(--fsk, 1)); letter-spacing: .5px; }
tr.row-latest .he-lbl, tr.row-latest .he-val { color: var(--red); }

/* 隐藏 ABCD 列 */
.award.hide-abcd .td-pos, .award.hide-abcd .td-pos4 { display: none; }

/* ================= 奖表设置面板（底部上滑） ================= */
.set-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.15);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.set-mask.open { opacity: 1; pointer-events: auto; }
.set-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  background: #fff; border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.14);
  transform: translateY(105%);
  transition: transform .26s ease, height .2s ease;
  max-height: 82vh; /* 具体高度由 JS 按三页签内容最大值拟合（统一高度且无大留白） */
  display: flex; flex-direction: column;
  visibility: hidden;
}
.set-panel.open { transform: none; visibility: visible; }

.sp-head {
  position: relative; height: 46px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #f0f0f0;
}
.sp-title { font-size: 16px; font-weight: 700; color: #222; }
.sp-help-btn {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: #222;
}
.sp-help-btn svg { width: 17px; height: 17px; }
.sp-help-btn span { font-size: 11px; font-weight: 600; }
.sp-reset {
  position: absolute; right: 12px;
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; color: #aaa;
}
.sp-reset svg { width: 12px; height: 12px; }

.sp-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.sp-side {
  width: 76px; flex: none;
  background: #f5f6f8;
  display: flex; flex-direction: column;
}
.sp-tab {
  width: 100%; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 4px;
  font-size: 13px; color: #333;
  position: relative;
}
.sp-tab.active { background: #fff; color: #fd3d44; font-weight: 700; }
.sp-tab.active::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 2px; background: #fd3d44;
}
.sp-right { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.sp-content { flex: 1; padding: 14px 14px 14px; overflow-y: auto; }
.sp-sec { margin-bottom: 12px; }
.sp-sec > b { display: block; font-size: 14px; color: #333; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* 尾列 chips：四列网格，宽按钮占两列 */
.chips.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.chips.grid4 .chip { min-width: 0; width: 100%; }
.chips.grid4 .chip.sp-wide { grid-column: span 2; min-width: 0; }
.chip {
  min-width: 66px; padding: 6px 8px; /* 压低按钮高度，减少合分组滚动 */
  border: 1px solid #e3e3e3; border-radius: 8px;
  background: #fff;
  font-size: 13px; color: #888; text-align: center;
  display: flex; align-items: center; justify-content: center;
  line-height: 1.2;
  white-space: nowrap; /* 强制一行显示，防窄机换行变正方形 */
}
.chip.on { background: #ffedee; border-color: #fd3d44; color: #fd3d44; }
.chip.sp-wide { min-width: 158px; }
/* 长文案按钮（二三数合(保留重复)）：缩小字号+收紧字距，保证窄机也一行放下 */
.chips.grid4 .chip.sp-wide { font-size: 12px; padding-left: 2px; padding-right: 2px; letter-spacing: -0.5px; }

/* 尾列顶部：合分/比值 分段控件 */
.sp-seg {
  display: flex; width: 62%; margin: 2px auto 18px;
  background: #f5f6f8; border-radius: 10px; padding: 3px;
}
.sp-seg button {
  flex: 1; padding: 9px 0; border-radius: 8px;
  font-size: 15px; color: #333; text-align: center;
}
.sp-seg button.on { background: #ffedee; color: #fd3d44; font-weight: 600; }

.sp-colors { margin-top: 4px; text-align: center; }
.sp-radios { display: flex; justify-content: center; gap: 30px; margin: 8px 0 16px; }
.sp-radio {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: #666;
}
.sp-radio .dot {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid #ccc; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.sp-radio .dot svg { width: 11px; height: 11px; }
.sp-radio.on { color: #fd3d44; font-weight: 600; }
.sp-radio.on .dot { background: #fd3d44; border-color: #fd3d44; }
.sp-circles { display: flex; justify-content: space-evenly; margin: 10px 6px 4px; }
.sp-circle {
  width: 34px; height: 34px; border-radius: 50%; /* 调小号码球，减少合分组滚动 */
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* 尾列比值模式的粉色圈（红字粉底） */
.sp-circle.pink { background: #ffe4e5; color: #fd3d44; font-size: 15px; }
.sp-circle.pink.off { background: #f2f2f2; color: #c4c4c4; }
.sp-status { margin-top: 10px; font-size: 14px; font-weight: 600; color: #fd3d44; text-align: center; }
.sp-note { margin-top: 8px; font-size: 13px; color: #b5b5b5; text-align: center; }

.sp-foot {
  display: flex; justify-content: space-between;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  flex: none;
  background: #fff;
}
.sp-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 14px;
  border: 1px solid #159bff; border-radius: 8px;
  color: #159bff; font-size: 14px; background: #fff;
  text-align: center;
}
.sp-btn i { font-style: normal; color: #159bff; font-weight: 700; }

/* ================= Toast ================= */
.toast {
  position: fixed; left: 50%; bottom: 140px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 14px; padding: 9px 18px; border-radius: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
 * 多彩种（老K 2026-10-14 接入 七星彩 / 排列三 / 福彩3D）
 * 全部数字来自竞品三图逐像素实测（1152×2376 @DPR3，_scan4q.py 量墨迹：CSS 值 = 图值 ÷ 3）
 *   行高 50（三图一致）；排列五沿用已上线验收的 52，不动
 *   号码位：ink 21.3~22.0CSS ⇒ 字号沿用 30px（与排列五同源同一套）
 *   期号列两行      ：上行 ink 13.0~14.3 ⇒ 18px(排三/3D)·19px(七星)；下行 ink 8.0~9.3 ⇒ 10px
 *   七星彩 E F G    ：ink 14.7CSS ⇒ 20px 绿
 *   排三/3D 尾列    ：ink 13.0CSS ⇒ 13px 灰 #b2b2b2（实测 178,178,178）
 *   排三/3D 配色    ：号码 #242424（36,36,36）｜期号·日期 #7a7a7a（122,122,122）｜和值 #b2b2b2
 * body[data-game] 由 award.js 的 syncGameBtn() 写入，切彩种即时生效
 * ===================================================================== */

/* 行高：非排列五三彩种 50（排列五 52 保持不动）；宽触屏由 --row-h 统一接管 */
body[data-game="qxc"] .award td,
body[data-game="pl3"] .award td,
body[data-game="fc3d"] .award td { height: var(--row-h, 50px); }

/* 期号列两行堆叠（qiSub：七星彩 / 排列三 / 福彩3D；排列五的日期在尾列，保持单行） */
.td-qi-stack { line-height: 1.1; }
.td-qi-stack .qs-qi {
  display: block; font-weight: 600;
  font-family: "Arial Narrow", Arial, sans-serif; letter-spacing: 0;
}
.td-qi-stack .qs-sub { display: flex; justify-content: center; align-items: baseline; gap: 4px; }
.td-qi-stack .qs-md, .td-qi-stack .qs-wk { font-style: normal; font-weight: 500; }
body[data-game="qxc"] .qs-qi { font-size: calc(19px * var(--fsk, 1)); color: var(--green-dark); }
body[data-game="qxc"] .qs-sub { font-size: calc(10px * var(--fsk, 1)); color: #6c9b6c; }
body[data-game="pl3"] .qs-qi { font-size: calc(18px * var(--fsk, 1)); color: #7a7a7a; }
body[data-game="pl3"] .qs-sub { font-size: calc(10px * var(--fsk, 1)); color: #7a7a7a; }
/* ⚠ 福彩3D 期号是 **7 位**（2026273），比排列五/七星的 5 位宽两号：
 * 竞品实测 18px 在 393 视口下文字宽 70.1px > 期号列可用 69px → 最后一位被 overflow 裁掉。
 * 老K 2026-10-15 要求「调小，让单元格里能一次看到全部期号」→ 降为 **15px**。
 * ⚠ 字号是按**真机最坏情况**反推的，不是按本机：本机有 Arial Narrow（16px 时 62.3px 就够），
 *   但 Android/iOS 没这个字体、fallback 到系统 sans 会胖 11%（16px → 69.1px，对 69px 的列仍卡边）。
 *   15px 在 fallback 下 = 64.8px，留 ~4px 余量；Arial Narrow 下 = 58.4px。
 *   宽视口列宽等比放大（k 系数），15×k 同比放大不会溢出。**排列三仍是 5 位（50.1px），保持 18px 不动。** */
body[data-game="fc3d"] .qs-qi { font-size: calc(15px * var(--fsk, 1)); color: #7a7a7a; }
body[data-game="fc3d"] .qs-sub { font-size: calc(10px * var(--fsk, 1)); color: #7a7a7a; }

/* 尾列：七星彩 E F G 小号 */
.td-efg {
  font-size: calc(20px * var(--fsk, 1)); font-weight: 700; color: var(--green);
  font-family: "Arial Narrow", Arial, sans-serif;
}
/* 尾列：排列三 / 福彩3D 三列统计（类型 / 跨度 / 上期重复·试机号） */
body[data-game="pl3"] .td-stat,
body[data-game="fc3d"] .td-stat { font-size: calc(13px * var(--fsk, 1)); color: #b2b2b2; font-weight: 500; }
/* 排三 / 福彩3D 为「素表」：号码黑、和值浅灰 */
body[data-game="pl3"] .td-num,
body[data-game="fc3d"] .td-num { color: #242424; }
body[data-game="pl3"] .td-sum,
body[data-game="fc3d"] .td-sum { color: #b2b2b2; }

/* 表头：三列的尾列名（「上期/重复」换行）压到 13px，否则一行放不下 */
body[data-game="qxc"] .h-cell > span,
body[data-game="pl3"] .h-cell > span,
body[data-game="fc3d"] .h-cell > span { font-size: calc(13px * var(--fsk, 1)); line-height: 1.12; }
body[data-game="pl3"] .h-cell.h-abcd > span,
body[data-game="fc3d"] .h-cell.h-abcd > span { font-size: calc(15px * var(--fsk, 1)); }

/* 最新一期整行红 / 选中期整行红：新列类型同样适用 */
tr.row-latest .qs-qi, tr.row-latest .qs-md, tr.row-latest .qs-wk,
tr.row-latest .td-efg, tr.row-latest .td-stat { color: var(--red); }
tr.row-sel .qs-qi, tr.row-sel .qs-md, tr.row-sel .qs-wk,
tr.row-sel .td-efg, tr.row-sel .td-stat { color: #fd4349 !important; }

[hidden] { display: none !important; }

/* ================= 桌面限宽 480 已取消（老K 2026-10-20：电脑端也要自适应铺满） =================
 * 历史沿革：最初「560px+ 限宽480居中」→ 2026-10-18 折叠屏展开误伤，加 hover+pointer:fine
 * 只限真鼠标 → 2026-10-20 老K 要求电脑端也铺满，整条删除。
 * 现在任何环境一律全宽，行高由 award.js syncRowH() 在 ≥560 视口跟随格宽（160 封顶）。 */
