:root {
  /* 本地版配色规则: UI 底色由棋盘主题派生 (JS avgHex 动态算 --surface/--surface2/--sel-bg) */
  --surface: #eef1f2; --surface2: #e2e6e8; --sel-bg: #b5c2c9;
  --fg: #2a2a2a; --muted: #6a6a6a; --accent: #c0392b;
  --bg: var(--surface2); --card: var(--surface); --card2: var(--surface); --card3: var(--surface2);
  --border: #c8ced2; --border2: #b8bfc4; --hover: #dde3e6;
  --text: var(--fg); --head: var(--fg); --label: #4a4a4a; --muted2: #8a8a8a; --small: #7a7a7a;
  --blue: #3d6fb0; --red: #d9534f; --gold: var(--accent);
  --good: #3d8b4f;   /* 完成/就绪 绿 (engine-badges .eb.on 513 行历史裸引用, 此前从未定义) */
  --light-sq: #dee3e6; --dark-sq: #8ca2ad; --piece-speed: 300ms;
  --sigma: #8e44ad;   /* Σ融合数字: 紫, 区别于 Maia 蓝灰条 / 真实红条 */
}
body.theme-dark {
  --surface: #1e1b17; --surface2: #161512; --sel-bg: #3a3f45; --fg: #e8e4dc; --muted: #9a958c;
  --accent: #d9a441;
  --bg: #161512; --card: #1e1b17; --card2: #26231f; --card3: #322e27;
  --border: #2e2a24; --border2: #3a362f; --hover: #2a2620;
  --text: #e8e4dc; --head: #cfc9be; --label: #b8b2a6; --muted2: #7a746a; --small: #857f74;
  --blue: #5b8dd6; --red: #c96a5a; --gold: #d9a441;
  --good: #6fbf7f;
  --sigma: #c49bd6;
}
/* deep_openning 网页版 P0 — 深色主题, 与本地 GUI 观感一致 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  height: 100%; overflow: hidden;
}
.app { display: flex; height: 100vh; align-items: stretch; }
.board-area { --bsize: min(calc(100vh - 10px), calc(100vw - 480px)); flex-shrink: 0; display: flex;
  align-items: flex-end; padding: 0 8px 0 10px; background: var(--surface2); }
/* 棋盘锚定左下角 (2026-09-07 用户要求): flex-end 贴底 — 宽度受限棋盘变矮时从顶部收缩,
   左/底位置不动; 浏览器缩放 (视口 vh/vw 重算 → --bsize 变) 同理, 棋盘左下角不漂移.
   原 align-items:center 时垂直居中, 缩放/窄窗口下棋盘悬在半空, 左下角留大块空背景. */
#board-wrap { width: var(--bsize); height: var(--bsize); }
#board { width: 100%; }
.eval-hint { color: var(--muted); font-size: 12px; }   /* 原左下角 fixed 小字挪入右栏底部 (棋盘贴底后不再有左下角空位) */

