:root {
  --primary: #2f6bff;
  --primary-dark: #1e4fd8;
  --primary-soft: #eaf0ff;
  --success: #12a150;
  --success-soft: #e7f7ee;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #f5a524;
  --warn-soft: #fff5e3;
  --ink: #10203a;
  --ink-2: #43536b;
  --ink-3: #8593a8;
  --line: #e6ebf3;
  --bg: #f2f5fa;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 58, 0.05), 0 6px 18px rgba(16, 32, 58, 0.06);
  --nav-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: calc(var(--nav-h) + max(0px, env(safe-area-inset-bottom, 0px))); }

.app { max-width: 720px; margin: 0 auto; }

/* ---------- 顶部 ---------- */
/*
 * v130：顶栏（.topbar）整条删掉了。
 * 现在顶部只有两组浮层：右上角头像 / 齿轮 / 记录，下级页左上角一颗 ←。
 * 它们的样式在文件末尾「v130」那一段，紧挨着变量 --top-edge / --top-bar-h 的说明。
 */

/* ---------- 页面容器 ---------- */
.page {
  /* 顶栏删掉之后，内容从「安全区 + 44px」开始 —— 那 44px 是让给右上角浮层的。
     44 和浮层里头像的 36 + 上沿 8 是同一对数，改一个必须改另一个（见文件末尾 v130）。 */
  padding: calc(env(safe-area-inset-top, 0px) + var(--top-edge, 44px)) 14px 24px;
  display: none;
  animation: fade .22s ease;
}
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}
.card.tight { padding: 16px; }
.card-title {
  font-size: 15px; font-weight: 700; margin: 0 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.card-title .dot { width: 4px; height: 15px; border-radius: 3px; background: var(--primary); }
.muted { color: var(--ink-3); font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- 表单 ---------- */
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
select, input[type="text"], input[type="password"], textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; background: #fbfcfe; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: #fff;
}
textarea { resize: vertical; min-height: 64px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 11px 16px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  background: var(--primary); color: #fff; cursor: pointer;
  transition: transform .1s, filter .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--primary-soft); color: var(--primary-dark); }
.btn.gray { background: #eef1f6; color: var(--ink-2); }
.btn.danger { background: var(--danger); }
/*
 * 描边红 =「可以删，但不鼓励」。
 *
 * 和 `.btn.danger`（红底实心）是两种语气：实心红在一行按钮里最抢眼，
 * 摆在「生成练习卷」旁边会让用户第一眼看到的是删除。批量删除那颗按钮要的正好相反 ——
 * 找得到，但绝不能被当成主操作（误点的代价不可逆）。
 *
 * 边框用 `box-shadow: inset` 而不是 `border`：border 会把这颗按钮撑高 3px，
 * 和同一行里的「清空」对不齐（操作条是 flex + align-items:center，
 * 差一点点就是肉眼能看出来的那种歪）。box-shadow 不占布局。
 */
.btn.danger-outline {
  background: #fff; color: var(--danger);
  box-shadow: inset 0 0 0 1.5px #f2b9ba;
}
.btn.danger-outline:active { background: var(--danger-soft); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 14px 18px; font-size: 16px; }

/* ---------- 上传区 ---------- */
.dropzone {
  border: 2px dashed #c3d2ea; border-radius: var(--radius); background: #f8faff;
  padding: 26px 16px; text-align: center; cursor: pointer; transition: all .18s;
}
.dropzone:active { background: var(--primary-soft); border-color: var(--primary); }
.dropzone .icon { font-size: 34px; line-height: 1; }
.dropzone .t1 { font-weight: 700; margin-top: 8px; font-size: 15px; }
.dropzone .t2 { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.preview-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.preview-wrap img { display: block; width: 100%; }
.preview-wrap .clear {
  position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff;
  border: none; border-radius: 999px; width: 30px; height: 30px; font-size: 16px; cursor: pointer;
}

/* ---------- 统计条 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 12px 8px; text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 22px; font-weight: 800; line-height: 1.2; }
.stat .lbl { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat.good .num { color: var(--success); }
.stat.bad .num { color: var(--danger); }
.stat.info .num { color: var(--primary); }

/* ---------- 徽章 ---------- */
.tag {
  display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; margin: 2px 4px 2px 0;
}
.tag.green { background: var(--success-soft); color: var(--success); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.amber { background: var(--warn-soft); color: #b5730a; }
.tag.gray { background: #eef1f6; color: var(--ink-2); }

/* ---------- 题目卡片 ---------- */
.q-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 13px; margin-bottom: 11px; background: #fff; }
.q-card.wrong { border-color: #f7c9ca; background: #fffbfb; }
.q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-no {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; background: var(--primary-soft); color: var(--primary-dark); flex: none;
}
.q-no.wrong { background: var(--danger-soft); color: var(--danger); }
.q-no.right { background: var(--success-soft); color: var(--success); }
/*
 * 「未判定」的题号：灰的。
 *
 * 只在批改结果页出现（两值都拿不到时，见 components.js 的 statusTag）。
 * 为什么不用红：红 = 「这题错了」，而这道题的判定**没有依据**，
 * 两边都说不上；灰表达的是「这一格还不知道」。
 */
.q-no.unknown { background: #eef1f6; color: var(--ink-2); }
/*
 * `overflow-wrap: anywhere` 是给**题干里那一长串没有空格的文字**（OCR 粘成一片的
 * 长数字串、长长的变量名）留的：`word-break: break-word` 能断词，但它不会把断点
 * 算进最小宽度，而最小宽度才是把容器顶宽的那个数。公式那一路另有处理
 * （见下面「长公式：一屏看全」那一节），这里只管文字。
 */
.q-stem { font-size: 14.5px; line-height: 1.65; margin-bottom: 9px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
/*
 * 题面 = 切图（默认档不再补题干文字，见 src/providers/index.js 的 stemMode）。
 *
 * 为什么不让它铺满整宽：切图是卷面上那一块，横向拉满会被放大成模糊的一大片，
 * 字反而更难读。限制最大高度、保持等比、靠左，读起来才像「卷子上裁下来的那一条」。
 */
.q-stem-figure { white-space: normal; }
.q-stem-figure img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pq-stem-figure img { display: block; max-width: 100%; margin: 4px 0 2px; }
/* 打印时切图要用整块纸宽（孩子要看清题目），不限制高度 */
@media print {
  .q-stem-figure img { max-height: none; border-color: #ddd; }
  .pq-stem-figure img { max-width: 100%; max-height: 120mm; }
}
.answer-line { font-size: 13.5px; margin: 3px 0; }
.answer-line b { color: var(--ink-2); font-weight: 600; }
.answer-line .right-ans { color: var(--success); font-weight: 600; }
/* 学生作答：不用红色删除线 —— 那看起来像「写的全错了」，
   但很多时候只是漏了一问，或者判分本身有争议。
   对错由旁边的判定标签说明，这里保持中性可读。 */
.answer-line .wrong-ans { color: var(--ink-2); }

/*
 * 「点这块进详情」（错题本卡片）：切图 + 隐藏题干整块可点。
 *
 * 为什么不按按钮的样子做（底色块 + 边框）：这一块是**要读的正文** ——
 * 一上按钮底色，整张卡就变成一大块色块，图片反而更难看，喧宾夺主。
 * 但纯图又完全看不出能点，所以只留最轻的一处暗示：按下时渗出一点点蓝
 * （:active 的淡底）。手机上 iOS Safari 只给「可聚焦的元素」触发 :active，
 * 所以 .q-tap 带着 tabindex。
 *
 * 原来右下角还有一行「看讲解 ›」，改掉了：点卡片本来就是进详情，
 * 而详情第一眼就是解析 —— 那行字既过时说的事，又白占一格高度。
 * 卡片上的勾选框、状态角标、知识点标签和删除 ✕ 一个都没动。
 */
.q-tap { margin: 0 -6px; padding: 0 6px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.q-tap:active { background: rgba(47, 107, 255, .07); }
.q-tap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/*
 * 错题卡右上角的删除键。
 *
 * 为什么画得这么「轻」：它和「举一反三 / 已掌握」两个大按钮在同一张卡上，
 * 却是**低频且不可逆**的动作。做成一枚实心红按钮，视觉重量会压过主操作，
 * 用户顺手点到的概率反而变高。所以只留一个淡灰的 ✕，
 * 手指按下去才变红（:active）—— 颜色是「按下确认」的反馈，不是装饰。
 *
 * 命中区域用 padding 撑到 30px 见方：✕ 本身只有 18px，
 * 手机上那个小十字按不准，而按不准的删除键比没有删除键更糟。
 *
 * 组卷勾选模式下卡片里所有 .btn 都被断掉点击（见上面 body.picking 那条），
 * 这个键不是 .btn，所以在这里显式跟上 —— 选择模式下「只勾选」这条规矩
 * 不能有一个例外，否则用户点一下 ✕ 会同时弹出系统确认框和勾中这张卡。
 */
.q-del {
  flex: none;
  width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center;
  border: none; border-radius: 9px;
  background: transparent;
  color: var(--ink-3, #97a3b6);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.q-del:hover { background: #f2f4f8; color: var(--ink-2, #5b6b82); }
.q-del:active { background: var(--danger-soft); color: var(--danger); }
body.picking .q-del { pointer-events: none; opacity: .35; }

/* ---------- 提示条 ---------- */
.alert {
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px;
  display: flex; gap: 10px; align-items: flex-start; line-height: 1.6;
}
.alert .ico { font-size: 18px; flex: none; line-height: 1.3; }
.alert.warn { background: var(--warn-soft); border: 1.5px solid #fbdcae; color: #8a5a06; }
.alert.danger { background: var(--danger-soft); border: 1.5px solid #f7c9ca; color: #a92a2e; }
.alert.info { background: var(--primary-soft); border: 1.5px solid #cfdeff; color: var(--primary-dark); }
.alert.success { background: var(--success-soft); border: 1.5px solid #bfe8d1; color: #0b7c3c; }
.alert b { font-weight: 800; }

/* ---------- 讲解区 ---------- */
.explain { background: #f8faff; border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; font-size: 13.8px; }
.explain h4 {
  margin: 12px 0 5px; font-size: 13px; color: var(--primary-dark);
  display: flex; align-items: center; gap: 5px;
}
.explain h4:first-child { margin-top: 0; }
.explain ol, .explain ul { margin: 4px 0; padding-left: 20px; }
.explain li { margin-bottom: 4px; }
.explain .encourage {
  margin-top: 10px; padding: 9px 11px; background: var(--success-soft); border-radius: 9px; color: #0b7c3c; font-size: 13px;
}

/* ---------- 加载 ---------- */
.loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 10px; color: var(--ink-3); font-size: 13.5px; }
.spinner {
  width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 底部导航 ---------- */
/*
 * 底栏的下沿：和顶栏同一套写法（max 包住 env）。
 *
 * 底栏自己**没有**基础内边距，所以 max(0px, ...) 在 env 是 0 的机器上就是 0 ——
 * 不会凭空多出一条空白；有 home indicator（iPhone 那条小黑条）时等于它的高度。
 * body 的 padding-bottom 用同一个表达式，两边一起让开，内容不会被底栏压住。
 */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
}
.nav-inner { max-width: 720px; margin: 0 auto; width: 100%; display: flex; }
.nav button {
  flex: 1; border: none; background: none; padding: 8px 2px 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; color: var(--ink-3); font-family: inherit; height: var(--nav-h);
  justify-content: center; position: relative;
}
.nav button .ni { font-size: 19px; line-height: 1; }
.nav button.active { color: var(--primary); font-weight: 700; }
.nav button .dot-badge {
  position: absolute; top: 5px; right: 50%; margin-right: -20px;
  background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 999px; display: grid; place-items: center; padding: 0 4px; font-weight: 700;
}

/* ---------- 列表项 ---------- */
.list-item {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff;
  cursor: pointer; transition: border-color .15s;
}
.list-item:active { border-color: var(--primary); }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.list-item .li-sub { font-size: 12.5px; color: var(--ink-3); }

.kp-count {
  flex: none; text-align: center; min-width: 54px; padding: 6px 4px; border-radius: var(--radius-sm);
  background: #eef1f6;
}
.kp-count .n { font-size: 19px; font-weight: 800; line-height: 1.1; }
.kp-count .t { font-size: 10.5px; color: var(--ink-3); }
.kp-count.hot { background: var(--danger-soft); }
.kp-count.hot .n { color: var(--danger); }
.kp-count.warm { background: var(--warn-soft); }
.kp-count.warm .n { color: #b5730a; }

/* ---------- 进度条 ---------- */
.bar { height: 7px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }

/* ---------- 柱状图 ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 8px 0 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart .col .v { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.chart .col .b { width: 100%; max-width: 44px; background: linear-gradient(180deg, #6aa6ff, #2f6bff); border-radius: 7px 7px 3px 3px; min-height: 3px; }
.chart .col .b.wrong { background: linear-gradient(180deg, #ff8a8d, #e5484d); }
.chart .col .l { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 32, 58, .45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
/*
 * ★ `min-width: 0` 不是顺手加的，它是「整块面板横向溢出」的第二道闸。
 *
 * `.modal` 是 `.modal-mask`（display: flex）的**格子**，而格子的 min-width
 * 默认是 auto = 「内容最小宽度」。也就是说：只要弹层里有一块内容（当年是
 * 一条长公式）的最小宽度是 649px，这个 720px 的上限就管不住它 ——
 * 面板会真的变成 649px 宽，右边那 219px 直接落在屏幕外。
 * 第一道闸在公式容器上（见下面「长公式」那一节），这一道是给
 * 「将来又有什么东西宽了」留的：宽度到不了 max-width 以上。
 */
.modal {
  background: #fff; width: 100%; max-width: 720px; border-radius: 20px 20px 0 0;
  max-height: 88vh; overflow-y: auto; padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: rise .25s ease;
  min-width: 0;
}
@keyframes rise { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-head .x { border: none; background: #eef1f6; width: 30px; height: 30px; border-radius: 999px; font-size: 16px; cursor: pointer; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px); transform: translateX(-50%);
  background: rgba(16, 32, 58, .92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; z-index: 99; max-width: 88vw; text-align: center;
  animation: fade .2s ease;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty .ei { font-size: 42px; margin-bottom: 10px; }
.empty .et { font-size: 14px; }

/* ---------- 折叠 ---------- */
.collapse-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.collapse-head .arrow { color: var(--ink-3); font-size: 12px; transition: transform .2s; }
.collapse.open .arrow { transform: rotate(90deg); }

/* ---------- 练习答题 ---------- */
.practice-item { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 13px; margin-bottom: 11px; }
.practice-item .pi-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; align-items: center; }
.practice-item .pi-result { margin-top: 9px; font-size: 13.5px; padding: 9px 11px; border-radius: 9px; }
.practice-item .pi-result.right { background: var(--success-soft); color: #0b7c3c; }
.practice-item .pi-result.wrong { background: var(--danger-soft); color: #a92a2e; }
/*
 * 答不全（2026-11-30）：多小问只答了其中一问。
 * 不是「错在序号」，是「还没答完」—— 用提醒色，不用错的红色；
 * 但它仍然算错（is_correct = 0），所以不换成绿色。
 */
.practice-item .pi-result.partial { background: var(--warn-soft); color: #8a5a06; }

/*
 * 题卡按题型作答（2026-11-29）：
 *   · 选择题 = 四颗字母键，点一下就算作答（所以按 44 高做，但视觉比主按钮轻）；
 *   · 解答题 = 虚线「在纸上写」提示（虚线 = 这一块不归 App 判）；
 *   · 填空 / 老数据 = 原来的输入框，样式不动。
 */
.practice-item .pi-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.practice-item .pi-opt {
  appearance: none; -webkit-appearance: none; font: inherit; height: 44px; padding: 0;
  border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: .12s;
}
.practice-item .pi-opt:active { transform: scale(.98); }
.practice-item .pi-opt .k {
  font-style: normal; font-weight: 800; font-size: 14px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #eef2f9; color: var(--ink-2); display: grid; place-items: center;
}
.practice-item .pi-opt:disabled { cursor: default; opacity: .5; }
.practice-item .pi-opt.picked { border-color: var(--primary); background: var(--primary-soft); opacity: 1; }
.practice-item .pi-opt.picked .k { background: #fff; color: var(--primary-dark); }
.practice-item .pi-opt.right { border-color: #bfe8d1; background: var(--success-soft); opacity: 1; }
.practice-item .pi-opt.right .k { background: #fff; color: #0b7c3c; }
.practice-item .pi-opt.wrong { border-color: #f3c0c2; background: var(--danger-soft); opacity: 1; }
.practice-item .pi-opt.wrong .k { background: #fff; color: #a92a2e; }

.practice-item .pi-paper {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 11px 12px;
  border: 1.5px dashed #cfd8e6; border-radius: 10px; background: #f8fafd;
}
.practice-item .pi-paper .ic { flex: none; display: flex; color: var(--ink-3); }
.practice-item .pi-paper-txt { min-width: 0; }
.practice-item .pi-paper .t { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.practice-item .pi-paper .s { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/*
 * 「✓ 会了 / ? 还不太懂」—— 老板要求「小、不抢戏」。
 * 视觉高 30px（比主按钮小两档），::after 把可点区域扩到 44 高：
 * 手机上够得着，版面上又不会变成第三颗主按钮。
 * 判错不出现（hidden 由 JS 控制），所以 [hidden] 必须真的 display:none。
 */
.practice-item .pi-confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.practice-item .pi-confirm[hidden] { display: none; }
.practice-item .pi-confirm .lbl { flex: none; font-size: 11px; color: var(--ink-3); }
.practice-item .pi-chip {
  position: relative; appearance: none; -webkit-appearance: none; font: inherit;
  height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1.2px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: .12s;
}
.practice-item .pi-chip::after { content: ''; position: absolute; inset: -7px -6px; }
.practice-item .pi-chip.yes { color: #0b7c3c; border-color: #bfe8d1; background: var(--success-soft); }
.practice-item .pi-chip.no { color: #8a5a06; border-color: #fbdcae; background: var(--warn-soft); }
.practice-item .pi-chip.yes.on { background: #0b7c3c; border-color: #0b7c3c; color: #fff; }
.practice-item .pi-chip.no.on { background: #8a5a06; border-color: #8a5a06; color: #fff; }
.practice-item .pi-chip:disabled { cursor: default; }


@media (max-width: 360px) {
  .stat .num { font-size: 19px; }
  .nav button { font-size: 10px; }
}


/* ================================================================== */
/* 组卷打印页                                                          */
/* ================================================================== */

/* ---- 知识点勾选行 ---- */
.kp-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff;
  margin-bottom: 8px; cursor: pointer; transition: .15s;
}
.kp-pick:active { transform: scale(.995); }
.kp-pick.on { border-color: var(--primary); background: var(--primary-soft); }
.kp-pick input { display: none; }
.kp-pick .kp-body { flex: 1; min-width: 0; }
.kp-pick .kp-name { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.kp-pick .kp-bar {
  display: block; height: 5px; border-radius: 3px; background: #e9eef7;
  margin-top: 6px; overflow: hidden;
}
.kp-pick .kp-bar i { display: block; height: 100%; background: linear-gradient(90deg,#7aa2ff,#2f6bff); border-radius: 3px; }
.kp-pick .kp-count {
  font-size: 12.5px; color: var(--ink-3); white-space: nowrap;
  background: #fff; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line);
}
.kp-pick.on .kp-count { background: #fff; border-color: #c7d7ff; color: var(--primary-dark); font-weight: 600; }

/* ---- 卷子 ---- */
/*
 * ## 纸面宽度：手机撑满，宽屏按 A4 收窄并居中
 *
 * 用户报的「宽屏上卷子只占左边一半、右边整片空白」根子在下面 `.paper-cols`
 * 那两列（见那里的说明），但既然这张纸最终要打 A4，宽屏上就该长成 A4 的样子：
 * 190mm 正文 + 边距 ≈ 210mm。
 *
 * 为什么是 mm 而不是写死 px：打印时这张纸就是 A4，屏幕上用同一个宽度单位看，
 * 屏幕预览和纸面才是同一件事（WYSIWYG）。写 794px 的话，将来改了 @page 边距
 * 两边就对不上了。
 *
 * 手机上（< 210mm 的视口）max-width 不起作用，纸面照旧撑满 —— 那里没有
 * 「右边空白」这种事，能多一个字是一个字。
 */
.paper {
  background: #fff; border-radius: 12px; padding: 22px 20px 26px;
  box-shadow: var(--shadow); margin-bottom: 20px;
  max-width: 210mm; margin-left: auto; margin-right: auto;
  font-size: 13.5px; line-height: 1.85; color: #000;
  /* 兜底：纸面自己不许有横向溢出，任何一格都不能把纸撑宽 */
  overflow-wrap: break-word;
}
.paper-head { text-align: center; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 18px; }
.paper-title { font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.paper-meta {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 12px; font-size: 13px; flex-wrap: wrap;
}
.paper-sub { margin-top: 8px; font-size: 12.5px; color: #444; }

.paper-group { margin-bottom: 16px; }
.paper-group-title {
  font-weight: 700; font-size: 13.5px; color: #1a3a7a;
  background: #eef3ff; border-left: 4px solid #2f6bff;
  padding: 5px 10px; border-radius: 4px; margin-bottom: 12px;
}

/*
 * ## 双列排版：`minmax(0, 1fr)` 不是「换个写法的 1fr」
 *
 * 踩过的坑（用户截图报的「卷子只显示半列、右半列不显示、文字贴右边缘被裁」）：
 *
 *   原来写的是 `grid-template-columns: 1fr 1fr`。`1fr` 的**最小值**是 `auto`，
 *   也就是每一格都**不许窄于内容的最小宽度**。而这批物理题的题干里有
 *   KaTeX 公式（`.katex .base` 是 `white-space:nowrap` + `width:min-content`）
 *   和 OCR 粘成一片的长数字串 —— 它们的最小宽度能到 800px。
 *
 *   于是两列被撑成 799px + 61px：左边把纸面吃掉，右边只剩一条缝，
 *   整块 grid 比纸还宽（实测 A4 布局宽度 703px 时内容宽到 875px）。
 *   屏幕上表现为横向溢出；**打印时溢出的部分直接落在纸外面** ——
 *   看起来就是「右半列没了、文字贴着右边缘断掉」。
 *
 *   `minmax(0, 1fr)` 把最小值钉成 0：两列永远等宽、永远不把纸撑宽。
 *   内容那一侧再由 `overflow-wrap` 和下面 `.katex` 的折行规则负责收进来。
 *
 * 两列之间的 20px 间距是固定的，不是按比例分 —— 分比例的话窄屏上间距会
 * 缩到几乎贴在一起，两列看起来像一列。
 */
.paper-cols { display: grid; gap: 14px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.paper-cols[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paper-cols[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
/* 格子本身也必须能收缩，否则里面那个不可断的长串照样会把它顶出去 */
.paper-cols > .pq-item { min-width: 0; }

.pq-item { break-inside: avoid; page-break-inside: avoid; }
.pq-stem {
  text-align: justify;
  /*
   * `anywhere`（而不是 `break-word`）：两者都允许在长单词中间断行，
   * 但只有 `anywhere` 会把这个断点算进**最小宽度**里 —— 而撑宽格子的
   * 恰恰是最小宽度。用 `break-word` 的话纸面不溢出、格子却还是被顶着。
   */
  overflow-wrap: anywhere;
}
.pq-no { font-weight: 700; margin-right: 3px; white-space: nowrap; display: inline-block; }
.pq-options { margin: 3px 0 0 14px; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.pq-opt { display: block; }
.pq-space { height: 58px; border-bottom: 1px dashed #ccc; margin: 4px 0 2px; }
.paper-cols[data-cols="1"] .pq-space { height: 84px; }

/*
 * ══════════════════════════════════════════════════════════════════
 * 宽内容（图 / 表 / pre / 定宽块）：**一个都不许把纸面撑出去**
 * ══════════════════════════════════════════════════════════════════
 *
 * ## 用户报的是什么
 *
 *   「第 8 页右边的那个图，页面排版的问题」—— 截图里两张点阵图左右都缺，
 *   右边的图旁边还有一大片空白，看起来像整块内容被平移出了屏幕。
 *
 * ## 量出来的根因（不是猜的）
 *
 * 周测卷预览（.paper / #paperSheet）里，题干来自学科网 contentFormat=0 的 HTML，
 * 里面是真正的 img 标签。而 `.pq-stem` 从来没有给 img 限过宽：
 *
 *   视口 390 · 纸面 362 · 内容 1620（两张 760 的点阵图 + 一张 1600 的图）
 *   #paperSheet  scrollWidth 1620 / clientWidth 362
 *   .overlay-body scrollWidth 1634 / clientWidth 390（overflow-x 计算成 auto）
 *
 * 于是图直接画到白纸外面（右边一片灰），而 .overlay-body 被撑出**横向滚动** ——
 * 用户往右一划，左边那一截就被裁走了。截图里「左边也缺 + 右边留白」就是
 * 「居中/平移 + 超宽」叠出来的那一步。
 *
 * ## 为什么不能只写 `.paper { overflow-x: hidden }`
 *
 * 那是**裁**，不是收。裁掉的部分既看不到也点不到，而用户要的是「看得全」。
 * 所以按三类分别收：
 *
 *   ① 图 / svg / math → 等比缩到容器宽（max-width: 100%; height: auto）。
 *      题目切图那条老规矩（.q-stem-figure img 限高 340px）不动。
 *   ② 表格 / pre → 交给**它自己**横向滚（max-width:100% + overflow-x:auto）。
 *      纸面一寸都不动，表格可以划 —— 这是「局部滚动」唯一合法的位置。
 *   ③ 第三方 HTML 的落点（.pq-stem 等）自己也是封闭盒子：min-width:0 +
 *      overflow-x:auto 兜底。将来冒出一个没枚举到的宽元素，最坏也只是
 *      那一块内部滚动，不会再把整页/整张纸顶宽。
 *
 * ⚠️ 第 ③ 条为什么必须落在**盒子**上而不是内容上：滚动容器能裁住画面，
 * 但它给父级的「最小内容宽度」仍然是内容的自然宽度 —— 不给盒子钉 min-width:0，
 * 它照样会被顶宽（和 .paper-cols 里 1fr 那个坑是同一课）。
 */

/* ① 图 / svg / 内联 MathML：等比收进容器，不裁 */
.pq-stem img,
.pq-options img,
.pq-card .q-stem img,
.xkw-q-stem img,
.xkw-q .explain img,
.xkw-q-answer img,
.mq-exp-body img,
.q-stem img,
.explain img,
.wd-sol-body img,
.sol-seg-body img,
.deep-block img,
.answer-line img,
.ans-text img {
  max-width: 100%;
  height: auto;
}
.pq-stem svg,
.pq-options svg,
.xkw-q-stem svg,
.q-stem svg,
.explain svg,
.mq-exp-body svg { max-width: 100%; height: auto; }
.pq-stem math,
.pq-options math,
.xkw-q-stem math,
.q-stem math,
.explain math { max-width: 100%; }

/* ② 表格 / pre：自己横向滚，纸面不许动 */
.pq-stem table,
.pq-options table,
.pq-card table,
.xkw-q table,
.xkw-q-stem table,
.explain table,
.wd-sol-body table,
.sol-seg-body table,
.mq-exp-body table,
.deep-block table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.pq-stem pre,
.pq-options pre,
.pq-card pre,
.xkw-q pre,
.xkw-q-stem pre,
.q-stem pre,
.explain pre,
.wd-sol-body pre,
.mq-exp-body pre,
.deep-block pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

/* ③ 第三方 HTML 的落点：封闭盒子（宽度不许往外传） */
.pq-stem,
.pq-options,
.pq-card .q-stem,
.xkw-q-stem,
.xkw-q .explain,
.xkw-q-answer,
.mq-exp-body {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
/* 宽 div / 其它块级子元素：先由父级把宽度钉住（真有撑不下的，③ 会局部滚） */
.pq-stem > *,
.pq-options > *,
.q-stem > *,
.explain > *,
.wd-sol-body > *,
.sol-seg-body > *,
.deep-block > *,
.mq-exp-body > * { max-width: 100%; }
/* 表格里的文字也要能断：不定长数字串会把格子顶出去 */
.pq-stem td,
.pq-stem th,
.pq-card td,
.pq-card th,
.xkw-q td,
.xkw-q th { overflow-wrap: anywhere; word-break: break-word; }

/*
 * 打印：纸面上**没有滚动条**，overflow-x:auto 在那里等于把表裁掉。
 * 所以打印时退回「表格铺满纸宽 + 固定列宽 + 字可断」——
 * 内容挤一点，但一列都不会落到纸外面。
 */
@media print {
  .pq-stem,
  .pq-options,
  .pq-card .q-stem,
  .xkw-q-stem,
  .xkw-q .explain,
  .xkw-q-answer,
  .mq-exp-body { overflow-x: visible; }
  .pq-stem table,
  .pq-options table,
  .pq-card table,
  .xkw-q table,
  .xkw-q-stem table,
  .explain table,
  .wd-sol-body table,
  .sol-seg-body table,
  .mq-exp-body table,
  .deep-block table {
    display: table;
    width: 100%;
    table-layout: fixed;
    overflow: visible;
    word-break: break-word;
  }
  .pq-stem pre,
  .pq-options pre,
  .pq-card pre,
  .q-stem pre,
  .explain pre,
  .mq-exp-body pre,
  .deep-block pre { overflow: visible; white-space: pre-wrap; word-break: break-word; }
}

/*
 * 长公式：允许在**原子之间**折行，而不是让整条公式当一块不可断的砖。
 *
 * KaTeX 给 `.base` 写死了 `white-space:nowrap` + `width:min-content`，
 * 这在网页上是对的（公式不该从中间断开），但在一张 A4 两栏的纸上，
 * 一条 30 个字符的公式会比一栏还宽，于是要么溢出、要么把另一栏挤没。
 *
 * 折行的位置落在两串字符之间（KaTeX 的每个原子是一个 inline-block），
 * 所以不会把 `\frac` 撕成两半，看起来就是「这一行写不下了，接着下一行」。
 * 只对 `.paper` 里的公式这么干 —— 答疑/批改页面上的公式照旧不折行
 * （那里由下面「一屏看全」那一节的缩放 + 滚动负责）。
 *
 * ⚠️ `nowrap` 真正写在 `.katex-display > .katex` 上（`.base` 只是继承者）。
 * 只改 `.base` 是**无效的**：`\frac` 各自是一个 `.base`，一条公式的好几个
 * `.base` 之间的折行点由它们的父级 `.katex` 决定，而它一直是 nowrap ——
 * 实测一条 8 段的公式在 362px 的栏里仍然有 720px 宽、一格都没折。
 * 所以这一条必须写在 `.katex` 上；`.base` 那条留着，管的是「单个原子自己太长」。
 */
.paper .katex-display > .katex { white-space: normal; }
.paper .katex .base { white-space: normal; width: auto; }
.paper .katex-display { max-width: 100%; }

/*
 * ==================================================================
 * 长公式：一屏看全（整体缩放，绝不自动换行）
 * ==================================================================
 *
 * ## 为什么是「缩放」而不是「自动换行」
 *
 * 公式一断行就换了意思。`d/(a+b+c) + a/(b+c+d)` 断在加号处还勉强能读，
 * 可 `(2d+2a+2b+2c)/(a+b+c+d)` 断在分子里就成了另一个式子 —— 而浏览器
 * 对 KaTeX 的输出**没有任何可靠的断行规则**（KaTeX 自己也不标哪里能断）。
 * 缩小只是字小一点，式子还是那个式子；断开就是数学错了，两害相权选缩小。
 * 唯一允许折行的地方是纸面（见上面 `.paper .katex-display > .katex` 和下面的 @media print）：
 * 打印出来的东西可以翻页，网页不行。
 *
 * ## 为什么「页面级横向溢出」比「公式显示不全」严重得多
 *
 * 一条公式撑大的是**整页的 scrollWidth**。而这一页上所有 position: fixed 的
 * 东西（弹层遮罩、详情面板、底部导航、走读层）都按那个被撑大的视口宽度排版 ——
 * 于是「一条公式放不下」升级成「整个详情面板跑到屏幕外，左边看不见、
 * 右边一片空白」（用户截图里的第二张就是这个）。一条公式能让整个应用错位，
 * 所以下面每一个公式容器都必须是**封闭的盒子**：max-width 顶住父容器，
 * overflow 自己兜住，宽度一律不许往外传。
 *
 * 三档行为由 math.js 的 fitSlot 决定：放得下就一个像素都不动 → 放不下就等比缩小
 * → 缩到 12px 还放不下才真的滚动（滚动时右边缘那道阴影就是下面 data-math-scroll）。
 */

/* 块级公式（$$…$$ / \[…\]）：盒子本身 */
.math-formula-block {
  display: block;
  max-width: 100%;
  /* 第二档兜底：缩到 12px 还放不下时允许横向滚动，绝不许把宽度传给页面 */
  overflow-x: auto;
  overflow-y: hidden;
  /* 手指在公式上横划时不要连带触发浏览器的「后退」（安卓 Chrome 会） */
  overscroll-behavior-x: contain;
}
/*
 * 真需要横向滚动时给右边缘一道内阴影。
 *
 * 手机上滚动条是不显示的，没有这道阴影，用户看到的就是「公式被切掉了」，
 * 根本不知道右边还有。不用「滚动到末尾才消失」的那种渐隐：那要 JS 监听
 * scroll 事件，而这里要的只是「还能往右划」这一个暗示。
 */
.math-formula-block[data-math-scroll='1'] {
  padding-right: 8px;
  box-shadow: inset -14px 0 12px -12px rgba(16, 32, 58, .5);
}

/*
 * 行内公式：短的时候**一个字都不动**（还是 inline，跟着正文基线走）。
 * 只有真长到超过一整行时 math.js 才打上 data-math-wide，
 * 那时把它变成一个会自己滚的原子行内块 —— 否则它会把整行、进而整页顶出去。
 */
.math-formula { max-width: 100%; }
.math-formula[data-math-wide='1'] {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
  overscroll-behavior-x: contain;
}

/*
 * 装公式的这些容器统一允许「没有空格的长串」在任何地方断行。
 *
 * 为什么 anywhere 而不是 break-word：两者都能在长单词中间断，
 * 但只有 anywhere 会把这个断点算进**最小宽度** —— 而把 grid/flex 格子顶宽的
 * 恰恰是最小宽度（同上面 .paper-cols 那段踩过的坑）。
 *
 * 它只作用于文字：KaTeX 排出来的每个原子都是 inline-block，断点只可能落在
 * 原子之间 —— 一个 \frac 就是一个原子，永远不会被撕成两半。
 */
.q-stem,
.answer-line,
.explain,
.explain li,
.deep-block,
.deep-steps li,
.wd-sol-body,
.qa-options,
.qa-answer-value,
.compare-val,
.variant-stem,
.ix-lead,
.ix-choice,
.ix-take li,
.sch-steps li,
.sch-kpt,
.sch-hows li,
.ix-formula,
.rep-kp-formula,
.pq-stem,
.pq-options,
.ans-text {
  overflow-wrap: anywhere;
}
/*
 * 这几个同时还是 flex / grid 的格子：格子的 min-width 默认是 auto，
 * 也就是「内容最小宽度」会变成地板，把整行撑宽。钉成 0 才收得住。
 *
 * ⚠️ 光给公式块自己写 overflow-x: auto **是不够的**：滚动容器能裁住画面，
 * 但它给父级的「最小内容宽度」还是公式的自然宽度。放在 flex 格子（比如学情页
 * 知识点那一行：名称 + 这次 4 道）里，格子会被顶到 451px 宽 ——
 * 页面照样溢出 23px。所以要收的是**格子**，不是公式块。
 */
.qa-answer-value,
.deep-identify,
.ix-choice,
.sch-kp-n,
.sch-kp-t > *,
.ans-text,
.compare-cell { min-width: 0; }

/*
 * 上面那串是「已经踩过的几个」。这一条是**系统性的网**：
 * 任何直接装着块级公式的元素都不许被内容的 min-width 顶宽。
 *
 * 用 :has() 而不是再列一串类名，是因为这种容器会随着页面改版不断长出来
 * （学情页这一轮就在重做），而漏掉一个的症状是「页面又被撑出去一次」——
 * 那正是这次要根除的东西。不认识 :has() 的浏览器会整条丢掉，不会更糟。
 */
:has(> .math-formula-block) { min-width: 0; }

/*
 * ★ 打印：**不许**带着屏幕上的缩放去打印。
 *
 * transform: scale 在打印引擎里会和分页、行高打架（量出来的是缩放后的框，
 * 分页却按缩放前的布局算）—— 结果就是公式和正文错位、或者整块被裁在页边界上。
 * 纸面上的策略换一种：缩放全部撤掉，公式允许在原子之间折行。
 * 纸可以翻页，这是它和屏幕最重要的一处不同。
 */
@media print {
  .math-formula-block {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
    box-shadow: none !important;
  }
  .math-formula-block > .katex-display {
    transform: none !important;
  }
  /* nowrap 在这一层（见上面 .paper 那段）—— 打印时要真的放开，否则折不了行 */
  .math-formula-block .katex-display > .katex {
    white-space: normal !important;
  }
  .math-formula-block .katex .base {
    white-space: normal !important;
    width: auto !important;
  }
  .math-formula[data-math-wide='1'] {
    display: inline !important;
    overflow: visible !important;
  }
}

.paper-answers { margin-top: 24px; border-top: 2px solid #000; padding-top: 16px; }
.ans-row { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; border-bottom: 1px dotted #e2e2e2; }
.ans-row b { flex: 0 0 62px; }
.ans-text { flex: 1; min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.ans-kp { flex: 0 0 auto; color: #7a8aa5; font-size: 11.5px; }
.paper-foot { text-align: center; font-size: 11px; color: #9aa7bb; margin-top: 20px; }

/* ---- 卷子预览的工具栏：一行排版切换 + 一行「打印」 ---- */
.paper-bar {
  max-width: 210mm;
  margin-left: auto; margin-right: auto;
}
.paper-bar-row { display: flex; align-items: center; gap: 8px; }
.paper-bar-row + .paper-bar-row { margin-top: 10px; }
.paper-bar-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
/*
 * 单列/双列切换。做成「分段控件」而不是两个 select：
 * 这是**一次二选一**，两个选项都看得见才叫切换（下拉框里还得多点一下才看到选项）。
 */
.seg-mini {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 3px;
  padding: 3px;
  background: #e8eef9;
  border-radius: 10px;
}
.seg-mini button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seg-mini button.on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(16, 32, 58, .12); }
.paper-bar-hint { font-size: 11.5px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }


/* ---- 打印：只打印组卷覆盖层里的那张卷子 ---- */
@media print {
  @page { size: A4; margin: 12mm 10mm; }
  html, body { background: #fff !important; }
  .no-print, .top-float, .top-back, .nav, #toast, .modal-mask, .pick-bar, .grade-act-bar,
  .overlay-head, #paperBuilder,
  /* 安装到桌面的引导条：纸面上没有任何意义，而且它是 fixed，会压在日结表格上 */
  /*
   * 底部那条「练这 N 个一起」的细线（v102 起不再是 .grade-act-bar）——
   * 纸上没有可点的东西，而且它是 fixed，会压在知识点正文上。
   */
  .pwa-bar, .ios-guide-top, .ios-guide-dock, .gy-day-bar { display: none !important; }

  /* 页面上所有内容都藏起来，只留卷子 */
  .page, main { display: none !important; }
  /*
   * 日结页也要能打出来照着抄（这一版把它做成表格，正是为了抄）。
   * 只在「当前停在日结、而且没有打开组卷覆盖层」时放出来 ——
   * 开着组卷覆盖层时仍然只打那张卷子（上面那条 .page 的规则照旧管着）。
   * ⚠️ main 也要一起放：所有 .page 都长在 main 里面，只放 .page 的话它照样是 0 高。
   */
  body:not(.overlay-open) main:has(#page-stats.active),
  body:not(.overlay-open) #page-stats.active { display: block !important; }

  body.overlay-open { overflow: visible !important; }
  #paperOverlay {
    position: static !important;
    display: block !important;
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
  }
  #paperOverlay .overlay-body { padding: 0 !important; overflow: visible !important; }
  #paperPreview { display: block !important; }

  .paper {
    box-shadow: none !important; border-radius: 0 !important;
    padding: 0 !important; margin: 0 !important;
    max-width: none !important;
    font-size: 10.5pt; line-height: 1.7;
  }
  .paper-title { font-size: 15pt; }
  .paper-cols { gap: 10px 14px; }
  /*
   * 打印没有滚动条 —— 屏幕上溢出的内容只是「右边能滑过去」，纸面上就是**被裁掉**。
   * 所以纸面上再压一道：两列的等宽规矩（minmax(0,1fr)）在打印里同样生效，
   * 这里额外把每一格钉在纸宽以内，任何一格都别想把纸撑出一页之外。
   * （用户截图报的「右半列不显示、文字贴右边缘断掉」就是打印时溢出的样子。）
   */
  .paper-cols, .paper-cols > .pq-item { max-width: 100%; }
  .pq-space { height: 42px; }
  .page-break { page-break-before: always; break-before: page; }
  .ans-row { font-size: 9.5pt; }
}

/* ================================================================== */
/* 全屏覆盖层（组卷）                                                   */
/* ================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: fade .18s ease;
}
.overlay.hidden { display: none; }
body.overlay-open { overflow: hidden; }

.overlay-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #2f6bff, #1e4fd8);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.overlay-head #paperOverlayTitle { flex: 1; }
.icon-btn {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.18);
  color: #fff; font-size: 16px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:active { transform: scale(.94); }

.overlay-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 30px;
}


/* ================================================================== */
/* 右上角那几颗圆按钮（齿轮 / 记录 / 头像）                              */
/* ================================================================== */
/* 基础样式只兜底；v130 的浮层那一段（文件末尾）会把尺寸 / 颜色定死 */
.gear-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(16, 32, 58, .12); background: rgba(255, 255, 255, .82);
  color: var(--ink-2); font-size: 17px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: .15s;
}
.gear-btn:active { transform: scale(.94); background: #fff; }

/* ================================================================== */
/* 「巩固」页的顶部三段切换                                             */
/* ================================================================== */
.seg {
  display: grid; grid-auto-flow: column; gap: 4px;
  background: #e8eef9; border-radius: 12px; padding: 4px; margin-bottom: 12px;
}
.seg button {
  border: 0; background: transparent; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; padding: 9px 6px; border-radius: 9px;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.seg button.on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(16,32,58,.12); }
.subpage { display: none; }
.subpage.active { display: block; }

/* ================================================================== */
/* 图库                                                                */
/* ================================================================== */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 20px; padding: 6px 13px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: .15s; white-space: nowrap;
}
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.switch-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.switch-line input { width: 16px; height: 16px; accent-color: var(--primary); }

.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lib-card {
  padding: 0; border: 2px solid var(--line); border-radius: 12px; background: #fff;
  overflow: hidden; cursor: pointer; font-family: inherit; text-align: left;
  display: flex; flex-direction: column; transition: .15s;
}
.lib-card:active { transform: scale(.985); }
.lib-card.right { border-color: #b7e4c9; }
.lib-card.wrong { border-color: #f7c9ca; }
.lib-thumb { display: block; background: #f6f8fc; overflow: hidden; }
/* 题目切图有宽有窄（选择题是宽条、解答题接近方形），
   所以不能固定宽高比 + cover —— 那会把宽条裁成中间一条。用自然高度。 */
.lib-thumb img {
  width: 100%; height: auto; max-height: 260px;
  object-fit: contain; object-position: top center; display: block;
}
.lib-meta {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3);
}
.lib-mark { font-weight: 800; font-size: 13px; }
.lib-card.right .lib-mark { color: var(--success); }
.lib-card.wrong .lib-mark { color: var(--danger); }
.lib-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 题库排重的「重复 N 次」标记：靠右并禁止收缩 ——
   左边的学科文字本来就是可截断的，这个标记被截掉用户就不知道有东西被排掉了。 */
.lib-dup { margin-left: auto; flex: none; white-space: nowrap; margin-right: 0; }
.lib-detail-img { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f6f8fc; }
.lib-detail-img img { width: 100%; display: block; }

.tag.green { background: var(--success-soft); color: var(--success); }
.dropzone .t3 { font-size: 12px; color: var(--ink-3); margin-top: 6px; }


/* ================================================================== */
/* 批改后的标记图：看得见的题框 + 只读的对错标记                          */
/* ================================================================== */
.marked-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  --mark-size: 28px;
}
.marked-wrap > img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.mark-dot {
  position: absolute;
  min-width: var(--mark-size);
  height: var(--mark-size);
  padding: 0 4px;
  margin: 0;
  border-radius: 8px;
  border: 2px solid #fff;
  color: #fff;
  font-size: calc(var(--mark-size) * 0.5);
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  /*
   * 这个胶囊**只是标签，不是按钮**（原先是「点它改判」，见 util.js 里那段）。
   * `pointer-events: none` 让点击穿透到下面的题框热区 ——
   * 用户想点开解析时点在胶囊上，也该弹解析，而不是什么都没发生。
   */
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.mark-dot.right { background: var(--success); }
.mark-dot.wrong { background: var(--danger); }

/*
 * 空级标记：题框里**每一处作答**一个小 ✓/✗（豆包爱学就是这么标的）。
 *
 * 和题级胶囊的区别只有两条，但两条都是必需的：
 *   ① 小一圈（--blank-size，由 util.js 按图宽算），因为它要落在一处手写上，
 *      和胶囊一样大会把孩子的字整个盖掉 —— 而这张图首先是要能读的；
 *   ② 圆形而不是圆角方块：方块会被看成「另一道题的标号」。圆点读起来是
 *      「这一处」，和下面详情里的「第 4 空」是同一个东西。
 *
 * pointer-events: none 和胶囊同一条理由：点在它身上也应该弹解析，
 * 而不是什么都没发生（改判已经从图上挪走了，见 util.js 那段）。
 */
.blank-mark {
  position: absolute;
  width: var(--blank-size, 16px);
  height: var(--blank-size, 16px);
  border-radius: 50%;
  border: 1.5px solid #fff;
  color: #fff;
  font-size: calc(var(--blank-size, 16px) * 0.62);
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.blank-mark.ok { background: var(--success); }
.blank-mark.no { background: var(--danger); }

/*
 * 空级**位置框**（2026-11-27）：把「孩子写在哪」圈出来，让判定可核对。
 *
 * 和上面两个标记的区别：
 *   · 胶囊 / 圆点回答「对错」，是**结论**；
 *   · 这个细框只回答「读的是这一处」，是**证据**。
 * 所以它必须是细的、半透明的 —— 目的只是让人对上位置，不能盖住笔迹。
 *
 * 对/错用两种描边色（绿/红）是为了和里面的圆点同色系，扫一眼知道
 * 「框里的这一处判的是对还是错」；但它们**比圆点淡**，不抢。
 */
.blank-box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid rgba(37, 99, 235, 0.45);
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.06);
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.blank-box.ok { border-color: rgba(26, 158, 75, 0.5); background: rgba(26, 158, 75, 0.07); }
.blank-box.no { border-color: rgba(217, 48, 37, 0.5); background: rgba(217, 48, 37, 0.06); }

/*
 * 「判定依据不足」小灰标 / 「两值都没有」那行说明。
 *
 * 只在批改结果页出现（answerAreaHtml 的 verify 分支）。措辞刻意是
 * 「依据不足」「建议人工判一下」，不是「识别失败」—— 前者说的是**我们看到的证据**，
 * 后者是在替系统下结论，而 67% 的题它其实读到了。
 */
.answer-line .judge-weak { font-size: 11.5px; }
.answer-line.judge-none {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
  background: #f7f9fc;
  border-radius: 8px;
  padding: 7px 9px;
}

/*
 * 详情弹层里那几行「第 1 空 ✓ / … 」+ 诊断句。
 *
 * 为什么单独占一行而不是并进「正确答案」那一行：正确答案说的是**应该写什么**，
 * 这一行说的是**孩子错在哪一处**。混在一起读，家长会把「第 4 空 ✗」当成
 * 「答案错了」的又一种说法，而它其实是「前面三步都对了」这个好消息。
 *
 * 多空题的那两行（学生作答 / 正确答案）在 components.js 里**整个不渲染** ——
 * 这类题的答案是每空一个词，压成一句「正确答案」只会得到一句假话。
 */
.blank-line { margin-top: 8px; }
.blank-chip {
  font-size: 12px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 7px;
  font-weight: 700;
  white-space: nowrap;
}
.blank-chip.ok { background: var(--success-soft); color: var(--success); }
.blank-chip.no { background: var(--danger-soft); color: var(--danger); }
/*
 * 多空填空：**一空一行**。
 *
 * 定义填空常常十几个空，挤成一行时窄屏上会折成一团，读不出「第几空对、
 * 第几空错」的顺序 —— 而这个顺序正是诊断（概念层/执行层）在说的东西。
 * 一行之后每行还能挂上那一空的内容（有就显示，抽不出来就只有 ✓/✗）。
 */
.blank-rows { display: flex; flex-direction: column; gap: 5px; }
.blank-row { display: flex; align-items: baseline; gap: 8px; }
.blank-row .blank-chip { flex: none; }
.blank-row-text { font-size: 13.2px; color: var(--ink); word-break: break-word; }
.blank-row.no .blank-row-text { color: var(--ink-2); }
/*
 * 解析按 (01)(02) 分段：一段一块。
 *
 * 编号单独一列（不换行、等宽数字），正文块右对齐成一条线 —— 这样「第 3 空」
 * 去看解析里那一段时，眼睛顺着编号往下扫就行，不必在一坨文字里找。
 */
.sol-seg { display: flex; gap: 7px; align-items: baseline; }
.sol-seg + .sol-seg { margin-top: 7px; }
.sol-seg-no {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.sol-seg-body { min-width: 0; }
/*
 * 解析层次：目标顶格，分支缩一级，推出再缩一级，结论单独一行并加粗。
 *
 * 只靠 padding-left + border-left 表现层次，不插任何图标、不改一个字 ——
 * 解析原文是爱学给的，排版可以重组，文字不能动。
 *
 * 长行必须折行：数学解析里一个式子常常很长，横向溢出会把右边的答案切掉。
 */
.sol-lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sol-line {
  min-width: 0;
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.sol-gap { height: 7px; flex: none; }
.sol-line.lv1 { padding-left: 13px; border-left: 2px solid var(--line); }
.sol-line.lv2 { padding-left: 26px; border-left: 2px solid var(--line); }
.sol-line.lv3 { padding-left: 39px; border-left: 2px solid var(--line); }
.sol-branch { color: var(--ink); }
.sol-deduce { color: var(--ink-2); }
.sol-concl { font-weight: 700; color: var(--ink); }
.sol-list { color: var(--ink); }
.blank-diag {
  margin-top: 6px;
  font-size: 12.8px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blank-diag .tag { flex: none; }
.blank-diag.exec .tag { background: var(--warn-soft); color: #b5730a; }
.blank-diag.concept .tag { background: var(--danger-soft); color: var(--danger); }
.blank-diag.method .tag { background: #eef2ff; color: #3f56b5; }
/* 整页那一行汇总：不显眼的一行字，不抢批改结果的主次 */
.blank-sum { font-size: 12px; margin-top: 6px; }
.blank-sum b { font-weight: 700; color: var(--ink-2); }

/*
 * 每道题的虚线题框。
 *
 * 视觉语言**刻意跟等待期间的 `.scan-box` 对齐**（同样 2px、同样 5px 圆角、
 * 下方那个 animation 也是从它那儿来的），目的是让用户觉得
 * 「等待时圈出这道题的那个框留下来了」，而不是批改后又冒出一套新图形。
 *
 * 但有两处**必须比 scan-box 克制**：
 *
 *   ① 去掉内发光和多层外发光。scan-box 是一张「还没人细看」的图上的
 *      临时装饰；批改后这张图是拿来读的 —— 题干、选项、孩子的手写作答
 *      全在框里，任何发光的叠加都会让底下的铅笔字发灰。
 *   ② 不做半透明填充，只在边缘描一圈点。填充会影响读题，
 *      而虚线本身已经足够说明「这块是一道题」。
 *
 * 颜色按对错分（绿 / 红），和胶囊、和下方的题目卡片是同一套语义。
 */
.q-outline {
  position: absolute;
  box-sizing: border-box; /* 让虚线框和 bbox 严格重合：不加这条，2px 边框会向外撑出去 */
  border: 2px dashed rgba(18, 161, 80, 0.6);
  border-radius: 5px;
  /* ② 的硬要求：框不能吃点击，题框内任意位置都得能弹出解析。
     它在 DOM 里本来就排在热区前面，这一条是第二道保险。 */
  pointer-events: none;
  box-shadow: 0 0 6px rgba(18, 161, 80, 0.14);
  /* 缓慢呼吸一下，帮「这题在哪儿」多抓一眼注意力。幅度很小，
     因为它是背景信息，不该比图上的字更抢眼。 */
  animation: q-outline-breath 2.8s ease-in-out infinite;
}
.q-outline.no {
  border-color: rgba(229, 72, 77, 0.66);
  box-shadow: 0 0 6px rgba(229, 72, 77, 0.16);
}
@keyframes q-outline-breath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) {
  .q-outline { animation: none; }
}

/* 拍下一张 */
.next-bar { margin: 14px 0 4px; }

/*
 * 批改结果页底部那条**固定**操作条。
 *
 * 为什么固定而不是排在页面末尾：这一页的长度由题目数量决定（十几道题很正常），
 * 排在末尾那颗按钮一屏里根本看不到 —— 用户批完一页，屏幕上全是题卡，
 * 只能靠往下滑才发现「还能接着拍」。而这个动作（继续批改下一页）是
 * **整页级**的，和「看错题本」一起构成「这一页看完了，下一步去哪」，
 * 它就该一直待在拇指边。
 *
 * 照抄错题本那条底部浮窗的定位方式（.wrong-fab）：让开底部导航、留安全区、
 * 居中限宽。同一套参数，两页看起来才是同一个东西。
 */
.grade-act-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 40;
  display: flex;
  gap: 8px;
  max-width: 696px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 32, 58, .14);
}
.grade-act-bar .btn { height: 42px; }
/* 给那条浮在内容上的操作条留出空间：不留的话最后一张题卡会被它压住 */
.grade-act-spacer { height: 58px; }

/*
 * 跨页题：结果页底部「下一张接着这页」那一行。
 *
 * 刻意做得比按钮轻（小字 + 灰色）：它是个可选的声明，不是主操作。
 * 做得显眼会让人以为「不勾就批不了」，于是一路勾着过去、每页都白带上一页的图。
 */
.next-continue {
  display: flex; align-items: center; gap: 7px;
  margin: 0 4px 12px;
  font-size: 12.5px; color: var(--ink-3);
  cursor: pointer; user-select: none;
}
.next-continue input {
  flex: none; width: 15px; height: 15px; margin: 0;
  accent-color: var(--primary);
}

/* ================================================================== */
/* 流式批改：一题一张卡片往下走                                          */
/* ================================================================== */

/*
 * 为什么这些卡片要长得**比结果页的卡片更轻**
 *
 * 它们是过程，不是结论。用户在这一刻要看的是「第几题、对还是错、题目是什么」，
 * 而不是结果页那一整套（标记图、改判、加入错题本、讲题…）。所以：
 *   · 没有阴影、没有大圆角，靠左边一道 3px 的色条表达判定（绿=对 / 红=错）；
 *   · 卡片之间 8px，让"一张张往下加"这件事在视觉上成立；
 *   · 题干下面紧跟答案和解析，一屏能看两三题 —— 这正是"往下流"该有的密度。
 *
 * 左边色条用 border-left 而不是伪元素：卡片本身就是 flex 容器，
 * 加伪元素会参与布局，得为它再写一遍盒模型，不值得。
 */
.stream-head { margin-bottom: 10px; }
.stream-list { display: flex; flex-direction: column; gap: 8px; }
.stream-q {
  padding: 10px 12px;
  border-left: 3px solid var(--line, #e3e8ef);
  /*
   * 入场只做一次、幅度很小（8px + 淡入）。
   * 卡片是"一道一道往下加"的，滑动太大时整页会像在往上弹，
   * 用户很难保持阅读位置。
   */
  animation: stream-q-in 220ms ease-out both;
}
.stream-q.ok { border-left-color: var(--success, #12a150); }
.stream-q.no { border-left-color: var(--danger, #e5484d); }
@keyframes stream-q-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stream-q { animation: none; }
}
.stream-q-head { display: flex; align-items: baseline; gap: 8px; }
.stream-qno { font-size: 13.5px; }
.stream-q-stem { margin-top: 6px; font-size: 13.6px; line-height: 1.55; }
.stream-q-ans { margin-top: 4px; font-size: 13px; }
.stream-q-sol {
  margin-top: 4px;
  font-size: 12.6px;
  color: var(--text-2, #5b6472);
  line-height: 1.55;
}
.stream-q-sol:empty { display: none; }


/* ================================================================== */
/* 错题本页头：只有标题那一行                                            */
/* ================================================================== */

/*
 * 页头只剩 .sub-head 那一行。
 *
 * 这里原来是一整条卡片（学科 / 状态 / 组卷 ▾ 两层按钮），用户的原话是
 * 「生成练习卷之前就复杂」。现在页头不占独立一条：状态筛选和「⋯」都塞进
 * 返回 + 标题这一行，错题列表直接顶到下面。
 *
 * 为什么状态筛选给自己一个 38px 高的命中区（.status-select）：
 * 它是页头里唯一的高频控件，而标题行本身只有 32px —— 手机上一根手指按 32px
 * 的细条很容易按偏到旁边的「⋯」上。38px 是「好按」和「不把行撑高太多」的交点。
 */
.wrong-head { gap: 6px; }

.sub-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.status-select {
  height: 38px;
  padding: 0 26px 0 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  border: none;
  border-radius: 10px;
  background-color: #f1f4f9;
  /*
   * 箭头只能自己画：appearance:none 之后原生小三角也没了，
   * 而「去掉边框、留着原生箭头」在 Chrome 下会把箭头和文字贴到一起。
   * 内联 SVG，零外部请求。
   */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b82' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.4 9.6 6.6 6.6 6.6-6.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  appearance: none;
  -webkit-appearance: none;
  max-width: 34vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-select:focus { background-color: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }

/* 「⋯」：它是个**低频**入口，所以画得比状态筛选轻一档，但命中区一样大 */
.more-btn {
  flex: none;
  width: 38px; height: 38px;
  border: none; border-radius: 10px;
  background: #f1f4f9;
  color: var(--ink-2);
  font-size: 19px; font-weight: 800; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.more-btn[aria-expanded="true"] { background: var(--primary-soft); color: var(--primary-dark); }

/*
 * 学科标签：**只在真的按学科筛过时**才出现（首页那张学科卡跳过来）。
 *
 * 它不是筛选控件，是「当前列表为什么只有这些题」的说明 —— 首页点「数学」
 * 进来却看到物理题，才是真的看不懂。点它 = 看全部学科，省得退回首页再点一次。
 */
.sub-chip {
  flex: none;
  max-width: 26vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  height: 30px; padding: 0 10px;
  border: 1px solid #c7d7ff; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/*
 * ⋯ 面板：展开就在页头下面，按钮一列，竖排。
 *
 * 为什么竖排一列而不用原来那种并排两栏：这一层混了「正事」（按知识点组卷）、
 * 「花钱」（AI 总结）和「不可撤销」（删除）。横排时它们挨在一起，
 * 手指在一个方向上滑动就能从第一个滑到最后一个；竖排 + 分隔线 + 一行小标题，
 * 让「删除」在空间上和上面那些隔开。
 */
.more-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.more-panel .btn { justify-content: center; }
.more-sep { height: 1px; background: var(--line); margin: 2px 0; }
.more-cap { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

/*
 * 长按卡片的快捷菜单。
 *
 * 题干只露前 3 行（`-webkit-line-clamp`）：菜单要回答的是「我刚才按的是哪一道」，
 * 不是再读一遍题。露全了的话，一道长题干会把三个按钮顶到屏幕外面 ——
 * 那还不如不开这个菜单。
 */
.quick-menu { display: flex; flex-direction: column; gap: 8px; }
.quick-stem {
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
  background: #f7f9fd; border-radius: 10px; padding: 10px 12px;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* ================================================================== */
/* 勾选组卷（错题本 / 题库）                                            */
/* ================================================================== */

/* 底部操作条：浮在底部导航之上 */
.pick-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  /*
   * 竖排 + 里面再分行：错题本的勾选条有两行（第一行组卷、第二行清理工具，
   * 理由见 paper-picker.js 里那段「分两行是防误触」）。
   * 没有清理工具的页面（题库）只有一行，视觉上和原来一模一样。
   */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 32, 58, .1);
}
.pick-bar .pick-row { display: flex; align-items: center; gap: 10px; }
.pick-bar .ps-count {
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
}
.pick-bar .ps-count b { color: var(--primary); font-size: 16px; }

/* 选择模式下给内容留出底部空间，别被操作条盖住 */
body.picking main { padding-bottom: 96px; }
/* 带清理工具时操作条多一行（约 40px），留的空间也得跟着长 —— 否则最后一张卡片被压住，用户以为列表就这么多 */
body.picking.pick-tools main { padding-bottom: 148px; }

/* 卡片角上的勾选框 */
.pick-box {
  display: none;
  position: absolute;
  right: 10px; top: 10px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: #fff;
  font-size: 14px; font-weight: 800;
  line-height: 1;
  place-items: center;
  z-index: 3;
  pointer-events: none;
}
body.picking .pick-box { display: grid; }
body.picking .q-card,
body.picking .lib-card { position: relative; cursor: pointer; }
body.picking .q-card:active,
body.picking .lib-card:active { transform: scale(.99); }

/* 选中态 */
body.picking .pick-box { border-color: #c3cfdf; }
.q-card.picked .pick-box,
.lib-card.picked .pick-box {
  background: var(--primary); border-color: var(--primary);
}
.q-card.picked { border-color: var(--primary) !important; box-shadow: 0 0 0 2px rgba(47,107,255,.16); }
.lib-card.picked { border-color: var(--primary) !important; box-shadow: 0 0 0 2px rgba(47,107,255,.16); }

/* 选择模式下，卡片内部的按钮不该抢点击（要整卡可点） */
body.picking .q-card .btn { pointer-events: none; opacity: .45; }

/* 已激活的切换按钮 */
.btn.gray.on {
  background: var(--primary-soft); color: var(--primary-dark);
  border-color: #c7d7ff; font-weight: 600;
}

/* ================================================================== */
/* 错题本的「挑题零模式」                                               */
/* ================================================================== */

/*
 * 和上面那套 `body.picking`（题库页还在用）**故意不复用同一个类**，不是偷懒：
 *
 * `.picking` 一旦挂上，卡片里所有 `.btn` 都被断掉点击（`pointer-events:none`）、
 * 「看讲解」被藏掉、点整张卡变成勾选。那是「进入一个模式」的语义。
 *
 * 错题本现在**没有模式**：勾选框常驻，点卡片正文照样开讲解，卡片上的
 * 「举一反三 / 已掌握 / ✕」全都照常能按。两件事长得像但语义相反，
 * 共用一个类名迟早会有人把另一边的规矩改坏 —— 所以分开。
 *
 * `body.pick-zero` 只在**有选中**时挂上（操作条浮出来了，需要给列表留底部空间）。
 */
body.pick-zero main { padding-bottom: 96px; }

/*
 * 卡片右上角的常驻勾选框。
 *
 * ## 尺寸
 * 命中区 32×32（用户要求「至少 32×32」），但画出来的圆只有 20px ——
 * 32px 的实心圆在卡片角上会抢走全部注意力，而它是个**可选**的辅助入口
 * （不用它也能读题、看讲解、举一反三）。
 *
 * ## 为什么绝对定位在卡片角上，而不是待在 .q-head 那一行里
 *
 * 试过放进 `.q-head`：那一行已经有「✕ / 题号 / 学科 / 判定 / 复习状态 / 时间」
 * 六样东西，430px 的手机上再塞 32px + 一个 gap 就放不下了 —— 实测中文标签被压成
 * 竖排（「数」换行成「学」），时间也折成两行，整张卡的头部变成一坨。
 *
 * 绝对定位之后再给 `.q-head` 留出 36px 的右内边距：头部那一行的内容宽度和改版前
 * 基本一样（原来最右边是 30px 的 ✕，现在是 32px 的空位），所以一行还是放得下。
 *
 * ## 为什么 ✕ 挪到了头部最左端
 * 卡片右上角让给了勾选框，而删除不可逆 —— 两者不能挨着。现在它们之间隔着
 * 题号、学科、判定、复习状态和时间整整一行。
 */
#wrongList .q-card { position: relative; }
.q-check {
  position: absolute;
  right: 4px; top: 4px;
  flex: none;
  width: 32px; height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.q-check::before {
  content: '';
  width: 20px; height: 20px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #c3cfdf;
  background: #fff;
  transition: background .15s, border-color .15s;
}
.q-check > svg {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  opacity: 0;
  transition: opacity .12s;
}
.q-check[aria-checked="true"]::before { background: var(--primary); border-color: var(--primary); }
.q-check[aria-checked="true"] > svg { opacity: 1; }
/* 键盘/读屏用户按 Tab 走到它时得看得见焦点 —— 它没有边框可亮，只能靠外圈 */
.q-check:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 给勾选框让出那 36px —— 具体理由见上面 .q-check 那段 */
#wrongList .q-head { padding-right: 36px; }
/*
 * 头部这一行**不许挤压自己的成员**：中文标签一被压就会一个字一行，
 * 看上去像排版坏了。挤不下时整块换行（`flex-wrap`），而不是把标签拧成竖排。
 */
#wrongList .q-head { flex-wrap: wrap; row-gap: 6px; }
#wrongList .q-head > * { flex: none; white-space: nowrap; }

/* 零模式下的操作条：**一行**。原来错题本是三行（组卷 / 清理 / AI 总结） */
.pick-bar.zero .ps-count { margin-right: 2px; }

/* 选中之后卡片整块高亮（沿用 .picked，两套模式共用这一个状态类） */
#wrongList .q-card.picked { background: #f7faff; }

/* ================================================================== */
/* 错题本改版：按日期分组的切图网格 + 底部浮窗                            */
/* ================================================================== */

/*
 * 页面底部留白。
 *
 * 底部浮窗是 position:fixed 的，不占文档流 —— 不给列表留出这一块，
 * 最后一行的卡片就被压在浮窗下面。用户会以为「列表就这么多」，
 * 而实际上下面的题他永远滑不到（这一版最典型的隐性丢失）。
 */
#page-wrong { padding-bottom: 92px; }
body.pick-zero #page-wrong { padding-bottom: 108px; }

/* 筛选行：两个下拉平分一行 */
.wrong-filters { display: flex; gap: 8px; margin: 0 0 8px; }
.wrong-filters .status-select {
  /* 标题行里那条 max-width:34vw 是为「塞进一行」定死的；这里独占一行，不需要它 */
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 38px;
}

/*
 * 日期分组标题。
 *
 * 用 h3 而不是 div：读屏软件按标题跳读，一屏十几张图时「今天 / 昨天 / 10月20日」
 * 就是这张列表唯一的目录。视觉上它要**明显**比卡片重一档（加粗 + 深色），
 * 否则整屏图片里根本找不到分组线。
 */
.wrong-day { margin-bottom: 4px; }
.wrong-day-h {
  display: flex; align-items: baseline; gap: 8px;
  margin: 14px 2px 8px;
  font-size: 13.5px; font-weight: 800; color: var(--ink);
  letter-spacing: .2px;
}
.wrong-day-h .cnt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

/*
 * 两列网格。
 *
 * 这就是这次改版的**主判据**：一屏要看到 4-6 道题。
 * 改版前一张卡占满一行、正文是识别出来的文字，一屏只放得下 1 道 ——
 * 用户要翻十几屏才能找到「上周那道几何题」。
 *
 * gap 用 10px：再大会把每格压窄（题目切图本身字就小），再小两张卡就黏成一张。
 */
.wrong-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#wrongList .wrong-grid .q-card {
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

/*
 * 题目切图的容器：**固定高度 + object-fit: contain**。
 *
 * ## 为什么 height 写死
 *
 * 切图的长宽比是千奇百怪的：一道选择题常常是竖长的（题干三四行 + 四个选项），
 * 一道填空题是扁的。如果让每格自己长，两列网格就会变成错落的瀑布流 ——
 * 同一行的两张卡高度不一样，「一行两张」这个视觉对齐就没了，
 * 一屏能放几张也变得不可预测。固定 132px 之后每格一样高，
 * 一屏的容量是算得出来的。
 *
 * ## 为什么是 contain，不是 cover
 *
 * cover 会把图片**裁掉**去填满容器。而这张图是**题目的全部内容**：
 * 竖长的那张图放进 132px 高的框里，cover 砍掉的是题干的开头或结尾 ——
 * 用户看到的是半个题目，还以为这就是全部。contain 保留整张图，
 * 空出来的地方用浅底补齐（看起来像一页纸贴在格子里），一个字都不丢。
 *
 * 代价是窄图两侧有留白、字会小一点 —— 但「小一点」还能点开放大，
 * 「被裁掉」是没法补救的。
 */
.wrong-thumb {
  height: 120px;
  background: #f6f8fc;
  border-bottom: 1px solid var(--line-soft, #eef1f6);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.wrong-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
/*
 * 空级记录的角标：第 19 空（按空收录错题 · 第二批）。
 *
 * 为什么要它：一张小图里只有「式子 + 手写答案」，看图分不出这是第几空；
 * 而「第 19 空」就是这条记录的名字 —— 孩子抄纸质错题本时要照着写这一句。
 * 压在图片左下角（左上角是勾选框、右下角是删除 ✕，两个角都不能占），
 * 半透明白底保证在浅色卷面图和深色笔迹上都读得清。
 */
.wrong-thumb { position: relative; }.wd-blank-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #f0c4c4;
  color: #c0392b;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  pointer-events: none;
}
/*
 * 打印卷面上的「第 19 空」（按空收录 · 第三批）。
 *
 * 用深色描边的小方框，是因为它要能**黑白打印**：浅色底在黑白激光机上会变成一片灰。
 * 摆在题号右边，和「第 3 题」在同一行、同一个字号层级。
 */
.pq-blank {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid #8a8f99;
  border-radius: 3px;
  font-size: 12px;
  line-height: 18px;
  color: #333;
}
/* 没切图时不放空白格：退回题干文字（截断 + 省略号），格子照样有内容 */
.wrong-thumb.text {
  display: flex;
  align-items: center;
  padding: 10px 11px;
  background: #fff;
}
.wrong-thumb.text .q-stem {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/*
 * 有切图时，题干**留在 DOM 里但看不见**：读屏软件要念得出这道题是什么，
 * 而屏幕上一格只留图（那正是用户要的「按图片排版」）。
 * 不能用 display:none —— 那样读屏软件也读不到。
 */
.q-stem.sr-only,
.wrong-thumb .q-stem.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 卡片里的题目区域：整格给图，不另占一行提示 */
#wrongList .wrong-grid .q-tap { margin: 0; padding: 0; position: relative; display: block; }

/* 角标：纯图片看不出对错，状态必须补一格 */
.wd-state {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 7px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.wd-state.wrong { background: var(--danger-soft); color: var(--danger); }
.wd-state.partial { background: var(--warn-soft); color: #b5730a; }
.wd-state.mastered { background: var(--success-soft); color: var(--success); }
/* 未复习的小圆点：不点开也能看出哪些还没动过 */
.wd-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  flex: none;
}

/*
 * 卡片底部两条：状态行（题号 / 角标 / 学科 / 删除）和知识点行。
 *
 * 为什么状态行里还要留一个题号：一屏十几张切图，用户和老师沟通时说的是
 * 「第 3 题」而不是「那张有三个选项的图」—— 序号是这道题在**这份作业里**的名字。
 */
.wrong-meta {
  /*
   * ★ 这一行**允许换行**，而且每个成员都不许被压缩。
   *
   * 用户截图（日清 → 错题本，手机上是两列网格）：一行放不下时，flex 默认
   * 把每个子项一起压窄，「语文」那颗 chip 被压到只剩一个字的宽度，
   * 于是「语」在上、「文」在下 —— 看着像排版坏了。
   *
   * 360 宽的手机上这张卡的内宽只有约 145px（网格两列，每列 161，
   * 减去卡片边框和这一行的左右内边距），而这一行有五样东西：
   * 题号 21 + 做错角标 51 + 学科 33 + 未读点 7 + 删除 24，加上 4 个 5px 的 gap
   * 一共 156px —— **放不下是常态，不是极端情况**（实测差 11px）。
   *
   * 所以三件事一起做：
   *   ① 容器 flex-wrap: wrap —— 放不下就整颗换到第二行（行高只多约 25px）；
   *   ② 每个成员 flex: none + white-space: nowrap —— 不许压窄、不许折字；
   *   ③ 容器 min-width: 0 —— 它自己是网格项里的块，不写这条，子项的最小
   *      内容宽度会把这个格子顶宽（那是另一个方向的坏法）。
   *
   * row-gap 只在真的换了行时才有可见效果，所以单行时高度一点没变。
   */
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap; row-gap: 4px;
  padding: 5px 7px 2px;
  min-height: 26px;
  min-width: 0;
}
.wrong-meta > * { flex: none; white-space: nowrap; }
.wrong-meta .q-no { width: 21px; height: 21px; border-radius: 6px; font-size: 11px; }
/*
 * .tag 的基础规则带 margin: 2px 4px 2px 0（给「一行里塞一堆 tag」的老排版用的）。
 * 这里间距已经由容器的 gap 负责，再叠一层 4px 就是 8px —— 360 宽下那一行
 * 正好差 1px 放不下，于是每张卡都白多一行（实测 26px → 58px）。
 * 所以卡片里的 tag 一律 margin: 0。
 */
.wrong-meta .tag.gray { height: 19px; padding: 0 6px; font-size: 10.5px; margin: 0; }
.wrong-meta .q-del {
  margin-left: auto;
  width: 24px; height: 24px;
  font-size: 15px;
  border-radius: 7px;
}
.wrong-kp {
  /*
   * 知识点这一行同理，但坏法和上面不一样：
   *
   * 原来是 nowrap + overflow: hidden + 省略号 —— 挤不下就把字**吃掉**
   * （「多音字辨析」会变成「多音字辨…」）。那一版能接受，是因为这一行
   * 在卡片最底下、被截断也只是一颗 tag 少几个字；但现在同一张卡上
   * 上面那行改成换行了，这一行再靠省略号就显得两张卡不是一套规矩。
   *
   * 所以也换成「装不下就换行」，一颗都不截断：chip 上写的是知识点名，
   * 截一半等于没写。最多三颗（两个知识点 + 一个 +N），换行后高度 +23px 封顶。
   */
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 0 7px 7px;
  min-width: 0;
}
.wrong-kp .tag {
  height: 19px; padding: 0 6px; font-size: 10.5px;
  flex: none; min-width: 0;
  max-width: 100%; white-space: nowrap;
  margin: 0;
}

/*
 * 底部浮窗：录入 / 打印 / 复习。
 *
 * 为什么在底部而不是顶部那排筛选里：见 index.html 里那段说明 ——
 * 「筛什么」在头上，「接下来干什么」在拇指边。
 */
.wrong-fab {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 32, 58, .14);
}
.fab-btn {
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 42px;
  border: none; border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:active { background: #f2f5fa; }
.fab-btn .ic { flex: none; }
/* 「打印」是主流程：唯一一颗有底色的 */
.fab-btn.primary { background: var(--primary); color: #fff; }
.fab-btn.primary:active { background: var(--primary-dark); }
/* 「复习」按下去之后是一个**筛选态**，所以它要有按下的样子 */
.fab-btn.on { background: var(--primary-soft); color: var(--primary-dark); }
/* 勾选中时操作条浮出来，浮窗让位（两条叠在一起必然盖住其中一条） */
body.pick-zero .wrong-fab { display: none; }

/* 打印模式（点浮窗上的「打印」）的提示条 */
.wrong-pick-hint {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid #cfdeff;
  color: var(--primary-dark);
  font-size: 12.5px; font-weight: 600;
  line-height: 1.45;
}
.wrong-pick-hint .grow { flex: 1 1 auto; }
.wrong-pick-hint button {
  flex: none;
  height: 28px; padding: 0 10px;
  border: none; border-radius: 8px;
  background: #fff; color: var(--primary-dark);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
/* 打印模式下把每格的勾选框画得显眼一点：这时候它就是主操作 */
body.wrong-pick-on .q-check::before { border-color: var(--primary); }
body.wrong-pick-on .q-check { background: rgba(255, 255, 255, .8); }

/*
 * 网格里的勾选框挪到**左上角**。
 *
 * 原来（文字卡片那一版）它在右上角。图片化之后右上角和「删除 ✕」之间只隔着一张图，
 * 而且 ✕ 现在就在右下角 —— 一上一下正好在同一条竖线上，手指从勾选往下滑一格就会
 * 碰到不可逆的动作。挪到左上角，两者隔着整张图对角，怎么滑都滑不过去。
 *
 * 另外它压在图片上，所以底色给一层半透明白：深色作业照上那颗空心圆否则几乎看不见。
 */
#wrongList .q-check {
  left: 3px; top: 3px;
  right: auto;
}

/* ================================================================== */
/* 错题详情改版：顶部大图 + 三行折叠                                     */
/* ================================================================== */

.wd-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 0 7px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-3);
}
.wd-text-toggle {
  height: 26px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--primary-dark);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.wd-text-toggle:active { background: var(--primary-soft); }

/*
 * 顶部大图。
 *
 * 高度上限 46vh + object-fit: contain：一道选择题的切图可能是竖长的，
 * 让它按原比例铺满宽度就会把三行折叠挤出屏幕 —— 而「一进来三行都看得见」
 * 正是这次改版的目的。所以宁可图小一点、点开放大（openImageViewer）。
 */
/*
 * ★ `grid-template-columns: minmax(0, 1fr)` 不是随手加的（和 .paper-cols 同一课）。
 *
 * 这里原来只有 `display: grid; place-items: center`，也就是一个隐式的 `auto` 轨道。
 * `auto` 轨道的最大是 max-content —— 于是格子里的**题干文字**（可能含一条很长的
 * KaTeX 公式）会把这个格子撑到「内容的自然宽度」：实测 430 宽的弹层里，
 * 这一格被撑成 553px，公式的右半截直接挂在屏幕外（弹层是 position: fixed，
 * 不制造页面级溢出，所以连「页面被撑宽」这种警报都不会响）。
 * 把最小值钉成 0，格子就永远跟着弹层走，公式那边再靠 overflow-x / 缩放收住。
 */
.wd-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  background: #f6f8fc; border-radius: 10px; overflow: hidden;
}
.wd-figure-btn {
  display: block; width: 100%; padding: 0; border: none; background: transparent; cursor: zoom-in;
}
.wd-figure img {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: contain;
  object-position: center;
}
.wd-figure-text { padding: 12px; width: 100%; }
.wd-figure-text .q-stem { margin: 0; }
/*
 * 切图下面那段题干文字。
 *
 * 为什么单独一条：.wd-figure 是 grid + place-items:center（图居中），
 * 文字块不写 width:100% 的话会缩成一行宽、居中，两边露出底色 ——
 * 看起来像图下面粘了一张不相干的小纸条。写成整条白底 + 上边线，
 * 「图在上、文字在下」才是一个整体。
 */
.wd-figure-stem {
  width: 100%; padding: 10px 12px 11px;
  background: #fff; border-top: 1px solid var(--line);
  text-align: left;
}
.wd-figure-stem .q-stem { margin: 0; font-size: 13.6px; }

/* 「查看文字」那一块：默认收起（.hidden），点开就在图下面铺出来 */
.wd-text { margin-top: 10px; }
.wd-text .q-stem { font-size: 13.6px; }

/*
 * 三行折叠。
 *
 * ## 为什么用原生 <details>
 *
 * 键盘 Tab 走得到、读屏软件念得出「折叠/展开」、回车能开 —— 这三件事自己写
 * 都要补一堆 aria 和键盘处理，而它们正是最容易漏、漏了也没人报的那类。
 *
 * ## 为什么行高做到 52px
 *
 * 这三行是这一页**唯一的目录**。做成 36px 的细条，用户一进来看到的是
 * 三根线，仍然不知道能干什么；52px 里放得下图标 + 两个字的主标题 + 箭头，
 * 扫一眼就知道有三件事可做。
 */
.wd-fold {
  margin-top: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.wd-fold > summary {
  display: flex; align-items: center; gap: 9px;
  min-height: 52px;
  padding: 0 13px;
  cursor: pointer;
  list-style: none;
  font-size: 14px; font-weight: 700; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.wd-fold > summary::-webkit-details-marker { display: none; }
.wd-fold > summary:hover { background: #fafbfe; }
.wd-fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.wd-fold-t { flex: 1 1 auto; }
.wd-fold-ar { flex: none; color: var(--ink-3); transition: transform .18s; }
.wd-fold[open] > summary { border-bottom: 1px solid var(--line); background: #fafbfe; }
.wd-fold[open] .wd-fold-ar { transform: rotate(90deg); }
.wd-fold-body { padding: 12px; }
.wd-fold-body > *:first-child { margin-top: 0; }
/* 第一个折叠行里那张「原始截图」不需要再往上顶 16px（它上面就是解析/方法技巧） */
.wd-fold-body .q-origin { margin-top: 12px; }

/*
 * 「查看答案解析」里的**第一块**：爱学的解析（卷面自带那份）。
 *
 * 为什么它要排在最前面：这一行的名字就叫「查看答案解析」。上一版把它挪进了
 * 「查看文字」里的小折条，于是点开这一行第一眼看到的是知识点总结 ——
 * 名字对不上内容，用户回来说「解析不见了」。现在它回到第一位。
 *
 * 为什么它自己**不是**一个框：这一块已经在三层圆角容器里面（弹层 → 折叠行 →
 * 行内边距），再画一个白底圆角的卡片就是用户抱怨的那种「嵌套框」。
 * 所以这里只用一条细竖线表示「这段是解析」，不上底色、不上边框、不上圆角。
 */
.wd-sol { padding-left: 11px; border-left: 2px solid var(--primary); }
.wd-sol-t {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 5px;
  font-size: 12.8px; font-weight: 700; color: var(--primary-dark);
}
.wd-sol-t .ic { flex: none; }
.wd-sol-body { font-size: 13.8px; line-height: 1.8; color: var(--ink); }

/*
 * 「知识点总结 + 解题方法与技巧」在**错题详情里**换个朴素画法。
 *
 * 全局的 .deep-block 是一张白底圆角卡（题库、批改结果页、答疑页都用它）——
 * 那些页面里它周围是空的，卡片是对的。但错题详情里它已经坐在三层圆角容器
 * （弹层 → 折叠行 → 行内边距）中间，再叠一张卡就是用户说的「嵌套框」。
 *
 * 所以这里只改**这一处**（挂在 .wd-deep-plain 下，别的页面一点不受影响）：
 * 去掉底色、边框、圆角，只留左侧一条竖线 —— 分组还在，但不再像一个盒子。
 * 颜色保留（知识点=靛蓝、方法=暖橙）：那是「哪块讲知识、哪块讲下手」的区分，
 * 不是装饰，去掉就没法一眼分清两块了。
 *
 * ⚠️ 选择器必须带上 .knowledge / .method 两个类：全局那条
 * .deep-block.knowledge 也是「两个类」的分量，而它写在**本文件更后面**，
 * 同分量同属性时后写的赢 —— 只写 .wd-deep-plain .deep-block 的话，
 * background 和 border-left-color 会被全局那条盖回去，看着像没改。
 */
.wd-deep-plain .deep-block.knowledge,
.wd-deep-plain .deep-block.method {
  margin: 0 0 12px;
  padding: 0 0 0 11px;
  border: none;
  border-left: 2px solid var(--line);
  border-radius: 0;
  background: none;
}
.wd-deep-plain .deep-block.knowledge { border-left-color: #7c8cf8; }
.wd-deep-plain .deep-block.method { border-left-color: #e8a33d; }


/* 详情里的 ⋯ 面板：竖排，和列表页那一层同一个观感 */
.wd-more-panel {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 10px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
.wd-edit-box {
  margin-top: 10px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff;
}

/*
 * ★ 贴着「⋯」弹出的小菜单（批改结果详情 / 错题本详情共用）。
 *
 * position:fixed + JS 算 left/top（components.js 的 bindAnchoredMenu）：
 * 面板挂在 .modal 里，而 .modal 是滚动容器，absolute 会被它裁掉一半。
 * 宽度写死是为了「量高度之前宽度已经定了」—— 否则先按内容量一次、
 * 落位之后再变一次，看起来会跳。0.12s 的淡入 + 轻微缩放只给一个
 * 「弹出来了」的反馈，不做夸张动画。
 */
.pop-menu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 232px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  margin: 0;
  box-shadow: 0 12px 30px rgba(16, 32, 58, 0.18);
  transform-origin: top right;
  animation: pop-menu-in 0.12s ease-out;
}
@keyframes pop-menu-in {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pop-menu { animation: none; }
}

/*
 * ★「移出错题本」—— 故意留在页面里，**不进** ⋯ 菜单。
 *
 * 菜单里只放三条「修数据」的动作（重读 / 手动编辑 / 改学科），错了还能再改；
 * 移出是**不可撤销**的（要重新上传整页作业才能收回来），和那些排在一列里，
 * 手指滑一下就落到它上面。所以它保持自己单独一块：一行说明 + 一颗红框按钮，
 * 观感和它原来在面板里时一模一样，只是不再跟着菜单开合。
 */
.wd-remove-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/*
 * 详情底部浮窗。
 *
 * 用 sticky 而不是 fixed：`.modal` 自己就是一个滚动容器，fixed 会相对**视口**
 * 定位、跑出弹层之外（弹层只有 88vh 高，底部还留着遮罩）。
 * sticky 的参照物正好是那个滚动容器 —— 滑到哪它都在弹层底部压着。
 *
 * 给内容留底部空间的那 8px 由它自己的 padding 撑开（见 .wd-fold:last-of-type
 * 下面的 margin-bottom）—— 不留的话最后一个折叠行会被它盖住一截。
 */
.wd-detail-fab {
  position: sticky;
  bottom: -12px;
  display: flex; gap: 8px;
  margin: 14px -12px -12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.wd-detail-fab .btn { height: 40px; }



/* ================================================================== */
/* AI 对话（错题详情里的追问 / 勾选模式的多题总结）                      */
/* ================================================================== */

/*
 * 「让 AI 总结」这颗按钮的颜色。
 *
 * 用紫色而不是项目主色蓝：同一行里已经有一颗蓝的「生成练习卷」，
 * 再来一颗蓝的，两件事看起来就是同一件事（而一个是出卷子、一个是花钱问 AI）。
 * 也不用红/橙 —— 那两个在这套配色里表示「危险」「提醒」。
 */
.btn.ai {
  background: #f3efff; color: #5a37c9; border: 1px solid #ddd2ff; font-weight: 600;
}
.btn.ai:hover { background: #eae2ff; }
.btn.ai:disabled { opacity: .5; }
/* 按钮里的「· 1 次额度」：小一号、压低对比度，但不隐藏 —— 这句话必须在点之前看得见 */
.btn .ps-cost { font-weight: 400; font-size: 11.5px; opacity: .72; margin-left: 2px; }

/*
 * 多出来的那一行要给内容留出空间。
 * 数值 = 原来 148px + 一行（约 40px）+ 一点余量；不留的话最后一张卡片会被压住，
 * 用户以为列表就这么多。
 */
body.picking.pick-chat main { padding-bottom: 196px; }

/* ---- 面板本体 ---- */
.chat-panel {
  margin-top: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
  padding: 12px;
}
/*
 * bare：嵌在一个已经有标题的容器里时，只留控件本身（错题详情第 2 行）。
 *
 * 那一行展开后外面就是「追问这道题」，面板再画一层边框、再写一遍标题，
 * 同一件事要说三遍，还把输入框整体往下推。里面那层浅蓝说明框也删了 ——
 * 三个快捷提问已经说明能问什么。
 *
 * 这是**加在面板上的修饰类**，不是把默认样式改素：
 * 多题总结和学情追问用的还是上面那一份卡片。
 */
.chat-panel.bare {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.chat-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.chat-title {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 14px; color: var(--ink);
}
.chat-sub { font-size: 12px; color: var(--ink-3); }
.chat-intro {
  font-size: 12.5px; color: var(--ink-2);
  background: var(--primary-soft); border-radius: var(--radius-sm);
  padding: 7px 10px; margin-bottom: 8px;
}

/*
 * 历史区自己滚，**不跟着整页滚**。
 * 嵌在错题详情弹层里时，整页滚会把用户正在读的解析顶走；
 * 而聊天必须"停在最新一句"上，这两件事只能靠一个独立滚动区同时满足。
 * 高度用 vh：手机上大约占三分之一屏，桌面弹层里也不至于把面板撑成两屏。
 */
.chat-log {
  max-height: 42vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 2px;
}
.chat-log:empty { display: none; }

.chat-msg { display: flex; flex-direction: column; max-width: 92%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.assistant { align-self: flex-start; }
.chat-who { font-size: 11px; color: var(--ink-3); margin-bottom: 2px; }
.chat-msg .chat-text {
  border-radius: 12px; padding: 8px 11px; font-size: 13.6px; line-height: 1.68;
  word-break: break-word; overflow-wrap: anywhere;
}
.chat-msg.user .chat-text { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant .chat-text {
  background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px;
}
/* 公式块在气泡里不要顶出去（display:block 的 $$…$$ 会撑满宽度） */
.chat-msg .chat-text .math-formula-block { overflow-x: auto; overflow-y: hidden; }

/* 流式期间的光标：让「还在写」这件事看得见，而不是一个字一个字地猜 */
.chat-caret {
  display: inline-block; width: 7px; height: 14px; margin-left: 2px;
  background: var(--ink-3); vertical-align: -2px; border-radius: 1px;
  animation: chat-blink 1s steps(2, start) infinite;
}
@keyframes chat-blink { to { opacity: 0; } }
.chat-msg.empty .chat-text { color: var(--ink-3); }

.chat-err {
  display: flex; align-items: flex-start; gap: 5px;
  margin-top: 4px; font-size: 12px; color: var(--danger);
  background: var(--danger-soft); border-radius: 8px; padding: 6px 9px;
}

/* 引导性提问：一排小胶囊，点一下就等于发了那句话 */
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 8px; }
.chat-chip {
  font: inherit; font-size: 12.5px; line-height: 1.4;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--primary-dark);
  border: 1px solid #cddcff;
}
.chat-chip:hover { background: var(--primary-soft); }
.chat-chip:disabled { opacity: .5; cursor: default; }

.chat-send-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input {
  flex: 1; min-width: 0; resize: none;
  font: inherit; font-size: 13.6px; line-height: 1.5;
  padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
.chat-input:focus { outline: none; border-color: #b9cdff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.chat-send { flex: none; height: 38px; padding: 0 16px; }
/* 钱这件事写在输入框下面，一直在、不弹窗 */
.chat-cost { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }

/* ---- 整屏那一层（多题总结） ---- */
/*
 * z-index 必须**高于底部操作条**（.pick-bar 是 60）。
 *
 * 踩过：这一层原来跟着 .modal-mask 用 50，而「让 AI 总结」正是从勾选模式点的 ——
 * 那一瞬间底部操作条还在屏幕上，于是它压在对话面板的输入框和「发送」上：
 * 用户在勾选模式下打开总结面板，**发送键那一块是被操作条盖住的**，点不动。
 * 截图里一眼就能看出来（操作条浮在面板下半截）。
 *
 * 但也不能高到压过 toast（99）和图片放大层（1500）—— 那两件是「临时提示」和
 * 「盖住一切看图」，本来就该在最上面。
 */
.modal-mask.chat-mask { z-index: 70; }
.chat-mask { align-items: flex-end; }
.chat-sheet {
  width: 100%; max-width: 720px; margin: 0 auto;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 28px rgba(16, 32, 58, .16);
  display: flex; flex-direction: column;
  max-height: 88vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.chat-sheet-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.chat-sheet-title { font-weight: 700; font-size: 15px; flex: 1; }
/*
 * 关闭键的外观照抄弹层那颗（.modal-head .x）。
 * 为什么不直接复用 .modal-head 这个类：那个类带 margin-bottom:14px，
 * 而这一层是「头 + 可滚动正文」的两段结构，多出来的外边距会把分隔线顶歪。
 */
.chat-sheet-head .x {
  border: none; background: #eef1f6; width: 30px; height: 30px; border-radius: 999px;
  cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; flex: none;
}
.chat-sheet-body { padding: 0 14px 14px; overflow-y: auto; }
/* 面板在整屏层里时贴边，不再套一层边框 —— 一层套一层看着像两个框 */
.chat-sheet-body .chat-panel { border: 0; background: transparent; padding: 8px 0 0; }
.chat-sheet-body .chat-log { max-height: 52vh; }


/* ================================================================== */
/* 「问一问」独立大面板（错题详情里那颗「去提问」打开的）              */
/* ================================================================== */

/*
 * 为什么是 82vh：目标是豆包那个形态 —— 打开就占掉大半屏，消息流能放下
 * 好几轮对话，而不是在详情里那个 42vh 的小窗口里来回滚。
 * 上限压到 85% 以内是留一点背景可见：用户要能看出「这是盖在题目上面的一层」，
 * 关掉就回到那道题，而不是以为跳到了另一个页面。
 *
 * 用 vh 而不是 100%：这一层的父节点是 .modal-mask（position: fixed），
 * 百分比高度在它身上没有确定值可依，算出来是 auto —— 面板会缩成内容高度，
 * 又变回那个小窗口。
 */
.ask-mask { z-index: 72; align-items: flex-end; }
.ask-sheet {
  width: 100%; max-width: 720px; margin: 0 auto;
  height: 82vh;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 28px rgba(16, 32, 58, .18);
  display: flex; flex-direction: column;
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: rise .25s ease;
}
/*
 * 关闭键的外观照抄整屏那层（.chat-sheet-head .x）。
 * 不复用 .modal-head 这个类：它带 margin-bottom:14px，会把分隔线顶歪。
 */
.ask-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.ask-title { font-weight: 700; font-size: 15.5px; flex: 1; }
.ask-sub { font-size: 12px; color: var(--ink-3); }
.ask-head .x {
  border: none; background: #eef1f6; width: 30px; height: 30px; border-radius: 999px;
  cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; flex: none;
}
/*
 * 面板本身的滚动**在这里被卡死**：外壳不滚，只有 .chat-log 滚。
 * 不这么写的话，flex 子项默认 min-height:auto —— 历史一长就把整层撑到比屏幕还高，
 * 输入框跟着被推到屏幕外，用户正要打字时找不到它。
 */
.ask-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 0 14px 12px;
  overflow: hidden;
}
/* 这一条必须写在 .chat-panel.bare 之后：两者特异性相同，靠先后定胜负 */
.ask-sheet .chat-panel {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 8px 0 0;
}
/*
 * 消息流吃掉除「快捷提问 / 输入行 / 额度提示」之外的全部高度。
 * max-height:none 是为了盖掉 .chat-log 的 42vh —— 那是给详情里那块小地方定的，
 * 放在这一层就等于中间空一大截、底下挤成一团。
 */
.ask-sheet .chat-log { flex: 1 1 auto; min-height: 0; max-height: none; }
/*
 * 空历史时也要把这块高度占住。
 * .chat-log:empty 在默认那一套里是 display:none（详情里空着就别占位），
 * 但在这里它一隐身，输入框就跳到面板顶上去了 —— 用户打开面板先看到的是
 * 一个贴着标题的输入框，而不是「这块是对话区」。
 */
.ask-sheet .chat-log:empty { display: flex; }
/* 这三块钉在面板底部，不跟着消息流走 */
.ask-sheet .chat-quick,
.ask-sheet .chat-send-row,
.ask-sheet .chat-cost { flex: none; }


/* 题库缩略图文件丢失时的占位 */
.lib-thumb.thumb-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  background: #f1f4f9;
  color: var(--ink-3);
}
.lib-thumb.thumb-missing .tm-ico { font-size: 22px; opacity: .6; }
.lib-thumb.thumb-missing .tm-txt { font-size: 11px; }

/* 一行小标签（替代大段说明文字） */
.hint-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 8px 0 0;
}
.hint-row .muted { font-size: 12px; }

/* 正确率用颜色说话 */
.acc { font-weight: 700; }
.acc.good { color: var(--success); }
.acc.mid { color: var(--warn); }
.acc.bad { color: var(--danger); }

/* 「模拟」徽章：v130 起在右上角浮层里（颜色见文件末尾那一段） */
.badge-mock {
  flex: none;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 3px 8px; border-radius: 20px;
  background: #fff5e3; color: #8a5200;
  border: 1px solid #ffd79a;
}
.gear-btn { width: 34px; height: 34px; font-size: 17px; border-radius: 50%; }

/* 图上题框热区：点一下弹答案与解析 */
.q-hit {
  position: absolute;
  margin: 0; padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
}
.q-hit.right:hover, .q-hit.right:active { border-color: rgba(18,161,80,.55); background: rgba(18,161,80,.07); }
.q-hit.wrong:hover, .q-hit.wrong:active { border-color: rgba(229,72,77,.55); background: rgba(229,72,77,.07); }

/* 图片下方一行统计 */
.mark-stats {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.mark-stats b { font-size: 17px; color: var(--ink); margin-right: 2px; }
.mark-stats .good b { color: var(--success); }
.mark-stats .bad b { color: var(--danger); }


/* ================================================================== */
/* 逐步揭示的讲解                                                       */
/* ================================================================== */
.step-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.step-count {
  flex: none;
  font-size: 12px; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft); padding: 3px 9px; border-radius: 20px;
}
.step-progress {
  flex: 1; height: 5px; border-radius: 3px; background: #e9eef7; overflow: hidden;
}
.step-progress i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #7aa2ff, #2f6bff);
  transition: width .25s ease;
}

.step-block {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #f7f9fd;
  border: 1px solid transparent;
  animation: fade .2s ease;
}
.step-block.now {
  background: #fff;
  border-color: #c7d7ff;
  box-shadow: 0 2px 10px rgba(47, 107, 255, .1);
}
.step-block h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--primary-dark);
}
.step-block > div { font-size: 13.8px; line-height: 1.75; }
.step-ask {
  margin-top: 8px; padding: 7px 10px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: #8a5a00;
  font-size: 13px;
}
.step-actions { margin-top: 14px; }
.step-done {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--success-soft);
  color: #0b6b36;
  font-size: 13.5px;
}

/* ================================================================== */
/* 知识点总结 + 解题方法与技巧（讲解的第二段）                          */
/* ================================================================== */
/*
 * 为什么**不做成** .step-block 的样子、也不并进上面那条进度条：
 *
 * 上面那些块是「跟着这道题往下走」的讲解（错因、思路、一步一步），是**过程**；
 * 这一块是**另一次调用**生成的方法定稿 + 知识点总结，而且晚一步才补进来。
 * 长得一样的话，用户会以为它只是讲解的最后两步，点「跳到最后」时一眼扫过就滑走了。
 *
 * 标题写「解题方法与技巧」而不是「这类题的通用解法」：模型在这条链路上只看得到
 * 一道题，归纳不出一类题（理由见 src/prompts.js 里 EXPLAIN_DEEP_SYSTEM 上方注释），
 * 标题不能承诺它做不到的事。所以这两块之间用颜色区分（知识点=靛蓝，方法=暖橙）——
 * 这不是装饰，是让家长扫一眼就知道「哪一块讲知识、哪一块讲怎么下手」。
 * 颜色之外还有图标和标题，所以色觉障碍下也分得清（不能只靠颜色，这是这个项目的既有约定）。
 */
.deep-analysis { margin-top: 14px; }
.deep-block {
  margin: 0 0 10px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  background: #fff;
  font-size: 13.6px;
  line-height: 1.75;
}
.deep-block:last-child { margin-bottom: 0; }
.deep-block.knowledge { border-left-color: #7c8cf8; background: #fafbff; }
.deep-block.method { border-left-color: #e8a33d; background: #fffcf6; }
.deep-block h5 {
  margin: 0 0 7px;
  font-size: 12.8px;
  display: flex; align-items: center; gap: 5px;
}
.deep-block.knowledge h5 { color: #4a5bd6; }
.deep-block.method h5 { color: #a86a12; }
.deep-identify {
  display: flex; gap: 6px; align-items: flex-start;
  margin-bottom: 8px; padding: 7px 9px;
  border-radius: 8px;
  background: rgba(232, 163, 61, .1);
  color: #7a4d06;
  font-size: 13.2px;
}
.deep-identify .ico { flex: none; margin-top: 2px; }
.deep-steps { margin: 0; padding-left: 19px; }
.deep-steps li { margin-bottom: 4px; }
.deep-steps li:last-child { margin-bottom: 0; }

/*
 * ★ v167：知识点总结按【考什么】【这道题怎么用到它】【最容易错在哪】拆成
 * 「灰标签 + 正文」的段，观感对齐巩固页的七栏（.gy-lab / .gy-plain / .gy-need）。
 *
 * 老板的原话是「咱们这块的字体排版是不是不如巩固页面的」。
 * 差的不是字号（原来 13.6，巩固页正文 14~16），是**结构**：三段挤成一坨、
 * 没有小标题层级、段落之间没有间距、连字符列表没转成真列表。
 *
 * 所以这里只做两件事：给每段一个灰小标签，给正文一个统一的抄写档字号。
 *
 * ⚠️ 全部挂在 .deep-block.knowledge 下面：
 *   全局 .deep-block 还被题库 / 批改结果 / 答疑页共用，改一处全变。
 * ⚠️ 错题详情里 .wd-deep-plain 会把这块的底色和边框去掉（只留左竖线）——
 *   那时标签和正文靠的全是这里的**间距**分组，不能靠底色区分。所以拆段之间
 *   留 10px、标签和正文之间只留 3px：没有底色时也能一眼看出「这是一组」。
 */
.deep-block.knowledge .deep-kp { margin: 0; }
.deep-block.knowledge .deep-kp + .deep-kp { margin-top: 10px; }
.deep-block.knowledge .deep-lab {
  margin: 0 0 3px;
  font-size: 12px; font-weight: 500; line-height: 1.6;
  letter-spacing: .04em; color: var(--ink-3);
}
.deep-block.knowledge .deep-kp-b {
  font-size: 14.5px; line-height: 1.75; color: var(--ink);
  overflow-wrap: anywhere;
}
/* 连字符列表（模型写的「- xxx」）转成的真列表：圆点退灰，项间 4px */
.deep-block.knowledge .deep-kp-list {
  margin: 4px 0 0; padding-left: 18px;
  list-style: disc;
}
.deep-block.knowledge .deep-kp-list li {
  margin: 0 0 4px; padding-left: 2px;
  font-size: 14.5px; line-height: 1.75; color: var(--ink);
  overflow-wrap: anywhere;
}
.deep-block.knowledge .deep-kp-list li:last-child { margin-bottom: 0; }
.deep-block.knowledge .deep-kp-list li::marker { color: var(--ink-3); }

/*
 * 「解题方法与技巧」结构不动，只把字号对齐到同一档（13.6 → 14.5）。
 * 需要 !important：本文件末尾 v64 那一段给 .deep-block 钉了 14px !important。
 */
.deep-block.method { font-size: 14.5px !important; }

/*
 * 还在后台补的时候那一行小字。
 *
 * 不用转圈（.loading/.spinner）：转圈看起来像「这一块还没加载完」，
 * 用户会停在那里等它 —— 而上面的讲解其实此刻就能读。一行淡字既不拦人，
 * 也说明了「下面还会长出东西来」，不会让人以为讲解就这么多。
 */
.deep-loading {
  margin-top: 12px;
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3);
}


/* ================================================================== */
/* 原始作答截图（错题详解最下面那一块）                                  */
/* ================================================================== */

/*
 * 这块图的存在理由只有一个：让用户**验证自己当时是怎么写的**。
 * 所以它必须能被点开放大 —— 按弹层宽度显示时，手机上那道题的笔迹小到看不清，
 * 看不清就等于没有。
 *
 * 用 .lib-detail-img 那套观感（题库里题目详情就是这么展示题图的），
 * 不再另起一套边框/圆角：用户提到的参照就是「题库 → 题目」的展示方式。
 */
.q-origin { margin-top: 16px; }
.q-origin-cap {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3); margin-bottom: 6px;
}
/*
 * 图外面套一层 button（键盘可达），所以按钮自己的默认外观要清干净 ——
 * 不清的话会出现一条浏览器默认边框，图看起来像被框在一个灰盒子里。
 */
.q-origin-btn {
  display: block; width: 100%; padding: 0;
  border: none; background: none; font: inherit; text-align: left;
  cursor: zoom-in;
}
.q-origin-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 10px; }
.q-origin img {
  width: 100%; display: block;
  border-radius: 10px; border: 1px solid var(--line); background: #f6f8fc;
  cursor: zoom-in;
}
/*
 * 兜底：图不是切好的题图，而是**整页作业图**时（老数据、裁图失败，见 wrong.js 的注释）。
 *
 * 必须限高：整页图按宽度铺满会有三四屏那么高，用户想看的「知识点总结 / 方法技巧」
 * 反而被这张图挤到看不见了 —— 那正是这次要改掉的问题。限高 + contain
 * 至少让人一眼看出「这是一整页」，想看细节再点开放大。
 */
.q-origin.page img { max-height: 240px; object-fit: contain; object-position: top center; }
.q-origin-miss {
  border: 1.5px dashed var(--line); border-radius: 10px;
  padding: 18px 12px; text-align: center;
  color: var(--ink-3); font-size: 12.5px;
}

/*
 * 点图放大的那一层。
 *
 * 为什么不复用 openModal：它开的时候做的是 `root.innerHTML = ''` ——
 * 在错题详解上面再开一个会把下面那个弹层直接拆掉（用户会看到「点图放大，结果详解没了」）。
 * 所以放大层自己挂在 body 上，和 .pick-bar 一样不参与弹层栈。
 *
 * 交互用「点图切换」而不是手势缩放：捏合缩放要自己处理 touch 事件、双指距离、
 * 位移边界，写不对就是「放大了但拖不动」。点一下 = 原始尺寸 + 可滚动，
 * 在手机和桌面上都成立，也不需要额外的按钮。
 */
/*
 * z-index 1500：必须**压过 .pwa-bar（900）**。
 *
 * 踩过的坑：安装提示条是 sticky + z-index 900，第一次给这一层写 80 时，
 * 提示条正好盖在右上角 —— 关闭键被压在下面，截图上看到的是提示条自己那颗 ×。
 * 用户点「关闭」结果把安装提示关掉了，图还开着。
 * 1500 在 .pwa-bar(900) 与 .auth-gate(2000) 之间：全屏看图该盖住一切，
 * 但没登录时不该盖住登录门。
 */
.img-viewer {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(10, 15, 26, .94);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; overflow: auto;
}
.img-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.img-viewer.zoomed { align-items: flex-start; justify-content: flex-start; }
.img-viewer.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
/*
 * 关闭键必须是**深底白字**：它浮在图上面，而图里有大片浅色（作业纸），
 * 半透明白底的小圆在那种区域上几乎看不见 —— 实测第一版就是这样，
 * 截图上那颗 × 得盯着找。深色底在任何底色上都立得住。
 */
.img-viewer-x {
  position: fixed; top: 10px; right: 10px; z-index: 1501;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(12, 18, 30, .68); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.img-viewer-hint {
  position: fixed; left: 0; right: 0; bottom: 14px; z-index: 1501;
  text-align: center; color: rgba(255, 255, 255, .72); font-size: 12px;
  pointer-events: none;
}


/* ================================================================== */
/* 批改中：把上面的预览图缩成小缩略图                                   */
/* 目的：进度提示 + 「重新拍一张」按钮要和缩略图同屏可见，不用滚动        */
/* ================================================================== */
/* ------------------------------------------------------------------
   批改等待：大图 + 激光扫描，**不显示进度文字**
   ------------------------------------------------------------------
   参考豆包爱学的做法。改之前这里把照片缩成 96px 的缩略图，旁边配一串
   「正在用 TextIn 切边增强…」「任务已提交（task_id=…）」「已等待 12 秒」——
   那些都是**我们的实现细节**，用户既看不懂也不需要看。

   用户等待时真正需要的信息只有一条：「它在看我的卷子」。
   一张大图 + 一条来回扫的激光就够了。

   ⚠️ 第一版把这段挂在**上传卡片**的预览图上，靠 `body.grading` + `:has()` 改样式 ——
      实测「激光不见了」。链条太长：卡片可见性、overflow、CSS 特异性、
      `:has()` 支持度，任何一环出问题就静默失效。
      现在图和激光在同一个容器里（`.scan-stage`），自给自足，不依赖外部状态。
   ------------------------------------------------------------------ */
body.grading .card:has(#gradePreviewWrap) { display: none; }
body.grading #gradeSubmit { display: none; }
/* 原来还有一条 body.grading #gradeAdv —— 那个「补充说明 / 这是谁写的」折叠块
   连同批改页的空态一起删掉了：孩子挪去设置页，补充说明直接没了。 */

.grading-wait { display: block; }

/*
 * 大图舞台。
 *
 * ⚠️ 这里用 `scan-frame` 再套一层，是为了**让题框严格贴住图片**。
 * 第一版直接在 `.scan-stage` 上用 `object-fit: contain` ——
 * 图片被 max-height 限高之后会在容器里居中留边，而框是按容器算百分比的，
 * 结果就是**框整体偏移**，指哪儿哪儿不对。
 * 现在 `.scan-frame` 是 inline-block，尺寸**恰好等于图片**，
 * 框和激光都相对它定位，天然对齐。
 */
.scan-stage { display: flex; justify-content: center; }
.scan-frame {
  position: relative;
  display: inline-block;
  line-height: 0; /* 去掉 img 下面的基线缝隙，否则激光扫到底会露一条黑边 */
  border-radius: 12px;
  overflow: hidden;
  background: #0f1520;
}
.scan-frame img {
  display: block;
  max-width: 100%;
  max-height: 54vh;
  width: auto;
  height: auto;
}

/* 已识别出的题目框：淡蓝描边，出现时轻轻放大一下（参考豆包爱学） */
.scan-boxes { position: absolute; inset: 0; pointer-events: none; }
.scan-box {
  position: absolute;
  border: 2px solid rgba(130, 200, 255, 0.92);
  border-radius: 5px;
  box-shadow:
    0 0 10px rgba(130, 200, 255, 0.45),
    inset 0 0 14px rgba(130, 200, 255, 0.12);
  /* 入场动画。错开时间由 JS 按题数算好后写在 style 上（见 grade.js 里的 gap） */
  animation: box-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes box-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scan-box { animation: none; }
}

/* 框角上的 ✓/✗ —— 爱学批完一道就给一道（参考豆包爱学） */
.scan-mark {
  position: absolute;
  top: -9px;
  left: -9px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  font-style: normal; /* 用的是 <i>，得压掉斜体 */
  line-height: 1;
  color: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  animation: mark-in 0.22s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.scan-mark.ok { background: #21b573; }
.scan-mark.no { background: #e5484d; }
@keyframes mark-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scan-mark { animation: none; }
}

/* 激光：一条淡蓝色光带，自上而下反复扫 */
.scan-laser {
  position: absolute;
  left: -4%;
  right: -4%;
  top: -22%;
  height: 15%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(120, 200, 255, 0) 0%,
    rgba(120, 200, 255, 0.12) 42%,
    rgba(220, 245, 255, 0.95) 50%,
    rgba(120, 200, 255, 0.35) 54%,
    rgba(47, 107, 255, 0.1) 70%,
    rgba(47, 107, 255, 0) 100%
  );
  box-shadow: 0 0 14px 2px rgba(130, 200, 255, 0.45);
  animation: laser-sweep 2.1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: top, opacity;
}
@keyframes laser-sweep {
  0% {
    top: -22%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: 102%;
    opacity: 0;
  }
}
/* 系统开了「减少动态效果」就不扫，尊重无障碍设置 */
@media (prefers-reduced-motion: reduce) {
  .scan-laser {
    animation: none;
    display: none;
  }
}

/* 等待提示：只剩一行很轻的字，没有转圈、没有步骤列表、没有计时 */
.grading-hint {
  text-align: center;
  padding: 14px 0 2px;
  font-size: 14px;
  color: var(--ink-3, #8a94a6);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ================================================================== */
/* P2 变式追练                                                          */
/* ================================================================== */
/*
 * 详情页最下面那一块主入口的间距。
 *
 * ask-cta 和 variant-cta 共用同一条虚线分隔：批改详情的「追问」和拍照答疑的
 * 「做一道同类题」在版面上是同一个位置（解析之后、整页最末），只是动作换了。
 * 换一个动作就另造一套间距，两页的高度会差出一截，用户来回切会觉得页面在跳。
 */
.variant-cta, .ask-cta { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.variant-cta.flash { animation: ctaFlash 1.6s ease; }
@keyframes ctaFlash {
  0%, 100% { background: transparent; }
  20%, 60% { background: var(--warn-soft); }
}

.variant-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid #f0d9a8;
  background: #fffdf7;
}
.variant-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.variant-stem { font-size: 14px; line-height: 1.75; margin-bottom: 10px; }
.variant-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 10px;
  background: #fff;
}
.variant-input:focus { outline: none; border-color: var(--primary); }

/* ------------------------------------------------------------------
   「修一修」：批改结果页每道题内嵌的编辑区 / 加入错题本那一组动作

   为什么是**内嵌的 details** 而不是弹层：用户核对一道题时必须来回看
   题干、学生作答、图上那一块，弹层会把它们盖住。而这一组的用途是
   「一道一道过」，多两次开关弹层的点击乘以 N 道题就是纯粹的成本。
   ------------------------------------------------------------------ */
.q-actions { align-items: stretch; }
.q-actions .btn { flex: 1 1 128px; }
/* 「手动编辑」按下去之后要能看出它是开着的（不然用户以为点了没反应） */
.q-actions .act-edit.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.q-fix { margin-top: 10px; }
.q-fix > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: #8b95a7;
  list-style: none;
  padding: 6px 0;
}
.q-fix > summary::-webkit-details-marker { display: none; }
.q-fix > summary::before { content: '▸ '; }
.q-fix[open] > summary::before { content: '▾ '; }
.q-edit {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fbfcff;
}
.q-edit-label {
  display: block;
  font-size: 12px;
  color: #8b95a7;
  margin: 2px 0 4px;
}
.q-edit-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13.6px;
  font-family: inherit;
  line-height: 1.65;
  resize: vertical;
  margin-bottom: 9px;
  background: #fff;
}
.q-edit-input:focus { outline: none; border-color: var(--primary); }

/* 手机访问地址：要一眼看清，所以字号给大 */
.lan-url {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  letter-spacing: .3px;
  user-select: all;
  word-break: break-all;
}

/* ================================================================== */
/* 批改进度（真实阶段，不再是编的）                                      */
/* ================================================================== */
.grade-steps { margin-top: 12px; }
.grade-step {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 3px 0 3px 2px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.grade-step.done { color: var(--success); }
#gradeLoadingText b { font-size: 15px; }

/* 判定可疑的横幅：必须显眼（爱学判定会波动，这是已知问题） */
.suspect-card {
  border: 1.5px solid #f0c36d;
  background: #fffbf0;
  margin-top: 12px;
}
.suspect-card b { color: #8a5a00; }

/* ================================================================== */
/* 首页第二个入口：拍照答疑                                             */
/* ================================================================== */
.entry-qa { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.entry-qa:active { transform: scale(.985); }
/* v72：入口卡换成大色块卡之后图标是 30px（见文件后面 .entry-ico 那段） */
.entry-ico { font-size: 30px; line-height: 1; }
.entry-qa b { font-size: 15px; }

/* 答疑结果页 */
.qa-answer-card .q-stem { margin-bottom: 8px; }
.qa-options {
  margin: 8px 0;
  padding-left: 2px;
  font-size: 13.6px;
  line-height: 1.9;
  color: var(--ink-2);
}
.qa-answer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef4ff, #e3edff);
  border: 1.5px solid #c7d7ff;
}
.qa-answer-label {
  flex: none;
  font-size: 12px; font-weight: 700; color: #fff;
  background: var(--primary);
  padding: 3px 10px; border-radius: 20px;
}
.qa-answer-value {
  font-size: 20px; font-weight: 800; color: var(--primary-dark);
  word-break: break-word; line-height: 1.4;
}

/* 和批改结果并排对照 */
.compare-cell {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  background: #f7f9fd;
  border: 1px solid var(--line);
  text-align: center;
}
.compare-cell.ours { background: #eef4ff; border-color: #c7d7ff; }
.compare-val {
  font-size: 17px; font-weight: 800;
  margin: 5px 0;
  word-break: break-word;
  line-height: 1.4;
}
.compare-cell.ours .compare-val { color: var(--primary-dark); }

/* 题目详情里的「单独解这道题」 */
.qa-cta { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qa-cta.is-suspect { border-top-color: #f0c36d; }

/* ---------- 拍照答疑：框选要问的那一道题 ---------- */
/* 蒙层用「一层铺满 + clip-path 挖洞」，不用四条边框拼：
   拼出来的四条边在缩放时转角会露缝，题目文字正好压在那条缝上，
   看着像页面裂了。 */
#qaPreviewBox { position: relative; }

#qaCropBox {
  position: absolute; inset: 0;
  overflow: hidden; border-radius: var(--radius);
  /* 手指在图上时不要滚页面：手机上「想拖框结果页面滑走了」是最恼人的一种失败 */
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  cursor: move;
}
.qa-crop-box {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  cursor: move;
  /* touch-action 不继承，框上要再写一次 —— 只靠蒙层上那一条，
     手指落在框里时浏览器仍会把手势当成滚动 */
  touch-action: none;
}
/* 蒙层必须铺满整张图，再靠 inset 把框内镂空；
   它的定位跟着 .qa-crop-box（也就是跟着框），所以 inset 的基准就是框本身 */
.qa-crop-rect {
  position: absolute; left: -2px; top: -2px; right: -2px; bottom: -2px;
  background: rgba(12, 20, 36, .55);
  /* 镂空一律直角：inset 带圆角会在四个角留下小月牙，和框的圆角对不齐 */
  clip-path: inset(0px);
}
.qa-crop-h {
  position: absolute; width: 24px; height: 24px;
  /* 把角点朝画面外挪，让把手压在框线上，不然粗把手会把题干第一行盖住 */
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.qa-crop-h[data-dir='nw'] { left: 0; top: 0; cursor: nwse-resize; }
.qa-crop-h[data-dir='ne'] { left: 100%; top: 0; cursor: nesw-resize; }
.qa-crop-h[data-dir='sw'] { left: 0; top: 100%; cursor: nesw-resize; }
.qa-crop-h[data-dir='se'] { left: 100%; top: 100%; cursor: nwse-resize; }

/* 提示挂在框正下方，跟着框走。框贴着底边时它会露在图外一小截，
   但 .preview-wrap 是 overflow:hidden，不会撑坏布局。 */
.qa-crop-hint {
  position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  margin-top: 10px;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 11px; border-radius: 999px;
  background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 12px; white-space: nowrap;
  /* 提示压在图上会挡住题干、也会挡住拖框，所以它自己不吃指针事件 */
  pointer-events: none;
}
.qa-crop-reset {
  pointer-events: auto;
  border: none; border-radius: 999px;
  background: rgba(255, 255, 255, .22); color: #fff;
  font-size: 12px; padding: 3px 10px; cursor: pointer;
}
.qa-crop-reset:active { background: rgba(255, 255, 255, .38); }

/* 框住整张图时提示会被挤到图片外（父级 overflow:hidden），挪到图内底部。
   「拍的时候就框好了，不用再拖」这句话必须看得见 —— 看不见用户就会去拖。 */
.qa-crop-box.is-full .qa-crop-hint {
  top: auto; bottom: 8px;
  margin-top: 0;
}

/* ---------- 拍照答疑：取景屏（对标豆包爱学 / 安卓壳的相机页） ---------- */
/*
 * 这一屏要让人第一眼看出「这是相机」，不是「这是表单」。
 *
 * 所以卡片自己的内边距在这一页被吃掉（下面 #qaUploadCard）：留着那圈白，
 * 画面就还是「嵌在一块表单里的一张图」，永远不会有取景页的观感。
 * 深色底 + 只有参考线 + 浮在画面上的三件控件，是壳里那个取景页的同一套语言。
 */
#qaUploadCard { padding: 0; overflow: hidden; }
/* 预览那一支仍要有内边距，否则图片直接顶到卡片圆角上 */
#qaUploadCard > #qaPreviewWrap { padding: 12px; }

.qa-view { padding: 0; }

.qa-stage {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;                 /* 框外压暗靠一层巨大的 box-shadow，必须裁住 */
  background: #0b1220;
  /*
   * ★ 高度按「视口里还剩多少地方」算，**不用 aspect-ratio**。
   *
   * 老写法是 aspect-ratio + max-height，Chrome 在 max-height 生效时会按比例
   * 把宽度一起缩掉，取景区看着像缩在卡片中间的一小块。
   * 现在宽度永远铺满卡片、高度吃掉剩余视口；画面比例交给 object-fit: cover，
   * 多出来的部分由 qaGuideToSource 换算回原图坐标（框和像素仍然对得上）。
   */
  height: clamp(320px, calc(100dvh - 250px), 640px);
  /* 框是拖的，别让浏览器把这次按下当成滚动；整块画面本身不接点击 */
  touch-action: manipulation;
}
.qa-cam {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;                /* 铺满画面；裁掉的部分靠 qaGuideToSource 换算回去 */
  background: #0b1220;
}
.qa-cam.is-mirrored { transform: scaleX(-1); }

/*
 * 十字参考线：1px、不到一半的白，正中一道竖一道横。
 * 和壳里 ReferenceOverlayView 一样「画得很轻」—— 它是给眼睛对齐用的，
 * 不是装饰，压过纸上的字就没法用了。
 */
.qa-cross { position: absolute; inset: 0; pointer-events: none; }
.qa-cross i { position: absolute; background: rgba(255, 255, 255, .34); }
.qa-cross i:first-child { left: 50%; top: 0; bottom: 0; width: 1px; }
.qa-cross i:last-child { top: 50%; left: 0; right: 0; height: 1px; }

/*
 * 取景框：1.5px 细线 + 四个短直角 + 框外压暗。
 *
 * 老版本是 2.5px 白边 + 两个 46x18 的白药丸把手，用户的原话是「边框很笨」。
 * 现在线细了、把手没了，能拖的地方改成框的四条边（透明热区，见 .qa-guide-h）。
 *
 * 压暗仍然用「一圈巨大的外阴影」而不是四条黑边拼：拼接的边在缩放时转角会露缝，
 * 而这一屏每切一次模式框就要变一次大小（见 qa.js 的 applyQaModeUI）。
 * 阴影半径跟着 border-radius 走，所以四角是圆着暗下去的。
 */
.qa-guide {
  position: absolute;
  /* 默认值 = 单题的预设（78% 宽、56% 高、居中）；换模式 / 拖动后由 JS 写 left/top/width/height */
  left: 11%; top: 22%;
  width: 78%; height: 56%;
  border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(8, 14, 26, .5);
  pointer-events: auto;
  touch-action: none;
  cursor: move;
  /*
   * 切模式时框要**滑**到新尺寸，不能跳（跳一下会让人以为画面抖了）。
   * 拖动时必须关掉过渡，否则手指拖到哪儿框落后半拍 —— 见 .is-dragging。
   */
  transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease,
    border-color .2s ease;
}
.qa-guide.is-dragging { transition: none; border-color: rgba(154, 215, 255, .9); }

/* 四个角上的短直角：2.5px 白，臂长 18px，比细线亮一档（一眼看出框的四角） */
.qa-guide-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 0 solid rgba(255, 255, 255, .92);
  pointer-events: none;
}
.qa-guide-corner[data-corner="tl"] {
  left: -1.5px; top: -1.5px;
  border-left-width: 2.5px; border-top-width: 2.5px;
  border-top-left-radius: 5px;
}
.qa-guide-corner[data-corner="tr"] {
  right: -1.5px; top: -1.5px;
  border-right-width: 2.5px; border-top-width: 2.5px;
  border-top-right-radius: 5px;
}
.qa-guide-corner[data-corner="bl"] {
  left: -1.5px; bottom: -1.5px;
  border-left-width: 2.5px; border-bottom-width: 2.5px;
  border-bottom-left-radius: 5px;
}
.qa-guide-corner[data-corner="br"] {
  right: -1.5px; bottom: -1.5px;
  border-right-width: 2.5px; border-bottom-width: 2.5px;
  border-bottom-right-radius: 5px;
}

/*
 * 四条边的拖动热区：**完全透明**，24px 宽，跨在边线上（内外各 12px）。
 * 为什么不做可见把手：可见把手就是用户说的「笨」。
 * 为什么仍然要有 24px：手指按不到 1.5px 的线，热区必须比线宽得多，
 * 而且一半在框外才不会被框内的内容抢走这一次按下。
 */
.qa-guide-h {
  position: absolute;
  background: transparent;
  touch-action: none;
}
.qa-guide-h[data-edge="top"] { left: 0; right: 0; top: -12px; height: 24px; cursor: ns-resize; }
.qa-guide-h[data-edge="bottom"] { left: 0; right: 0; bottom: -12px; height: 24px; cursor: ns-resize; }
.qa-guide-h[data-edge="left"] { top: 0; bottom: 0; left: -12px; width: 24px; cursor: ew-resize; }
.qa-guide-h[data-edge="right"] { top: 0; bottom: 0; right: -12px; width: 24px; cursor: ew-resize; }

/* 框内左上角那行极小字：当前模式在做什么（只解框里这一道 / 整页拍…） */
.qa-guide-note {
  position: absolute; left: 12px; top: 6px;
  max-width: calc(100% - 20px);
  font-size: 10.5px; line-height: 1.5;
  color: rgba(255, 255, 255, .74);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity .18s ease;
}
/* 顶部有一句状态提示时，这行让开（两行小字叠在一起谁也看不清） */
.qa-stage.has-hint .qa-guide-note { opacity: 0; }

/* 顶部提示：一颗浅色胶囊（和壳里 bg_tip_pill 的 85% 白同一个观感） */
.qa-tip {
  position: absolute; left: 50%; top: 10px;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #1b1b1f;
  font-size: 12.5px; line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  pointer-events: none;
}
.qa-tip .qa-view-tip { font-size: 12.5px; font-weight: 700; }
.qa-tip .qa-tip-sep { opacity: .4; }
.qa-tip .qa-view-sub { font-size: 12.5px; color: #1b1b1f; opacity: .74; margin: 0; }

/*
 * 状态提示（正在打开相机 / 第 1 页已拍好…）。
 *
 * 挂在**顶部**、在降级面板之上：跨页题第 1 页拍完、相机又没起来的时候，
 * 「再拍第 2 页」这句话仍然得看得见（它以前被面板埋掉过）。
 */
.qa-stage-hint {
  position: absolute; left: 50%; top: 52px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: 80%;
  padding: 7px 13px;
  border-radius: 12px;
  text-align: center;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(255, 255, 255, .94);
  background: rgba(8, 14, 26, .66);
  pointer-events: none;
}

/* 降级面板：没有画面时这一屏就剩这句话 + 两颗按钮 */
.qa-fallback {
  position: absolute; inset: 0;
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 24px 22px 120px;
  text-align: center;
  color: #fff;
  background: rgba(9, 14, 24, .9);
}
.qa-fallback-ico { color: rgba(255, 255, 255, .55); margin-bottom: 2px; }
.qa-fallback-text { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.qa-fallback-why { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .58); min-height: 1px; }
.qa-fallback-btn {
  margin-top: 8px;
  border: 0; border-radius: 999px;
  padding: 10px 24px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  background: #fff; color: #14171d;
  cursor: pointer;
}
.qa-fallback-btn:active { transform: scale(.97); }
.qa-fallback-link {
  border: 0; background: none;
  padding: 5px 6px;
  font-family: inherit; font-size: 12px;
  color: rgba(255, 255, 255, .66);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- 取景屏底部：模式胶囊 + 相册 / 快门 / 手电 ---------- */
/*
 * 整条底部浮在画面上（豆包爱学 / 壳里都是这样），不占页面高度：
 * 取景这一屏唯一重要的是画面，控件只是盖在上面的一层。
 * 一层从下往上的黑色渐变垫底 —— 白纸压上来的时候，白图标才不会消失。
 */
.qa-dock {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 30px 16px 26px;
  /* 只有里面的控件接事件；画面上别的手势留给页面滚动 */
  pointer-events: none;
}
.qa-dock::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, .78) 0%,
    rgba(0, 0, 0, .46) 52%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}
.qa-dock > * { position: relative; }

/* 模式：半透明深色胶囊，选中项亮白（对比只看颜色，不靠尺寸跳） */
.qa-modes {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(8, 12, 20, .5);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.qa-mode {
  min-width: 66px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.qa-mode.is-on {
  background: #fff;
  color: #14171d;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* 一排三件：相册（左）· 快门（正中，绝对定位）· 手电（右，没有就不渲染） */
.qa-tools {
  position: relative;
  width: 100%;
  min-height: 76px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 6px;
  pointer-events: auto;
}
.qa-key {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0;
  color: #fff; font-family: inherit;
  cursor: pointer;
}
.qa-key-box {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .38);
  color: #fff;
}
.qa-key-box.qa-key-round {
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  border-color: rgba(255, 255, 255, .2);
}
.qa-torch.is-on .qa-key-box {
  background: rgba(255, 255, 255, .9);
  border-color: #fff;
  color: #14171d;
}
.qa-key em {
  font-style: normal; font-size: 10.5px; line-height: 1;
  color: rgba(255, 255, 255, .88);
}
.qa-key:active .qa-key-box { transform: scale(.94); }
/*
 * 手电没有文字标签（壳里那个也没有），所以它比相册矮一行。
 * 用 margin-bottom 把这一行补回来，两颗圆钮的圆心才会落在同一条水平线上。
 */
.qa-torch { margin-bottom: 16px; }

/*
 * 快门：76px 白环 + 58px 实心（和壳里那套 76dp / 58dp 一比一）。
 * 它用绝对定位钉在正中，**不参与**那一排的分配 ——
 * 右边的手电在不支持时整个不渲染，靠 flex 分配的话快门会被拽偏。
 */
.qa-shutter {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 76px; height: 76px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.qa-shutter-in {
  display: block;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #fff;
  transition: transform .12s ease;
}
.qa-shutter:active { transform: translateX(-50%) scale(.94); }
.qa-shutter:active .qa-shutter-in { transform: scale(.88); }
/* 正在开相机：环变淡，但**不禁用**（变灰的按钮看着像坏了） */
.qa-shutter.is-busy { opacity: .55; }
/* 快门下面那行小字：拍照 / 拍第 2 页 / 用系统相机 —— 状态全在这四个字里 */
.qa-shoot-cap {
  position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  margin-top: 7px;
  font-style: normal; font-size: 10.5px; line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, .86);
}

/* 快门那一瞬间：整块画面轻微一张（220ms），同时白闪一下（80ms） */
.qa-stage.is-firing { animation: qaPunch .22s ease; }
@keyframes qaPunch {
  0% { transform: scale(1); }
  30% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.qa-flash {
  position: absolute; inset: 0;
  z-index: 8;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.qa-flash.is-on { animation: qaFlash .08s linear; }
@keyframes qaFlash {
  from { opacity: .92; }
  to { opacity: 0; }
}

/* 预览下面那排「用整张 / 用框内」——不放两颗，一颗按钮切换就够，少一个要想的选择 */
.qa-preview-actions { display: flex; gap: 8px; margin-top: 10px; }
.qa-preview-actions .btn { flex: 1; }
.qa-span-done { padding: 8px 12px 12px; text-align: center; }
.qa-link {
  border: none; background: none; padding: 4px 6px;
  color: var(--primary-dark); font-size: 12.5px;
  text-decoration: underline; cursor: pointer;
}

/* 漏答小问的提示 */
.part-card {
  border: 1.5px solid #f0c36d;
  background: #fffbf0;
  margin-top: 12px;
}
.part-card b { color: #8a5a00; }
.part-warn { border-left: 3px solid #e5a020; }

/* 半对（做过的问都对，但有没做完的问） */
.mark-stats .mid b { color: #d97706; }

/* ---------- 登录门（多租户） ---------- */
.auth-gate {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(160deg, #2f6bff 0%, #1b3fa8 100%);
  overflow-y: auto;
}
.auth-gate.hidden { display: none; }

/* 未登录时把应用藏起来，免得看到半截界面 */
body.auth-locked .app { visibility: hidden; }

.auth-card {
  width: 100%; max-width: 360px;
  background: #fff; border-radius: 18px;
  padding: 26px 22px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.auth-logo { font-size: 34px; text-align: center; line-height: 1; }
.auth-card h2 {
  margin: 12px 0 6px; font-size: 17.5px; text-align: center; color: var(--ink);
}
.auth-sub {
  margin: 0 0 18px; font-size: 12.5px; line-height: 1.6;
  color: var(--ink-3); text-align: center;
}
.auth-sub b { color: var(--ink-2); }

.auth-field { display: block; margin-bottom: 12px; }
.auth-field > span {
  display: block; font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 5px; font-weight: 500;
}
.auth-field input {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 11px;
  background: #fbfcfe; color: var(--ink);
  outline: none; transition: border-color .15s, background .15s;
}
.auth-field input:focus { border-color: var(--brand); background: #fff; }
.auth-field em {
  display: block; font-style: normal; font-size: 11.5px;
  color: var(--ink-3); margin-top: 4px;
}

.auth-err {
  min-height: 17px; margin: 2px 0 8px;
  font-size: 12.5px; color: var(--danger);
}
.auth-alt {
  margin-top: 15px; text-align: center;
  font-size: 12.5px; color: var(--ink-3);
}
.auth-alt a { color: var(--brand); text-decoration: none; font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; }

/*
 * 「记住我」（默认勾上）。摆在登录按钮正上方一行，字号和字段标签一致 ——
 * 它是这一屏唯一的一个可选选项，多一行说明只会让人以为还有别的事要填。
 */
.auth-remember {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; user-select: none;
}
.auth-remember input {
  width: 15px; height: 15px; margin: 0; flex: none;
  accent-color: var(--brand);
}
.auth-remember span { line-height: 1.4; }

/*
 * 登录保持自检：一行 11px 的淡字 + 一个默认收起的折叠块。
 * 它是「出问题那天才用一次」的东西，所以不许抢任何视线：
 * 字号最小、颜色最淡、贴在卡片最底下、默认不展开。
 */
.auth-diag { margin-top: 14px; text-align: center; }
.auth-diag-toggle {
  background: none; border: 0; padding: 2px 4px; cursor: pointer;
  font-size: 11px; color: var(--ink-3); text-decoration: underline;
}
.auth-diag-body {
  margin-top: 8px; padding: 8px 10px; text-align: left;
  background: #f6f8fc; border-radius: 9px;
  font-size: 11.5px; line-height: 1.75; color: var(--ink-2);
}
.auth-diag-body.hidden { display: none; }
.auth-diag-row { display: flex; justify-content: space-between; gap: 10px; }
.auth-diag-row b { font-weight: 600; color: var(--ink); }

/* 设置页里的账号卡片 */
.account-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.account-row:last-child { border-bottom: 0; }
.account-row .who { flex: 1; min-width: 0; }
.account-row .who b { display: block; font-size: 14px; }
.account-row .who span { font-size: 12px; color: var(--ink-3); }

/* ---------- 「添加到主屏幕」引导条 ---------- */
.pwa-bar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #eef4ff;
  border-bottom: 1px solid #d3e0ff;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pwa-bar.hidden { display: none; }
.pwa-bar .ico { font-size: 20px; line-height: 1; flex: none; }
.pwa-bar .pwa-text { flex: 1; min-width: 0; line-height: 1.45; }
.pwa-bar .pwa-text b { display: block; font-size: 13px; color: var(--ink); }
.pwa-bar .pwa-text span { color: var(--ink-3); }
.pwa-bar .pwa-close {
  flex: none; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .06); color: var(--ink-3);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.pwa-bar .pwa-close:hover { background: rgba(0, 0, 0, .12); }

/*
 * v130：这里原来有一条「独立窗口（已添加到主屏幕）时，顶栏要让开状态栏 / 刘海」的补丁。
 * 顶栏删掉之后它没有对象了 —— 安全区现在由 .page 的 padding-top 和 .top-float 的 top
 * 各自处理（两处都写的是 max(8px/44px, env(safe-area-inset-top))）。
 */

/* ---------- 二维码 ---------- */
.qr-wrap {
  display: flex; justify-content: center;
  padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
}
.qr-img {
  width: 200px; height: 200px; max-width: 100%;
  /* 二维码靠的是像素级锐利，缩放时别做平滑，否则边缘发灰影响识别 */
  image-rendering: pixelated;
  display: block;
}

/* ---------- 用量面板 ---------- */
.usage-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px; color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
}
.usage-row:last-child { border-bottom: 0; }
.usage-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.usage-sep {
  margin: 12px 0 4px; font-size: 11.5px; font-weight: 600;
  color: var(--ink-3); letter-spacing: .3px;
}
#usageCard .field > span { color: var(--ink-3); }
#usageCard .field input { padding: 8px 10px; font-size: 14px; }

/* 证书快过期 / 已过期的提醒条（设置页） */
.warnbar {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7a5b00;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}
.warnbar.danger {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #b3261e;
}

/* ---------- 磁盘水位（设置页那一行 + 展开的命令） ---------- */
/*
 * 平时只有一行灰字；到 80% 变黄、90% 变红。
 *
 * 颜色是这一块最重要的信息（数字本身用户未必有感觉，颜色一眼就能看出来），
 * 所以不用 emoji、不用额外图标 —— 变色就够，多了反而像广告。
 */
.disk-row.warn b { color: #a86500; }
.disk-row.danger b { color: #c62828; }
.disk-row.danger span { color: #c62828; }

/* 命令块：等宽、可横向滚动（手机上一行命令本来就放不下，换行会把命令拆坏） */
.disk-cmds {
  margin: 8px 0 0;
  padding: 9px 10px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre;
  /* 命令要能一键选中去复制，别让长按弹出一堆没用的菜单 */
  -webkit-user-select: text;
  user-select: text;
}

/* ---------- 首页那条磁盘红条 ---------- */
/*
 * 为什么是「挤在内容上方的一条」而不是浮层：
 * 它不能挡住主要内容 —— 不弹模态、不盖按钮、不占满屏，只是把首页往下推一行。
 * 用户完全可以不理它继续点「作业批改」。
 */
.disk-bar {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 12px;
  padding: 10px 11px;
  background: #fdeced;
  border: 1.5px solid #f5b5b7;
  border-radius: 12px;
  color: #a11f24;
}
.disk-bar-ico { flex: none; margin-top: 1px; color: #d3393f; }
.disk-bar-main { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
.disk-bar-main b { font-weight: 800; }
.disk-bar-sub { font-size: 11.5px; color: #a94448; margin-top: 3px; }
.disk-bar-go {
  margin-top: 7px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #a11f24;
  background: #fff;
  border: 1.2px solid #f0a9ab;
  border-radius: 999px;
  cursor: pointer;
}
.disk-bar-x {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #b9535a;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.disk-bar-x:active { background: rgba(0, 0, 0, .06); }


/* 半成品结果：判分刚出来、题干还没补时的预览 */
.partial-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 12.5px;
  color: #4a5568;
}
.partial-note .dotpulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f6bff;
  animation: dotpulse 1.1s ease-in-out infinite;
  flex: none;
}
@keyframes dotpulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* ------------------------------------------------------------------
   骨架屏：内容还在路上时占位
   ------------------------------------------------------------------
   为什么不用「转圈」或「暂无」：转圈让人以为在空等，而「暂无」
   让人以为坏了。骨架屏 + 一句直白话（「正在读取题干…」）说的是
   「东西在路上」—— 这正是「先给答案、题干随后到」那套设计需要的语气。
   ------------------------------------------------------------------ */
.skel-line {
  margin: 7px 0;
  line-height: 0;
}
.skel-bar {
  display: inline-block;
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg, #eceff4 0%, #f6f8fb 40%, #eceff4 80%);
  background-size: 220% 100%;
  animation: skel-shimmer 1.5s linear infinite;
}
@keyframes skel-shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
.skel-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: #7b8794;
}
@media (prefers-reduced-motion: reduce) {
  .skel-bar { animation: none; }
}

/* 半成品卡片上的「几道题同时在读」进展条 */
.partial-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: #234a99;
  font-size: 12.5px;
  min-height: 0;
}
.partial-progress:empty { display: none; }
.partial-progress b { font-weight: 600; }

/* ==================================================================
   学情报告卡片（「学情」页顶部）
   ==================================================================
   这块的排版原则：**先给结论，再给证据**。
   家长打开学情页最想知道的是「我孩子到底什么问题」——
   所以一句话总览要最大最显眼，三条「反复踩的坑」默认展开第一条，
   证据/方法/避免用左标签右内容的行式排版，扫一眼就能读完。
   ================================================================== */
.rep { padding: 14px; }
.rep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.rep-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink, #1f2733);
}
.rep-tabs { display: flex; gap: 4px; }
.rep-tab {
  border: 0;
  background: #f2f5fa;
  color: #6b7688;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
}
.rep-tab.on { background: #2f6bff; color: #fff; }

/* ------------------------------------------------------------------
   学情页：一行两个胶囊 + 点开才铺全量（2026-10 收窄）
   ------------------------------------------------------------------
   为什么改：10 个「学科·学段」胶囊铺两行、占掉将近半屏，用户的原话是
   「选择器太占地方了，喧宾夺主」—— 学情页的主角应该是 AI，不是筛选器。

   所以现在折叠状态**只有两个豆子**（学科·学段 + 错题数 / 时间窗），
   全量列表藏在 .rep-sheet 里（hidden 时不占任何高度）。

   ⚠️「N 错」必须留在胶囊上：用户一眼想看到的就是这个数，
      上一版把它埋进「点开才看得到」的地方是不可接受的。
   ------------------------------------------------------------------ */
.rep-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.rep-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 62%;
  padding: 5px 9px 5px 11px;
  border: 1px solid #dbe3f0;
  background: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  color: #1f2733;
  cursor: pointer;
  font-family: inherit;
}
.rep-pick:hover { background: #f7faff; border-color: #b9cdff; }
.rep-pick-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-pick-n {
  flex: none;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: #e5484d;
  background: #ffefef;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}
.rep-pick-n em { font-style: normal; font-size: 10px; opacity: 0.85; margin-left: 1px; }
.rep-pick-car { display: inline-flex; color: #9aa5b5; transition: transform 0.18s; }
.rep-pick[aria-expanded='true'] { border-color: #2f6bff; background: #f2f6ff; color: #2f6bff; }
.rep-pick[aria-expanded='true'] .rep-pick-car { transform: rotate(180deg); color: #2f6bff; }

.rep-sheet {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  background: #fbfcff;
  padding: 8px 9px 9px;
  margin: 0 0 10px;
}
/* hidden 必须是 display:none —— 默认的 [hidden] 会被上面的 display 覆盖掉（这条踩过） */
.rep-sheet[hidden] { display: none; }
.rep-sheet-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #8a94a6;
  margin: 1px 0 6px;
}
.rep-sheet-h:not(:first-child) { margin-top: 8px; }
.rep-sheet .rep-groups { margin: 0 0 2px; }
.rep-sheet-empty { font-size: 12px; color: #9aa5b5; }

/* AI 一句话判断：只用本地统计拼出来，不为此多发一次模型请求 */
.rep-ai {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 3px;
  font-size: 12.6px;
  line-height: 1.6;
  color: #4a5666;
}
.rep-ai > span { flex: 1; min-width: 0; }
.rep-ai b { color: #e5484d; font-size: 14px; margin: 0 1px; }
.rep-ai .ic { flex: none; color: #2f6bff; margin-top: 2px; }

/* 对话入口（复用 .chat-panel，这里只调整它在这一块里的形状） */
.rep-chat { margin-top: 4px; }
/*
 * 学情页的顺序和弹层里相反：**输入框在上、回答往下长**。
 * 弹层里是「历史在上、输入框钉在底部」，而这里是页面顶部的一块，
 * 输入框沉到下面的话，用户要先滚过整段回答才能问第二句。
 * 用 flex order 改顺序，不动 chat.js 的 DOM —— 那个面板还有两个入口在用。
 */
.rep-chat .chat-panel {
  margin-top: 4px;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #fff;
  padding: 9px;
  display: flex;
  flex-direction: column;
}
/* 标题省掉：上面那行胶囊已经写清了范围，再来一个「继续追问」只是重复 */
.rep-chat .chat-head { display: none; }
.rep-chat .chat-send-row { order: 1; }
.rep-chat .chat-quick { order: 2; margin: 7px 0 0; }
.rep-chat .chat-log { order: 3; margin-top: 9px; max-height: 46vh; }
.rep-chat .chat-cost { order: 4; }
/* 「试试：」是提示语的引导词，不是按钮 —— 用伪元素，省一个 DOM 节点 */
.rep-chat .chat-quick::before {
  content: '试试：';
  flex: none;
  align-self: center;
  font-size: 11.5px;
  color: #9aa5b5;
}
.rep-chat .chat-chip { font-size: 12px; padding: 4px 9px; }

/* 「我按「化学 · 今天」来回答」——用户确认系统听懂了哪几个词，全靠这一行 */
.chat-scope {
  align-self: flex-start;
  font-size: 11.5px;
  color: #2f6bff;
  background: #f2f6ff;
  border-radius: 6px;
  padding: 2px 7px;
  margin-bottom: 4px;
}

/* 「直接生成一份完整报告」降级成一行文字链接（能力没删，只是不当主角了） */
.rep-alt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 9px 0 0;
}
.rep-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-family: inherit;
  font-size: 12.8px;
  color: #2f6bff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.rep-link:hover { text-decoration: underline; }
/* 抽样那句诚实说明：不显眼，但必须在（对话化之后用户会更常问） */
.rep-alt-tip { font-size: 11.5px; color: #9aa5b5; }

/* 一句话总览 —— 整块里最重要的东西 */
.rep-headline {
  font-size: 15px;
  line-height: 1.65;
  color: #1f2733;
  background: linear-gradient(180deg, #f3f7ff 0%, #eef4ff 100%);
  border-left: 3px solid #2f6bff;
  border-radius: 8px;
  padding: 11px 12px;
}

.rep-patterns { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rep-pat {
  border: 1px solid var(--line, #e6eaf2);
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
}
.rep-pat > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 13.5px;
}
.rep-pat > summary::-webkit-details-marker { display: none; }
.rep-pat-idx {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #eef4ff;
  color: #2f6bff;
  font-size: 11.5px;
  display: grid;
  place-items: center;
}
.rep-pat-name { flex: 1; }
.rep-pat-arrow { color: #9aa5b5; transition: transform 0.18s; }
.rep-pat[open] .rep-pat-arrow { transform: rotate(180deg); }
.rep-row {
  display: flex;
  gap: 9px;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.6;
}
.rep-k {
  flex: none;
  width: 2.4em;
  color: #7b8794;
  font-size: 12px;
  padding-top: 1px;
}
.rep-v { flex: 1; color: #333c4a; }

.rep-next {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #fff8e8;
  border: 1px solid #ffe2a8;
  font-size: 13px;
  line-height: 1.6;
  color: #6b4e00;
}
.rep-next b { display: block; font-size: 12px; opacity: 0.75; margin-bottom: 2px; }

.rep-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line, #e6eaf2);
  font-size: 12px;
}
.rep-regen {
  border: 0;
  background: transparent;
  color: #2f6bff;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

/* 空态 / 待生成 */
.rep-empty { text-align: center; padding: 8px 4px 4px; }
.rep-empty-main { font-size: 14.5px; font-weight: 600; color: #1f2733; }
.rep-empty-sub {
  font-size: 12.8px;
  color: #6b7688;
  line-height: 1.6;
  margin-top: 6px;
  max-width: 30em;
  margin-left: auto;
  margin-right: auto;
}
.rep-empty-stats { font-size: 12.5px; color: #8a94a6; margin-top: 8px; }
.rep-empty .rep-gen { margin-top: 12px; }
.rep-tip { font-size: 11.5px; color: #9aa5b5; margin-top: 7px; }

.rep-loading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 2px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------
   学情报告：学科 × 学段 的分组标签
   ------------------------------------------------------------------
   为什么要有这一排：同一个孩子可能既有高一数学、又有八年级数学、还有高一物理。
   不分组的报告只能给「交集结论」，最后写成「计算要仔细」这种废话。
   分组后每组只喂同一学科同一学段的错题，结论才具体。

   视觉上做得比时间窗标签**更重**（有边框、有几行字），
   因为它承担的是「你正在看哪一块」这个信息，不是次要筛选。
   ------------------------------------------------------------------ */
.rep-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.rep-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line, #e6eaf2);
  background: #fff;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: #4a5666;
  cursor: pointer;
  transition: all .15s;
}
.rep-group span {
  font-size: 11.5px;
  color: #98a2b3;
}
.rep-group i {
  font-style: normal;
  font-size: 11px;
  background: #f0f3f8;
  color: #7b8794;
  border-radius: 20px;
  padding: 1px 6px;
}
.rep-group.on {
  border-color: #2f6bff;
  background: #f2f6ff;
  color: #2f6bff;
  font-weight: 600;
}
.rep-group.on span { color: #6f92e0; }
.rep-group.on i { background: #dbe7ff; color: #2f6bff; }

/* 生成前告诉用户「这次只分析哪一块」——避免又变成一锅烩 */
.rep-scope {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #2f6bff;
  background: #f2f6ff;
  border-radius: 20px;
  padding: 4px 11px;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------------
   学情报告：失分结构 / 知识-习惯诊断 / 7天清单 / 验收目标
   ------------------------------------------------------------------
   这一版吸收了两份外部模板里真正有用的部分：

   · 失分结构（分类占比）—— 让「不会 vs 习惯不好」变成可看见的数字。
     颜色按 kind 区分：知识类偏红、习惯类偏黄，扫一眼就知道该往哪使劲。
   · 知识 / 习惯 两句话诊断 —— 家长最想知道的就是这个，而且两件事的
     应对方式完全不同（补知识 vs 改流程）。说错方向等于白使劲。
   · 7 天清单 —— 外部模板里「直接照做」这个点是对的，但它的填充内容
     全是废话（「回归课本：定义、定理、例题重新过一遍」）。我们保留结构，
     内容由模型针对具体错题生成，并禁掉了那类空话。
   · 验收目标 —— 把报告变成下次可对照的东西，否则家长无法判断有没有进步。
   ------------------------------------------------------------------ */
.rep-mix { margin: 12px 0 0; }
.rep-mix-title {
  font-size: 12px;
  color: #7b8794;
  margin-bottom: 7px;
  letter-spacing: .3px;
}
.rep-mix-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12.5px;
}
.rep-mix-label { flex: none; width: 5.6em; color: #4a5666; }
.rep-mix-bar {
  flex: 1;
  height: 7px;
  background: #eef1f6;
  border-radius: 5px;
  overflow: hidden;
}
.rep-mix-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  transition: width .4s ease;
}
/* 知识类 = 红（要补）、习惯类 = 黄（要改流程） */
.rep-mix-bar i.knowledge { background: linear-gradient(90deg, #ff8a8a, #e5484d); }
.rep-mix-bar i.habit { background: linear-gradient(90deg, #ffd166, #f0a020); }
.rep-mix-num {
  flex: none;
  width: 4.6em;
  text-align: right;
  color: #4a5666;
  font-variant-numeric: tabular-nums;
}
.rep-mix-num b { color: #98a2b3; font-weight: 400; font-size: 11.5px; margin-left: 4px; }
/* 换成丢分口径时数字更长（「12分30%」），给它宽一点，别把条形图挤扁 */
.rep-mix-num.wide { width: 6.2em; }
.rep-mix-num.wide b { color: #e5484d; font-size: 12.5px; margin-left: 0; margin-right: 3px; }
.rep-mix-note {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #6b4e00;
  background: #fff8e8;
  border: 1px solid #ffe2a8;
  border-radius: 8px;
  padding: 8px 10px;
}

/* 知识 / 习惯 两句话诊断 */
.rep-diag { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.rep-diag-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
  color: #333c4a;
}
.rep-diag-k {
  flex: none;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 1px;
}
.rep-diag-k.know { background: #ffebee; color: #c62828; }
.rep-diag-k.habit { background: #fff8e1; color: #a06a00; }

/* 接下来 7 天 */
.rep-plan {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f6f9ff;
  border: 1px solid #dbe7ff;
}
.rep-plan-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #2f6bff;
  margin-bottom: 7px;
}
.rep-plan ol { margin: 0; padding-left: 1.35em; }
.rep-plan li { font-size: 13px; line-height: 1.7; color: #333c4a; margin-bottom: 3px; }

/* 验收目标 */
.rep-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f2fbf6;
  border: 1px solid #b7e4cd;
  font-size: 13px;
  line-height: 1.6;
  color: #14663f;
}
.rep-check b { display: block; font-size: 12px; opacity: .75; margin-bottom: 2px; }

/* ==================================================================
   学情报告 · 看板版
   ==================================================================
   为什么重做排版：第一版是一屏半的长文，用户反馈
   「面对一堆文字没人有耐心读下去」。内容是对的，呈现方式不对 ——
   家长在手机上看，要的是**一眼看到结论和数字**，细节想深究再点开。

   所以这一版的层次是：
     结论（最大）→ 三个数字 → 失分条形图 → 知识/习惯两张卡
     → 反复踩的坑（全部折叠，只露标题）→ 7天清单 → 验收目标
   ================================================================== */

/* 一句话结论：整块里最显眼的 */
.rep-hero {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 13px 13px;
  border-radius: 11px;
  background: linear-gradient(135deg, #eef4ff 0%, #f6f9ff 100%);
  border-left: 4px solid #2f6bff;
}
.rep-hero-ico { flex: none; color: #2f6bff; margin-top: 1px; }
.rep-hero-txt {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #1f2733;
}

/* 三个数字卡片 */
.rep-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.rep-stat {
  text-align: center;
  padding: 11px 4px 9px;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px solid #edf1f7;
}
.rep-stat b {
  display: block;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  color: #1f2733;
  font-variant-numeric: tabular-nums;
}
.rep-stat span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: #7b8794;
  margin-top: 5px;
}
.rep-stat.habit { background: #fffaf0; border-color: #ffe6b8; }
.rep-stat.habit b { color: #d98800; }
.rep-stat.know { background: #fff5f5; border-color: #ffd9d9; }
.rep-stat.know b { color: #e5484d; }

/* 一句判断：该刷题还是该改流程 */
.rep-verdict {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 8px 11px;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #ffe2a8;
  color: #6b4e00;
}
.rep-verdict.know { background: #fff5f5; border-color: #ffd9d9; color: #a32020; }

/* ------------------------------------------------------------------
   分值口径：得分率（按分值加权）/ 题数正确率
   ------------------------------------------------------------------
   为什么要单开一块、还分主次：

   · 用户的原话是「错一道低分值的小题和一个高分值的大题不是一个概念」，
     所以能给得分率时它就是主指标 —— 但**必须和题数口径分开摆**，
     两个百分比混在一行里，家长只会更糊涂。
   · 有分值的题不到一半时**主指标退回题数正确率**（后端已定好 mainMetric），
     得分率降级成一行灰字并带上样本量。样本太小的百分比摆在主位，
     家长会盯住一个不可靠的数 —— 那比不给更糟。
   · 加 `.weak` 是为了让「降级」在视觉上也看得出来（浅底 + 灰字），
     不然它和主口径长得一样，用户分不清哪个能信。
   ------------------------------------------------------------------ */
.rep-score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f4f8ff;
  border: 1px solid #dbe7ff;
}
.rep-score.weak { background: #f8f9fb; border-color: #edf1f7; }
.rep-score-main { flex: none; text-align: center; min-width: 92px; }
.rep-score-main b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: #2f6bff;
  font-variant-numeric: tabular-nums;
}
.rep-score.weak .rep-score-main b { color: #4a5666; }
.rep-score-main span { display: block; font-size: 11.5px; color: #7b8794; margin-top: 3px; }
.rep-score-side { flex: 1; font-size: 12px; line-height: 1.65; color: #4a5666; }
.rep-score-side .rep-score-sub { display: block; color: #8a94a6; }
.rep-score-side .rep-score-warn { display: block; color: #a2711a; }

/* 小节标题 */
.rep-sec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5666;
  margin: 16px 0 9px;
}
.rep-sec-tip {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: #a8b0bd;
}

/* 失分条形图 */
.rep-mix { display: flex; flex-direction: column; gap: 6px; }
.rep-mix-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
/* 宽度按最长的标签（「没做完/跳步」6 个字）留足，否则会换行 */
.rep-mix-label { flex: none; width: 6.6em; color: #4a5666; font-size: 12px; white-space: nowrap; }
.rep-mix-bar {
  flex: 1;
  height: 9px;
  background: #eef1f6;
  border-radius: 6px;
  overflow: hidden;
}
.rep-mix-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width .45s cubic-bezier(.2,.9,.3,1);
}
/* 知识类 = 红（要补）、习惯类 = 黄（要改流程）—— 颜色本身就是信息 */
.rep-mix-bar i.knowledge { background: linear-gradient(90deg, #ff9d9d, #e5484d); }
.rep-mix-bar i.habit { background: linear-gradient(90deg, #ffd97a, #f0a020); }
.rep-mix-num {
  flex: none;
  width: 4.2em;
  text-align: right;
  color: #7b8794;
  font-variant-numeric: tabular-nums;
}
.rep-mix-num b { color: #333c4a; font-weight: 600; margin-right: 4px; }

/* 知识 / 习惯 两张并排卡 */
.rep-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 360px) { .rep-two { grid-template-columns: 1fr; } }
.rep-note { border-radius: 10px; padding: 10px 11px; border: 1px solid; }
.rep-note.know { background: #fff7f7; border-color: #ffdede; }
.rep-note.habit { background: #fffcf3; border-color: #ffebc4; }
.rep-note-h {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
.rep-note.know .rep-note-h { color: #d33; }
.rep-note.habit .rep-note-h { color: #b8770a; }
.rep-note-b { font-size: 12.5px; line-height: 1.6; color: #444d5a; }

/* 反复踩的坑：全部默认折叠，只露标题 */
.rep-patterns { display: flex; flex-direction: column; gap: 7px; }
.rep-pat {
  border: 1px solid var(--line, #e6eaf2);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.rep-pat > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  padding: 11px 12px;
  font-weight: 600;
  font-size: 13.5px;
}
.rep-pat > summary::-webkit-details-marker { display: none; }
.rep-pat[open] > summary { border-bottom: 1px solid #f0f3f8; }
.rep-pat-idx {
  flex: none;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #eef4ff;
  color: #2f6bff;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.rep-pat-name { flex: 1; color: #1f2733; }
.rep-pat-arrow { color: #b3bbc7; transition: transform .18s; }
.rep-pat[open] .rep-pat-arrow { transform: rotate(180deg); }
.rep-pat .rep-row { padding: 0 12px; }
.rep-pat .rep-row:first-of-type { padding-top: 10px; }
.rep-pat .rep-row:last-of-type { padding-bottom: 11px; }

/* 7 天清单：带勾选框 */
.rep-plan {
  margin-top: 16px;
  padding: 12px;
  border-radius: 11px;
  background: #f6f9ff;
  border: 1px solid #dbe7ff;
}
.rep-plan-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2f6bff;
  margin-bottom: 9px;
}
.rep-plan-list { display: flex; flex-direction: column; gap: 7px; }
.rep-plan-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.55;
  color: #333c4a;
  cursor: pointer;
}
.rep-cb {
  flex: none;
  width: 17px;
  height: 17px;
  border: 1.8px solid #b7cdf5;
  border-radius: 5px;
  margin-top: 1px;
  background: #fff;
}
.rep-plan-item span { flex: 1; }
.rep-plan-item span b {
  display: inline-block;
  color: #2f6bff;
  font-weight: 600;
  margin-right: 5px;
}

/* 验收目标 */
.rep-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f1fbf6 0%, #f7fdfa 100%);
  border: 1px solid #b7e4cd;
  font-size: 13.5px;
  line-height: 1.55;
  color: #14663f;
  font-weight: 500;
}
.rep-check-ico { flex: none; color: #21b573; margin-top: 1px; }
.rep-check b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  opacity: .7;
  margin-bottom: 3px;
}

/* ------------------------------------------------------------------
   三段式诊断报告：一、核心知识点 二、共性错因 三、标准流程
   ------------------------------------------------------------------
   为什么不再是「结论 + 一串并列卡片」：

   用户拿豆包生成的那份报告做对照，说「不管总结果还是格式上都值得学习」。
   那份报告的结构是「按模块列公式 → 把错因归类并挂到具体题上 → 给一段能照着做的流程」。
   这三段各有各的读法：第一段是**查**（拿着公式对卷子），第二段是**读**（认下自己的错法），
   第三段是**做**（照着走）。混在一串卡片里，用户就分不出自己该「查」还是该「做」。

   排版上的三个决定：
     · 每段都是 details：整份报告 2000 多字，全铺开手机上就是几屏半，没人读得完；
     · 公式放进浅蓝底的块里（.rep-kp-formula）—— 它是这一段里最该被看见的东西；
     · 错因引用的那道题做成可点的块，而不是一行灰字：点开就是那道题的详情，
       这样「诊断」和「原题」之间只差一次点击。
   ------------------------------------------------------------------ */
.rep-hero-body { flex: 1; min-width: 0; }
.rep-hero-t { font-size: 16.5px; font-weight: 700; line-height: 1.45; color: #1f2733; }
.rep-hero-sub { font-size: 11.5px; color: #7b8794; margin-top: 5px; }
.rep-hero-txt { font-size: 14px; font-weight: 600; line-height: 1.6; color: #2b3646; margin-top: 8px; }

/* 「哪几道题没有题干原文」——报告的诚信边界，放在标题下面 */
.rep-caveat {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffdf4;
  border: 1px solid #ffe8b0;
  color: #8a6a12;
  font-size: 11.5px;
  line-height: 1.65;
}
.rep-caveat .ic { flex: none; margin-top: 2px; }

.rep-block {
  margin-top: 14px;
  border: 1px solid #edf1f7;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.rep-block-h {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f7f9fc;
  list-style: none;
}
.rep-block-h::-webkit-details-marker { display: none; }
.rep-block-n {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: #2f6bff;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rep-block-t { font-size: 13.5px; font-weight: 600; color: #1f2733; }
.rep-block-m { flex: 1; font-size: 11px; color: #9aa5b5; text-align: right; }
.rep-block-car { flex: none; color: #b3bbc7; transition: transform 0.18s; }
.rep-block[open] .rep-block-car { transform: rotate(180deg); }
.rep-block-b { padding: 2px 12px 12px; }

/* 一、核心知识点 */
.rep-kp-mod { padding-top: 8px; }
.rep-kp-mod-t { font-size: 12.5px; font-weight: 600; color: #2f6bff; margin: 8px 0 4px; }
.rep-kp-mod-t span {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: #7b8794;
  background: #eef2f8;
  border-radius: 5px;
  padding: 1px 5px;
  margin-right: 6px;
}
.rep-kp-item { padding: 7px 0 7px 2px; border-top: 1px dashed #f0f3f8; }
.rep-kp-item:first-of-type { border-top: 0; }
.rep-kp-name { font-size: 13px; font-weight: 600; color: #333c4a; }
.rep-kp-name i { font-style: normal; color: #9aa5b5; margin-right: 5px; font-size: 11.5px; }
.rep-kp-formula {
  margin: 5px 0;
  padding: 7px 9px;
  background: #f6f9ff;
  border-radius: 7px;
  border-left: 3px solid #b9cdff;
  font-size: 13px;
  overflow-x: auto;
}
.rep-kp-points { margin: 4px 0 0; padding-left: 1.1em; }
.rep-kp-points li { font-size: 12px; line-height: 1.7; color: #4a5666; }
.rep-kp-types { margin-top: 5px; font-size: 11.5px; color: #8a94a6; display: flex; align-items: center; gap: 3px; }

/* 二、共性错因 */
.rep-cause { padding: 11px 0; border-top: 1px solid #f0f3f8; }
.rep-cause:first-child { border-top: 0; }
.rep-cause-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rep-cause-n { flex: none; font-size: 15px; font-weight: 600; color: #e5484d; }
.rep-cause-t { font-size: 14px; font-weight: 600; color: #1f2733; }
/* 分级标注（最核心 · 最高频）：豆包那份报告里最有用的一处「轻重」信息 */
.rep-cause-lv {
  font-size: 10.5px;
  font-weight: 600;
  color: #c0392b;
  background: #fff0ee;
  border: 1px solid #ffd7d1;
  border-radius: 999px;
  padding: 1px 7px;
}
.rep-cause .rep-k,
.rep-quotes .rep-k { width: 4.2em; }
.rep-quotes { display: flex; gap: 8px; margin-top: 8px; align-items: flex-start; }
.rep-quote-list { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rep-quote {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8f9fb;
  border: 1px solid #edf1f7;
  font-size: 12px;
  line-height: 1.6;
  color: #4a5666;
}
.rep-quote.jump { cursor: pointer; border-color: #dbe7ff; background: #f6f9ff; }
.rep-quote.jump:active { background: #e9f1ff; }
.rep-quote-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2f6bff;
  margin-right: 5px;
}
.rep-quote-txt { color: #4a5666; }
/* 题面一行：题号在这批题里不唯一（每次批改都从第 1 题开始），要靠题面把它们区分开 */
.rep-quote-stem {
  display: block;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #e6ecf5;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8a94a6;
  overflow-wrap: anywhere;
}
.rep-quote-stem.nodata { color: #b3bbc7; font-style: italic; }

/* 三、标准化流程 + 收尾 */
.rep-step { display: flex; gap: 8px; padding: 7px 0; align-items: flex-start; }
.rep-step-n {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eaf1ff;
  color: #2f6bff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.rep-step-t { flex: 1; font-size: 12.5px; line-height: 1.65; color: #333c4a; }
.rep-closing {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1fbf6;
  border: 1px solid #b7e4cd;
  color: #14663f;
  font-size: 12.5px;
  line-height: 1.65;
}
.rep-closing .ic { flex: none; margin-top: 1px; }

/* ------------------------------------------------------------------
   等待期间：题框可以点（批完一道就能点开一道）
   ------------------------------------------------------------------
   用户提的：「豆包爱学的逻辑是可以点击这道题让用户先看，但我们不行 ——
   我们要等到全部批改完用户才能看。这样的确慢」。

   行为：
     · 已批完的框（.done）—— 实心描边、可点、点击弹出这道题的答案和解析
     · 还没批完的框       —— 虚线描边、不可点（点了会提示「还在批改」）
   这样用户一眼就能看出「哪几道已经能看了」。
   ------------------------------------------------------------------ */
.scan-boxes { pointer-events: none; }
.scan-box {
  pointer-events: auto;      /* 只有框本身可点，空白区域仍然穿透 */
  cursor: pointer;
  transition: box-shadow .15s;
}
.scan-box:active { box-shadow: 0 0 14px rgba(130, 200, 255, 0.9); }

/* 还没批完：虚线 + 半透明，明确表达「还不能点」 */
.scan-box:not(.done) {
  border-style: dashed;
  opacity: .55;
  cursor: default;
}
/* 已批完：实线加粗一点，表示「能点开看」 */
.scan-box.done { border-width: 2.5px; }

/* ==================================================================
   「学习」首页 —— 底部第一个 tab
   ==================================================================
   版式参考豆包爱学的学习页：上面两张平行大卡（入口），下面按学科分块的错题本。

   为什么入口卡做得这么大：这一页唯一的任务就是让用户**一眼选定一条路**
   （整页作业，还是单题答疑）。做得小了就得读文字，读文字就要停下来想 ——
   而这一步本来不该花时间。颜色区分开了就不用读字。
   ================================================================== */
.entry-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

/*
 * 入口大卡（v72 按竞品那版重画）：
 *   图标在**左上角**、标题 19、说明 12，内边距 18/16，圆角 16，**没有边框**。
 * 底色用「主题色 + 透明度」，不新造色值：
 *   蓝 = --primary 12%，绿 = --success 12%。
 * 为什么不放阴影：色块本身就是入口，再加阴影会变成「两张浮起来的按钮」，
 * 竞品那版是平的色块 —— 留白和色块说话，边框和阴影都少。
 */
.entry-card {
  position: relative;
  text-align: left;
  padding: 18px 16px 16px;
  border: 0;
  border-radius: 16px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  transition: transform .14s;
  -webkit-tap-highlight-color: transparent;
}
.entry-card:active { transform: scale(.975); }

/* 作业批改（蓝）—— 整页，是「主线任务」 */
.entry-card.grade { background: rgba(47, 107, 255, .12); }
/* 题目答疑（绿）—— 单题，是「顺手一问」 */
.entry-card.qa { background: rgba(18, 161, 80, .12); }

.entry-ico {
  align-self: flex-start;
  line-height: 0;
  opacity: .9;
  color: #1f2733;
}
.entry-t1 {
  font-size: 19px;
  font-weight: 700;
  color: #1f2733;
  letter-spacing: .2px;
  line-height: 1.25;
  margin-top: 8px;
}
.entry-t2 {
  font-size: 12px;
  color: #5b6675;
  line-height: 1.5;
  margin-top: 3px;
}

/* ---- 错题本区 ---- */
.home-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 2px 12px;
}
.home-sec-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2733;
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-sec-num {
  font-size: 12px;
  font-weight: 600;
  color: #7b8794;
  background: #eef1f6;
  border-radius: 20px;
  padding: 1px 8px;
}
.home-sec-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: #2f6bff;
  cursor: pointer;
  padding: 4px 0;
}
.home-sec-more .spark { color: #7aa7ff; }
.home-sec-more.plain { color: #8a94a3; }

/*
 * 学科格：三列。
 *
 * v72 按竞品那版重画：**白底圆角卡**、16 号粗体科名、12 号灰字「N 道错题」。
 * 原来是九种淡色底 —— 颜色一多，扫一眼反而要读字；白底 + 更大的字更清楚。
 * 这一格是**导航**（点进去只看这一科），所以 9 个科目全画出来，
 * 0 道的那几个字压浅，仍然可点（见下面 .zero）。
 */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 340px) { .subject-grid { grid-template-columns: repeat(2, 1fr); } }

.subject-card {
  position: relative;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .14s;
  -webkit-tap-highlight-color: transparent;
}
.subject-card:active { transform: scale(.97); }
.subject-card.skel { background: #f2f4f8; box-shadow: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

.subject-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2733;
  line-height: 1.3;
  white-space: nowrap;
}
/*
 * 长科目名（「道德与法治」这种 5 个字）在 1/3 宽的格子里 16 号放不下 ——
 * 实测会顶出去。这里缩一档到 14 号（老板说的「放不下就缩字号」），
 * 仍然粗体、仍然一行，不折行也不省略号。
 */
.subject-card.long-name .subject-name { font-size: 14px; letter-spacing: -.1px; }
.subject-count {
  font-size: 12px;
  color: #8593a8;
  line-height: 1.4;
  margin-top: 3px;
  white-space: nowrap;
}
/*
 * 0 道的科目：字压浅一点，但仍然可点。
 * 它说的是「这条路现在没有题」，不是「这一科坏了」—— 所以按钮不置灰
 * （置灰的按钮用户不会去点，而点进去看到一个空错题本才是对的反馈）。
 */
.subject-card.zero .subject-name { color: #7b8794; }
.subject-card.zero .subject-count { color: #b3bccb; }

/* 有新错题时右上角一个小红点 —— 和底部 tab 的红点语义一致 */
.subject-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5484d;
}

/* 学科配色。v72 起学科格改成白底（竞品那版），这套映射不再使用 ——
   留着颜色类只会让下一个人以为格子还有九种底色。 */

.home-empty {
  text-align: center;
  padding: 30px 20px;
  color: #8a94a3;
  font-size: 13px;
  line-height: 1.7;
  background: #f7f9fc;
  border-radius: var(--radius);
}
.home-empty-ico { color: #b9c2cf; margin-bottom: 8px; }
.home-hint { text-align: center; font-size: 12px; color: #a0a8b4; margin-top: 14px; }

/* ==================================================================
   子页面返回栏（批改 / 答疑 / 错题本 都是「学习」的下级）
   ==================================================================
   底部导航仍然高亮「学习」，所以需要一个明确的「我进到二级页了」的信号，
   否则用户会以为切走了 tab、找不到回去的路。 */
.sub-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.sub-back {
  border: 0;
  background: #eef1f6;
  color: #4a5666;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.sub-back:active { background: #e2e7ef; }
.sub-title { font-size: 15px; font-weight: 600; color: #4a5666; }

/* ------------------------------------------------------------------
   标记图左上角的「符号 + 题号」胶囊
   ------------------------------------------------------------------
   用户反馈：批改**过程中**画的是 ✓ ✗，批改完就换成序号了，
   对错只剩颜色 —— 而家长扫一眼图想确认的是「哪几道错了」，
   不是「第几题在哪儿」；颜色对色觉障碍的人也不友好。

   所以两个都放：**符号放大、题号缩小**。不做开关 ——
   开关意味着用户得先知道有这个东西、再去设置里找，多两步。

   后来它又被**去掉了点击**（见 util.js 里那段）：想点开解析的人总误触到它，
   判定就被悄悄改了。现在它只是标签，改判在解析弹层里。
   ------------------------------------------------------------------ */
.mark-dot { gap: 0; }
.mark-dot b {
  /* 符号是主角：它回答「这道题对了没有」 */
  font-size: calc(var(--mark-size) * 0.62);
  font-weight: 800;
  line-height: 1;
}
.mark-dot i {
  /* 题号退成配角：它只用来和下面的题目卡片对号 */
  font-size: calc(var(--mark-size) * 0.34);
  font-weight: 600;
  font-style: normal;
  opacity: .82;
  margin-left: 2px;
  line-height: 1;
}
/* 三位数题号（很少见）时别把胶囊撑得太宽 */
.mark-dot i { max-width: 2.6em; overflow: hidden; }

/* ------------------------------------------------------------------
   改判按钮（.tag-toggle）—— 和状态标签同行，但**是动作不是信息**
   ------------------------------------------------------------------
   用户反馈两点，其实是同一件事：
     · 「『这题其实做错了』容易误解」—— 那是**陈述句**，读起来像系统在告知；
     · 「放第二行有点占地方」—— 为一个低频动作单开一整行，视觉重量过大。

   要挪到状态标签那一行，文案就必须先压短（「改为做错」4 个字）。
   样式上它和 .tag 长得像（同样的小圆角、同样的字号），
   但**只有描边、没有底色** —— 前两个是「读的信息」，这一个是「点的动作」，
   混成一样用户就会去点那两个标签。
   ------------------------------------------------------------------ */
.tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #cfd6e0;
  background: #fff;
  color: #4a5666;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, border-color .12s;
}
.tag-toggle:hover { background: #f4f7fb; border-color: #aab6c6; }
.tag-toggle:active { background: #e9eff7; transform: scale(.97); }
/* 请求中禁用 —— 要看得出来，否则用户会以为没点上 */
.tag-toggle:disabled { opacity: .5; cursor: default; transform: none; }
/* 里面的 SVG 跟着文字色走 */
.tag-toggle .ic { flex: none; }

/* ------------------------------------------------------------------
   题目切换条（详情弹层最上面那排 1…n）
   ------------------------------------------------------------------
   用户原话：「最上面按照切题顺序 1-n 来排列，方便用户快速找到对应的题目」。
   改之前换一道题要退出详情、回到标了题框的整页图、再找那道题的框 —— 三步。

   为什么是**圆形数字 + 颜色**而不是豆包那种纯数字：
   判定（对/错/半对）本来就在我们手上，只显示数字等于让用户为了确认
   「这几道错在哪儿」再退回整页图看一遍。颜色只做配角：
   数字本身的大小、粗细、位置都不变，颜色区分的是这三档。

   为什么横向滚动而不是换行：20 道题排成两行会把详情第一屏吃掉一半，
   而这一条的作用是「快速跳题」，不该比题目本身更抢眼。
   ------------------------------------------------------------------ */
.q-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 0 12px;
  padding: 6px 0;
  background: #fff;
  /* 一道很淡的分隔线：粘住之后下面的题干会从它底下过，没有这条会糊在一起 */
  box-shadow: 0 6px 10px -8px rgba(16, 32, 58, .28);
}
.q-nav-scroll {
  position: relative;        /* 让 offsetLeft 相对这一层算，当前项才能居中 */
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
.q-nav-scroll::-webkit-scrollbar { display: none; }
.q-nav-item {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1.5px solid #d8dfe9;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform .12s, background .12s, border-color .12s;
}
.q-nav-n { font-size: 14px; font-weight: 700; line-height: 1; }
/* 三档判定：只动颜色，不动大小 —— 数字始终是主体 */
.q-nav-item.ok { border-color: #b7e3c8; color: var(--success); }
.q-nav-item.bad { border-color: #f7c9ca; color: var(--danger); }
.q-nav-item.half { border-color: #f6dcae; color: #b5730a; }
/* 当前这道：实心 + 白字。底色仍按判定走，所以「我在哪」和「这题对不对」同时看得见 */
.q-nav-item.is-active { color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(16, 32, 58, .18); }
.q-nav-item.is-active.ok { background: var(--success); }
.q-nav-item.is-active.bad { background: var(--danger); }
.q-nav-item.is-active.half { background: var(--warn); }
.q-nav-item:active { transform: scale(.94); }
.q-nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ------------------------------------------------------------------
   页脚：网站备案号
   ------------------------------------------------------------------
   《互联网信息服务管理办法》要求已备案网站在首页底部标注备案号，
   并链接到工信部备案系统。所以这块**不能删**。

   刻意做得淡、小、居中：它是合规信息，不是给用户看的内容 ——
   但也不能藏（藏起来等于没标）。链接用 target="_blank" + noopener，
   别把主页面交给第三方页面控制（rel 里那个 noreferrer 是配套的）。
   ------------------------------------------------------------------ */
.site-foot {
  text-align: center;
  padding: 16px 12px 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9aa6b6;
}
.site-foot a {
  color: inherit;
  text-decoration: none;
}
.site-foot a:hover { color: #6b7a8d; text-decoration: underline; }

/* ==================================================================
   学情页（这一版重做）—— 一页可以照着抄的三段论
   ==================================================================
   用户的原话：「孩子实际场景是会把这一页错题总结，抄一遍到他的纸质错题本上」。

   由此定下三条排版规矩，改样式时不要破：

   ① **只有一层容器**。整页 = 一个 .sch-doc（白纸），三段是它里面的
      border-top 分隔块，**不是**卡片里再套卡片。上一版每段都是
      「带边框圆角背景的盒子」，套在白卡里，看上去像一堆并列的抽屉 ——
      而抄写的人要的是**一段接一段的正文**。
   ② **字号偏大**。抄的时候得能一眼看清，所以正文按 15px 起，
      公式块 16px。这一页不用「紧凑」换信息量。
   ③ **不要解释性小字**。除了一行「读了 N 道原文」的交代（那是诚信边界），
      页面上不出现说明文字。
   ================================================================== */

/*
 * 期间那一行（v69 从顶栏下面搬进正文）。
 *
 * 为什么搬：原来它在蓝条下面独占一整行（量到 35px 高 + 10px 外边距），
 * 用户的原话是「可以挪到下面，单独一个今天放这里太占地方了」。
 * 现在它是正文那张白纸里的第一行小字；有最新那份时直接折进
 * 「今天（11 月 22 日）」那一行，所以省掉的是整条 45px。
 */
.sch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  min-width: 0;
}
/* 折进状态条那一行时不要再加外边距（那一行自己有 margin-top: 8px）。
   宽度必须显式 100%：状态条是 flex 列、align-items: flex-start，
   不然这一行会缩成内容宽，右边那句日期就贴不到右边缘。 */
.sch-gen > .sch-bar { margin: 0; width: 100%; }
.sch-gen > .sch-sheet { width: 100%; margin: 8px 0 0; }
/* 白纸第一行时也一样贴纸的左边，和标题同一条竖线（默认 margin 就是 0 0 8px） */
.sch-doc > .sch-bar { margin: 0 0 8px; }
.sch-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
/*
 * 收进正文之后它是一行小字里的按钮：再矮一档（仍然比 12px 的辅助字大一档）。
 * line-height 压到 1.3 是为了不让它把那一行撑成 38px —— 省高度这件事得落在数字上。
 */
.sch-gen > .sch-bar .sch-pick,
.sch-doc > .sch-bar .sch-pick { padding: 4px 10px; line-height: 1.3; }
.sch-pick[aria-expanded='true'] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.sch-pick-car { display: inline-flex; color: #9aa5b5; transition: transform .18s; }
.sch-pick[aria-expanded='true'] .sch-pick-car { transform: rotate(180deg); color: var(--primary); }
/*
 * ★ v128：`.sch-when`（右边那行「最近 1 天（11 月 29 日–11 月 29 日）」）**整条删掉**。
 * 老板：「选择日期和这个绿框的功能放在右上角某个区域就可以了」——那句日期范围和
 * 按钮上的「今天」是同一件事说两遍，而它原占整行、把 seg 挤到了下面。
 * 同一句日期范围现在只进「今天 ▾」的 title / aria-label（见 stats.js 的 periodLabelText）。
 */

.sch-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.sch-sheet[hidden] { display: none; }
.sch-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sch-tab {
  padding: 6px 13px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.sch-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sch-custom { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.sch-custom input[type='date'] {
  width: auto;
  min-width: 128px;
  padding: 7px 9px;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  font-family: inherit;
  color: var(--ink);
}
.sch-custom-dash { color: var(--ink-3); }

/*
 * 「这段时间还有：数学 · 八年级 1 道 → 切换」。
 *
 * 它是**说明 + 入口**，不是一块统计：用户在记账行里看到「错题本 8 道」，
 * 下一句必须能读到「另外 1 道在别的学段」，否则他会以为系统丢了一道。
 * 所以这里只有一行 12px 灰字，没有任何底色/边框/间距块 —— 一做成卡片，
 * 这一页又变回「先做选择题」（上一版就是被这么嫌复杂的）。
 */
.sch-others {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}
.sch-other {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* 数字比词语重一档：扫一眼要看到「1 道」，而不是先读学科名 */
.sch-other b { font-weight: 600; }
.sch-other-sep { color: var(--ink-3); }
.sch-other-more { color: var(--ink-3); margin-left: 2px; }
/* 「→ 切换」只是提示这几个字能点，本身不是按钮（点了没反应会让人更迷惑） */
.sch-other-go { color: var(--ink-3); margin-left: 6px; }

/* ★ 唯一的容器：整页就是这一张纸 */
.sch-doc {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 17px 12px;
}
.sch-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #16233a;
}
.sch-meta { font-size: 12px; color: var(--ink-3); }
/* 账目（读了 N 道 / 正确率 / 得分率）：一行灰字，不占块 */
.sch-read { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.sch-read b { color: var(--ink-2); font-weight: 600; }
.sch-headline {
  margin: 12px 0 0;
  padding-left: 11px;
  border-left: 3px solid var(--primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  color: #1f2733;
}
.sch-doc .rep-caveat { margin-top: 12px; }
/*
 * 一句话里点到的知识点：「主要是不等式的基本性质（7 道）」这一段能点。
 *
 * 可点的暗示靠**虚线下划线 + 主题色**，不靠 hover —— 手机上根本没有 hover，
 * 而这一页的主要用户就是手机上的孩子。下沿用 dashed 而不是实线：
 * 它是「可以展开看看」，不是链接跳走（跳走会丢掉这一页的位置）。
 */
.sch-hl-ref {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed currentColor;
  -webkit-tap-highlight-color: transparent;
}
.sch-hl-ref:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 三段：靠分隔线分开，不靠边框盒子 */
.sch-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sch-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #16233a;
}
.sch-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(1px);
}
.sch-hm { margin-left: auto; font-size: 11px; font-weight: 400; color: #9aa5b5; }

/* 错因引用到的那道题：可点的题号 + 后面跟一句那道题里的证据 */
.sch-q {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.sch-q[disabled] { color: var(--ink-3); cursor: default; }
.sch-q-txt { color: var(--ink-2); }

/* 收尾那句 + 页脚 */
.sch-doc-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: #9aa5b5;
}
.sch-doc-foot .sch-link { margin-left: auto; }
.sch-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sch-link:active { color: var(--primary); }

/* 空态 / 生成中：也放在同一张纸上，不另起一张卡 */
.sch-empty { text-align: center; padding: 30px 10px 34px; }
.sch-empty-t { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.sch-empty-s { font-size: 12.5px; color: var(--ink-3); margin-top: 7px; line-height: 1.7; }
.sch-wait { display: flex; gap: 11px; align-items: flex-start; padding: 22px 4px 26px; }
.sch-wait-t { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sch-wait-s { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.7; }

/* 对话入口：次要入口，视觉上要轻 —— 不套卡片、不加标题栏、只留输入行 */
.sch-chat { margin-top: 12px; }
.sch-chat .chat-panel { border: 0; background: transparent; box-shadow: none; padding: 0; }
.sch-chat .chat-head { display: none; }
.sch-chat .chat-send-row { order: 1; }
.sch-chat .chat-quick { order: 2; margin: 7px 0 0; }
.sch-chat .chat-log { order: 3; margin-top: 9px; max-height: 46vh; }
.sch-chat .chat-cost { order: 4; }
.sch-chat .chat-input { background: #fff; }

.sch-foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  padding-bottom: 4px;
}

/* 抄写友好：正文比别处大一档，公式更大 —— 这一页的主要用途是「照着写」 */
.sch-doc .rep-kp-name { font-size: 14.5px; }
.sch-doc .rep-kp-item { padding: 9px 0 9px 2px; }
.sch-doc .rep-kp-formula { font-size: 16px; line-height: 1.75; }
.sch-doc .rep-kp-points li { font-size: 13.5px; line-height: 1.75; }
.sch-doc .rep-kp-types { font-size: 12.5px; }
.sch-doc .rep-cause { padding: 12px 0; }
.sch-doc .rep-cause-t { font-size: 15px; }
.sch-doc .rep-cause-lv { font-size: 11px; }
.sch-doc .rep-row { font-size: 13.5px; line-height: 1.75; }
.sch-doc .rep-step-t { font-size: 14px; line-height: 1.8; }
.sch-doc .rep-k { font-size: 11.5px; }
.sch-doc .rep-closing { font-size: 13.5px; }

/* ══════════════════════════════════════════════════════════════════
 * 日结页正文（v40 起两段）：一句话概况 / 要抄的
 *
 * 三条硬规矩，改这里之前先读一遍：
 *   ① 一段一个视觉块，**不要卡片套卡片** —— 整页仍然只有一层 .sch-doc，
 *      .sch-sec 靠上边框分隔，块内不再加边框和阴影。
 *   ② 字号比别处大一档：这一页是**照着抄**的，凑近看就是失败。
 *   ③ 块与块之间留空：抄完一块要换行/换页，贴着排会抄串。
 *
 * ★ 「对账」那一段的样式（.sch-rec*）整段删掉了（用户：这个功能目前看并没有
 *   必要存在）。连同那一段的「成立 / 无法判断」配色一起删：留着没人用的类名，
 *   下一个人会以为页面上还有那一段。
 * ══════════════════════════════════════════════════════════════════ */

/* ---- 一、一句话 ----
   v38：这一行不再带「一句话」那个小标签了 —— 它现在长在概况卡里
   （数字下面那根分隔线之后），卡片本身已经把「这是在解释上面那三个数」说清了，
   再加一个蓝标签只是多一个字。 */

/* ---- 三、要抄的（整页主体） ---- */
.sch-copy { display: flex; flex-direction: column; gap: 22px; margin-top: 4px; }
.sch-copy-sub { display: block; }
.sch-copy-h {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════════
 * 知识点表格（v98）
 *
 * ⚠️ v100 起**页面不再渲染这张表**：知识点改成了「每个点一张卡」
 * （见下面 v100 那一段的 .sch-doc.day .sch-kp）。这里这一组 .sch-kp-tb /
 * .sch-kp-h / .sch-kp-r / .sch-kp-bar 的规则保留着只有一个原因：
 * 老缓存 / 别的页面万一还有这类节点时不会瞬间散架；等确认没有调用方，
 * 下一批连同上面对应的 JS 一起删（本批不删，避免连线上的缓存页面一起改）。
 *
 * 一、知识点原来是**一张两列表**：知识点（色块 + 名称 + 在哪一节）/ 次数
 * （这次 N 道 + 横条）。点开一行，才展开要抄的核心结论和坑。
 *
 * 为什么是两列（线上 25 份日结实测）：每份平均 4.4 条、最大 6 条 ⇒ 不需要
 * 「超过 6 条」的折叠；what 填充率 7% ⇒ 第三列那句「一句话」基本全空；
 * 有内容的是 facts（平均 4 条）和 traps（3 条）⇒ 它们放进「点开一行」。
 *
 * 三条规矩：
 *   ① 表格只管**扫一眼**那一层，要抄的内容点开就在原地（不跳页、不弹层）；
 *   ② 横条是「看」不是「抄」的，打印时不印（见文末 @media print）；
 *   ③ 手机上 390 宽不许横向溢出：table-layout: fixed + 百分比列宽 + 允许断词。
 * ══════════════════════════════════════════════════════════════════ */

.sch-kp-tb {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
}
/* 列宽：知识点 72% / 次数 28%（390 宽下「这次 12 道」也放得下） */
.sch-kp-col-a { width: 72%; }
.sch-kp-col-b { width: 28%; }
.sch-kp-h th {
  padding: 0 4px 5px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-align: left;
}
.sch-kp-h .sch-kp-th-b { text-align: left; }
.sch-kp-r > td { padding: 9px 4px 8px; vertical-align: top; }
/* 每一组最后一行画虚线分隔（展开行 / 题图行都可能是最后一行，谁在最后谁画） */
.sch-kp > tr:last-child > td { border-bottom: 1px dashed var(--line); }
.sch-kp:last-child > tr:last-child > td { border-bottom: 0; }
.sch-kp-a,
.sch-kp-cnt { overflow-wrap: anywhere; }
.sch-kp-tiles > td { padding: 0 4px; }
.sch-kp-t { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sch-kp-n { font-size: 16.5px; font-weight: 700; color: #16233a; line-height: 1.5; }

/*
 * 「在哪一节」：导航（去课本哪一节找），不是要抄的内容，所以比名称小一档。
 * 它是**可见的第二行**（不靠点开就看得见）—— 这一行回答「翻哪一章哪一节」。
 */
.sch-kp-s {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.sch-kp-s b {
  display: inline-block;
  min-width: 3.2em;
  margin-right: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

/*
 * 知识点的正文行（v99）：一行一条，**默认全部可见**。
 *
 * 老板的原话：「现在是把知识点折回去了，没必要，直接铺开就行」。
 * 所以这里没有任何折叠控件（上一版的 .sch-kp-open 胶囊、.sch-kp-car 箭头、
 * .sch-kp-x 展开行整块删掉了）。
 *
 * ★ v100：维度那枚淡蓝色块（.sch-dim）删掉了 —— 颜色纪律是「蓝只给能点的动作」，
 * 维度是元信息。卡里改成整块一个灰标签「定义」（见 .gy-lab），
 * 维度名只留在 data-dim 上，不再画出来。
 */
.sch-kpts { margin: 7px 0 0; padding: 0; list-style: none; }
.sch-kpt {
  margin: 4px 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* 老 payload 的 facts 当 points 用、没有维度：不占位、不留空格子 */
.sch-kpt.is-plain { padding-left: 0; }
/* 「二、怎么解（按知识点）」的小标题：一块一个知识点名 */
.sch-copy-sub-h {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.sch-how + .sch-how { margin-top: 10px; }
.sch-how-n,
.sch-tr-n {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #16233a;
  line-height: 1.5;
}
/* 「三、最容易错」：名字用红色，一眼能分开「知识」和「提醒」 */
.sch-tr + .sch-tr { margin-top: 10px; }
.sch-tr-n { color: #b42318; }
.sch-hows { margin: 0; padding: 0 0 0 26px; }
.sch-hows li {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  padding-left: 2px;
}
.sch-hows li::marker { font-weight: 700; color: var(--primary); }
.sch-hows li:last-child { margin-bottom: 0; }

/*
 * 掌握程度色块：文字 + 底色（不是图标）。
 *   红 = 这次错了（报告里的 count 自己就能证明）
 *   黄 = 之前错过（/api/kp-status 的 repeatList：以前会过、之后又错了）
 *   绿 = 已巩固（/api/kp-status 的 clearList）
 * 黄和绿都要等真数据回来才换，拿不到就不显示（见 views/stats.js 的 applyKpBadges）。
 * 抄的时候照着画个圈就行；打印也印（它是字，不是图）。
 */
/*
 * 掌握程度三态色块。
 *
 * ★★ v128（老板连着说了三次「颜色多」）：**红和黄的色块退成灰**，只留绿的。
 *   · wrong「这次错了」/ repeated「之前错过」是**状态**，不是警告 ——
 *     字本身已经说清了，再上一块红/黄等于每张卡都在喊，喊多了就没人看；
 *   · cleared「已巩固」**保留淡绿**：正反馈值得一个有颜色的标记，而且一屏里
 *     最多一两处，不吵；
 *   · 这样整屏的彩色只剩「蓝（练这个点那颗胶囊）+ 可能的淡绿（已巩固）」，
 *     没有已巩固时整屏就只有蓝色。
 */
.sch-kp-bd {
  flex: none;
  display: inline-block;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
}
.sch-kp-bd[data-state='wrong'] { background: #f1f4f9; color: var(--ink-2); border-color: var(--line); }
.sch-kp-bd[data-state='repeated'] { background: #f1f4f9; color: var(--ink-2); border-color: var(--line); }
.sch-kp-bd[data-state='cleared'] { background: #e8f6ee; color: #1a7f4b; border-color: #b7e1c8; }

/*
 * 横条（长度 = 这一行 / 最多那一行）。
 * 只在屏幕上显示：它表达的是「哪几行更多」，打印出来是一条灰带，抄的时候没用。
 */
.sch-kp-bar {
  display: block;
  height: 5px;
  margin-top: 6px;
  border-radius: 3px;
  background: #eef2f8;
  overflow: hidden;
}
.sch-kp-bar > i { display: block; height: 100%; background: #5b8def; border-radius: 3px; }

/* 解法步骤里「整条就是式子」的那一步：浅底框 + 左侧色条（打印也印，是能抄的东西） */
.sch-step-fx {
  margin: 4px 0 9px;
  padding: 5px 10px;
  border-left: 3px solid #b7c8e6;
  border-radius: 6px;
  background: #f6f8fc;
}

/*
 * 打印：主体（表格 + 文字 + 色块 + 知识点 / 怎么解 / 坑）照印，**增强层**（横条、分析图）不印。
 * v99 起正文默认全部铺开，纸上和屏幕上看到的是同一份内容 —— 不再有「纸上替你把折块摊开」这回事。
 */
@media print {
  .sch-kp-bar { display: none !important; }
  .sch-kp-tb { table-layout: fixed; width: 100%; }
  /*
   * v99：分析图不印。日结是拿来抄的，图抄不下来；而且折线/圆环打印出来
   * 常常是一团灰。图 + 外面那一段一起 display:none（两个选择器都写，
   * 是因为计算样式按元素自己的 display 算，父级隐藏不会让子元素的 computed display 变 none）。
   *
   * 趋势图这一版搬去了周练页，所以那边也要一条（打印的纸是拿来做卷子的，
   * 更加不该印一张 14 天的柱状图）。
   */
  #page-stats .sch-charts,
  #page-stats .sch-chart,
  #page-stats #schTrendChart,
  #page-library .sch-charts,
  #page-library .sch-chart,
  #page-library #schTrendChart { display: none !important; }
  /*
   * 纸面只留「要抄的」：对话输入框、页脚按钮、旁证折块、切换按钮都不印。
   * 期间那一行只留日期那句（打印出来要能对上「这是哪一天/哪一段」）。
   */
  #page-stats .sch-chat,
  #page-stats .sch-foot,
  #page-stats .sch-doc-foot,
  #page-stats .sch-others,
  #page-stats .sch-hero-proof,
  #page-stats .sch-proof,
  #page-stats .sch-pick,
  #page-stats .sch-sheet { display: none !important; }
}

.sch-kp-c {
  flex: none;
  font-size: 12px;
  color: var(--ink-3);
  background: #f1f5f9;
  border-radius: 99px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
/*
 * 「在哪一节」以外的东西已经搬到 .sch-kpts / .sch-hows / .sch-kp-traps 上了
 * （v99 删掉了折叠，原来的 .sch-kp-l / .sch-kp-facts / .sch-kp-w / .sch-kp-e
 * 一整套只服务于「点开一行」，现在没有对应的 DOM）。
 * 坑（traps）仍然用有序列表：孩子要按 1/2/3 一条一条抄，编号是内容的一部分。
 */
.sch-kp-note { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }
.sch-kp-traps { margin: 2px 0 0; padding-left: 1.7em; }
.sch-kp-traps li { font-size: 15px; line-height: 1.7; margin: 2px 0; padding-left: 2px; }
.sch-kp-traps li::marker { color: #e5484d; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════
 * 分析图（v99）：最近 14 天趋势
 *
 * 这一版只剩趋势图，而且它长在**周练页**（巩固页那段代码已删，不是藏起来）。
 * 环图（掌握程度甜甜圈）连同它那一整套样式一起删了：周练页顶上那张
 * 三格卡已经用数字说清清掉几个 / 还剩几个反复，环图是同一件事说两遍。
 *
 * 手写内联 SVG，不引图表库（零依赖）。三条硬要求都落在这一小块里：
 *   ① 手机上不溢出：svg 用 width:100% + viewBox，父级 min-width:0；
 *   ② 数字标在图旁：柱子顶上写数（读角度读不出几道）；
 *   ③ 打印不印（见上面 @media print）。
 * ══════════════════════════════════════════════════════════════════ */
.sch-charts { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sch-chart { margin: 0; min-width: 0; }
.sch-chart-t {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #16233a;
  line-height: 1.5;
}
.sch-chart-s { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.sch-chart-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.sch-ax { stroke: #d8dfe9; stroke-width: 1; }
.sch-ax-x,
.sch-ax-y { font-size: 8px; fill: #8a94a6; }
.sch-bar-v { font-size: 8px; fill: #44506a; font-variant-numeric: tabular-nums; }
.sch-barc { fill: #5b8def; }
/* 0 的那天也画（一根贴地的短柱），颜色浅一档，别和真的 1 道混在一起 */
.sch-barc.is-zero { fill: #c7d0de; }
.sch-chart-note { margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* 解法步骤：按题型分组，每组一套有序步骤 —— 孩子真正照着做的那一块 */
.sch-type { margin-top: 4px; }
.sch-type + .sch-type { margin-top: 14px; }
.sch-type-t { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sch-type-k {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px; font-weight: 700;
  align-self: center;
}
.sch-type-n { font-size: 16px; font-weight: 700; color: #16233a; line-height: 1.5; }
.sch-type-c {
  flex: none;
  font-size: 12px;
  color: var(--ink-3);
  background: #f1f5f9;
  border-radius: 99px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
.sch-steps { margin: 0; padding: 0 0 0 26px; }
.sch-steps li {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
  margin: 0 0 9px;
  padding-left: 2px;
}
.sch-steps li::marker { font-weight: 700; color: var(--primary); }
.sch-steps li:last-child { margin-bottom: 0; }

/* ---- 「这次 N 道」可点：点开就地展开那几道题（不跳错题本） ---- */
/*
 * 这两颗原来是纯文字。现在它们可能是 <button>，所以要把浏览器给按钮的默认
 * 外观（边框、字体、居中）全部抹掉 —— 版式必须和上一版**一个字都不动**，
 * 否则「一次只加可点」会变成一次改版，抄写的人得重新认一遍这一页。
 */
.sch-kp-c,
.sch-type-c {
  border: 0;
  font-family: inherit;
  line-height: 1.5;
}
button.sch-kp-c,
button.sch-type-c {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/*
 * 可点的暗示：底色加深一档 + 一个 ▾。光靠 hover 不行 ——
 * 手机上根本没有 hover，而这一页的主要用户就是手机上的孩子。
 */
button.sch-kp-c,
button.sch-type-c {
  color: var(--primary);
  background: #e8eefb;
  font-weight: 600;
  padding: 2px 8px 2px 9px;
}
button.sch-kp-c:hover,
button.sch-type-c:hover { background: #dbe5f9; }
button.sch-kp-c:focus-visible,
button.sch-type-c:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
button.sch-kp-c[aria-expanded='true'],
button.sch-type-c[aria-expanded='true'] { background: #d3e0f8; }
.sch-caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  transition: transform .12s ease;
}
button[aria-expanded='true'] .sch-caret { transform: rotate(180deg); }

/* ══════════════════════════════════════════════════════════════════
 * 日结页 · 三段（v100）：知识点 / 解题方法 / 举一反三
 *
 * 设计稿：design/三段结构/gy-巩固.html（老板逐条确认过的减法版）。
 * 这一屏的颜色纪律只有一句话：
 *     灰 = 信息（知识点名、这次 N 道、标签、次动作、卡边）
 *     蓝 = **能点的动作**（练这个点 / 按这个方法练 2 道 / 底部常驻那颗）
 *     重点 = 正文里加粗的关键词（不加颜色，只加字重）
 * 所以：段落标题、选中的段、序号、维度、次数全部退成灰阶。
 *
 * 每条断言都在 test/screenshot.mjs 的「学情页」那一段量计算值。
 * ══════════════════════════════════════════════════════════════════ */

/* 外面那张大白卡在这一屏**退成透明容器** —— 每个知识点自己是一张卡；
   白卡里再套白卡 = 两层边，看着脏。（老板：每个知识点用一个框框起来）

   ★ v128：页尾让位分两档 —— 底部那条细线只有 ≥2 个知识点才有
   （老板：1 个知识点时它和「练这个点」重复）。没有那条线时不必留 84px，
   否则 1 个知识点那一屏的页尾会凭空多出 60 多 px 空白。 */
.sch-doc.day {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 20px;
}
.sch-doc.day[data-has-day-bar='1'] { padding-bottom: 84px; }
/* 蓝只给能点的动作：选中的那一段用「白胶囊 + 深灰字」说明我在哪，不再借一层蓝 */
#statsBody .seg button.on { color: #16233a; }
.sch-doc.day .sch-copy-h { color: #16233a; }

/* 「一、知识点」+ 右边一行很小的「要抄 N 条」：回答「今天抄多少」，不占一行 */
.gy-h2row { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.gy-h2row .sch-copy-h { margin: 0; flex: 1; min-width: 0; }
.gy-h2cnt { flex: none; font-size: 11.5px; color: var(--ink-3); }

/*
 * 每个知识点一张卡（老板定，理由是「框是为了分清边界，不是强调」）：
 *   底 white / 边 1px solid var(--line) #e6ebf3 / 圆角 14px /
 *   内边距 12px 13px / 卡间 10px / **不加阴影**
 * 边只有 1px 且是最浅那条灰：边界看得见，但不会变成一叠警告牌。
 */
.sch-doc.day .sch-kp {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  box-shadow: none;
}
.sch-doc.day .sch-kp + .sch-kp { margin-top: 10px; }
.gy-kp-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
/* 名字不再吃满整行：让「这次 N 道」紧贴名字后面（不是飘到卡右边缘） */
.gy-kp-top .sch-kp-n { flex: 0 1 auto; min-width: 0; }

/*
 * 「这次 N 道」：它回答的是「错了几道」这个事实，不是警报 ——
 * 所以是紧跟知识点名的一行**小灰字**，不是色块、不是第二列。
 * 可点时仍然能点（点开就地展开那几道，见 bindDoc），只是样子退成文字。
 */
.gy-cnt {
  flex: none; border: 0; background: none; padding: 0;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
  cursor: default; -webkit-tap-highlight-color: transparent;
}
/*
 * 热区：视觉上只是一行 12px 小字（量出来 16px 高），手机上按准很难。
 * 用 ::after 把可点范围补到约 34px 高，**视觉一个字都不动**（同 .gy-chip 的做法）。
 * 这一条也是「点了没反应」的一部分原因：字小、热区更小。
 */
button.gy-cnt { position: relative; cursor: pointer; }
button.gy-cnt::after { content: ''; position: absolute; inset: -9px -6px; }
button.gy-cnt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
/*
 * ★ v151：那颗 ▾ 原来只有 9px、颜色还是最浅的 --ink-3，手机上几乎看不见 ——
 * 老板因此问「能点的设计都会加下划线吧」（他想知道这里为什么看不出能点）。
 *
 * 不加下划线：全站一个下划线都没有，中文下划线贴着字底显脏，只加这一处反而更怪。
 * 也不加浅灰底块（他这两天连着在减色块）。这里做的是把**本来就有的那个通用符号**
 * 做清楚：9px → 11px，--ink-3 → --ink-2（深两档）。
 */
.gy-cnt .sch-caret { margin-left: 2px; font-size: 11px; color: var(--ink-2); }

/* 「定义」/「易错点」两个标签**同色（灰）**：元信息，比正文小两档，不抢内容
 *
 * v102（老板：「还有，我说的易错点三个字不用红色的，跟定义一个颜色就行」）：
 * 原来「易错点」是红（#b42318）。红色是在喊「这里有问题」，而「易错点」是**每个
 * 知识点都有的固定段落**（不是异常）—— 每张卡都喊一次警告，喊多了就没人看，
 * 而且它把这屏唯一的动作色（蓝「练这个点」）也压下去了。
 * 这一段最容易错，靠**位置（第二段）+ 内容本身 + 加粗**已经说得清，不需要颜色再喊一遍。
 * ⚠️ 别再给 .gy-lab-trap 单独上色（历史上就是这一条把它染红的）。
 */
.gy-lab {
  margin: 10px 0 2px;
  font-size: 11px; font-weight: 700; line-height: 1.6;
  letter-spacing: .04em; color: var(--ink-3);
}
.sch-doc.day .gy-need {
  margin: 2px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}

/* ==========================================================================
 * ★★ 2026-12-01 一块 = 一个章节：卡头下面那排「考点角标」
 *
 * 老板孩子的原话是「第一页和第二页知识点重复」，病根是报告按标签切卡。
 * 现在一张卡是一个**章节**，卡里列出这一章的考点，每个考点后面跟一个小角标
 * 「这次 N 道」——「这次 N 道」从原来的卡标题**降级**成了这一段元信息。
 *
 * 颜色纪律没变：**蓝只给能点的动作**。所以角标是灰边白底的小胶囊，
 * 只有「点开看题图」的那个三角是深一档的灰；展开时边框借一下主色（那是动作态）。
 * ========================================================================== */
.gy-blk-cnt { color: var(--ink-3); }
.gy-kps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 9px 0 0;
}
.gy-kps-t {
  flex: 0 0 auto; margin-right: 1px;
  font-size: 11px; font-weight: 700; line-height: 1.6;
  letter-spacing: .04em; color: var(--ink-3);
}
.gy-kpchip {
  display: inline-flex; align-items: baseline; gap: 5px;
  margin: 0; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: 13px; line-height: 1.45;
  color: var(--ink); text-align: left;
  overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent;
}
/* 可点的小胶囊：热区补到 ~44px 高，视觉一个字不动（同 .gy-cnt 的做法） */
button.gy-kpchip { position: relative; cursor: pointer; }
button.gy-kpchip::after { content: ''; position: absolute; inset: -8px -4px; }
button.gy-kpchip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gy-kpchip-c {
  font-size: 11.5px; font-weight: 500; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
/* 展开态：边框借主色（这是「动作正在进行」，不是装饰） */
.gy-kpchip.is-open[aria-expanded='true'] { border-color: var(--primary); }
.gy-kpchip .sch-caret { margin-left: 1px; font-size: 11px; color: var(--ink-2); }

/* 「通俗理解」是一句话，不是列表：和正文同一档字号，独立成段 */
.gy-plain {
  margin: 2px 0 0; font-size: 16px; line-height: 1.75; color: var(--ink);
  overflow-wrap: anywhere;
}
/*
 * 必考规定 / 关键区别 / 公式：三条都是「一条一行」的清单，
 * 圆点退成灰（和易错点同一套规矩 —— 红色只留给真正异常的东西，这里不是）。
 */
.sch-doc.day .gy-need.gy-rules > li,
.sch-doc.day .gy-need.gy-diff > li,
.sch-doc.day .gy-need.gy-fx > li { position: relative; padding-left: 13px; }
.sch-doc.day .gy-need.gy-rules > li::before,
.sch-doc.day .gy-need.gy-diff > li::before,
.sch-doc.day .gy-need.gy-fx > li::before {
  content: '·'; position: absolute; left: 0; top: 0;
  color: var(--ink-3); font-weight: 700;
}
.sch-doc.day .gy-need > li {
  margin: 0; padding: 0;
  font-size: 16px; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere;
}
/* 加粗 = 产品 richText() 认的 `**…**`：只有字重这一级，不加颜色 */
.sch-doc.day .gy-need > li b { font-weight: 700; }
/* 坑的圆点在列表改成 flex 之后要自己画（原来靠 ::marker）
 * v102：圆点也退成灰（原来 #b42318）—— 标签既然是灰的，圆点还红着就是
 * 「同一段两个颜色」，而且红色没有真正退场。 */
.sch-doc.day .sch-kp-traps.gy-need > li { position: relative; padding-left: 13px; }
.sch-doc.day .sch-kp-traps.gy-need > li::before {
  content: '·'; position: absolute; left: 0; top: 0;
  color: var(--ink-3); font-weight: 700;
}

/* 卡底一行：v132 起只剩右下那颗「举一反三 ›」（蓝胶囊）
   —— 原来左边还有一颗「其余 N 条 ›解题方法」，那一段并进卡里之后它没有落点了，删掉。 */
.gy-links { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.gy-lk {
  appearance: none; border: 0; background: none; font: inherit;
  min-height: 44px; padding: 8px 2px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gy-lk:active { color: var(--ink); }
/*
 * 「练这个点」是这一行里唯一的动作（也是卡里唯一成「按钮」的东西）：
 * 蓝实心小胶囊，白字。眼睛只要认「实心蓝 = 能点」，不用再读一遍字。
 */
.gy-lk.drill {
  flex: none; min-height: 32px; padding: 0 13px; margin: 6px 0;
  border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700;
}
.gy-lk.drill:active { background: var(--primary-dark); }

/* ---- ② 解题方法：沿用**同一种框**（老板：「让用户更好辨认」对方法页同样成立） ---- */
.sch-doc.day .sch-how,
.sch-doc.day .sch-type {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  box-shadow: none;
  margin-top: 0;
}
.sch-doc.day .sch-how + .sch-how,
.sch-doc.day .sch-type + .sch-type,
.sch-doc.day .sch-how + .sch-type,
.sch-doc.day .sch-type + .sch-how { margin-top: 10px; }
.sch-doc.day .sch-copy-sub-h { margin: 14px 0 6px; }
.sch-doc.day .sch-hows li { line-height: 1.75; margin-bottom: 5px; }
.sch-doc.day .sch-steps li { line-height: 1.7; margin-bottom: 5px; }
/* 「· 4 步」：方法卡标题后面那一点点信息，比名字小两档（设计稿的「化简求值 · 4 步」） */
.gy-steps-n { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/*
 * 卡里的「怎么解」（v132：解题方法并进知识点卡，全部展开）。
 *
 * 它接着「定义 / 易错点」往下排：同一个 16px 抄写档、序号用灰（序号是结构不是动作）。
 * 原来那一套「方法段收紧」是按 [data-panel='1'] 缩的（省首屏高度），
 * 现在它在卡里、和正文同级，就不再单独缩行了。
 */
.sch-doc.day .gy-how { margin: 2px 0 0; padding-left: 22px; }
.sch-doc.day .gy-how li { font-size: 16px; line-height: 1.75; margin-bottom: 5px; }
/* 「按题型」那几块在卡下面，和知识点卡同一个间距节奏 */
.sch-doc.day .gy-h2row + .sch-kp ~ .sch-copy-sub-h { margin-top: 16px; }
.sch-doc.day .subpage[data-panel='1'] .gy-exit { margin-top: 10px; }
/* 序号是结构、不是动作 ⇒ 灰 */
.sch-doc.day .sch-steps li::marker,
.sch-doc.day .sch-hows li::marker { color: var(--ink-2); }
/* 方法卡上的「这次 N 道」也退成灰字（原来是一枚蓝胶囊） */
.sch-doc.day .sch-type-c,
.sch-doc.day button.sch-type-c { color: var(--ink-3); background: transparent; padding-left: 0; padding-right: 0; }
/* 题型字母（A / B / C）原来是一枚蓝圆点：它是分块标记，不是动作 ⇒ 灰底深灰字 */
.sch-doc.day .sch-type-k { background: #eef1f6; color: var(--ink-2); }
/* 「在哪一节」这个小标签原来是主色蓝：它是导航信息，不是动作 ⇒ 灰 */
.sch-doc.day .sch-kp-s b { color: var(--ink-3); }

/* 方法段末尾的出口：看完方法，直接按这个方法练 */
.gy-exit {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px;
  margin-top: 12px; padding: 0; border: 0; border-top: 1px dashed var(--line);
  background: none; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gy-exit .t { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.gy-exit .g { flex: none; font-size: 12.5px; font-weight: 700; color: var(--primary); }
.gy-exit:active .g { color: var(--primary-dark); }

/* ---- ③ 举一反三：这一批只有占位（出题接口下一批上线） ---- */
.gy-ph {
  background: var(--card); border: 1px dashed #c9d6ea; border-radius: 14px;
  padding: 18px 14px; text-align: center;
}
.gy-ph-t { font-size: 15px; font-weight: 700; color: #16233a; }
.gy-ph-s { margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.gy-ph-b { margin-top: 13px; width: 100%; }
/*
 * 两颗按钮一行（2026-11-30）：「出选择题」+「练这 N 个一起」。
 * 左边那颗是白底 + 一条线（描边），不加新颜色；右边那颗仍是原来的 ghost 样式，
 * 只是从占满一行变成和左边平分一行。390 上也要在同一行里，不换行。
 */
.gy-ph-row { display: flex; gap: 8px; margin-top: 13px; }
.gy-ph-row .gy-ph-b { flex: 1 1 0; width: auto; min-width: 0; margin-top: 0; white-space: nowrap; }
.gy-ph-choice { background: var(--card); border: 1.2px solid var(--line); color: var(--ink-2); }
.gy-ph-n { margin-top: 9px; font-size: 11.5px; color: var(--ink-3); }
/*
 * ★ v151：「看之前的练习 ›」—— 12px 灰字 + ›，和「怎么解 ›」「其余 2 条 ›」同一款。
 *
 * 老板的原话：「举一反三，我做完后，不小心退出了，做完的题目在哪里找？不存在了吗？」
 * 题没丢（每道题的作答都落了库），但入口原来只在错题本页 —— 他从巩固页出的题，
 * 退出之后想不到要去错题本找，于是以为题没了。
 *
 * 纪律：不加颜色、不加底色、不加边框（老板这两天连着在减色块）；
 * 只在「还没出题」那一屏出现（出题之后那一段被题卡占满，再挂一行字只是噪音）。
 * 整行就是一个按钮：一行 12px 灰字高约 16px，热区用 ::after 补到约 34px。
 */
.gy-ph-recall {
  position: relative;
  display: block;
  margin: 6px auto 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gy-ph-recall::after { content: ''; position: absolute; inset: -9px -8px; }
.gy-ph-recall:active { color: var(--ink); }
.gy-empty { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }

/* 空的题图槽：.sch-tiles 自带 display:grid，会盖过 [hidden]，这里钉死 */
.sch-tiles[hidden] { display: none; }

/* 底部那条「练这 N 个一起 · M 道 ›」：v102 起是**一条细线**，不是蓝色大按钮
 *
 * 老板：「巩固页面最下方『练这 1 个知识点 2 道』这个蓝色的框，我觉得有些多余啊，
 *        而且很抢眼球」。
 * 所以：1 个知识点时**不渲染**（见 stats.js 的 dayBarHtml）；≥2 个才出现，
 * 而且退成一行 12.5px 灰字 + 一个 ›，白底 1px 描边、高 36px —— 整屏唯一的蓝
 * 只剩每个知识点框里那颗「练这个点」。
 *
 * ⚠️ 视觉高 36px（≤40 是老板给的线），可点区域用 ::after 补到 48px 高：
 *    项目里「手机上最小 44 可点」是硬线，视觉小不等于热区小（同 .gy-chip 的做法）。
 * ⚠️ 它不再是 .grade-act-bar（那套是「浮起的实心操作条」），所以打印那一条
 *    .no-print 的名单里要单独加上它（见下面 @media print 那一处）。
 */
.gy-day-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 40;
  max-width: 696px;
  margin: 0 auto;
}
.gy-day-bar-b {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(16, 32, 58, .06);
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* 视觉 36、热区 48：::{after} 上下各撑 6px */
.gy-day-bar-b::after { content: ''; position: absolute; inset: -6px 0; }
.gy-day-bar-b .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gy-day-bar-b .ar { flex: none; color: var(--ink-3); font-weight: 700; }
.gy-day-bar-b:active { background: #f4f7fc; color: var(--ink); }
/* 浮起的细条也会压住正文最后一截：这一页整体多让出一段 */
#page-stats { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* ══════════════════════════════════════════════════════════════════
 * 巩固页首屏收紧（v101）
 * ------------------------------------------------------------------
 * 老板的原话：「做减法 simple is more」+「孩子对举一反三评价很高，立刻抄下来练」。
 * 这一版只动首屏三件事：
 *
 *   ① 概况卡 ⇒ **一行小字**（`今天 · 数学 · 5 道错题 · 3 个知识点`）；
 *   ② 「一句话概况」不画了（内容每个知识点卡上都有）；
 *   ③ 「分析」那两张图（14 天趋势 + 掌握程度环）**不在这一页**了 ——
 *      趋势图这一版真的搬去了周练页（views/library.js），环图没有落点
 *      （周练页顶上的三格卡已经用数字说清了清掉几个 / 还剩几个反复）。
 *
 * 目的只有一个：390 × 844 下，顶部三段（seg）之下要**露出两张知识点卡**
 * （设计稿 screenshots-design/01-巩固-知识点-减法版.png 就是这样）。
 *
 * ⚠️ 概况那一行仍然是 <h1 class="sch-title">（语义没变），所以字号走三级里的 12；
 *    17px 那档会把首屏又吃掉 30px，而它只是「今天错了多少」的信息行。
 * ══════════════════════════════════════════════════════════════════ */
.sch-hero-line {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.sch-hero-line .sch-title {
  margin: 0;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}
/*
 * ★ v128：概况那一行**不再是 data-block="headline" 的一段**（它现在和「今天 ▾」
 * 并排在顶部那一行里，见 .gy-top）。所以这里既不需要那一段的分隔线，
 * 也不需要「切到解题方法/举一反三就把它收起来」那条规则 —— 那行是这一页的抬头，
 * 一直在（切段时页面也不会跳）。旧的 .sch-sec[data-block='headline'] 规则已删。
 */
/*
 * ③ 分析图这一版**不在这一页**了：趋势图搬去周练页、环图删了，巩固页的 DOM 里
 * 连「分析」那一整段都不再建（所以这里不需要任何 display:none —— 靠 CSS
 * 藏起来的那一版分不清「没显示」和「忘了删」，这条以后别再回来）。
 */

/* ---- 举一反三：出好的题卡（v101，和错题本同一套 .practice-item） ---- */
.gy-quiz-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
.gy-quiz-head .t {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #16233a;
}
.gy-quiz-head .n {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.gy-quiz-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}
.gy-quiz-s {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}


/*
 * 打印：三段的 seg 不印（纸上没有可点的东西），
 * 但**知识点 + 解题方法两段都要摊开** —— 孩子抄的是这两段，
 * 屏幕上停在哪一段不该决定纸上印什么（上一版是一整页铺开，纸上内容一点没少）。
 * 「举一反三」是练习，不印。
 */
@media print {
  #daySeg { display: none !important; }
  /* v128：顶部那一行（概况 + 期间 + ⟳）也不印：纸上没有可点的东西。
     概况那行不印没关系 —— 页头那张纸本来就有标题（.sch-title 在纸上照印会被拦掉，
     所以这里只藏右侧控件，保留标题文字）。 */
  #gyTopRight, #gyStatus { display: none !important; }
  .subpage[data-panel='0'] { display: block !important; }
  .subpage[data-panel='1'] { display: none !important; }
  .sch-doc.day { padding-bottom: 0; }
  /* 纸上的卡靠边框分界（不给底色和阴影，省墨、黑白打印也不糊） */
  .sch-doc.day .sch-kp,
  .sch-doc.day .sch-how,
  .sch-doc.day .sch-type { border: 1px solid #d5dbe6; box-shadow: none; break-inside: avoid; }
}

/*
 * 展开后那几格：切图缩略 + 题号 + 对错。
 *
 * 列数交给 auto-fill，下限 110px 是量出来的：430 的手机上排**三列**、
 * 360 的老人机上排两列。一行挤七八个格的排版在这一页是灾难 ——
 * 每一格都要能看清是第几题（这一整块存在的意义就是「哪几道」）。
 */
.sch-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 11px;
}
.sch-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  text-align: left;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button.sch-tile { cursor: pointer; }
button.sch-tile:hover { border-color: #c3d2ea; background: #fafbfe; }
button.sch-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sch-tile-img {
  display: block;
  width: 100%;
  /* 定高 + object-fit：不这样，每张图按自己的长宽比排版，整片格子会参差不齐 */
  height: 74px;
  object-fit: cover;
  background: #f4f6fb;
}
.sch-tile-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-3);
}
.sch-tile-q {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.sch-tile-s {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: #e5484d;
}
.sch-tile[data-state='partial'] .sch-tile-s { color: #b7791f; }
.sch-tile[data-state='right'] .sch-tile-s { color: #1a7f4b; }


/* ══════════════════════════════════════════════════════════════════
 * 交互式讲解（实验功能，默认关）
 *
 * 这一整段只在开关打开时才有用 —— 关着的时候错题详情里连入口的节点都没有，
 * 所以这些类名在正常使用下一条都匹配不到。
 * ══════════════════════════════════════════════════════════════════ */

/* ---- 错题详情里的第四行入口（和上面三行折叠长得一样） ---- */
.wd-int-row {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 14px; font-weight: 700; color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wd-int-row:hover:not(:disabled) { background: #fafbfe; }
.wd-int-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.wd-int-row:disabled { opacity: .6; cursor: progress; }
.wd-int-emoji { flex: none; font-size: 15px; line-height: 1; }
/*
 * 额度提示必须**在点之前**看得见：这一颗按钮点下去会花一次 AI 额度，
 * 而它长得和三行免费折叠一模一样。用户不会为了知道这一点去点一下试试。
 */
.wd-int-tag {
  flex: none;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: #f1f5f9; border-radius: 99px; padding: 2px 8px;
}

/* ---- 全屏走读层 ---- */
/*
 * z-index 1000：必须压过 .pwa-bar（900）。
 *
 * 这个坑项目里踩过一次（见上面那个 1500 的注释），这次又踩了一次：
 * 第一次写 120 时，走读层最上面那块「原题」正好被安装提示条盖住 ——
 * 而那一块是这个功能的要紧处（孩子翻到第 6 步还要能随时看到题）。
 * 走读是一个**专注阅读**的模式，上面压着一条「添加到主屏幕」本来就是错的。
 */
body.ix-open { overflow: hidden; }
.ix-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg, #eef2f9);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ix-top {
  position: sticky; top: 0; z-index: 3;
  display: flex; flex-direction: column;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(22, 32, 58, .06);
}
/*
 * 原题一直贴在顶上：这个功能里孩子会连翻七八屏，中途一定会想「题目到底怎么说的」。
 * 让他滚回去找题等于把他从讲解里拽出来 —— 那一页就白讲了。
 */
.ix-figure-btn {
  display: block; width: 100%; padding: 0; border: none; background: #fbfcff;
  cursor: zoom-in; max-height: 26vh; overflow: hidden;
}
.ix-figure-btn img { display: block; width: 100%; max-height: 26vh; object-fit: contain; }
.ix-figure-cap {
  font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 4px 0 6px;
}
.ix-figure-text {
  max-height: 26vh; overflow-y: auto; padding: 10px 14px;
  font-size: 13.5px; line-height: 1.65; color: var(--ink-2);
}
.ix-close {
  position: absolute; right: 8px; top: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(22, 32, 58, .18);
  font-size: 14px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}

.ix-wrap { max-width: 760px; margin: 0 auto; padding: 14px 14px 26px; }

.ix-head { padding: 2px 2px 10px; }
.ix-title { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.ix-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ix-bar { height: 6px; background: #dbe3ef; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.ix-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  border-radius: 99px;
  transition: width .32s cubic-bezier(.4, 0, .2, 1);
}

.ix-stage {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 20px;
  min-height: 210px;
}
.ix-stage.ix-enter { animation: ix-pop .3s cubic-bezier(.2, .9, .3, 1); }
@keyframes ix-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ix-step-t { font-size: 17px; font-weight: 700; margin: 0 0 8px; line-height: 1.5; }
.ix-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: 7px;
  border-radius: 8px; background: var(--primary-soft, #eef2ff);
  color: var(--primary-dark, #4f46e5); font-size: 13px; font-weight: 800;
  vertical-align: 1px;
}
.ix-lead { font-size: 14.5px; line-height: 1.8; margin: 10px 0; }
.ix-formula {
  background: #fbfcff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; margin: 12px 0; text-align: center;
  font-size: 15px; overflow-x: auto;
}
.ix-hint {
  font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
  margin: 10px 0 0; padding-left: 10px; border-left: 3px solid #e2e8f5;
}

/* ---- 选择题 ---- */
.ix-choices { display: grid; grid-template-columns: 1fr; gap: 9px; margin: 14px 0 0; }
.ix-choice {
  padding: 13px 14px; border-radius: 11px;
  border: 2px solid var(--line); background: #fff;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer; transition: .15s;
}
.ix-choice:hover { border-color: #a5b4fc; }
.ix-choice.good { border-color: var(--ok, #16a34a); background: #f0fdf4; color: #15803d; }
.ix-choice.bad { border-color: var(--danger, #dc2626); background: #fef2f2; color: #b91c1c; }
.ix-feedback {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 12px; padding: 11px 12px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.7;
}
.ix-feedback.good { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.ix-feedback.bad { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.ix-feedback.hidden { display: none; }
/*
 * 跳过答案之后的反馈：用中性的灰而不是绿色。
 * 绿色是「你想对了」的奖励色，而这一步他并没有想 —— 用绿色等于把跳过
 * 包装成一次成功，孩子下次会直接来点它。
 */
.ix-feedback.skipped { background: #f8fafc; border: 1px solid var(--line); color: var(--ink-2); }
.ix-skip-note { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); }

/*
 * 「先跳过，直接看答案」—— 灰字按钮，故意做成最轻的一个。
 *
 * 它是**退路**，不是第二条主路径：一旦它和选项长得一样重，孩子就会先点它，
 * 「先问再讲」那一环就白做了。所以不给底色、不给边框、字号比选项小一档。
 * 位置在选项和反馈下面（不在 .ix-choices 的格子里），不跟选项抢落点。
 */
.ix-skip {
  display: block;
  margin: 12px auto 0;
  padding: 6px 10px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ix-skip:hover { color: var(--ink-2); }

/* ---- 收口 ---- */
.ix-take { margin: 12px 0 0; padding-left: 20px; font-size: 14.5px; line-height: 1.95; }
.ix-take li { margin-bottom: 4px; }
.ix-end { display: flex; gap: 9px; margin-top: 18px; }
.ix-end .btn { flex: 1 1 0; }

/* ---- 底部导航（贴在屏幕下方，翻页不用往上找） ---- */
.ix-nav {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 9px 0 calc(9px + env(safe-area-inset-bottom, 0px));
  background: rgba(238, 242, 249, .95);
  backdrop-filter: blur(8px);
}
.ix-btn {
  padding: 10px 14px; border-radius: 11px;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink);
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.ix-btn.primary { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; border-color: transparent; }
.ix-btn:disabled { opacity: .4; cursor: not-allowed; }
.ix-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; flex: 1 1 auto; }
.ix-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1;
  cursor: pointer; transition: .18s;
}
.ix-dots i.done { background: #a5b4fc; }
.ix-dots i.on { background: var(--primary, #2563eb); transform: scale(1.35); }

/* ---- 二次确认（点下去要花一次额度，按钮上必须写清「生成」） ---- */
.ix-confirm-box { max-width: 420px; }
.ix-confirm-body { padding: 14px 16px 16px; }
.ix-confirm-t { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.ix-confirm-p { font-size: 13.5px; line-height: 1.75; margin: 8px 0; color: var(--ink-2); }

/* ---- 设置页「实验功能」那个勾选行 ---- */
.check-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 4px 0; cursor: pointer; font-size: 13.5px; line-height: 1.7;
}
.check-row input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); }

@media (max-width: 640px) {
  .ix-wrap { padding: 10px 10px 20px; }
  .ix-stage { padding: 14px 12px 16px; }
  .ix-title { font-size: 15.5px; }
  .ix-step-t { font-size: 15.5px; }
  .ix-figure-btn, .ix-figure-btn img { max-height: 20vh; }
  .ix-btn { padding: 9px 11px; font-size: 12.5px; }
  .ix-dots { gap: 5px; }
}


/* ==================================================================
 * 学情页：失败块 + 生成中的秒表（2026-10 加）
 *
 * ★ 为什么单独一套样式，而不是复用 .alert.danger
 *
 * .alert 是「一行提示」：它默认这一页别处还有正常内容。而这里的语义是
 * **整页唯一的结论**：正文一个字都没出来，用户需要在这里做决定
 * （重新生成 / 看原始数据）。所以它要更重：有标题、有原因、有两个按钮。
 *
 * ⚠️ 这块里不许出现「正在」字样（见 views/stats.js 的说明）——
 *    一旦出现，用户又分不清是卡住还是失败了。
 * ================================================================== */
.sch-err {
  background: var(--danger-soft);
  border: 1.5px solid #f7c9ca;
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.sch-err-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  color: #a92a2e;
}
.sch-err-h .ic { flex: none; }
.sch-err-s {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #7a2a2d;
}
.sch-err-code { margin-top: 8px; font-size: 12px; color: #a8676a; }
/* 短原因是**给人复制**的：整段可选，一眼能看出这是一段机器话而不是正文 */
.sch-err-code code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #fff;
  border-radius: 6px;
  padding: 1px 6px;
  color: #a92a2e;
  user-select: all;
  -webkit-user-select: all;
}
.sch-err-a { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.sch-err-raw {
  margin: 12px 0 0;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid #f0d4d5;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #4a5566;
  white-space: pre-wrap;
  word-break: break-word;
}
/* 秒表数字：等宽 + 不抢眼 —— 它是「还活着」的证据，不是主角 */
.sch-wait-n {
  color: var(--ink-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/*
 * 学情页：错因分布 + 参考口径（v23 追加，只在末尾加，不动上面的规则）。
 *
 * 为什么单独两个类：
 *   错因分布是**主角旁边的对账行**（几档加起来必须等于错题数），要看得清；
 *   批改账本口径是参考，必须比正文更弱 —— 用户上一版的困惑正是「它太抢眼」。
 */
.sch-mix {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.sch-mix-t { color: var(--ink-3); }
.sch-mix-i { white-space: nowrap; }
.sch-mix-i b { color: var(--ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.sch-mix-d { color: var(--ink-3); }
.sch-mix-sum {
  color: var(--ink-3);
  border-left: 1px solid var(--line, #e6e8ee);
  padding-left: 8px;
}
.sch-ref {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.sch-empty .sch-empty-s + .sch-empty-s { margin-top: 8px; }

/* ==================================================================
   批改记录（首页右上角 → 「批改记录」）
   ==================================================================
   一行 = 缩略图 + 三行字 + 右箭头。

   ## 为什么一行只有这些
   这一页是「找回刚才那份作业」，不是「读结果」。所以每一行只回答四个问题：
   哪一科 / 什么时候 / 对错几道 / 是哪张卷子（缩略图）。
   再多一个字都会让一屏少放两行，而用户往回翻的时候最需要的是**一屏多看几条**。

   ## 为什么缩略图是固定 54×68
   和错题本那套两列网格同一个道理：卡片高度必须可预测，一屏能放几条是算得出来的。
   这里按 3:4 的作业纸比例给一个竖框，图用 object-fit: cover 填满 ——
   整页图的长宽比各不相同，让它自己长会把行高撑得参差不齐。 */
.hist-day { margin-bottom: 2px; }
.hist-day-h {
  display: flex; align-items: baseline; gap: 8px;
  margin: 14px 2px 8px;
  font-size: 13.5px; font-weight: 800; color: var(--ink);
  letter-spacing: .2px;
}
.hist-day-h .cnt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

.hist-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0 0 8px;
  padding: 9px 12px 9px 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 32, 58, .04);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: .14s;
}
.hist-row:active { background: #f4f7fb; transform: scale(.995); }

.hist-thumb {
  position: relative;
  width: 54px; height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f8fc;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.hist-thumb-ph { color: #c3ccda; display: grid; place-items: center; }
/* 真图盖在占位图标上：图没加载/加载失败时露出的就是下面那个占位图标。
   ⚠️ 这里**不给 img 设 background**：设了的话，没 src 的 img 会画一块底色，
   把下面那个占位图标盖住 —— 手机上就成了一张"空白卡片"（看起来像图挂了）。 */
.hist-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hist-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hist-t {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hist-s { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hist-c { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; }
.hist-c .ok { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-c .bad { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-c .sum { color: var(--ink-3); }
.hist-go { color: #c3ccda; display: grid; place-items: center; }

.hist-more { margin: 4px 0 8px; }

/* 空态：一句话 + 一个「去批改」。按钮要显眼，因为这是这一屏唯一能做的事 */
.hist-empty .et { line-height: 1.7; }
.hist-empty-go { margin: 16px auto 0; max-width: 220px; }

/* ---------------- 学科网推题（设置页调试入口） ---------------- */
/*
 * 题干的 HTML 来自第三方，服务端已经洗过标签，但**排版**还得在这里收一下：
 *   · .q-stem 全局是 white-space: pre-wrap（给纯文本题干保留换行）；
 *     第三方 HTML 的标签之间本来就有换行，pre-wrap 会把它们原样显示成空白行；
 *   · 题干里的公式图可能很大，必须限宽，否则会把手机屏撑出去；
 *   · 表格是题干常见的排版（选项 A/B/C/D 一行一个），要给边框和行高。
 */
.xkw-q-stem,
.xkw-q .explain,
.xkw-q-answer { white-space: normal; }
.xkw-q-stem img,
.xkw-q .explain img,
.xkw-q-answer img { max-width: 100%; height: auto; }
.xkw-q table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.xkw-q td,
.xkw-q th { border: 1px solid var(--line, #e5e7eb); padding: 4px 6px; text-align: left; vertical-align: top; }
.xkw-kp:hover { background: rgba(47, 107, 255, 0.06); }

/* ==================================================================
   周测：按知识点出题（第一屏）
   ==================================================================
   页面只有一层卡片（今天练什么）；推回来的题在同一张卡片里往下长，
   所以题与题之间用一条极细的分隔线，不再给每道题包一层卡片 ——
   手机上一屏本来就只有两三道题，套两层盒子只会把内容挤出去。 */
.topic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
}
.topic-row:first-child { border-top: 0; }
.topic-row.off .topic-name { color: var(--ink-3); }
.topic-main { flex: 1; min-width: 0; }
.topic-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}
.topic-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.topic-reason {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #b5730a;
}
.topic-row .btn { flex: none; }

.pq-card { padding: 12px 2px; border-top: 1px solid var(--line); }
.pq-card:first-child { border-top: 0; }
.pq-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pq-card .q-stem { white-space: normal; }
.pq-card .q-stem img { max-width: 100%; height: auto; }
.pq-card table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.pq-card td, .pq-card th {
  border: 1px solid var(--line);
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}
.pq-answer { margin-top: 8px; }
.pq-answer > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pq-answer > summary::-webkit-details-marker { display: none; }
.pq-arrow { display: inline-block; transition: transform .15s; }
.pq-answer[open] .pq-arrow { transform: rotate(90deg); }
.pq-ans-body {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8faff;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.7;
}
.pq-ans-body .explain { background: transparent; padding: 0; margin-top: 8px; }

/* 两个折块：和主卡片一样宽，但**不是卡片** —— 里面才装内容，避免卡片套卡片 */
.lib-fold {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.lib-fold > summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.lib-fold > summary::-webkit-details-marker { display: none; }
.lib-fold > summary::before {
  content: '▸';
  flex: none;
  color: var(--ink-3);
  font-size: 12px;
  transform: translateY(-1px);
}
.lib-fold[open] > summary::before { content: '▾'; }
.lib-fold > summary .muted { font-weight: 400; }
.lib-fold-body { padding: 0 14px 14px; }

/* 知识点树：一行一个节点，缩进表示层级 */
.kp-tree {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 6px;
  -webkit-overflow-scrolling: touch;
}
.kp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 4px;
  border-radius: 7px;
  font-size: 13px;
}
.kp-row:hover { background: rgba(47, 107, 255, 0.06); }
.kp-exp {
  flex: none;
  width: 20px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.kp-exp-space { display: inline-block; }
.kp-name { flex: 1; min-width: 0; word-break: break-word; }
.kp-path {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.4;
}
.kp-push { flex: none; padding: 4px 9px; font-size: 12px; border-radius: 8px; }

/* ==================================================================
   日结页顶部状态条（v40）
   ==================================================================
   这一页被抛弃的真正原因不是「生成得慢」，是「等的时候页面上什么都没有」。
   所以状态条要同时干三件事：
     · 有最新那份 ⇒ 只写一行日期（「今天（11 月 8 日）」），**不给按钮**；
     · 只有上一次那份 ⇒ 写清那是哪一天 + 一个按钮 + 「约需 15 秒 · 用 1 次额度」，
       让用户点之前就知道要等多久、花几次；
     · 点下去之后 ⇒ 按钮上的秒数每秒 +1，**下面那份内容不动**；
       失败时这里多一条紧凑的错误条，下面那份内容仍然不动。

   为什么不是一整张卡：它是一条状态，不是内容。给它边框和底色只为了让
   「这不是正文、是新旧/等待状态」一眼分开；正文仍然是那张白纸上的分隔线。
   ================================================================== */

.sch-gen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 2px;
  padding: 10px 12px;
  border: 1px solid #f0dcb8;
  background: #fffaf0;
  border-radius: 12px;
}
/* 最新那份：它不需要被注意到，只要能让用户确认「这是今天的」 */
.sch-gen[data-kind='fresh'] {
  margin: 8px 0 0;
  padding: 0 2px;
  border: 0;
  background: none;
}
.sch-gen-t { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sch-gen-h { font-size: 14.5px; font-weight: 700; color: #16233a; line-height: 1.5; }
.sch-gen-b { flex: none; }
/* 生成中按钮是 disabled 的：别让它褪成灰色，秒数还得看得清 */
.sch-gen[data-kind='generating'] .sch-gen-b[disabled] { opacity: 1; cursor: default; }
/*
 * 秒数长在按钮**里面**（「正在生成…（已等 N 秒）」）—— 它必须用按钮自己的字色。
 * 沿用 .sch-wait-n 那个灰色在浅蓝按钮上几乎看不见，用户就只看到一对空括号
 * （「已等  秒」），那正是「它还活着」这条信息丢掉的地方。
 */
.sch-gen-b .sch-wait-n { color: inherit; font-weight: 700; }
.sch-gen-s { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }
.sch-gen-err {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fef3f2;
  font-size: 12.5px;
  line-height: 1.55;
  color: #b42318;
}

/* ==================================================================
   巩固页顶部（v128）：seg 在最顶 · 一行概况 + 右侧期间 · 重新生成缩成一颗 ⟳
   ------------------------------------------------------------------
   老板：「顶部绿框的这个区域，我觉得很多余，应该把知识点、解题方法、举一反三
   这个放在顶部。选择日期和这个绿框的功能放在右上角某个区域就可以了。
   主要的功能区还是要做主功能，不要喧宾夺主」。

   于是这一屏的竖向顺序变成：
     seg（最顶，紧贴顶栏） → 一行概况 + [今天 ▾][⟳] → 一、知识点 → 卡片
   原来那 200px（期间一行 + 两行说明 + 大蓝按钮 + 额度提示）收成**一行**。
   ================================================================== */
.gy-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 8px;
  min-height: 28px;
}
.gy-top-l { flex: 1 1 auto; min-width: 0; }
/* 右半格：期间按钮 +（stale 时）一行灰字「有新作业 · 重新生成」+ 那颗 ⟳ */
.gy-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 期间按钮在右半格里仍是「一行小字里的胶囊」：别让它把这一行撑高 */
.gy-right > .sch-bar { margin: 0; width: auto; }
.gy-right > .sch-bar .sch-pick { padding: 4px 10px; line-height: 1.3; }
/* 生成中 / 失败时那一行小字：在概况行**下面**，不挤概况 */
/*
 * ★ v151：stale 那条紧凑生成条独占的那一行（在概况行下面）。
 * 它只有一行 12px 灰字 + 那颗 28px 的 ⟳，所以行高就是 28px；
 * 上边 -2px 是为了不让它把概况行和大标题之间撑出两道空。
 */
.gy-gen-row {
  display: flex;
  align-items: center;
  margin: -2px 0 8px;
}
.gy-status:empty { display: none; }
.gy-status { margin: -2px 0 8px; }
.gy-status-wait { font-size: 12px; color: var(--ink-3); }

/* ---- 紧凑形态的生成条：一行灰字「有新作业 · 重新生成」+ 一颗小图标 ---- */
.sch-gen-mini {
  position: relative;
  display: flex;
  /* ★ v151：基类 .sch-gen 是 column（大按钮那一屏两行文案要竖着排），
     紧凑形态必须显式改回 row，否则「一行灰字 + 那颗 ⟳」会被摆成两行。 */
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}
/* 视觉 28px；热区靠 ::after 补到 44（项目里「最小 44 可点」是硬线） */
.sch-gen-icon {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sch-gen-icon::before {
  content: '⟳';
  font-size: 15px;
  line-height: 1;
}
.sch-gen-icon::after { content: ''; position: absolute; inset: -8px; }
.sch-gen-icon:active { background: #f4f7fc; }
.sch-gen-icon:disabled { opacity: .7; cursor: default; }
/* 按钮里那句话只给读屏和测试看：视觉上换成 ⟳ 那个字形 */
.sch-gen-lbl {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* 生成中：图标转起来（大按钮那一屏仍然是「已等 N 秒」的数字） */
.sch-gen[data-kind='generating'] .sch-gen-icon::before { animation: gy-spin 1.1s linear infinite; }
@keyframes gy-spin { to { transform: rotate(360deg); } }
/*
 * ★ v151：stale 时那一行「有新作业 · 重新生成」（原来是一个 2px 的小圆点）。
 *
 * 老板的困惑是「是不是要选日期、再点重新生成，这一页才会更新？」——
 * 他没看见那个圆点，也就没意识到手上这份漏了新作业。
 *
 * 所以这一行**只有 12px 灰字**：不加颜色、不加底色、不加边框，也不换行；
 * 行高 12 x 1.35 ≈ 16px（要求不超过 20px）。点它和点旁边那颗 ⟳ 是同一个动作。
 */
.sch-gen-new {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* 热区补一圈（视觉仍然只是那一行字） */
.sch-gen-new::after { content: ''; position: absolute; inset: -6px -6px; }
/*
 * 只在 stale 时才出现：生成中（图标在转）和失败（一条错误条）都不显示这一行 ——
 * 点过之后它还写着「重新生成」，会让人以为刚才那一下没生效。
 */
.sch-gen[data-kind='generating'] .sch-gen-new,
.sch-gen[data-kind='fail'] .sch-gen-new { display: none; }
.sch-gen-mini .sch-gen-err { margin-top: 6px; }

/* ==================================================================
   日结页：概况卡 + 旁证折块（v38）
   ==================================================================
   用户的原话：「打开时候默认的是出现一堆文字，对于一个陌生用户或者小孩子来说，
   可能会直接忽略这个界面」。

   所以第一屏只留两样：三个数字、一句话。
   （v40 把「让孩子抄这 N 条」那颗按钮删了 —— 用户说「完全是多余」，
     它只是滚到下面同一段内容；删掉之后卡片高度跟着收，不留空白。）

.sch-hero {
  margin: 12px 0 2px;
  padding: 14px 14px 12px;
  background: #f7f9ff;
  border: 1px solid #e8eefc;
  border-radius: 14px;
}

/* 它长在「一句话」那一段里面：那一段自己的分隔线要去掉（卡自己就是一块） */
.sch-sec[data-block='headline'] {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

/* 一行三个数字。等宽数字 + 大字号：扫一眼就知道是几 */
.sch-kpis { display: flex; align-items: stretch; }
.sch-kpi {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 6px;
  border-left: 1px solid #e2e9f7;
}
.sch-kpi:first-child { border-left: 0; }
.sch-kpi b {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: #16233a;
  font-variant-numeric: tabular-nums;
}
.sch-kpi span {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
/*
 * 「今天错题涉及的知识点」比原来那五个字长一倍，`nowrap` 会让它顶出格子
 * （页面就会出现横向滚动条）。这一格允许折成两行，其它两格仍然一行。
 */
.sch-kpi.is-wide span { white-space: normal; line-height: 1.25; text-align: center; }
/*
 * 「那一天的」数字弱一档：今天一个数都没有，把上一次的数字写得一样重，
 * 用户会以为那就是今天的账。
 */
.sch-kpis.is-muted .sch-kpi b { color: var(--ink-2); }
.sch-kpis.is-muted .sch-kpi span { color: #9aa5b5; }

.sch-hero-k { font-size: 17px; font-weight: 800; color: #16233a; line-height: 1.4; }
.sch-hero-last { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.sch-hero .sch-kpis { margin-top: 11px; }
/* 一句话：在卡里改成「上面一根分隔线」，左边那根主题色竖线留给正文里的用法 */
.sch-hero .sch-headline {
  margin: 12px 0 0;
  padding: 11px 0 0;
  border-left: 0;
  border-top: 1px solid #e2e9f7;
  font-size: 14px;
}
.sch-hero .sch-kpis + .sch-headline { margin-top: 11px; }
.sch-hero-guide { margin: 9px 0 0; font-size: 13px; line-height: 1.75; color: var(--ink-2); }

/* 主按钮：整行宽、拇指够得着 */
.sch-hero-btn { display: flex; width: 100%; margin-top: 12px; }
/* 卡片底部那行小字：它是「去核对」的入口，不是主操作 */
.sch-hero-proof {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.sch-hero-proof:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------------- 旁证折块 ----------------
   三段小字（错题本口径 / 错因分布 / 批改账本口径）本来就不该在第一屏抢位置：
   它们是「这些数字是怎么来的」的凭据，要看的人点一下，不看的人少读三行。
   写法跟着 .lib-fold（项目里已有的一套折块样式），箭头用 CSS 画，不用图标字体。 */
.sch-proof {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.sch-proof > summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sch-proof > summary::-webkit-details-marker { display: none; }
.sch-proof > summary::before { content: '▸'; flex: none; font-size: 11px; }
.sch-proof[open] > summary::before { content: '▾'; }
.sch-proof > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sch-proof-b { padding-top: 6px; }
/* 展开后那三行仍是原来的样子（字号/颜色一个都不改口径），只是不再压在第一屏 */
.sch-proof-b .sch-read { margin-top: 6px; }

/* ---------------- 周测：出一套卷子（v42） ----------------
   这一页的主路径是「选科目 → 勾知识点 → 生成 → 打印」，
   所以第一屏只放这一张卡，不再有说明卡/订阅式的提示。 */

/* 卡里的小标题行：知识点 + 已选 N/10 */
.paper-kp-head {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 2px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.paper-kp-head .tag { margin-left: auto; }

/* 一行一个知识点：勾选框 + 名字 + 这周错了几次（次数靠右，扫一眼就知道轻重） */
.paper-kp {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 2px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.paper-kp:first-child { border-top: 0; }
.paper-kp input { width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.paper-kp-name { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.paper-kp-count { flex: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.paper-kp.on .paper-kp-name { font-weight: 600; color: var(--primary-dark); }

/*
 * 题数 / 难度两个选项行。
 *
 * 复用卷子工具栏的 .seg-mini 分段控件（同一套视觉，不新造一种按钮）：
 * 这两个都是「一次选一个、选项都看得见」的参数，下拉框反而要多点一下。
 */
.paper-fixed {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; padding: 10px 12px;
  background: #f5f8ff; border-radius: 10px;
  font-size: 12.5px; color: var(--ink-2);
}
.paper-fixed > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.paper-fixed-label { color: var(--ink-3); }
.paper-fixed .seg-mini button { padding: 5px 12px; }
.paper-fixed .seg-mini button.on { color: var(--primary-dark); }

/* 学科网知识点树：勾选框在叶子上，父节点只负责展开 */
.kp-check { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.kp-check input { width: 17px; height: 17px; flex: none; accent-color: var(--primary); }
.kp-check.is-group { cursor: default; }
.kp-dot { width: 17px; flex: none; }

/* 我组过的卷子：一行一份，日期 + 科目 + 知识点数/题数/满分 */
.pb-row {
  display: block; width: 100%;
  text-align: left; font-family: inherit;
  padding: 11px 4px;
  border: 0; border-top: 1px solid var(--line);
  background: transparent; color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pb-row:first-child { border-top: 0; }
.pb-row:active { background: rgba(16, 32, 58, 0.04); }
.pb-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pb-date { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pb-subject { font-size: 12.5px; color: var(--ink-2); }
.pb-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }

/*
 * 历史里每个知识点的「上次 → 这次」。
 *
 * 缩进一档、字号更小：它是对上面那一行的解释，不该和日期抢同一层视觉。
 * 三列（名字 / 对比 / 箭头）在手机上放得下 —— 名字太长会被省略号截断，
 * 而箭头和分数永远看得见：那两个数是这一行唯一的结论。
 */
.pb-kps { display: block; margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); }
.pb-kp { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 1px 0; font-size: 11.5px; }
.pb-kp-name { color: var(--ink-2); max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-kp-cmp { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-kp-d { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pb-kp-d.up { color: var(--success); }
.pb-kp-d.down { color: var(--danger); }
.pb-kp-d.flat { color: var(--ink-3); }

/*
 * 卷子详情里的「按知识点得分」（.no-print，不会被打进纸里）。
 * 和纸面排版分开看：纸面是给孩子做的，这一块是家长回看用的。
 */
.paper-score { margin-bottom: 10px; }
.paper-score .ps-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--ink);
}
.paper-score .ps-total { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.paper-score .ps-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 5px 0; border-top: 1px solid var(--line); font-size: 12.5px;
}
.paper-score .ps-name { flex: 1; min-width: 40%; color: var(--ink-2); }
.paper-score .ps-now { color: var(--ink); font-variant-numeric: tabular-nums; }
.paper-score .ps-now b { font-size: 14px; }
.paper-score .ps-prev { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.paper-score .ps-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.paper-score .ps-delta.up { color: var(--success); }
.paper-score .ps-delta.down { color: var(--danger); }
.paper-score .ps-delta.flat { color: var(--ink-3); }
.paper-score .ps-note { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }


/* 卷面上「第 N 题 · 分值」那一行：题号靠左、分值靠右 */
.pq-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 2px;
}
.pq-head .pq-no { margin-right: 0; }
.pq-score { flex: none; font-weight: 700; white-space: nowrap; }
.pq-kind { font-size: 11.5px; color: #5b6b85; margin-bottom: 2px; }

@media print {
  .pq-kind { color: #5b6b85; }
}

/* ==================================================================
 * 在手机上做（v47）：一次只给一题
 *
 * 这一屏和打印预览共用同一个覆盖层，但两件事的排版目标相反：
 * 纸面要「一页装下所有题」（省纸、能整体翻看），手机要「一屏只装一题」
 * （拇指够得到、不会做漏）。所以这里不复用 .paper 的字号，单独一套尺寸。
 * ================================================================== */
.mq {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.mq-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.mq-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* 进度做成胶囊：这一屏唯一的「还剩多少」信号，必须一眼找到 */
.mq-progress {
  flex: none;
  font-size: 13px; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 3px 10px; border-radius: 20px;
}

.mq-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.mq-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.mq-stem {
  font-size: 15px; line-height: 1.8; color: var(--ink);
  overflow-wrap: anywhere;
}
.mq-stem p { margin: 0 0 8px; }
.mq-stem img { max-width: 100%; height: auto; }

/* 填空 / 解答：说清「为什么不在手机上做」，并指回拍照批改那条路 */
.mq-paper-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px; padding: 12px;
  background: var(--warn-soft);
  border-radius: 12px;
  font-size: 13.5px; line-height: 1.6; color: #8a5a00;
}
.mq-paper-note svg { flex: none; margin-top: 1px; }

/* 选项：整行可点（手机上点小圆圈太难），选中就整行变色 */
.mq-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.mq-opt {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; text-align: left;
  font-family: inherit; font-size: 14.5px; line-height: 1.6;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe; color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mq-opt:active { transform: scale(.99); }
.mq-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.mq-opt-dot {
  flex: none; width: 18px; height: 18px; margin-top: 2px;
  border-radius: 50%; border: 2px solid #b9c6dc; background: #fff;
}
.mq-opt.on .mq-opt-dot { border-color: var(--primary); box-shadow: inset 0 0 0 4px var(--primary); }
.mq-opt-letter { flex: none; font-weight: 700; color: var(--primary-dark); }
.mq-opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* 题干是服务端洗过的 HTML 时，选项已经在题干里，这里只给字母按钮 */
.mq-letters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mq-letter {
  flex: 1; min-width: 56px; height: 54px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: #fbfcfe; color: var(--ink-2);
  font-family: inherit; font-size: 18px; font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mq-letter.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

/* 二次确认：贴在底部按钮上方，不弹模态 —— 弹层会盖住题面，孩子没法边看边改 */
.mq-confirm {
  margin-top: 14px; padding: 12px;
  background: var(--warn-soft);
  border: 1px solid #f3d39b;
  border-radius: 12px;
}
.mq-confirm.hidden { display: none; }
.mq-confirm-text { font-size: 13.5px; font-weight: 600; color: #8a5a00; }
.mq-confirm-btns { display: flex; gap: 8px; margin-top: 10px; }
.mq-confirm-btns .btn { flex: 1; }

.mq-foot { display: flex; gap: 8px; margin-top: 14px; }
.mq-foot .btn { flex: 1; }
.mq-foot #mqSubmit { flex: 0 0 34%; }

/* 作答时收起覆盖层左上角的返回和右上角的打印：
 * 返回会**不提示地**丢掉已选答案，而这一屏自己的「退出」会先确认。 */
#paperOverlay.mq-mode #paperOverlayBack,
#paperOverlay.mq-mode #paperOverlayPrint { display: none; }

/* ---- 交卷结果 ---- */
.mq-result-card {
  background: linear-gradient(135deg, #2f6bff, #1e4fd8);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.mq-result-title { font-size: 14px; opacity: .92; }
.mq-result-score { margin-top: 6px; font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.mq-result-score b { font-size: 38px; }
.mq-result-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.6; opacity: .9; }

/* 剩下几道要说清：「19/30」和「卷子共 100 分」不是同一件事 */
.mq-result-rest {
  margin-top: 12px; padding: 12px;
  background: var(--warn-soft);
  border-radius: 12px;
  font-size: 13px; line-height: 1.6; color: #8a5a00;
}

.mq-result-list {
  margin-top: 12px; padding: 4px 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mq-rrow {
  display: flex; align-items: baseline; gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.mq-rrow:first-child { border-top: 0; }
.mq-rno { flex: none; font-weight: 600; color: var(--ink); }
.mq-rmark { flex: none; font-weight: 800; font-size: 15px; }
.mq-rrow.right .mq-rmark { color: var(--success); }
.mq-rrow.wrong .mq-rmark { color: var(--danger); }
.mq-rrow.skip .mq-rmark { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.mq-rtext { flex: 1; min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }

.mq-exp {
  margin: -2px 0 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.mq-exp > summary {
  cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--primary-dark);
  -webkit-tap-highlight-color: transparent;
}
.mq-exp > summary::-webkit-details-marker { display: none; }
.mq-exp-body { margin-top: 8px; line-height: 1.8; overflow-wrap: anywhere; }

.mq-result-actions { display: flex; gap: 8px; margin-top: 14px; }
.mq-result-actions .btn { flex: 1; }

/* ==================================================================
   拍照页顶部的「科目」下拉 + 详情里的「改学科 / 改学段」
   ------------------------------------------------------------------
   两处都是「学科」这一件事的界面：上面是批之前用哪一科（默认上次的），
   下面是判错之后改哪一科。放在文件末尾而不是插进前面，是因为它们和
   旧样式没有任何继承关系 —— 插进中间只会让人以为改动了原来那几块。
   ================================================================== */

.subj-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.subj-bar-ico { font-size: 14px; line-height: 1; }
.subj-bar-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.subj-bar-select {
  flex: 1 1 110px;
  min-width: 0;
  max-width: 190px;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
}
.subj-bar-select:focus { outline: none; border-color: var(--primary); }
.subj-bar-hint { font-size: 11.5px; color: var(--ink-3); }

/* 详情里那一块：两排可点的学科/学段标签（.more-panel 负责底板和间距） */
.sg-box { gap: 6px; margin: 10px 0 12px; }
.sg-cap { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.sg-cap .muted { font-weight: 400; font-size: 11.5px; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sg-chip { padding: 5px 11px; font-size: 12.5px; }
.sg-note { font-size: 11.5px; line-height: 1.55; }
.sg-note:empty { display: none; }

/* ================================================================== */
/* 60 秒闯关（周测页顶部的入口卡 + 一屏游戏层）                          */
/* ================================================================== */

/*
 * 入口条（v62：从一张整卡缩成一行）。
 *
 * 为什么必须缩：它上面的三格卡要在一屏里放下「三格 + 进度条 + 本周变化 + 测一测」，
 * 而原来这张入口占了 150px 左右（大标题 + 说明 + 48px 按钮 + 上次那一行），
 * 结果「测一测」被挤到 top=1089.6（390×844 要滚 246px）。
 * 现在一行：⚡标题 · 一句说明（超宽省略）· 右边一颗小按钮，整条约 48px。
 *
 * 颜色和左边那道色条保留（它仍然是「玩」的入口，和下面两张「练 / 测」的卡分开），
 * 只把体量收掉。
 */
.game-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 12px 9px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), var(--card) 62%);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.game-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), #6aa6ff);
}
.game-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.game-card-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.game-bolt { font-size: 14px; line-height: 1; }
.game-card-sub {
  flex: 1 1 60px;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 一行放不下时才换到第二行，而且只有它自己一行（不挤标题） */
.game-card-last {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-start {
  flex: none;
  min-height: 32px;
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 9px;
}
/* 出不了题时的原因：最多两行（省略号），不把它自己撑成一块砖 */
.game-card-reason {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 4px 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*
 * 游戏层：一屏、不滚动。
 *
 * 三条一起才成立：
 *   ① 覆盖层 fixed + 100vh，自己 overflow:hidden；
 *   ② 中间那一列 flex:1 + min-height:0（少了 min-height:0，flex 子项会被内容撑高）；
 *   ③ 打开时把底下的 .app / .nav 直接 display:none —— 只给 body 加 overflow:hidden
 *      的话，底页仍然占着几千像素高度，document 的 scrollHeight 还是那么大。
 */
.game-overlay {
  position: fixed;
  inset: 0;
  /*
   * z-index 1200：必须压过「添加到主屏幕」那条提示条（.pwa-bar 是 sticky + 900）。
   * 踩过一次：覆盖层写在 200，游戏一开局就被那条提示条盖住顶栏，
   * 截图里看到的是「安装」按钮而不是倒计时 —— 而真实使用中孩子同样会看不到还剩几秒。
   * 仍然低于全屏看图（1500）和登录门（2000），那两层该盖住一切。
   */
  z-index: 1200;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  animation: fade .18s ease;
}
body.game-open { overflow: hidden; }
body.game-open .app,
body.game-open .nav { display: none !important; }

.game-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  padding-top: calc(11px + env(safe-area-inset-top, 0px));
  color: #fff;
  background: linear-gradient(135deg, #2f6bff, #1e4fd8);
}
.game-time {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.game-time-icon { font-size: 15px; }
.game-time b { font-size: 24px; line-height: 1; letter-spacing: .5px; }
.game-time-unit { font-size: 12px; opacity: .9; }
.game-combo {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  white-space: nowrap;
}
.game-combo:empty { display: none; }
.game-quit {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
}
.game-quit:active { transform: scale(.94); }

/* 最后 10 秒让秒数自己跳一下：只是 CSS，不引动画库 */
.game-overlay.urgent .game-time b { animation: gamePulse 1s ease-in-out infinite; }
@keyframes gamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.game-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px 6px;
  overflow: hidden;
}
.game-meta {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.game-total { font-weight: 400; color: var(--ink-3); }
.game-stem {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  /* 题干在卡片里垂直居中：高屏手机上那道题不会孤零零地贴在顶上，中间空一大片 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 17px;
  line-height: 1.72;
  overflow-wrap: break-word;
}
.game-stem.long { font-size: 15px; line-height: 1.62; }
.game-stem .katex { font-size: 1em; }
.game-answer-tip {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--danger);
}

.game-opts {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.game-opts.locked { pointer-events: none; }
.game-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 32, 58, .05);
  transition: transform .1s, border-color .12s, background .12s;
  overflow-wrap: break-word;
  word-break: break-word;
}
.game-opt:active { transform: scale(.975); }
.game-opt-label {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}
.game-opt-text { flex: 1; min-width: 0; }
.game-opt.right {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}
.game-opt.right .game-opt-label { background: var(--success); color: #fff; }
.game-opt.wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}
.game-opt.wrong .game-opt-label { background: var(--danger); color: #fff; }
.game-opt.dim { opacity: .45; }

.game-foot {
  flex: none;
  padding: 7px 14px calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--card);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.game-foot.flash.ok { color: var(--success); font-weight: 800; }
.game-foot.flash.bad { color: var(--danger); font-weight: 800; }

/* 加载 / 出错 / 结束：三种「没有题目可答」的画面共用一套居中排版 */
.game-loading,
.game-problem,
.game-done {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  text-align: center;
  overflow: hidden;
}
.game-loading-bolt { font-size: 40px; line-height: 1; }
.game-loading-text { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.game-done-bolt { font-size: 38px; line-height: 1; }
.game-done-score { font-size: 17px; color: var(--ink-2); }
.game-done-score b {
  font-size: 44px;
  line-height: 1;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.game-done-cmp { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.game-done-cmp.up { color: var(--success); }
.game-done-cmp.down { color: var(--danger); }
.game-done-cmp.first { color: var(--ink-3); font-weight: 600; }
.game-done-counts { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.game-done-kp {
  max-width: 100%;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: break-word;
}
.game-done-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.game-done-actions .btn { min-height: 48px; min-width: 120px; }

/*
 * 出题失败：这一块**留在游戏层里**，不把用户送回周测主界面。
 *
 * 用户报的 bug 是「点开始之后又回到了周测主界面」—— 根因是失败时整层被关掉了。
 * 所以这个画面上有两颗按钮：再试一次（原地重来）、回周测（**只有用户点了才退出**）。
 * 原因单独放进一块浅红底，占满宽度：它是一句可能有点长的人话
 * （「你还没有能练的知识点（错题本里的知识点还没匹配到学科网）」），
 * 挤在一行里会折成三行而看不出重点。
 */
.game-problem-bolt { font-size: 40px; line-height: 1; }
.game-problem-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.game-problem-reason {
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: break-word;
}
.game-problem-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.game-problem-actions .btn { min-height: 48px; min-width: 120px; }

/*
 * 「这次只有 N 道」：一句说明，不是错误。
 *
 * 60 秒闯关是游戏：凑不满 20 道时出 2 道也比「这次没能出题」好。
 * 所以这一行不标红、不占用失败页，只跟在「第 1 题 · 知识点」下面。
 */
.game-note {
  flex: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
}

/*
 * 换一个知识点：一列「题库里真的有题」的点。
 *
 * 每一条是整行按钮（名称 + 可出 N 道），因为用户此刻是从一张失败页点进来的，
 * 他要的是「挑一个能玩的」，不是再读一遍原因。
 */
.game-pick {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  text-align: center;
  overflow: hidden;
}
.game-pick-bolt { font-size: 38px; line-height: 1; }
.game-pick-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.game-pick-sub { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.game-pick-list {
  width: 100%;
  max-width: 340px;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.game-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 32, 58, .05);
}
.game-pick-item:active { transform: scale(.98); }
.game-pick-name { flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.game-pick-count { flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }

/* ---------- 「判得不对？」那一行小字（批改详情 / 错题本详情，v60） ----------
 *
 * 位置：解析那块的最下面。字号 11.8px、灰色、一行放得下 —— 它是一句提示，
 * 不是主按钮，所以不给背景、不加边框、不占主位；但它必须**看得见**：
 * 人工改判和手动编辑一直都在，用户不知道要用，等于没有。
 *
 * 做成整行宽的按钮（而不是 span）是为了能点：点它直接打开右上角那颗 ⋯ 菜单，
 * 不用用户自己去找。颜色用 --ink-3（项目里的次要文字灰），hover 时压深一档。
 */
.qa-fix-hint {
  display: block;
  width: 100%;
  margin: 12px 0 2px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11.8px;
  line-height: 1.55;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.qa-fix-hint:hover,
.qa-fix-hint:focus-visible { color: var(--ink-2); text-decoration: underline; }
.qa-fix-hint:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 2px; }
@media print { .qa-fix-hint { display: none; } }

/* ================================================================== */
/* 知识点三格（周测页顶部那张「本周清理进度」）—— MRD 6.1                */
/* ================================================================== */

/*
 * 这张卡有一条**硬验收线**：390×844 下，一屏内必须同时看到
 * 三格 + 进度条 + 本周变化 + 「测一测」，整卡高度 <= 480px。
 *
 * 所以这里的每个尺寸都是算出来的，不是随手写的：
 *   12（内边距）+ 18（标题行）+ 10 + 56（三格）+ 10 + 7（进度条）
 *   + 7 + 16（本周变化那行）+ 3 + 16（定义小字）+ 10 + 40（按钮）+ 12
 *   ≈ 217px，离 480 有一倍余量 —— 那个余量是留给字体放大和展开明细的。
 *
 * 三格**横排**是关键：竖排三行每行 70px 左右，会把按钮推下一屏（旧版 top=1089.6）。
 */
.kps-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 10px;
}
.kps-top { display: flex; align-items: center; gap: 8px; }
.kps-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.kps-scope {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
  background: #eef1f6;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/*
 * 2026-11-27：「全部 N 个知识点」改为**可点开**（MRD：数字必须能点开验证）。
 *
 * 它现在是一颗 button。默认外观和原来那颗 span 一样 —— 也就是说
 * 「看起来没变，但点得开」，这正是老板要的（不新增一个显眼的按钮，
 * 但每个数字都能核对）。
 */
button.kps-scope {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.5;
}
button.kps-scope:active { transform: scale(0.98); }
button.kps-scope[aria-expanded='true'] { background: #e3eaf7; color: var(--primary-dark); }

/* 点开「全部 N 个知识点」之后：按状态分组列出名字 */
.kps-all {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  max-height: 240px;
  overflow: auto;
}
.kps-all-g { margin: 6px 0 2px; }
.kps-all-g > b {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-right: 5px;
}
.kps-all-g > i {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
}
.kps-all-g > p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
  word-break: break-word;
}

/* 三格：一行三个，等宽 */
.kps-cells { display: flex; gap: 8px; margin-top: 10px; }
.kps-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  padding: 6px 9px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.kps-cell:active { transform: scale(.985); }
.kps-cell b { font-size: 21px; line-height: 1.15; font-weight: 800; }
.kps-cell span {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.kps-cell i { font-style: normal; font-size: 10px; opacity: .7; }
/* 已巩固：绿 */
.kps-cell.ok { background: var(--success-soft); border-color: #c9ecda; }
.kps-cell.ok b { color: var(--success); }
/* 待巩固：琥珀 */
.kps-cell.pend { background: var(--warn-soft); border-color: #f6e2c0; }
.kps-cell.pend b { color: #b5730a; }
/*
 * 反复：**灰紫、不用红**。
 * 遗忘是正常的，红色会把「曾经会过」读成「退步」，而这一格恰恰是在说
 * 这个点以前达标过（MRD 原则 5：不催、不指责）。
 */
.kps-cell.rep { background: #f6f4fc; border-color: #e3ddf4; }
.kps-cell.rep b { color: #6b5aa8; }
.kps-cell[aria-expanded="true"] {
  box-shadow: 0 0 0 2px rgba(47, 107, 255, .18);
  border-color: #b9cafc;
}

/* 分段进度条：绿 / 琥珀 / 灰紫 */
.kps-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef1f6;
  margin-top: 10px;
}
.kps-bar i { display: block; height: 100%; }
.kps-bar i.ok { background: var(--success); }
.kps-bar i.pend { background: var(--warn); }
.kps-bar i.rep { background: #a99ed6; }

.kps-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--ink-2);
}
.kps-foot span:first-child { font-weight: 600; }
.kps-foot-chg { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.kps-def { margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--ink-3); }

/* 展开的明细：默认 3 行 + 「看全部 N 个」 */
.kps-detail {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.kps-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 12px; }
.kps-row b {
  flex: none;
  max-width: 45%;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kps-row span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.45;
}
.kps-more {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 0;
  border: 0;
  border-radius: 9px;
  background: #f4f7fb;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.kps-more:active { background: #e9eff7; }

.kps-cta { margin-top: 10px; min-height: 40px; }
.kps-empty-t,
.kps-mid-t {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.kps-retry { margin-top: 8px; }

/* ==========================================================================
   v64 · simple is best
   --------------------------------------------------------------------------
   全站正文只留三级字号：标题 17 / 正文 14 / 辅助 12。
   两类例外保留原来的大小，它们是**一眼扫的数字**和**照着抄的内容**：
     · 概况卡 / 三格里的大数字（21~32px）
     · 解法步骤（>=15px）与知识点名（>=16px）—— 硬约束，抄写要凑近看
   除这两类，说明性文字一律收到三级里，不再有 11.5 / 12.5 / 13 / 13.4 混排。

   卡片内边距统一 16px（v64 是 14，v72 跟着竞品那版放到 16；原来还有 12 一档），
   行高统一 1.65。
   ========================================================================== */
.card,
.card.tight { padding: 16px; }
.card { line-height: 1.6; }
.sch-doc { line-height: 1.65; }

.card-title,
.sch-title,
.sch-h,
.home-sec-title,
.kps-title { font-size: 17px !important; }

.sch-headline,
.topic-name,
.q-stem,
.answer-line,
.sch-empty-t,
.kps-empty-t,
.kps-mid-t,
.et { font-size: 14px !important; }

.muted,
.hint-row .muted,
.entry-t2,
.sch-empty-s,
.sch-ref,
.home-empty-s,
.more-cap,
.topic-sub,
.kps-scope,
.kps-foot-chg,
.kps-row span,
.kps-cell span,
.kps-def,
.sch-hm,
.sch-kpi span,
.sch-doc-foot,
.sch-kp-note,
.sch-gen-s,
.sch-hero-proof,
.sch-meta,
.sch-read,
.sch-n,
.sch-link,
.sch-kp-c,
.sch-type-k,
.sch-type-c,
.sch-tile-q,
.sch-tile-s,
.sch-tile-noimg,
.sch-err-code,
.sch-gen-t,
.sch-proof > summary,
.sch-other,
.sch-wait-s,
.sch-gen-err,
.sch-hero-last,
.wd-sol-t,
.deep-block h5,
.deep-identify { font-size: 12px !important; }

/* 正文（这一页真正要读的那一层）：14 —— 原来 13 / 13.5 / 13.6 / 13.8 / 14.5 混排 */
.sch-doc .rep-kp-points li,
.sch-doc .rep-row,
.sch-doc .rep-closing,
.sch-err-s,
.deep-block,
.wd-sol-body,
.sch-pick,
.sch-hero-guide,
.sch-gen-h { font-size: 14px !important; }

/*
 * 抄写档：孩子要照着写进本子的内容（知识点名 / 结论 / 坑 / 解法步骤）统一 16。
 * 它们不能跟正文一样大 —— 抄的时候要凑近看；也不能高过页面标题（17）。
 */
.sch-kp-n,
.sch-type-n,
.sch-steps li,
.sch-kpt,
.sch-hows li,
.sch-kp-traps li { font-size: 16px !important; }

/* 「在哪一节」是导航，不是要抄的内容：比正文小一档，不抢「是什么」 */
.sch-kp-s { font-size: 14px !important; }

/* 「怎样算已巩固 ⓘ」：默认只有这一行字，点开才出现完整口径 */
.kps-def-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.kps-def-toggle:active { opacity: .6; }
.kps-def[hidden] { display: none; }
.kps-def {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f7fb;
  line-height: 1.6;
  color: var(--ink-2);
}

/* 首页错题本空态：一句小字，不再是一段说明 */
.home-empty-s { margin-top: 5px; color: var(--ink-3); }

/* 难度那行「只出较难的题 ⓘ」：口径点开才占一行（默认不显示） */
.diff-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; }
.diff-note > b { font-weight: 500; }
.diff-note > span[hidden] { display: none; }
.diff-note > span:not([hidden]) { flex-basis: 100%; line-height: 1.6; }
.diff-info {
  border: 0;
  background: none;
  padding: 0 2px;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.diff-info[aria-expanded="true"] { color: var(--primary-dark); }

/* ==========================================================================
   v130 · 顶栏整条删除（原 v66/v67 那一套已作废）
   --------------------------------------------------------------------------
   这里原来有 70 多行，在算「10 + 32 + 8 = 50px」，还给 padding-top 打过
   max(10px, env(safe-area-inset-top)) 的补丁、给标题旁的简介配过颜色。
   顶栏删掉之后这些规则全没有对象了，一起删；新的一套在文件末尾「v130」。
   ========================================================================== */

/* 头像：首字母圆形（没有图片资源，字体资源也一个都不引） */
.avatar-btn {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .15s;
}
.avatar-btn:active { transform: scale(.94); background: rgba(255, 255, 255, .34); }
.avatar-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .34); }

/* 头像面板：白色小卡，和「⋯」那层菜单同一个 pop-menu（贴按钮弹出） */
.pop-menu.profile-menu {
  width: 268px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.profile-menu .profile-who {
  font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.profile-sec + .profile-sec { margin-top: 12px; }
.profile-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.profile-kid-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.profile-field { display: block; margin: 0; }
.profile-field select { width: 100%; }
.profile-hint { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.profile-hint b { color: var(--ink-2); }
.profile-add {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}
.profile-add-row { display: flex; gap: 6px; margin-top: 8px; }
.profile-add-row input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
}
.profile-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #f7f9fc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.profile-link:disabled { opacity: .55; }


/* ==========================================================================
   APK / WebView 里隐藏左上角的返回箭头

   老板原话：「安卓客户端应该不需要这个按钮，这个按钮还占空间很不协调」

   但**只在 APK 里隐藏**：浏览器和 PWA 没有系统返回键，删了用户出不去这一页。
   判据在 app.js 末尾（壳注入 __DC_APP__ 优先，其次 Android WebView 的 "; wv" UA）。

   隐藏后 .sub-head 里只剩副标题，靠左对齐、高度由标题决定 —— 不留空白。
   ========================================================================== */
.dc-in-app .sub-back { display: none; }
.dc-in-app .sub-head { padding-left: 2px; }


/* ==========================================================================
   iOS「添加到主屏幕」引导（js/ios-guide.js）

   用户报的是「在 Safari 里根本找不到加到主屏这个操作」。真正的原因通常不是
   他瞎找，而是他**根本不在 Safari 里**（微信 / 飞书 / 钉钉的内嵌浏览器、
   或者 iOS 上的 Chrome），那些地方没有这一项，翻到底也翻不出来。

   所以这里有两种形态，都只有一个目的：让他知道自己该点哪里。

   ① .ios-guide-top —— 顶部一条 44px 的提示条（内嵌壳 / 非 Safari 浏览器）
      · 它在**文档流里**（.app 前面的兄弟节点），不是 fixed：fixed 会盖住
        顶栏和第一张卡，用户得先关掉才能用；
      · 高度锁死 44px（老板的硬要求：不许让首屏变高超过 44px）；
      · 浅黄底 + 深字，和下载页 /get 的微信提示同一个色系。

   ② .ios-guide-dock —— 底部一条可展开的引导（真 Safari、还没加过主屏）
      · 固定贴在**底部导航上方**（bottom 用 nav-h + 安全区算），
        所以它永远压不到导航栏，也不会压到 iPhone 那条小黑条；
      · 默认只有 44px 一条，点「看怎么做」才展开三步 ——
        不做全屏遮罩（用户正要用应用，一上来糊一层黑底会把人吓到）；
      · body.ios-guide-dock-on 会把内容底部再让开 44px，免得盖住最后一行。

   两条都不许出现在安卓 / 桌面 / 已经加到主屏的环境里（判据见 js/ios-guide.js）。
   ========================================================================== */

.ios-guide-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 4px 10px;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff5e6;
  border-bottom: 1px solid #ffd79a;
  color: #8a5200;
  font-size: 12.5px;
  line-height: 1.3;
}
.ios-guide-top .igt-ico { flex: none; display: flex; color: #c47b00; }
.ios-guide-top .igt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ios-guide-top .igt-title { font-size: 12.5px; font-weight: 700; color: #7a4700; }
.ios-guide-top .igt-tip { font-size: 11.5px; color: #8a5200; }
.ios-guide-top .igt-close {
  flex: none;
  width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(138, 82, 0, .1);
  color: #8a5200;
  font-family: inherit; font-size: 15px; line-height: 1;
  cursor: pointer;
}
/* 非 Safari 的完整浏览器：同一套版式，底色偏蓝一点，和「微信里」区分开 */
.ios-guide-top.is-browser { background: #eef4ff; border-bottom-color: #d3e0ff; color: #2b4a86; }
.ios-guide-top.is-browser .igt-ico { color: #2f6bff; }
.ios-guide-top.is-browser .igt-title { color: #1e3f7a; }
.ios-guide-top.is-browser .igt-tip { color: #2b4a86; }
.ios-guide-top.is-browser .igt-close { background: rgba(47, 107, 255, .1); color: #2b4a86; }

/* 320~360 的窄屏：字号缩一档，保证两行都还在一行里放得下 */
@media (max-width: 359px) {
  .ios-guide-top .igt-title { font-size: 11.5px; }
  .ios-guide-top .igt-tip { font-size: 11px; }
}

.ios-guide-dock {
  position: fixed;
  left: 8px;
  right: 8px;
  /* 贴在底部导航上方：导航高 nav-h + home indicator 的安全区，再留 8px 缝 */
  bottom: calc(var(--nav-h) + max(0px, env(safe-area-inset-bottom, 0px)) + 8px);
  max-width: 704px;
  margin: 0 auto;
  z-index: 40;
  font-size: 13px;
  color: var(--ink-2);
}
body.ios-guide-dock-on {
  padding-bottom: calc(
    var(--nav-h) + max(0px, env(safe-area-inset-bottom, 0px)) + 52px
  );
}

.ios-guide-dock .igd-bar {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 32, 58, .12);
  overflow: hidden;
}
.ios-guide-dock .igd-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ios-guide-dock .igd-bar-ico { flex: none; display: flex; color: var(--primary); }
.ios-guide-dock .igd-bar-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-guide-dock .igd-bar-more {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--primary);
}
.ios-guide-dock .igd-close {
  flex: none;
  width: 34px; height: 34px; margin-right: 5px;
  padding: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit; font-size: 16px; line-height: 1;
  cursor: pointer;
}

.ios-guide-dock .igd-panel {
  margin-bottom: 6px;
  padding: 12px 14px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 32, 58, .16);
  max-height: min(52vh, 320px);
  overflow-y: auto;
}
.ios-guide-dock .igd-panel.hidden { display: none; }
.ios-guide-dock .igd-head { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.ios-guide-dock .igd-steps { list-style: none; margin: 0 0 12px; padding: 0; }
.ios-guide-dock .igd-steps li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}
.ios-guide-dock .igd-step-ico {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}
.ios-guide-dock .igd-step-txt { flex: 1; min-width: 0; }
.ios-guide-dock .igd-ok { width: 100%; height: 38px; font-size: 14px; }

/*
 * 全屏任务态里把引导藏掉。
 *
 * 这些状态下页面底部/整屏本来就有一条自己的东西：闯关（game-open）把整个应用
 * 藏起来只留游戏层、交互式讲解（ix-open）铺满一屏、组卷层（overlay-open）
 * 是一整块面板、勾选组卷（picking / pick-zero / wrong-pick-on）会从底部升起
 * 一条操作条 —— 引导条和它们抢同一个位置，两条叠在一起谁都用不了。
 *
 * 用 CSS 藏而不是不挂载：用户退出这些状态后引导该回来（他还没看过），
 * 这时候如果节点已经没了，就再也不会出现了。
 */
body.game-open .ios-guide-dock,
body.game-open .ios-guide-top,
body.ix-open .ios-guide-dock,
body.overlay-open .ios-guide-dock,
body.picking .ios-guide-dock,
body.pick-zero .ios-guide-dock,
body.wrong-pick-on .ios-guide-dock {
  display: none !important;
}

/* ==================================================================
   批改结果：单页骨架（v107）
   ================================================================== */

/*
 * ## 这一页现在的样子（照豆包爱学 0:12 那一帧）
 *
 *   ┌──────────────────────────────┐
 *   │ 上半：原卷（整页缩进来，带 ✓✗）  │  ← .gs-paper
 *   ├──── 拖动条 ──────────────────┤
 *   │ 下半：详情（题号圆点 + 作答/    │  ← .gs-dock 那一层弹层
 *   │       判定/答案/解析）          │
 *   └──────────────────────────────┘
 *   │ 底部固定三件（再批一页 / 加错题本 / 问这道题）│ ← .grade-act-bar
 *
 * ## 为什么用「页面固定 + CSS 变量」而不是写死像素
 *
 * 面板高度是用户拖出来的（还存在本机），原卷那一栏必须**同步**变高变矮，
 * 否则两块会互相盖住。所以只有一个真值 --gs-sheet-h，页面和面板都读它。
 *
 * ## 为什么面板要停在操作条**上面**（bottom: --gs-bar-gap）
 *
 * 因为底部那三件是「永远在」的（老板的原话：底部永远三件）。面板要是铺到底，
 * 一拖高就把三颗按钮盖住了，而那正是上一版最难用的地方（要滚到最下面才找得到）。
 */
#page-grade.gs-mode {
  position: fixed;
  left: 0;
  right: 0;
  /*
   * v130：内容顶至少要让开浮层那 44px。
   *
   * 新页面（grade2.js）会把 --gs-top 写成「页盒子顶 + 44」；老页面（views/grade.js
   * 的 gsPageTop）写的是页盒子顶本身（顶栏删掉之后就是 0）。这里用 max 兜住两种：
   * 谁写 0 都不会把原卷顶到左上角那颗 ← 和右上角头像底下。
   * ⚠️ 44 和 .page 的 --top-edge 是同一个数（头像 36 + 上沿 8）。
   */
  top: calc(max(var(--top-edge, 44px), var(--gs-top, 0px)) + env(safe-area-inset-top, 0px));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  height: auto;
  display: flex;
  flex-direction: column;
  /* 两栏自己管滚动（原卷那栏 + 详情那栏），整页不再滚 */
  overflow: hidden;
  padding: 0 10px;
  background: var(--bg, #f3f5f9);
  z-index: 20;
  animation: none;
}
/*
 * v130：结果这一屏不再需要「把顶栏让出去」那两条了 —— 顶栏已经不存在。
 * 这一屏的内容顶由 grade2.js 的 --gs-top 决定（页盒子顶 + 44px 浮层让位），
 * 左上角那颗 ← 和右上角头像 / 齿轮都还在，路口没断。
 */
/* 科目条是「拍照前选这次按哪一科批」的控制，结果页里学科已经写在原卷栏上 */
#page-grade.gs-mode .subj-bar { display: none; }
/* v130：批改页的子页头已经整块撤掉（那颗 ← 改成了左上角浮层），不再需要收窄 */

#gradeResult.gs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ---- 上半：原卷 ---- */
.gs-paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 9px 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#gradeResult.gs .gs-paper {
  /* 面板多高，原卷就让出多少 —— 两个数只有一个是真值（--gs-sheet-h） */
  height: calc(100% - var(--gs-sheet-h, 0px) - var(--gs-bar-h, 0px));
  flex: none;
  margin-bottom: 0;
}
.gs-paper-head { flex: none; }
.gs-paper-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.gs-paper-row .card-title { font-size: 14px; }
.gs-paper-date {
  font-size: 11.5px;
  white-space: nowrap;
}
/* 统计行改成「一行紧凑」：它和原卷抢同一个上半屏，不能再像原来那样占两行 */
#gradeResult.gs .mark-stats {
  margin-top: 3px;
  padding-top: 3px;
  border-top: none;
  gap: 10px;
  font-size: 12px;
  justify-content: flex-start;
}
#gradeResult.gs .mark-stats b { font-size: 14px; }
.gs-paper-tip { font-size: 11.5px; color: var(--ink-3); }
.gs-paper-body {
  flex: 1;
  min-height: 0;
  margin-top: 4px;
  /*
   * 这里**不能用 flex 居中**：卷子比这一栏高的时候，align-items:center 会把
   * 顶部那块裁到滚动区外面（经典的 flex 溢出坑），用户往上滑也回不到第一题。
   * 所以就是普通块，横向居中靠 .marked-wrap 自己的 margin:0 auto。
   */
  display: block;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  background: #fafbfd;
}
.gs-paper-body .marked-wrap { flex: none; }

/*
 * 点题号圆点（或点原卷上那道题）⇒ 原卷那边**圈出这一块**。
 * 只画一圈发光边，不填色：底下的手写笔迹必须还能读（这张图是给人看的）。
 */
.gs-focus {
  position: absolute;
  pointer-events: none;
  border: 2.5px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .18), 0 0 18px rgba(47, 107, 255, .45);
  z-index: 9;
}
.gs-focus.pulse { animation: gsFocusPulse .7s ease-out 1; }
@keyframes gsFocusPulse {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}

/* ---- 下半：逐题列表（面板关着时它就是「结果页」本身） ---- */
#gradeResult.gs .gs-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 上面那栏已经圆角收口，这里不要再留一条白边 */
  padding-bottom: 2px;
  /*
   * 面板开着的时候，这一栏整块在面板背后 —— 但操作条和底部导航之间有十来像素
   * 缝，缝里能看见题卡的一行字（实测：底部三件下面露出一行解析）。
   * 所以这一栏在「面板开着」时不可见（visibility 而不是 display：节点、高度都还在，
   * 逐题卡片那套渲染和几何一律不受影响）。
   */
  visibility: hidden;
}

/* ---- 底部固定四件（v107 补的「转日结」）：390 宽一行放得下、不互相挤 ---- */
.grade-act-bar.gs-bar4 { gap: 5px; padding: 6px; }
.grade-act-bar.gs-bar4 .btn {
  height: 42px;
  font-size: 12px;
  /* 四颗挤一行，字距和左右留白都要收；标签统一压到 3~4 个字 */
  letter-spacing: 0;
  padding: 0 3px;
  gap: 2px;
  white-space: nowrap;
  min-width: 0;
  /* 万一以后有人把标签写长：宁可自己内部裁掉，也不许溢出到隔壁那颗上面 */
  overflow: hidden;
  text-overflow: ellipsis;
}
.grade-act-bar.gs-bar4 .btn.grow { flex: 1 1 0; }

/*
 * 「加入错题本」= 这一屏的主操作（老板点名要它突出）。
 * 未收录用品牌色实心；已收录变成浅绿的「✓ 已收录」—— 状态一眼看得出来，
 * 而且不再抢眼（这一刻该看的是「转日结」）。
 */
.grade-act-bar .btn.gs-add {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(47, 107, 255, .32);
}
.grade-act-bar .btn.gs-add:active { background: var(--primary-dark, #1f52d0); }
.grade-act-bar .btn.gs-added {
  background: #e8f7ee;
  color: var(--success);
  border: 1.5px solid #b7e3c8;
  font-weight: 700;
}

/*
 * 「转日结」= 豆包没有的那一步，老板要它**显著**。
 * 用和品牌蓝、灰、绿都分得开的琥珀色实心 + 更强投影：四颗并排时它是最先被看到的那颗，
 * 但颜色和「加入错题本」不同，不会互相抢。
 */
.grade-act-bar .btn.gs-daily {
  background: linear-gradient(135deg, #f7a41d, #ef8200);
  color: #3a2600;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(239, 130, 0, .38);
}
.grade-act-bar .btn.gs-daily:active { filter: brightness(.94); }
.grade-act-bar .btn.gs-daily:disabled { opacity: .5; }

/*
 * ⚠️ 原卷上的覆盖层（.mark-dot / .q-outline / .q-hit / .blank-mark / .blank-box）
 * 有几条自带 display（grid / inline-block），会盖过浏览器对 [hidden] 的默认样式。
 * 第 2 步要「先把标记藏起来、再一题一题显出来」，所以这里必须把 [hidden] 钉死。
 */
.marked-wrap [hidden] { display: none !important; }

/*
 * ---- 贴底那一版详情（.gs-dock） ----
 *
 * 和普通弹层的差别只有三处：位置贴底（高度由变量给）、上面留出原卷、
 * 顶上多一条能拖的把手。**里面的内容一模一样**。
 */
.modal-mask.gs-dock {
  top: auto;
  left: 0;
  right: 0;
  height: var(--gs-sheet-h, 62vh);
  bottom: var(--gs-bar-gap, calc(var(--nav-h) + 66px));
  background: transparent;
  /*
   * 关键：遮罩**不吃点击**。上半屏的原卷还要能点（点哪道题就换到哪道题），
   * 整块铺着的遮罩会把这件事挡死；而弹层自己 pointer-events:auto，
   * 面板上的每一下点击照样落在面板上。
   */
  pointer-events: none;
}
.modal-mask.gs-dock .modal {
  pointer-events: auto;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  padding: 0 14px 0;
  /* 面板自己顶到操作条上面，给底部三件让开 */
  box-shadow: 0 -8px 28px rgba(16, 32, 58, .18);
}
/* 这一层现在只管滚动（标题、把手、题号条都不动，只有正文滚） */
.modal-mask.gs-dock .modal > .gs-dock-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
}
.modal-mask.gs-dock .modal-head { flex: none; margin: 0 0 6px; }
.modal-mask.gs-dock .modal-head h3 { font-size: 15px; }

/* 拖动条：一条 22px 高的热区 + 中间那根 44×5 的小横条 */
.gs-grab {
  flex: none;
  height: 22px;
  margin: 0 -14px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.gs-grab:active { cursor: grabbing; }
.gs-grab i {
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #cfd7e3;
}
.gs-grab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px; }

/* 面板顶部那排题号：当前那颗**变大 + 实心**（老板点名要的那一下） */
.modal-mask.gs-dock .q-nav {
  margin: 0 -14px 8px;
  padding: 4px 14px 6px;
}
.modal-mask.gs-dock .q-nav-item { width: 32px; height: 32px; }
.modal-mask.gs-dock .q-nav-item.is-active { transform: scale(1.16); }

/* ==================================================================
   批改页第二版（v108 · grade2.js）
   ==================================================================
   这一版把「批改中」和「底部操作条」重新排了一遍，其余全部复用 v107 的样式：

   · 状态 B：原卷 + 逐题呼吸闪烁 + 逐题 ✓/✗ + 一行真实状态（不许百分比）
   · 底部：两行 —— 第一行三颗按钮，第二行一条长输入框（本题有不懂，随时问我）

   为什么底部改成两行：四颗按钮挤在 390 宽的一行里，字小到 12px 还是贴边；
   而「问一句」和那三颗根本不是同一类动作（一个是提问，三个是下一步去哪），
   挤在一行会让用户以为它也是「下一步」。分行之后主次一眼分得开。
   ================================================================== */

/* ---- 状态 B：一行真实状态（在扫描图下面） ---- */
.grading-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 22px;
  padding: 0 2px;
}
.gs-live {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}
.gs-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: gsLivePulse 1.1s ease-in-out infinite;
}
@keyframes gsLivePulse {
  0%, 100% { opacity: .3; transform: scale(.72); }
  50% { opacity: 1; transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .gs-live i { animation: none; }
}
.grading-hint {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.gs-reshoot {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  padding: 2px 4px;
  text-decoration: underline;
}

/*
 * 逐题呼吸闪烁：判完之前那一块一直在「呼吸」，判完立刻停、换成实线和 ✓/✗。
 * 只有 box-shadow / border-color 在动 —— 不动位置、不动尺寸，
 * 所以底下那张卷子一直能读（老板的红线：不许遮住原卷影响核对）。
 */
.scan-box.judging {
  animation:
    box-in .4s cubic-bezier(.2, .9, .3, 1) both,
    gsBreathe 1.7s ease-in-out infinite;
}
@keyframes gsBreathe {
  0%, 100% {
    border-color: rgba(130, 200, 255, .5);
    box-shadow: 0 0 5px rgba(130, 200, 255, .3), inset 0 0 6px rgba(130, 200, 255, .06);
  }
  50% {
    border-color: rgba(175, 222, 255, 1);
    box-shadow: 0 0 18px rgba(130, 200, 255, .85), inset 0 0 18px rgba(130, 200, 255, .2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scan-box.judging { animation: none; }
}
/* 判完的框可以点开先看（分层加载第 2 条：已判 5 题，可以先看） */
.scan-boxes .scan-box.done {
  pointer-events: auto;
  cursor: pointer;
}

/* ---- 底部：一行四件（v134：从两行 115px 压到一行 47px） ---- */
.grade-act-bar.gs-bar2 {
  display: block;
  padding: 5px 8px 6px;
}
.gs-bar-row {
  display: flex;
  gap: 6px;
}
.gs-bar-row .btn {
  height: 36px;
  font-size: 12px;
  letter-spacing: 0;
  padding: 0 4px;
  gap: 3px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
}
/*
 * 「问一问」：v134 之前它是一条占满整行的长输入框（38px + 一行提示）。
 * 老板要「大幅缩小」⇒ 它现在是第四颗小胶囊，浅蓝底和其他三颗分开 ——
 * 那是「提问」，不是「下一步去哪」。
 * 整句话「本题有不懂，随时问我」仍在按钮里（.sr-only + aria-label），
 * 读屏能读、长按有 tooltip，只是屏幕上不占宽度。
 */
.gs-bar-row .btn.gs-ask {
  background: #eef4ff;
  border: 1.5px solid #d3e0fb;
  color: #2456c8;
}
.gs-bar-row .btn.gs-ask:active { background: #e0ebff; }
.gs-bar-row .btn.gs-ask:disabled { opacity: .55; }
/* 读屏能读、屏幕上看不见（不给 display:none —— 那样读屏也读不到） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 「看错题本」——六件里那件，位置在统计行右端，不占一条 */
.gs-paper-link {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  padding: 2px 4px;
  white-space: nowrap;
}

/*
 * 详情标题右边那颗 ⋯ —— 必须 margin-left:auto。
 * .modal-head 是 justify-content:space-between，而这一版它有**三个**孩子
 * （标题 / ⋯ / 关闭），space-between 会把中间那颗摆到正中间，
 * 看着像「⋯ 飘在标题和关闭之间」。吃掉空白之后它就和关闭键并排了。
 */
.modal-mask.gs-dock .more-btn { margin-left: auto; }

/*
 * 面板拖到最矮那一档（还留着题号条）时，正文整块收起来。
 * 为什么需要：140px 只够拖动条 + 标题 + 题号条，正文会露出**半行**标签 ——
 * 那一截看着像渲染坏了。收起正文之后，「往下拖 = 只想看卷子」这件事就干净了；
 * 再往上拖一像素，正文自己回来（类由 applyHeights 摘掉）。
 */
.modal-mask.gs-dock.gs-min #sheetBody { display: none; }

/* ---- 详情面板里的新块 ---- */
.sheet-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.sheet-body { padding-bottom: 4px; }
.sheet-wait {
  font-size: 12.5px;
  padding: 8px 2px;
}
.sheet-sol { margin-top: 10px; }
.sheet-sol summary {
  cursor: pointer;
  font-size: 12.5px;
  list-style: none;
}
.sheet-sol summary::-webkit-details-marker { display: none; }
.more-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.more-note {
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 6px;
}
.gs-back-mini {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1;
  padding: 0 4px;
}

/* ==================================================================
 * v134：批改中那两颗浮钮 / 停下来那一屏的缩略图 / 多页翻页器
 *
 * 老板真机上那三句（2026-11-29）：
 *   ① 「批改页最下方那个区域纯粹多余，我要的是整个页面显示的是摄像机镜头批改
 *      + 继续拍，停止批改」⇒ 队列横条整条删掉，两颗按钮浮在取景图上；
 *   ② 「大幅缩小再批一页 / 已收录 / 转巩固和对话框所占的空间」⇒ 那四件压成
 *      一行 36px（见上面 .gs-bar-row 那一段）；
 *   ③ 「上面绿框部分删掉」⇒ 原卷抬头只剩一行：标题 / 科目 / 1-N 翻页器 / 错题本。
 * ================================================================== */

/* ---- ① v137：批改中整屏就是那张卷子（浮在图上那两颗已经删了） ---- */
/*
 * 老板 2026-11-30 的原话：「应该把整个批改界面平铺全，否则删掉也没有意义。
 * 另外那个继续拍和停止批改按钮放在这里都没有意义」。
 *
 * 所以批改中这一屏改成一块**固定满屏的取景台**：
 *   · 上沿让开顶栏浮层（--gs-top 和 --top-edge 取大，和结果页同一套），
 *     下沿停在底部导航上沿 —— 中间整块都是卷子，不再有底下一大片空白；
 *   · 卷子按舞台的可用尺寸等比放到最大（frame 的像素宽高由 grade2.js 的
 *     fitScan 写进来；框和激光长在 frame 上，所以 frame 必须**恰好等于图片**，
 *     不能让图片在 frame 里 contain 留白，那样框会整体偏）；
 *   · 图片只 contain、不 cover、不写死宽高：横拍竖拍都整张看得到，留白是正常的；
 *   · 下面只留一行状态，不占一大块。多张时状态行右边才有一颗小「停止」。
 *
 * ⚠️ 单张时页面上**没有**任何按钮（老板：「放在这里都没有意义」）。
 *    多张时那颗「停止」是低频动作，一小颗就够；停下来之后的落脚点是队列屏。
 */
#page-grade.gs-scan {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(max(var(--top-edge, 44px), var(--gs-top, 0px)) + env(safe-area-inset-top, 0px));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #0b1220;
  z-index: 20;
  animation: none;
}
/* 科目那行是拍照前选的，批改中不占位（和结果页 gs-mode 同一条规则） */
#page-grade.gs-scan .subj-bar { display: none; }
#page-grade.gs-scan #gradeResult {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#page-grade.gs-scan .grading-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#page-grade.gs-scan .scan-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#page-grade.gs-scan .scan-frame {
  flex: none;
  max-width: 100%;
  border-radius: 10px;
  background: #0b1220;
}
/*
 * fitScan 还没跑（图还没 decode 完）时的兜底：按视口高度给个上限，
 * 图按自身比例显示。跑过之后 frame 有 is-fit，宽高都由 JS 写成像素。
 */
#page-grade.gs-scan .scan-frame img {
  display: block;
  max-width: 100vw;
  max-height: calc(
    100vh - max(var(--top-edge, 44px), var(--gs-top, 0px)) - var(--nav-h, 62px) - 38px -
      env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
  width: auto;
  height: auto;
}
#page-grade.gs-scan .scan-frame.is-fit img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
/* 状态行：一行，贴在取景台最下面（不压卷面、不占一大块） */
#page-grade.gs-scan .grading-status {
  flex: none;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  gap: 7px;
  justify-content: center;
  background: rgba(8, 14, 24, .92);
}
#page-grade.gs-scan .grading-hint {
  flex: 0 1 auto;
  min-width: 0;
  color: #c6d1e2;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-grade.gs-scan .gs-live i { background: #7fb0ff; }
/* 多张时那一颗小「停止」：低频动作，一小颗，排在那行状态右边 */
.gs-scan-stop {
  flex: none;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #dfe7f2;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
}
.gs-scan-stop:active { background: rgba(255, 255, 255, .16); }

/* ---- ② 停下来那一屏：缩略图 + ×（从删掉的那条横条搬过来） ---- */
.gs-ct-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2px 0 6px;
}
.gs-ct {
  position: relative;
  flex: none;
  width: 46px;
  height: 56px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: #eef1f6;
  overflow: hidden;
}
.gs-ct img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 占满整格的那颗按钮：点一下看大图（× 是另一颗，按钮不能套按钮） */
.gs-ct-open {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
}
.gs-ct-no {
  position: absolute;
  left: 3px;
  bottom: 2px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
  /* 盖在「看大图」那颗按钮上面，但不许吃掉那一下点击 */
  pointer-events: none;
}
.gs-ct-del {
  position: absolute;
  right: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  border-radius: 0 8px 0 8px;
  background: rgba(16, 32, 58, .62);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

/* ---- ③ 多页翻页器：‹ 1 / 4 ›（替代那排「第 N 页 全对 / 错 M」页签） ---- */
.gs-pager {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: none;
  height: 26px;
  padding: 0 2px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
}
.gs-pg {
  width: 24px;
  height: 22px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
}
.gs-pg:disabled { opacity: .28; }
.gs-pg-label {
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  padding: 0 2px;
}

/* ---- ④ 停下之后还有没批的页：浮一颗「接着批（N 张）」 ---- */
/*
 * 为什么需要它：底部那条队列横条删掉之后，「继续批改」就没有落脚点了。
 * 只在「有没批的页 + 没在批」时出现（见 grade2.js 的 pendingChip），
 * 浮在操作条上面，不占布局；详情面板一开就收起来（面板贴着底部，会互相盖住）。
 */
.gs-resume {
  position: fixed;
  right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 66px);
  z-index: 41;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #d3e0fb;
  background: #eef4ff;
  color: #2456c8;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(16, 32, 58, .16);
}
body.gs-on .gs-resume { display: none; }

/*
 * 看大图那一层。
 *
 * 不复用 .modal 那套（openModalShell 会改详情面板正靠着的几个变量）：
 * 这一层只有一个 img + 两颗按钮，自己一个类就够。
 */
.modal-mask.gs-q-view {
  display: flex;
  flex-direction: column;
  /* 底色那层 .modal-mask 是 align-items:flex-end（贴底弹层用的），这里要撑满 */
  align-items: stretch;
  justify-content: flex-start;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 16, 30, .84);
}
.modal-mask.gs-q-view img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}
.modal-mask.gs-q-view .row {
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

/* ==================================================================
 * v114：详情推到更高 / 拖动不卡 / 科目那行收起来
 * ==================================================================
 * 这一段的每一条都对应老板这一轮的一句原话（2026-11-28 真机试完那五条）：
 *
 *   ① 详情要能推得更高（上限 92%，只留一条原卷边，而且不许盖住底部四件）
 *   ② 上推下拉有点卡（拖动中只改高度、不重排内容、不和 transition 打架）
 *   ③ 去掉「开始批改」那一步（拍完就批）—— 与样式无关，见 grade2.js
 *   ④ 结果卡片上的科目标签可点（顶部那行科目收起之后的改科目入口）
 *   ⑤ 顶部那行科目在「有照片 / 在批 / 有结果」时收起，把首屏让给原卷
 * ================================================================== */

/* ---- ⑤ 顶部那行科目：空态留着，有照片就收 ---- */
/*
 * 为什么空态留着：那时「先选科目再拍」是真需求，而原卷区空着，它不占谁的地方。
 * 一旦有照片（包括批改中 / 已有结果 / 队列里还攒着），它就只剩「上次：化学」那点
 * 信息 —— 而那件事结果卡片上的标签已经写着（而且那一颗可点，见下面）。
 */
#page-grade.gs-has-shot .subj-bar { display: none; }

/* ---- ④ 结果卡片上的学科 chip：看得出能点，但不是大按钮 ---- */
#gradeResult .gs-subj-tag {
  border: 1px solid #d3ddec;
  background: #f4f8ff;
  color: var(--primary-dark);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#gradeResult .gs-subj-tag:active { background: #e6efff; }
/* 一个很小的 ▾：低频动作，别抢戏，但必须看得出「这里能点」。
 * 它是**真的文字节点**（不是 ::after）：textContent 里读得到，自测也能量到。 */
#gradeResult .gs-subj-car {
  display: inline-block;
  margin-left: 3px;
  font-size: 9px;
  line-height: 1;
  opacity: .75;
  vertical-align: 1px;
}
#gradeResult .gs-subj-tag[aria-expanded='true'] {
  background: #e6efff;
  border-color: #b9cdf3;
}
.gs-subject-pop { flex: none; margin-top: 6px; }
/* 复用 .more-panel / .sg-* 那一套，只把外边距收一下（它长在抬头里，不是弹层里） */
.gs-subject-pop .more-panel { margin: 0; padding: 10px; background: #fbfcff; }

/* ---- ① 面板推到最高时：原卷只留一条边，抬头里塞不下的收掉 ---- */
/*
 * 92% 时原卷只剩 PAPER_EDGE(56px)，而抬头那几行（统计 / 页签 / 横幅 / 跨页开关）
 * 加起来有 90 多像素 —— 不收起会溢出到面板上，看起来像渲染坏了。
 * 收起之后仍然留着「批改后的作业 + 学科」那一行：用户得知道上面那一条边是什么。
 */
#page-grade.gs-paper-min .gs-paper { padding: 3px 9px; }
#page-grade.gs-paper-min .gs-paper-head .gs-pager,
#page-grade.gs-paper-min .gs-banners,
#page-grade.gs-paper-min #nextPrevRow,
#page-grade.gs-paper-min .gs-paper-date { display: none; }
#page-grade.gs-paper-min .gs-paper-body { margin-top: 2px; }

/* ---- ② 拖动中：不许任何 transition / animation 跟手指抢同一个属性 ---- */
/*
 * 这一页现在只有 .modal 的「rise」入场动画（一次性），但把这一条钉死是有意的：
 * 以后谁往里加 transition，都会在拖动时被它按住。顺带把 contain 打开 ——
 * 面板高度每帧在变，原卷那一栏的重排范围限定在它自己里面。
 */
html.gs-dragging .modal-mask.gs-dock,
html.gs-dragging .modal-mask.gs-dock .modal,
html.gs-dragging .modal-mask.gs-dock .gs-dock-body,
html.gs-dragging #gradeResult.gs .gs-paper,
html.gs-dragging #gradeResult.gs .gs-paper-body {
  transition: none !important;
  animation: none !important;
}
#gradeResult.gs .gs-paper-body { contain: layout paint; }
#gradeResult.gs .gs-paper { contain: layout; }

/* ---- ③④ 原卷抬头里那两样新东西：跨页开关 / 三条横幅 ---- */
#page-grade #nextPrevRow {
  margin: 3px 2px 0;
  font-size: 11.5px;
  gap: 5px;
}
#page-grade #nextPrevRow input {
  width: 13px;
  height: 13px;
}
#gsBanners { flex: none; }
#gsBanners[hidden] { display: none; }

/*
 * 三条横幅共用一条「细长条」的形状：一行字 + 一颗按钮。
 *
 * 为什么不做成卡片：这一屏最贵的资源是纵向空间（上半要给原卷），而这三条都是
 * 少见但必须能看见的东西 —— 出现时才占位置，不出现时一个像素都不留。
 * 底色 / 边框沿用旧页 .suspect-card / .part-card 那两条（黄），这里只压高度。
 */
.gs-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.35;
}
.gs-banner > div { flex: 1; min-width: 0; }
.gs-banner .muted { font-weight: 400; }
.gs-banner-ico { flex: none; font-size: 13px; line-height: 1; }
.gs-banner .btn {
  flex: none;
  height: 26px;
  font-size: 11.5px;
  padding: 0 8px;
  white-space: nowrap;
}

/* ---- 看大图那一层的说明（删一张已经批完的 ⇒ 说清会发生什么） ---- */
.modal-mask.gs-q-view .gs-q-view-note {
  flex: none;
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: #cfd7e3;
}

/*
 * 头像面板最底下那行版本号（网页 vNNN · App x.y.z）。
 *
 * 刻意做得很小很淡：它只在"报问题 / 确认有没有更新"时有用，
 * 平时不该占视觉重量。但也不能藏起来 —— 内测用户找不到就说不出自己是哪一版。
 */
.profile-ver {
  margin: 2px 2px 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
  letter-spacing: 0.2px;
  user-select: all; /* 报问题时能长按复制 */
}

/* ==================================================================
 * v128：解析下面的「👍 满意 / 👎 不满意」 + 详情里的题图限高
 *
 * 老板参考③里点名要有这两颗：解析讲得好不好，只有看的人知道。
 * 样式上刻意**不做成主按钮**（不填色、不投影）：
 *   · 它是读完正文之后的一个轻动作，不是这一屏的下一步（下一步是底部那三颗）；
 *   · 两颗同色同高，「满意」不许比「不满意」显眼 —— 否则点出来的数据是歪的；
 *   · 点了之后只加一层淡底 + 品牌色描边（不是整块变绿/变红），因为
 *     「不满意」被点成一个红色警告块的话，家长下次就不点了。
 * ================================================================== */
.sol-fb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.sol-fb-cap { font-size: 12px; color: var(--ink-3); }
.sol-fb-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.sol-fb-btn:active { background: #eef4ff; }
.sol-fb-btn.is-on {
  border-color: var(--primary);
  background: #eaf1ff;
  color: var(--primary);
  font-weight: 700;
}
.sol-fb-btn:disabled { opacity: .6; }
.sol-fb-note { font-size: 11.5px; }
.sol-fb-note[hidden] { display: none; }

/*
 * 详情里的题图限高：340px 那一档是给错题本详情用的（那里只有题目本身），
 * 而贴底详情上面就是整张原卷 —— 题图再占 340px，会把「正确答案 / 解析」
 * 整块顶到面板外面（老板这一轮的 bug 就是这个形状）。
 */
.modal-mask.gs-dock .q-stem-figure img { max-height: 160px; }

/* ==========================================================================
   v130 · 顶栏删掉之后：右上角浮层 + 下级页左上角 ←

   老板原话：「批改 巩固 周练 这三个页面，最顶部蓝色条，是不是可以删掉，
   现在有点头重脚轻的感觉。」

   ## 改前 / 改后

   改前：<header class="topbar"> 是 sticky、在文档流里 —— 10 + 32 + 8 = 50px
         （再加安全区），三页各吃 50px。内容从「顶栏下沿 + .page 的 14px」开始。
   改后：一组 position: fixed 的小圆（头像 / 齿轮 / 记录 / 模拟徽章）+ 一颗 fixed 的 ←。
         fixed 的盒子**不占文档流高度**，所以 .page 的 padding-top 就是「让开浮层」
         的那 44px —— 页面从屏幕最上面开始排。

   ## 44px 是怎么来的（和头像的 36 是同一对数）

   浮层上沿 top = max(8px, 安全区)；头像 36px ⇒ 下沿 = max(44px, 安全区 + 36px)。
   内容要让到它下面，所以 .page 的 padding-top = 安全区 + 44px：
     · 没有刘海（env = 0）：44px，正好贴着头像下沿；
     · 有刘海：安全区 + 44px，比头像下沿多 8px。
   净账：顶栏本身 50 → 44，每页多出 6px；而第一张卡的实际位置从
   「顶栏 50 + .page 14 = 64」变成 44，**多出 20px**（页面自己的 14 也折进去了）。

   ⚠️ 改头像尺寸时必须同步改 44（.page 的 --top-edge 和 grade2.js 的 GS_TOP_EDGE）：
      改一个不改另一个，内容就会钻到按钮底下。
   ========================================================================== */

/* 顶部引导条是 JS 实测写进来的（app.js 的 syncTopBarOffset）；没有就是 0 */
:root { --top-bar-h: 0px; --top-edge: 44px; }

.top-float {
  position: fixed;
  top: calc(var(--top-bar-h, 0px) + max(8px, env(safe-area-inset-top, 0px)));
  left: 0;
  right: 0;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 45;
  /* 盒子铺满整行，但空白处不许接点击 —— 否则它会挡住下面第一行内容的点击 */
  pointer-events: none;
}
.top-float > * { pointer-events: auto; }

/* 头像：实心小圆 + 首字。它回答的是「现在是我这个账号吗」，实心比描边更像头像 */
.top-float .avatar-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 2px 8px rgba(47, 107, 255, .28);
}
.top-float .avatar-btn:active { transform: scale(.94); background: var(--primary-dark); }
.top-float .avatar-btn[aria-expanded="true"] { background: var(--primary-dark); }

/* 齿轮 / 记录 / 返回：半透明白底 + 1px 细边。压在内容上也读得清，
   但别做成实心色块 —— 它们都是低频入口，抢眼就本末倒置了。
   backdrop-filter 只是锦上添花：老浏览器不支持时那层 82% 白底照样能读。 */
.top-float .gear-btn,
.top-back {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(16, 32, 58, .12);
  background: rgba(255, 255, 255, .82);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(16, 32, 58, .08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.top-float .gear-btn:active,
.top-back:active { transform: scale(.94); background: #fff; }

/* 「模拟」徽章：原来压在蓝色渐变上，现在底下是浅灰页面，所以换成琥珀色描边胶囊 */
.top-float .badge-mock {
  margin: 0;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #ffd79a;
  background: #fff5e3;
  color: #8a5200;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 18px;
  white-space: nowrap;
}

/* 下级页左上角的 ←。和右上角那组同一行、同一个上沿。
   36px（不是 40）是为了让下沿正好落在 44px 那条线上：40px 会多出 4px，
   压住下面那一行标题的第一行。 */
.top-back {
  position: fixed;
  top: calc(var(--top-bar-h, 0px) + max(8px, env(safe-area-inset-top, 0px)));
  left: 10px;
  width: 36px;
  height: 36px;
  z-index: 46;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------------ */
/* 批改页：网页内实时取景（v149）                                        */
/* ------------------------------------------------------------------ */
/*
 * 为什么要有这一层：
 *   iPhone（PWA）上 input.click() 调起来的是**系统相机 App** —— 拍一页要多点
 *   两下（拍照 → 使用照片 → 回到页面）。一本作业 2~4 页就是 4~8 次多余的点击，
 *   而安卓 APK 那边一直是原生取景页（壳里的 CameraCaptureActivity）。
 *   这一层让浏览器 / PWA 也走「进去就有画面、拍完不退出」的同一条路。
 *
 * 视觉**直接复用**题目答疑那一套：细线框 + 四角 + 框外压暗用的是同一组类名
 * （.qa-cam / .qa-guide / .qa-guide-corner / .qa-dock / .qa-tools / .qa-shutter /
 *  .qa-flash），所以这里只覆盖三件事：
 *   ① 整层铺满视口（答疑那边是卡片里的一块，这边盖住导航栏）；
 *   ② 框按**作业纸**的形状做（A4 竖版 1:1.414，横屏自动换成横版），而且不能拖
 *      （整页拍，没有「框选范围」这回事 —— 答疑那四条 24px 热区不照抄）；
 *   ③ 连拍要用的两件：左下缩略图条、右下「完成」。
 */
.gcam {
  position: fixed;
  inset: 0;
  /* 压过详情面板（1500），低于登录门（2000）—— 取景层上面不该再盖任何东西 */
  z-index: 1600;
  background: #0b1220;
  /* 框外压暗靠一层 9999px 的巨大外阴影，必须裁住 */
  overflow: hidden;
  /*
   * 三个量决定框能有多大（见下面 .gcam .qa-guide）：
   *   --gcam-top  上面那一条（取消 + 状态）占掉多少
   *   --gcam-dock 底部三件（相册 / 快门 / 完成）占掉多少
   *   --gcam-side 左右各留多少
   * 安全区都算进去：iOS 刘海和底部那条横线不吃掉它们的话，关机键那一侧会顶到屏幕上沿。
   */
  --gcam-top: calc(60px + env(safe-area-inset-top, 0px));
  --gcam-dock: calc(178px + env(safe-area-inset-bottom, 0px));
  --gcam-side: 22px;
}
.gcam.hidden { display: none; }
/* 取景层开着的时候底下那一页不能再滚（手指一划就跑偏，看起来像画面在动） */
body.gcam-open { overflow: hidden; }

/*
 * 取景框：形状是作业纸（A4），位置在「上面那条」和「底部三件」之间居中。
 *
 * ⚠️ 高度用 min() 把两个上限同时算出来，**不能**只在一边写 max-width：
 * 高度已经定死时，max-width 只会把宽度夹住、高度不动，比例就坏了。
 *   上限一：竖屏方向还剩多少（视口高 - 顶 - 底）
 *   上限二：横屏方向还剩多少，换算成 1:1.414 之后该有多高
 *
 * 100dvh 只有较新的浏览器认（iOS 15.4+），所以先写一份 100vh 的，
 * 再用 @supports 覆盖一次 —— 老机上留一点空白，不会算出一个压到底部三件的框。
 */
.gcam .qa-guide {
  left: 50%;
  top: calc(var(--gcam-top) + (100vh - var(--gcam-top) - var(--gcam-dock)) / 2);
  width: auto;
  height: min(
    calc(100vh - var(--gcam-top) - var(--gcam-dock)),
    calc((100vw - var(--gcam-side) * 2) * 1.414)
  );
  aspect-ratio: 1 / 1.414;
  transform: translate(-50%, -50%);
  /* 框是参考线，不是控件：整页拍不需要框选，所以四条拖动热区一个都不渲染 */
  pointer-events: none;
  cursor: default;
  /* 切横竖屏时框会换形状，别让它滑过去（滑一半看着像画面在抖） */
  transition: none;
  border-radius: 10px;
}
@supports (height: 100dvh) {
  .gcam .qa-guide {
    top: calc(var(--gcam-top) + (100dvh - var(--gcam-top) - var(--gcam-dock)) / 2);
    height: min(
      calc(100dvh - var(--gcam-top) - var(--gcam-dock)),
      calc((100vw - var(--gcam-side) * 2) * 1.414)
    );
  }
}
/* 横屏：一张 A4 横过来放 —— 形状跟着换，位置和留白都还在这条带子里 */
@media (orientation: landscape) {
  .gcam {
    --gcam-top: calc(48px + env(safe-area-inset-top, 0px));
    --gcam-dock: calc(132px + env(safe-area-inset-bottom, 0px));
  }
  .gcam .qa-guide {
    aspect-ratio: 1.414 / 1;
    height: min(
      calc(100vh - var(--gcam-top) - var(--gcam-dock)),
      calc((100vw - var(--gcam-side) * 2) / 1.414)
    );
  }
  @supports (height: 100dvh) {
    .gcam .qa-guide {
      height: min(
        calc(100dvh - var(--gcam-top) - var(--gcam-dock)),
        calc((100vw - var(--gcam-side) * 2) / 1.414)
      );
    }
  }
}

/* 上面那条：左上角取消 + 一行状态。只有它们接点击，画面别处留给快门 */
.gcam-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 0;
  pointer-events: none;
}
.gcam-x {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 16, 28, .52);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.gcam-x:active { background: rgba(10, 16, 28, .78); }

/*
 * 状态那一行（正在打开相机 / 这张图打不开…）。
 * ⚠️ 这一屏**没有一句操作提示**（老板一直在减文字）：框本身就是提示，
 *    「把纸放进框里」这类话写上去只会挡画面。这里只放状态。
 */
.gcam-hint {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(10, 16, 28, .62);
  color: rgba(255, 255, 255, .94);
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 132px);
  transition: opacity .16s ease;
}
/* 没有话要说的时候整颗收掉（留一个空胶囊比什么都不显示更怪） */
.gcam-hint.is-empty { opacity: 0; }

/*
 * 左下缩略图条：每拍一张就多一颗，露在底部三件正上方。
 * 为什么不做成「点相册看刚才那张」：连拍时用户要的是「已经拍到第几张」，
 * 一眼看见一排缩略图比一个数字直观，而且点开能删掉拍糊的那一张。
 */
.gcam-strip {
  position: absolute;
  left: 14px;
  bottom: calc(var(--gcam-dock) + 4px);
  z-index: 4;
  display: flex;
  gap: 6px;
  max-width: calc(100% - 128px);
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.gcam-strip::-webkit-scrollbar { display: none; }
.gcam-strip:empty { display: none; }
.gcam-th {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .78);
  border-radius: 10px;
  overflow: hidden;
  background: #111827;
  cursor: pointer;
}
.gcam-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gcam-th:active { border-color: #fff; }

/*
 * 右下「完成」：白底那一颗 —— 这一屏上唯一的实心白，就是「这一趟拍完了」。
 * 文字只有两个字（数量写在它下面那一行小字里），符合这一屏「少字」的口径。
 */
.gcam-done-box {
  width: auto;
  min-width: 48px;
  padding: 0 12px;
  background: #fff;
  border-color: #fff;
  color: #14171d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
/*
 * 一张都没拍的时候这颗点不动（淡一档，位置不动）。
 * 为什么不是藏起来：藏起来的话连拍第二页时按钮会突然冒出来、右下角跳一下；
 * 用户第一次进这一屏也会找不到「拍完该怎么办」。
 */
.gcam-done.is-off { opacity: .5; }
.gcam-done.is-off .gcam-done-box {
  background: rgba(255, 255, 255, .46);
  border-color: rgba(255, 255, 255, .46);
}

/*
 * 看大图那一层：点缩略图进来，能看到拍糊了没有，并且就地删掉。
 * 盖在取景层之上（同一个 stacking context 里，z-index 比底部三件大就行）。
 */
.gcam-view {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 18px calc(92px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 8, 14, .95);
}
.gcam-view.hidden { display: none; }
.gcam-view-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.gcam-view-x {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  cursor: pointer;
}
.gcam-view-del {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.gcam-view-del:active { transform: translateX(-50%) scale(.97); }

/* ==========================================================================
   v154 · 周练：只留四块（2026-11-30）
   --------------------------------------------------------------------------
   ① 周一到周日七个点  ② 这周清掉 N 个  ③ 还剩 M 个反复错  ④ 出一套卷子
   样式照 design/三段结构/zl-周练.html，但颜色只从这套变量里取
   （--ink / --ink-2 / --ink-3 / --line / --success），不新造色值：
     绿 = 只有「清掉 N 个」那个大数字
     红 = 只有「还剩 M 个反复错」那一句标题
     蓝 = 只有「出一套卷子」那颗主按钮
   其余全是灰阶（点、日期、知识点名、次数、箭头）。
   ========================================================================== */

.zl-range { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }

.zl-days { display: flex; gap: 6px; margin: 0 0 6px; }
.zl-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.zl-day i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.zl-day.on i { background: var(--ink-2); }
/* 今天：空心环（时间是时间，不是成绩 —— 所以不给它绿或红） */
.zl-day.today i { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.zl-day span { font-size: 10px; line-height: 1.2; color: var(--ink-3); }
.zl-day.today span { color: var(--ink); font-weight: 700; }
.zl-days-note { font-size: 11px; color: var(--ink-3); line-height: 1.5; }

/* ② 这周清掉 N 个：这一页唯一的彩色 */
.zl-week { display: flex; align-items: flex-end; gap: 10px; margin: 18px 0 0; }
.zl-big {
  font-size: 44px; font-weight: 800; line-height: 1;
  color: var(--success); font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.zl-big-l { font-size: 13px; color: var(--ink-2); line-height: 1.5; padding-bottom: 4px; }
.zl-big-l b { display: block; font-size: 12px; font-weight: 700; color: var(--ink); }

/* ③ 还剩 M 个反复错：红标题只这一处，行里不再堆红胶囊 */
.zl-h { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 2px; }
.zl-h .sch-copy-h { margin: 0; font-size: 17px; color: #cf2f34; }
/* 「这周没有反复错的点」是好事，不用诊断红（绿也只留给「清掉了」那个大数字） */
.zl-h .sch-copy-h.zl-h-ok { color: var(--ink); }
.zl-h .n { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.zl-list { list-style: none; margin: 0; padding: 0; }
.zl-row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px;
  padding: 2px 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; text-align: left; cursor: pointer;
}
.zl-row:last-child { border-bottom: 0; }
.zl-row:active { background: rgba(16, 32, 58, .05); }
.zl-name { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zl-cnt { flex: none; font-size: 12px; font-weight: 700; color: var(--ink-2); background: #eef1f6; border-radius: 999px; padding: 1px 8px; }
.zl-arrow {
  flex: none; width: 7px; height: 7px; margin: 0 2px 0 4px;
  border-right: 1.5px solid #b9c4d6; border-bottom: 1.5px solid #b9c4d6;
  transform: rotate(-45deg);
}
.zl-note { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin: 8px 0 0; }

/* ④ 出一套卷子：主按钮在上面，选项收在「换知识点」下面 */
.zl-cta-s { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.zl-tune {
  display: flex; align-items: center; width: 100%; min-height: 44px; margin-top: 4px;
  padding: 0; border: 0; border-top: 1px dashed var(--line); background: none;
  font: inherit; font-size: 12px; color: var(--ink-2); text-align: left; cursor: pointer;
}
.zl-tune:active { opacity: .6; }
.zl-tune-a { display: inline-block; margin-left: 6px; transition: transform .15s; }
.zl-tune.on .zl-tune-a { transform: rotate(90deg); }

.zl-hist { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.zl-hist-t { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
/* 空态就一句话，跟标题一样靠左（.empty 默认居中，在这张卡里看着像浮在半空中） */
.zl-hist .empty { text-align: left; padding: 6px 0 !important; }

/* 点一行「反复错」→ 这一个知识点的错题（弹层里，点一道进详情） */
.wk-list { display: flex; flex-direction: column; }
.wk-row {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 10px 0;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; text-align: left; cursor: pointer;
}
.wk-row:last-child { border-bottom: 0; }
.wk-row:active { background: rgba(16, 32, 58, .05); }
.wk-no {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: #eef1f6; color: var(--ink-2);
}
.wk-t {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wk-s { flex: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* 周末弹窗（复用现有 .modal；这里只管里面那一句话和两颗按钮） */
.wkp-lead { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.wkp-lead b { font-size: 17px; color: var(--ink); font-weight: 800; margin: 0 2px; }
.wkp-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 强制选年级（v157）----------
 *
 * 它挡在「进 App」前面，所以观感和登录门**刻意不一样**：登录门是一整块蓝色渐变
 * （那是「你还没进来」），这里是浅底 + 一张白卡（那是「你进来了，但先定一件事」）。
 * 相同之处只有一个：整屏、不可跳过。
 *
 * z-index 比 .auth-gate(2000) 高：登录门的回调里紧接着就判断这道门，
 * 万一两层的显示收尾有先后，选年级必须在上层（它是更靠后的那一步）。
 */
.grade-gate {
  position: fixed; inset: 0; z-index: 2100;
  display: flex; align-items: center; justify-content: center;
  padding: max(14px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #f6f9ff 0%, #eaf0fb 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.grade-gate.hidden { display: none; }

/* 弹层开着时把应用藏起来：底下那些页面还没画（还没进 App），不该露出半截 */
body.grade-locked .app { visibility: hidden; }
/* 背后的页面不许跟着滚（手机上很容易在弹层里划到底之后继续滚页面） */
body.grade-locked { overflow: hidden; }

.gg-card {
  width: 100%; max-width: 420px; margin: auto;
  background: #fff; border-radius: 20px;
  padding: 22px 18px 18px;
  box-shadow: 0 16px 44px rgba(16, 32, 58, .14);
}
.gg-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--primary); margin-bottom: 6px;
}
.gg-title {
  margin: 0 0 8px; font-size: 19px; line-height: 1.35;
  font-weight: 800; color: var(--ink);
  /* 名字可能挺长（「干儿子」这种），折行也不能把问号挤掉 */
  word-break: break-word;
}
.gg-sub {
  margin: 0 0 4px; font-size: 12.5px; line-height: 1.7; color: var(--ink-3);
}

.gg-groups { margin-top: 14px; }
.gg-group + .gg-group { margin-top: 12px; }
.gg-group-h {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 6px;
}
.gg-group-h span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.gg-group-h em { font-style: normal; font-size: 11px; color: var(--ink-3); }

/*
 * 三列。12 颗一样大的平铺按钮是**明确不要**的（小学 6 颗、初中 3 颗、高中 3 颗，
 * 分组才看得出学制）；每颗 46px 高，超过 44px 的点击区下限。
 */
.gg-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gg-opt {
  min-height: 46px; padding: 8px 4px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.gg-opt:active { transform: scale(.97); background: var(--primary-soft); }
.gg-opt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gg-opt:disabled { opacity: .55; cursor: default; }
.grade-gate.is-busy .gg-opt { cursor: progress; }

/* 存不上时那一行（红色、只在出错时占位）：它是唯一能说清「为什么没进去」的地方 */
.gg-err {
  min-height: 18px; margin-top: 10px;
  font-size: 12.5px; line-height: 1.5; color: var(--danger);
}

/* 矮屏（横过来的手机 / 小屏机）上把整块收小一档，别让“确定”要滚才能看见 */
@media (max-height: 640px) {
  .gg-card { padding: 16px 14px 12px; border-radius: 16px; }
  .gg-title { font-size: 17px; }
  .gg-groups { margin-top: 10px; }
  .gg-group + .gg-group { margin-top: 9px; }
  .gg-opt { min-height: 44px; }
}

/* ================================================================== */
/* 一题一屏的答题器（v159）                                            */
/* ================================================================== */
/*
 * 出完题之后不跳页，直接把第一道题摊在他面前：一屏一道、底部一颗主操作、
 * 判完一行结果就下一道（逻辑在 views/practice.js 的 startPracticeRunner）。
 *
 * 这一块是**纯追加**：上面那些 .practice-item / .pi-* 规则一条都没改，
 * 这里只是把它们搬进答题器之后（控件在 footer 里）仍然认得出来 ——
 * 所以 footer 里那个容器也带着 .practice-item 这个类名，样式才接得上。
 *
 * 层级 40 是算过的：
 *   · 比底部导航（30）高 ⇒ 底栏被完整盖住，主操作不会被压在导航下面；
 *   · 比弹层（50）低 ⇒ 结果页点「看解析」时 openModal 能盖在这一层上面。
 *
 * 刻意**没有**开场动画（不许 opacity: 0 淡入）、没有卡片外框（一屏只有一个焦点）、
 * 没有一句鼓励语。
 */
.pr-run {
  position: fixed; inset: 0; z-index: 40;
  background: #fff;
  display: flex; flex-direction: column;
}
body.pr-open { overflow: hidden; }

/*
 * 全屏答题器是「任务态」：页面上那些浮层全部让位。
 *
 * 为什么必须让位：右上角那组头像 / 齿轮是 z-index 45、「添加到桌面」那条提示条
 * 是 .pwa-bar（900），它们都在这一层（40）之上 —— 而这一层不能抬到 900 以上，
 * 因为结果页里点「看解析」要打开 .modal-mask（50），抬上去那张弹层就被压在下面了。
 * 所以做法相反：让浮层让位。
 *
 * 和上面 .ios-guide-dock 那一段（body.game-open / overlay-open / picking）
 * 是同一套做法：用 CSS 藏、不拆节点 —— 退出答题器之后该回来的自己会回来。
 */
body.pr-open .pwa-bar,
body.pr-open .top-float,
body.pr-open .top-back,
body.pr-open .ios-guide-top,
body.pr-open .ios-guide-dock,
body.pr-open .grade-act-bar,
body.pr-open .wrong-fab,
body.pr-open .pick-bar,
body.pr-open .gs-resume {
  display: none !important;
}

/* ---- 顶部：× + 第 N / M + 进度点 ---- */
.pr-top {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 8px;
}
.pr-x {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #eef1f6; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer;
  padding: 0;
}
.pr-x:active { transform: scale(.94); }
.pr-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* 「第 N / M」12px 灰：它是坐标，不是标题，不该跟题干抢 */
.pr-n { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
/* 5px 圆点：当前那颗深色。不画进度条（一条横条会被读成「还剩多少」） */
.pr-dots { display: flex; align-items: center; gap: 5px; }
.pr-dots i { width: 5px; height: 5px; border-radius: 50%; background: #dbe2ec; display: block; }
.pr-dots i.on { background: var(--ink); }

/* ---- 中间：这道题（长了能滚，主操作不受影响） ---- */
.pr-body {
  flex: 1; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 14px 16px;
}
/* 一屏一道：题卡在这一层里不再是「卡片」，去掉边框和内边距 */
.pr-run .practice-item { border: 0; border-radius: 0; padding: 0; margin: 0; }
/* 题号 / 题型标签在顶部已经有一份坐标了，题卡头不再重复占一行 */
.pr-run .pi-head { display: none; }
/*
 * 题干是这一屏唯一的主角，20px。
 *
 * 必须带 !important：v64 那次「正文压到三级字号」给 .q-stem 钉了
 * 14px !important（见文件里「排版基线」那一节），不带的话这一条永远拼不过它 ——
 * 而这一屏和别处不一样，它整屏只有这一道题，题干该是主角。
 */
.pr-run .q-stem { font-size: 20px !important; line-height: 1.65; margin-bottom: 6px; }

/* ---- 底部：主操作常驻（flex 布局，永远在可视区内，不需要 fixed） ---- */
.pr-foot {
  flex: none; background: #fff; border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 8px;
}
.pr-foot-in { display: flex; flex-direction: column; gap: 8px; }
/* 题卡里那几行自带 margin-top，搬进 footer 之后会和 gap 叠成两倍间距 */
.pr-run .pi-opts, .pr-foot-in .pi-paper { margin-top: 0; }
/* 判完之后作答控件退场：这一屏只剩「结果一行 + 下一道」 */
.pr-foot.is-answered .pr-ctrl { display: none; }
/* 解答题那两条按钮（拍下来 / 看答案）：这一屏的主操作是「下一道」 */
.pr-hide { display: none !important; }
/*
 * 解答题提示的第二行（写完整张拍下来我判 / 拍照回判下一批上线）在这一屏不显示：
 * 这一屏没有拍照入口，写了就是一句做不到的承诺。标题「这道在纸上写」留着就够了。
 */
.pr-run .pi-paper .s { display: none; }

/*
 * 判完那一行结果。
 *
 * 题卡原来把结果排成三行（对错 / 你的答案 / 正确答案 / 解析），那是「详情卡」的
 * 排版，而这一屏只要**一行**：把 br 关掉 + flex 自动折行，几段并成一段流；
 * 解析（.muted）在这一屏不显示 —— 它属于结果页里点开的那张题卡，不属于这里。
 */
.pr-run .pi-result {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px;
  margin: 0; padding: 0; background: none;
  font-size: 14.5px; line-height: 1.5;
}
.pr-run .pi-result br { display: none; }
.pr-run .pi-result .muted { display: none; }
.pr-run .pi-result.right { background: none; color: #0b7c3c; }
.pr-run .pi-result.wrong { background: none; color: #a92a2e; }
.pr-run .pi-result.partial { background: none; color: #8a5a06; }

/* 主操作整行铺满（和题卡里那几颗小按钮不是一回事） */
.pr-next { width: 100%; }

/* ---- 打不开 / 没题时的一句话（绝不留白屏） ---- */
.pr-empty {
  padding: 40px 4px 8px;
  text-align: center; font-size: 15px; color: var(--ink-2);
}

/* ---- 一组做完：结果页 ---- */
.pr-res { padding: 26px 2px 8px; }
/* 大字只写「对几道 / 共几道」，不写正确率（派生出来的百分比这个项目不编） */
.pr-score { font-size: 40px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; color: var(--ink); }
.pr-score em { font-style: normal; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.pr-score-sub { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.pr-wrong-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.pr-wrong-list:empty { display: none; }
/* 一行一道错题：题号 + 题干前 30 字 + 看解析 */
.pr-wrong {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 12px; font-family: inherit; font-size: 14px;
  color: var(--ink); cursor: pointer;
}
.pr-wrong:active { border-color: var(--primary); }
.pr-wrong .no {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  background: var(--danger-soft); color: var(--danger);
  font-size: 12px; font-weight: 800; display: grid; place-items: center;
}
.pr-wrong .tx {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.pr-wrong .more { flex: none; font-size: 12.5px; color: var(--ink-3); }
.pr-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.pr-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
/* 次操作：描边，不抢「再来一组」那颗实心 */
.pr-ghost { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.pr-ghost:active { background: var(--bg); }

/* ====================================================================
   v164：一题一屏的「看答案 ⇒ 我自己判对错」（老板的第三条 + 第四条）
   ====================================================================
   老板原话：「生成的题目，显示这道在纸上写」（解答题那道提示留着）；
   「每道题页面上加一个显示答案的按钮，在答案页让用户自己选择作对还是错的手动选择。
   因为这个毕竟是验证知识点的掌握情况，可以把主动权交给用户。」

   两块的归属（为什么分成两个节点）：
     · .pi-ans   —— 正确答案 + 解析，进**正文区**（能滚）。解析可能很长，
                    塞进底部那一块会把题干挤没、把按钮顶出屏幕；
     · .pi-judge —— 两颗「我做对了 / 我做错了」，进**底部**，常驻可见
                    （390 宽下主操作不许被挤走，也不许被底栏压住）。
*/
.practice-item .pi-look { margin-top: 8px; }
/*
 * 答案摊开之后「看答案」那一条要收起：.row 是 display:flex，会盖掉 [hidden] 的
 * display:none（浏览器默认样式优先级更低）—— 不写这一条，按钮会一直留在屏上。
 */
.practice-item .pi-look[hidden] { display: none; }

.practice-item .pi-ans {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f8fc;
}
/* 正确答案用大字：这一屏看的就是它，别和解析一个字号 */
.practice-item .pi-ans-k { font-size: 11.5px; color: var(--ink-3); }
.practice-item .pi-ans-v {
  margin-top: 2px; font-size: 19px; font-weight: 700; line-height: 1.5;
  color: var(--ink); overflow-wrap: anywhere;
}
.practice-item .pi-ans-a {
  margin-top: 7px; font-size: 13px; line-height: 1.65; color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* 两颗自判按钮各占一半：做对是主色，做错是次色 —— 主次分明，但不替孩子选 */
.practice-item .pi-judge { display: flex; gap: 8px; }
.practice-item .pi-judge[hidden] { display: none; }
.practice-item .pi-judge .btn { flex: 1 1 0; min-width: 0; }

/* 判完那一行：只报「记成什么」，不是结果条（所以不叫 .pi-result） */
.practice-item .pi-self-done { margin-top: 9px; font-size: 13.5px; }
.practice-item .pi-self-done.right { color: #0b7c3c; }
.practice-item .pi-self-done.wrong { color: #a92a2e; }

/* 一题一屏里答案面板贴着底部：上面已经有 gap，别再多一层空 */
.pr-run .pi-ans { margin-top: 12px; }
.pr-foot-in .pi-judge { margin-top: 0; }

/* ---- v164：概况行删掉之后，顶部那一行只剩右端那组控件 ---- */
/*
 * 老板：「第二张图上面的今天数学 13 道题 6 个知识点这段删掉，只保留日期选择和
 * 生成按钮就行了。」⇒ .gy-top 里不再有左半格（.gy-top-l），那一行只有
 * [今天 ▾] [有新作业 · 重新生成] [⟳]，整行靠右。
 * 高度仍然是 28px（min-height）：期间按钮本身就占这么高，删掉文字不改变行高 ——
 * 变的是首屏多出原来那行字占的宽度，右边的控件不再被挤断。
 */
.gy-top { justify-content: flex-end; }
.gy-right { flex: 0 1 auto; min-width: 0; }
