/* ===== Jumper 命题台 · 样式（浅色主题） ===== */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #e2e8ec;
  --border-strong: #cfd8dd;
  --text: #16232b;
  --text-2: #4a5b66;
  --text-3: #8394a0;
  --accent: #0f766e;
  --accent-strong: #0b5d57;
  --accent-soft: #e6f4f2;
  --accent-line: #b9ded9;
  --warn: #b45309;
  --warn-soft: #fef4e6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 32, 41, .05), 0 6px 18px rgba(16, 32, 41, .05);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

/* hidden 属性必须永远生效：
   .modal{display:grid} / .auth-form{display:flex} 等作者规则
   优先级高于 UA 的 [hidden]{display:none}，会导致弹窗关不掉、
   登录与注册表单同时显示。此规则强制一切带 hidden 的元素隐藏。 */
[hidden] { display: none !important; }

/* v20261005ae：原先 html/body 锁 height:100%，配合 .result-panel 的
   min-height:calc(100vh - 110px) + overflow:hidden，会让右栏变成唯一滚动容器，
   左栏（资料库等）内容一旦超过一屏就被裁掉并出现内嵌滚动条（用户截图反馈）。
   改为 min-height:100%：页面整体自然滚动，资料库所有内容直接完整可见。 */
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* 单枚标志：Jumper English（纯装饰，不加边框以免显得突兀） */
.brand-logo { flex-shrink: 0; display: flex; align-items: center; }
.brand-logo img {
  height: 40px; width: auto; max-width: 120px; object-fit: contain; display: block;
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: 17px; margin: 0 0 2px; color: var(--text); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text p { font-size: 12px; color: var(--text-3); margin: 0; }

/* 窄屏：缩小标志并隐藏副标题，避免顶栏被挤爆 */
@media (max-width: 1180px) {
  .brand-logo img { height: 32px; max-width: 96px; }
  .brand-text h1 { font-size: 15px; }
  .brand-text p { display: none; }
}
@media (max-width: 760px) {
  .brand-logo img { height: 26px; max-width: 78px; }
  .brand-text h1 { font-size: 13.5px; white-space: normal; }
}
/* 站点标题字号/行距微调（字号基准见上方 .brand-text h1） */
.brand-text h1 { letter-spacing: .2px; }
.brand-text p { margin: 1px 0 0; }
/* 顶栏按钮较多（额度徽标 + bug反馈 + 联系开发者 + 模型 + 后台 + 手册 + 记录 + 常见问题 + 充值 + 登录），
   窄屏时允许换行，避免按钮被挤出视口或互相重叠。 */
.topbar { flex-wrap: wrap; row-gap: 8px; }

/* ★ v20261019f：跳转主内容链接。
   默认移出视口（不是 display:none —— 那样键盘无法聚焦），
   Tab 聚焦时滑回左上角可见。 */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10001;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }
/* main 被 skip link 聚焦时不该再套一圈焦点框（跳转已由链接本身表达） */
#mainContent:focus { outline: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.model-picker { display: flex; align-items: center; gap: 6px; }
.model-picker label { font-size: 12px; color: var(--text-3); }
.model-picker select { max-width: 210px; }

/* ---------- 通用控件 ---------- */
select, input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 4px; cursor: pointer; }
textarea { resize: vertical; line-height: 1.6; }
select:focus, input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
label { display: block; font-size: 12px; color: var(--text-2); }
label > input, label > select { margin-top: 4px; }
.block-label { margin-top: 10px; }