.right { flex: 1 1 auto; min-width: 460px; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 12px 18px 12px 16px; background: var(--card); border-left: 1px solid var(--border); }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar label { color: var(--label); }
select {
  background: var(--card2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 4px; padding: 3px 6px; margin-left: 4px;
}
/* 我方执子色: 下拉框改一键换边按钮 (2026-09-22) — 按钮本体即当前色
   (执白=浅底深字 / 执黑=深底浅字), ⇄ 每次点击转半圈 */
.color-flip { background: #f2f0ec; color: #26231f; border: 1px solid var(--border2);
  border-radius: 4px; padding: 3px 8px; margin-left: 4px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .25s, color .25s; }
.color-flip[data-color="black"] { background: #26231f; color: #f2f0ec; }
.color-flip .cf-ico { display: inline-block; margin-right: 3px; transition: transform .22s ease; }
.badge {
  font-size: 12px; color: #d9a441; border: 1px solid #d9a44155;
  border-radius: 10px; padding: 1px 10px; cursor: help;
}

section { background: var(--surface2); padding: 11px 14px; border-radius: 6px; border: 1px solid var(--border); margin-bottom: 11px; }
section h3 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
section h3 small { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
/* 深算开关 (lichess 式持续分析到 80 层): 我方候选标题行右侧 */
.deep-btn { float: right; margin-top: -3px; padding: 3px 10px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border2); border-radius: 10px; background: var(--surface2); color: var(--muted);
  cursor: pointer; text-transform: none; letter-spacing: 0; }
.deep-btn:hover { border-color: var(--blue); color: var(--blue); }
.deep-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.deep-btn:disabled { opacity: .5; cursor: default; }

.moves { list-style: none; }
.moves li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 5px; margin-bottom: 3px;
}
.moves li:not(.muted):hover { background: var(--hover); cursor: pointer; }
.moves .mv-san { font-weight: 700; min-width: 64px; font-size: 15px; }
.moves .bar-wrap { flex: 1; height: 14px; background: var(--hover); border-radius: 7px; overflow: hidden; }
.moves .bar { height: 100%; background: var(--blue); border-radius: 7px; transition: width .3s; }
.moves .bar.real { background: var(--red); }
.moves .pct { min-width: 44px; text-align: right; color: var(--label); font-variant-numeric: tabular-nums; }
.moves .sc { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.sc.good { color: #7fbf7f; } .sc.bad { color: #d97a6a; }
.muted { color: var(--muted2); }
li.muted { cursor: default !important; }

.hist-controls { display: flex; gap: 6px; margin-bottom: 8px; }
.hist-controls button {
  background: var(--card2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 5px; padding: 3px 12px; cursor: pointer; font-size: 14px;
}
.hist-controls button:hover { background: var(--card3); }
.hist-controls button.danger { border-color: #6a3a32; color: #d9a099; }
.history-list { color: var(--label); max-height: 120px; overflow-y: auto; line-height: 1.9; }
.history-list .cur { color: var(--text); font-weight: 700; }
.history-list .num { color: var(--muted2); margin-right: 2px; }

.status { color: var(--muted); font-size: 12px; }
.footnote { color: #6f6a60; font-size: 11.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .app { flex-direction: column; align-items: center; }
  .right { min-width: 0; width: 100%; }
}

/* ── 登录弹窗 (屏幕正中 + 大气版式) / 页脚 / 隐私页 ──── */
.auth-btn { margin-left: auto; padding: 2px 12px; cursor: pointer; }
.auth-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; width: min(400px, 92vw);
  background: var(--card); color: var(--text);
  border: 1px solid var(--border2); border-radius: 14px;
  padding: 26px 30px 20px; box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.auth-modal::backdrop { background: rgba(0,0,0,.45); }
/* 右上角关闭按钮 (弹窗唯一关闭入口 — 点遮罩不关) */
.auth-modal .auth-close {
  position: absolute; right: 12px; top: 12px;
  width: 28px; height: 28px; padding: 0;
  border: none; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 20px; line-height: 28px; cursor: pointer;
}
.auth-modal .auth-close:hover { background: var(--card3); color: var(--text); }
.auth-modal h3 { font-size: 19px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.auth-tip { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; line-height: 1.6; }
.auth-row { display: flex; gap: 8px; margin: 0 0 12px; }
/* [hidden] 修复 (2026-10-12 实测): .auth-row 的 display:flex 覆盖 UA 的 [hidden]{display:none}
   → 邀请码模式下验证码/密码行仍显示。类选择器特异性 > 属性, 需显式压回。 */
.auth-row[hidden] { display: none; }
.auth-row input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--card2); color: var(--text); }
.auth-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-row button { padding: 10px 14px; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  background: var(--card2); color: var(--text); border: 1px solid var(--border2); border-radius: 8px; }
.auth-row button:hover { background: var(--card3); }
.auth-row button:disabled { opacity: .55; cursor: default; }
.auth-primary { width: 100%; margin-top: 2px; padding: 11px; font-size: 15px; font-weight: 600;
  cursor: pointer; background: var(--accent); color: #fff; border: none; border-radius: 8px; }
.auth-primary:hover { filter: brightness(1.1); }
.auth-msg { font-size: 12.5px; color: var(--red); min-height: 1.4em; text-align: center; margin-top: 10px; }
.auth-foot { margin-top: 10px; text-align: center; font-size: 12px; }
.auth-foot a { color: var(--muted); }
/* 账号菜单 (已登录点右上角账号按钮): 切换账号 / 退出登录 */
.acct-menu { width: min(300px, 92vw); }
.acct-info { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.acct-act { width: 100%; margin-top: 8px; padding: 10px; font-size: 14px; cursor: pointer;
  background: var(--card2); color: var(--text); border: 1px solid var(--border2); border-radius: 8px; }
.acct-act:hover { background: var(--card3); }
.acct-act.danger { color: var(--red); border-color: var(--red); }
.acct-act.danger:hover { filter: brightness(.96); }
.site-footer { margin-top: 14px; padding-top: 8px; border-top: 1px solid #ddd;
  display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.privacy { max-width: 640px; margin: 40px auto; padding: 0 16px; line-height: 1.7; }

/* ── Maia-3 面板 ──────────────────────────────────────── */
.maia-btn { width: 100%; padding: 6px 8px; margin-bottom: 6px; cursor: pointer; }
#maia-status { color: #888; }

/* ── 对手档案面板 ─────────────────────────────────────── */
.oppo-row { display: flex; gap: 6px; margin-bottom: 6px; }
.oppo-row select { width: auto; }
.oppo-row input { flex: 1; min-width: 60px; padding: 4px 6px; }
#oppo-state { color: #888; }

/* ── 深度分析 ─────────────────────────────────────────── */

/* ── 棋手档案 + repertoire 树 + 进度条 ────────────────── */
.icon-btn { padding: 1px 8px; cursor: pointer; }
.rep-list { font-size: 13px; }
/* 着法流 (En Croissant move-list 同款, 2026-09-08): 主行内联排布, 容器内滚动;
   当前局面格高亮跟随 (__repTreeFollow); 回合号只在行首格出现;
   SAN 为主文字, 概率/eval 降级为小徽标 (2026-09-08 二轮: pill 化, 可扫读性) */
.mv-flow { position: relative; line-height: 2.1; max-height: 260px; overflow-y: auto; }
.mv-flow .mstep { display: inline-flex; align-items: baseline; gap: 4px;
  padding: 0 5px; border-radius: 4px; margin-right: 6px; white-space: nowrap; }
.mv-flow .mstep .san { font-weight: 600; }
.mv-flow .mstep:hover { background: var(--hover); }
.mv-flow .mstep.cur { background: var(--accent); color: #fff; }
.mv-flow .mstep.cur .san { font-weight: 700; }
.mv-flow .mstep.cur .pill, .mv-flow .mstep.cur .mv-num { color: inherit; opacity: .85; background: rgba(255,255,255,.16); }
.mv-num { color: var(--muted2); margin-right: 2px; font-variant-numeric: tabular-nums; }
/* 概率/eval 小徽标 (树/复习分支/检索条目三处统一) */
.pill { display: inline-block; padding: 0 5px; border-radius: 8px; background: var(--hover);
  color: var(--label); font-size: 10.5px; line-height: 16px; font-variant-numeric: tabular-nums;
  vertical-align: baseline; }
.pill.good { color: #5da95d; background: rgba(127,191,127,.14); }
.pill.bad { color: #cf6b5b; background: rgba(217,122,106,.14); }
/* explore 手动探索线标记 (2026-09-08): 紫色系第三语义, 与 Σ融合紫一致; .main 荐 = 中性强调 */
.pill.explore { color: var(--sigma); background: rgba(142,68,173,.12); }
.pill.sf { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; }
.pill.main { color: var(--head); background: var(--sel-bg); }
.pill.ev-wait { color: var(--muted2); font-style: italic; }
#mine-custom-sec { width: 64px; padding: 2px 6px; }
/* 对手其余分支: ▸N 折叠钮 (默认收起, EC variations 惯例); 展开后按钮换 ▾ */
.mvar-toggle { border: none; background: var(--hover); color: var(--muted); cursor: pointer;
  font-size: 10.5px; line-height: 16px; padding: 0 7px; border-radius: 8px; margin-right: 6px;
  vertical-align: baseline; }
.mvar-toggle::before { content: "▸ "; }
.mvar-toggle.open::before { content: "▾ "; }
.mvar-toggle:hover { color: var(--accent); }
.mvar { display: none; margin: 2px 0 2px 16px; padding-left: 10px;
  border-left: 2px solid var(--border2); }
.mvar.mopen { display: block; }
.mvar-row { margin: 1px 0; }
.mstep { cursor: pointer; padding: 1px 4px; border-radius: 3px; }
.mstep:hover { background: var(--hover); }
.mine-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.mine-bar { height: 100%; width: 0; background: #4a90d9; transition: width .3s; }
.mine-bar.done { background: var(--good); }                     /* 跑完: 条转绿 */

/* ── 手机档补强 ───────────────────────────────────────── */
@media (max-width: 600px) {
  .app { padding: 10px; gap: 12px; }
  .topbar { gap: 8px; font-size: 13px; }
  section { padding: 8px; }
  .oppo-row { flex-wrap: wrap; }
  .moves .mv-san { min-width: 48px; font-size: 14px; }
}

/* ── 棋盘箭头层 (canvas 整帧重画; 2026-09-04 由 SVG 改 — 高频重绘走单纹理上传) ── */
#board-wrap { position: relative; }
/* B4 (2026-10-12 实测): 窄视口切换/部分 webview 下 chessboard.js 内部行 px 残留可撑出
   页面级横向滚动 — 容器收住溢出 (resize 兜底轮询 400ms 后重建恢复正常, 此间不破版)。 */
#board-wrap { overflow: hidden; }
#ann-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 10;
}

/* ── 外观设置面板 ─────────────────────────────────────── */
.appr-panel { position: absolute; right: 0; top: 30px; z-index: 40; background: var(--card);
  border: 1px solid var(--border2); border-radius: 8px; padding: 10px 12px; min-width: 250px; }
/* ⚙ 分析配置面板拉宽 1/3 (2026-09-07 用户要求): 原内容宽 ~284px → min 380 (~284×4/3) */
.appr-panel.fn-panel { min-width: 380px; }
.appr-panel label { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; }
/* 功能设置 · 保存行 (2026-09-07): 恢复默认=次要文字钮, 保存=主题色底/反白字/占满余宽的宽按钮 */
.appr-panel .sp-save-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.appr-panel #st-save { flex: 1 1 auto; padding: 6px 20px; font-size: 13.5px; font-weight: 600;
  background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.appr-panel #st-save:hover { filter: brightness(1.08); }
.appr-panel .sp-save-row #st-reset { border: none; background: none; color: var(--muted);
  cursor: pointer; padding: 4px 2px; white-space: nowrap; }
.appr-panel .sp-save-row #st-reset:hover { color: var(--accent); }
/* 融合权重校验错误行 (保存被退回时红字提示) */
.appr-panel .fw-err { color: var(--red); font-size: 11.5px; margin: 2px 0 0; }
/* 分析设置数字输入框: 靠右对齐 + 去掉上下调节数值小按钮 (2026-09-07 用户要求) */
.appr-panel input[type="number"] { text-align: right; appearance: textfield; -moz-appearance: textfield; }
.appr-panel input[type="number"]::-webkit-outer-spin-button,
.appr-panel input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── 新手引导 ─────────────────────────────────────────── */
.tour-mask { position: fixed; inset: 0; z-index: 90; }
.tour-mask .hole { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.65); border: 2px solid var(--gold); border-radius: 8px; transition: all .25s; }
/* G1: 教程后的任务引导卡 */
.tour-task { position: fixed; right: 18px; bottom: 18px; z-index: 10050; max-width: 320px;
  background: var(--card); border: 1px solid var(--accent); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 6px 22px rgba(0,0,0,.35); font-size: 13px; line-height: 1.6; }
.tour-task b { font-size: 14.5px; display: block; margin-bottom: 6px; }
.tour-task .tt-act { display: flex; gap: 8px; margin-top: 10px; }
.tour-task .tt-go { background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; }
.tour-task .tt-later { background: none; border: 1px solid var(--border2); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.tour-task i { font-style: normal; font-family: monospace; background: var(--card2); padding: 0 4px; border-radius: 4px; }
.tour-card { position: fixed; z-index: 91; background: var(--card); color: var(--text);
  border: 1px solid var(--border2); border-radius: 10px; padding: 14px 16px; max-width: 320px; }
.tour-card h4 { margin-bottom: 6px; color: var(--head); }
.tour-card .tour-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.tour-card .tour-step { color: var(--muted2); font-size: 12px; margin-right: auto; align-self: center; }

/* ── 棋盘主题 (便携版同款: 变量格色 + 木纹纹理 + CSS 动画) ── */
:root { --light-sq: #dee3e6; --dark-sq: #8ca2ad; --sel-bg: #b5c2ca; --piece-speed: 300ms; }
.white-1e1d7 { background-color: var(--light-sq) !important; color: var(--dark-sq) !important; }
.black-3c85d { background-color: var(--dark-sq) !important; color: var(--light-sq) !important; }
.notation-322f9 { color: rgba(0,0,0,.65) !important; font-weight: 700 !important; }
body.board-texture .white-1e1d7, body.board-texture .black-3c85d {
  /* 木纹纹理 = 预烘焙噪声 PNG (原 feTurbulence SVG 滤镜为知名 GPU 合成伪影源:
     64 格 = 64 个实时分形滤镜, HiDPI 下与箭头层叠加曾致棋盘被大块箭头色矩形
     盖住的渲染事故; PNG 平铺视觉等效, 零滤镜开销) */
  background-image: url("tex.png");
}
/* 走子动画: 仅 .animating 时启用 transition (拖拽跟手不受影响) */
#board-wrap.animating .piece-417db { transition: left var(--piece-speed), top var(--piece-speed); }
.sp-row label { display: flex; align-items: center; gap: 4px; }
/* 设置面板 · 紧凑行: 名称左 / 控件组右, 窄面板不折行 (引擎质量·Maia 等) */
.sp-tight { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.sp-tight > span:first-child { white-space: nowrap; }    /* 标签被挤时不逐字折行 */
.sp-tight .sp-ctl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.appr-panel .sp-st { font-size: 11.5px; margin: -2px 0 4px; }
.appr-panel input[type="range"] { width: 110px; }

/* ── 引擎条 (本地版同款: 左侧竖条, 白优自底向上) ────────── */
.eval-bar { width: 30px; height: var(--bsize); background: #1a1a1a; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; margin-right: 6px;
  border: 1px solid #111; flex-shrink: 0; }
/* scaleY (GPU 合成) 而非 height 过渡: height 是布局属性, 350ms 连续重绘 eval-bar —
   它与棋盘左列共享 tile, 静默期这串重绘曾诱发棋盘区脏光栅 (红遮罩, 2026-09-07 二轮) */
.eval-white { background: #e8e8e8; width: 100%; height: 100%; transform-origin: bottom;
  transform: scaleY(.5); transition: transform .35s ease; }
.eval-score { position: absolute; left: 0; right: 0; bottom: 50%; text-align: center;
  font-size: 10px; font-weight: 700; color: #222; background: rgba(232,232,232,.95);
  padding: 1px 0; transition: bottom .35s ease; }

/* ── 手机档: 恢复页面滚动 (桌面无页面滚, 仅右栏滚 — 本地版同款) ── */
@media (max-width: 900px) {
  body { height: auto; overflow: auto; }
  .app { flex-direction: column; height: auto; align-items: center; }
  .board-area { --bsize: min(calc(100vw - 56px), 88vh); padding: 10px 8px; width: 100%; justify-content: center; }
  .right { height: auto; overflow-y: visible; max-width: none; width: 100%; border-left: none; }
}

/* ── 设置双按钮组 (⚙/🎨 并排, 右上; 面板锚定组右缘) ────── */
.icon-btn-group { display: inline-flex; gap: 4px; position: fixed; top: 8px; right: 14px; z-index: 60; align-items: center; background: var(--card); border: 1px solid var(--border2); border-radius: 8px; padding: 3px 4px; }
.icon-btn-group .appr-panel { top: 30px; }

/* ── 「我的」入口按钮 (按钮簇最右 = 最右上角, 点击进 me.html 管理页) ── */
.me-btn { padding: 2px 16px; cursor: pointer; font-weight: 600; font-size: 13px;
  border: 1px solid var(--accent); border-radius: 6px; color: var(--accent);
  background: var(--card); white-space: nowrap; }
.me-btn:hover { background: var(--hover); }
/* 会员钻石: ◆彩色=会员, ◆灰=非会员 (按钮/账号页/群组成员共用) */
.me-dia { font-size: 11px; font-style: normal; }
.me-dia.on { color: var(--gold); text-shadow: 0 0 4px var(--gold); }
.me-dia.off { color: var(--muted2); }
.mp-nick-row { display: inline-flex; gap: 6px; align-items: center; }
.mp-nick-row input { width: 140px; }

/* ── 「我的」/「群组」管理页 (me.html / groups.html) ──── */
body.mp-page { overflow: auto; height: auto; }
.mp-wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 48px; }
.mp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.mp-head b { font-size: 18px; }
/* 返回按钮做成醒目主色块 (2026-09-10 用户需求: 大一点、颜色明显) */
.mp-back { display: inline-block; padding: 9px 20px; font-size: 15px; font-weight: 600;
  color: #fff; background: var(--accent); border-radius: 9px; text-decoration: none;
  box-shadow: 0 2px 10px rgba(192,57,43,.35); }
.mp-back:hover { color: #fff; filter: brightness(1.12); }
.mp-wrap button { background: var(--card2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 5px; padding: 2px 10px; cursor: pointer; }
.mp-wrap button:hover { background: var(--card3); }
.mp-wrap button.link { border: none; background: none; color: var(--muted); padding: 2px 0; }
.mp-wrap button.link:hover { color: var(--accent); }
.mp-wrap input { background: var(--card2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 4px; padding: 3px 6px; }
.mp-wrap input[type="checkbox"] { width: auto; }
.mp-login-btn { width: 100%; padding: 6px; cursor: pointer; margin-top: 8px; font-weight: 600; }
.me-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin: 3px 0; }
.me-kv .k { color: var(--muted2); }
.mp-opp-item { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px;
  border: 1px solid var(--border); border-radius: 6px; margin: 6px 0; }
.mp-opp-item input { flex: 1 1 90px; min-width: 80px; }
.mp-opp-item .f-elo { flex: 0 0 76px; min-width: 76px; }
.mp-opp-item.shared { background: var(--surface2); }
.mp-tag { font-size: 11px; color: var(--blue); border: 1px solid var(--blue);
  border-radius: 8px; padding: 0 6px; white-space: nowrap; }
.me-org-card { border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin: 6px 0; }
.me-org-card .members { color: var(--muted2); margin: 4px 0; }
.me-member { display: inline-flex; gap: 3px; align-items: center; margin-right: 10px; }
.me-rm { color: var(--red); cursor: pointer; font-size: 11px; }
.mp-opp-del { cursor: pointer; color: var(--red) !important; border: none !important;
  background: none !important; font-size: 13px; padding: 4px !important; }
.me-rules { margin: 4px 0; }
.me-rules label { white-space: nowrap; }
.me-cat { margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 700;
  border-bottom: 1px dashed var(--border2); padding-bottom: 2px; }
/* repertoire 行 (2026-09-22 解耦): 行容器 pq-row + 缩略图 84px 默认档, 文字区走共用
   .rrow-* (见队列区); org 共享标蓝左缘 */
.me-rep-item.org { box-shadow: inset 2px 0 0 var(--blue); }
/* me.html 的 .mp-wrap button 底样式 (0,1,1) 会压过 .pq-btn (0,1,0) — 此处显式抬升 */
.me-rep-item .pq-btn { background: none; border: 1px solid rgba(128,128,128,.35);
  border-radius: 3px; padding: 2px 10px; font-size: 11px; }
.me-rep-item .pq-btn:hover { background: none; border-color: var(--blue); color: var(--blue); }
.me-rep-del { cursor: pointer; color: var(--red) !important; border: none !important;
  background: none !important; font-size: 12px; padding: 0 4px !important; }
.me-rep-del:hover { color: var(--red); filter: brightness(1.2); }
.mp-link { display: block; padding: 10px 12px; border: 1px dashed var(--border2); border-radius: 8px;
  color: var(--text); text-decoration: none; margin-top: 6px; font-weight: 600; }
.mp-link:hover { border-color: var(--accent); color: var(--accent); }
.mp-rules-list { margin: 4px 0 0 18px; line-height: 1.8; font-size: 13px; color: var(--label); }
/* 检索面板 (.rep-hit/.rep-reach) 已删 (2026-09-22 定稿: 并入武器库三态, 见 .armory-item.in) */

/* ── 首次资源弹窗 ─────────────────────────────────────── */
.eng-modal { border: 1px solid var(--border2); border-radius: 10px; background: var(--card);
  color: var(--text); padding: 20px 22px; width: min(400px, 92vw); }
.eng-modal::backdrop { background: rgba(0,0,0,.55); }
.eng-tip { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.eng-row { margin-bottom: 14px; }
.eng-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.eng-st { color: var(--blue); font-size: 12px; }
.eng-bar { height: 10px; background: var(--hover); border-radius: 5px; overflow: hidden; }
.eng-fill { height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.eng-sub { font-size: 12px; color: var(--muted2); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.eng-sub button { padding: 1px 10px; }
.eng-foot { text-align: right; margin-top: 6px; }
.eng-foot button { background: var(--card2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 6px; padding: 5px 16px; cursor: pointer; }

/* ── 顶栏三段式 (本地版 control-bar 同构) ─────────────── */
.control-bar { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.cb-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.opp-player-row { display: inline-flex; align-items: center; gap: 2px; }
.opp-lib-status { color: var(--muted); font-size: 12px; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 对手分布双条 (主=融合蓝, 附=真实红) ───────────────── */
.moves .bar-wrap { position: relative; }
.moves .bar { background: var(--blue); border-radius: 7px; position: relative; overflow: hidden; }
/* 红遮罩真因 (2026-09-07 三轮实锤, 删除肇因规则): 旧 `.moves .bar-real` 绝对定位规则
   是为早期 .bar-wrap 条形结构而设 (该结构现用 .bar.real 类名), 却误命中实战对局的
   .prob-bar.bar-real — .move-item 无定位 → 相对 .app 定位: left:0;top:0;bottom:0 +
   width:50%(e4 在第一步的占比) = 半屏宽全高红条整块盖住棋盘 (页面内实测 rect x:0 y:0
   w:640 h:720, bg rgb(217,83,79)); "点开启实战出现/点走子或关闭消失/只在第一步最宽"
   皆同源。历轮 GPU tile 定性作废 — 遮罩自始至终是这条 DOM 元素 (?dump=red 旧正则
   只匹配带 alpha 的 rgba(), rgb() 不透明色漏检, 故从未扫到)。 */
/* 实战对局 (非 multicolumn 列表) 行内条形: 行相对定位 + 条形铺整行背景 + 文字置顶
   (与 multicolumn 卡片同视觉语言) */
.moves:not(.multicolumn) .move-item { position: relative; overflow: hidden; }
.moves:not(.multicolumn) .move-item .prob-bar { position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--real-bar); opacity: .5; z-index: 0; }
.moves:not(.multicolumn) .move-item > span { position: relative; z-index: 1; }

/* ── SF 载入进度条 (我方配置行正下方, 非阻塞) ────────────── */
.sf-topbar { margin-top: 4px; }
.sf-topfill { height: 6px; width: 0; background: var(--blue); border-radius: 3px; transition: width .2s; }
.sf-toptext { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* ── 对方配置行 (独立于 topbar, 我方候选区块之下) ──────── */
/* 页头: 左侧标题与右上角固定按钮簇 (我的/⚙/🎨) 同一行, 我方配置另起一行;
   padding-right 让开按钮簇横向空间. 标题吸顶不随右栏滚动 (2026-09-07, 与右上角按钮簇同待遇):
   sticky top:0 + 负 margin 抵消列 padding-top → 滚动零位移即吸顶, 吸顶后仍有 12px 呼吸位;
   原 margin-bottom 10px 改 padding-bottom (间距不变), 配合背景色遮住滚过的内容 */
.page-head { min-height: 30px; display: flex; align-items: center; margin: -12px 0 0;
  padding: 12px 180px 10px 0; position: sticky; top: 0; z-index: 20; background: var(--card); }
.page-head .brand { font-size: 17px; font-weight: 700; letter-spacing: .4px; color: var(--head); }
.oppo-config { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 2px 0 11px; }
@media (max-width: 600px) { .page-head { padding-right: 0 } .page-head .brand { font-size: 15px } }
/* 对方行紧凑: ⚙ 配置按钮 + 当前对手名 + 徽章小号 */
.oppo-config label { font-size: 12.5px; }
.oppo-config .engine-badges .eb { font-size: 10.5px; padding: 1px 6px; }
.opp-cur { font-size: 13px; color: var(--text); }
/* 灰字独占一行 (按钮/徽章行之下): 几乎完整显示, 超长自然换行, 悬停仍有全文 title */
.oppo-config .opp-lib-status { flex-basis: 100%; max-width: none;
  white-space: normal; overflow: visible; line-height: 1.4; }
.oppo-config .maia-btn { width: auto; padding: 3px 12px; margin: 0; font-size: 12.5px; }
#maia-prog-wrap { margin: 0 0 10px; }
#maia-prog-wrap .eng-bar { height: 6px; border-radius: 3px; }

/* ── 对手配置大弹窗 (profiles.js 建; #elo/#maia-* 自首页移入, id 不变) ── */
dialog.opp-cfg { width: min(720px, 94vw); max-height: 88vh; overflow: auto; }
.opp-cfg .ocf-x { margin-left: auto; border: 0; background: none; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer; border-radius: 4px; }
.opp-cfg .ocf-x:hover { color: var(--fg); background: var(--hover); }
.opp-cfg .ocf-sec { margin: 14px 0 4px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; color: var(--muted2); }
.opp-cfg .ocf-lbl { display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; white-space: nowrap; }
.opp-cfg .ocf-lbl select { font-size: 13px; padding: 3px 4px; }
.opp-cfg #opp-profile { flex: 1; min-width: 160px; }
/* 身份四输入两列网格 (2026-09-08): 原 720px 弹窗里"显示名/公开赛名"各占整行, 右半空置 */
.opp-cfg .ocf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-bottom: 6px; }
/* 常驻字段标签 (2026-09-08 用户反馈: 填完值分不清哪格是什么) — 标签上, 输入框下 */
.opp-cfg .ocf-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opp-cfg .ocf-cap { font-size: 11px; font-weight: 600; color: var(--muted); }
.opp-cfg .ocf-grid input { width: 100%; min-width: 0; padding: 4px 8px; font-size: 13px;
  background: var(--card2); color: var(--text); border: 1px solid var(--border2); border-radius: 4px; }
.opp-cfg .ocf-grid input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.opp-cfg .ocf-elo { align-items: center; flex-wrap: wrap; gap: 8px 14px; }
/* 保存行: 主按钮加重 + 删除档案靠消息左对齐 */
.opp-cfg .ocf-act { align-items: center; }
.opp-cfg .ocf-act #pf-save { padding: 4px 26px; font-weight: 600; }
.opp-cfg .ocf-act .auth-msg { flex: 1; margin-top: 0; text-align: left; }
/* 窄屏单列 (须写在 .ocf-grid 基础规则之后 — 同权重后来居上) */
@media (max-width: 600px) { .opp-cfg .ocf-grid { grid-template-columns: 1fr; } }
.opp-cfg .ocf-hint { font-size: 11.5px; }
.opp-cfg .ocf-src { color: var(--muted); font-size: 12.5px; margin: 2px 0 6px;
  line-height: 1.5; white-space: normal; }
.opp-cfg #maia-row { align-items: center; }
.opp-cfg #maia-row .maia-btn { width: auto; padding: 4px 10px; margin: 0; }
.opp-cfg .ocf-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.opp-cfg .ocf-foot .maia-btn { width: auto; padding: 6px 24px; margin: 0; font-weight: 600; }
.opp-cfg .ocf-foot .maia-btn:disabled { opacity: .55; cursor: default; }
.opp-cfg .ocf-foot .auth-msg { margin-top: 0; text-align: left; flex: 1; }
.open-picker:empty { display: none; }
button.danger { border-color: #6a3a32; color: #d9a099; }

/* ── 公开赛候选勾选卡 (同名多选手区分: 局数/年份/Elo/来源) ── */
.open-picker { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 12px; margin: 0 0 11px; font-size: 12.5px; }
.open-picker .opc-title { margin-bottom: 4px; }
.open-picker .opc-item { display: flex; align-items: flex-start; gap: 6px; padding: 4px;
  border-radius: 4px; cursor: pointer; }
.open-picker .opc-item:hover { background: var(--hover); }
.open-picker .opc-item input { width: auto; margin-top: 3px; }
.open-picker .opc-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.open-picker .opc-l1 { font-size: 12.5px; }
.open-picker .opc-yr-row { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px;
  color: var(--label); margin: 1px 0; }
.open-picker .opc-yr b { color: var(--accent); font-weight: 600; }
.open-picker .opc-l2 { font-size: 11.5px; }
.open-picker .opc-act { margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.open-picker .opc-act button { background: var(--card2); color: var(--text);
  border: 1px solid var(--border2); border-radius: 5px; padding: 3px 12px; cursor: pointer; }
.open-picker a { color: var(--blue); }

/* ── 走法列表 (本地版同款: 单列候选 + 多列分布卡片) ─────── */
:root { --real-bar: #d9534f; }
.moves { list-style: none; margin: 0; padding: 0; max-height: 250px; overflow-y: auto; }
.move-item { display: flex; gap: 8px; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; align-items: baseline; border-left: 3px solid transparent; }
/* (2026-09-07: 曾为本机 Chrome DPR≥2 红遮罩试过 .sec-cand 层化 / contain / will-change
   —— 复验均无效且结论系抽样噪声, 已移除; 详见 app.js 顶部说明) */
.move-item:hover { background: var(--surface); border-left-color: var(--accent); }
.move-item .cp { min-width: 58px; font-variant-numeric: tabular-nums; font-weight: 600; }
.move-item .san { min-width: 66px; font-weight: 600; }
.move-item .pv { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 实战对局 W/D/L (2026-09-07 定稿): 固定色不随主题 — 胜=深红, 平=黑, 负=深蓝 */
.v.wdl { white-space: nowrap; font-variant-numeric: tabular-nums; }
.v.wdl .w { color: #8b0000; font-weight: 700; }
.v.wdl .d { color: #000; }
.v.wdl .l { color: #006400; font-weight: 600; }   /* 负=深绿 (2026-09-07 用户要求, 原深蓝 #00008b) */
/* 对手分布: 多列卡片 (主条 + 底部 1/5 红附条, 走法/概率/eval 叠卡内) */
.moves.multicolumn { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; max-height: 220px; }
.moves.multicolumn .move-item { position: relative; overflow: hidden; padding: 5px 9px; font-size: 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); display: flex; gap: 7px; align-items: baseline; }
.moves.multicolumn .move-item:hover { border-color: var(--accent); }
.moves.multicolumn .move-item .prob-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--dark-sq); opacity: .6; z-index: 0; }
.moves.multicolumn .move-item .prob-bar.bar-real { background: var(--real-bar); opacity: .5; }
.moves.multicolumn .move-item .prob-sub { position: absolute; left: 0; bottom: 0; height: 20%; background: var(--real-bar); opacity: .85; z-index: 0; }
.moves.multicolumn .move-item .prob-sub.sub-maia { background: var(--dark-sq); opacity: .9; }
.moves.multicolumn .move-item.has-sub .prob-bar { bottom: 20%; }
.moves.multicolumn .move-item .san, .moves.multicolumn .move-item .prob, .moves.multicolumn .move-item .v { position: relative; z-index: 1; }
.moves.multicolumn .move-item .san { min-width: 0; font-weight: 600; }
.moves.multicolumn .move-item .prob { color: var(--accent); font-weight: 700; flex: 1; text-align: center; }
.moves.multicolumn .move-item .v { min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
/* Σ融合数字 (2026-09-07): 紫色第三色 — 区别于 Maia 条 (--dark-sq 蓝灰) 与真实条 (--real-bar 红) */
.moves.multicolumn .move-item .prob.sigma { color: var(--sigma); }
/* 实战对局: 固定一行 2 条 (2026-09-07 用户要求, 覆盖 multicolumn 的 auto-fill 自适应列数);
   占位/空态 muted 行跨满两列 */
.moves.real-cols { grid-template-columns: repeat(2, 1fr); }
.moves.real-cols li.muted { grid-column: 1 / -1; }

/* ── 分段概率图 + 历史横滚条 (本地版同款) ───────────────── */
.opp-prob-chart { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 12px; margin-bottom: 8px; font-size: 12px; height: 132px; box-sizing: border-box;
  overflow: hidden; display: flex; flex-direction: column; }
.chart-title { font-weight: 600; margin-bottom: 4px; }
.chart-svg { width: 100%; flex: 1; }
.cbar-maia { fill: var(--dark-sq); opacity: .75; }
.cbar-sel { fill: var(--accent); }
.cbar-real { fill: var(--real-bar); }
.history-list { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; padding: 4px 0;
  align-items: center; color: var(--label); }

/* ── 配置重载 toast ───────────────────────────────────── */
.reload-toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px);
  background: var(--card); color: var(--text); border: 1px solid var(--accent);
  border-radius: 8px; padding: 8px 18px; font-size: 13px; opacity: 0;
  transition: all .25s; z-index: 95; pointer-events: none; }
.reload-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 引擎状态徽章 (顶栏最右) ───────────────────────────── */
.engine-badges { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.engine-badges .eb { font-size: 11px; border-radius: 9px; padding: 1px 8px;
  border: 1px solid var(--border2); white-space: nowrap; }
.engine-badges .eb.on { color: var(--good); border-color: var(--good); }
.engine-badges .eb.off { color: var(--muted2); }
.engine-badges .eb.warn { color: var(--accent); border-color: var(--accent); }
/* 点击走子: 选中框 + 合法目标灰点 (本地版同款) */
.square-55d63.sel { background-color: var(--sel-bg) !important; box-shadow: none !important; }
.square-55d63.tgt { box-shadow: none !important; }
.square-55d63.tgt::before { content: ''; position: absolute; top: 36%; left: 36%; width: 28%;
  height: 28%; border-radius: 50%; background: rgba(0,0,0,0.22); pointer-events: none; }

/* ── 候选卡年度图: 对局数柱 + Elo 折线 (悬停 <title> 看当年赛事/Elo) ── */
.open-picker .opc-chart { width: 100%; max-width: 440px; height: 60px; margin: 2px 0 1px; }
.opc-bar { fill: var(--dark-sq); opacity: .5; }
.opc-bar:hover { fill: var(--accent); opacity: .85; }
.opc-elo { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.opc-elo-dot { fill: var(--accent); }
.opc-elo-dot:hover { r: 4; }
.open-picker .opc-fide { font-size: 10.5px; color: var(--muted2); font-family: monospace; }

/* ── 手机档 (≤600px) 棋盘正方形修正 — 必须放在文件末尾: 上方第二个 ≤900px 块的
   --bsize(-56px) 源码序在后, 夹在中间的覆盖会被它盖回去 ────────────────
   根因: -56px 只算了 eval-bar(36)+board-area 边距(16)+4, 漏了本档 .app 新增的
   20px padding → 334 > 可用宽, flex 默认收缩把 wrap 宽压到 ~303 而高仍 334 →
   非正方形 → SVG 箭头层 (viewBox 按 wrap 宽算) 与棋盘纵向错位并向下方溢出。
   height:auto + aspect-ratio 兜底: 宽再被挤压 (滚动条/异形视口) 高跟随宽, 恒正方形 */
@media (max-width: 600px) {
  .board-area { --bsize: min(calc(100vw - 8px), 52dvh); }
  #board-wrap { height: auto; aspect-ratio: 1; }
  .eval-bar { display: none; }   /* lichess 手机式: 无局面条, 棋盘全宽 */
}

/* ── 三研究模式 (2026-09-07 双模式 → 2026-09-11 三模式+共性头) ────────
   共性作战上下文 (我方/引擎/候选线数/⚙对手配置/Maia/棋库) 三模式共享,
   模式切换行置于共性内容下方引导 — 三标签等宽铺开, 点击切换只改面板显隐,
   局面/走子历史不动 (保持当前局面不变)。
   自由研究 = 日常探索 / 开局库准备 = 武器库+打谱 / 深度分析 = 任务准备+队列+结果汇总。 */
.mode-group { margin-left: 12px; display: inline-flex; border: 1px solid var(--border2);
  border-radius: 12px; overflow: hidden; }
.mode-row { margin: 10px 0 0; }   /* 上方额外间距 = 与共性头 detach; 下方交给列 gap 统一节奏 */
.mode-row .mode-group { display: flex; width: 100%; margin: 0;
  background: var(--surface2); border-color: var(--border); border-radius: 6px; }   /* 与 section 同卡片语言 = 与下方面板 unify */
.mode-row .mode-btn { flex: 1; padding: 4px 8px; text-align: center; }
.mode-btn { padding: 2px 14px; font-size: 12.5px; font-weight: 600; border: none;
  background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mode-btn + .mode-btn { border-left: 1px solid var(--border2); }
.mode-btn:hover { color: var(--blue); }
/* 选中态: 深红底白字 (与实战对局"胜"同款固定色 #8b0000, 不随主题) */
.mode-btn.on { background: #8b0000; color: #fff; }
.mode-btn.on:hover { color: #fff; filter: brightness(1.15); }
/* 深度分析 (准备/队列/结果汇总) 只在深度分析模式出现 (2026-09-11 M2: 自开局库准备独立) */
body:not(.mode-deep) #mine-section { display: none; }
body:not(.mode-review) #review-section { display: none; }
body:not(.mode-deep) #queue-section { display: none; }
/* 开局库准备不再隐藏实时分析面板 (2026-09-23 复习退役 + 用户定位教练/自驱棋手:
   不藏引擎不藏答案 — 候选/对手分布照常显示, 与自由研究的差异只剩武器库+内容面板) */
body:not(.mode-study) #armory-section { display: none; }   /* 武器库只在开局库准备出现 */
/* 深度分析同为专注布局: 对手分布隐藏 (Maia 融合分布免算); 我方候选+repertoire 检索
   照常显示 — 备任务看局面用, 队列运行时 runCand 的 __mining 检查自动让路 */
body.mode-deep #opp-dist-section { display: none; }
/* 深度分析模式布局 (2026-09-18 七改, 用户定): 发起行与三模式标签/「队列与结果」标题同高 —
   标题在左 / 档位居中 / 「分析」行尾; 进度反馈用 toast, 行高恒定不撑开 */
body.mode-deep #cand-section { display: none; }
body.mode-deep #history-section { display: none; }
body.mode-deep #mine-section { display: flex; align-items: center;
  gap: 6px 14px; padding: 0; flex-wrap: wrap; }   /* B4: 窄屏档位行可换行, 原单行溢出 28px */
body.mode-deep #mine-section h3 { margin: 0; border-bottom: none; padding-bottom: 0;
  display: flex; align-items: center; white-space: nowrap; }
.mine-ctl { display: flex; gap: 6px; align-items: center; margin: 0 auto; }
.mine-ctl select { width: auto; padding: 2px 6px; font-size: 12px; }
.mine-ctl input { width: 70px; padding: 2px 6px; }
#mine-run { margin-left: auto; background: linear-gradient(180deg, #a31515, #7a0e0e);
  border: none; color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: 4px;
  padding: 3px 22px 3px 26px; border-radius: 6px; cursor: pointer;
  box-shadow: 0 1px 6px rgba(122, 14, 14, .32), inset 0 1px 0 rgba(255,255,255,.16); }
#mine-run:hover { filter: brightness(1.16); }
#mine-run:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(122,14,14,.28); }
body.mode-deep #queue-section { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 320px; }
#pq-list { display: block; max-height: none; flex: 1 1 auto; overflow-y: auto; min-height: 140px; }   /* 竖排任务行 — 显式覆盖 .history-list 横排 flex; 结果区已撤 (2026-09-21), 列表独占 */
/* 开局库准备 = 武器库弹性填满 (原深度分析占满职责已移交 queue-section);
   展开时保底高度 = 标题 + 一条完整 repertoire 条目 (2026-09-23 用户定②: 缩略图随 --pq-thumb 联动) */
body.mode-study #armory-section { flex: 1 1 auto; display: flex; flex-direction: column;
  min-height: calc(var(--pq-thumb, 84px) + 76px); }
/* 折叠必须真正让位 (2026-09-22 反馈⑤): 收起后不占伸展位/不吃 min-height —
   否则折叠了仍霸着大面积空盒, 其他区块挤不上来 */
body.mode-study #armory-section.folded { flex: 0 0 auto; min-height: 0; }
body.mode-study #armory-list { flex: 1 1 auto; overflow-y: auto;
  min-height: calc(var(--pq-thumb, 84px) + 22px); }   /* ② 一条完整条目不被挤没 (缩略图+内边距+边框) */
/* 检索区范围双标签 (复用 mode-group, 小一号) */
.mode-group.mini .mode-btn { font-size: 11px; padding: 1px 10px; }

/* ── 武器库 (开局库准备模式的资产列表) ──
   缩略图 = --pq-thumb (主棋盘格 ×1.5, 2026-09-22 反馈③: 此前固定 46px 太小看不清棋盘);
   .in = 当前局面所在武器 (反馈②): 主体深色虚线框, 与检索命中行同标记 */
.armory-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 5px; margin: 3px 0; font-size: 12.5px;
  background: var(--surface); cursor: pointer; }
.armory-item .pq-thumb { flex: 0 0 var(--pq-thumb, 84px); width: var(--pq-thumb, 84px);
  height: var(--pq-thumb, 84px); }
.armory-item.in { border: 1.5px dashed var(--fg); }
/* 态①空态 (2026-09-22 定稿): 该执子色零武器 — 引导去深度分析 */
.armory-empty { display: flex; align-items: center; gap: 12px; padding: 8px 4px;
  font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.armory-item:hover { border-color: var(--accent); }
.armory-item.org { border-left: 2px solid var(--blue); }
/* 旧 .a-side/.a-first/.a-meta 行内样式已删 (2026-09-22 解耦至 .rrow-*) */
/* 选中行 (点条目=选中并展开内容) — 左缘强调条 + 淡底 */
.armory-item.cur { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent);
  background: rgba(192, 57, 43, .06); }

/* ── 一页化紧凑 (2026-09-07 用户要求: 自由研究下布局+页脚一屏装下) ──
   .right 原 gap 14 + section margin-bottom 11 双重叠加 → 统一 gap 10;
   section 内边距/标题留白/图表高度全线收紧; 页脚 margin-top:auto 贴底
   (内容不足一页时贴住视口底, 超出时自然跟在末尾)。 */
.right { gap: 10px; padding: 8px 14px 8px 12px; }
/* 标题行与右上角固定按钮簇视觉同一行 (2026-09-07): 簇 fixed top:8 中心 y≈24.3,
   原 padding-top 12 使标题行中心 y≈32.8 偏低 8.5px → 收到 4px 对齐 (±0.5px) */
.page-head { margin: -8px 0 0; padding: 4px 180px 6px 0; }
section { padding: 8px 12px; margin-bottom: 0; }
section h3 { margin: 0 0 6px; padding-bottom: 4px; }
.moves { max-height: 200px; }
.moves.multicolumn { max-height: 176px; }
.opp-prob-chart { height: 116px; }
.topbar { gap: 10px; }
.oppo-config { margin: 0; }
#maia-prog-wrap { margin: 0; }
.site-footer { margin-top: auto; padding-top: 6px; }
@media (max-width: 900px) { .site-footer { margin-top: 14px; } }   /* 手机档恢复文档流间距 */

/* ── repertoire 打谱复习面板样式已删 (2026-09-23 复习模块整体退役;
   着法树浏览/编辑统一走 #build-tree 的 .mv-flow, 见下节) ── */
/* 暗色主题 accent=金色: 白字对比不足 (~1.9:1), 换深色字 (~7:1) */
body.theme-dark .mv-flow .mstep.cur { color: #1e1b17; }
body.theme-dark .mv-flow .mstep.cur .mv-num,
body.theme-dark .mv-flow .mstep.cur .sc { color: inherit; opacity: .75; }

/* ── repertoire 内容面板 (2026-09-23 复习退役后浏览/学习双态共用一个容器) ──
   浏览态 (body.rep-view, me.js 点武器库条目): 标题「📖 武器内容」+ 树 — 点着法走线,
     当前局面跟随高亮; 与武器库同一区域互换视图 (见上方 ③ 规则)。
   学习态 (body.rep-build, repedit.js): 同容器转编辑 — 提示行/保存行只在此态出现,
     武器库/深度分析隐藏 (树移入学习面板); 引擎面板 (候选/对手分布) 在此强制展开。
   显隐全由 body class 驱动; 两态都只在开局库准备模式下可见 (repedit 进学习自动切模式)。 */
#build-section { display: none; }
body.rep-view #build-section, body.rep-build #build-section { display: flex; flex-direction: column; }
body:not(.mode-study) #build-section { display: none; }
body:not(.rep-build) .build-tip, body:not(.rep-build) .build-row { display: none; }
/* ③ 武器库与武器内容 = 同一区域的两个视图 (2026-09-23 用户定): 未选中 = 列表视图;
   点条目选中 (rep-view) = 切到内容视图, 武器库整区让位; ✕ 返回列表。不再两区同屏叠放。 */
body.mode-study.rep-view #armory-section { display: none; }
/* min-height 抬到能装下 h3+变化面板(≥160)+树(≥120) — .right 是定高滚动列, 余量不足时
   flex 先压缩 flexible 子项 (2026-09-24 实测: 旧 180px 把 #rep-at 压成 12px 细条),
   抬高下限后靠右栏滚动消化溢出 (武器内容是本模式主视图, 值得多占) */
body.mode-study.rep-view #build-section { flex:  1 1 auto; min-height: 440px; }
body.mode-study.rep-build #build-section { flex: 1 1 auto; min-height: 480px; }
body.rep-build #armory-section, body.rep-build #mine-section { display: none; }
#build-tree { flex: 1 1 auto; min-height: 120px; max-height: none; overflow-y: auto; }
/* ── 本局面·对手变化 (#rep-at, 2026-09-24 用户要求②) — 内容区上半部, 行式铺开:
     头行(对手着法+概率/评分+概览) → 我方应对链 (复用 .mstep/.mvar); 面包屑定位当前
     谱内位置。空间大不限行数, 超高自滚; 与下方完整树 (flex:1) 按内容瓜分。 */
#rep-at { flex: 0 1 auto; min-height: 160px; max-height: 46vh; overflow-y: auto;
  margin: 0 0 8px; border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px 6px; background: var(--surface); line-height: 1.9; }
#rep-at:empty { display: none; }
.rep-at-hd { font-size: 12.5px; font-weight: 700; color: var(--text); }
.rep-at-warn { font-size: 12px; color: var(--bad, #c0564a); background: rgba(217,83,79,.07);
  border-radius: 5px; padding: 2px 8px; margin: 3px 0; }
.rep-at-crumbs { font-size: 12px; color: var(--muted); padding: 2px 0 4px;
  border-bottom: 1px dashed var(--border); margin-bottom: 4px; }
.ra-crumb-k { color: var(--muted2); margin-right: 6px; }
.ra-off { color: var(--muted2); font-style: italic; margin-left: 6px; }
.ra-row { border-top: 1px dashed rgba(128,128,128,.22); padding: 4px 0 2px; }
.ra-row:first-of-type { border-top: none; }
.ra-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ra-san { border: none; background: var(--hover); color: var(--text); font: inherit;
  font-weight: 700; font-size: 13px; padding: 1px 9px; border-radius: 4px; cursor: pointer; }
.ra-san:hover { background: var(--accent); color: #fff; }
.ra-note { font-size: 11px; color: var(--muted2); }
.ra-note.leaf { color: var(--muted); font-style: italic; }
.ra-body { padding: 1px 0 3px 6px; line-height: 2.1; }
.ra-body .mvar { margin: 2px 0 2px 10px; }
.ra-mine { border-top: 1px dashed rgba(128,128,128,.22); padding: 3px 0 2px; }
.ra-mine:first-of-type { border-top: none; }
.ra-mine-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; background: var(--hover); border-radius: 4px; padding: 1px 4px; }
.ra-empty { font-size: 12.5px; color: var(--muted); padding: 4px 2px; font-style: italic; }
.build-tip { font-size: 12px; color: var(--muted); margin-bottom: 6px; line-height: 1.9;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kbd { display: inline-block; padding: 0 7px; font-size: 11px; line-height: 18px;
  border: 1px solid var(--border2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--card2); color: var(--text); white-space: nowrap; }
.build-row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.build-row .maia-btn { width: auto; padding: 3px 14px; margin: 0; font-size: 12.5px; }
.build-row .maia-btn:disabled { opacity: .55; cursor: default; }
/* 树着法右键菜单 (删除/设为主线) */
.rep-ctx { display: none; position: fixed; z-index: 80; background: var(--card);
  border: 1px solid var(--border2); border-radius: 8px; padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); flex-direction: column; min-width: 168px; }
.rep-ctx button { border: none; background: none; color: var(--text); text-align: left;
  padding: 6px 10px; font-size: 12.5px; cursor: pointer; border-radius: 5px; white-space: nowrap; }
.rep-ctx button:hover:not(:disabled) { background: var(--hover); }
.rep-ctx button:disabled { color: var(--muted2); cursor: default; }
/* 学习态: 树着法格悬停虚线框 = 提示可右键编辑 */
body.rep-build .mv-flow .mstep:hover { outline: 1px dashed var(--border2); }

/* ── section 折叠 (EC/lichess 同款: 点标题收起/展开, 状态记忆, 2026-09-08) ──
   长右栏一屏可控; 折叠只藏正文, 标题行按钮 (持续计算/退出等) 照常可点 */
section h3 { cursor: pointer; user-select: none; }
section h3::before { content: "▾"; display: inline-block; width: 12px;
  color: var(--muted2); margin-left: -12px; }
section.folded h3::before { content: "▸"; }
section.folded > *:not(h3) { display: none !important; }
section.folded h3 { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

/* 数据源进度板 (2026-09-09): 载入过程逐源分行展示 — 徽章+实时明细+已耗时 */
.opp-cfg #opp-src-lines { white-space: normal; }
.osr-head { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.osr-row { display: flex; align-items: baseline; gap: 6px; padding: 1px 0; }
.osr-name { min-width: 64px; color: var(--text); }
.osr-detail { flex: 1; color: var(--muted); }
.osr-st { display: inline-block; width: 14px; text-align: center; }
.osr-run .osr-detail, .osr-row .osr-run { color: var(--good, #4a9d5b); }
.osr-row:has(.osr-run) .osr-detail { color: var(--muted); }
.osr-run { animation: osr-blink 1.1s ease-in-out infinite; }
@keyframes osr-blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.osr-done { color: var(--good, #4a9d5b); }
.osr-fail { color: var(--bad, #c0564a); }
.osr-skip { color: var(--muted2, #8a8a8a); }

/* ── 挂机队列 (#queue-section, queue.js) ─────────────────────────────── */
/* 任务 = 单行卡 (2026-09-18 五改, 用户定): 行高/缩略图 = 左侧主棋盘格子的 1.5 倍
   (queue.js 按 #board 实测宽动态写 --pq-thumb); [缩略图(执子角标)] + [状态/对手/执子/
   深度/日期/操作 + 起始棋谱/进度 + 进度条], 一条一行; 整行可点击 */
.pq-row { display: flex; gap: 10px; align-items: center; padding: 4px 4px;
          min-height: var(--pq-thumb, 84px);
          border-bottom: 1px dashed rgba(128,128,128,.18);
          cursor: pointer; border-radius: 4px; }
.pq-row:hover { background: rgba(128,128,128,.07); }
/* ── 共用 repertoire 行·文字区 (.rrow, 2026-09-22 解耦) — thumb.js RepRowText 同构渲染,
   深度分析队列行 / 武器库行 / 检索可达行 / 「我的」页行四处共用。
   两行均可换行, 不用省略号 (用户要求): 长对手名/长棋谱整体换行, 不截断。 */
.rrow { flex: 1; min-width: 0; display: flex; flex-direction: column;
  justify-content: center; gap: 3px; }
.rrow-l1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rrow-side { font-size: 14px; line-height: 1; flex-shrink: 0; }
.rrow-first { font-weight: 700; white-space: nowrap; }
.rrow-who { font-weight: 600; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.rrow-tier { color: var(--muted2, #8a8a8a); white-space: nowrap; flex-shrink: 0; }
.rrow-btns { margin-left: auto; display: inline-flex; gap: 3px; white-space: nowrap; flex-shrink: 0; }
.rrow-pgn { font-size: 11px; padding: 2px 8px; border: 1px solid var(--border2); border-radius: 6px;
  background: var(--card2); color: var(--text); cursor: pointer; }   /* F3: 武器库条目 PGN 下载 */
.rrow-pgn:hover { background: var(--card3); }
.rrow-l2 { display: flex; align-items: baseline; column-gap: 10px; row-gap: 1px; flex-wrap: wrap;
  color: var(--muted); line-height: 1.55; font-size: 12px; min-width: 0; }
.rrow-when { color: var(--muted2, #8a8a8a); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rrow-san { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rrow-st { flex-shrink: 0; }
.rrow-src { flex-shrink: 0; }
/* 起始局面缩略图: 8×8 迷你盘, 棋子 = 棋盘同款 SVG; 右下角标 ♔白/♚黑 */
.pq-thumb { flex: 0 0 var(--pq-thumb, 84px); width: var(--pq-thumb, 84px);
  height: var(--pq-thumb, 84px); display: grid;
  grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  border: 1px solid rgba(0,0,0,.25); border-radius: 4px; overflow: hidden;
  position: relative; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.pq-thumb i { display: block; background-size: 92%; background-position: center; background-repeat: no-repeat; }
.pq-thumb i.lt { background-color: var(--light-sq, #dee3e6); }
.pq-thumb i.dk { background-color: var(--dark-sq, #8ca2ad); }
/* 可达局面浅底区 (2026-09-22 用户定序): 起始在当前局面下游的记录分组 — 视觉退后半格,
   虚线框区别于"本局面"常规行; 距离角标 +N步 标半步距 */
.pq-reach { margin-top: 6px; padding: 6px 6px 2px; background: var(--hover);
  border: 1px dashed var(--border2); border-radius: 8px; }
.pq-reach-hd { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 2px 4px; }
.pq-reach-hd span { font-weight: 400; margin-left: 6px; font-size: 11px; }
.pq-dist { font-size: 10.5px; color: var(--muted2, #8a8a8a); border: 1px solid var(--border2);
  border-radius: 8px; padding: 0 6px; line-height: 1.5; flex-shrink: 0; }
/* 「我的」武器库 (2026-09-22): 对手筛选行 + 队列同构缩略图行 —
   此页无主棋盘, 缩略图固定 120px (≈主盘格 1.5× 档量级, 2026-09-22 反馈③加大) */
#mp-rep-box { --pq-thumb: 120px; }
.mp-rep-filter { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.mp-rep-filter .k { color: var(--muted); font-size: 12px; }
/* 「我的」页布局 (2026-09-22 二改, 用户定稿): 各区块通栏满宽 (账号横排省行),
   武器库一排两个; 窄屏 (<900px) 自动退单列 */
body.me-page .mp-wrap { max-width: 1640px; }
#mp-acct-box { display: flex; flex-wrap: wrap; gap: 6px 30px; align-items: center; }
#mp-acct-box .me-kv { margin: 0; }
#mp-rep-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
#mp-rep-box > .mp-rep-filter, #mp-rep-box > .me-cat, #mp-rep-box > span,
#mp-rep-box > .mp-login-btn, #mp-rep-box > button { grid-column: 1 / -1; }
@media (max-width: 900px) { #mp-rep-box { grid-template-columns: 1fr } }
/* 旧 pq-l1/pq-who/pq-tier/pq-info-* 行文字区规则已删 (2026-09-22 解耦至 .rrow-*);
   .pq-info 保留 — 队列区空态提示行仍在用 */
.pq-info { color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline;
           column-gap: 10px; row-gap: 1px; line-height: 1.55; }
/* 内嵌确认条 (2026-09-18 用户定: 删除/清空确认出现在队列区内, 不弹居中 modal) */
.pq-confirm { display: flex; align-items: center; gap: 10px; border: 1px solid var(--red, #d9534f);
  border-radius: 6px; background: rgba(217,83,79,.07); padding: 5px 10px; margin: 4px 0;
  font-size: 12.5px; color: var(--text); }
.pq-confirm[hidden] { display: none; }
.pq-cf-msg { flex: 1; min-width: 0; line-height: 1.6; }
.pq-cf-btns { display: inline-flex; gap: 6px; white-space: nowrap; }
.pq-cf-ok { background: var(--red, #d9534f); border-color: var(--red, #d9534f); color: #fff;
  font-weight: 600; }
.pq-cf-ok:hover { filter: brightness(1.12); color: #fff; }
.pq-st-queued { color: var(--muted2, #8a8a8a); }
.pq-st-running { color: #e8a33d; animation: osr-blink 1.1s ease-in-out infinite; }
.pq-st-done { color: var(--good, #4a9d5b); }
.pq-st-failed { color: var(--bad, #c0564a); }
.pq-btn { border: 1px solid rgba(128,128,128,.35); background: none; cursor: pointer;
          font-size: 10.5px; padding: 0 5px; border-radius: 3px; color: var(--label); }
.pq-btn:hover { border-color: var(--blue); color: var(--blue); }
.pq-btn:disabled { opacity: .3; cursor: default; }
.pq-btn:disabled:hover { border-color: rgba(128,128,128,.35); color: var(--label); }
/* 单条暂停的排队任务 (2026-09-24): 整行退后 + 状态灰 */
.pq-row.pq-paused .rrow, .pq-row.pq-paused .pq-thumb { opacity: .55; }
.pq-st-paused { color: var(--muted2, #8a8a8a); font-style: italic; }
/* 续挖按钮 (2026-09-24): 目标已达成提前收工的行内引导 — 与常规操作区分的暖色 */
.pq-btn.pq-goal { border-color: #e8a33d; color: #b97a1e; font-weight: 600; }
.pq-btn.pq-goal:hover { border-color: #e8a33d; color: #8a5a12; background: rgba(232,163,61,.12); }
.pq-del:hover { border-color: var(--bad, #c0564a); color: var(--bad, #c0564a); }
/* 运行任务进度条 (2026-09-18): 每个分析在自己的行里明示进度 — 口径同手动分析进度条 */
.pq-bar { height: 4px; border-radius: 2px; background: rgba(128,128,128,.18); margin-top: 3px; overflow: hidden; }
.pq-bar i { display: block; height: 100%; width: 0; background: #e8a33d; border-radius: 2px;
            transition: width .3s; }   /* 与 .pq-st-running 同琥珀色 */
/* 入队/排队反馈 toast (queue.js): 与 .reload-toast 同款视感, 不打断正在看的进度文本 */
.pq-toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px);
  background: var(--card); color: var(--text); border: 1px solid var(--accent);
  border-radius: 8px; padding: 8px 18px; font-size: 13px; opacity: 0;
  transition: all .25s; z-index: 95; pointer-events: none; }
.pq-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 深度分析: 算力三档分段控件 + 对手徽章 (M2) ──────────────────────── */
.pq-modes { float: right; margin-top: -3px; display: inline-flex; }
.pq-mode-btn { border: 1px solid rgba(128,128,128,.35); background: none; cursor: pointer;
               font-size: 11px; padding: 2px 8px; color: var(--label); }
.pq-mode-btn + .pq-mode-btn { border-left: none; }
.pq-mode-btn.on { background: var(--blue, #3a6ea5); border-color: var(--blue, #3a6ea5); color: #fff; }
.pq-opp-chip { display: inline-block; margin-left: 6px; padding: 0 7px; font-size: 11px;
               border: 1px solid rgba(128,128,128,.35); border-radius: 9px;
               color: var(--text); background: rgba(128,128,128,.08); }
.pq-opp-chip.none { color: var(--muted2, #8a8a8a); }

/* ── 队列删除确认弹窗 (queue.js 动态建的原生 <dialog>) ─────────────────── */
.pq-del-modal { border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  color: var(--text); padding: 16px 18px 14px; min-width: 300px; max-width: 400px;
  box-shadow: 0 14px 44px rgba(0,0,0,.38); }
.pq-del-modal::backdrop { background: rgba(0,0,0,.45); }
.pq-del-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.pq-del-body { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.pq-del-body b { color: var(--text); }
.pq-del-warn { color: var(--bad, #c0564a); }
.pq-del-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pq-del-cancel, .pq-del-ok { padding: 4px 16px; font-size: 12.5px; border-radius: 6px;
  cursor: pointer; border: 1px solid var(--border2); background: var(--surface2); color: var(--text); }
.pq-del-cancel:hover { border-color: var(--blue); color: var(--blue); }
.pq-del-ok { background: var(--bad, #c0564a); border-color: var(--bad, #c0564a); color: #fff; font-weight: 600; }
.pq-del-ok:hover { filter: brightness(1.12); }

/* ── 复习模式 (2026-10-15 手机定位: 谱检查/复习优先) ─────────────── */
.rv-entry p { font-size: 13.5px; line-height: 1.7; margin: 4px 0 10px; }
.rv-go { background: linear-gradient(180deg, #a31515, #7a0e0e); color: #fff; border: none;
  border-radius: 10px; padding: 10px 26px; font-size: 15px; cursor: pointer; }
.rv-go:hover { filter: brightness(1.15); }
.rv-go:disabled { opacity: .5; cursor: default; }
.rv-quit { background: none; border: 1px solid var(--border2); border-radius: 8px;
  padding: 8px 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.rv-ask { font-size: 15px; margin: 2px 0 8px; }
.rv-lineno { font-family: monospace; background: var(--card2); padding: 1px 6px; border-radius: 5px; }
.rv-fb { min-height: 22px; font-size: 14px; margin-bottom: 6px; }
.rv-fb.flash { animation: rvflash .5s; }
@keyframes rvflash { 0% { opacity: 0 } 100% { opacity: 1 } }
.rv-ok { color: var(--good, #6b9e6b); font-weight: 600; }
.rv-bad { color: var(--accent, #c0392b); font-weight: 600; }
.rv-ans { color: var(--text); }
.rv-stats { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.rv-inline { padding: 4px 10px; font-size: 12px; margin-left: auto; }
.rv-sum b { font-size: 17px; display: block; margin-bottom: 8px; }

/* 桌面: 模式按钮显示全称, 短词版隐藏 (手机媒体查询在后, 同特异性按源序覆盖) */
.m-short { display: none; }

/* 手机档 (≤600px): 复习是主场景 + 极简原则 (2026-10-15 用户定: 手机不留说明性内容) */
@media (max-width: 600px) {
  #mode-review { order: -1; }
  #mode-deep { display: none; }
  /* 模式按钮短词 + 模式说明 title 保留给桌面 */
  .m-full { display: none; }
  .m-short { display: inline; }
  .page-head .brand { font-size: 12px; opacity: .6; }
  /* 首页: 手机不启动引擎 → 引擎配置/状态/徽章全是噪音, 收掉 */
  #self-config-row, #status, #engine-badges, #oppo-state { display: none !important; }
  .oppo-config { gap: 8px; }
  /* 复习入口: 说明段全砍, 只留一行状态 + 大按钮 */
  .rv-desc { display: none; }
  .rv-brief { font-size: 13px; margin: 2px 0 10px; }
  /* 复习统计行: 收窄 (跳过/结束已是小按钮) */
  .rv-stats { gap: 10px; font-size: 13px; }
  /* 核心信息优先 (2026-10-15 反馈: 按钮文字还是多, move 概率显示不足):
     对手分布(概率条)提到 .right 内容最前 = 棋盘正下方; 修饰件全砍 */
  /* ── 固定分区 (2026-10-15 用户定: 宁愿分区, 不要超屏滚动; lichess 式) ──
     .app 锁一屏: 顶条(对手)+棋盘 常驻不滚; .right = 面板区, 拿剩余高度区内滚 */
  .app { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  .app > .oppo-config { order: -2; flex-shrink: 0; margin: 4px 8px 0; gap: 6px; }
  .board-area { flex-shrink: 0; order: -1; padding: 6px 4px; width: 100%; justify-content: center; }
  .right { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
    -webkit-overflow-scrolling: touch; padding-bottom: 14px; }
  .mode-row { order: -9; position: sticky; top: 0; z-index: 30;   /* 分区切换钉面板区顶 */
    background: var(--bg, #131316); padding: 6px 8px; margin: 0 -4px; }
  .topbar { display: none !important; }   /* 只装引擎配置 (已隐藏) — 空壳不占位 */
  #opp-dist-section { order: -5; }   /* 研究/复习分区首屏: 概率条 */
  .page-head { order: 999; }         /* 站名/页脚沉底 */
  #opp-dist-section h3 small, #opp-dist-section .deep-btn { display: none !important; }
  #opp-prob-chart { display: none !important; }   /* 悬停分段图 — 手机无 hover */
  #cand-section h3 small, #cand-section .deep-btn { display: none !important; }
  #opp-dist-section h3, #cand-section h3 { font-size: 13px; }
  /* 走子历史一排导航按钮: 手机收掉 (棋盘手势即可回看), 桌面保留 */
  #history-section { display: none !important; }
}

/* ── 底部 Tab 导航 (2026-10-15 手机 app 化: 最重要的功能好找, "我的"在右下角) ── */
#m-bottom-nav { display: none; }

/* 桌面坐标显示; 手机隐藏 (2026-10-15 用户定: 简洁, 坐标不需要) */
@media (max-width: 600px) {
  #m-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--card, #1e1b17); border-top: 1px solid var(--border2);
    height: 54px; padding-bottom: env(safe-area-inset-bottom, 0); }
  #m-bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 1px; background: none; border: none; cursor: pointer;
    color: var(--muted, #999); font-size: 11px; }
  #m-bottom-nav button.on { color: var(--accent, #c0392b); }
  #m-bottom-nav .bn-ico { font-size: 20px; line-height: 1; }
  /* .app 高度让出导航; 页脚小灰沉底; sticky 模式栏退役 (底部导航接替分区切换) */
  .app { height: calc(100dvh - 54px); }
  .mode-row { display: none !important; }
  .site-footer { font-size: 10px; opacity: .45; margin: 18px 0 6px; }
  .site-footer a { color: inherit; }
  /* 棋盘坐标隐藏 (chessboard.js notation 边缘字母) */
  [class*="notation-"] { display: none !important; }
  .board-area { --bsize: min(calc(100vw - 8px), 50dvh); }
  /* 对手条 (2026-10-15 设计定稿): 棋盘下方面板区顶, 卡片式, 可折叠 */
  .right > .oppo-config { order: -10; align-items: center; padding: 8px 12px; gap: 10px;
    margin: 6px 8px; border: 1px solid var(--border2); border-radius: 12px;
    background: var(--card, #1e1b17); }
  .right > .oppo-config #opp-cur { font-weight: 700; font-size: 14px; }
  /* 单行工具条 (2026-10-15 用户定: 此区域只占一行) — nowrap + 紧凑间距, 对手名收缩省略 */
  .right > .oppo-config { flex-wrap: nowrap !important; gap: 6px; padding: 6px 8px; }
  .right > .oppo-config #opp-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; flex: 0 1 auto; }
  .oppo-config .eval-hint { font-size: 12px; }
  .oppo-config button[id^="nav-"] { order: 90; padding: 3px 7px; font-size: 12px; line-height: 1;
    border: 1px solid var(--border2); border-radius: 7px; background: var(--card2, #26231f);
    color: var(--text); cursor: pointer; flex: 0 0 auto; }
  .oppo-config button[id^="nav-"]:active { background: var(--card3); }
  .oppo-config .eval-hint { order: 99; margin-left: auto; font-size: 13px; font-weight: 600;
    font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* 局数详情: 手机不占行 — 数据源明细在 ⚙ 弹窗看 (2026-10-15 定稿: 详情弹窗承载, 条恒单行) */
  .oppo-config #oppo-state { display: none !important; }
  /* 对手分布/实战对局 (同一列表两种模式): 一行两个 × 3 行 = 6 格, 超出截断 (2026-10-15 用户定) */
  #oppo-dist { display: grid !important; grid-template-columns: repeat(2, 1fr);
    gap: 4px 6px; margin: 4px 0; max-height: calc(3 * 30px + 8px); overflow: hidden; }
  #oppo-dist li { padding: 4px 9px; font-size: 13px; margin: 0; }
  #oppo-dist .move-item { gap: 6px; }
  #oppo-dist .move-item .v { font-size: 10px; }
  /* 面板标题: 信息源备注回到标题行 (2026-10-15 用户要求) — 紧凑灰字 */
  #opp-dist-section h3 small, #cand-section h3 small { display: inline !important;
    font-size: 10px; color: var(--muted); white-space: nowrap; }
  .right > section h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 棋盘回收顶部空间 */
  .board-area { --bsize: min(calc(100vw - 8px), 52dvh); }
  /* 5 tab 适配 */
  #m-bottom-nav .bn-txt { font-size: 10px; }
  /* 深度分析页: 队列排序长说明手机隐藏 (简洁原则) */
  .pq-modes { display: none !important; }
  /* 桌面右上角浮动按钮组 (⚙分析配置/🎨外观/?) + 顶部"我的" — 手机 fixed 叠在顶条上 (2026-10-15
     用户报告覆盖), 且功能已有去处: 我的→底部导航, 设置→低频桌面用 */
  .icon-btn-group, #me-btn { display: none !important; }
}
