  * { box-sizing: border-box; margin: 0; padding: 0; }
  /* 字体同步（2026-09-24）：表单控件默认**不继承**正文字体（浏览器怪癖）→ 输入框/按钮/录入键会跟正文不是一套；显式继承（正文栈见下面 body）。 */
  button, .btn, input, select { font-family: inherit; }
  /* 2026-08-25 排版学习微信：完整系统字体链（苹方→雅黑UI→雅黑），正文 15px、行高 1.5 */
  /* 字体对齐微信（2026-09-24）：微信 PC 版正文 = WeChat Sans Std，缺字体时回退"微软雅黑 UI"——
     所以栈就照这个顺序写；后面保留原有回退（苹方/Hiragino/雅黑），再补 Noto Sans SC。
     目的：横杠（—/–）在页面上的样子尽量等于微信里的样子（人在微信里怎么读的，页面就怎么读）。 */
  body { font-family: "WeChat Sans Std", -apple-system, BlinkMacSystemFont, "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif; background: #f2f4f8; color: #1f2937; font-size: 15px; line-height: 1.5; overscroll-behavior: none; }

  /* 手机端适配已于 2026-09-23 整体撤出（用户定调：手机端暂时不开发；以后要做也是 App 形态，
     不是手机浏览器界面）。撤出的东西原样留档在 回收站/手机端适配-撤出-20260923/。 */
  .wrap { max-width: 980px; margin: 0 auto; padding: 12px 16px 80px; }
  header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0 14px; }
  header h1 { font-size: 18px; }
  header .ver { color: #999; font-size: 12px; }

  /* 步骤条（顶栏导航：底色统一；未解锁灰字、可点/当前页深字，当前页仅加粗不另设色；窄屏自动换行保证七个入口全部可见） */
  .steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
  .step { flex: 1 1 auto; white-space: nowrap; text-align: center; padding: 9px 2px; background: #e9edf3; border: none; border-radius: 10px; color: #9aa4b2; font-family: inherit; font-size: 14px; cursor: pointer; transition: background .12s; box-shadow: inset 0 0 0 1px #e2e7ef; }
  .step.done { color: #334155; cursor: pointer; }
  .step:active { background: #d6dde6; }
  .step.step-ok { color: #16a34a !important; font-weight: 600; }
  .step.active { color: #1e293b; font-weight: 600; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.10), inset 0 0 0 1px #e2e7ef; }

  .card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.05); border: 1px solid #edf0f4; }
  .card h2 { font-size: 16px; margin-bottom: 12px; }   /* 区块标题 16px，微信卡片标题档 */
  .hidden { display: none !important; }
  /* 启动失败提示（2026-10-20）：脚本没跑起来的兜底，必须压过登录层 */
  .boot-fail { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center;
    justify-content: center; padding: 24px; background: rgba(15,23,42,.72); }
  .boot-fail-card { width: min(460px, calc(100vw - 40px)); padding: 22px 24px; border-radius: 16px;
    background: #fff; color: #0f172a; font-size: 14px; line-height: 1.7;
    box-shadow: 0 24px 70px rgba(2,6,23,.35); }
  .boot-fail-card b { font-size: 16px; }
  .boot-fail-card p { margin: 10px 0 0; color: #475569; }
  .boot-fail-card button { margin-top: 16px; height: 40px; padding: 0 18px; border: 0;
    border-radius: 10px; background: #2563eb; color: #fff; font-size: 14px; cursor: pointer; }
  /* 点两下确认的武装态（JS 用 armOnce 切类，样式统一在这，不再内联） */
  .armed-danger { background: #dc2626 !important; color: #fff !important; }
  .armed-text { color: #dc2626 !important; }
  /* 轻提示 toast（原 JS cssText 内联，2026-08-17 迁入） */
  .toast-box { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
  .toast-item { background: #c0392b; color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.25); opacity: 0; transition: opacity .2s; max-width: 86vw; }
  .toast-item.show { opacity: 1; }
  /* 拖拽高亮 / OCR 缩略图（原 JS 内联样式迁入） */
  #inputArea.drag-over { border-color: #2563eb; }
  .thumb-wrap { display: inline-flex; gap: 6px; align-items: flex-start; position: relative; }
  .thumb-img { height: 64px; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
  /* 贴图/审核参照图：适当大小、看清号码即可（2026-09-20 用户定调；
     同日去掉"点击放大"——图本身够大，不用再点开） */
  .shot-wrap { margin: 6px 0 10px; }
  .shot-title { font-size: 12px; color: #888; margin-bottom: 4px; }
  .shot-img { max-width: 100%; max-height: 38vh; height: auto; border: 1px solid #ddd;
              border-radius: 8px; background: #fff; display: block; }
  .thumb-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; line-height: 18px; text-align: center; background: #dc2626; color: #fff; border-radius: 50%; font-size: 11px; cursor: pointer; z-index: 2; }
  /* 录入器底排/键盘列数（原 JS gridTemplateColumns 内联迁入；带 ID 前缀压过基础 3 列规则） */
  #calcDigits.cols-4, #edDigits.cols-4 { grid-template-columns: repeat(4, 1fr); }
  #calcActions.cols-1, #edActions.cols-1 { grid-template-columns: repeat(1, 1fr); }
  #calcActions.cols-2, #edActions.cols-2 { grid-template-columns: repeat(2, 1fr); }
  #calcActions.cols-3, #edActions.cols-3 { grid-template-columns: repeat(3, 1fr); }
  #calcActions.cols-4, #edActions.cols-4 { grid-template-columns: repeat(4, 1fr); }
  #calcActions.cols-5, #edActions.cols-5 { grid-template-columns: repeat(5, 1fr); }
  /* 盈亏汇总三色（原 JS style.color 内联迁入） */
  .net-win { color: #16a34a; }
  .net-lose { color: #dc2626; }

  textarea { width: 100%; min-height: 180px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; font-size: 15px; font-family: inherit; resize: vertical; transition: border-color .15s, box-shadow .15s; background: #fbfcfe; }   /* 输入区跟随正文 15px，贴近微信输入手感 */
  textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #2563eb22; background: #fff; }
  #inputArea { border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfcfe; overflow: hidden; display: flex; flex-direction: column; height: 186px; }   /* 固定高度：贴图不撑大输入框，图片进原有空间（2026-08-21 用户定调） */
  #inputArea textarea { border: none; box-shadow: none; background: transparent; flex: 1; min-height: 0; resize: none; }
  #inputArea textarea:focus { box-shadow: none; background: transparent; }
  /* 2026-09-20：待识别原图移出输入框（原来 #imgPreview 在框内 186px 里，大图会被裁）。
     现在挂在 #shotBox（框下方），尺寸按 .shot-img（38vh），能看清号码。 */
  #shotBox { padding: 0 2px 6px; }
  #shotBox .thumb-wrap { display: inline-flex; }

  .btn { display: inline-block; border: none; border-radius: 10px; padding: 9px 18px; font-size: 14px; cursor: pointer; background: #2563eb; color: #fff; transition: transform .05s, box-shadow .15s; box-shadow: 0 1px 2px rgba(15,23,42,.08); }
  .btn:active { transform: scale(.97); }
  .btn:disabled { background: #b6c2d9; cursor: not-allowed; box-shadow: none; pointer-events: none; }
  .btn.calc-act:disabled, .btn.calc-ok:disabled { background: #eef1f5; color: #2563eb; }   /* 每注/✓ 不足不禁灰，保持原样只是按不动（2026-08-22 用户定调） */
  .btn.ghost.calc-act:disabled { background: #eef1f5; color: #334155; }
  .btn.ghost { background: #eef1f5; color: #334155; box-shadow: none; }
  .btn.small { padding: 4px 10px; font-size: 13px; }
  .toolbar { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }


  .note { color: #888; font-size: 13px; margin-top: 8px; }
  .status-line { margin-top: 10px; font-size: 14px; color: #555; min-height: 20px; }
  .status-line.err { color: #c0392b; }

  /* 存疑清单 */
  .doubts { background: #fff8e6; border: 1px solid #f0d68a; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
  .doubts h3 { color: #b45309; font-size: 15px; margin-bottom: 8px; }
  /* 弹层比例：功能按键收紧，要确认的信息（预览/行清单）放大 */
  /* 弹层比例：信息大、按键够手指点（面向手机操作的尺寸） */
  #calcOverlay button:not(.dkey):not(.fkey) { padding-top: 9px !important; padding-bottom: 9px !important; min-height: 38px; }   /* 键盘键(dkey/fkey)排除：保持自身尺寸，注释不溢出（2026-08-30 用户定调） */
  #edPad button { font-size: 14px !important; }
  #edDigits button { font-size: 17px !important; }
  #edPreview { font-size: 17px; padding: 8px; min-height: 20px; }   /* 录入预览 17px，对齐微信聊天正文阅读感 */
  #edPanel .csec { user-select: none; }
  #edHint { font-size: 13px !important; }
  #edRows > div { font-size: 15px !important; padding: 7px 0 !important; }
  #edRows { max-height: 36vh; overflow-y: auto; }
  #calcRows { max-height: 30vh; overflow-y: auto; }
  #edPanel .toolbar { display: flex; gap: 6px; }
  #edPanel .toolbar .btn { flex: 1; font-size: 13px !important; padding-left: 2px !important; padding-right: 2px !important; white-space: nowrap; }

  /* 弹层基础样式（原内联样式搬进样式表——内联样式会压过媒体查询，手机端布局曾因此失效） */
  #calcOverlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 9000; overflow: auto; padding: 24px 12px; }
  #calcOverlayInner { max-width: min(960px, 94vw); margin: 0 auto; position: relative; width: 100%; }
  .ed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 15px; font-weight: 600; color: #0f172a; }
  .ed-head .ed-head-title { white-space: nowrap; }
  .ed-head .ed-head-actions { display: flex; gap: 8px; }
  .ed-head button { padding: 5px 16px; font-size: 13px; }
  #calcOverlayRaw { font-size: 14px; font-weight: 400; line-height: 1.7; padding: 8px 12px 8px 2px; margin-bottom: 8px; color: #0f172a; white-space: pre-wrap; overflow-wrap: break-word; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; max-height: 28vh; overflow-y: auto; }   /* 原文区：限高内滚；2026-09-24"改内容行不改框"+"左内边距 12→2px，让原文左边线与卡片一致（用户：'为什么跟外面的信息不是对齐的，外面的没有前面那个空格'）" */
  #edPanel { border: 1px solid #dbe2ea; border-radius: 10px; padding: 14px; background: #fbfcfe; }

  /* 弹层修改：桌面端舒适化——居中白卡片、加宽、键位按鼠标调（2026-08-22 用户定调） */
  @media (min-width: 900px) {
    #calcOverlay { display: block; padding: 28px 24px; }   /* 弹层不再限高：内容多高就多高，超高时由屏幕边缘滚动（overlay overflow:auto），框内无滚动条 */
    #calcOverlayInner { margin: 0 auto; max-width: min(960px, 94vw); background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(15,23,42,.28); padding: 18px 20px 10px; max-height: none; overflow: visible; }   /* 修改弹窗大尺寸为准 */
  #yearMask .sheet { width: min(960px, 94vw); }   /* 换年对齐修改弹窗尺寸（2026-09-23；账本/赔率设置 2026-10-19 各自改成按内容的卡片，登录/服务/卡密各自用小卡 2026-10-19） */
    #calcOverlayRaw { margin-bottom: 12px; font-size: 16px; max-height: none; overflow: visible; }   /* 长原文完整展开，不出现内嵌滚动条；滚动交给弹层整体 */
    #edPanel { padding: 16px; }
    #edRows { max-height: none; overflow: visible; }   /* 行清单完整展开，不出现内嵌滚动条 */
    #calcOverlay button:not(.dkey):not(.fkey) { padding-top: 8px !important; padding-bottom: 8px !important; min-height: 34px; }
    #edDigits button { font-size: 18px !important; }
    #edPad button { font-size: 15px !important; }
  }
  .doubts li { margin: 5px 0 5px 18px; font-size: 14px; }
  .fixes { background: #eef7ee; border: 1px solid #bfe0bf; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: #2c7a2c; }
  .retry { color: #aaa; font-size: 13px; margin-bottom: 10px; }
  .retry summary { cursor: pointer; }

  /* 审核注单 */
  .bet { border: 1px solid #e8ecf1; border-radius: 12px; margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
  .bet-head { background: #f8fafc; padding: 8px 12px; font-size: 13px; color: #666; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f1f5f9; }
  .bet-head .raw { flex: 1; white-space: pre-wrap; word-break: break-all; }
  table.items { width: 100%; border-collapse: collapse; }
  table.items th, table.items td { padding: 6px 8px; font-size: 14px; border-top: 1px solid #f0f0f0; text-align: left; }
  table.items th { color: #999; font-weight: normal; font-size: 13px; border-top: none; }
  table.items input, table.items select { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; font-size: 14px; background: transparent; }
  table.items input:focus, table.items select:focus { border-color: #2563eb; background: #fff; outline: none; }
  table.items input.amount { width: 70px; }
  td.del { width: 34px; text-align: center; color: #ccc; cursor: pointer; }

  /* 报表 */
  pre.report { white-space: pre-wrap; font-family: "Consolas", "Microsoft YaHei", monospace; font-size: 14px; line-height: 1.6; background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px; padding: 14px; overflow-x: auto; }
  .opening-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
  .opening-row input { width: 70px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 8px; font-size: 14px; }
  .tag { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 2px 8px; font-size: 13px; }

  /* 手动录入独立卡片（2026-09-02 基础改造）：panelManual 由 JS .hidden 整卡切换，不再与 panel1 互藏 */
  /* 底部状态栏 */
  .statusbar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(17,24,39,.94); color: #d1d5db; padding: 8px 16px; font-size: 13px; display: flex; gap: 22px; justify-content: center; }
  .statusbar b { color: #fff; }
  .statusbar .warn { color: #fbbf24; }
  .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #2563eb33; border-top-color: #2563eb; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
  @keyframes sp { to { transform: rotate(360deg); } }

  /* 录入计算器 */
  .chip { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 4px 8px; font-size: 14px; margin: 0 4px 4px 0; }
  .chip b { cursor: pointer; color: #6366f1; }
  .csec { font-size: 11px; color: #aaa; margin: 5px 0 3px; }   /* 标题能看清就行，空间让给操作键 */

  /* 数字键盘：瘦圆角键（仿手机输入法按键），压低高度挤空间；淡描边+浅底影防白键隐形 */
  .dkey { width: 94%; height: 30px; border-radius: 10px !important; padding: 0 !important; margin: 1px auto; font-size: 15px !important; line-height: 1; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
  .fkey { width: 94%; height: 30px; border-radius: 10px !important; padding: 0 !important; margin: 1px auto; font-size: 13px !important; line-height: 1; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.06); }

  /* 键盘区：桌面普通文档流；手机上整页铺位——信息展示框弹性撑满中部自滚动，键盘钉底部 */
  .calc-kbd { background: #fbfcfe; }
  #calcInfo { max-height: 32vh; overflow-y: auto; }
  /* ── 录入器渲染类（calc_render.js，样式从内联迁出）── */
  .calc-prev { display: flex; align-items: center; gap: 6px; }
  .calc-prev-txt { flex: 1; word-break: break-all; line-height: 1.35; }
  .calc-tab { padding: 4px 8px; font-size: 13px; flex: none; }
  .btn.calc-tab-on { background: #eef1f5; color: #2563eb; font-weight: 600; }   /* 选中态只变字色，不要背景一大片（2026-08-22 用户定调） */
  .btn.ghost.calc-pf { border: 1px solid #bfdbfe; background: #fff; color: #94a3b8; }   /* 平台键（澳/港）上移顶排：未选统一灰字（2026-08-28 用户定调） */
  .btn.ghost.calc-pf.pf-am.calc-tab-on { color: #2563eb; font-weight: 600; }   /* 选中：澳蓝加粗，不要背景一片 */
  .btn.ghost.calc-pf.pf-hk.calc-tab-on { color: #b91c1c; font-weight: 600; }   /* 选中：港红加粗（与全应用港字红一致） */
  .btn.ghost.calc-pf.pf-old.calc-tab-on { color: #a16207; font-weight: 600; }   /* 选中：旧澳门琥珀色 */
  #calcDigits .fkey-excl, #edDigits .fkey-excl { grid-column: 4; grid-row: 1; }   /* A 类右列：减（排除键） */
  #calcDigits .fkey-merge, #edDigits .fkey-merge { grid-column: 4; grid-row: 2; }   /* ∩交集 */
  #calcDigits .fkey-range, #edDigits .fkey-range { grid-column: 4; grid-row: 3; }   /* 到（号码区间），三键同高 */
  .btn.ghost.calc-fold { padding: 5px 10px; font-size: 13px; flex: none; border-radius: 6px; background: #fff; color: #666; }
  .btn.ghost.calc-fold.calc-fold-open { color: #2563eb; font-weight: 600; }
  .calc-act { padding: 7px 4px; font-size: 14px; }
  .btn.ghost.calc-act-on { color: #2563eb; font-weight: 600; }   /* 各/包/每注 选中：只蓝字加粗（2026-08-22 用户定调） */
  .btn.calc-ok, .btn.calc-act:not(.ghost) { background: #eef1f5; color: #2563eb; font-weight: 600; }   /* ✓ 键：蓝字灰底，不整块蓝 */
  .calc-ok { padding: 7px; font-size: 15px; }
  .calc-next { padding: 7px; font-size: 14px; }
  .calc-next-slim { padding: 7px 4px; font-size: 14px; }
  .btn.ghost.dkey, .btn.ghost.fkey { background: #fff; }
  .btn.ghost.dkey.dkey-del { color: #b91c1c; }   /* ⌫ 只红字，不要红底 */
  .btn.ghost.dkey.dkey-wide { grid-column: span 2; width: 97%; }
  .btn.ghost.dkey.kbd-on, .btn.ghost.fkey.kbd-on { color: #2563eb; font-weight: 600; }
  .btn.ghost.fkey.kbd-danger { color: #2563eb; font-weight: 600; }   /* 减键选中：只蓝字（2026-08-22 用户定调） */
  .kbd-sub { display: block; font-size: 11px; color: #94a3b8; font-weight: 400; line-height: 1.1; }
  .pad-grid { display: grid; gap: 4px; }
  .pad-grid.mt { margin-top: 4px; }
  .pad-flex { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
  .pad-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .pad-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .pad-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .pad-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
  .pad-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
  .pad-grid.cols-7 { grid-template-columns: repeat(7, 1fr); }
  .btn.ghost.pad-zod { padding: 10px 4px; font-size: 15px; background: #fff; }
  .btn.ghost.pad-zod.pad-zod-on { color: #2563eb; font-weight: 600; }
  .btn.ghost.pad-sub { padding: 4px 1px; font-size: 12px; }
  .btn.ghost.pad-sub.pad-sub-on { color: #2563eb; font-weight: 600; }   /* 子玩法选中：去掉浅蓝底，只蓝字 */
  .btn.ghost.pad-cat { padding: 9px 4px; font-size: 16px; background: #fff; }
  .pad-cat-f { flex: 1 1 42px; }
  .btn.ghost.pad-tk { padding: 9px 4px; font-size: 16px; background: #fff; }   /* 与 pad-cat 同规格：合单/合双 不再把五行面板撑高（2026-08-29 用户定调） */
  .grow { flex: 1; }
  .calc-row .grow { min-width: 0; word-break: break-all; line-height: 1.4; }   /* 长内容（号码+斜杠无自然断行点）在行内换行，不外溢弹层 */
  .row-edit-link { color: #2563eb; cursor: pointer; }
  .row-edit-link-nowrap { color: #2563eb; cursor: pointer; white-space: nowrap; }
  .row-del { color: #ccc; cursor: pointer; }
  .calc-row { font-size: 13px; padding: 5px 8px; display: flex; gap: 10px; align-items: center; border-top: 1px solid #eef2f6; }
  .row-editing { background: #fff7ed; border-left: 3px solid #f59e0b; }
  .badge-editing { font-size: 11px; color: #b45309; background: #fed7aa; border-radius: 4px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; }
  .rows-empty { font-size: 14px; color: #aaa; text-align: center; }
  .panel-head { display: flex; justify-content: space-between; align-items: center; }   /* 「录入」在标题行右上角（2026-08-22 用户定调） */
  .calc-done-home { padding: 5px 16px; font-size: 13px; flex-shrink: 0; }

  /* ── 审核/已录入列表（process.js 渲染类）── */
  .bet-flat { border: none; border-bottom: 1px solid #e2e8f0; border-radius: 0; margin-bottom: 0; padding: 5px 2px; }
  .bet-flat.bet-empty { background: #fffdf5; }
  .bet-flat.bet-doubt { background: #fef2f2; border-left: 3px solid #dc2626; }   /* 存疑注卡高亮（2026-08-18 用户定调） */
  /* 守恒/顺序没过：卡上标红说清是哪一类（吞号/多号/没排序）——2026-09-26 用户定调：
     "守恒守序有问题，就直接在对应的字段上标红就好了"（不再铺"自动打回记录"那一块） */
  .bet-flat.bet-warn { background: #fff7f7; border-left: 3px solid #dc2626; }
  /* 2026-09-26 用户定调：不整栏刷红，只把**那一个字**标红 ——
     被吞的标在原文侧、多出来的标在解析侧（顺序不标）。 */
  .mark-hit { color: #dc2626; font-weight: 700; }
  /* 待审核卡片：**原文（左）/ 解析（右）左右对照**（2026-09-24 用户定调："改成左右，这样原文能完整展示，
     避免拉成横条把平台信息忽略掉——原文最能表达原来的语义"）。注号/来源/存疑标签/✎修改 仍在左栏顶部；
     窗口窄时 flex-wrap 自动回落成上下（不写媒体查询）。 */
  /* 卡片头一行（注号/标签…✎修改），下面才是"原文｜解析"两栏 —— 头一行横跨整卡，两栏从同一水平线起（2026-09-24 修：
     上一版把标签、原文、修改键全塞进左栏，视觉很乱）。 */
  .bet-head2 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; color: #334155; line-height: 1.5; }
  .bet-head2 .tags { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; min-width: 0; }
  .bet-head2 .rv-edit { flex: none; }
  .bet-body { display: flex; align-items: flex-start; gap: 2px; margin-top: 3px; }   /* 2026-09-24 用户："左右可以再靠近一些"（12→6→2px）——标准买法行对行更好找 */
  .bet-body.has-hdr .bet-items { margin-top: 18px; }   /* 左栏原文头顶有灰显消息头时，右栏天然下拉一行，让原文正文首行与解析首行齐平（2026-09-24 用户定调） */
  .bet-raw { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; font-size: 14px; color: #334155; line-height: 1.5; min-width: 0; }   /* 兼容池子视图的旧结构 */
  .bet-raw .tag { flex-shrink: 0; }
  .bet-raw-text { flex: 3 1 0; min-width: 0; white-space: pre-wrap; overflow-wrap: break-word; max-width: 18em; font-size: 13px; color: #334155; line-height: 1.7; }   /* 左栏：原文按原始行结构完整显示；2026-09-24 字号 14→13px、行高 1.7，与右栏 chip 同号（用户："原文的体跟解析差不多会不会比较好"） */
  .raw-hdr { font-size: 11px; color: #9ca3af; }   /* 微信头部（@昵称/时间戳）小字灰显 */
  .tag-gap { margin-right: 4px; }
  .tag-note { background: transparent; color: #9ca3af; font-size: 11px; padding: 0 2px 0 0; }   /* 第 N 注序号标签：与头部同档小字灰显 */
  .bet-items { flex: 2 1 0; line-height: 1.6; min-width: 0; border-left: 1px solid #f1f5f9; padding-left: 2px; }   /* 右栏：解析（chips）；与左栏同一起点，左侧一条细分隔线（内边距 10→6→2px） */
  .dash { color: #94a3b8; font-weight: 400; }   /* 长横杠 —/– 标浅色：一眼看出是符号不是汉字"一"（只改显示，DOM 文本不变） */
  .rv-empty { padding: 4px 0; font-size: 14px; color: #b45309; cursor: pointer; }
  .rv-chip { display: block; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1px 8px; margin: 0 0 3px 0; font-size: 12px; white-space: normal; word-break: break-all; line-height: 1.7; cursor: pointer; }   /* 2026-09-24 用户："参考修改的做法，一条条解析下来，反而更清楚"——每行一条（block 堆叠），不再横排 */
  .rv-chip-bad { background: #fef2f2; border-color: #fca5a5; }   /* 引擎算不出的行：红底红框，一眼看到（2026-09-04） */
  .tag-bad { background: #fee2e2; color: #b91c1c; }
  .pf-hk { color: #b91c1c; font-weight: 600; }
  .pf-am { color: #1d4ed8; font-weight: 600; }
  .pf-old { color: #a16207; font-weight: 600; }
  .pf-mix { color: #334155; font-weight: 600; }
  .tag-play { background: #ede9fe; color: #6d28d9; margin: 0 2px; }
  .rv-amt { color: #64748b; }
  .rv-price { display: inline; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 800; letter-spacing: .02em; }   /* 审核时只靠文字颜色和字重凸显各/包（2026-10-29 用户定调） */
  .rv-price-each { color: #c2410c; }
  .rv-price-package { color: #047857; }
  .rv-edit-row { display: none; }   /* 旧结构不再单独占行 */
  .rv-edit { color: #2563eb; cursor: pointer; font-size: 13px; flex-shrink: 0; white-space: nowrap; }
  .settle-detail-title { font-size: 14px; font-weight: 700; color: #334155; margin: 14px 0 8px; }
  .settle-detail-stake { font-size: 11px; color: #334155; margin-top: 6px; line-height: 1.6; }
  .pool-group { border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; background: #fbfcfe; }
  .pool-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
  .pool-group-title { font-size: 14px; font-weight: 600; color: #334155; }
  .btn.ghost.small.pool-group-clear { margin-left: auto; padding: 3px 10px; font-size: 12px; }
  .pool-empty { font-size: 14px; color: #aaa; text-align: center; padding: 20px 0; }

  /* ── 结算页（settle.js 渲染类）── */
  .ball-wrap { display: inline-flex; flex-direction: column; align-items: center; margin: 2px; }
  .ball-num { width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 50%; font-weight: 700; font-size: 14px; color: #fff; position: relative; }
  .ball-w红 { background: #dc2626; }
  .ball-w蓝 { background: #2563eb; }
  .ball-w绿 { background: #16a34a; }
  .ball-sp-tag { position: absolute; top: -9px; right: -9px; background: #0f172a; color: #fff; font-size: 10px; font-style: normal; border-radius: 50%; width: 14px; height: 14px; line-height: 14px; text-align: center; }   /* 特码小标：跟球离开一点身位，不贴边 */
  .ball-zod { font-size: 12px; color: #666; }
  .opening-pending { color: #b45309; font-size: 13px; padding: 8px 0; }
  .opening-balls { display: flex; align-items: center; flex-wrap: wrap; }
  .tag-ok { background: #dcfce7; color: #15803d; }
  .tag-no { background: #fee2e2; color: #b91c1c; }
  .tag-manual { background: #fef3c7; color: #b45309; }
  .tag-edit { background: #fef3c7; color: #b45309; }   /* 案例收集：已改·待收集 */
  .tag-doubt { background: #fee2e2; color: #b91c1c; }   /* 存疑徽标（2026-08-18 用户定调） */
  .tag-img { background: #dbeafe; color: #1d4ed8; }   /* 录入来源：图片（2026-08-20 用户定调） */
  .opening-card { flex: 1; min-width: 280px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; }
  .opening-card.gray { opacity: .45; filter: grayscale(.6); }
  .opening-card-title { font-size: 13px; color: #555; margin-bottom: 6px; }
  .opening-meta { color: #999; }
  .manual-row { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
  .manual-row-key { width: 36px; font-size: 13px; }
  .opening-input { width: 44px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 4px; text-align: center; }
  .opening-input.special { border-color: #dc2626; }

  /* ── 页面骨架（index.html 模板内联迁出）── */
  .mask { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
  #bookMask { background: rgba(15,23,42,.45); z-index: 60; padding: 16px; }
  #settingsMask { background: rgba(15,23,42,.45); z-index: 50; padding: 16px; }   /* 遮罩色并入统一规格（2026-09-29，原来是自己一套纯黑 .35） */
  #serviceMask { background: rgba(15,23,42,.45); z-index: 70; padding: 20px; overflow: auto; align-items: flex-start; }
  #yearMask { background: rgba(15,23,42,.62); z-index: 200; padding: 16px; }   /* 换年确认：压过一切（登录除外），必须点确认才能继续用 */
  #cardMask { background: rgba(15,23,42,.45); z-index: 65; padding: 20px; overflow: auto; align-items: flex-start; }   /* 2026-09-29 补：卡密遮罩原来漏了底色（打开时后面不变暗）——第175条只并了容器规格，漏了这条 */
  .sheet { background: #fff; border-radius: 12px; display: flex; flex-direction: column; }
  #bookMask .sheet { width: min(560px, calc(100vw - 32px)); max-height: min(640px, 82vh); }   /* 账本只有一列名字：窄卡 + 内容自适应高度（2026-10-19 用户："尺寸不是很协调"；原来套 960×960 大片空白） */
  #settingsMask .sheet { width: min(900px, calc(100vw - 32px)); max-height: min(844px, calc(100vh - 32px)); }   /* 赔率设置：900px 横向卡 + 内容自适应高度（2026-10-19 用户："这个比例感觉也不是很协调"；原来套 960×960） */
  #yearMask .sheet { width: min(960px,92vw); max-height: 82vh; }   /* 与赔率设置同一规格（2026-09-23；账本 2026-10-19 已改窄卡；服务/卡密 2026-10-19 起用小卡） */
  #loginMask { background: radial-gradient(circle at 50% 18%, rgba(37,99,235,.18), transparent 42%), rgba(15,23,42,.62); z-index: 10000; padding: 24px; overflow: auto; align-items: flex-start; }   /* 登录门压过一切；窄屏也留出边距 */
  #loginMask .sheet { width: min(420px, calc(100vw - 40px)); height: auto; margin: auto 0; border-radius: 20px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 28px 80px rgba(2,6,23,.38); }
  #loginMask .sheet-head { padding: 30px clamp(22px, 7vw, 32px) 18px; border-bottom: 0; text-align: center; font-size: 15px; }
  .auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .auth-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 21px; font-weight: 700; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
  .auth-brand-text { display: flex; flex-direction: column; gap: 4px; }
  .auth-title { font-size: 22px; line-height: 1.25; font-weight: 700; color: #0f172a; letter-spacing: .3px; }
  .auth-sub { font-size: 13px; line-height: 1.5; color: #64748b; }
  #bookMask .sheet, #yearMask .sheet, #settingsMask .sheet { border-radius: 16px; box-shadow: 0 24px 70px rgba(15,23,42,.28); }   /* 圆角/阴影与修改弹窗同一视觉（2026-09-04；换年 2026-09-23、赔率设置 2026-09-29 并入；账本 2026-10-19 改窄卡但保留这层视觉；登录/服务/卡密各自用小卡 2026-10-19） */
  #loginMask .login-body { display: flex; flex-direction: column; gap: 16px; padding: 0 clamp(22px, 7vw, 32px); }
  .auth-field { display: flex; flex-direction: column; gap: 7px; }
  .auth-label { font-size: 13px; font-weight: 600; color: #334155; }
  #loginMask .auth-field input { width: 100%; height: 46px; box-sizing: border-box; padding: 0 14px; font-size: 15px; border: 1px solid #dbe3ee; border-radius: 11px; background: #f8fafc; transition: border-color .15s, box-shadow .15s, background .15s; }
  #loginMask .auth-field input::placeholder { color: #94a3b8; }
  #loginMask .auth-field input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #2563eb22; background: #fff; }
  .auth-help { font-size: 12px; line-height: 1.4; color: #94a3b8; }
  .auth-note { padding: 10px 12px; border: 1px solid #dbeafe; border-radius: 10px; background: #eff6ff; color: #1d4ed8; font-size: 12px; line-height: 1.5; }
  #loginErr { margin-top: 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; line-height: 1.5; }
  #loginMask .sheet-foot { padding: 20px clamp(22px, 7vw, 32px) 0; border-top: 0; }
  #loginMask .sheet-foot > .btn { height: 46px; border-radius: 11px; font-size: 15px; font-weight: 600; }
  .auth-switch { padding: 16px clamp(22px, 7vw, 32px) 28px; text-align: center; font-size: 13px; color: #64748b; }
  .auth-switch a { color: #2563eb; font-weight: 600; text-decoration: none; }
  .auth-switch a:hover { text-decoration: underline; }
  #serviceMask .sheet, #cardMask .sheet, #accountMask .sheet { width: min(420px, calc(100vw - 40px)); height: auto; margin: auto 0; border-radius: 20px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 24px 70px rgba(2,6,23,.30); }
  #serviceMask .sheet-head, #cardMask .sheet-head, #accountMask .sheet-head { padding: 24px clamp(22px, 7vw, 28px) 10px; border-bottom: 0; font-size: 17px; font-weight: 700; }
  #serviceMask .service-body { margin: 0 clamp(22px, 7vw, 28px) 22px; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; font-size: 14px; line-height: 1.8; color: #334155; word-break: break-all; }
  #serviceMask .sheet-foot { padding: 0 clamp(22px, 7vw, 28px) 24px; border-top: 0; }
  #serviceMask .sheet-foot > .btn { height: 44px; border-radius: 11px; font-size: 15px; font-weight: 600; }
  #cardMask .card-body { display: flex; flex-direction: column; gap: 12px; padding: 0 clamp(22px, 7vw, 28px); }
  #accountMask .card-body { padding: 0 clamp(22px, 7vw, 28px) 24px; }
  #cardState { margin-top: 0; padding: 11px 13px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; color: #475569; font-size: 13px; line-height: 1.6; }
  #cardMask .card-body input { width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; font-size: 14px; border: 1px solid #dbe3ee; border-radius: 11px; background: #f8fafc; }
  #cardMask .card-body input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #2563eb22; background: #fff; }
  #accountMask .auth-field input { width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; font-size: 14px; border: 1px solid #dbe3ee; border-radius: 11px; background: #f8fafc; }
  #accountMask .auth-field input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #2563eb22; background: #fff; }
  .account-body { display: flex; flex-direction: column; gap: 14px; }
  .account-actions { display: grid; gap: 8px; }
  .account-pw { display: flex; flex-direction: column; gap: 12px; }
  .account-actions.hidden, .account-pw.hidden { display: none; }
  #cardErr { margin-top: 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; line-height: 1.5; }
  #cardMask .sheet-foot { padding: 20px clamp(22px, 7vw, 28px) 24px; border-top: 0; }
  #cardMask .sheet-foot > .btn { height: 44px; border-radius: 11px; font-size: 15px; font-weight: 600; }
  .sheet-head { padding: 14px 16px; border-bottom: 1px solid #eef2f6; font-size: 15px; font-weight: 600; }
  #bookMask .sheet-head { display: flex; justify-content: space-between; align-items: center; }
  .book-title-wrap { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .book-summary { color: #94a3b8; font-size: 11px; font-weight: 400; white-space: nowrap; }
  .book-back { background: none; border: none; color: #2563eb; font-size: 13px; padding: 4px 6px; cursor: pointer; }
  .sheet-foot { padding: 12px; border-top: 1px solid #eef2f6; display: flex; gap: 8px; }
  .sheet-foot > .btn { flex: 1; }   /* 弹层底部按钮统一撑满（2026-09-23 收成一条通用规则：
                                       原来靠逐按钮列 id（#btnServiceOK/#btnLogin/#btnAddBook…），
                                       每加一个弹层都要回去补一行、还容易漏——现在自动跟上） */
  .service-body { padding: 16px; font-size: 14px; line-height: 1.9; color: #334155; word-break: break-all; }
  .service-body b { color: #1d4ed8; }
  #bookList { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; }
  #btnBookOpen { flex: none; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  .header-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
  .header-right { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: nowrap; }
  /* 登录名和卡密到期时间变长后，默认按钮左右 18px 会把"卡密"挤到第二排（2026-10-27 线上截图）。
     桌面顶部只压缩这两个文字入口的横向留白；窄窗口仍由下面的媒体查询正常换行。 */
  header .header-left > .btn { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  @media (max-width: 980px) {
    header { flex-wrap: wrap; }
    .header-left { flex: 1 1 100%; flex-wrap: wrap; }
    .header-right { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
  }
  #btnMultiStats { flex: none; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  #btnService { flex: none; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
  .set-sub { font-size: 14px; margin-bottom: 8px; }
  .set-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }   /* 正文区（2026-09-29 并入统一规格后才有的层：标题/正文/底部三段；2026-10-19 加 min-height:0，限高时只滚正文、底部按钮不动） */
  #settingsMask .set-body > label { font-size: 13px; }
  /* 多账本统计：账本选择（2026-08-26 第一步） */
  .ms-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: #64748b; }
  .ms-book { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 14px; }
  .ms-book .book-kind-badge { min-width: 36px; text-align: center; cursor: default; }
  .ms-book .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 账本名超长省略（2026-08-27） */
  .ms-book.ms-sel { background: #eff6ff; border-color: #93c5fd; }
  .ms-book .book-count { color: #94a3b8; font-size: 12px; }
  .ms-step-on { color: #1e293b !important; font-weight: 600; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.10), inset 0 0 0 1px #e2e7ef; }
  .ms-page { padding: 6px 2px; }
  .ms-total { font-weight: 600; border-top: 2px solid #e2e8f0; background: #f8fafc; }
  .ms-settle-section { margin-top: 18px; }
  .ms-settle-section:first-of-type { margin-top: 8px; }
  .ms-settle-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px;
    border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
  .ms-settle-head.out { border-color: #fed7aa; background: #fff7ed; }
  .ms-settle-head.in { border-color: #bfdbfe; background: #eff6ff; }
  .ms-settle-head .book-kind-badge { cursor: default; pointer-events: none; }
  .ms-settle-count { margin-left: auto; color: #64748b; font-size: 12px; }
  .ms-settle-empty { margin: 0 0 4px; }
  .ms-table-scroll { overflow-x: auto; }
  /* 报出 / 报进解析镜像核对（2026-10-26）：只展示两两消除后的剩余行。 */
  .ms-audit { margin-top: 22px; padding: 12px; border: 1px solid #dbe4ef; border-radius: 10px;
    background: #fbfdff; }
  .ms-audit-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
  .ms-audit-head span { color: #64748b; font-size: 12px; }
  .ms-audit-counts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px;
    color: #475569; font-size: 13px; }
  .ms-audit-counts b { color: #1e293b; }
  .ms-audit-ok, .ms-audit-warn { padding: 9px 11px; border-radius: 8px; font-size: 13px; }
  .ms-audit-ok { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
  .ms-audit-warn { margin-bottom: 9px; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; }
  /* 差异项直接复用录入页整注卡（原文｜解析），不再拆成字段表。 */
  .ms-audit-bets { display: flex; flex-direction: column; gap: 8px; }
  .ms-audit-bet { padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; }
  .ms-audit-bet .bet-head2 { margin-bottom: 4px; }
  .ms-audit-bet .ms-audit-side { font-weight: 600; }
  .ms-audit-bet .ms-audit-side.out { background: #fff7ed; color: #c2410c; }
  .ms-audit-bet .ms-audit-side.in { background: #eff6ff; color: #1d4ed8; }
  .ms-audit-bet .rv-chip[data-audit-miss="1"] { background: #fef2f2; border-color: #f87171;
    box-shadow: 0 0 0 1px #fecaca inset; }
  #setRebate { width: 90px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px; margin-top: 4px; }
  .note-gap-lg { margin: 10px 0 14px; }
  .note-gap-sm { margin-bottom: 8px; }
  #stepClear { cursor: pointer; }
  .img-ocr-title { font-size: 13px; font-weight: 700; color: #334155; margin: 10px 0 6px; }
  /* 图片识别原文框：高度**交给浏览器自己算**（field-sizing: content → 内容多高、框就多高）。
     2026-10-01 用户第 2 次报："还是会跳，就是浏览器的那个滚动条会一直拉到最上面去"——
     病根不是"算得慢"，是**用 JS 量高度这件事本身就要求先 `height='auto'` 塌一下**：
     框一塌（长文本时几百像素），整页跟着变矮，浏览器就把滚动位置夹回顶部，再撑回来 —— 就是那个"跳"。
     改成原生 field-sizing 后：JS **一次都不写高度**，框永远不塌，滚动条不动。
     （Edge/Chrome 123+ 原生支持；本机 Edge 154 已支持，探针实测 20 行文本自动长到 406px。） */
  #imgOcrText { overflow: hidden; resize: none; min-height: 120px; field-sizing: content; }
  #calcInfo { margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px 10px; background: #fff; }
  #calcInfo.empty { flex: none; border: none; background: transparent; padding: 2px 0; }   /* 空态不像输入框：不撑高、去边框透明，只留"下面键盘录入"灰提示（2026-08-21 用户反馈多一个输入框） */
  #calcPanel { border: 1px solid #dbe2ea; border-radius: 10px; padding: 8px; margin-top: 8px; background: #fbfcfe; }
  #calcPreview { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 5px 8px; text-align: center; font-size: 17px; font-weight: 700; min-height: 20px; margin-bottom: 3px; }   /* 主页预览与弹层同 17px（2026-08-25 排版升级） */
  #calcHint { font-size: 11px; color: #94a3b8; text-align: center; min-height: 13px; margin: 1px 0 2px; }
  #calcHint .hint-fail, #edHint .hint-fail { color: #dc2626; font-weight: 600; }   /* ✓ 被拦的原因（2026-09-16） */
  #calcTabs, #calcTabs2 { display: flex; gap: 4px; flex-wrap: wrap; }
  #calcTabs { margin-bottom: 2px; }
  #calcTabs2 { margin-bottom: 3px; }
  #calcDigits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 3px; }
  #calcActions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 4px; }
  #reviewWrap { margin-top: 12px; border-top: 1px dashed #cbd5e1; padding-top: 8px; }
  #panel3 .note { margin-bottom: 12px; }
  #holdMeta { font-size: 15px; margin-bottom: 12px; }
  #panel3 .toolbar { margin-top: 0; margin-bottom: 14px; }
  /* ── 统计页（2026-08-19 基础版：筛选条 + 提示行；统计内容待定）── */
  .stats-filter { margin-bottom: 8px; }
  .sf-row { display: flex; gap: 6px; }
  .sf-platform-row { max-width: 240px; }
  .sf-head { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 8px; font-size: 12px; color: #334155; background: #fbfcfe; border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer; white-space: nowrap; overflow: hidden; }
  .sf-head .sf-label { overflow: hidden; text-overflow: ellipsis; }
  .sf-head.on { border-color: #2563eb; color: #1e3a8a; background: #eff6ff; }
  .sf-head .sf-arrow { color: #94a3b8; flex-shrink: 0; }
  .sf-panel { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 2px 2px; }
  .sf-chip { border: 1px solid #e2e8f0; background: #fff; border-radius: 14px; padding: 4px 12px; font-size: 13px; color: #334155; cursor: pointer; }
  .sf-chip.sel { background: #2563eb; border-color: #2563eb; color: #fff; }
  .sf-play-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
  .sf-play-label { font-size: 12px; color: #64748b; margin-right: 2px; }
  .sf-play-chip { border-radius: 10px; }
  #statsSummary.stats-loading { opacity: .55; transition: opacity .12s ease; }
  .play-stat-list .play-stat-content { text-align: left; font-weight: 600; word-break: break-all; }
  .play-stat-list th.pv-content-head { text-align: left; }
  .play-stat-list td, .play-stat-list th { white-space: nowrap; }
  .pv-result-list { width: 100%; max-width: 760px; margin: 0 auto; table-layout: fixed; }
  /* 投注预览（2026-08-19 用户定调：列表 号码/额度/输赢，输排到赢，不含返点） */
  .pv-list { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
  .pv-list th, .pv-list td { padding: 6px 8px; border-top: 1px solid #eef2f6; text-align: right; }
  .pv-list th:first-child, .pv-list td:first-child { text-align: left; }
  .pv-list th { color: #94a3b8; font-weight: 500; font-size: 12px; border-top: none; }
  .pv-list td.pv-num { color: #1e3a8a; font-weight: 600; text-align: left; white-space: nowrap; }
  .pv-te-list .pv-te-col-idx, .play-stat-list .pv-play-col-idx { width: 52px; }
  .pv-te-list .pv-te-col-num { width: 180px; }
  .pv-te-list .pv-te-col-amt, .pv-te-list .pv-te-col-adj { width: 175px; }
  .play-stat-list .pv-play-col-content { width: 180px; }
  .play-stat-list .pv-play-col-amt, .play-stat-list .pv-play-col-adj { width: 175px; }
  .play-stat-list td.pv-pending { color: #cbd5e1; }
  .pv-te-list th.pv-num-head { text-align: left; }
  @media (max-width: 620px) {
    .pv-te-list .pv-te-col-num { width: 30%; }
    .pv-te-list .pv-te-col-amt, .pv-te-list .pv-te-col-adj { width: 27%; }
    .play-stat-list .pv-play-col-content { width: 30%; }
    .play-stat-list .pv-play-col-amt, .play-stat-list .pv-play-col-adj { width: 27%; }
  }
  .pv-num-val { display: inline-block; font-size: 15px; line-height: 1.3; }
  .pv-list td.pv-num::before { content: attr(data-zodiac); display: inline-block; margin-right: 4px;
    font-size: 11px; line-height: 1.3; font-weight: 400; color: #94a3b8; vertical-align: 1px; }
  .pv-list td.pv-num-w红 .pv-num-val { color: #dc2626; }
  .pv-list td.pv-num-w蓝 .pv-num-val { color: #2563eb; }
  .pv-list td.pv-num-w绿 .pv-num-val { color: #16a34a; }
  .pv-list td.pv-amt { color: #334155; }
  /* 序号列（2026-10-02 加）：**故意跟投注号码长得不一样** —— 序号灰、小、带点（1. 2.），
     号码仍是深蓝加粗两位（01/49）。表头颜色不单独覆盖，跟着通用 th 走。 */
  .pv-list th.pv-idx, .pv-list td.pv-idx { width: 34px; text-align: center; font-size: 12px; }
  .pv-list td.pv-idx { color: #94a3b8; }
  .pv-win { color: #16a34a; font-weight: 600; }   /* 赢=绿（2026-10-18 用户定调：输赢颜色对调） */
  .pv-lose { color: #dc2626; font-weight: 600; }  /* 输=红 */
  .pv-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: #334155; }
  .pv-limit input { width: 64px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 6px; font-size: 13px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
  .pv-limit select.pv-risk-mode { height: 28px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0 6px; background: #fff; color: #334155; font-size: 13px; }
  .pv-limit input::-webkit-outer-spin-button, .pv-limit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }   /* 去掉加减按钮，直接输入（2026-08-19 用户定调） */
  .pv-limit input.pv-err { border-color: #dc2626; }
  .pv-limit-hint { font-size: 12px; color: #b91c1c; }
  .pv-limit-note { font-size: 12px; color: #94a3b8; }
  .pv-limit-sep { margin-left: 10px; color: #cbd5e1; }   /* 上限框与返点框之间的间隔键（2026-10-02 加返点框） */
  .pv-list tr.pv-over td { background: #fef2f2; }
  .pv-over-box { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: #fbfcfe; }
  .pv-over-title { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 4px; }
  .pv-over-list { font-size: 12px; color: #64748b; line-height: 1.8; word-break: break-all; }
  .pv-copy { margin-left: 8px; padding: 2px 8px; font-size: 12px; }   /* 「按金额整理」那块的小复制键（2026-10-02） */
  /* 报出区标题行那排小键：按金额 / 按顺序 —— 两个排法共用一个显示位置 */
  .pv-view-ctl { margin-left: 8px; font-size: 12px; color: #64748b; }
  /* 当前正在看的那种排法高亮 */
  .pv-view.on { background: #e2e8f0; border-color: #cbd5e1; color: #1e293b; font-weight: 600; }
  #openingCards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .manual-row-wrap { margin: 6px 0 10px; }
  #manualPanel { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 14px; margin-bottom: 10px; background: #fafbfc; }
  #manualPanel .note { margin-bottom: 10px; }
  #manualStatus { margin-top: 0; }
  #settleSummary { border-radius: 12px; padding: 16px 18px; margin: 10px 0; background: #f0f5ff; border: 1px solid #c7d7f9; }
  .ss-line { font-size: 13px; color: #334155; margin-top: 5px; }
  .ss-line.ss-net { font-weight: 700; color: #1e3a8a; margin-top: 8px; }
  .ss-hits { margin-top: 8px; }
  .ss-hits-title { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 4px; }
  .ss-hit { font-size: 12px; color: #64748b; margin-top: 2px; }
  .ss-hit b { color: #334155; margin-right: 6px; }
  .settle-sum-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
  #settleSummaryMain { font-size: 22px; font-weight: 700; }
  #settleSummarySub { font-size: 13px; color: #555; margin-top: 6px; }
  .warn-red { color: #dc2626; }
  #calcOverlayRawText { flex: 1; white-space: pre-wrap; overflow-wrap: break-word; }   /* 2026-09-24：头部并一行 + 正文按原行结构（与卡片同口径）；折行改 break-word，不硬折数字 */
  #edRows { margin-bottom: 8px; }
  #edPreview { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px; text-align: center; font-size: 17px; font-weight: 700; min-height: 20px; }
  #edHint { font-size: 11px; color: #94a3b8; text-align: center; min-height: 13px; margin: 2px 0 4px; }
  #edTabs, #edTabs2 { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 5px; }
  #edDigits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; }
  #edActions { display: grid; gap: 4px; margin-top: 4px; }

  /* ── 账本（books.js 渲染类）── */
  .book-section + .book-section { margin-top: 4px; }
  .book-group-divider { height: 1px; margin: 6px 8px 8px; background: #e8edf3; }
  .book-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; border: 1px solid transparent; }
  .book-item.sel { background: #eff6ff; border-color: #bfdbfe; }
  .book-kind-help { margin: 10px 12px 2px; padding: 8px 10px; border-radius: 8px; background: #f8fafc;
    border: 1px solid #e2e8f0; color: #64748b; font-size: 12px; line-height: 1.55; }
  .book-kind-badge { flex: none; border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 7px;
    background: #f8fafc; color: #94a3b8; font: inherit; font-size: 11px; line-height: 1.25; cursor: pointer; }
  .book-kind-badge:hover { border-color: #cbd5e1; color: #475569; }
  .book-kind-badge.in { border-color: #bfdbfe; background: #dbeafe; color: #1d4ed8; font-weight: 600; }
  .book-kind-badge.out { border-color: #fed7aa; background: #ffedd5; color: #b45309; font-weight: 600; }
  .book-order { display: flex; flex: none; gap: 2px; }
  .book-move { border: 1px solid #dbe3ec; border-radius: 5px; padding: 1px 4px; background: #fff;
               color: #64748b; font: inherit; font-size: 10px; line-height: 18px; cursor: pointer; }
  .book-move:hover:not(:disabled) { border-color: #93c5fd; color: #2563eb; }
  .book-move:disabled { opacity: 0.28; cursor: default; }
  .book-name { flex: 1; font-size: 14px; color: #1f2937; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 账本名超长省略（2026-08-27） */
  .book-name.sel { font-weight: 600; }
  .book-count { font-size: 12px; color: #94a3b8; }
  .book-current { font-size: 12px; color: #2563eb; }
  #curBookName { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }   /* 页头账本名超长省略（2026-08-27） */
  .book-ren { color: #2563eb; font-size: 12px; cursor: pointer; padding: 2px 4px; }
  .book-del { color: #ccc; font-size: 15px; cursor: pointer; padding: 2px 4px; }
  .book-edit { flex: 1; min-width: 0; border: 1px solid #93c5fd; border-radius: 6px; padding: 3px 6px; font-size: 14px; }   /* 行内改名（2026-08-26） */

  /* ── 赔率设置（settings.js 渲染类）── */
  .set-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 8px; }   /* 标签与输入框成组，组间留空隙 */
  .set-label { min-width: 0; font-size: 12px; color: #555; display: flex; align-items: center; gap: 8px;
               padding: 4px 6px; border: 1px solid #e8edf3; border-radius: 8px; background: #f8fafc; }
  .set-name { min-width: 0; line-height: 1.35; }
  .set-input { flex: 0 0 58px; width: 58px; border: 1px solid #dbe3ec; border-radius: 6px; padding: 3px 5px;
               font-size: 12px; margin-left: 0; background: #fff; }
  .set-label:focus-within { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 2px #2563eb18; }

  /* 弹窗摆放统一（2026-09-04 用户定调：以修改器为标准——同宽、同顶部位置）
     账本 2026-10-19 独立成"居中窄卡"：内容只有一列名字，宽高都跟着内容走。 */
  @media (min-width: 900px) {
  #bookMask { display: flex; align-items: center; justify-content: center; padding: 28px 24px; overflow: auto; }
  #bookMask .sheet { width: min(560px, 94vw); height: auto; max-height: min(640px, calc(100vh - 56px)); margin: 0; }
  #settingsMask { display: flex; align-items: center; justify-content: center; padding: 28px 24px; overflow: auto; }
  #settingsMask .sheet { width: min(900px, 94vw); height: auto; max-height: calc(100vh - 56px); margin: 0; }
  #yearMask { display: block; padding: 28px 24px; overflow: auto; }
  #yearMask .sheet { width: min(960px, 94vw); height: auto; max-height: none; margin: 0 auto; aspect-ratio: 1 / 1; }   /* 换年仍用桌面 960×960（2026-09-23；账本/赔率设置 2026-10-19 不再套这个正方形） */
    #bookMask #bookList { overflow-y: auto; }
  }

  /* 账本/登录整页弹层（2026-09-04 用户定调：与修改弹窗同长度且固定，多账本内部滚动） */
