/* ============ 企业培训师AI教练 · 样式表（浅色主题） ============ */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #1c2530;
  --ink-2: #55616f;
  --ink-3: #8b97a5;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --brand: #1f6feb;
  --brand-d: #1558c9;
  --brand-l: #e8f0fe;
  --ok: #17864a;
  --ok-l: #e7f6ed;
  --warn: #a86a00;
  --warn-l: #fff5e0;
  --danger: #c62f3c;
  --danger-l: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 55, .05), 0 4px 14px rgba(16, 32, 55, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.spacer { flex: 1; }
.hint { color: var(--ink-3); font-size: 12.5px; line-height: 1.6; }
.err { color: var(--danger); }
.price { color: var(--danger); font-size: 18px; }
.orderno { font-family: Consolas, Menlo, monospace; color: var(--brand-d); letter-spacing: .5px; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: .16s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { border-color: #c6d3e2; background: #fbfdff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-d); border-color: var(--brand-d); }
.btn.ghost { background: #fff; }
.btn.danger { color: var(--danger); border-color: #f0c8c8; background: #fff; }
.btn.danger:hover { background: var(--danger-l); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.link { border: none; background: none; color: var(--brand); padding: 2px; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 10px 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], select, textarea {
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #fff;
  outline: none; transition: .16s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
textarea { resize: vertical; line-height: 1.6; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }

/* ---------------- 登录 ---------------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 500px at 50% -10%, #dfeaff 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 28px; box-shadow: var(--shadow); }
.auth-logo { font-size: 40px; text-align: center; }
/* 品牌 Logo（深底蓝色飞燕图，圆角展示） */
.auth-logo-img { display: block; width: 64px; height: 64px; margin: 0 auto; border-radius: 16px;
  box-shadow: 0 2px 10px rgba(16,32,55,.18); }
.auth-card h1 { font-size: 21px; text-align: center; margin: 8px 0 4px; }
.auth-sub { text-align: center; color: var(--ink-3); font-size: 12.5px; margin: 0 0 18px; }
.tabs { display: flex; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.tabs .tab { flex: 1; border: none; background: none; padding: 7px 4px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--ink-2); font-family: inherit; }
.tabs .tab.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input { width: 100%; }
.auth-form .row { margin: 0; }
.auth-form .row input { flex: 1; }
.auth-msg { min-height: 18px; font-size: 12.5px; color: var(--danger); text-align: center; margin: 8px 0 0; }

/* 用户协议勾选（知识产权保护） */
.auth-consent {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 12px 0 0; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2); cursor: pointer; user-select: none;
  transition: border-color .2s, background .2s;
}
.auth-consent input[type="checkbox"] { width: 15px; height: 15px; margin: 2px 0 0; flex: 0 0 auto; cursor: pointer; accent-color: var(--brand); }
.auth-consent b { color: var(--ink); }
.auth-consent a { color: var(--brand); text-decoration: none; }
.auth-consent a:hover { text-decoration: underline; }
.auth-consent.consent-warn { border-color: var(--danger); background: var(--danger-l); animation: consentShake .45s; }
@keyframes consentShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(3px); }
}

/* 页脚版权声明（常驻） */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; align-items: center;
  padding: 18px 16px 26px; margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3); text-align: center;
}
.site-footer .footer-links { display: flex; gap: 12px; }
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .hint { width: 100%; font-size: 11.5px; }

/* 输出水印（AI 回复 / 测评结果 / 导出物附来源标识） */
.wm-line {
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--ink-3); letter-spacing: .2px; word-break: break-all;
}

/* 后台：内容库迁移日志 */
.content-log {
  max-height: 240px; overflow: auto; margin-top: 10px; padding: 8px 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 12px; line-height: 1.7; color: var(--ink-2); word-break: break-all;
}

/* 记住账号密码 */
.remember-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: var(--ink); cursor: pointer; user-select: none;
}
.remember-row input[type="checkbox"] { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--brand); }
.remember-row em { font-style: normal; font-size: 11px; color: var(--ink-3); width: 100%; }

