/* 说明书阅读器样式 — 独立命名空间 .lh-*，不影响业务页面 */
:root { --lh-brand: var(--brand, #1d4ed8); --lh-ink: var(--ink, #0f172a); --lh-ink4: var(--ink3, #64748b); --lh-ink5: var(--ink4, #94a3b8); --lh-line: var(--line, #e2e8f0); --lh-bg: var(--bg, #f4f6f9); --lh-card: var(--card, #fff); --lh-accent: var(--brand, #1d4ed8); --lh-success: var(--ok, #059669); --lh-warn: var(--warn, #d97706); --lh-r1: var(--r2, 12px); }
* { box-sizing: border-box; }
body.lh-body { margin: 0; font: 15px/1.7 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif; color: var(--lh-ink); background: var(--lh-bg); }
.lh-shell { display: flex; min-height: 100vh; }
/* 左侧导航 */
.lh-nav { width: 280px; background: var(--lh-brand); color: #fff; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 10; display: flex; flex-direction: column; }
.lh-nav-head { padding: 20px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.15); }
.lh-nav-head h1 { margin: 0; font-size: 18px; font-weight: 700; }
.lh-nav-head p { margin: 4px 0 0; font-size: 12px; opacity: .7; }
.lh-search-wrap { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.lh-search-inp { width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; font-size: 13.5px; outline: none; }
.lh-search-inp::placeholder { color: rgba(255,255,255,.5); }
.lh-search-inp:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.18); }
.lh-search-clear { display: inline-block; margin-top: 5px; font-size: 12px; color: rgba(255,255,255,.6); cursor: pointer; text-decoration: underline; background: none; border: none; padding: 0; }
.lh-nav-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.lh-ch-title { display: block; padding: 8px 18px; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.85); cursor: pointer; text-decoration: none; border-left: 3px solid transparent; transition: all .15s; }
.lh-ch-title:hover, .lh-ch-title.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: #60a5fa; }
.lh-topic-list { list-style: none; margin: 0; padding: 0; }
.lh-topic-link { display: block; padding: 5px 18px 5px 30px; font-size: 12.5px; color: rgba(255,255,255,.65); cursor: pointer; text-decoration: none; transition: all .15s; }
.lh-topic-link:hover, .lh-topic-link.active { color: #fff; background: rgba(255,255,255,.06); }
.lh-nav-footer { padding: 10px 18px; font-size: 11px; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.1); }
/* 主内容区 */
.lh-main { margin-left: 280px; flex: 1; min-width: 0; }
.lh-topbar { position: sticky; top: 0; z-index: 5; background: var(--lh-card); border-bottom: 1px solid var(--lh-line); padding: 10px 24px; display: flex; align-items: center; gap: 12px; }
.lh-breadcrumb { font-size: 13px; color: var(--lh-ink4); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-breadcrumb a { color: var(--lh-accent); text-decoration: none; }
.lh-topbar-btn { padding: 6px 14px; border: 1px solid var(--lh-line); border-radius: 6px; background: var(--lh-card); color: var(--lh-ink); font-size: 13px; cursor: pointer; white-space: nowrap; }
.lh-topbar-btn:hover { border-color: var(--lh-accent); color: var(--lh-accent); }
.lh-content { padding: 28px 32px 60px; max-width: 900px; }
/* 主题样式 */
.lh-topic { margin-bottom: 48px; scroll-margin-top: 70px; }
.lh-eyebrow { font-size: 12px; color: var(--lh-accent); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px; font-weight: 600; }
.lh-topic h2 { font-size: 22px; margin: 0 0 12px; color: var(--lh-brand); outline: none; scroll-margin-top: 70px; }
.lh-lead { font-size: 15px; color: var(--lh-ink4); margin: 0 0 16px; }
.lh-topic h3 { font-size: 16px; margin: 24px 0 8px; color: var(--lh-brand); }
.lh-topic p { margin: 6px 0; }
/* 图示 */
.lh-topic figure { margin: 16px 0; }
.lh-figure { display: block; border: 1px solid var(--lh-line); border-radius: var(--lh-r1); overflow: hidden; cursor: zoom-in; background: var(--lh-bg); padding: 0; width: 100%; }
.lh-figure img { display: block; width: 100%; height: auto; }
.lh-topic figcaption { font-size: 12px; color: var(--lh-ink5); margin-top: 4px; text-align: center; }
/* 字段表 */
.lh-table { overflow-x: auto; margin: 8px 0; }
.lh-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 500px; }
.lh-table th { background: var(--lh-bg); text-align: left; padding: 8px 12px; font-weight: 600; border-bottom: 2px solid var(--lh-line); white-space: nowrap; }
.lh-table td { padding: 8px 12px; border-bottom: 1px solid var(--lh-line); vertical-align: top; }
/* 操作步骤 */
.lh-topic ol { padding-left: 22px; }
.lh-topic ol li { margin: 4px 0; }
/* 按钮索引 */
.lh-action-links { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.lh-action-links li { background: var(--lh-bg); border-radius: 8px; padding: 10px 14px; }
.lh-action-links a { color: var(--lh-accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.lh-action-links a:hover { text-decoration: underline; }
.lh-action-links span { display: block; font-size: 12.5px; color: var(--lh-ink4); margin-top: 2px; }
/* 按钮详细说明 */
.lh-action { margin: 20px 0; padding: 18px 20px; background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--lh-r1); scroll-margin-top: 70px; }
.lh-action h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; outline: none; }
.lh-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lh-accent); color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.lh-note { background: #eff6ff; border-left: 3px solid var(--lh-accent); padding: 8px 14px; margin: 10px 0; border-radius: 0 6px 6px 0; font-size: 13.5px; }
.lh-warning { background: #fef2f2; border-left: 3px solid var(--lh-warn); padding: 8px 14px; margin: 10px 0; border-radius: 0 6px 6px 0; font-size: 13.5px; }
.lh-back { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--lh-accent); text-decoration: none; }
.lh-back:hover { text-decoration: underline; }
/* 流程图 */
.lh-flow { display: flex; flex-wrap: wrap; gap: 0; margin: 12px 0; align-items: center; }
.lh-flow div { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--lh-bg); border-radius: 6px; font-size: 13px; }
.lh-flow b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lh-accent); color: #fff; font-size: 12px; flex-shrink: 0; }
.lh-flow div + div::before { content: '→'; display: inline-block; margin-right: 6px; color: var(--lh-ink5); }
/* 相关操作 */
.lh-related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--lh-line); }
.lh-related a { padding: 5px 12px; background: var(--lh-bg); border-radius: 6px; font-size: 13px; color: var(--lh-accent); text-decoration: none; }
.lh-related a:hover { background: #dbeafe; }
/* 搜索结果 */
.lh-search-results { padding: 16px 32px; background: #fffbeb; border-bottom: 1px solid #fde68a; }
.lh-sr-count { font-size: 13px; color: #92400e; margin-bottom: 8px; }
.lh-sr-item { display: block; padding: 8px 0; border-bottom: 1px solid #fef3c7; color: var(--lh-ink); text-decoration: none; }
.lh-sr-item:last-child { border-bottom: none; }
.lh-sr-title { font-weight: 600; font-size: 14px; color: var(--lh-accent); }
.lh-sr-path { font-size: 12px; color: var(--lh-ink4); }
.lh-sr-snippet { font-size: 12.5px; color: var(--lh-ink); margin-top: 2px; }
mark { background: #fde68a; padding: 0 2px; border-radius: 2px; }
/* 图片放大窗口 */
.lh-zoom-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lh-zoom-overlay img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
.lh-zoom-close { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 28px; cursor: pointer; background: none; border: none; line-height: 1; }
/* 索引页 */
.lh-index-page { margin-bottom: 40px; }
.lh-index-page h2 { font-size: 20px; color: var(--lh-brand); margin: 0 0 12px; }
.lh-index-group { margin-bottom: 16px; }
.lh-index-group h4 { font-size: 13px; color: var(--lh-ink4); margin: 0 0 4px; text-transform: uppercase; letter-spacing: .3px; }
.lh-index-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px; }
.lh-index-list li a { display: block; padding: 5px 10px; font-size: 13.5px; color: var(--lh-ink); text-decoration: none; border-radius: 4px; }
.lh-index-list li a:hover { background: var(--lh-bg); color: var(--lh-accent); }
.lh-index-list li a .lh-idx-path { font-size: 11px; color: var(--lh-ink5); display: block; }
/* 手机适配 */
.lh-nav-toggle { display: none; position: fixed; bottom: 16px; right: 16px; z-index: 20; width: 50px; height: 50px; border-radius: 50%; background: var(--lh-brand); color: #fff; border: none; font-size: 22px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (max-width: 768px) {
  .lh-nav { transform: translateX(-100%); transition: transform .25s; width: 85vw; max-width: 320px; }
  .lh-nav.open { transform: translateX(0); }
  .lh-nav-toggle { display: block; }
  .lh-main { margin-left: 0; }
  .lh-content { padding: 16px 14px 50px; }
  .lh-topbar { padding: 8px 14px; }
  .lh-action-links { grid-template-columns: 1fr; }
  .lh-flow { flex-direction: column; align-items: flex-start; }
  .lh-flow div + div::before { content: '↓'; }
  .lh-index-list { grid-template-columns: 1fr; }
}
/* 弹窗模式：iframe 嵌入时只显示单个主题 */
body.lh-popup-mode { background: #fff; }
.lh-popup-mode .lh-main { margin-left: 0 !important; }
.lh-popup-mode .lh-content { padding: 14px 16px 20px; max-width: 100%; }
.lh-popup-mode .lh-topic { margin-bottom: 24px; }
.lh-popup-mode .lh-topic figure { display: none; }
.lh-popup-mode .lh-search-results { display: none !important; }

/* 帮助图标按钮：统一的 ？ 小图标，各页面字段标签右侧 */
.lz-help-ico { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #e0e7ff; color: #3b5bdb; font-size: 11px; font-weight: 700; cursor: pointer; border: none; vertical-align: middle; margin-left: 5px; flex-shrink: 0; line-height: 1; transition: background .15s; text-decoration: none; padding: 0; }
.lz-help-ico:hover { background: #c7d2fe; color: #1e3a8a; }
/* flex 容器内自动居中 */
.flex .lz-help-ico, .fd-l .lz-help-ico, .sec-h .lz-help-ico, .card-h .lz-help-ico { align-self: center; }

/* 帮助浮层 overlay */
.lz-help-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.lz-help-panel { background: #fff; border-radius: 14px; width: 92vw; max-width: 560px; height: 80vh; max-height: 700px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.lz-help-panel-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.lz-help-panel-head b { flex: 1; font-size: 14px; color: #1e293b; }
.lz-help-panel-head button { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; font-size: 20px; cursor: pointer; color: #64748b; display: flex; align-items: center; justify-content: center; }
.lz-help-panel-head button:hover { background: #f1f5f9; color: #1e293b; }
.lz-help-panel-head a { font-size: 12px; color: #3b5bdb; text-decoration: none; margin-right: 8px; }
.lz-help-panel iframe { flex: 1; border: none; width: 100%; }

@media (max-width: 768px) {
  .lz-help-panel { width: 100vw; max-width: 100vw; height: 90vh; max-height: 90vh; border-radius: 14px 14px 0 0; margin-top: auto; }
}

/* 打印 */
@media print {
  .lh-nav, .lh-topbar, .lh-nav-toggle, .lh-search-results, .lh-back { display: none !important; }
  .lh-main { margin-left: 0; }
  .lh-content { max-width: 100%; padding: 0; }
  .lh-topic { page-break-inside: avoid; }
  .lh-action { page-break-inside: avoid; }
  .lh-figure img { max-width: 100%; }
  .lh-zoom-overlay { display: none; }
}
