/* B17 · 保留层样式：库页九段 chips + 五步链路抽屉 + 新增源抽屉
   只新增类，不覆盖既有 tokens；不改顶栏、不改左栏、不改二级栏。 */

/* ---------- 丙 库页九段 chips ---------- */
.b13-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 12px; }
.b13-chips button { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line2, #e2e0d9); background: var(--paper, #fff); color: var(--t2, #4a4a45); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.b13-chips button em { font-style: normal; color: var(--t3, #8a8a82); margin-left: 4px; font-variant-numeric: tabular-nums; }
.b13-chips button:hover { border-color: var(--main, #16386a); color: var(--ink, #1b1b18); }
.b13-chips button.on { background: var(--main, #16386a); border-color: var(--main, #16386a); color: #fff; }
.b13-chips button.on em { color: rgba(255, 255, 255, .78); }
.b13-note { margin-top: 10px; font-size: 12px; color: var(--t3, #8a8a82); line-height: 1.6; }

/* ---------- 五步链路抽屉（类名全部 b14 前缀，避免撞全站 .st/.bd/.btn） ---------- */
#b14Chain { position: fixed; inset: 0; z-index: 9200; display: none; }
#b14Chain.on { display: block; }
#b14Chain .b14bg { position: absolute; inset: 0; background: rgba(20, 22, 26, .38); }
#b14Chain .b14pn { position: absolute; top: 0; right: 0; bottom: 0; width: 560px; background: var(--paper, #fff); box-shadow: -14px 0 40px rgba(20, 22, 26, .16); display: flex; flex-direction: column; }
#b14Chain .b14hd { position: relative; padding: 18px 22px 14px; border-bottom: 1px solid var(--line, #e6e4de); flex: none; }
#b14Chain .b14hd h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink, #1b1b18); }
#b14Chain .b14hd p { margin: 6px 0 0; font-size: 12px; color: var(--t3, #8a8a82); line-height: 1.6; }
#b14Chain .b14x { position: absolute; top: 14px; right: 16px; width: 28px; height: 28px; border: 0; background: transparent; font-size: 18px; color: var(--t3, #8a8a82); cursor: pointer; }
#b14Chain .b14bd { flex: 1 1 auto; overflow-y: auto; padding: 14px 20px 18px; }
#b14Chain .b14ft { flex: none; padding: 10px 20px; border-top: 1px solid var(--line, #e6e4de); display: flex; gap: 10px; align-items: center; }
#b14Chain .b14sp { flex: 1; }
#b14Chain .b14st { border: 1px solid var(--line2, #e2e0d9); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; background: #fbfaf7; }
#b14Chain .b14st.done { border-color: #b9dcc8; background: #f3faf6; }
#b14Chain .b14st.fail { border-color: #e7bcbc; background: #fdf5f5; }
#b14Chain .b14r1 { display: flex; align-items: center; gap: 8px; }
#b14Chain .b14no { width: 20px; height: 20px; border-radius: 50%; background: var(--line, #e6e4de); color: var(--t2, #4a4a45); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
#b14Chain .b14st.done .b14no { background: #2f7d54; color: #fff; }
#b14Chain .b14st.fail .b14no { background: #b03a3a; color: #fff; }
#b14Chain .b14nm { font-size: 13px; font-weight: 600; color: var(--ink, #1b1b18); }
#b14Chain .b14api { margin-left: auto; font-size: 12px; color: var(--t3, #8a8a82); font-family: ui-monospace, Menlo, monospace; }
#b14Chain .b14out { margin-top: 8px; font-size: 12px; color: var(--t2, #4a4a45); line-height: 1.65; }
#b14Chain .b14out b { color: var(--ink, #1b1b18); }
#b14Chain .b14out .b14mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
#b14Chain .b14out .b14body { max-height: 104px; overflow: auto; background: #fff; border: 1px solid var(--line, #e6e4de); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; font-size: 12px; line-height: 1.7; margin-top: 6px; }
#b14Chain .b14ld { color: var(--t3, #8a8a82); }
#b14Chain .b14pick { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; max-height: 170px; overflow: auto; }
#b14Chain .b14pick label { display: flex; gap: 8px; align-items: flex-start; padding: 6px 9px; border: 1px solid var(--line2, #e2e0d9); border-radius: 8px; background: #fff; font-size: 13px; color: var(--ink, #1b1b18); cursor: pointer; line-height: 1.5; }
#b14Chain .b14pick label.on { border-color: var(--main, #16386a); box-shadow: inset 0 0 0 1px var(--main, #16386a); }
#b14Chain .b14pick input { margin-top: 3px; flex: none; }
#b14Chain .b14cover { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
#b14Chain .b14cover img, #b14Chain .b14cover canvas { width: 200px; height: 105px; border-radius: 8px; border: 1px solid var(--line2, #e2e0d9); display: block; }
#b14Chain .b14btn { height: 30px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line2, #e2e0d9); background: #fff; color: var(--ink, #1b1b18); font: inherit; font-size: 13px; cursor: pointer; }
#b14Chain .b14btn:disabled { opacity: .45; cursor: not-allowed; }
#b14Chain .b14btn.pri { background: var(--main, #16386a); border-color: var(--main, #16386a); color: #fff; }
#b14Chain .b14btn.gh { background: transparent; }
#b14Chain .b14warn { color: #b03a3a; }
#b14Chain .b14okc { color: #2f7d54; }

/* 左栏底部「说明」不能藏（老补丁用 .ri.dim{display:none} 关掉了） */
#app2 .rail #helpBtn { display: flex !important; opacity: .55; }
#app2 .rail #helpBtn:hover { opacity: 1; }
#app2 .rail .sp { flex: 1 1 auto; min-height: 8px; }



/* ---------- 甲-7 右栏 380（基线口径，不是 372） ---------- */
#app2 .side, .side { width: 380px !important; flex: none; }

/* ---------- 丁-1 肖像：右栏 36×36（对齐原型 .ev .av） ---------- */
.side .av img, .side .ev img { width: 36px !important; height: 36px !important; object-fit: cover; display: block; }

/* ---------- 丁-2 工作台几何：左栏与台账同顶线、左栏 stretch 等高、台账最小 660 ---------- */
.b13-body { align-items: stretch; }
.b13-left { align-self: stretch; }
.b13-left > .b13-m4 { flex: 1 1 auto; }
.b13-right { min-width: 660px; }

/* ---------- 丁-3 首屏骨架（数据没回来时不许出现「暂无记录」） ---------- */
.b13-tb .b17sk { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #efece4 0%, #f8f6f1 50%, #efece4 100%); background-size: 200% 100%; animation: b17sk 1.1s linear infinite; }
@keyframes b17sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 丁-1 肖像显式尺寸：右栏 36×36（首页卡由 #viewPG 规则接管） ---------- */
.side .av img { width: 36px; height: 36px; object-fit: cover; display: block; }
#agentsGrid .acard .fig img, .agents-grid .acard .fig img { width: 72px; height: 84px; object-fit: cover; display: block; }

/* ---------- 新增源抽屉（从既有源清单启用，后端无建源接口，不虚构） ---------- */
#b17Src { position: fixed; inset: 0; z-index: 9100; display: none; }
#b17Src.on { display: block; }
#b17Src .b17sbg { position: absolute; inset: 0; background: rgba(20, 22, 26, .34); }
#b17Src .b17spn { position: absolute; top: 0; right: 0; bottom: 0; width: 520px; background: var(--paper, #fff); box-shadow: -14px 0 40px rgba(20, 22, 26, .16); display: flex; flex-direction: column; }
#b17Src .b17sh { padding: 16px 20px 12px; border-bottom: 1px solid var(--line, #e6e4de); display: flex; align-items: center; gap: 10px; }
#b17Src .b17sh b { font-size: 15px; color: var(--ink, #1b1b18); }
#b17Src .b17sx { margin-left: auto; width: 28px; height: 28px; border: 0; background: transparent; font-size: 18px; color: var(--t3, #8a8a82); cursor: pointer; }
#b17Src .b17sn { padding: 10px 20px 0; font-size: 12px; color: var(--t3, #8a8a82); line-height: 1.7; }
#b17Src .b17sl { flex: 1 1 auto; overflow-y: auto; padding: 10px 20px 18px; }
#b17Src .b17sr { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line, #e6e4de); font-size: 13px; color: var(--ink, #1b1b18); }
#b17Src .b17sr .m { margin-left: auto; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--t3, #8a8a82); }
#b17Src .b17sb { height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2, #e2e0d9); background: #fff; color: var(--ink, #1b1b18); font: inherit; font-size: 12px; cursor: pointer; flex: none; }
#b17Src .b17sb.pri { background: var(--main, #16386a); border-color: var(--main, #16386a); color: #fff; }
#b17Src .b17se { padding: 24px 0; text-align: center; color: var(--t3, #8a8a82); font-size: 13px; }