.btn {
  font: inherit;
  font-weight: 550;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn-accent { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.btn-accent:hover:not(:disabled) { background: #d8ece9; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--text-3); }
/* v20261006e：参考资��面板顶部的一键预设 + 小号按钮 */
.btn-sm { padding: 5px 10px; font-size: 12px; }
.refs-preset-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.refs-reassure { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-mini { padding: 5px 11px; font-size: 12.5px; background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-mini:hover:not(:disabled) { color: var(--text); border-color: var(--text-3); }
.link-btn {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--accent);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-strong); }

/* ★ v20261019f：移动端放大行内小按钮的触控区。
   【实测问题】真机 390px 下有一批按钮高度不足 32px（Apple HIG 建议 44px）：
     #costInfoBtn h=23、#pickFileBtn h=21、#clearSourceBtn h=23、#toggleRefs h=19
     原因是 .link-btn 是 padding:0 的行内按钮，高度就等于文字高度。
   【为什么用伪元素而不是 padding】直接加 padding 会把行内按钮撑成块状、
     把同行文字挤开、排版全乱。伪元素 absolute 定位可以**只扩触控区、不改布局**。
   【为什么只在 ≤560px 生效】桌面端鼠标指针精确命中，且改布局的风险不值得；
     触屏才需要这块额外空间。*/
@media (max-width: 560px) {
  .link-btn { position: relative; }
  .link-btn::after {
    content: ''; position: absolute;
    /* 上下各扩 12px → 文字高 20px 变44px，正好达 HIG 建议值 */
    top: -12px; bottom: -12px; left: -6px; right: -6px;
  }
}

.hint { font-size: 12px; color: var(--text-3); margin: 6px 0 0; line-height: 1.55; }

/* 免费模型提醒：字号放大两档（12px → 16px）+ 鲜艳底色，边框高亮，视觉上无法忽略 */
.hint.hint-free {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
  color: #b42318;
  background: #fff4e0;
  border: 2px solid #ff9f1c;
  border-left-width: 7px;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0 0 10px;
  box-shadow: 0 2px 10px rgba(255, 159, 28, .22);
}
.hint.hint-free .free-a { color: #c2410c; font-weight: 800; }
.hint.hint-free .free-b { color: #b42318; font-weight: 800; }

/* v20261005x：左下角「耗时提示」改为醒目提醒框（与上方「当前模型…」同款视觉），
   字号 12px → 14px、加粗、橙色底 + 左侧粗边 + 投影，视觉上无法忽略。 */
.hint.hint-notice {
  font-size: 14px;
  line-height: 1.75;
  font-weight: 600;
  color: #b42318;
  background: #fff4e0;
  border: 2px solid #ff9f1c;
  border-left-width: 7px;
  border-radius: 10px;
  padding: 12px 15px;
  margin: 12px 0 0;
  box-shadow: 0 2px 10px rgba(255, 159, 28, .22);
}
.hint.hint-notice b { color: #c2410c; font-weight: 800; }

/* ---------- 左栏「本次使用的模型」 ----------
   很多用户不知道顶栏那个下拉就是换模型，所以把同一个下拉镜像到「开始命题」按钮正上方，
   视线不需要离开左栏即可换模型。 */
.model-panel {
  background: var(--bg, #f6f8fa);
  border: 1.5px solid var(--border-strong, #cbd5e1);
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px 11px;
  margin: 10px 0 8px;
}
.model-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.model-panel-label { font-size: 12.5px; font-weight: 650; color: var(--text); }
.model-panel-tip { margin: 6px 0 0; font-size: 11.5px; }
.model-panel-tip b { color: var(--text-2); }
#modelPanelSelect { font-weight: 600; }

/* ---------- 失败兜底：可一键点击的备选模型按钮 ---------- */
.fallback-models {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 12px;
}
.fallback-model-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 13px; min-width: 150px; text-align: left;
  border: 1.5px solid var(--border-strong, #cbd5e1); border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff); cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s;
}
.fallback-model-btn:hover { border-color: var(--accent, #0f766e); background: #f0fdfa; }
.fallback-model-btn b { font-size: 13.5px; color: var(--text); }
.fallback-model-btn .fm-cost { font-size: 12px; color: #b45309; font-weight: 600; }
.fallback-model-btn .fm-secs { font-size: 11.5px; color: var(--text-3); }
.fallback-model-btn .fm-rec { font-size: 11.5px; color: var(--accent, #0f766e); font-weight: 600; }

.row-between { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  /*★ v20261005ae：左栏上限 430 → 400（区间下限仍是原380，未改）。
     原因：推荐模型面板底部的提示文字需约 755px 才能排成一行，
     左栏每宽 1px，右栏就少1px —— 430px 时 1280px 笔记本右栏只剩 754px（差 1px 折行），
     收窄到 400px 后右栏有 784px，主流分辨率均可单行。
     左栏本身内容（题型按钮、输入框）380–400px 完全够用，不影响可用性。 */
  grid-template-columns: minmax(380px, 400px) 1fr;
  gap: 16px;
  padding: 16px 22px 28px;
  align-items: start;
  max-width: 1680px;
  margin: 0 auto;
}
/* 推荐指令面板已改为结果面板内的正常流卡片，不再遮挡左栏，故无需留白 */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.config-panel { padding: 18px; display: flex; flex-direction: column; gap: 20px; }

.field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.field-head h2 { font-size: 13.5px; letter-spacing: .3px; }
.step-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}
.field-head .link-btn { margin-left: auto; font-size: 12px; }

/* ---------- 题型 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.type-chip {
  text-align: left;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.type-chip:hover { border-color: var(--accent-line); color: var(--text); }
.tc-cost {
  display: block; font-style: normal; font-size: 11px;
  color: var(--text-3); margin-top: 3px; font-weight: 400;
}
.type-chip.active .tc-cost { color: var(--accent); }
.type-chip.costly { border-color: #f0d9b0; background: #fffdf7; }
.type-chip.costly .tc-cost { color: #b45309; font-weight: 600; }
.type-chip.costly.active { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.type-chip.costly.active .tc-cost { color: var(--warn); }
.type-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
}
.type-chip small { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.type-chip.active small { color: var(--accent); }

/* ---------- 素材 ---------- */
.drop-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  background: var(--surface-2);
  transition: all .15s;
}
.drop-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-main { margin: 0; font-size: 13px; color: var(--text-2); }
.drop-sub { margin: 6px 0 0; font-size: 11.5px; color: var(--text-3); }
.file-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fmeta { color: var(--text-3); font-size: 11px; }
.file-item .fdel { background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 15px; line-height: 1; padding: 0 2px; }
.file-item .fdel:hover { color: var(--danger); }
#sourceText { margin-top: 8px; font-size: 12.5px; }

/* ---------- 参数 ---------- */
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- 参考注入 ---------- */
.refs-list { display: flex; flex-direction: column; gap: 6px; }
.ref-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s;
}
.ref-item:hover { border-color: var(--accent-line); }
.ref-item.locked { background: var(--accent-soft); border-color: var(--accent-line); cursor: default; }
/* v20261005aj：强制档（课标三级词汇表 / 质量红线与自检门）——不挂就等于没有 */
.ref-forced { font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 6px;
  padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  background: #fee4e2; color: #b42318; }
/* v20261005ak：本题型「推荐加挂」的大部头资料 */
.ref-opt { font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 6px;
  padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  background: #fef3c7; color: #92400e; }
/* v20261006d：四档分级角标（仅 tier==='lock' 的行才灰显禁用，其余为正常可勾选行） */
.ref-required { font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 6px;
  padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  background: #e0f2fe; color: #0369a1; }
.ref-free { font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 6px;
  padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  background: #eceef1; color: #667085; }
.ref-item input { margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.ref-body { flex: 1; min-width: 0; }
.ref-name { font-size: 12.5px; font-weight: 550; color: var(--text); }
.ref-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.ref-size { font-size: 11px; color: var(--text-3); font-family: var(--mono); flex-shrink: 0; }

.context-meter { margin-top: 10px; }
.meter-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.meter-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .25s, background .25s; }
.meter-bar > div.warn { background: #d97706; }
.meter-bar > div.danger { background: var(--danger); }
#meterText { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

/* ---------- 操作 ---------- */
.actions { display: flex; gap: 10px; padding-top: 4px; border-top: 1px solid var(--border); }
.actions .btn-primary { flex: 1; padding: 11px; font-size: 14.5px; }
/* v20261005x：.hint-notice 已是带边框的独立提示框，不再用负边距上提 */
.legal { margin-top: 10px; }

/* ---------- 结果区 ---------- */
/* v20261005ae：结果面板改为随内容自然伸展，不再自成滚动容器。
   原min-height:calc(100vh - 110px) + overflow:hidden 会裁切左栏内容。 */
.result-panel { display: flex; flex-direction: column; min-height: calc(100vh - 110px); }
.result-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.dot.busy { background: var(--accent); animation: pulse 1.1s infinite ease-in-out; }
.dot.ok { background: #16a34a; }
.dot.err { background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.usage { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.toolbar-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* v20261005ae：结果区随内容伸展，取消内部滚动（由页面统一滚动） */
.result-area { flex: 1; padding: 26px 30px 60px; }

/* v20261005x：面板本身要铺到 1000px 放 5 个模型，故父级不再限宽；
   下方 h3 / 说明文字各自设 max-width 保持原有可读行长。 */
.empty-state { max-width: 100%; margin: 4vh auto 0; text-align: center; color: var(--text-3); }
.empty-icon {
  width: 54px; height: 54px; margin: 0 auto 16px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font: 700 26px/1 Georgia, serif;
}
.empty-state h3 { font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
.empty-state p { font-size: 13px; margin: 0 auto 10px; line-height: 1.7; max-width: 520px; }
.empty-note { font-size: 12px !important; color: var(--text-3); }

/* ---------- 推荐模型列表（v20261005v：一键换模型重生成） ----------
   v20261005x：5 个模型并列一行 + 字号整体放大一号
   ★ v20261005ae：解除 1000px 上限，改为铺满右栏。
     原1000px 上限让面板在 1280px 笔记本上只剩 790px，
     底下一行提示文字（13px 下约需 754px + 内边距）放不下而被迫折行。
     面板铺满 + 内边距 18→14px（省 8px）后，1280px 视口可用 784+8=792px > 754px，稳定单行。
     padding-bottom 14px 保留，避免底部提示贴边。 */
.pick-panel {
  width: 100%; max-width: none; margin: 0 auto 22px;
  padding: 16px 14px 14px;
  border: 1px solid var(--accent-soft); border-radius: 12px;
  background: var(--surface-2, #f8fafc); text-align: left;
  box-sizing: border-box;
}
.pick-head { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }

/* ★ v20261006f：使用说明面板（可折叠）—— 放在推荐模型块下方、§ 空状态上方
 * v20261006g：头部加高（padding 18px）+ 标题与提示升级为醒目样式，
 *            并加一条「开始命题前请先读」的醒目提醒条。 */
.usage-guide {
  width: 100%; max-width: none; margin: 0 auto 18px; box-sizing: border-box;
  border: 1px solid var(--border, #e2e8ec); border-radius: 12px;
  background: var(--surface-2, #f8fafc); text-align: left;
}
.usage-guide-head {
  cursor: pointer; list-style: none; user-select: none;
  padding: 20px 18px;                 /* 加高，向下铺开 */
  font-size: 14px; color: var(--text-2); line-height: 1.75;
}
.usage-guide-head::-webkit-details-marker { display: none; }
/* 标题「使用说明」升级为醒目胶囊 */
.ug-head-badge {
  display: inline-block; vertical-align: 2px;
  padding: 3px 10px; margin-right: 8px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
}
.ug-head-sub { font-weight: 700; color: var(--text); font-size: 14.5px; }
.usage-guide-toggle {
  display: inline-block; margin-left: 10px; padding: 2px 10px;
  border: 1px solid var(--accent-line, #cbd5e1); border-radius: 999px;
  color: var(--accent); font-size: 12.5px; font-weight: 600; vertical-align: 1px;
}
.usage-guide-head:hover { background: var(--accent-soft); border-radius: 11px; }
.usage-guide[open] .usage-guide-head { border-bottom: 1px solid var(--border, #e2e8ec); }
/* ★ v20261021a：使用说明取消折叠、常驻展开（改用静态 section 而非 details/summary）。
 * 下方四条把「可点开/收起」的视觉暗示全部去掉 —— 留 cursor:pointer 或 hover 高亮，
 * 用户会以为还能点，点了没反应反而是 bug；箭头 ▶ 也一并去掉（原先靠 [open] 旋转指示状态）。
 * 分隔线只保留 header 下的一条：body 原有的 border-top 与 header 的 border-bottom
 * 相邻会叠成 2px，常驻态下必须去重。 */
.usage-guide-static .usage-guide-head {
  cursor: default; user-select: auto;
  border-bottom: 1px solid var(--border, #e2e8ec);
  border-radius: 11px 11px 0 0;
}
.usage-guide-static .usage-guide-head:hover { background: none; }
.usage-guide-static .usage-guide-body { border-top: 0; padding-top: 2px; }
.usage-guide-static .ug-caret { display: none; }
/* 折叠态箭头：展开时旋转，指示当前状态 */
.ug-caret { display: inline-block; transition: transform .18s; }
.usage-guide[open] .ug-caret { transform: rotate(90deg); }
/* 折叠态的醒目提醒条：未读提示 */
.ug-remind {
  margin: 0 18px 16px; padding: 9px 12px;
  border-left: 3px solid #d97706; border-radius: 6px;
  background: #fffbeb; color: #92400e;
  font-size: 12.5px; line-height: 1.65;
}
.ug-remind b { color: #b45309; }
.usage-guide-toggle { color: var(--text-3); font-size: 12px; margin-left: 6px; }
.usage-guide-body { padding: 0 14px 14px; border-top: 1px solid var(--border, #e2e8ec); }
.ug-title { font-size: 13px; color: var(--text); margin: 14px 0 7px; }
.ug-steps { margin: 0; padding-left: 20px; }
.ug-steps li { font-size: 12.5px; line-height: 1.75; color: var(--text-2); margin-bottom: 3px; }
.ug-steps b { color: var(--text); }
.ug-table { width: 100%; border-collapse: collapse; margin: 4px 0 2px; }
.ug-table th, .ug-table td {
  border: 1px solid var(--border, #e2e8ec); padding: 7px 9px;
  font-size: 12px; line-height: 1.6; text-align: left; vertical-align: top;
}
.ug-table th { background: var(--surface-3, #f1f5f9); color: var(--text); font-weight: 600; white-space: nowrap; }
.ug-table td { color: var(--text-2); }
.ug-table td:first-child { white-space: nowrap; }
.ug-table b { color: var(--text); }
.ug-note { font-size: 12px; line-height: 1.7; color: var(--text-2); margin: 8px 0 0; }
.ug-note b { color: var(--text); }
.usage-guide-body .ref-forced,
.usage-guide-body .ref-required,
.usage-guide-body .ref-opt,
.usage-guide-body .ref-free { margin-left: 0; }
/* 5 个模型并列一行：grid 固定 5 列，窄屏再降到 3/2 列 */
.pick-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pick-item {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 10px 12px; min-width: 0; cursor: pointer;
  border: 1px solid var(--border, #e2e8ec); border-radius: 9px;
  background: #fff; text-align: left; font-family: inherit;
  transition: border-color .15s, background .15s, transform .1s;
}
.pick-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.pick-item:active { transform: scale(.98); }
.pick-item[disabled] { opacity: .5; cursor: not-allowed; }
.pick-item .pk-name { font-size: 14px; font-weight: 700; color: var(--text); }
.pick-item .pk-tag { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.pick-item .pk-cost { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.pick-item.is-current { border-color: var(--accent); background: var(--accent-soft); }
.pick-item.is-current .pk-name::after { content: ' · 当前'; font-size: 11.5px; color: var(--accent); font-weight: 400; }
.pick-item.is-failed { opacity: .55; }
.pick-item.is-failed .pk-name::after { content: ' · 刚失败'; font-size: 11.5px; color: #b42318; font-weight: 400; }
/* ★ v20261005ae 的原意（保留作对照）：
   「解除继承自 .empty-state p 的 520px 限制，让提示文字单行排布」——
   这个意图是对的，但**当时没生效**：`.empty-state p` 的特异性是 (0,1,1)，
   而 `.pick-tip` 只有 (0,1,0)，前者稳压后者。实测计算样式仍是 max-width:520px，
   而 white-space:nowrap 生效了 —— 于是文字需要 1200px 却被钉在 520px，
   戳出容器 680px，把整页撑出横向滚动条（实测 scrollWidth 1684 vs clientWidth 1409）。
 *   移动端因为 @media(max-width:860px) 兜底折行，所以只在桌面端暴露。
 *
 * ★ v20261019f 修正（两处）：
 *   ① 提高特异性到 (0,2,0)，压过 .empty-state p —— 用后代选择器而不是 !important，
 *      保持「靠结构表达优先级」的原有风格。
 *   ② white-space 由 nowrap 改为 normal —— 这是**根治**：
 *      原本「单行不折行」的意图在文字长达 1200px 时本就不现实，
 *      改回 normal 后无论容器多宽都不会溢出，问题从根上消失，
 *      下方两条 media 兜底断点也随之不再必需（仍保留，无害且防未来改动）。 */
.empty-state .pick-tip {
  font-size: 13px !important; color: var(--text-2, #475569);
  margin: 12px 0 0 !important; line-height: 1.7;
  max-width: none;          /* 解除继承自 .empty-state p 的 520px 限制 */
  text-align: left;         /* 父级是 text-align:center，提示需与上方列表左对齐 */
  white-space: normal;      /* 根治横向溢出：宁可折行，不撑破容器 */
}
/* 折行兜底（保留以防未来改动重新引入 nowrap）：窄屏下左对齐单行观感略差，故回正 */
@media (min-width: 1081px) and (max-width: 1180px) {
  .pick-tip { white-space: normal; }
}
@media (max-width: 860px) {
  .pick-tip { white-space: normal; }
}
.pick-tip b { color: var(--accent); }

/* 窄屏降列：保证手机上仍可读，不硬挤成一行 */
@media (max-width: 900px) {
  .pick-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .pick-list { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Markdown 渲染 ---------- */
.md { font-size: 14.5px; line-height: 1.78; color: var(--text); max-width: 940px; }
.md > *:first-child { margin-top: 0; }
.md h1 { font-size: 22px; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.md h2 { font-size: 18px; margin: 26px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.md h3 { font-size: 15.5px; margin: 20px 0 10px; color: var(--accent-strong); }
.md h4 { font-size: 14px; margin: 16px 0 8px; color: var(--text-2); }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 24px; }
.md li { margin-bottom: 5px; }

/* ---------- 选项行（六选五 A–F / 完形 A–D / 阅读 A–D） ----------
 * v20261005af：preprocessExamMarkdown() 保证每个备选项独占一个段落，
 * 这里负责让「一个备选项占一行」在视觉上足够清晰：
 *   · 左缩进 + 左侧竖线，与题干明显分层
 *   · 选项字母加粗，一眼能扫到 A/B/C/D
 *   · 组内第一条上边距略大，组间留白自然
 * 判定由 app.js 的 markOptionLines() 加 class 完成（CSS 无法按文本选元素）。 */
.md .md-opt {
  margin: 0 0 4px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent-soft);
  color: var(--text);
}
.md .md-opt-first { margin-top: 8px; }
.md li.md-opt { margin-left: 0; }
.md strong { font-weight: 650; color: var(--text); }
.md em { color: var(--text-2); }
.md code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 4px;
}
.md pre {
  background: #f6f8f9; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px; overflow-x: auto;
}
.md pre code { background: none; border: none; padding: 0; font-size: 12.5px; line-height: 1.65; }
.md blockquote {
  margin: 0 0 12px; padding: 10px 15px;
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #7c4a08;
}
.md blockquote p:last-child { margin-bottom: 0; }
.md table {
  border-collapse: collapse; width: 100%; margin: 0 0 16px;
  font-size: 13px; display: block; overflow-x: auto;
}
.md th, .md td { border: 1px solid var(--border-strong); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.md tbody tr:nth-child(even) { background: #fafcfc; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.md a { color: var(--accent); }

/* ---------- 弹窗 / 抽屉 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(18, 30, 37, .42);
  display: grid; place-items: center; padding: 20px;
}
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 18px 50px rgba(16, 32, 41, .22);
}
.modal-card h3 { font-size: 16px; margin-bottom: 6px; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

.tabs { display: flex; gap: 4px; margin: 16px 0 14px; background: var(--surface-2); padding: 3px; border-radius: var(--radius-sm); }
.tab {
  flex: 1; padding: 7px; font: inherit; font-size: 13px;
  background: none; border: none; border-radius: 6px;
  color: var(--text-2); cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--accent-strong); font-weight: 600; box-shadow: var(--shadow); }

.auth-form { display: flex; flex-direction: column; gap: 11px; }
.auth-form .btn { width: 100%; margin-top: 2px; }
.auth-form .link-btn { align-self: flex-start; font-size: 12.5px; }
.auth-form .btn-block { width: 100%; }
/* ---------- 邮箱验证码（v20261008） ---------- */
.otp-row { display: flex; gap: 8px; align-items: flex-end; }
.otp-row input { flex: 1; }
.otp-row .btn { width: auto; white-space: nowrap; }
.otp-label { flex: 1; }
/* 按钮与输入框等高，避免错位 */
.otp-send { height: 38px; padding: 0 12px; font-size: 12.5px; }
.otp-tip { margin: -4px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--text-3); }
.otp-row .btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 密码警示（醒目·警示级） ---------- */
.pwd-warn {
  margin: 4px 0 2px; padding: 12px 14px;
  background: #fff7ed;
  border: 2px solid #ea580c; border-left-width: 6px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(234, 88, 12, .12);
}
.pwd-warn > b {
  display: block; font-size: 15px; font-weight: 800; color: #c2410c;
  letter-spacing: .3px; margin-bottom: 5px;
}
.pwd-warn > span { display: block; font-size: 12.5px; line-height: 1.7; color: #7c2d12; }
.pwd-warn > span b { color: #c2410c; font-weight: 800; }
.pwd-warn .pwd-warn-tips {
  margin-top: 6px; padding-top: 6px; font-size: 12px; color: #9a3412;
  border-top: 1px dashed #fdba74;
}

/* ---------- 找回密码 ---------- */
.auth-switch { margin: 12px 0 0; text-align: center; font-size: 13px; }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.recover-pane { margin-top: 4px; }
.recover-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.recover-tab {
  flex: 1; font: inherit; font-size: 13px; cursor: pointer;
  padding: 7px 8px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.recover-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.recover-tip {
  background: #eff6ff; border-left: 3px solid #3b82f6; border-radius: 5px;
  padding: 8px 10px; font-size: 12px; line-height: 1.65; color: #1e3a8a; margin: 2px 0;
}
.auth-msg { margin-top: 12px; font-size: 12.5px; min-height: 18px; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--accent-strong); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 92vw);
  z-index: 85; background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(16, 32, 41, .14);
  display: flex; flex-direction: column;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.drawer-head h3 { font-size: 15px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px 30px; }

.hist-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 9px; background: var(--surface-2);
  cursor: pointer; transition: border-color .15s;
}
.hist-item:hover { border-color: var(--accent-line); }
.hist-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.hist-meta { font-size: 11.5px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.hist-actions { margin-top: 8px; display: flex; gap: 8px; }
.hist-actions .link-btn { font-size: 12px; }
.hist-actions .danger { color: var(--danger); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 120; max-width: 78vw;
  padding: 11px 20px; border-radius: 999px;
  background: #1f2f38; color: #fff; font-size: 13px;
  box-shadow: 0 10px 30px rgba(16, 32, 41, .28);
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--accent-strong); }

/* v20261020m：兑换成功醒目框（独立于折叠面板，明确告知已获积分） */
.invite-success {
  border: 1px solid #86efac; background: #ecfdf5; color: #065f46;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  margin: 2px 0 0;
}
.invite-success::before { margin-right: 2px; }

/* v20261020n：兑换结果居中弹窗（必现通知，替代易忽略的 toast） */
.redeem-card { text-align: center; max-width: 360px; }
.redeem-icon { font-size: 36px; line-height: 1; margin-bottom: 6px; }
.redeem-card h3 { margin: 0 0 8px; font-size: 18px; }
.redeem-card.ok h3 { color: var(--accent-strong); }
.redeem-card.err h3 { color: var(--danger); }
.redeem-body { color: var(--text); font-size: 14px; line-height: 1.7; margin: 0 0 18px; white-space: pre-line; }
.redeem-body b { color: var(--accent-strong); font-size: 15px; }
.redeem-ok { width: 100%; }

/* ---------- 任务执行步骤看板 ---------- */
#stageBox {
  margin: 0 0 12px; padding: 12px 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
}
.stage-head { font-size: 13px; font-weight: 600; color: var(--accent-strong); margin-bottom: 8px; }

/* 生成中醒目警示：免费模型额度耗尽 → 模型未返回正文 */
.stage-warn {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 15px; line-height: 1.6; font-weight: 800; color: #b42318;
  background: #fff4e0; border: 2px solid #ff9f1c; border-left-width: 7px;
  border-radius: 10px; padding: 10px 13px; margin: 0 0 10px;
  box-shadow: 0 2px 10px rgba(255, 159, 28, .22);
}
.stage-warn b { color: #c2410c; font-weight: 800; }
.stage-warn-ico { font-size: 17px; line-height: 1.35; color: #ff9f1c; flex: none; }

.stage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.stage-list li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.stage-list li .st-ico { font-size: 12px; width: 14px; text-align: center; }
.stage-list li.doing { color: var(--accent-strong); font-weight: 600; }
.stage-list li.doing .st-ico { animation: spin 1.1s linear infinite; display: inline-block; }
.stage-list li.done { color: var(--text-2); }
.stage-list li.done .st-ico { color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 生成前自检提醒（v20261005ae：已改为纯提示条，不再含任何按钮） ---------- */
.advice-box {
  margin: 0 0 10px; padding: 11px 13px;
  background: var(--warn-soft); border: 1px solid #f0d9b0;
  border-radius: var(--radius-sm);
}
/* 三种标题语义：err 红色（无法生成）/ warn 橙色（有提醒但不阻断）/ info 蓝色（纯说明） */
.adv-title { font-size: 13px; font-weight: 700; color: var(--warn); margin-bottom: 7px; }
.adv-title.err { color: var(--danger); }
.adv-title.warn { color: var(--warn); }
.adv-title.info { color: #0369a1; }
.adv-list { list-style: none; margin: 0 0 9px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.adv-list li { font-size: 12.5px; line-height: 1.55; padding-left: 9px; border-left: 3px solid var(--warn); }
.adv-list li.lv-block { border-left-color: var(--danger); }
.adv-list li.lv-block b { color: var(--danger); }
.adv-list li.lv-warn b { color: var(--warn); }
.adv-list li.lv-ok b { color: #0369a1; }
.adv-list li.lv-ok { border-left-color: #7dd3fc; }
.adv-list li span { display: block; color: var(--text-2); }
.adv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adv-actions .btn { font-size: 12.5px; padding: 6px 12px; }
/* v20261005ae：提示条内的列表不再有底部操作按钮，最后一项也无需留白 */
.advice-box .adv-list:last-child { margin-bottom: 0; }

/* ---------- 推荐指令（嵌入结果面板底部，正常文档流，不遮挡任何按钮） ---------- */
.prompt-panel {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 12px 18px 14px;
  max-height: 42vh;
  overflow: auto;
}
.pp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 9px;
}
.pp-toggle { font-size: 12px; font-weight: 500; }
.pp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 7px; }
.pp-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; font: inherit;
}
.pp-item:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.pp-item b { display: block; font-size: 12px; color: var(--accent-strong); margin-bottom: 3px; }
.pp-item span { display: block; font-size: 11.5px; line-height: 1.55; color: var(--text-2); }
.pp-foot { margin-top: 9px; font-size: 11px; color: var(--text-3); line-height: 1.5; }
.prompt-panel.collapsed .pp-list, .prompt-panel.collapsed .pp-foot { display: none; }

/* ---------- 今日免费额度 ---------- */
.quota-badge {
  font-size: 12px; color: var(--text-3);
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.quota-badge:empty { display: none; }
.quota-card { max-width: 400px; }
.quota-body {
  font-size: 13.5px; line-height: 1.75; color: var(--text-2);
  margin: 12px 0 18px; padding: 12px 14px;
  background: var(--surface-2); border-radius: var(--radius-sm);
}
.quota-body b { color: var(--accent-strong); font-size: 15px; }
.quota-pay-guide {
  margin-top: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.7;
  background: var(--surface-3, #f1f5f9); border-radius: var(--radius-sm, 8px);
  color: var(--text-2); text-align: left; font-weight: 400;
}
.quota-pay-guide b { font-size: 12.5px; color: var(--text); }
.quota-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- v20261007：新用户免费试用政策告知弹窗 ---------- */
.trial-card { max-width: 480px; }
.trial-hero {
  text-align: center; padding: 4px 0 14px;
  border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 14px;
}
.trial-hero-badge {
  display: inline-block; padding: 3px 12px; margin-bottom: 8px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: .5px;
}
.trial-hero h3 { font-size: 17px; margin: 0 0 6px; color: var(--text); }
.trial-hero-sub { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.trial-hero-sub b { color: var(--accent-strong); }
.trial-quota { display: flex; gap: 12px; margin: 0 0 14px; }
.trial-quota-col {
  flex: 1; text-align: center; padding: 12px 8px;
  background: var(--surface-2); border: 1px solid var(--accent-soft, #cbd5e1);
  border-radius: var(--radius-sm, 8px);
}
.trial-quota-num { font-size: 22px; font-weight: 800; color: var(--accent-strong); line-height: 1.2; }
.trial-quota-label { font-size: 12px; color: var(--text-3, #64748b); margin-top: 3px; }
.trial-why, .trial-note {
  font-size: 12.5px; line-height: 1.75; color: var(--text-2);
  margin: 0 0 10px; padding: 10px 12px;
  background: #fffbeb; border-left: 3px solid #d97706; border-radius: 6px;
}
.trial-note { background: var(--surface-2); border-left-color: var(--accent); }
.trial-why b, .trial-note b { color: var(--text); }
.trial-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ---------- 个人中心 ---------- */
.account-card { max-width: 640px; max-height: 88vh; overflow: auto; }
.acct-body { margin: 14px 0 4px; }
.acct-err { font-size: 13px; color: #b42318; margin: 0; }

.acct-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
@media (max-width: 560px) { .acct-cards { grid-template-columns: repeat(2, 1fr); } }
.acct-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.acct-card .ac-label { font-size: 11.5px; color: var(--text-3); }
.acct-card .ac-num { font-size: 19px; font-weight: 700; color: var(--text); line-height: 1.25; }
.acct-card .ac-num small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.acct-card .ac-num.ac-warn { color: #b45309; }
.acct-card .ac-sub { font-size: 11px; color: var(--text-3); }

.acct-progress { margin-bottom: 16px; }
.ap-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-2); margin-bottom: 5px;
}
.ap-track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ap-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.ap-fill.ap-full { background: #e24b4a; }
.ap-note { font-size: 11.5px; color: var(--text-3); margin: 6px 0 0; }

.acct-block { margin-bottom: 18px; }
.acct-block h4 {
  font-size: 13px; font-weight: 650; color: var(--text);
  margin: 0 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border);
}
.acct-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.acct-table th, .acct-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.acct-table th { color: var(--text-3); font-weight: 400; width: 92px; white-space: nowrap; }
.acct-table td { color: var(--text-2); }
.acct-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.acct-table .mono { font-family: var(--mono); font-size: 11.5px; }
.acct-table .cost { color: #b42318; font-weight: 600; }

/* 账号类型徽标 —— 体验账号 / 测试账号 / 普通用户 */
.acct-tier {
  display: inline-block; padding: 1.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.6; vertical-align: middle;
}
.acct-tier.tier-trial { background: #fff4e0; color: #b45309; border: 1px solid #ff9f1c; }
.acct-tier.tier-test  { background: #eef2ff; color: #3730a3; border: 1px solid #a5b4fc; }
.acct-tier.tier-user  { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.acct-tier-sub { margin-left: 7px; font-size: 11.5px; color: var(--text-3); }

/* 体验账号到期横幅 —— 与站内警示条同一视觉语言 */
.acct-expired {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 14px; padding: 11px 13px;
  font-size: 13px; line-height: 1.65; font-weight: 600;
  color: #b42318; background: #fff4e0;
  border: 1.5px solid #ff9f1c; border-left: 7px solid #ff9f1c;
  border-radius: 10px; box-shadow: 0 2px 8px rgba(255, 159, 28, 0.16);
}
.acct-expired b { color: #c2410c; font-weight: 800; }
.acct-expired .ax-ico { flex: none; font-size: 15px; line-height: 1.4; }
.acct-orders th, .acct-detail th { width: auto; color: var(--text-3); font-weight: 500; background: var(--surface-2); }
.acct-orders thead th, .acct-detail thead th { font-size: 11.5px; }
.acct-detail td { vertical-align: top; }

.acct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acct-chip {
  font-size: 12px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px;
}

.acct-timeline { display: flex; flex-direction: column; }
.atl-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.atl-time { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.atl-label { color: var(--text-2); flex: 1; min-width: 0; }
.atl-extra { color: var(--text-3); font-size: 11.5px; }
.atl-cost { color: #b42318; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.atl-cost.free { color: var(--text-3); }

/* v20261005al：消耗来源徽标 —— 区分「扣积分 / 用免费次数 / 免费模型 / 零扣费」
   三种零扣费情形必须视觉可辨，否则用户仍会把「免费次数」和「免费模型」当成一回事。 */
.fg-paid, .fg-free, .fg-model, .fg-unknown {
  font-size: 11.5px; padding: 1px 8px; border-radius: 99px; white-space: nowrap;
  display: inline-block; font-weight: 500;
}
.fg-paid { background: #fde8e6; color: #b42318; }
.fg-free { background: #e0f2fe; color: #0b4a6f; }
.fg-model { background: #e7f6ef; color: #0f6e56; }
.fg-unknown { background: #f2f4f7; color: #475467; }
.acct-gen .fg-paid, .acct-gen .fg-free,
.acct-gen .fg-model, .acct-gen .fg-unknown { white-space: nowrap; }
.fg-sub { color: var(--text-3); font-size: 11px; margin-top: 1px; }

.st { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.st-paid { background: #e7f6ef; color: #0f6e56; }
.st-pending, .st-submitted { background: #fdf3e3; color: #b45309; }
.st-rejected, .st-revoked { background: #fdecec; color: #b42318; }

.acct-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--border);
}

/* ---------- 充值 ---------- */
.pay-card { max-width: 420px; max-height: 88vh; overflow: auto; }
.pay-balance {
  font-size: 13px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; margin: 10px 0 14px;
}
.pay-balance b { color: var(--accent-strong); font-size: 16px; }
.pay-packages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.pay-pkg {
  cursor: pointer; font: inherit; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 4px;
}
.pay-pkg:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.pay-pkg.sel { background: var(--accent-soft); border-color: var(--accent); }
.pay-pkg b { display: block; font-size: 15px; color: var(--accent-strong); }
.pay-pkg span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.pay-custom { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.pay-custom input { margin-top: 5px; }
.pay-qr { text-align: center; margin-top: 6px; }
.pay-qr img { width: 190px; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; }
.pay-step { font-size: 12.5px; color: var(--text-2); margin: 8px 0 6px; }
.pay-no { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); word-break: break-all; margin: 6px 0; }
#paySubmitBtn { width: 100%; }

/* ---------- 联系开发者 ---------- */
.sup-card { max-width: 430px; max-height: 88vh; overflow: auto; }
/* ★ v20261013：离线副本列表列多，沿用 sup-card 会挤成一团，单独放宽 */
#offlineModal .modal-card { max-width: 640px; }

/* ---------- 离线副本（本机缓存） ---------- */
.off-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.off-table th, .off-table td {
  text-align: left; padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.6;
}
.off-table th { color: var(--text-3); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.off-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.off-table a { color: var(--accent-strong); text-decoration: none; }
.off-table a:hover { text-decoration: underline; }
.off-table td:first-child { word-break: break-all; }
.sup-promise {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 11px 13px; margin: 12px 0 14px;
}
.sup-promise b { display: block; font-size: 13.5px; color: var(--accent-strong); margin-bottom: 4px; }
.sup-promise span { display: block; font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.sup-row { display: flex; gap: 14px; align-items: flex-start; }
.sup-qr img { width: 128px; border: 1px solid var(--border); border-radius: 8px; display: block; }
.sup-info { flex: 1; min-width: 0; }
.sup-label { font-size: 12px; color: var(--text-3); margin: 0 0 3px; }
.sup-id { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); word-break: break-all; margin: 0 0 2px; }
.sup-name { font-size: 12.5px; color: var(--text-2); margin: 0 0 9px; }
.sup-order { margin-top: 12px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sup-no { font-family: var(--mono); font-size: 12.5px; word-break: break-all; margin: 0; color: var(--text); }
/* 多值联系方式清单（E-mail / WeChat / QQ / 地址），点标签即复制 */
.sup-contacts { margin-top: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.sup-crow { display: flex; gap: 10px; padding: 8px 12px; align-items: flex-start; }
.sup-crow + .sup-crow { border-top: 1px solid var(--border); }
.sup-ckey { flex: 0 0 46px; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.sup-cval { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.7; color: var(--text); word-break: break-all; }
.sup-ctag {
  font: inherit; font-family: var(--mono); font-size: 12.5px;
  padding: 2px 8px; margin: 1px 0; cursor: pointer;
  color: var(--text); background: var(--surface-2);
  border: 1px dashed var(--border); border-radius: 6px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.sup-ctag:hover { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); }
.sup-template {
  width: 100%; font: inherit; font-size: 12.5px; line-height: 1.6;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px; margin-bottom: 10px; background: var(--surface-2);
  color: var(--text-2); resize: vertical;
}
.pay-help { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); text-align: center; }
.pay-help .hint { margin: 0 0 7px; }

/* ---------- 在线客服聊天组件（源自 chat-system，改接云服务） ----------
 * z-index 必须低于 .modal(90) 与 .toast(120)，否则会盖住登录/充值等弹窗，
 * 导致用户点了「登录」后弹窗无法关闭（表现为"卡住没反应"）。
 * 同时容器本体 pointer-events:none，只有气泡与窗口接收点击。 */
.chat-widget {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  pointer-events: none;
}
.chat-widget > * { pointer-events: auto; }

.chat-button {
  display: inline-flex; align-items: center; gap: 7px;
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  background: linear-gradient(135deg, #0f766e, #14b8a6); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 118, 110, .42), 0 0 0 4px rgba(15, 118, 110, .10);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative; font: inherit;
}
.chat-button:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 30px rgba(15, 118, 110, .5), 0 0 0 6px rgba(15, 118, 110, .13); }
.chat-button.hidden { opacity: 0; pointer-events: none; transform: scale(.6); }
.chat-btn-text { font-size: 14px; font-weight: 600; white-space: nowrap; letter-spacing: .2px; }
.chat-badge {
  position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  border: 2px solid #fff;
}

/* 首次访问的拉新提示条 */
.chat-nudge {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--accent-line);
  border-radius: 999px; padding: 8px 10px 8px 15px; margin-bottom: 10px;
  box-shadow: 0 10px 28px rgba(16, 32, 41, .18);
  font-size: 13px; color: var(--text); white-space: nowrap;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.chat-nudge.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.chat-nudge button {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 5px 13px;
}
.chat-nudge button:hover { filter: brightness(1.1); }

/* 呼吸动效：吸引注意力（仅在未发现时启用） */
.chat-button.nudging { animation: chatBreathe 1.9s ease-in-out infinite; }
@keyframes chatBreathe {
  0%, 100% { box-shadow: 0 8px 24px rgba(15,118,110,.42), 0 0 0 4px rgba(15,118,110,.10); }
  50% { box-shadow: 0 10px 30px rgba(15,118,110,.55), 0 0 0 12px rgba(15,118,110,.03); }
}

.chat-window {
  position: absolute; right: 0; bottom: 66px;
  width: 344px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 130px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(16, 32, 41, .2);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.97);
  transition: opacity .2s ease, transform .2s ease;
}
.chat-window.open { opacity: 1; transform: translateY(0) scale(1); }

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; background: var(--accent); color: #fff; flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 9px; }
.chat-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.chat-title { font-size: 13.5px; font-weight: 600; }
.chat-status { font-size: 11px; opacity: .85; }
.chat-close {
  background: transparent; border: none; color: #fff; font-size: 21px;
  cursor: pointer; line-height: 1; padding: 0 3px; opacity: .85;
}
.chat-close:hover { opacity: 1; }

.chat-body { flex: 1; overflow-y: auto; padding: 12px; background: #f7f9fa; }

.chat-message { margin-bottom: 11px; display: flex; flex-direction: column; max-width: 84%; }
.chat-message.user { margin-left: auto; align-items: flex-end; }
.chat-message.bot, .chat-message.admin { align-items: flex-start; }
.chat-bubble {
  padding: 8px 11px; border-radius: 11px; font-size: 13px; line-height: 1.62;
  word-break: break-word; white-space: pre-wrap;
}
.chat-message.user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-message.bot .chat-bubble { background: #fff; color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.chat-message.admin .chat-bubble { background: #fffbeb; color: var(--text); border: 1px solid #fcd34d; border-bottom-left-radius: 3px; }
.chat-message.admin .chat-bubble::before { content: "开发者回复 · "; font-weight: 700; color: #b45309; font-size: 11.5px; }
.chat-time { font-size: 10.5px; color: var(--text-3); margin-top: 3px; padding: 0 3px; }

.chat-quick {
  display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 10px;
  background: #fff; border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-quick button {
  font: inherit; font-size: 11.5px; cursor: pointer; padding: 4px 9px;
  border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-2);
}
.chat-quick button:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }

.chat-footer { padding: 9px 10px 10px; background: #fff; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-area { display: flex; gap: 7px; align-items: flex-end; }
.chat-input {
  flex: 1; resize: none; max-height: 84px; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  font: inherit; font-size: 13px; line-height: 1.5; color: var(--text); background: #fff;
}
.chat-input:focus { outline: none; border-color: var(--accent-line); }
.chat-send {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent); color: #fff; border: none; cursor: pointer; font-size: 14px;
}
.chat-send:hover:not(:disabled) { filter: brightness(1.1); }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }
.chat-note { margin: 6px 0 0; font-size: 10.5px; color: var(--text-3); text-align: center; }

.chat-typing { display: flex; gap: 4px; padding: 3px 0; }
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-3);
  animation: chatTyping 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .18s; }
.chat-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes chatTyping { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 560px) {
  .chat-widget { right: 12px; bottom: 12px; }
  .chat-button { height: 44px; padding: 0 16px 0 13px; }
  .chat-btn-text { font-size: 13px; }
  .chat-window { width: calc(100vw - 24px); height: 66vh; bottom: 60px; }
  .chat-nudge { font-size: 12px; padding: 6px 8px 6px 12px; }
}

/* 极窄屏：只保留图标，避免占满屏宽 */
@media (max-width: 400px) {
  .chat-btn-text { display: none; }
  .chat-button { padding: 0; width: 46px; height: 46px; justify-content: center; border-radius: 50%; }
  .chat-nudge span { display: none; }
}

/* ---------- 模型消耗说明 ---------- */
.model-picker { position: relative; }
.cost-card { max-width: 720px; width: min(720px, calc(100vw - 40px)); }
.cost-table-box { max-height: 46vh; overflow: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cost-table th, .cost-table td { padding: 7px 9px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cost-table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); position: sticky; top: 0; z-index: 1; }
.cost-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* ★ v20261019c：表头不许竖排换行。
   「本次消耗」列内容变长后（如「约 171.26 积分」），浏览器会把「耗时」「质量」
   两个短表头压成竖排，一个字一行，很难读。表头统一 nowrap + 给足最小宽度。 */
.cost-table th { white-space: nowrap; }
.cost-table th.num, .cost-table td.num { min-width: 74px; }
.cost-table th:first-child, .cost-table td:first-child { min-width: 132px; }
.cost-table .note-cell { color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.cost-table tr.row-free { background: #f0fdf4; }
.cost-table tr.row-free td.num { color: #15803d; font-weight: 700; }
.cost-table tr.row-low { background: #fefce8; }
/* ★ v20261019c：消耗表的计算口径说明 —— 让用户一眼知道数字是按当前资料量算的 */
.cost-table-box .cost-basis {
  margin: 0 0 8px; padding: 8px 10px;
  background: var(--surface-2); border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm); font-size: 12px; line-height: 1.7;
}
/* 高消耗档（>50 积分）标红提示，别让用户稀里糊涂点下去 */
.cost-table tr.row-high td.num { color: #b91c1c; font-weight: 700; }
.cost-table tr.row-high { background: #fef2f2; }
.row-cur {
  font-size: 10px; background: var(--accent); color: #fff;
  border-radius: 3px; padding: 1px 5px; margin-left: 4px;
}
.cost-tip {
  background: var(--accent-soft); border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
}
.cost-tip code {
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; font-size: 11.5px; font-family: var(--mono);
}

/* ---------- 使用手册 ---------- */
.manual-card {
  max-width: 880px;
  width: min(880px, calc(100vw - 40px));
  display: flex; flex-direction: column;
  max-height: min(86vh, 900px);
}
.mn-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 0 10px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.mn-tab {
  font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 6px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  white-space: nowrap;
}
.mn-tab:hover { border-color: var(--accent-line); color: var(--text); }
.mn-tab.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); font-weight: 600; }

.mn-body { overflow: auto; padding: 4px 4px 12px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.mn-sec-h { font-size: 15px; font-weight: 700; color: var(--text); margin: 12px 0 8px; }
.mn-sec-b > p:first-child { margin-top: 0; }

.mn-ol, .mn-ul { margin: 6px 0; padding-left: 20px; }
.mn-ol li, .mn-ul li { margin-bottom: 5px; }
.mn-ul-tight li { margin-bottom: 8px; }
.mn-ul small { color: var(--text-3); line-height: 1.6; }
.mn-sub { font-size: 12.5px; color: var(--text-3); margin: 3px 0; }

.mn-tip {
  background: var(--accent-soft); border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 9px 12px; margin: 12px 0;
  font-size: 12.5px; line-height: 1.7; color: var(--text-2);
}
.mn-block { margin: 12px 0; }
.mn-block > b { color: var(--text); }

.mn-table th, .mn-table td { font-size: 12.5px; vertical-align: top; }
.mn-table td small { color: var(--text-3); }
.mn-row-warn { background: var(--warn-soft); }
.mn-warn { color: #b45309; font-size: 12px; line-height: 1.6; display: block; }

.mn-param { display: grid; gap: 12px; }
.mn-param-h {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.mn-param-h > b { color: var(--text); font-size: 13.5px; }

.mn-meter-note {
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 12px; margin: 10px 0;
  font-size: 12.5px; color: var(--text-2);
}
.mn-group { margin: 12px 0; }
.mn-group-h {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-weight: 700; color: var(--text); font-size: 13.5px;
  padding-bottom: 5px; border-bottom: 1px solid var(--border); margin-bottom: 7px;
}
.mn-count { font-weight: 400; font-size: 12px; color: var(--text-3); }
.mn-lock {
  font-size: 11px; font-weight: 600; color: var(--accent-strong);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 4px; padding: 1px 6px;
}
.mn-size { font-size: 11px; color: var(--text-3); font-weight: 400; }
.mn-refs { margin: 0; padding-left: 18px; }
.mn-refs li { margin-bottom: 7px; }
.mn-refs small { color: var(--text-3); }

.mn-qa > b { display: block; color: var(--text); margin: 14px 0 3px; font-size: 13.5px; }
.mn-qa > p { margin: 0 0 4px; }
.mn-qa > b:first-child { margin-top: 0; }

/* ---------- 通用确认弹窗（整套试卷二次确认等） ---------- */
.confirm-card { max-width: 520px; }
.confirm-body { font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.confirm-body .warn-line {
  display: block; color: var(--danger); font-weight: 700; font-size: 14.5px;
  background: var(--danger-soft, #fdf1f0); border-left: 3px solid var(--danger);
  padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 10px;
}
.cf-list { margin: 0 0 10px; padding-left: 20px; }
.cf-list li { margin-bottom: 6px; }
.cf-foot { font-size: 12px; color: var(--text-3); margin: 0; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- 命题质量 bug 反馈 ---------- */
.bug-ctx-box {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0;
}
.bug-ctx { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.bug-ctx li { margin: 0; }
.bug-ctx .bug-ctx-warn { color: #b45309; font-weight: 600; }
.bug-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.bug-label select, .bug-label textarea {
  display: block; width: 100%; margin-top: 5px; padding: 8px 10px;
  font: inherit; font-size: 13px; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
}
.bug-label textarea { resize: vertical; line-height: 1.6; }
.bug-send { margin-top: 4px; }
.bug-row { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- 生成后质量体检提示条 ---------- */
.len-warn {
  margin: 0 0 14px; padding: 11px 13px;
  background: var(--warn-soft); border: 1px solid #f0d9b0;
  border-left: 4px solid var(--warn); border-radius: var(--radius-sm);
}
.len-warn b { display: block; font-size: 13px; color: var(--warn); margin-bottom: 4px; }
.len-warn span { display: block; font-size: 12.5px; line-height: 1.6; color: var(--text-2); }

/* ===== 质检结论里的「下一步怎么做」醒目提示 =====
   用红底 + 加粗 + 大字号，是为了确保用户不会忽略这一条——
   看到它就必须知道：把指令粘进「特别要求」再跑一次。 */
.len-warn .act-tip {
  display: block; margin-top: 10px; padding: 11px 14px;
  background: #fef2f2; border: 2px solid #dc2626; border-radius: 7px;
  color: #991b1b; font-size: 15px; font-weight: 800; line-height: 1.75;
  letter-spacing: .2px;
}
.len-warn .act-tip b { display: inline; color: #dc2626; font-size: 15px; margin: 0; }
.len-warn .act-tip .arrow { color: #dc2626; font-weight: 900; padding: 0 2px; }
.len-warn .act-tip code {
  background: #fff; border: 1.5px solid #fca5a5; border-radius: 4px;
  padding: 1px 7px; font-size: 14px; font-weight: 800; color: #b91c1c;
  font-family: var(--mono);
}
.len-warn .act-tip kbd {
  background: #991b1b; color: #fff; border-radius: 4px;
  padding: 2px 7px; font-size: 13px; font-weight: 800;
}

/* ============================================================
 *  v20261005am · 红线实测面板（方案 B）
 * ============================================================
 * 设计取向与 .len-warn 刻意不同：
 *   .len-warn 是「模型自述体检」，语气偏警告；
 *   .lint-box 是「机器实测」，语气偏陈述 —— 因为数字摆在那里，不需要强调。
 * 三种色调靠左侧色条区分，不靠整块底色（整块底色会让长报告阅读疲劳）。
 */
.lint-box {
  margin: 0 0 14px; padding: 12px 14px 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.lint-box.lint-ok   { border-left-color: #15803d; background: #f4fbf6; border-color: #c9e6d3; }
.lint-box.lint-warn { border-left-color: var(--warn); background: #fffbf4; border-color: #f0dcbb; }
.lint-box.lint-bad  { border-left-color: var(--danger); background: #fffafa; border-color: #f3cdca; }

.lint-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 800; color: var(--text);
}
.lint-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%;
  font-size: 12px; font-weight: 900; color: #fff; flex: none;
}
.lint-ok   .lint-ico { background: #15803d; }
.lint-warn .lint-ico { background: var(--warn); }
.lint-bad  .lint-ico { background: var(--danger); }
.lint-scope {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 1px 10px;
}
.lint-hint { margin-top: 5px; font-size: 12px; line-height: 1.65; color: var(--text-3); }

.lint-rows { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.lint-row {
  padding: 8px 10px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
}
.lint-row-ok   { border-left-color: #22a06b; }
.lint-row-warn { border-left-color: var(--warn); background: #fffdf8; }
.lint-row-bad  { border-left-color: var(--danger); background: #fffafa; }

.lint-row-hd {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text);
}
.lint-mark { font-weight: 900; font-size: 12.5px; flex: none; width: 13px; }
.lint-row-ok   .lint-mark { color: #15803d; }
.lint-row-warn .lint-mark { color: var(--warn); }
.lint-row-bad  .lint-mark { color: var(--danger); }
.lint-row-hd b { font-size: 13px; font-weight: 700; }
.lint-tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--text-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 4px; padding: 0 5px;
}
.lint-cmp { margin-left: auto; font-size: 12px; color: var(--text-2); }
.lint-cmp b { font-family: var(--mono); font-size: 12.5px; }
.lint-row-bad .lint-cmp b { color: var(--danger); }
.lint-row-warn .lint-cmp b { color: var(--warn); }
.lint-row-ok .lint-cmp b { color: #15803d; }
.lint-detail { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.lint-note {
  margin-top: 4px; font-size: 11.5px; line-height: 1.6; color: var(--text-3);
  padding-left: 8px; border-left: 2px solid var(--border);
}

/* ── 专业审题报告排版（v20261021d · 七节 Markdown 渲染）────────── */
.review-report-wrap { margin-top: 14px; }
.review-report { text-align: left; }
.review-report h1 { font-size: 16px; font-weight: 700; margin: 14px 0 8px; text-align: center; }
.review-report h2 {
  font-size: 14px; font-weight: 700; margin: 18px 0 8px;
  padding-bottom: 5px; border-bottom: 1px solid var(--border);
}
.review-report h3 { font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.review-report p { margin: 6px 0; line-height: 1.7; }
.review-report ul, .review-report ol { margin: 6px 0; padding-left: 22px; }
.review-report li { margin: 3px 0; line-height: 1.7; }
.review-report table {
  border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 12px;
  display: table;
}
.review-report th, .review-report td {
  border: 1px solid var(--border); padding: 6px 8px;
  text-align: left; vertical-align: top; line-height: 1.6;
}
.review-report th { background: var(--surface-2, #f4f6f8); font-weight: 700; white-space: nowrap; }
.review-report td { word-break: break-word; }
.review-report blockquote {
  margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--border);
  color: var(--text-2); background: var(--surface);
}
.review-report code {
  font-family: var(--mono); font-size: 12px;
  background: var(--surface-2, #f4f6f8); padding: 1px 4px; border-radius: 4px;
}
.review-report strong { font-weight: 700; }

/* ── 机器盲区（v20261019i · D00）──────────────────────────────────
 * 用途：显式列出「机器原理上判不了」的红线，防止用户把
 *「机器可测项全部通过」误读成「所有红线都过了」。 */
.lint-blind {
  margin-top: 11px; padding: 10px 12px; border-radius: 8px;
  background: var(--warn-bg, #fffbeb); border: 1px solid var(--warn-border, #fcd34d);
}
.lint-blind-hd { font-size: 12.5px; font-weight: 700; color: #92400e; }
.lint-blind-tip { margin-top: 4px; font-size: 11.5px; line-height: 1.6; color: var(--text-2); }
.lint-blind-tip b { color: #92400e; }
.lint-blind-row {
  margin-top: 7px; padding: 7px 9px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; line-height: 1.6; color: var(--text-2);
}
.lint-blind-row b { color: var(--text-1); margin-right: 4px; }
.lint-blind-how { color: var(--text-3); font-size: 11.5px; }
.lint-blind-why { color: var(--text-3); font-size: 11.5px; }

.lint-act { margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.lint-act .btn-mini { font-size: 12.5px; font-weight: 700; }
.lint-act-tip { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.lint-brief {
  display: block; width: 100%; margin-top: 7px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 8px 10px; resize: vertical;
}

/*窄屏：实测/应为 两栏会挤在一起，改为上下行 */
@media (max-width: 900px) {
  .lint-cmp { margin-left: 0; width: 100%; }
  .lint-scope { margin-left: 0; }
}

/* ===== 独立审稿开关（方案 A）=====
   放在「开始命题」按钮正下方，字号与旁边提示一致 —— 它是提示不是主按钮，
   做成大按钮会让人误以为这是另一个主要操作。 */
.review-toggle {
  display: flex; align-items: center; gap: 7px;
  margin: 8px 0 0; cursor: pointer; user-select: none;
}
.review-toggle input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.review-toggle-txt { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.review-toggle:hover .review-toggle-txt { color: var(--text); }
/* v20261006：开关旁常驻设计说明 —— 把「久=设计」讲在决策点 */
.review-toggle-hint {
  margin: 6px 0 0; max-width: 660px;
  font-size: 12px; line-height: 1.6; color: #475467;
  background: #f8fafc; border: 1px solid #e5e9f0;
  border-left: 3px solid var(--accent, #2563eb); border-radius: 6px;
  padding: 6px 10px;
}
.review-toggle-hint b { color: #c2410c; font-weight: 700; }
/* v20261006：进度面板内的「独立审稿」设计说明卡（蓝底信息框，区别于橙色告警） */
.stage-info {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; line-height: 1.6;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 7px 10px; color: #1e3a8a;
}
.stage-info b { color: #1d4ed8; font-weight: 800; }
.stage-info-ico { font-size: 15px; line-height: 1.4; flex: none; }

/* ============================================================
 *  试卷视图（v20261009）—— 参照「深圳市 2024—2025 学年初三年级中考
 *  适应性考试·英语」原件版式
 *  实测规则：标题两行居中 / 说明栏斜体 / 大题居中加粗 / 小题左顶格
 *  / ____n____ 下划线 / 正文两端对齐首行缩进 / 四选项横向四栏
 *  / 篇章字母居中 / 页脚居中小字 / 单栏宽页边距
 * ============================================================ */
.exam-paper {
  /* A4 纸面：210×297mm，页边距照真题（左右约 22mm、上 18mm、下 16mm） */
  width: 210mm; min-height: 297mm;
  margin: 0 auto 18px;
  padding: 18mm 22mm 16mm;
  box-sizing: border-box;
  background: #fff; color: #000;
  /* 衬线体：照真题的印刷体观感 */
  font-family: "Times New Roman", "Songti SC", SimSun, "宋体", serif;
  font-size: 10.5pt; line-height: 1.55;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
  border-radius: 2px;
  position: relative;
}
/* ① 标题两行居中 */
.exam-paper .ex-head { text-align: center; margin-bottom: 6px; }
.exam-paper .ex-title {
  font-size: 14pt; font-weight: 700; color: #000;
  margin: 0 0 4px; letter-spacing: .5px; line-height: 1.4;
}
.exam-paper .ex-subject {
  font-size: 17pt; font-weight: 700; color: #000;
  letter-spacing: .8em; text-indent: .8em;   /* 「英 语」中间拉开 */
  margin: 0 0 8px; line-height: 1.3;
}
/* ② 说明栏：斜体小字（真题不是方框，是斜体段落） */
.exam-paper .ex-notice {
  font-size: 9pt; line-height: 1.7; color: #000;
  text-align: justify; margin: 0 0 10px;
  font-style: italic;
}
.exam-paper .ex-notice b { font-weight: 700; font-style: normal; }

/* ③ 大题标题：居中加粗（「第一部分  选择题（50 分）」）
   ⚠ 必须显式清掉 .md h2 的 border-left 与 padding-left —— 卷面里挂在
   #mdRoot(.md) 内，会继承网页视图的「左侧竖线 + 缩进」，真题没有这道竖线。 */
.exam-paper .ex-part,
.exam-paper .ex-sec {
  border-left: 0; padding-left: 0; background: none;
  font-family: inherit; letter-spacing: normal; text-indent: 0;
}
.exam-paper .ex-part {
  font-size: 11.5pt; font-weight: 700; color: #000;
  text-align: center; margin: 12px 0 8px; line-height: 1.5;
}
/* ④ 小题标题：左顶格加粗含分值（「I.  完形填空（10 分）」） */
.exam-paper .ex-sec {
  font-size: 10.5pt; font-weight: 700; color: #000;
  text-align: left; margin: 10px 0 4px; line-height: 1.5;
}
/* ⑤ 指令行：中文说明，比正文略小 */
.exam-paper .ex-dir {
  font-size: 9.5pt; line-height: 1.7; color: #000;
  margin: 2px 0 6px; text-align: justify;
}
/* ⑧ 篇章字母标题：居中加粗（A / B / C） */
.exam-paper .ex-passage-no {
  font-size: 11pt; font-weight: 700; text-align: center;
  margin: 10px 0 6px; letter-spacing: .3em; text-indent: .3em;
}

/* ⑥ 正文：两端对齐 + 首行缩进 2 字符 */
.exam-paper .ex-p {
  font-size: 10.5pt; line-height: 1.55; color: #000;
  text-align: justify; text-indent: 2em;
  margin: 0 0 4px;   /* 真题段落间距很紧 */
}
.exam-paper .ex-p.no-indent { text-indent: 0; }

/* ⑤ 答题下划线：序号嵌在下划线中间 ____1____ */
.exam-paper .ex-blank {
  display: inline-block; position: relative;
  min-width: 3.2em; height: 1.05em;
  vertical-align: baseline; margin: 0 .12em;
  border-bottom: 1px solid #000;
  line-height: 1.05em; text-align: center;
}
.exam-paper .ex-blank-n {
  position: relative; top: 0; font-size: 10pt; line-height: 1.05;
  background: #fff; padding: 0 .15em; color: #000;
}

/* ⑦ 四选项横向四栏（照真题第 2 页，整行铺满） */
.exam-paper .ex-opts {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0 1.6em;              /* 选项间距 */
  margin: 2px 0 6px;
  font-size: 10.5pt; line-height: 1.55;
  break-inside: avoid; page-break-inside: avoid;
}
.exam-paper .ex-opt { white-space: nowrap; }
.exam-paper .ex-opt-no { font-weight: 700; }

/* ⑨ 页脚：居中小字 */
.exam-paper .ex-footer {
  position: absolute; left: 0; right: 0; bottom: 8mm;
  text-align: center; font-size: 8pt; color: #000;
  font-family: "Times New Roman", "Songti SC", SimSun, serif;
}
/* 附页（答案解析） */
.exam-paper.exam-appendix { margin-top: 8px; }
/* 附页内 markdown 渲染出来的元素去掉首行缩进（答案表不该缩进） */
.exam-appendix .ex-body > * { text-indent: 0; }
.exam-appendix .ex-body table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.exam-appendix .ex-body th, .exam-appendix .ex-body td { border: 1px solid #999; padding: 3px 5px; }

/* 视图切换：试卷视图下隐藏网页视图的零散块 */
.exam-mode .md-opt, .exam-mode .md-opts { display: none; }

/* ---------- 打印：直接 Ctrl+P 就是一张真实试卷 ---------- */
@media print {
  body * { visibility: hidden !important; }
  .exam-paper, .exam-paper * { visibility: visible !important; }
  .exam-paper {
    position: absolute; left: 0; top: 0;
    width: 100%; min-height: auto;
    margin: 0; padding: 0;
    box-shadow: none; border-radius: 0;
  }
  @page { size: A4; margin: 18mm 22mm 16mm; }
  .exam-paper { page-break-after: always; }
  .exam-paper:last-child { page-break-after: auto; }
  /* 分页时不要把标题和小题拆散 */
  .exam-paper .ex-part, .exam-paper .ex-sec,
  .exam-paper .ex-passage-no, .exam-paper .ex-opts { page-break-after: avoid; }
}
/* v20261009 补充：卷面元素统一隔离掉网页视图（.md 容器）的继承样式。
 * 背景：卷面挂在 #mdRoot.md 内，.md 的 h2/p/table 都带边框、背景、缩进，
 * 打印出来会像网页截图而不是试卷。这里一次性兜底。 */
.exam-paper .ex-p,
.exam-paper .ex-dir,
.exam-paper .ex-opt,
.exam-paper .ex-passage-no {
  border: 0; background: none; padding: 0; margin: 0;
  font-family: inherit; letter-spacing: normal;
}
.exam-paper .ex-p { margin: 0 0 4px; }
.exam-paper .ex-dir { margin: 2px 0 6px; }
.exam-paper .ex-passage-no { margin: 10px 0 6px; }
.exam-paper .ex-head p, .exam-paper .ex-head div { border: 0; background: none; }
.exam-paper table { border-collapse: collapse; }
.exam-paper td, .exam-paper th { border: 1px solid #000; padding: 2px 5px; }
/* v20261009 收尾：① 标题继承 .md h1 的下边框 → 去掉（真题标题下无线） */
.exam-paper .ex-title {
  border: 0; padding: 0; margin: 0 0 4px;
  font-family: inherit; background: none;
}
/* ② 页脚：去掉「打印时自动分页」提示，改为正式页码占位（真实页码由打印引擎给出） */
.exam-paper .ex-footer { letter-spacing: .1px; }

/* ============================================================
   ★ v20261015 · 资源点健康探针（绿/黄/红三档）
   放在 admin.html 的 <style> 里会随页面重绘丢失，这里独立成文件由 admin.html 引入。
   ============================================================ */
.hp-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border-radius: 12px; border: 1px solid;
  margin-bottom: 12px;
}
.hp-green { background: #f0fdf4; border-color: #86efac; }
.hp-amber { background: #fffbeb; border-color: #fcd34d; }
.hp-red{ background: #fef2f2; border-color: #fca5a5; }

.hp-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; margin-top: 4px;
}
.hp-green .hp-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.16); }
.hp-amber .hp-dot { background: #d97706; box-shadow: 0 0 0 4px rgba(217,119,6,.16); }
.hp-red   .hp-dot { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.16); }

.hp-main { flex: 1; min-width: 0; }
.hp-main > b { display: block; font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.hp-green .hp-main > b { color: #14532d; }
.hp-amber .hp-main > b { color: #78350f; }
.hp-red   .hp-main > b { color: #7f1d1d; }

.hp-sub { font-size: 13px; line-height: 1.65; color: #475569; margin-bottom: 4px; }

.hp-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.hp-stats span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.06);
  font-size: 12px;
}
.hp-stats i{ font-style: normal; color: #64748b; }
.hp-stats em { font-style: normal; font-weight: 500; color: #0f172a; }

.hp-note {
  padding: 12px 14px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 12.5px; line-height: 1.8; color: #475569;
}
.hp-note b { color: #1e293b; font-weight: 500; }

/* ============================================================
 * ★ v20261016：用户档案弹窗
 * 诉求：管理员要「精准把握用户记录与消费行为」，内容多且需要滚动，
 * 所以比默认 modal 宽、独立滚动，头部固定。
 * ============================================================ */
.modal-card.up-modal {
  max-width: 880px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.up-body {
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
  flex: 1 1 auto;
}
/* 密码不可还原的说明区—— 必须显眼，因为这是最容易被误解为「功能缺失」的地方 */
.up-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12.5px;
  line-height: 1.85;
  color: #78350f;
}
.up-note b { color: #92400e; }
.up-note code {
  font-size: 11.5px;
  background: #fef3c7;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* 注册信息网格：两列铺开，避免长行 */
.up-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 14px;
}
.up-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
}
.up-kv span { color: #64748b; flex: 0 0 auto; }
.up-kv b {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  min-width: 0;
}
.up-body .usage-cards { margin-top: 0; }
.up-body .table-scroll { max-height: none; }

/* ========== v20261016c：健康探针「重新检测」按钮 ==========
   起因：云函数即时生效，但页面里渲染好的报错不会自己消失。
   用户修好云端后看到的仍是旧报错，只能刷新整页，且分不清新旧。 */
.hp-retry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
}
.hp-retry-btn {
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 7px 15px;
  border-radius: 8px;
  border: 1px solid #fca5a5;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.hp-retry-btn:hover { background: #fef2f2; border-color: #f87171; }
.hp-retry-btn:active { background: #fee2e2; }
.hp-retry-btn:focus-visible { outline: 2px solid #dc2626; outline-offset: 2px; }
.hp-retry-hint { font-size: 12px; color: #94a3b8; line-height: 1.5; }

/* 重试期间的呼吸点，让用户知道真的在跑 */
.hp-dot.hp-pulse { animation: hpPulse .9s ease-in-out infinite; }
@keyframes hpPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .hp-dot.hp-pulse { animation: none; }
}

/* ============================================================
   v20261017：题库导入（组卷功能）
   ============================================================ */
/* v20261018：原来的 .btn-assemble 专用紫色已删除——
   用户要求「开始组卷」与「开始命题」样式完全一致，
   两个键同为btn-primary，只有文案不同。 */
.assemble-tip { font-size: 12px; color: #64748b; line-height: 1.5; }
.assemble-tip b { color: #3c3489; }

.modal-card.bank-modal {
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  width: 100%;
}

/* —— 步骤条 —— */
.bank-steps {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 16px; padding-bottom: 12px;
  border-bottom: 0.5px solid var(--color-border-tertiary, #e2e8f0);
}
.bank-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #534ab7; flex: none;
}
.bank-step { font-size: 12px; color: #64748b; }
.bank-step-sep { font-size: 12px; color: #cbd5e1; }

/* —— 上传区 —— */
.bank-radio-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.bank-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

.bank-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 30px 16px; cursor: pointer;
  border: 1px dashed #a5b4fc; border-radius: var(--border-radius-lg, 12px);
  background: #f8fafc; text-align: center;
  transition: background .15s, border-color .15s;
}
.bank-drop:hover { background: #eef2ff; border-color: #7f77dd; }
.bank-drop b { font-size: 14px; font-weight: 500; color: #3c3489; }
.bank-drop span { font-size: 12px; color: #64748b; word-break: break-all; }

#bankFallbackWrap { margin-top: 14px; }
#bankFallbackWrap summary { font-size: 13px; color: #534ab7; cursor: pointer; margin-bottom: 8px; }
#bankTextFallback {
  width: 100%; font-size: 13px; line-height: 1.6; padding: 10px;
  border: 0.5px solid #e2e8f0; border-radius: 8px; font-family: var(--font-mono, monospace);
  margin-bottom: 8px; resize: vertical;
}

/* —— 纠正区 —— */
.bank-sum { font-size: 13px; color: #334155; margin-bottom: 10px; }
.bank-filter-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.bank-filter-row .hint { font-size: 12px; }
.bank-fix-tip { color: #854f0b !important; flex: 1; min-width: 220px; }

.bank-list { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.bank-block {
  border: 0.5px solid #e2e8f0; border-radius: var(--border-radius-lg, 12px);
  padding: 12px 14px; margin-bottom: 12px; background: #fff;
}
.bank-block-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bank-block-no {
  font-size: 12px; color: #fff; background: #534ab7;
  padding: 2px 9px; border-radius: 999px; flex: none;
}
.bank-sel-type, .bank-sel-dif, .bank-inp-score, .bank-inp-seq, .bank-inp-ans {
  font: inherit; font-size: 13px; padding: 5px 8px;
  border: 0.5px solid #cbd5e1; border-radius: 6px; background: #fff;
}
.bank-inp-score { width: 72px; }
.bank-inp-seq { width: 100px; }
.bank-lb-dif, .bank-lb-score { font-size: 12px; color: #64748b; display: inline-flex; align-items: center; gap: 5px; }
.bank-btn-del {
  margin-left: auto; font: inherit; font-size: 12px;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  border: 0.5px solid #fca5a5; background: #fff; color: #b91c1c;
}
.bank-btn-del:hover { background: #fef2f2; }

.bank-field { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.bank-field > label {
  font-size: 12px; color: #64748b; flex: none;
  width: 56px; padding-top: 6px;
}
.bank-txt-stem, .bank-txt-opt, .bank-txt-ana {
  flex: 1; font: inherit; font-size: 13px; line-height: 1.6;
  padding: 8px; border: 0.5px solid #cbd5e1; border-radius: 6px; resize: vertical;
}
.bank-inp-ans { flex: 1; }

.bank-ed { margin: 8px 0; }
.bank-ed summary {
  font-size: 12px; color: #534ab7; cursor: pointer; padding: 4px 0;
}
.bank-preview {
  font-size: 12px; line-height: 1.6; color: #64748b;
  background: #f8fafc; border-radius: 6px; padding: 8px;
  margin: 6px 0 0; white-space: pre-wrap; word-break: break-word;
  max-height: 92px; overflow: hidden;
}

.bank-warn {
  font-size: 13px; line-height: 1.7; color: #7f1d1d;
  background: #fef2f2; border: 0.5px solid #fca5a5;
  border-radius: 8px; padding: 12px 14px;
}
.bank-warn-ok {
  font-size: 14px; line-height: 1.7; color: #14532d;
  background: #f0fdf4; border: 0.5px solid #86efac;
  border-radius: 8px; padding: 14px 16px; margin-bottom: 12px;
}

.bank-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 14px; padding-top: 12px;
  border-top: 0.5px solid #e2e8f0;
}

/* —— toast —— */
.bank-toast {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: 13px; padding: 8px 16px; border-radius: 8px;
  background: #334155; color: #fff; opacity: 0; pointer-events: none;
  transition: opacity .2s; max-width: 90%; text-align: center;
}
.bank-toast.show { opacity: 1; }
.bank-toast.ok { background: #15803d; }
.bank-toast.bad { background: #b91c1c; }
.bank-modal { position: relative; }

@media (max-width: 640px) {
  .bank-field { flex-direction: column; gap: 4px; }
  .bank-field > label { width: auto; padding-top: 0; }
  .bank-btn-del { margin-left: 0; }
}

/* ============================================================
   v20261018：组卷页（用户侧从公共题库选题）
   ============================================================ */
/* [hidden] 必须显式生效：JS 用 hidden 属性控制显隐，
   而 .chat-button.hidden 是另一套类名写法，两者不能互相覆盖。 */
[hidden] { display: none !important; }

/* —— 两个功能键同行、样式与「开始命题」完全一致 —— */
.actions-row { margin-top: 10px; }
.actions-row .btn { flex: 1; padding: 11px; font-size: 14.5px; }
.actions-tip { margin: 6px 0 0; }

.modal-card.as-modal {
  max-width: 1080px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* —— 顶部筛选工具条 —— */
.as-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.as-select, .as-input {
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.as-input { flex: 1; min-width: 140px; }

/* —— 主体两栏：题块列表 + 缺口侧栏 —— */
.as-main {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  padding-top: 12px;
}
.as-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  min-height: 240px;
}
.as-side {
  width: 244px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding-left: 14px;
  overflow-y: auto;
}
.as-side-title { margin: 0 0 8px; font-size: 13px; font-weight: 500; }

/* —— 分数缺口表 —— */
.as-gap { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.as-gap th, .as-gap td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.as-gap th { color: var(--text-2); font-weight: 500; }
.as-gap td.num, .as-gap th.num { text-align: right; }

/* —— 题块卡片 —— */
.as-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface);
}
.as-item.on { border-color: var(--accent); background: var(--accent-soft); }
.as-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-wrap: wrap;
}
.as-item-type { font-weight: 500; font-size: 13.5px; }
.as-badge {
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.as-badge-score { color: var(--accent-strong); }
.as-item-body { margin-top: 8px; }
.as-seq { margin: 0 0 4px; font-size: 12px; color: var(--text-2); }
.as-title { margin: 0 0 6px; font-size: 13px; font-weight: 500; }
.as-stem, .as-opts pre, .as-ans pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.as-opts, .as-ans { margin-top: 6px; }
.as-opts summary, .as-ans summary {
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.as-opts pre, .as-ans pre {
  margin-top: 6px;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 6px;
}

.as-empty { padding: 30px 10px; text-align: center; }
.as-empty b { font-size: 14px; }

/* —— 侧栏汇总与生成 —— */
.as-sum { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.as-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--text-2);
}
.as-sum-row b { color: var(--text); }
.as-sum-barwrap {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 6px;
}
.as-sum-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.as-sum-bar.full { background: #639922; }
.as-sum-tip { margin: 0 0 10px; }
.as-build { width: 100%; }

/* —— 结果区 —— */
.as-result {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  max-height: 42vh;
  display: flex;
  flex-direction: column;
}
.as-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.as-result-head h4 { margin: 0; font-size: 13.5px; font-weight: 500; }
.as-paper {
  margin: 0;
  overflow-y: auto;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2);
  padding: 12px;
  border-radius: 8px;
}

/* —— 提示条 —— */
.as-toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c2c2a;
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 100;
  max-width: 80vw;
}
.as-toast.show { opacity: 1; }

@media (max-width: 860px) {
  .as-main { flex-direction: column; }
  .as-side { width: 100%; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 12px; }
  .as-list { max-height: 46vh; }
}

/* ============================================================
   v20261019· 组卷后的 AI 审题（可选项）
   ============================================================
   设计要点：这一块必须**看起来就是可选项**，不能有任何「必做」的暗示。
   ① 复选框默认不勾，按钮初始 disabled，用户不主动勾就点不动；
   ② 说明文字先讲「不勾选完全不扣分」，再讲勾选后的价格 —— 先给安心，再给价；
   ③ 按钮与复选框并排，视觉上是一个整体动作，而不是额外的流程步骤。 */
.as-review-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
  padding: 12px 14px;
  background: var(--bg-2, #fafafa);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.as-review-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex: 1 1 320px;
  min-width: 260px;
  cursor: pointer;
  line-height: 1.55;
}
.as-review-opt input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: none;
  cursor: pointer;
  accent-color: var(--accent-strong, #2563eb);
}
.as-review-label { font-size: 13px; color: var(--text-1); }
.as-review-label em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
}
.as-review-label em b { color: var(--accent-strong, #2563eb); }
.as-review-go { flex: none; align-self: center; }
.as-review-go:disabled { opacity: .5; cursor: not-allowed; }

.as-review-cost-note {
  margin: 0 0 6px;
  padding-left: 2px;
  font-size: 12px;
  color: var(--text-3);
}

/* 体检报告与卷面之间留白，避免报告紧贴试卷正文看不清边界 */
#asReviewBox:not(:empty) { margin: 14px 0 4px; }

@media (max-width: 860px) {
  .as-review-bar { flex-direction: column; align-items: stretch; }
  .as-review-go { align-self: stretch; }
}

/* ============================================================
   ★ v20261019f：移动端小字与触控区（可访问性补充）
   【依据】真机 390px 实测有两处 font-size:10.5px 偏小；
     资料标签（.ref-forced / .ref-opt / .ref-required / .ref-free）
     与聊天时间/说明是最低字号，触屏上最难辨认。
   【为什么不改全局】桌面端 10.5px 是有意的视觉压缩，
     全局改会破坏桌面排版。故只在 ≤560px 下提一档到 11.5px。
   【为什么触控区不在这里】.link-btn 的触控区放大见其定义处，
     那一处需要 position 上下文，就近改更清楚。 */
@media (max-width: 560px) {
  .ref-forced, .ref-opt, .ref-required, .ref-free { font-size: 11.5px; }
  .chat-time { font-size: 11.5px; }
  .chat-note { font-size: 11.5px; }
}

/* =====================================================================
 * 反馈积分激励活动（v20261019j）
 * =====================================================================
 * ★ 配色全部走 CSS 变量，不写死颜色 —— 换主题时这套UI 会自动跟上，
 *   写死色值就会在深色模式下变成一块白底黑字。
 * ★ 「醒目」靠三个手段叠加，不靠单一的大红块：
 *   ① 左侧色条 ② 顶部飘带 ③ 主按钮实心。
 *   只用一种手段，用户在长页面里很容易滑过去。 */
.fb-campaign {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px 16px 22px;
  border: 1px solid var(--accent-line);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, #fff 62%);
  box-shadow: 0 2px 10px rgba(15, 118, 110, .08);
}
.fb-campaign-flag {
  display: inline-block;
  margin-bottom: 9px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}
.fb-campaign-head { font-size: 15px; line-height: 1.6; margin-bottom: 9px; }
.fb-campaign-list {
  margin: 0 0 11px;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #334;
}
.fb-campaign-rule {
  margin-bottom: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  border: 1px dashed var(--accent-line);
  font-size: 13px;
  line-height: 1.85;
}
.fb-campaign-acts { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.fb-btn-main {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 8px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fb-btn-main:hover:not(:disabled) { background: var(--accent-strong); }
.fb-btn-main:disabled { opacity: .6; cursor: not-allowed; }
.fb-btn-lock { background: #64748b; border-color: #64748b; }

/* —— 弹窗 —— */
.fb-card { max-width: 620px; width: min(620px, calc(100vw - 32px)); }
.fb-card-wide { max-width: 720px; width: min(720px, calc(100vw - 32px)); }
.fb-card-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.8;
  color: #234;
}
.fb-field { margin-bottom: 13px; }
.fb-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #234;
}
.fb-req { color: #c2410c; font-weight: 500; margin-left: 3px; }
.fb-opt { color: #94a3b8; font-weight: 400; font-size: 12.5px; margin-left: 3px; }
.fb-field input, .fb-field select, .fb-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
}
.fb-field textarea { resize: vertical; line-height: 1.7; min-height: 96px; }
.fb-field input:focus, .fb-field select:focus, .fb-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.fb-hint {
  margin: 7px 0 0;
  padding: 8px 11px;
  border-radius: 7px;
  background: #f8fafc;
  border-left: 3px solid var(--accent-line);
  font-size: 12.5px;
  line-height: 1.75;
  color: #55606e;
}
.fb-msg { min-height: 21px; margin: 4px 0 10px; font-size: 13.5px; line-height: 1.7; }
.fb-msg-ok { color: #15803d; }
.fb-msg-err { color: #dc2626; }
.fb-acts { display: flex; gap: 10px; align-items: center; }

/* —— 我的反馈 —— */
.fb-mine-head {
  margin-bottom: 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13.5px;
  color: #475569;
}
.fb-mine-head b { color: var(--accent-strong); font-size: 15px; }
.fb-item {
  margin-bottom: 11px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fb-item-dup { background: #f8fafc; border-style: dashed; }
.fb-item-hd { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 7px; }
.fb-no { font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .4px; }
.fb-cat {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 12px;
  color: #475569;
}
.fb-st { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.fb-st-open { color: #b45309; }
.fb-st-done { color: #15803d; }
.fb-st-rej { color: #64748b; }
.fb-st-dup  { color: #a16207; }
.fb-item-title { font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 5px; line-height: 1.55; }
.fb-item-detail { font-size: 13px; color: #475569; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.fb-item-note {
  margin-top: 8px;
  padding: 8px 11px;
  border-radius: 7px;
  background: var(--accent-soft);
  font-size: 12.5px;
  line-height: 1.75;
  color: #234;
}
.fb-item-time { margin-top: 7px; font-size: 11.5px; color: #94a3b8; }
.fb-empty {
  padding: 26px 16px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.9;
  color: #64748b;
}
.fb-loading { padding: 26px 16px; text-align: center; font-size: 13.5px; color: #64748b; }

/* —— 轻提示 —— */
.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 99999;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 9px;
  background: #1e293b;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .26);
}
.fb-toast-err { background: #b91c1c; }

/* —— 窄屏：活动卡在手机上最容易挤爆，单独降一档 —— */
@media (max-width: 560px) {
  .fb-campaign { padding: 13px 13px 13px 16px; border-radius: 10px; }
  .fb-campaign-head { font-size: 14px; }
  .fb-campaign-list { font-size: 12.5px; line-height: 1.8; }
  .fb-campaign-rule { font-size: 12.5px; }
  .fb-btn-main { flex: 1 1 auto; padding: 9px 16px; }
  .fb-st { margin-left: 0; width: 100%; }
}

/* =====================================================================
 * 反馈看板 · 后台侧（v20261019j）
 * ===================================================================== */
.fb-adm-stats { display: flex; gap: 10px; margin: 0 0 11px; flex-wrap: wrap; }
.fb-adm-stat {
  padding: 8px 16px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 9px;
  background: var(--surface-2, #f8fafc);
}
.fb-adm-stat .num {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--accent-strong, #0b5d57);
  font-family: var(--mono, monospace);
}
.fb-adm-stat .lbl { font-size: 11.5px; color: var(--text-3, #64748b); margin-top: 1px; }

.fb-adm-open { color: #b45309; font-weight: 600; }
.fb-adm-done { color: #15803d; font-weight: 600; }
.fb-adm-dup  { color: #a16207; font-weight: 600; }
.fb-adm-duprow { background: rgba(148, 163, 184, .07); }
/* 已发放的行整行淡化：从视觉上就传达「这条已结清，别再动」 */
.fb-adm-duprow + tr:not(.fb-adm-duprow) { /* 仅作分隔说明，不改相邻正常行样式 */ }

/* ═══════════════════════════════════════════════════════════════
 * v20261019n · 反馈奖励到账通知
 * 需求：管理员发了积分，用户完全不知情 → 不认可奖励机制。
 * 解法：不加云函数、不改表，纯前端补「角标 + 提示 + 已读去重」。
 * ═══════════════════════════════════════════════════════════════ */

/* 「我的反馈」按钮要能容纳右上角角标，故设 relative 定位 */
.fb-mine-btn { position: relative; }

/* 未读角标：绝对定位在按钮右上角，不挤占按钮文字空间 */
.fb-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}

/* 奖励到账提示条：放在活动卡按钮上方，红利性质所以用暖色底 */
.fb-rewardtip {
  margin-bottom: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid #f0d9b5;
  font-size: 13px;
  line-height: 1.8;
}
.fb-rewardtip-hd { font-weight: 700; color: #8a4b06; margin-bottom: 8px; }

.fb-rewardtip-list { list-style: none; margin: 0 0 10px; padding: 0; }
.fb-rewardtip-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px dashed #f0d9b5;
}
.fb-rewardtip-list li:first-child { border-top: none; }
.fb-ri-no {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.fb-ri-txt {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-2);
  /* 长标题截断，避免一行撑破布局 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-ri-pt {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--accent-strong);
  font-family: var(--mono);
}
.fb-rewardtip-more { font-size: 12px; color: var(--text-3); margin-bottom: 9px; }
.fb-rewardtip-act { display: flex; gap: 8px; }
.fb-btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-2); }

/* 移动端：奖励列表的编号 + 分值可能挤，缩小一号并允许标题占更多行 */
@media (max-width: 560px) {
  .fb-ri-no { font-size: 10px; }
  .fb-ri-txt { white-space: normal; }
  .fb-badge { min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; }
}

/* =====================================================================
 * 语篇难度评估 v20261020p（readability.js · 纯本地算法）
 * ===================================================================== */
.diff-toolbar { display: flex; gap: 8px; margin: 8px 0 4px; }
.diff-out { margin-top: 10px; }
.diff-headline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.diff-badge {
  color: #fff; font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px;
}
.diff-score { font-size: 13px; color: var(--text-2, #475569); }
.diff-score b { font-size: 18px; color: #c0392b; }
.diff-headline .btn { margin-left: auto; }
.diff-chart { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.diff-foot { font-size: 11px; color: var(--text-3); margin: 6px 0 10px; }

.diff-kpis { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.diff-kpi {
  flex: 1 1 88px; min-width: 88px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 6px; text-align: center;
}
.diff-kpi b { display: block; font-size: 15px; color: var(--accent); line-height: 1.2; }
.diff-kpi span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.diff-tabs { display: flex; gap: 10px; margin: 12px 0 8px; }
.diff-tabs .btn { flex: 1; padding: 10px 0; font-size: 14px; font-weight: 700; }

.diff-tabbody { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }

.diff-tierbar {
  display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 10px 0 4px;
  border: 1px solid var(--border);
}
.diff-tierbar span { display: block; height: 100%; }
.tb-base { background: #72b043; }
.tb-mid { background: #f2b60e; }
.tb-high { background: #e94fb1; }
.diff-tierlegend { font-size: 11.5px; color: var(--text-3); margin: 2px 0 10px; }

.diff-subtitle { font-size: 12.5px; font-weight: 700; color: var(--text-2, #475569); margin: 8px 0 6px; }
.diff-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.diff-chip {
  display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.diff-chip i { font-style: normal; font-size: 10px; color: var(--text-3); font-weight: 400; }
.diff-chip.s4, .diff-chip.s5 { border-color: #e94fb1; }
.diff-chip.more { color: var(--text-3); font-weight: 400; }

.diff-sentlist { display: flex; flex-direction: column; gap: 4px; }
.diff-sent {
  display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.5;
  padding: 4px 8px; border-radius: 8px; background: var(--bg); border: 1px solid transparent;
}
.diff-sent.long { border-color: #f2b60e; background: rgba(242, 182, 14, .07); }
.diff-sent.over { border-color: #c0392b; background: rgba(192, 57, 43, .08); }
.ds-no { flex: 0 0 22px; color: var(--text-3); font-size: 11px; }
.ds-n { flex: 0 0 52px; font-weight: 700; color: var(--text-2, #475569); }
.ds-tag { flex: 0 0 34px; font-size: 10.5px; color: var(--text-3); }
.diff-sent.long .ds-tag { color: #b78900; font-weight: 700; }
.diff-sent.over .ds-tag { color: #c0392b; font-weight: 700; }
.ds-tx { flex: 1; color: var(--text); overflow-wrap: anywhere; }

.diff-note { font-size: 12px; color: var(--text-3); margin: 6px 0; line-height: 1.6; }

@media (max-width: 560px) {
  .diff-kpi { flex: 1 1 44%; }
  .diff-sent .ds-tx { font-size: 11.5px; }
}