/* ---------------- 顶栏 ---------------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 0 18px; height: 58px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 15px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 26px; height: 26px; border-radius: 7px; display: block; box-shadow: 0 1px 4px rgba(16,32,55,.2); }
.main-tabs { display: flex; gap: 2px; overflow-x: auto; }
.main-tabs .tab { border: none; background: none; padding: 8px 13px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap; font-family: inherit; }
.main-tabs .tab:hover { background: var(--panel-2); }
.main-tabs .tab.active { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-email { font-size: 12.5px; color: var(--ink-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge { border: 1px solid #f0d9a8; background: var(--warn-l); color: var(--warn); font-size: 12px;
  padding: 3px 10px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.plan-badge.free { border-color: var(--line); background: var(--panel-2); color: var(--ink-2); }

.view { padding: 18px; max-width: 1360px; margin: 0 auto; }
.view-map { padding: 0; max-width: none; }

/* ---------------- 能力地图 ---------------- */
.map-layout { display: grid; grid-template-columns: 336px minmax(0, 1fr); height: calc(100vh - 58px); }
.map-side { border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.map-search { padding: 12px; border-bottom: 1px solid var(--line-2); }
.map-search input { width: 100%; }
.map-tree { overflow-y: auto; padding: 8px 8px 40px; flex: 1; }
.map-main { overflow-y: auto; padding: 20px 24px 60px; background: var(--bg); }

.tgroup { margin: 2px 0 2px 2px; }
.tgroup > summary { cursor: pointer; padding: 6px 8px; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--ink); display: flex; align-items: center; gap: 6px; list-style: none; }
.tgroup > summary::-webkit-details-marker { display: none; }
.tgroup > summary:hover { background: var(--panel-2); }
.tgroup > summary::before { content: "▸"; color: var(--ink-3); font-size: 10px; transition: .15s; }
.tgroup[open] > summary::before { transform: rotate(90deg); }
.tgroup.tsub { margin-left: 12px; }
.tgroup.tsub > summary { font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
.tcount { margin-left: auto; font-size: 11px; color: var(--ink-3); background: var(--panel-2);
  border-radius: 999px; padding: 1px 7px; font-weight: 500; }
.tico { font-size: 12px; }

.tnode { margin-left: 10px; }
.tsub2 { margin: 0 0 2px 14px; }
.tsub2 > summary { cursor: pointer; font-size: 11.5px; color: var(--ink-3); padding: 2px 6px; list-style: none; }
.tsub2 > summary::-webkit-details-marker { display: none; }
.tsub2 > summary::before { content: "▸ "; font-size: 9px; }
.tsub2[open] > summary::before { content: "▾ "; }
.tleaf { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: none;
  background: none; padding: 5px 8px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--ink); line-height: 1.4; flex-wrap: wrap; }
