/* 初中物理刷题宝 · 样式 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:"Microsoft YaHei","PingFang SC",sans-serif; background:#eef2f8; color:#2b3a55; }
#app { max-width:640px; margin:0 auto; min-height:100vh; background:#f6f9ff; display:flex; flex-direction:column; position:relative; }
header { background:linear-gradient(135deg,#3a7bd5,#2563eb); color:#fff; padding:16px 18px; box-shadow:0 2px 10px rgba(37,99,235,.25); }
header h1 { font-size:20px; font-weight:700; }
header p { font-size:12px; opacity:.85; margin-top:2px; }
main { flex:1; padding:14px 14px 80px; overflow-y:auto; }

/* 卡片 */
.card { background:#fff; border-radius:14px; padding:16px; margin-bottom:12px; box-shadow:0 2px 8px rgba(43,58,85,.06); }
.card h3 { font-size:16px; margin-bottom:8px; }

/* 首页统计 */
.stat-row { display:flex; gap:10px; margin-bottom:14px; }
.stat-box { flex:1; background:#fff; border-radius:14px; padding:14px 10px; text-align:center; box-shadow:0 2px 8px rgba(43,58,85,.06); }
.stat-box .num { font-size:24px; font-weight:700; color:#2563eb; }
.stat-box .lbl { font-size:12px; color:#7a8aa5; margin-top:2px; }

/* 章节列表 */
.ch-item { display:flex; align-items:center; gap:12px; background:#fff; border-radius:12px; padding:14px; margin-bottom:10px; box-shadow:0 2px 6px rgba(43,58,85,.05); cursor:pointer; }
.ch-item:hover { box-shadow:0 4px 14px rgba(37,99,235,.18); transform:translateY(-1px); }
.ch-icon { width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:18px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.ch-info { flex:1; }
.ch-info .name { font-size:15px; font-weight:600; }
.ch-info .sub { font-size:12px; color:#8a9ab5; margin-top:2px; }
.ch-bar { height:6px; border-radius:3px; background:#e5ecf8; margin-top:6px; overflow:hidden; }
.ch-bar i { display:block; height:100%; background:linear-gradient(90deg,#4f8ef7,#2563eb); border-radius:3px; }

/* 题目卡片 */
.q-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.badge { font-size:12px; padding:2px 10px; border-radius:20px; background:#e8f0ff; color:#2563eb; font-weight:600; }
.badge.diff { background:#fff3e6; color:#e8871a; }
.badge.type { background:#e9f9ef; color:#22a35f; }
.q-stem { font-size:16px; line-height:1.7; font-weight:600; margin-bottom:12px; }
.opt { display:flex; align-items:flex-start; gap:10px; border:2px solid #e2e9f6; border-radius:12px; padding:12px 14px; margin-bottom:10px; cursor:pointer; transition:all .15s; background:#fff; }
.opt:hover { border-color:#2563eb; background:#f5f9ff; }
.opt .key { width:26px; height:26px; border-radius:50%; background:#e8f0ff; color:#2563eb; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:14px; }
.opt .txt { font-size:15px; line-height:1.6; flex:1; }
.opt.sel { border-color:#2563eb; background:#eff5ff; }
.opt.right { border-color:#22a35f; background:#e9f9ef; }
.opt.right .key { background:#22a35f; color:#fff; }
.opt.wrong { border-color:#e5484d; background:#fdeeee; }
.opt.wrong .key { background:#e5484d; color:#fff; }

/* 判断题按钮 */
.judge-row { display:flex; gap:12px; }
.judge-btn { flex:1; padding:14px; border-radius:12px; border:2px solid #e2e9f6; font-size:16px; font-weight:700; cursor:pointer; background:#fff; color:#2b3a55; }
.judge-btn:hover { border-color:#2563eb; }
.judge-btn.sel { border-color:#2563eb; background:#eff5ff; }
.judge-btn.right { border-color:#22a35f; background:#e9f9ef; color:#22a35f; }
.judge-btn.wrong { border-color:#e5484d; background:#fdeeee; color:#e5484d; }

/* 解析 */
.explain { display:none; background:#fffbe8; border:1px solid #f3e3b5; border-radius:12px; padding:12px 14px; font-size:14px; line-height:1.7; color:#7a6420; margin-top:10px; }
.explain.show { display:block; }
.explain .tag { font-weight:700; color:#d9a520; }

/* 按钮 */
.btn { display:inline-block; border:none; border-radius:12px; padding:12px 22px; font-size:15px; font-weight:700; cursor:pointer; background:#2563eb; color:#fff; text-align:center; }
.btn:hover { opacity:.9; }
.btn.gray { background:#e5ecf8; color:#2b3a55; }
.btn.green { background:#22a35f; }
.btn.red { background:#e5484d; }
.btn.block { display:block; width:100%; }
.btn-row { display:flex; gap:10px; margin-top:12px; }
.btn-row .btn { flex:1; }
.btn[disabled] { opacity:.5; cursor:not-allowed; }

/* 底部导航 */
nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:640px; background:#fff; display:flex; border-top:1px solid #e6ecf6; z-index:50; padding-bottom:env(safe-area-inset-bottom); }
nav a { flex:1; text-align:center; padding:10px 0 8px; font-size:11px; color:#8a9ab5; text-decoration:none; }
nav a .ic { font-size:20px; display:block; }
nav a.on { color:#2563eb; font-weight:700; }

/* 考试 */
.timer { text-align:center; font-size:22px; font-weight:700; color:#e5484d; padding:6px 0; }
.dot-row { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.dot { width:26px; height:26px; border-radius:50%; background:#e5ecf8; color:#2b3a55; font-size:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.dot.done { background:#2563eb; color:#fff; }
.dot.cur { outline:2px solid #e5484d; }

/* 结果页 */
.result-score { text-align:center; padding:20px 0; }
.result-score .big { font-size:52px; font-weight:800; color:#2563eb; }
.result-score .sub { font-size:14px; color:#8a9ab5; margin-top:4px; }
.review-item { border-left:4px solid #2563eb; padding-left:12px; margin-bottom:12px; }
.review-item .rs { font-size:12px; font-weight:700; }
.review-item .rs.ok { color:#22a35f; } .review-item .rs.no { color:#e5484d; }

.empty { text-align:center; color:#9aa9c2; padding:40px 0; font-size:14px; }
.back { color:#2563eb; font-size:14px; cursor:pointer; margin-bottom:10px; display:inline-block; }

/* 我的 */
.menu-item { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; background:#fff; border-radius:12px; margin-bottom:10px; cursor:pointer; font-size:15px; box-shadow:0 2px 6px rgba(43,58,85,.05); }
.menu-item .arr { color:#b6c2d8; }

/* v2 新增样式：年级切换 / 菜单 / 知识点三视图 */
header h1 { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.gswitch { margin-left:auto; display:flex; background:rgba(255,255,255,.18); border-radius:20px; padding:3px; }
.gswitch a { color:#fff; font-size:13px; font-weight:600; padding:3px 14px; border-radius:16px; cursor:pointer; opacity:.8; }
.gswitch a.on { background:#fff; color:#2563eb; opacity:1; }

.menu-card { display:flex; align-items:center; gap:14px; cursor:pointer; }
.menu-card:hover { box-shadow:0 4px 14px rgba(37,99,235,.18); transform:translateY(-1px); }
.menu-ic { width:46px; height:46px; border-radius:14px; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:22px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.menu-t { font-size:16px; font-weight:700; }
.menu-s { font-size:12px; color:#8a9ab5; margin-top:3px; }
.arr { margin-left:auto; font-size:22px; color:#b6c2d8; }

.view-tabs { display:flex; gap:8px; margin-top:10px; }
.view-tabs a { flex:1; text-align:center; padding:8px 4px; border-radius:10px; background:#eef3fc; color:#5a6f96; font-size:13px; font-weight:600; cursor:pointer; }
.view-tabs a.on { background:#2563eb; color:#fff; }

/* 思维导图 */
.mindmap { padding:4px 2px; }
.mm-section { margin-bottom:10px; }
.mm-section details > summary { font-size:15px; font-weight:700; color:#2563eb; cursor:pointer; padding:8px 10px; background:#eef5ff; border-radius:10px; list-style:none; }
.mm-section details > summary::before { content:"▸ "; }
.mm-section details[open] > summary::before { content:"▾ "; }
.mm-pts { list-style:none; margin:6px 0 0 18px; padding:0; border-left:2px solid #cfe0f8; }
.mm-pts li { margin:4px 0 4px 12px; position:relative; }
.mm-pts li::before { content:""; position:absolute; left:-12px; top:14px; width:10px; height:2px; background:#cfe0f8; }
.mm-pts li details > summary { font-size:14px; font-weight:600; cursor:pointer; color:#2b3a55; padding:6px 8px; background:#fff; border-radius:8px; border:1px solid #e2e9f6; }
.mm-brief { font-size:13px; color:#5a6f96; line-height:1.7; padding:8px 10px 2px; text-indent:2em; }
.mm-tip { font-size:12px; color:#d97a1a; background:#fff7ea; border-radius:8px; padding:6px 10px; margin:6px 10px 4px; }

/* 简易/详细版 */
.kn-sec h3 { font-size:15px; color:#2563eb; }
/* 全部展开/收起按钮 */
.kn-toggle-bar { display:flex; gap:8px; padding:0 4px 4px; }
.kn-toggle-btn {
  flex:1; padding:8px 0; font-size:13px; font-weight:600; color:#2563eb;
  background:#eef4ff; border:1px solid #c9d9f7; border-radius:8px; cursor:pointer;
}
.kn-toggle-btn:hover { background:#dce9ff; }
.kn-toggle-btn:active { transform:scale(.97); }
/* 知识点序号徽标 */
.pt-no {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:20px; height:20px; border-radius:50%; background:#2563eb; color:#fff;
  font-size:12px; font-weight:700; margin-right:6px; flex-shrink:0;
}
/* 简易/详细版：章节可展开收起（带箭头，类似思维导图） */
.kn-sec-det { margin-bottom:12px; padding:0; overflow:hidden; }
.kn-sec-det > summary {
  cursor:pointer; list-style:none; user-select:none;
  display:flex; align-items:center; gap:8px;
  font-size:15px; font-weight:700; color:#2563eb;
  padding:12px 16px; background:#f3f7ff; border-bottom:1px solid #e2e9f6;
}
.kn-sec-det > summary::-webkit-details-marker { display:none; }
.kn-sec-det > summary::before {
  content:"▶"; font-size:11px; color:#2563eb;
  display:inline-block; transition:transform .2s ease;
}
.kn-sec-det[open] > summary::before { transform:rotate(90deg); }
.kn-sec-det > summary:hover { background:#eaf1ff; }
/* 知识点可展开收起（带箭头） */
.kn-pt-det { border-bottom:1px dashed #e6ecf6; }
.kn-pt-det:last-child { border-bottom:none; }
.kn-pt-det > summary {
  cursor:pointer; list-style:none; user-select:none;
  display:flex; align-items:center;
  padding:10px 16px;
}
.kn-pt-det > summary::-webkit-details-marker { display:none; }
.kn-pt-det > summary::before {
  content:"▶"; font-size:10px; color:#7d95c4;
  display:inline-block; transition:transform .2s ease; margin-right:6px; flex-shrink:0;
}
.kn-pt-det[open] > summary::before { transform:rotate(90deg); }
.kn-pt-det > summary:hover { background:#f7faff; }
.kn-pt-det > summary b { font-size:14px; color:#2b3a55; flex:1; }
.kn-pt-det > .kn-b { margin:0 16px 10px 44px; }
.kn-pt-det > .kn-d { margin:0 16px 6px 44px; }
.kn-pt-det > .kp-imgs { margin:0 16px 4px 44px; }
.kn-pt-det > .kn-tip { margin:0 16px 12px 44px; }
.kn-pt { padding:8px 0; border-bottom:1px dashed #e6ecf6; }
.kn-pt:last-child { border-bottom:none; }
.kn-pt b { font-size:14px; }
/* 题型分类标签栏（知识点巩固刷题） */
.cat-bar { display:flex; flex-wrap:wrap; gap:6px; padding:2px 0 10px; }
.cat-chip {
  font-size:12px; font-weight:600; color:#2563eb; background:#eef4ff;
  border:1px solid #c9d9f7; border-radius:14px; padding:4px 12px; cursor:pointer;
  transition:all .15s;
}
.cat-chip:hover { background:#dce9ff; }
.cat-chip.on { background:#2563eb; color:#fff; border-color:#2563eb; }
.cat-chip.reset { color:#b35900; background:#fff7ea; border-color:#f3e0bb; }
.cat-chip.reset:hover { background:#ffe9c9; }
/* 当前题所属分类 */
.q-cat {
  font-size:12px; color:#7d5a1a; background:#fffbe8; border:1px solid #f3e0bb;
  border-radius:8px; padding:5px 10px; margin-bottom:8px; display:inline-block;
}
/* 分类选择页（知识点巩固：先分类再出现题目） */
.cat-menu { display:flex; flex-direction:column; gap:8px; }
.cat-item {
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  background:#f7faff; border:1px solid #e2e9f6; border-radius:12px; cursor:pointer;
  transition:all .15s;
}
.cat-item:hover { background:#eaf1ff; border-color:#c9d9f7; }
.cat-item:active { transform:scale(.98); }
.cat-item .cat-ic {
  width:40px; height:40px; border-radius:10px; background:#2563eb; color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0;
}
.cat-item .cat-info { flex:1; }
.cat-item .cat-info .name { font-size:14px; font-weight:700; color:#2b3a55; }
.cat-item .cat-info .sub { font-size:12px; color:#8a9ab5; margin-top:2px; }
.cat-item .arr { color:#b8c6e0; font-size:20px; }
.cat-item.all .cat-ic { background:#22a35f; }

/* 考点地图（知识点巩固分类页） */
.kp-map-stat { font-size:13px; color:#5a6f96; background:#eef3fc; border-radius:10px; padding:8px 12px; margin:8px 0 2px; line-height:1.7; }
.kp-map-miss { display:block; color:#d97706; font-size:12px; }
.kn-b { font-size:13px; color:#5a6f96; line-height:1.7; margin-top:4px; text-indent:2em; }
.kn-d { font-size:14px; color:#2b3a55; line-height:1.9; margin-top:6px; }
.kn-tip { font-size:12.5px; color:#b35900; background:#fff7ea; border:1px solid #f3e0bb; border-radius:8px; padding:7px 10px; margin-top:8px; line-height:1.7; }

/* 知识点配图 */
.kp-img { display:block; max-width:100%; margin:8px auto 2px; border-radius:8px; border:1px solid #e2e9f6; background:#fff; }
.kn-pt .kp-img + .kp-img { margin-top:6px; }

/* 详细版词条分行 */
.kn-li { line-height:1.9; margin-bottom:6px; text-indent:2em; }
/* ①标题：正文 条目：编号徽章 + 加粗标题 + 正文对齐 */
.kn-li-titled { display:flex; align-items:flex-start; gap:8px; text-indent:0; }
.kn-li-no { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 6px; margin-top:2px; border-radius:12px; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:14px; font-weight:700; line-height:1; box-shadow:0 1px 3px rgba(37,99,235,.35); }
.kn-li-t { color:#1d4ed8; font-weight:700; white-space:nowrap; }
/* 正文（含标题）为单个 flex item：换行后第二行对齐标题起始列（如"定义"正下方） */
.kn-li-b { flex:1; min-width:0; }
/* 知识点配图：整宽显示（上一版样式） */
.kp-imgs { display:block; margin:10px 0 4px; text-align:center; }
.kp-img { display:block; max-width:100%; height:auto; margin:6px auto; border-radius:8px; border:1px solid #e2e9f6; background:#fff; }
/* 连续多张知识点配图：横向排列（如感受浮力四图） */
.kp-img-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:10px 0 4px; }
.kp-img-row .kp-img { flex:1 1 90px; min-width:70px; max-width:200px; margin:0; }
/* 显式标记的侧浮小图：〔side:文件名〕，文字环绕在左侧 */
.kp-img.side { float:right; max-width:42%; margin:4px 0 6px 12px; }
.kp-img-row, .kn-tbl { clear:both; }
/* 竖排分数：〔frac:分子|分母〕，分子在上分母在下，中间分数线（颜色随文字自动适配深浅模式）。
   vertical-align:middle 使分数数学轴（分数线）对齐文字中线，与等号高度一致 */
.frac { display:inline-flex; flex-direction:column; vertical-align:middle; text-align:center; line-height:1.1; margin:0 2px; font-size:0.95em; }
.frac .frac-n { border-bottom:1.5px solid currentColor; padding:0 4px 1px; }
.frac .frac-d { padding:1px 4px 0; }
.ans-img { border:1px solid #4caf50; }
/* 易错提示文字加大 */
.kn-tip { font-size:15px; line-height:1.8; }
.mm-tip { font-size:13px; }

/* 知识点表格 */
.kn-tbl { width:100%; border-collapse:collapse; margin:10px 0 6px; font-size:13px; line-height:1.6; background:#fff; border-radius:8px; overflow:hidden; }
.kn-tbl th { background:#2563eb; color:#fff; padding:6px 8px; border:1px solid #3a7bd5; font-weight:600; text-align:center; }
.kn-tbl td { padding:6px 8px; border:1px solid #e2e9f6; text-align:left; vertical-align:top; }
.kn-tbl tr:nth-child(even) td { background:#f5f9ff; }
.kn-tbl td:first-child { font-weight:600; color:#2b3a55; white-space:nowrap; }

/* 易错提示：每条独立一行 */
.kn-tip-li { margin-bottom:4px; line-height:1.8; }
.kn-tip-li:last-child { margin-bottom:0; }

/* 章节题量徽标 */
.cnt { display:inline-block; font-size:11px; font-weight:700; color:#2563eb; background:#e8f0ff; border-radius:10px; padding:1px 8px; margin-left:6px; vertical-align:2px; }

/* 题目列表 */
.qlist-head { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:#2563eb; background:#eef5ff; border-radius:10px; padding:8px 12px; margin-bottom:8px; cursor:pointer; }
.ql-arr { margin-left:auto; }

/* 草稿画板 */
#draftBtn { position:fixed; right:16px; bottom:76px; z-index:200; width:54px; height:54px; border-radius:50%; border:none; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:22px; box-shadow:0 4px 14px rgba(37,99,235,.4); cursor:pointer; }
#draftOverlay { display:none; position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); z-index:300; width:520px; max-width:94vw; height:440px; max-height:82vh; background:#fff; border-radius:14px; box-shadow:0 12px 40px rgba(20,40,90,.35); flex-direction:column; overflow:hidden; }
.draft-head { cursor:move; user-select:none; }
.draft-resize { position:absolute; right:0; bottom:0; width:24px; height:24px; cursor:nwse-resize; z-index:5; }
.draft-resize::after { content:""; position:absolute; right:5px; bottom:5px; width:10px; height:10px; border-right:3px solid #9db4dc; border-bottom:3px solid #9db4dc; border-bottom-right-radius:4px; }
.draft-head { display:flex; align-items:center; gap:10px; padding:10px 14px; background:#f0f5ff; border-bottom:1px solid #dbe6f8; flex-wrap:wrap; }
.draft-head b { font-size:16px; color:#2b3a55; }
.draft-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-left:auto; }
.draft-tools button { border:1px solid #d5e0f2; background:#fff; border-radius:8px; padding:5px 10px; font-size:13px; cursor:pointer; }
.draft-tools input[type=range] { width:90px; }
#draftCanvas { flex:1; width:100%; min-height:0; touch-action:none; cursor:crosshair; }

/* 画板色板 */
.pc { width:22px; height:22px; border-radius:50%; display:inline-block; cursor:pointer; border:2px solid transparent; }
.pc.on { border-color:#2b3a55; box-shadow:0 0 0 2px #fff inset; }

/* 画板工具按钮（画笔/直线/虚线/箭头） */
.pt { width:26px; height:26px; border:1px solid #d5e0f2; background:#fff; border-radius:8px; font-size:14px; line-height:24px; text-align:center; cursor:pointer; display:inline-block; user-select:none; }
.pt.on { background:#2563eb; color:#fff; border-color:#2563eb; }

/* 作图题内嵌画板 */
.mini-pad-wrap { margin:6px 0; }
.mini-pad { width:100%; height:260px; touch-action:none; cursor:crosshair; border:2px solid #dbe6f8; border-radius:10px; background:#fff; }
.pad-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.pad-tools button { border:1px solid #d5e0f2; background:#fff; border-radius:8px; padding:4px 9px; font-size:12px; cursor:pointer; }
.pad-tools input[type=range] { width:70px; }

/* 图片叠加画布（直接在图上作图/标注） */
.imgpad-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:6px 0; background:#f0f5ff; border:1px solid #dbe6f8; border-radius:10px; padding:6px 8px; }
.imgpad-tools button { border:1px solid #d5e0f2; background:#fff; border-radius:8px; padding:4px 9px; font-size:12px; cursor:pointer; }
.imgpad-tools input[type=range] { width:70px; }
.qimg-pad { position:relative; display:inline-block; max-width:100%; }
.qimg-pad .kp-img { margin:6px 0 0; }
.img-pad-canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; cursor:crosshair; }

/* 填空题 */
.fill-area { margin:6px 0; }
.fill-item { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.fill-no { font-size:13px; font-weight:700; color:#5a6f96; background:#eef3fc; border-radius:8px; padding:4px 9px; flex-shrink:0; }
.fill-in { flex:1; border:2px solid #d5e0f2; border-radius:10px; padding:9px 12px; font-size:15px; font-family:inherit; }
.fill-in:focus { outline:none; border-color:#2563eb; }
.fill-in.right { border-color:#22a35f; background:#e9f9ef; }
.fill-in.wrong { border-color:#e5484d; background:#fdeeee; }

/* 填空题：小问分行 + 内联输入框（v95 新设计） */
.q-sub { text-indent: 2em; line-height: 1.9; margin: 3px 0; }
.fill-slot { display:inline-block; vertical-align: middle; margin: 0 1px; }
.fill-inline {
  border:none; border-bottom:2px solid #2563eb; background:transparent;
  font-size:15px; font-family:inherit; text-align:center; color:#1f2d4d;
  padding:1px 4px; outline:none; border-radius:4px 4px 0 0;
}
.fill-inline:focus { border-bottom-color:#1d4ed8; background:#eef5ff; }
.fill-inline.right { border-bottom-color:#22a35f; color:#22a35f; background:#e9f9ef; border-radius:4px; }
.fill-inline.wrong { border-bottom-color:#e5484d; color:#e5484d; background:#fdeeee; border-radius:4px; }
.fill-inline:disabled { cursor:default; opacity:.95; }

/* 计算题 */
.calc-ta { width:100%; min-height:150px; border:2px solid #d5e0f2; border-radius:10px; padding:10px 12px; font-size:15px; font-family:inherit; line-height:1.8; resize:vertical; box-sizing:border-box; }
.calc-ta:focus { outline:none; border-color:#2563eb; }

/* 计算题小问分行（v110 新设计）：编号徽章 + 卡片底纹，方便读题 */
.calc-head { margin:2px 0 10px; line-height:1.9; color:#33415e; text-indent:2em; }
.calc-sub { position:relative; margin:9px 0; padding:9px 14px 9px 46px; background:#f5f9ff; border:1px solid #e3ecfb; border-left:3px solid #2563eb; border-radius:0 10px 10px 0; line-height:2; text-indent:0; }
/* 徽章数字：显式取消继承的 text-indent（否则缩进会把数字推出圆圈），用 line-height 垂直居中（兼容性最佳） */
.calc-sub .q-no { position:absolute; left:11px; top:10px; width:24px; height:24px; border-radius:50%; background:#2563eb; background-image:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:13px; font-weight:700; line-height:24px; text-align:center; text-indent:0; box-shadow:0 2px 6px rgba(37,99,235,.35); }
.calc-sub2 { position:relative; margin:5px 0 5px 22px; padding:5px 10px 5px 32px; background:#fbfdff; border:1px solid #eaf1fc; border-left:2px solid #9db9e8; border-radius:0 8px 8px 0; line-height:1.9; text-indent:0; }
.calc-sub2 .sub-no { position:absolute; left:9px; top:6px; width:17px; height:17px; border-radius:50%; background:#dbe7fa; color:#2563eb; font-size:11px; font-weight:700; line-height:17px; text-align:center; text-indent:0; }
/* 填空/实验题二级小问（①②） */
.q-sub2 { position:relative; margin:4px 0 4px 22px; padding:4px 8px 4px 26px; background:#fafcff; border-left:2px solid #c3d5f2; border-radius:0 6px 6px 0; line-height:1.9; text-indent:0; }
.q-sub2 .sub-no { position:absolute; left:7px; top:4px; color:#5a6f96; font-size:12px; font-weight:700; text-indent:0; }
/* 计算题解答区引导条 */
.calc-ta-head { margin:8px 0 6px; font-size:13px; color:#2563eb; font-weight:700; }
/* 参考答案分行 */
.ans-sub { margin:4px 0; line-height:1.9; }



/* 草稿画板按钮（右下角，带文字） */
#draftBtn { position:fixed; right:18px; bottom:88px; z-index:200; width:62px; height:62px; border-radius:50%; border:none; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; box-shadow:0 4px 14px rgba(37,99,235,.45); cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; }
#draftBtn span { font-size:22px; line-height:1; }
#draftBtn em { font-style:normal; font-size:11px; font-weight:700; }
#draftHint { padding:8px 14px; background:#fffbe8; color:#b35900; font-size:13px; font-weight:700; border-bottom:1px solid #f3e0bb; }

/* header 草稿按钮 */
.head-draft { margin-left:8px; border:none; background:rgba(255,255,255,.2); color:#fff; width:34px; height:34px; border-radius:50%; font-size:17px; cursor:pointer; flex-shrink:0; }





/* 色板与指示 */
.pc { width:26px; height:26px; }
.pc.on { border-color:#2b3a55; transform:scale(1.15); box-shadow:0 0 0 2px #fff inset, 0 0 0 3px #2b3a55; }
.w-label { font-size:12px; color:#5a6f96; font-weight:700; }
.cur-color { display:inline-block; width:24px; height:24px; border-radius:6px; border:2px solid #fff; box-shadow:0 0 0 1px #d5e0f2; background:#1a1a1a; vertical-align:middle; }

/* 题目列表按题型分组 */
.ql-group { margin-bottom:8px; }
.ql-gname { display:block; font-size:12px; font-weight:700; color:#5a6f96; margin:4px 0 2px; }
.ql-group .dot-row { margin:2px 0 6px; }

/* 题目列表对错颜色 */
.dot.ok { background:#22a35f; color:#fff; }
.dot.no { background:#e5484d; color:#fff; }
.dot.cur { outline:2px solid #1b2a4a; }

/* 题目列表题号 + 对错小标记 */
.dot { width:auto; min-width:26px; padding:0 5px; border-radius:13px; }
.dot small { font-size:9px; line-height:1; margin-left:1px; }

/* 知识点小节 → 本节刷题按钮 */
.sec-q-btn { float:right; margin-left:8px; border:none; background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; font-size:12px; font-weight:700; border-radius:14px; padding:3px 12px; cursor:pointer; vertical-align:middle; }
.sec-q-btn:hover { opacity:.85; }
.mm-section details > summary .sec-q-btn { margin-top:-2px; }

/* ================= v3 界面增强：题目卡片美化 + 学习统计可视化 ================= */

/* 卡片质感 */
.card { border:1px solid #e9effb; box-shadow:0 4px 14px rgba(43,58,85,.07); transition:box-shadow .2s ease; }
.card:hover { box-shadow:0 6px 18px rgba(37,99,235,.13); }

/* 题干排版（首行缩进两格，阅读方便） */
.q-stem { position:relative; font-size:16.5px; line-height:1.85; color:#1f2d4d; background:linear-gradient(180deg,#f8fbff,#fff); border-left:4px solid #2563eb; border-radius:4px 10px 10px 4px; padding:11px 14px; margin-bottom:14px; text-indent:2em; }
/* 题号（题目第一行开头，与题目列表编号对应） */
.q-no-tag { font-weight:700; color:#2563eb; margin-right:6px; text-indent:0; }
.q-head .badge { letter-spacing:.4px; box-shadow:0 1px 3px rgba(37,99,235,.16); }

/* 选项按钮化 */
.opt { position:relative; border-radius:14px; padding:13px 14px; border:2px solid #e4ebf8; background:#fbfdff; }
.opt:active { transform:scale(.985); }
.opt .key { background:linear-gradient(135deg,#e9f1ff,#d8e6ff); box-shadow:inset 0 -1px 0 rgba(37,99,235,.18); transition:all .15s; }
.opt:hover .key { background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; }
.opt.sel { border-color:#2563eb; background:#eef5ff; box-shadow:0 2px 10px rgba(37,99,235,.18); }
.opt.sel .key { background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; }
@keyframes optPop { 0%{transform:scale(1)} 40%{transform:scale(1.025)} 100%{transform:scale(1)} }
.opt.sel { animation:optPop .25s ease; }
@keyframes shakeX { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.opt.wrong { animation:shakeX .3s ease; }

/* 判断题按钮 */
.judge-btn { border-radius:14px; transition:all .15s; }
.judge-btn:active { transform:scale(.97); }
.judge-btn.sel { box-shadow:0 2px 10px rgba(37,99,235,.18); }

/* 解析区 */
.explain { border:none; border-left:4px solid #eab308; background:linear-gradient(180deg,#fffdf2,#fff9e6); box-shadow:0 2px 8px rgba(217,165,32,.12); }
.explain .tag { background:#eab308; color:#fff; border-radius:10px; padding:1px 10px; font-size:12px; }

/* 主按钮 */
.btn { background:linear-gradient(135deg,#4f8ef7,#2563eb); box-shadow:0 3px 10px rgba(37,99,235,.3); transition:transform .12s, opacity .15s; }
.btn:active { transform:scale(.97); }
.btn.gray { background:#eef3fc; box-shadow:none; color:#3d5578; }

/* 图片点击放大（灯箱） */
.lb-mask { position:fixed; inset:0; z-index:400; background:rgba(15,23,42,.88); display:flex; align-items:center; justify-content:center; }
.lb-mask img { max-width:94%; max-height:86%; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.5); cursor:zoom-in; transition:transform .2s ease; }
.lb-mask img.zoom { transform:scale(1.8); cursor:zoom-out; }
.lb-close { position:absolute; top:16px; right:18px; color:#fff; font-size:22px; cursor:pointer; background:rgba(255,255,255,.16); width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; user-select:none; }
.lb-close:hover { background:rgba(255,255,255,.3); }

/* ---- 学习统计可视化 ---- */
/* 总览：环形正确率 + 数据格 */
.stats-hero { display:flex; align-items:center; gap:18px; padding:4px 2px 8px; }
.ring-wrap { position:relative; width:108px; height:108px; flex-shrink:0; }
.ring-wrap svg { transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:#e8effa; stroke-width:10; }
.ring-fg { fill:none; stroke:url(#ringGrad); stroke-width:10; stroke-linecap:round; transition:stroke-dashoffset .8s ease; }
.ring-txt { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-txt b { font-size:24px; color:#2563eb; line-height:1.1; }
.ring-txt span { font-size:11px; color:#8a9ab5; }
.stats-grid { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stats-cell { background:#f6f9ff; border:1px solid #e6eefb; border-radius:12px; padding:10px 8px; text-align:center; }
.stats-cell b { display:block; font-size:20px; color:#1f2d4d; line-height:1.2; }
.stats-cell span { font-size:11px; color:#8a9ab5; }
.stats-cell.c1 b { color:#2563eb; } .stats-cell.c2 b { color:#22a35f; }
.stats-cell.c3 b { color:#e5484d; } .stats-cell.c4 b { color:#d97706; }

/* 近 7 天做题柱状图 */
.daily-chart { display:flex; align-items:flex-end; gap:8px; height:118px; padding:6px 2px 0; }
.daily-chart .day { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; }
.daily-chart .day .cnt { font-size:10px; color:#5a6f96; font-weight:700; height:13px; }
.daily-chart .day .col { width:68%; max-width:34px; border-radius:6px 6px 2px 2px; background:linear-gradient(180deg,#4f8ef7,#2563eb); min-height:3px; transition:height .4s ease; }
.daily-chart .day .col.ok { background:linear-gradient(180deg,#34d399,#22a35f); }
.daily-chart .day .lbl { font-size:10px; color:#8a9ab5; }

/* 章节进度（含正确率） */
.ch-prog .row { display:flex; align-items:center; gap:10px; padding:7px 2px; }
.ch-prog .row .nm { width:88px; font-size:13px; font-weight:700; color:#2b3a55; flex-shrink:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ch-prog .row .bar { flex:1; height:8px; background:#e8effa; border-radius:4px; overflow:hidden; }
.ch-prog .row .bar i { display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,#4f8ef7,#2563eb); transition:width .5s ease; }
.ch-prog .row .bar i.full { background:linear-gradient(90deg,#34d399,#22a35f); }
.ch-prog .row .pct { width:40px; text-align:right; font-size:12px; font-weight:700; color:#5a6f96; flex-shrink:0; }
.ch-prog .row .acc { width:46px; font-size:11px; color:#22a35f; font-weight:700; flex-shrink:0; }

/* 题型分布 */
.dist-row { display:flex; align-items:center; gap:8px; margin:7px 0; font-size:12px; }
.dist-row .dn { width:44px; color:#5a6f96; flex-shrink:0; text-align:right; font-weight:600; }
.dist-row .db { flex:1; height:10px; background:#e8effa; border-radius:5px; overflow:hidden; }
.dist-row .db i { display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,#818cf8,#6366f1); transition:width .5s ease; }
.dist-row .dv { width:72px; color:#8a9ab5; flex-shrink:0; font-size:11px; text-align:right; }

/* 高频错题榜 */
.tw-item { display:flex; align-items:flex-start; gap:10px; padding:8px 2px; border-bottom:1px dashed #e6ecf6; }
.tw-item:last-child { border-bottom:none; }
.tw-item .no { width:20px; height:20px; border-radius:50%; background:#fdeeee; color:#e5484d; font-weight:700; font-size:11px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }
.tw-item .ts { flex:1; color:#2b3a55; font-size:13px; line-height:1.5; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.tw-item .tc { font-size:11px; color:#e5484d; font-weight:700; flex-shrink:0; }

/* ================= v3.2 学习引擎：今日学习 / 打卡 / 掌握度 / 设置 / 深色模式 ================= */

/* 连续打卡条 */
.streak-bar { display:flex; gap:8px; margin-bottom:12px; }
.streak-chip { flex:1; background:#fff; border:1px solid #e9effb; border-radius:12px; padding:8px 4px; text-align:center; box-shadow:0 2px 8px rgba(43,58,85,.06); }
.streak-chip b { display:block; font-size:16px; color:#2563eb; }
.streak-chip span { font-size:10px; color:#8a9ab5; }

/* 今日学习卡片 */
.today-card { background:linear-gradient(135deg,#3a7bd5,#2563eb); border:none; color:#fff; }
.today-card h3 { color:#fff; margin-bottom:10px; }
.today-item { display:flex; align-items:center; gap:12px; padding:11px 12px; background:rgba(255,255,255,.14); border-radius:12px; margin-bottom:8px; cursor:pointer; transition:background .15s; }
.today-item:last-child { margin-bottom:0; }
.today-item:hover { background:rgba(255,255,255,.26); }
.today-item .ti-ic { font-size:20px; flex-shrink:0; }
.today-item .ti-t { flex:1; font-size:14px; font-weight:700; }
.today-item .ti-s { font-size:12px; opacity:.88; margin-top:2px; font-weight:400; }
.today-item .ti-btn { background:#fff; color:#2563eb; font-size:12px; font-weight:700; border-radius:14px; padding:5px 12px; flex-shrink:0; }

/* 自动跳题开关（题目页胶囊） */
.auto-next { font-size:11px; font-weight:700; color:#2563eb; background:#eef4ff; border-radius:12px; padding:2px 10px; cursor:pointer; user-select:none; transition:all .15s; }
.auto-next.off { color:#8a9ab5; background:#eef1f6; }

/* 知识点掌握度徽章 */
.kp-m { display:inline-block; font-size:11px; font-weight:700; border-radius:10px; padding:1px 8px; margin-left:6px; vertical-align:2px; flex-shrink:0; }
.kp-m-ok { background:#e9f9ef; color:#22a35f; }
.kp-m-mid { background:#fff7e6; color:#d97706; }
.kp-m-bad { background:#fdeeee; color:#e5484d; }

/* 错题本：遗忘曲线分组 */
.review-tip { font-size:13px; color:#7a6420; background:#fffbe8; border:1px solid #f3e3b5; border-radius:10px; padding:8px 12px; margin-bottom:12px; line-height:1.6; }
.review-tip b { color:#d97706; }
.due-group { margin-bottom:14px; }
.due-gname { font-size:13px; font-weight:700; color:#5a6f96; background:#eef3fc; border-radius:8px; padding:5px 10px; margin-bottom:8px; }

/* 设置 */
.set-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 2px; border-bottom:1px dashed #e6ecf6; font-size:14px; color:#2b3a55; }
.set-row:last-child { border-bottom:none; }
.switch { position:relative; width:46px; height:26px; border-radius:13px; background:#d7e2f2; cursor:pointer; transition:background .2s; flex-shrink:0; }
.switch i { position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .2s; }
.switch.on { background:#2563eb; }
.switch.on i { left:23px; }
.fs-btns button { border:1px solid #d5e0f2; background:#fff; border-radius:8px; padding:4px 12px; font-size:13px; cursor:pointer; color:#2b3a55; }
.fs-btns button.on { background:#2563eb; color:#fff; border-color:#2563eb; }

/* 字号三档 */
body.fs-s .q-stem { font-size:15px; } body.fs-m .q-stem { font-size:16.5px; } body.fs-l .q-stem { font-size:18px; }
body.fs-s .opt .txt { font-size:14px; } body.fs-l .opt .txt { font-size:16px; }
body.fs-s .kn-d { font-size:13px; } body.fs-l .kn-d { font-size:15px; }
body.fs-s .explain { font-size:13px; } body.fs-l .explain { font-size:15px; }
body.fs-s .fill-in { font-size:14px; } body.fs-l .fill-in { font-size:16px; }
body.fs-s .calc-ta { font-size:14px; } body.fs-l .calc-ta { font-size:16px; }
body.fs-s .calc-sub, body.fs-s .calc-sub2, body.fs-s .q-sub2, body.fs-s .calc-head, body.fs-s .calc-ta-head { font-size:14px; }
body.fs-l .calc-sub, body.fs-l .calc-sub2, body.fs-l .q-sub2, body.fs-l .calc-head, body.fs-l .calc-ta-head { font-size:17px; }

/* 深色模式 */
body.dark { background:#0f172a; color:#cbd5e1; }
body.dark #app { background:#0f172a; }
body.dark .card { background:#1e293b; border-color:#334155; box-shadow:0 4px 14px rgba(0,0,0,.3); }
body.dark .card h3 { color:#e2e8f0; }
body.dark .q-stem { background:#16213a; color:#e2e8f0; border-left-color:#3b82f6; }
body.dark .q-no-tag { color:#7fa6ef; }
body.dark .opt { background:#1e293b; border-color:#334155; color:#e2e8f0; }
body.dark .opt:hover { border-color:#3b82f6; background:#243349; }
body.dark .opt.sel { border-color:#3b82f6; background:#1d3a5f; }
body.dark .opt .key { background:#334155; color:#93c5fd; }
body.dark .opt.sel .key { background:linear-gradient(135deg,#4f8ef7,#2563eb); color:#fff; }
body.dark .judge-btn { background:#1e293b; border-color:#334155; color:#cbd5e1; }
body.dark .ch-item, body.dark .menu-item, body.dark .cat-item, body.dark .stat-box, body.dark .stats-cell, body.dark .streak-chip { background:#1e293b; border-color:#334155; color:#e2e8f0; box-shadow:none; }
body.dark .ch-bar { background:#334155; }
body.dark .ch-info .name, body.dark .menu-t, body.dark .cat-info .name { color:#e2e8f0; }
body.dark .explain { background:#2b2410; border-left-color:#eab308; color:#d8c98a; }
body.dark .q-cat { background:#2b2410; color:#d8c98a; border-color:#57461b; }
body.dark .badge { background:#243349; color:#93c5fd; }
body.dark .badge.diff { background:#3a2a10; color:#f0a24a; }
body.dark .badge.type { background:#14301f; color:#4ade80; }
body.dark nav { background:#1e293b; border-top-color:#334155; }
body.dark nav a { color:#94a3b8; }
body.dark nav a.on { color:#60a5fa; }
body.dark .fill-in, body.dark .calc-ta { background:#16213a; color:#e2e8f0; border-color:#334155; }
body.dark .calc-head { color:#cbd8f0; }
body.dark .calc-sub { background:#1a2948; border-color:#2b3d66; border-left-color:#4f8ef7; }
body.dark .calc-sub2 { background:#15213c; border-color:#24365c; border-left-color:#3f5a8f; }
body.dark .calc-sub2 .sub-no { background:#24365c; color:#7fa6ef; }
body.dark .q-sub2 { background:#15213c; border-left-color:#33466e; }
body.dark .q-sub2 .sub-no { color:#8fa8d8; }
body.dark .calc-ta-head { color:#7fa6ef; }
body.dark .fill-no { background:#243349; color:#93c5fd; }
body.dark .kn-tbl td { background:#1e293b; border-color:#334155; color:#cbd5e1; }
body.dark .kn-tbl tr:nth-child(even) td { background:#243349; }
body.dark .kn-tbl th { background:#2563eb; }
body.dark .kn-b, body.dark .mm-brief { color:#94a3b8; }
body.dark .kn-d { color:#cbd5e1; }
body.dark .kn-tip { background:#3a2a10; color:#f0a24a; border-color:#57461b; }
body.dark .kn-sec-det > summary { background:#16213a; color:#93c5fd; }
body.dark .qlist-head { background:#1d3a5f; color:#93c5fd; }
body.dark .imgpad-tools, body.dark .pad-tools, body.dark .draft-head { background:#243349; border-color:#334155; }
body.dark .imgpad-tools button, body.dark .pad-tools button, body.dark .draft-tools button { background:#1e293b; border-color:#334155; color:#cbd5e1; }
body.dark .btn.gray { background:#334155; color:#cbd5e1; }
body.dark .view-tabs a { background:#243349; color:#94a3b8; }
body.dark .view-tabs a.on { background:#2563eb; color:#fff; }
body.dark .set-row { color:#e2e8f0; border-bottom-color:#334155; }
body.dark .fs-btns button { background:#1e293b; border-color:#334155; color:#cbd5e1; }
body.dark .fs-btns button.on { background:#2563eb; color:#fff; }
body.dark .due-gname { background:#243349; color:#93c5fd; }
body.dark .review-tip { background:#2b2410; color:#d8c98a; border-color:#57461b; }
body.dark .cnt { background:#243349; color:#93c5fd; }
body.dark .menu-ic, body.dark .ch-icon { filter:brightness(.9); }
body.dark .mm-section details > summary { background:#16213a; color:#93c5fd; }
body.dark .mm-pts li details > summary { background:#1e293b; border-color:#334155; color:#cbd5e1; }
body.dark .empty { color:#64748b; }
body.dark .dot { background:#334155; color:#cbd5e1; }
body.dark .cat-chip { background:#243349; color:#93c5fd; border-color:#334155; }
body.dark .cat-chip.on { background:#2563eb; color:#fff; }
body.dark .today-card { background:linear-gradient(135deg,#1d4ed8,#1e40af); }
body.dark .today-item { background:rgba(255,255,255,.1); }
body.dark .today-item:hover { background:rgba(255,255,255,.18); }
body.dark .mini-pad { background:#fff; }
body.dark .back { color:#60a5fa; }
/* ---------- 学习体验增强：同类变式 / 今日复习 / 掌握度 / 热力图 ---------- */
.btn.sm { display:inline-block; padding:5px 12px; font-size:12px; border-radius:8px; border:none; cursor:pointer; font-weight:700; }
.kp-acc-row { display:flex; align-items:center; gap:8px; margin:6px 0; font-size:13px; }
.kp-acc-row .nm { width:128px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#3c4a63; flex-shrink:0; }
.kp-acc-row .bar { flex:1; height:8px; background:#eef1f6; border-radius:6px; overflow:hidden; min-width:40px; }
.kp-acc-row .bar i { display:block; height:100%; border-radius:6px; }
.kp-acc-row .pct { width:44px; text-align:right; color:#3c4a63; font-weight:700; flex-shrink:0; }
.kp-acc-row .cnt { width:38px; text-align:right; color:#8a9ab5; font-size:11px; flex-shrink:0; }
.heat-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; margin-top:4px; }
.heat-cell { aspect-ratio:1; border-radius:5px; background:#eceff4; display:flex; align-items:center; justify-content:center; font-size:10px; color:#8a9ab5; }
.heat-cell.h1 { background:#c6e8c9; color:#2f7d3a; }
.heat-cell.h2 { background:#7fd08a; color:#fff; }
.heat-cell.h3 { background:#3fae55; color:#fff; }
.heat-cell.h4 { background:#1e8a3a; color:#fff; font-weight:700; }
.heat-legend { display:flex; gap:4px; align-items:center; font-size:11px; color:#8a9ab5; margin-top:10px; }
body.dark .kp-acc-row .nm { color:#cbd5e1; }
body.dark .kp-acc-row .pct { color:#e2e8f0; }
body.dark .kp-acc-row .bar { background:#243349; }
body.dark .heat-cell { background:#2a3242; color:#64748b; }
body.dark .heat-cell.h1 { background:#1f5130; color:#7fd08a; }
body.dark .heat-cell.h2 { background:#2e7d46; color:#fff; }
body.dark .heat-cell.h3 { background:#3fae55; color:#fff; }
body.dark .heat-cell.h4 { background:#1e8a3a; color:#fff; font-weight:700; }

/* 渐进解锁难度进度条（章节练习） */
.diff-bar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:10px; padding:7px 10px; background:#f6f9ff; border:1px solid #e3ecfb; border-radius:10px; }
.diff-bar .db-item { font-size:12px; color:#7d8ea8; padding:2px 8px; border-radius:8px; background:#eef2fa; display:inline-flex; align-items:baseline; gap:4px; }
.diff-bar .db-item em { font-style:normal; font-weight:600; margin-left:2px; }
.diff-bar .db-item.cur { background:linear-gradient(135deg,#4facfe,#2f7cf6); color:#fff; box-shadow:0 2px 6px rgba(47,124,246,.35); }
.diff-bar .db-item.ok { background:#e8f7ee; color:#2e9e5b; border:1px dashed #bfe6cd; }
.diff-bar .db-item.lock { background:#f2f2f5; color:#b0b6c2; }
.diff-bar .db-arr { color:#c3cbd9; font-size:11px; }
body.dark .diff-bar { background:#1d2434; border-color:#2a3242; }
body.dark .diff-bar .db-item { background:#273047; color:#9fb0c9; }
body.dark .diff-bar .db-item.ok { background:#1d3a2c; color:#58c98a; border-color:#2c5a42; }
body.dark .diff-bar .db-item.lock { background:#222a3a; color:#6b7689; }

/* 章节练习：已跳过已掌握题提示条 */
.skip-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; padding:6px 10px; background:#e8f7ee; border:1px solid #bfe6cd; border-radius:10px; font-size:12px; color:#2e9e5b; }
.skip-bar .btn.sm { margin-left:auto; background:linear-gradient(135deg,#3fae55,#2e9e5b); color:#fff; border:none; padding:3px 10px; border-radius:8px; cursor:pointer; font-size:12px; }
body.dark .skip-bar { background:#1d3a2c; border-color:#2c5a42; color:#58c98a; }
body.dark .skip-bar .btn.sm { background:linear-gradient(135deg,#3fae55,#2e9e5b); }

/* 做题页"重开本章"按钮（章节练习） */
.back.warn { color:#e2574c; border-color:#f3c1bc; background:#fdf1f0; }
body.dark .back.warn { color:#ff8d84; border-color:#7a3a35; background:#33201e; }

/* ========== 手机/平板触屏适配（v198） ========== */
/* iOS 输入框字号≥16px，防止聚焦自动缩放页面 */
.fill-inline, .fill-slot input, input[type="text"], input[type="number"], input[type="password"], textarea, select { font-size:16px; }
@media (max-width:480px) {
  #app { max-width:100%; }
  .card { padding:12px; border-radius:12px; }
  .card h3 { font-size:15px; }
  .opt { padding:12px 12px; }
  .opt .txt { font-size:15px; line-height:1.55; }
  .btn { padding:11px 16px; min-height:44px; }
  .btn.sm { min-height:36px; padding:7px 12px; }
  nav a { padding:12px 0 10px; }
  nav a .ic { font-size:22px; }
  .kn-tbl-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .kn-tbl { font-size:12px; }
  .kp-img-row .kp-img { max-width:150px; }
  .diff-bar { flex-wrap:wrap; }
  .heat-grid { gap:3px; }
  .heat-cell { border-radius:4px; }
  .qimg-pad img.kp-img { max-height:56vh; }
  .lb-mask img { max-width:96%; }
}
@media (max-width:360px) {
  .opt .txt { font-size:14px; }
  .btn { padding:10px 10px; }
  .kp-img-row .kp-img { max-width:120px; }
}
/* 触屏设备：更大的点击热区 */
@media (pointer:coarse) {
  nav a { padding:13px 0 11px; }
  .opt { min-height:48px; }
  .btn { min-height:46px; }
  .pt, .pc, .pad-tools button, .imgpad-tools button, .draft-tools button { min-width:40px; min-height:40px; }
}