.tleaf:hover { background: var(--panel-2); }
.tleaf.active { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
.tleaf-tag { flex: none; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #eef4ff; color: var(--brand);
  border: 1px solid #d8e6ff; }
.tleaf-id { flex: none; font-family: Consolas, Menlo, monospace; font-size: 11px; color: var(--ink-3); }
.tleaf.active .tleaf-id { color: var(--brand-d); }
.tleaf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
/* 目录树叶节点保持单行紧凑：章节信息（章号+章名）已移到右侧「概览」展示 */
/* 概览里「对应教材章节 / 所属教材章节」芯片：点击直接跳到该章原文（全称较长，圆角矩形 + 可折行） */
.chip.chlink { color: var(--brand-d); border-color: #d8e6ff; background: #f5f9ff;
  border-radius: 9px; text-align: left; line-height: 1.5; max-width: 100%; }
.chip.chlink:hover { border-color: var(--brand); background: var(--brand-l); }

.map-empty { max-width: 720px; margin: 48px auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 28px 30px; box-shadow: var(--shadow); }
.map-empty h2 { margin: 0 0 10px; font-size: 20px; }
.map-empty p { color: var(--ink-2); }

/* 节点详情 */
.node-head { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.node-code { font-family: Consolas, Menlo, monospace; font-size: 12px; color: var(--brand-d); letter-spacing: .5px; }
.node-head h2 { margin: 4px 0 10px; font-size: 20px; line-height: 1.4; }
.node-task { margin-top: 10px; font-size: 13px; color: var(--ink-2); background: var(--panel-2);
  border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2);
  padding: 2px 9px; border-radius: 999px; }
.chip-btn { cursor: pointer; font-family: inherit; }
/* 芯片内的小编号：弱化显示，名称为主体，提升可读性 */
.chip-code { font-family: Consolas, Menlo, monospace; font-size: 10.5px; color: var(--ink-3);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.chip-btn:hover .chip-code { color: var(--brand-d); border-color: var(--brand); }
.chip-btn:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-l); }

.node-tabs { display: flex; gap: 4px; margin: 14px 0; flex-wrap: wrap; }
.node-tab { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.node-tab:hover { border-color: #c6d3e2; }
.node-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.ncol2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.ncard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.ncard.ncol2 { padding: 0; border: none; background: none; }
.ncard > h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.ncard.danger { border-color: #f3d3d3; background: #fffafa; }
.ncard.danger > h4 { color: var(--danger); }
.nlist { margin: 0; padding-left: 20px; }
.nlist li { margin: 4px 0; font-size: 13.3px; }
.ncard-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rel-line { margin: 6px 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.alink { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px;
  font-family: Consolas, Menlo, monospace; color: var(--brand-d); cursor: pointer; }
.alink:hover { background: var(--brand-l); border-color: var(--brand); }
.script-item { border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel-2); }
.script-head { font-size: 13px; margin-bottom: 5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.script-body { font-size: 13.3px; color: var(--ink); white-space: pre-wrap; }
.case-item { border-left: 3px solid #d8c6f5; padding: 6px 12px; margin-bottom: 8px; background: #fbf8ff; border-radius: 0 8px 8px 0; }
.case-item b { font-size: 13.3px; }
.case-item div { font-size: 12.6px; color: var(--ink-2); margin-top: 3px; }

/* ---------------- 提问 ---------------- */
.ask-wrap { display: flex; flex-direction: column; gap: 10px; }
.ask-log { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-height: 220px; max-height: 52vh; overflow-y: auto; }
.ask-bar { display: flex; gap: 10px; align-items: flex-start; }
.ask-bar textarea { flex: 1; }

/* ---------------- 教材 ---------------- */
.book-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.book-bar .chbtn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.book-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 14px; align-items: start; }
.book-nav { position: sticky; top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; max-height: 74vh; overflow-y: auto; }
.book-nav-item { display: block; font-size: 12.3px; color: var(--ink-2); text-decoration: none; padding: 4px 6px;
  border-radius: 6px; line-height: 1.45; }
.book-nav-item:hover { background: var(--panel-2); color: var(--brand-d); }
.book-nav-item.lv2 { padding-left: 8px; }
.book-nav-item.lv3 { padding-left: 18px; color: var(--ink-3); }
.book-body { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 26px; box-shadow: var(--shadow); }

/* ---------------- 工具 ---------------- */
.tool-bar { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; flex-wrap: wrap; }
.tool-group { margin: 18px 0 8px; font-size: 14px; color: var(--ink-2); }
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.tool-card.flash { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,111,235,.14); }
.tool-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.tool-purpose { margin: 6px 0; font-size: 13.3px; color: var(--brand-d); }
.tool-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.tag { font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 7px; color: var(--ink-2); }
.tool-sum { font-size: 13px; color: var(--ink-2); margin: 6px 0; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------------- 上传区 ---------------- */
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  transition: .16s; margin: 10px 0; }
.drop.over { border-color: var(--brand); background: var(--brand-l); }
.preview { font-size: 12.5px; }

/* ---------------- Markdown 排版 ---------------- */
.md-body { font-size: 14px; color: var(--ink); }
.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child { margin-bottom: 0; }
.md-h { line-height: 1.4; font-weight: 700; margin: 20px 0 8px; }
.md-h1 { font-size: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.md-h2 { font-size: 17.5px; color: var(--ink); }
.md-h3 { font-size: 15.2px; color: var(--ink); }
.md-h4, .md-h5, .md-h6 { font-size: 14px; color: var(--ink-2); }
.md-p { margin: 9px 0; line-height: 1.78; }
.md-ul, .md-ol { margin: 8px 0; padding-left: 24px; }
.md-ul li, .md-ol li { margin: 5px 0; line-height: 1.75; }
.md-ul { list-style: disc; }
.md-ul .md-ul { list-style: circle; }
.md-li-done { color: var(--ink-3); text-decoration: line-through; }
.md-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--brand);
  background: var(--brand-l); border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: 13.5px; }
.md-hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.md-pre { background: #0f172a; color: #e6edf6; border-radius: 10px; padding: 12px 14px; overflow-x: auto;
  font-size: 12.6px; line-height: 1.6; margin: 10px 0; }
.md-pre code { font-family: Consolas, Menlo, monospace; }
.md-body code { background: #eef2f7; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
  font-family: Consolas, Menlo, monospace; font-size: 12.5px; color: #b3306b; }
.md-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.md-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md-table th, .md-table td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  padding: 8px 11px; text-align: left; vertical-align: top; line-height: 1.6; }
.md-table th { background: var(--panel-2); font-weight: 600; color: var(--ink); white-space: nowrap; }
.md-table tr:last-child td { border-bottom: none; }
.md-table td:last-child, .md-table th:last-child { border-right: none; }
.md-table tr:hover td { background: #fbfdff; }
.md-body strong { color: #0d1a2b; }
.md-body a { color: var(--brand); }

/* ---------------- 对话 ---------------- */
.chat-mode-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.mode-btn { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.mode-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chat-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  height: calc(100vh - 330px); min-height: 300px; overflow-y: auto; box-shadow: var(--shadow); }
.msg { max-width: 88%; padding: 11px 15px; border-radius: 12px; margin: 10px 0; font-size: 14px; }
.msg.assistant { background: var(--panel-2); border: 1px solid var(--line-2); margin-right: auto; }
.msg.user { background: var(--brand); color: #fff; margin-left: auto; white-space: pre-wrap; }
.msg.user a { color: #fff; }
.msg-tools { margin-top: 8px; display: flex; gap: 6px; }
.caret { display: inline-block; width: 7px; height: 15px; background: var(--brand); vertical-align: -2px;
  margin-left: 2px; animation: blink 1s steps(2) infinite; border-radius: 1px; }
@keyframes blink { 0%,50% { opacity: 1 } 50.1%,100% { opacity: 0 } }
.chat-context { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  font-size: 12.5px; color: var(--ink-2); }
.atom-chip { display: inline-block; background: var(--brand-l); border: 1px solid #d8e6ff; color: var(--brand-d);
  border-radius: 999px; padding: 2px 10px; margin: 3px 4px 0 0; font-size: 12px; cursor: pointer; font-family: Consolas, monospace; }
.atom-chip.scene { background: #f4ecff; border-color: #e2d3ff; color: #6b3fc4; }
.atom-chip:hover { filter: brightness(.96); }
.chat-input-bar { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.chat-input-bar textarea { flex: 1; }

/* ---------------- 卡片 / 测评 ---------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.quiz-progress { color: var(--ink-3); font-size: 12.5px; margin-bottom: 10px; }
.q-stem { font-size: 15px; font-weight: 600; line-height: 1.7; margin-bottom: 10px; }
.q-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opt { display: block; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; cursor: pointer;
  font-size: 13.6px; line-height: 1.6; transition: .14s; }
.q-opt:hover { border-color: var(--brand); background: #fbfdff; }
.q-opt.selected { border-color: var(--brand); background: var(--brand-l); }
.q-opt.correct { border-color: #9bd9b4; background: var(--ok-l); }
.q-opt.wrong { border-color: #f2b8b5; background: var(--danger-l); }
.q-explain { margin-top: 12px; padding: 12px 14px; background: var(--panel-2); border-radius: 10px; font-size: 13px; }
.q-explain .ok { color: var(--ok); }
.q-explain .no { color: var(--danger); }
.quiz-actions { margin-top: 14px; }
.report-score { font-size: 32px; font-weight: 700; color: var(--brand-d); }
.report-line { font-size: 13.5px; color: var(--ink-2); margin: 6px 0; }
.wrong-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 13.4px; }
.wrong-item.resolved { opacity: .58; }
.wrong-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.wrong-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.radar-box { display: flex; justify-content: center; }

/* ---------------- 会员 ---------------- */
.vip-banner { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px;
  margin-bottom: 14px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow); }
.vip-plan { font-size: 17px; font-weight: 700; }
.vip-usage { display: flex; flex-direction: column; gap: 5px; min-width: 300px; }
.usage-item { display: flex; align-items: center; gap: 8px; font-size: 12.4px; color: var(--ink-2); }
.usage-item b { min-width: 132px; font-weight: 500; color: var(--ink); }
.usage-track { flex: 1; height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; min-width: 60px; }
.usage-fill { display: block; height: 100%; background: var(--brand); }
.usage-fill.full { background: var(--danger); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 20px;
  position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
.plan-tag { font-size: 11.5px; color: var(--brand-d); background: var(--brand-l); border-radius: 999px;
  padding: 2px 9px; align-self: flex-start; margin-bottom: 8px; }
.plan-card h3 { margin: 0 0 6px; font-size: 17px; }
.plan-price { font-size: 27px; font-weight: 700; margin: 4px 0; }
.plan-price .cur { font-size: 16px; }
.plan-price .unit { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.plan-perks { list-style: none; padding: 0; margin: 12px 0 16px; flex: 1; }
.plan-perks li { font-size: 12.9px; color: var(--ink-2); padding: 4px 0 4px 20px; position: relative; line-height: 1.6; }
.plan-perks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.sec-title { margin: 22px 0 10px; font-size: 15px; }
.pay-block { margin-top: 20px; }
.pay-flex { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.pay-qr { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 12px; display: flex;
  align-items: center; justify-content: center; background: var(--panel-2); position: relative; overflow: hidden; }
.pay-qr img { max-width: 100%; max-height: 100%; }
.pay-qr .pay-noimg { display: none; text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 14px; }
.pay-qr.noimg img { display: none; }
.pay-qr.noimg .pay-noimg { display: block; }
.pay-info { flex: 1; min-width: 260px; font-size: 13px; color: var(--ink-2); }
.buy-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-top: 16px; box-shadow: var(--shadow); }
.buy-card.ok { border-color: #9bd9b4; background: #f7fdf9; }
.redeem-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.redeem-card h3 { margin: 0 0 10px; font-size: 15.5px; }
.badge { font-size: 11.5px; border-radius: 999px; padding: 2px 9px; }
.badge.pending { background: var(--warn-l); color: var(--warn); }
.badge.paid { background: var(--ok-l); color: var(--ok); }
.badge.cancelled { background: var(--line-2); color: var(--ink-3); }

/* ---------------- 运营方联系方式卡片 ---------------- */
.contact-card { margin-top: 14px; border: 1px solid #cfe0ff; background: linear-gradient(180deg, #f5f9ff, #eef5ff);
  border-radius: 12px; padding: 13px 15px; font-size: 13px; color: var(--ink-2); }
.contact-hd { font-weight: 700; color: var(--brand-d); margin-bottom: 8px; font-size: 13.5px; }
.contact-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 5px 0; }
.contact-k { color: var(--ink-3); min-width: 48px; font-size: 12.5px; }
.contact-v { font-family: Consolas, Menlo, monospace; font-size: 15px; letter-spacing: .6px; color: var(--ink); }
.contact-row .btn.small { padding: 2px 10px; font-size: 12px; }
.contact-card .hint { display: block; margin-top: 4px; }
.contact-tpl { margin-top: 9px; padding-top: 9px; border-top: 1px dashed #cfe0ff; }
.tpl-text { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; color: var(--ink-2); margin: 6px 0; word-break: break-all; }
.contact-qr { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.contact-qr img { width: 118px; height: 118px; border-radius: 10px; border: 1px solid var(--line); background: #fff; object-fit: cover; }
.contact-qr.noimg img { display: none; }
.contact-qr .qr-fallback { display: none; }
.contact-qr.noimg .qr-fallback { display: block; }

/* ---------------- 管理后台 ---------------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.admin-head h2 { margin: 0; font-size: 20px; }
.admin-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-stat { background: linear-gradient(180deg, #f5f9ff, #eef5ff); border: 1px solid #cfe0ff; border-radius: 10px;
  padding: 9px 16px; font-size: 12.5px; color: var(--ink-3); }
.admin-stat b { display: block; font-size: 19px; color: var(--ink); margin-top: 2px; }
.admin-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.admin-form input, .admin-form select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.admin-form label { font-size: 13px; color: var(--ink-2); }
.admin-sec-title { font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.admin-err { color: var(--danger, #cf222e); font-size: 13px; }

/* 登录页底部联系方式 */
.auth-contact { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); text-align: center; }
.auth-contact-t { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.auth-contact-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }

/* ---------------- Toast ---------------- */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); background: #1c2530; color: #fff;
  padding: 11px 20px; border-radius: 10px; font-size: 13.4px; z-index: 999; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  max-width: 82vw; text-align: center; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .map-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .book-layout { grid-template-columns: 1fr; }
  .book-nav { position: static; max-height: 180px; }
}
@media (max-width: 820px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .main-tabs { order: 3; width: 100%; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-side { max-height: 300px; border-right: none; border-bottom: 1px solid var(--line); }
  .map-main { padding: 14px; }
  .view { padding: 12px; }
  .msg { max-width: 96%; }
}


/* ---------------- 启动屏（避免加载期白屏） ---------------- */
.boot-wrap {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f4f7fb 0%, #e8f0fe 100%);
  padding: 24px;
}
.boot-card {
  width: 100%; max-width: 460px; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 32px 26px;
}
.boot-logo { font-size: 40px; line-height: 1; }
.boot-logo-img { display: block; width: 72px; height: 72px; margin: 0 auto; border-radius: 18px;
  box-shadow: 0 2px 12px rgba(16,32,55,.2); }
.boot-card h1 { margin: 10px 0 18px; font-size: 20px; color: var(--ink); }
.boot-spinner {
  width: 26px; height: 26px; margin: 0 auto 14px;
  border: 3px solid var(--brand-l); border-top-color: var(--brand);
  border-radius: 50%; animation: bootspin .8s linear infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }
.boot-text { margin: 0; color: var(--ink-2); font-size: 13px; }
.boot-diag {
  margin-top: 16px; padding: 12px; text-align: left;
  background: var(--danger-l); border: 1px solid #f3c9c6; border-radius: 8px;
  color: #8f2530; font-size: 12px; line-height: 1.7;
  font-family: Consolas, Menlo, monospace; white-space: pre-wrap; word-break: break-all;
  max-height: 40vh; overflow: auto;
}


/* ---------------- 使用手册 ---------------- */
.manual-body { max-width: 960px; margin: 0 auto 24px; line-height: 1.85; }
.manual-body .md-body table { font-size: 13px; }
.manual-body .md-body h2 { margin-top: 26px; }
/* 正文中自动识别的手机号：可点击直接拨打 */
.md-tel { font-family: Consolas, Menlo, monospace; font-weight: 700; letter-spacing: .4px;
  text-decoration: none; border-bottom: 1px dashed currentColor; padding-bottom: 1px; }
