/* 《智学语文》共享样式 · 移动优先（含约480px窄屏与触屏适配） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #f5f6f8; color: #1f2430; line-height: 1.7;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid #e6e8ee;
  padding: 8px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 8px;
}
.tb-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tb-row::-webkit-scrollbar { display: none; }
.tb-div { width: 1px; height: 24px; background: #e6e8ee; flex: 0 0 auto; }
.tb-row > * { flex: 0 0 auto; }
.tb-row .chips { flex: 0 0 auto; }
/* 导航行：5 个按钮等分铺满一行，不左右滑 */
.tb-nav { overflow: visible; gap: 6px; }
.tb-nav #views { display: contents; }
.tb-nav .chip { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: .5px; cursor: pointer; user-select: none; }
.brand::after { content: ' ▾'; color: #8b93a7; font-size: 12px; }
.brand:active { opacity: .7; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: #8b93a7; letter-spacing: 0; }
/* 学科下拉：做成"品牌"的样子，但可下拉切换 */
.brand-sel {
  font: inherit; font-weight: 700; font-size: 17px; letter-spacing: .5px; color: #1f2430;
  background: transparent; border: 0; border-bottom: 2px solid #1f2430; padding: 3px 22px 3px 2px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%231f2430'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
}
.crumb { font-size: 13px; color: #6b7385; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb b { color: #1f2430; }
.back { font-size: 13px; padding: 5px 10px; border: 1px solid #dfe2ea; border-radius: 8px; background: #fff; }
.spacer { flex: 1; }

/* ---------- 通用选择条 ---------- */
.picker { padding: 14px; }
.pick-label { font-size: 12px; color: #8b93a7; margin: 4px 0 8px; letter-spacing: 1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #dfe2ea;
  font-size: 14px; cursor: pointer; user-select: none; min-height: 38px;
}
.chip.on { background: #1f2430; color: #fff; border-color: #1f2430; }
.chip.off { opacity: .45; cursor: not-allowed; }
.chip .tag { font-size: 10px; margin-left: 5px; opacity: .8; }

.card { background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.hint { font-size: 12px; color: #8b93a7; }
.note { font-size: 12px; color: #a06a00; background: #fff8e6; border: 1px solid #ffe1a6; border-radius: 10px; padding: 8px 10px; }

/* ---------- 单元 / 课文列表 ---------- */
.unit { margin-bottom: 16px; }
.unit-head { display: flex; align-items: baseline; gap: 8px; margin: 14px 2px 8px; }
.unit-head .no { font-size: 13px; color: #fff; background: #1f2430; border-radius: 6px; padding: 2px 8px; }
.unit-head .theme { font-weight: 700; }
.unit-head .tg { font-size: 11px; color: #8b93a7; }
.lesson {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e6e8ee;
  border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; min-height: 56px;
}
.lesson:active { transform: scale(.995); }
.lesson .lno { font-size: 13px; color: #6b7385; min-width: 26px; }
.lesson .lt { font-weight: 600; }
.lesson .la { font-size: 12px; color: #8b93a7; }
.lesson .pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3b4a8a; }
.lesson .pill.ready { background: #e6f7ec; color: #14713a; }
.lesson .pill.todo { background: #f1f2f5; color: #8b93a7; }
.lesson.locked { opacity: .62; cursor: not-allowed; }

/* ---------- 课文页 Tab ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e6e8ee; position: sticky; top: 52px; z-index: 35; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid #dfe2ea; background: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; min-height: 38px; }
.tab.on { background: #1f2430; color: #fff; border-color: #1f2430; }
.tab .n { font-size: 10px; opacity: .7; margin-left: 4px; }

.wrap { max-width: 820px; margin: 0 auto; padding: 14px 14px 96px; }
#lbar + .wrap { padding-top: 56px; }
.pane { display: none; }
.pane.on { display: block; }

/* ---------- 阅读 / 正文 ---------- */
.readbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toggle { font-size: 12px; padding: 6px 10px; border: 1px solid #dfe2ea; border-radius: 8px; background: #fff; cursor: pointer; }
.toggle.on { background: #eef2ff; border-color: #b9c4f0; color: #3b4a8a; }
.article { background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 16px; }
.para { position: relative; padding: 8px 10px 8px 14px; margin: 0 0 6px; border-radius: 8px; border-left: 4px solid transparent; }
.para .pn { position: absolute; left: -30px; top: 12px; font-size: 11px; color: #b6bcc9; width: 24px; text-align: right; }
.para.marked.c-盼春 { border-left-color: #e03131; background: #fff5f5; }
.para.marked.c-绘春 { border-left-color: #1971c2; background: #f3f8ff; }
.para.marked.c-赞春 { border-left-color: #2b8a3e; background: #f3faf4; }
.para .fac { display: none; margin-top: 6px; }
.para.showfac .fac { display: flex; gap: 5px; flex-wrap: wrap; }
.fchip { font-size: 11px; padding: 2px 7px; border-radius: 6px; color: #fff; }
.w { cursor: pointer; border-radius: 3px; padding: 0 1px; }
.w:hover { background: #fff3bf; }
.title-line { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 2px; }
.byline { text-align: center; font-size: 13px; color: #8b93a7; margin-bottom: 14px; }

/* ---------- 查词浮层 ---------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(15,18,25,.45); z-index: 90; display: none; }
.sheet-mask.on { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px 18px 26px; max-height: 72vh; overflow: auto;
  transform: translateY(105%); transition: transform .22s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}
.sheet.on { transform: translateY(0); }
.sheet .wp { font-size: 24px; font-weight: 700; }
.sheet .py { font-size: 15px; color: #3b4a8a; margin-left: 10px; letter-spacing: .5px; }
.sheet .kind { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3b4a8a; margin-left: 8px; }
.sheet dl { margin: 12px 0 0; }
.sheet dt { font-size: 12px; color: #8b93a7; margin-top: 10px; }
.sheet dd { margin: 2px 0 0; font-size: 15px; }
.sheet .ex { background: #f7f8fa; border-radius: 10px; padding: 10px; font-size: 14px; }
.sheet .jump { display: inline-block; margin-top: 8px; font-size: 12px; color: #3b4a8a; cursor: pointer; }
.sheet .close { position: absolute; right: 14px; top: 12px; font-size: 20px; color: #b6bcc9; background: none; border: 0; cursor: pointer; }

/* ---------- 记忆模块 ---------- */
.vcard { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.vcard .row1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vcard .wd { font-size: 18px; font-weight: 700; }
.vcard .py { font-size: 13px; color: #3b4a8a; }
.vcard .pos { font-size: 11px; color: #8b93a7; border: 1px solid #e6e8ee; border-radius: 4px; padding: 0 4px; }
.vcard .flag { font-size: 11px; color: #a06a00; background: #fff8e6; border-radius: 4px; padding: 1px 6px; }
.vcard .mg { font-size: 14px; margin-top: 4px; }
.vcard .ex { font-size: 13px; color: #6b7385; margin-top: 6px; padding-left: 8px; border-left: 2px solid #e6e8ee; }
.vcard .memo { font-size: 13px; margin-top: 6px; background: #f3f8ff; border-radius: 8px; padding: 8px 10px; }
.vcard .memo b { color: #1971c2; font-size: 12px; }
.sec-t { font-size: 13px; color: #6b7385; margin: 16px 2px 8px; font-weight: 600; }

/* ---------- 理解模块 ---------- */
.qcard { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.qcard .qh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.qcard .qn { font-size: 12px; background: #1f2430; color: #fff; border-radius: 6px; padding: 2px 8px; }
.qcard .qb { font-size: 11px; color: #8b93a7; }
.qcard .qt { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3b4a8a; }
.qcard .stem { font-size: 15px; }
.steps { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.step { font-size: 12px; background: #f3f8ff; color: #1971c2; border-radius: 6px; padding: 3px 8px; }
textarea.ans { width: 100%; min-height: 84px; margin-top: 10px; padding: 10px; border: 1px solid #dfe2ea; border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; }
.qbtns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.btn { font-size: 13px; padding: 8px 14px; border-radius: 10px; border: 1px solid #dfe2ea; background: #fff; cursor: pointer; min-height: 38px; }
.btn.pri { background: #1f2430; color: #fff; border-color: #1f2430; }
.ref { margin-top: 10px; background: #f7f8fa; border-radius: 10px; padding: 12px; font-size: 14px; display: none; }
.ref.on { display: block; }
.ref .rh { font-size: 12px; color: #8b93a7; margin-bottom: 4px; }

/* ---------- 背诵模块 ---------- */
.recite .opts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.recite .txt { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 14px; min-height: 120px; white-space: pre-wrap; line-height: 1.9; }
.recite .txt.hide { color: transparent; background: repeating-linear-gradient(90deg,#eef0f4,#eef0f4 40px,#f6f7f9 40px,#f6f7f9 80px); user-select: none; }
.stat { display: flex; gap: 14px; font-size: 13px; color: #6b7385; margin-top: 10px; flex-wrap: wrap; }
.stat b { color: #1f2430; font-size: 16px; }

/* ---------- 积累 / 知识点 / 结构 ---------- */
.sentence { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.sentence .q { font-size: 15px; }
.sentence .q em { font-style: normal; background: #fff3bf; border-radius: 3px; padding: 0 2px; }
.sentence .meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.kgroup { margin-bottom: 14px; }
.kitem { background: #fff; border: 1px solid #e6e8ee; border-left-width: 4px; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.kitem .kn { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kitem .cnt { font-size: 11px; color: #8b93a7; font-weight: 400; }
.kitem .kd { font-size: 13px; color: #6b7385; margin-top: 2px; }
.kitem .kex { font-size: 13px; margin-top: 6px; }
.kitem .kex a { color: #3b4a8a; border-bottom: 1px dashed #b9c4f0; cursor: pointer; }
.structmap { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.srow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sblock { color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 14px; cursor: pointer; min-width: 76px; text-align: center; }
.sarrow { color: #b6bcc9; }
.stable { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 12px; overflow: hidden; }
.stable th, .stable td { border: 1px solid #e6e8ee; padding: 8px; text-align: left; vertical-align: top; }
.stable th { background: #f7f8fa; font-weight: 600; font-size: 12px; color: #6b7385; }

/* ---------- 样式集金字塔 ---------- */
.pyr { text-align: center; margin: 6px 0 14px; }
.pyr .tip { display: inline-block; background: #1f2430; color: #fff; border-radius: 10px; padding: 8px 18px; font-weight: 700; }
.pyr .stem2 { font-size: 12px; color: #8b93a7; margin-top: 6px; }
.dim { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.dim .dh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dim .dot { width: 10px; height: 10px; border-radius: 3px; }
.dim .dn { font-weight: 700; }
.dim .dc { font-size: 11px; color: #8b93a7; }
.blocks-wall { display: flex; gap: 6px; flex-wrap: wrap; }
.fblock { color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.fblock.z { opacity: .38; }

/* ---------- 浮动按钮 ---------- */
.fab { position: fixed; right: 14px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; align-items: stretch; }
.fab .main {
  width: 132px; height: 40px; border-radius: 999px; background: #fff; color: #1f2430;
  border: 1px solid #dfe2ea; font: inherit; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.fab.open .main { background: #1f2430; color: #fff; border-color: #1f2430; }
.fab .list { display: none; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.fab.open .list { display: flex; }
.fab .list button { width: 132px; height: 40px; background: #fff; border: 1px solid #dfe2ea; border-left: 4px solid #dfe2ea; border-radius: 999px; padding: 0 12px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab .list button.cur { background: #1f2430; color: #fff; border-color: #1f2430; }

.empty { text-align: center; color: #8b93a7; font-size: 14px; padding: 30px 10px; background: #fff; border: 1px dashed #dfe2ea; border-radius: 12px; }

@media (max-width: 480px) {
  body { font-size: 15px; }
  .para .pn { display: none; }
  .wrap { padding: 12px 10px 92px; }
  #lbar + .wrap { padding-top: 52px; }
  .topbar { padding: 8px 10px; }
  .sheet { padding: 16px 14px 22px; }
  /* 导航：手机端缩小，展开列表限高＋内部滚动，不再吃掉半屏 */
  .fab { right: 10px; bottom: 84px; }
  .fab .main { width: 86px; height: 38px; font-size: 12px; }
  .fab .list { gap: 3px; margin-bottom: 5px; max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .fab .list button { width: 86px; height: 38px; font-size: 11px; padding: 0 8px; border-left-width: 3px; }
  .fab .ghead { font-size: 9px; padding: 2px 4px 1px; }
}

/* ================= v1.1 首页：一行下拉框 ================= */
.sel-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sel {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%238b93a7'/></svg>") no-repeat right 10px center;
  border: 1px solid #dfe2ea; border-radius: 10px; padding: 9px 30px 9px 12px;
  font: inherit; font-size: 14px; color: #1f2430; min-height: 40px; cursor: pointer;
}
.sel:focus { outline: none; border-color: #1f2430; }
.sel:disabled { opacity: .5; cursor: not-allowed; }

/* ================= 紧贴文字的查词浮层 ================= */
.pop {
  display: none; position: absolute; z-index: 80; background: #fff;
  border: 1px solid #d9dde6; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(20,25,40,.16); font-size: 14px;
  height: auto; overflow: hidden;
  pointer-events: none;                 /* 文字区不吞点击：压住的正文仍可点选 */
}
.pop .btn, .pop .lnk { pointer-events: auto; }   /* 只有按钮可点 */
.pop.on { display: block; }
.pop::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px; background: #fff; border-left: 1px solid #d9dde6;
  border-top: 1px solid #d9dde6; transform: rotate(45deg);
}
.pop.up::before { top: auto; bottom: -6px; transform: rotate(225deg); }
/* 选中的文字：固定两行，超出内部滚动 */
.pop-sel {
  font-size: 15px; font-weight: 600; line-height: 1.5; color: #1f2430;
  height: 46px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  word-break: break-all; padding-right: 4px;
}
.pop-sel b, .pop-sel .py-in { font-weight: 800; color: #1f2430; }
/* 浮层顶部栏：左 AI、中把手、右 ✕；整条可拖动 */
.pop-bar {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between;
  height: 30px; margin: 0 0 6px; padding: 0 3px; cursor: grab; touch-action: none;
  background: #f4f6fa; border-radius: 8px;
}
.pop-bar:active { cursor: grabbing; }
.pop-bar .grip { width: 44px; height: 4px; border-radius: 2px; background: #b9c0cf; }
.pop-ai, .pop-x {
  width: 26px; height: 26px; line-height: 24px; text-align: center; border-radius: 50%;
  background: #fff; border: 1px solid #dfe2ea; font-weight: 700; cursor: pointer;
  pointer-events: auto; user-select: none; padding: 0;
}
.pop-ai { color: #3b4a8a; font-size: 12px; }
.pop-x { color: #5b6472; font-size: 15px; }
.pop-ai:active, .pop-x:active { background: #e2e6ee; }
.pop-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; height: 24px; overflow: hidden; }
.pop-h .py { font-size: 13px; color: #3b4a8a; letter-spacing: .4px; }
/* 中间信息区：固定高度，无论命中词表与否总高都不变 */
.pop-body { height: 92px; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-top: 4px; }
.pop-body .bm { font-size: 13px; line-height: 1.5; }
.pop-body .bmm { margin-top: 6px; background: #f3f8ff; border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.45; }
.pop-body .bmm b { color: #1971c2; }
.pop-sent { margin-top: 6px; background: #f7f8fa; border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.45; color: #4a5163; height: 46px; overflow-y: auto; }
.pop-btns { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* 手机端：字典浮层大幅缩小（放在基类之后，避免遮蔽 CSS 回归断言） */
@media (max-width: 480px) {
  .pop { height: auto; padding: 6px 9px; font-size: 12px; border-radius: 10px; }
  .pop-sel { height: 26px; font-size: 13px; padding-right: 4px; }
  .pop-h { height: 18px; gap: 5px; margin-top: 2px; }
  .pop-h .py { font-size: 11px; }
  .pop-body { height: 46px; margin-top: 2px; }
  .pop-body .bm { font-size: 12px; line-height: 1.4; }
  .pop-body .bmm { margin-top: 4px; padding: 4px 6px; font-size: 11px; }
  .pop-sent { height: 28px; margin-top: 4px; padding: 4px 6px; font-size: 11px; }
  .pop-btns { margin-top: 6px; gap: 6px; }
  .pop .btn.sm { font-size: 11px; padding: 5px 8px; }
  .pop-bar { height: 26px; margin: 0 0 4px; }
  .pop-ai, .pop-x { width: 24px; height: 24px; line-height: 22px; }
  .pop-bar .grip { width: 36px; }
}

/* ================= 阅读页：模式提示条（纯文字，不可点） ================= */
.lbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #fff; display: flex; align-items: center; gap: 5px; padding: 8px 12px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 1px solid #eef0f4; }
.lbar::-webkit-scrollbar { display: none; }
.lbar .mt { flex: 0 0 auto; font-size: 12px; color: #98a0b0; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.lbar .mt.on { color: #1f2430; background: #eef1f6; font-weight: 700; }
.lbar .sep { flex: 0 0 auto; color: #c8cdd8; font-size: 12px; }
.lbar .rmhint { font-size: 12px; color: #98a0b0; margin-left: 2px; }
/* 笔记模式：正文正常滚动（不再禁平移） */
/* 正文内笔记标注：按层级不同颜色下划线 */
#p-read .w.noted { cursor: pointer; border-radius: 2px; }
#p-read .w.noted.nl-段 { border-bottom: 3px solid #1971c2; background: #e7f1fb; }
#p-read .w.noted.nl-句 { border-bottom: 2px solid #2b8a3e; background: #eaf7ec; }
#p-read .w.noted.nl-词 { border-bottom: 2px solid #e8590c; background: #fff2e6; }
#p-read .w.noted.nl-字 { border-bottom: 2px solid #ae3ec9; background: #fbefff; }
/* 颜色标记：选中即深底白字加粗 */
#p-read .w.noted.nc-红 { background: #c92a2a; color: #fff; font-weight: 800; border-bottom-color: #a51e1e; }
#p-read .w.noted.nc-黄 { background: #b08900; color: #fff; font-weight: 800; border-bottom-color: #8a6b00; }
#p-read .w.noted.nc-绿 { background: #2b8a3e; color: #fff; font-weight: 800; border-bottom-color: #1f6b30; }
.nc-c-红 { color: #c92a2a; font-weight: 800; } .nc-c-黄 { color: #b08900; font-weight: 800; } .nc-c-绿 { color: #2b8a3e; font-weight: 800; }
.clr-红 { color: #c92a2a; } .clr-黄 { color: #b08900; } .clr-绿 { color: #2b8a3e; }
.nfc-row { flex-wrap: wrap; }
.nflab { font-size: 12px; color: #3d4457; margin-right: 2px; }
.ncol { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; margin-right: 6px; cursor: pointer; position: relative; border: 2px solid transparent; }
.ncol input { position: absolute; opacity: 0; width: 0; height: 0; }
.ncol-红 { background: #c92a2a; } .ncol-黄 { background: #b08900; } .ncol-绿 { background: #2b8a3e; }
.ncol-无 { background: #fff; border: 2px solid #cfd5e0; }
.ncol:has(input:checked) { box-shadow: 0 0 0 2px #1f2430; }
.tbmark { flex: 0 0 auto; margin-left: 8px; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid #2b8a3e; background: #fff; color: #2b8a3e; cursor: pointer; white-space: nowrap; }
.tbmark.on { background: #2b8a3e; color: #fff; }
.nf-hint { font-size: 11px; color: #98a0b0; font-weight: 400; }
/* 正文放大（只改正文 .pt；注释/解读/备注字号不变） */
.pt { font-size: 18px; line-height: 1.95; }
/* 顶部层级选择 */
.lbar .lvl { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #8b93a7; margin: 0 2px; }
.lbar .lvb { font-weight: 400; color: #6b7385; padding: 3px 9px; border-radius: 999px; border: 1px solid #dfe2ea; cursor: pointer; }
.lbar .lvb.on { background: #1f2430; color: #fff; border-color: #1f2430; font-weight: 700; }
/* 浮动＋号 */
.add-note { position: absolute; z-index: 78; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #2b8a3e; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(43,138,62,.4); display: none; align-items: center; justify-content: center; }
.add-note:active { transform: scale(.92); }
/* 段末内联笔记卡 */
.notecards { margin: 6px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.ncard { border: 1px solid #e6e8ee; border-left-width: 4px; border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 13px; }
.ncard.nl-段 { border-left-color: #1971c2; } .ncard.nl-句 { border-left-color: #2b8a3e; }
.ncard.nl-词 { border-left-color: #e8590c; } .ncard.nl-字 { border-left-color: #ae3ec9; }
.nc-tag { display: inline-block; font-size: 11px; color: #fff; background: #8b93a7; border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.ncard.nl-段 .nc-tag { background: #1971c2; } .ncard.nl-句 .nc-tag { background: #2b8a3e; }
.ncard.nl-词 .nc-tag { background: #e8590c; } .ncard.nl-字 .nc-tag { background: #ae3ec9; }
.nc-w { font-weight: 700; color: #1f2430; }
.nc-rm { margin: 4px 0; color: #3d4457; line-height: 1.5; }
.nc-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #6b7385; font-size: 12px; }
.nc-py { color: #3b4a8a; } .nc-fc { color: #c2255c; } .nc-fav { color: #e8590c; font-weight: 700; }
.nc-btn { float: right; margin-left: 10px; font-size: 12px; color: #1971c2; cursor: pointer; }
.nc-btn:hover { text-decoration: underline; }
/* 笔记编辑器（弹窗内，需可交互） */
.note-edit { pointer-events: auto; margin-top: 6px; max-height: 220px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nf { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 0; color: #3d4457; }
.nf input { width: 16px; height: 16px; }
.nf-auto { color: #3b4a8a; font-weight: 600; font-size: 12px; }
.nf-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; border: 1px solid #dfe2ea; border-radius: 8px; padding: 6px 8px; margin: 2px 0 4px; resize: vertical; }
.nf-fac { margin: 2px 0 4px; }
.nfd { margin-bottom: 4px; }
.nfd-t { display: inline-block; font-size: 11px; color: #8b93a7; margin-right: 6px; }
.nfc { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; margin: 2px 8px 2px 0; }
.nfc input { width: 14px; height: 14px; }
/* 因子大弹窗：按维度分组，一条一卡，名称＋定义＋本课词频，列表区独立滚动 */
.fac-wrap { max-height: 58vh; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-top: 4px; }
.fac-g { margin-bottom: 14px; }
.fac-h { font-size: 13px; font-weight: 700; color: #6741d9; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px dashed #e6e8ee; }
.fac-i { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e6e8ee; border-radius: 10px; padding: 9px 11px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.fac-i.on { border-color: #6741d9; background: #f6f3ff; }
.fac-i input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; }
.fac-tx { flex: 1; min-width: 0; }
.fac-n { display: block; font-size: 15px; font-weight: 600; }
.fac-d { display: block; font-size: 12.5px; color: #6b7385; line-height: 1.65; margin-top: 2px; }
.fac-f { flex: 0 0 auto; font-size: 11px; color: #98a1b3; white-space: nowrap; padding-top: 3px; }
/* 小浮层里的已选摘要 */
.fac-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 6px; }
.fs-chip { background: #f3f0ff; border: 1px solid #e2dcff; color: #4a3aa8; border-radius: 999px; padding: 2px 9px; font-size: 12.5px; }

/* ================= 左下多选胶囊 ================= */
.tray {
  position: fixed; left: 14px; bottom: 22px; z-index: 60; align-items: center; gap: 6px;
  background: #1f2430; color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); cursor: pointer;
}
.tray b { font-size: 14px; }
.tray i { opacity: .45; font-style: normal; }
.tray .lnk { margin-left: 6px; color: #a5d8ff; }

/* ================= 记忆：生字/生词卡（解释折叠在"解读"里） ================= */
.mcard { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.mc-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.mc-top .zi { font-size: 26px; font-weight: 700; }
.mc-top .wd { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.mc-top .py { font-size: 14px; color: #3b4a8a; }
.mc-body { display: none; padding: 0 14px 12px; border-top: 1px dashed #eceef3; }
.mc-body.on { display: block; }
.mc-mean { font-size: 15px; margin-top: 10px; }
.mc-body .ex { font-size: 13px; color: #6b7385; margin-top: 7px; padding-left: 8px; border-left: 2px solid #e6e8ee; }
.mc-body .memo { font-size: 13px; margin-top: 7px; background: #f3f8ff; border-radius: 8px; padding: 8px 10px; }
.mc-body .memo b { color: #1971c2; }

/* ================= 小控件 ================= */
.btn.sm { padding: 5px 11px; font-size: 12px; min-height: 32px; border-radius: 8px; }
.btn.ghost { background: #f7f8fa; color: #3b4a8a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.lnk { color: #3b4a8a; cursor: pointer; font-size: 13px; }
.inp { width: 100%; padding: 10px; border: 1px solid #dfe2ea; border-radius: 10px; font: inherit; font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%) translateY(10px); z-index: 120;
  background: rgba(31,36,48,.94); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; opacity: 0; transition: all .2s; pointer-events: none; max-width: 86vw;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.fab .list button.cur { background: #1f2430; color: #fff; border-color: #1f2430; }
.fac { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }

/* ================= 连续点击＝选区 ================= */
.art-click { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.art-click .w { padding: 2px 1px; border-radius: 3px; }
.art-click .w.sel { background: #ffe066; box-shadow: 0 0 0 1px #f5d34a inset; }
.kindtag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #fff3bf; color: #8a6100; }

/* ================= v1.3 记忆：方块阵列 + 解读池 ================= */
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 6px; }
.tile {
  background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 9px 6px;
  text-align: center; cursor: pointer; transition: transform .08s, background .15s, border-color .15s;
}
.tile:active { transform: scale(.96); }
.tile .tt { display: block; font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: .5px; }
.tile .tp { display: block; font-size: 11px; color: #8b93a7; margin-top: 2px; }
.tile.on { background: #1f2430; border-color: #1f2430; }
.tile.on .tt { color: #fff; }
.tile.on .tp { color: #a5d8ff; }
.tile { position: relative; }
.tadd { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #2b8a3e; background: #fff; color: #2b8a3e; font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tstar { position: absolute; top: 2px; left: 5px; color: #e8590c; font-size: 12px; }
.memtop { position: sticky; top: calc(var(--lbarH, 46px) - 1px); z-index: 15; background: #fff; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #eef0f4; }
.memcard { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e6e8ee; border-left: 4px solid #e8590c; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.memcard .mc-w { font-size: 20px; font-weight: 700; }
.memcard .mc-py { color: #3b4a8a; font-size: 13px; }
.memcard .mc-my { color: #6b7385; font-size: 13px; flex: 1; }
.memcard .mc-btn { color: #2b8a3e; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pool { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px 14px; min-height: 96px; }
/* 识字·字词清单的解读池：钉死高度＋逐行定位，点任何词条都不再改变外框，
   下方词格因此不再上下跳。.pool 另被"风格定调"复用，故固定高度只加在 #memPool 上。 */
#memPool { height: 280px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pool-r1 { height: 40px; display: flex; align-items: baseline; gap: 9px; overflow: hidden; }
.pool-r1 .pw { font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.pool-r1 .pp { font-size: 15px; color: #3b4a8a; }
.pool-r2 { height: 24px; margin-top: 2px; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.pool-r2 .flag.ph { opacity: .3; }
.pool-empty { display: block; margin-top: 14px; line-height: 1.8; }
.pool-mean { margin-top: 8px; font-size: 15px; line-height: 1.6; min-height: 50px; }
/* 例句与助记：压到一行高，字数超出只在本行内部上下滚，不外溢、不撑高外框 */
.pool-ex { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #4a5163; background: #f7f8fa; border-radius: 8px; padding: 5px 10px; height: 34px; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pool-memo { margin-top: 8px; font-size: 14px; line-height: 1.5; background: #f3f8ff; border-radius: 8px; padding: 5px 10px; height: 34px; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pool-ex b { color: #4a5163; }
.pool-memo b { color: #1971c2; }
.pool-btns { margin-top: 10px; min-height: 34px; display: flex; align-items: center; gap: 8px; }
.pool-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pool-h .pw { font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.pool-h .pp { font-size: 15px; color: #3b4a8a; }

/* ---------- 身份与本机数据（who.js 的面板） ---------- */
.who-box { background:#f7f8fa; border:1px solid #e6e8ee; border-radius:12px; padding:11px 13px; }
.who-t { font-size:13px; font-weight:700; color:#1f2430; margin-bottom:7px; }
.who-line { font-size:13.5px; color:#4a5163; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.who-line b { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:15px; letter-spacing:1px; background:#fff; border:1px solid #dfe2ea; border-radius:7px; padding:2px 9px; }
.who-line b.copied { border-color:#2b8a3e; color:#2b8a3e; }
.who-nick { display:flex; gap:8px; margin-top:8px; }
.who-nick input { flex:1; min-width:0; padding:7px 9px; border:1px solid #dfe2ea; border-radius:8px; font:inherit; font-size:13.5px; }
.who-act { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
#whoSwap { margin-top:9px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
#whoSwap input { flex:1; min-width:150px; padding:7px 9px; border:1px solid #dfe2ea; border-radius:8px; font:inherit; font-size:13.5px; }
.who-box .hint { display:block; margin-top:7px; font-size:12px; line-height:1.65; color:#8b93a7; }
.who-toast { position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:#1f2430; color:#fff;
  font-size:13px; padding:8px 14px; border-radius:999px; opacity:0; transition:opacity .2s; pointer-events:none; z-index:200; max-width:86vw; }
.who-toast.on { opacity:.95; }

/* ---------- 语境三态：概念条 / 结构图 / 分组解析卡 / 正文角标 ---------- */
.ctx-def { background: #fff; border: 1px solid #e6e8ee; border-left: 4px solid #6741d9; border-radius: 12px; padding: 13px 15px; margin-bottom: 14px; }
.ctx-def-h { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.ctx-def-b { margin-top: 7px; font-size: 14.5px; line-height: 1.95; color: #26303f; }
.ctx-struct { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 14px; }
.cs { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #dfe2ea; border-left-width: 3px; border-radius: 9px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; }
.cs b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #1f2430; color: #fff; font-size: 11px; font-weight: 700; }
.cs i { font-style: normal; font-size: 11px; color: #98a1b3; font-weight: 400; }
.ctx-g { margin-bottom: 14px; }
.ctx-g-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; border-left: 4px solid #6741d9; background: #f7f8fa; border-radius: 0 9px 9px 0; padding: 7px 11px; margin-bottom: 8px; }
.ctx-g-h b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #1f2430; color: #fff; font-size: 11.5px; }
.cx { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.cx.cx-wait { background: #fbfbfd; border-style: dashed; }
.cx-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-t { font-size: 16px; font-weight: 700; }
.cx-d { font-size: 12.5px; color: #8a93a6; margin-top: 4px; line-height: 1.65; }
.cx-f { margin-top: 8px; font-size: 15px; line-height: 1.9; color: #1d2230; }
.cx-f.cx-none { color: #98a1b3; font-size: 14px; }
.cx-n { margin-top: 8px; font-size: 13px; line-height: 1.75; color: #7a5a00; background: #fff8e6; border-radius: 8px; padding: 8px 10px; }
.cx-af { margin-top: 9px; padding-top: 8px; border-top: 1px dashed #eef0f4; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12.5px; }
.cx-af-l { color: #6741d9; font-weight: 600; margin-right: 2px; }
.cx-af b { background: #f3f0ff; border: 1px solid #e2dcff; color: #4a3aa8; border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.cx-af-j { margin-left: auto; }
.ctx-tip { background: #fff; border: 1px solid #e6e8ee; border-left: 4px solid #6741d9; border-radius: 12px; padding: 11px 13px; font-size: 13.5px; line-height: 1.8; color: #4a5163; margin-bottom: 12px; }
.ctx-mark { cursor: pointer; border-bottom: 2px solid #6741d9; }
.ctx-mark sup { font-size: 10px; color: #6741d9; margin-left: 2px; font-weight: 700; }

/* 窄屏覆盖：必须写在上面这些基类之后，否则同权重的后写基类会把媒体查询盖掉 */
@media (max-width: 480px) {
  /* 解读池位置钉住：吸顶高度由 JS 量出顶栏真实高度写入 --lbarH，两端共用，不再各写一个数 */
  .memtop { z-index: 20; }
  /* 窄屏每行会多折一行：外框相应加高一档，仍然钉死不跳；例句/助记在本行内部上下滚 */
  #memPool { height: 300px; }
  .pool-ex { height: 40px; }
  .pool-memo { height: 40px; }
  .cx-f { font-size: 14.5px; line-height: 1.85; }
  .cx-af-j { margin-left: 0; width: 100%; }
}

/* 原文中的字词色块（记忆模块展开原文时） */
.vmark {
  padding: 1px 3px; border-radius: 4px; cursor: pointer; line-height: 2.1;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  color: #c92a2a;                    /* 注释的字词＝红字（底色仍按教学要求分档） */
}
.vmark rt { font-size: 9px; font-weight: 400; color: #c92a2a; letter-spacing: 0; }
.mno { font-size: 10px; color: #c92a2a; vertical-align: super; margin-left: 1px; cursor: pointer; }
.fnote-line .mno { vertical-align: baseline; color: #c92a2a; }
.art-fused .para { line-height: 2.1; margin-bottom: 12px; }
.vmark:hover { filter: brightness(.93); }

/* 识字页的原文面板：紧凑排版，一屏看更多 */
.art-compact .para { padding: 2px 6px 2px 10px; margin: 0 0 1px; line-height: 1.65; }
.art-compact .pn { top: 5px; font-size: 10px; }
.art-compact .vmark { padding: 0 2px; }
.art-compact { font-size: 15px; }

/* ================= v2 十步三段 ================= */
.stepbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f3f8ff; border: 1px solid #d5e5f8; border-left-width: 4px;
  border-radius: 10px; padding: 9px 11px; margin-bottom: 12px;
}
.gtag { font-size: 11px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; background: #fff; }
.rchip { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #fff0f6; color: #c2255c; border: 1px dashed #f5b8cc; }
.step.th { background: #f3f0ff; color: #6741d9; }
.modtitle { position: sticky; top: 0; z-index: 30; background: #fff; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin: 0 0 10px; padding: 8px 0; border-bottom: 1px solid #eef0f4; }
.modtitle small { font-size: 12px; font-weight: 400; color: #8b93a7; }
.lback { font-size: 18px; line-height: 1; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dfe2ea; border-radius: 10px; background: #fff; color: #1f2430; text-decoration: none; flex: 0 0 auto; }
.lback:active { background: #eef1f6; }
.stag { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 0 0 3px; }
.stag .fchip, .stag .rchip { font-size: 10px; padding: 1px 6px; }
.phead { font-size: 15px; font-weight: 700; margin: 14px 0 2px; letter-spacing: 1px; }
.phead small { font-size: 12px; font-weight: 400; color: #8b93a7; letter-spacing: 0; }
.para.pflash { background: #fff3bf !important; }
.fnote { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.fnote-line {
  font-size: 12px; color: #6b7385; line-height: 1.7;
  border-left: 3px solid #ccc; padding: 2px 0 2px 8px;
}
.fnote-line .ftxt { margin-right: 6px; color: #c92a2a; }   /* 注释释义＝红字 */
.qmark { border-radius: 3px; padding: 0 1px; color: #c92a2a; -webkit-box-decoration-break: clone; box-decoration-break: clone; }   /* 正文中被标注的显形句＝红字 */
.ghead {
  font-size: 11px; letter-spacing: 1px; padding: 6px 4px 2px; text-align: right;
  font-weight: 700; background: transparent; border: 0;
}

/* ================= 总地图（可视化 · 就地展开） ================= */
.mbar-top { background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.mtitle { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.mtitle small { display: block; font-size: 12px; font-weight: 400; color: #8b93a7; letter-spacing: 0; margin-top: 2px; }
.mstat { font-size: 12px; color: #6b7385; margin-top: 6px; }
.mstatg { display: block; color: #8b93a7; margin-top: 2px; }
.mtools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mtog {
  font-size: 12px; padding: 6px 12px; border-radius: 999px; cursor: pointer; user-select: none;
  border: 1px solid #dfe2ea; background: #fff; color: #3d4457; min-height: 32px;
}
.mtog.on { background: #c92a2a; color: #fff; border-color: #c92a2a; }
.mlegend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: #6b7385; }
.mlegend span { display: inline-flex; align-items: center; gap: 4px; }
.mlegend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* 板块卡 */
.mboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mboard {
  background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 11px 12px 10px;
  cursor: pointer; user-select: none; position: relative; overflow: hidden;
}
.mboard.on { border-color: #1f2430; box-shadow: 0 0 0 1px #1f2430 inset; }
.mboard.gap { border-style: dashed; border-color: #ffc9c9; background: #fffafa; }
.mbw { height: 5px; border-radius: 999px; background: #eef0f5; overflow: hidden; margin-bottom: 8px; }
.mbw i { display: block; height: 100%; background: linear-gradient(90deg,#1971c2,#4c6ef5); border-radius: 999px; }
.mbt { font-size: 14px; font-weight: 700; line-height: 1.4; }
.mbs { font-size: 11px; color: #8b93a7; margin-top: 3px; min-height: 30px; }
.mbf { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.mw2 { font-size: 11px; font-weight: 700; color: #1971c2; }

/* 展开面板与树 */
.mpanel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mnode { background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; }
.mnode.gap { border-color: #ffc9c9; }
.mnode.mflash { background: #fff3bf !important; }
.mh { padding: 10px 12px; cursor: pointer; user-select: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mexp { font-size: 11px; color: #8b93a7; width: 12px; }
.mt { font-size: 14px; font-weight: 700; }
.msub { width: 100%; font-size: 11px; color: #8b93a7; padding-left: 18px; }
.mbar { width: 60px; height: 5px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.mbar i { display: block; height: 100%; background: #4c6ef5; }
.mw { font-size: 11px; color: #1971c2; font-weight: 700; }
.mtag { font-size: 10px; padding: 1px 7px; border-radius: 999px; border: 1px solid #dfe2ea; color: #6b7385; background: #fafbfc; }
.mtag.out { color: #c92a2a; border-color: #ffc9c9; background: #fff5f5; font-weight: 700; }
.mtag.sc { color: #a06a00; border-color: #ffe1a6; background: #fff8e6; }
.mcnt { font-size: 10px; color: #8b93a7; background: #f2f4f8; border-radius: 999px; padding: 1px 7px; }
.mjump { font-size: 11px; color: #2b8a3e; border: 1px dashed #b2f2bb; background: #f3faf4; border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.mref { font-size: 11px; color: #6741d9; }
.mkids { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 10px 18px; border-left: 2px solid #eef0f5; margin: 0 12px 10px 18px; }

/* 知识点色块 */
.mpts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px 30px; }
.mp {
  font-size: 12px; line-height: 1.5; padding: 3px 9px; border-radius: 8px; cursor: pointer; user-select: none;
  border: 1px solid #dfe2ea;
}
.mp b { font-weight: 700; }
.mp span { display: none; }
.mp.on { display: block; width: 100%; }
.mp.on span { display: block; font-weight: 400; color: #3d4457; margin-top: 2px; }
.mex { font-size: 12px; color: #c92a2a; padding: 0 12px 10px 30px; }
.medges { display: flex; flex-direction: column; gap: 4px; padding: 0 12px 10px 30px; }
.mlink {
  font-size: 11px; color: #6741d9; background: #f7f5ff; border: 1px solid #d5cbff;
  border-radius: 8px; padding: 3px 8px; cursor: pointer;
}

/* 内置码小标 */
.muid { font-size: 10px; color: #a8b0c0; font-family: ui-monospace, Consolas, monospace; margin-left: 4px; letter-spacing: 0; }
.mboard .muid { display: block; margin: 1px 0 0; }

/* 能力因子色块内的码与手段 */
.mp .afc { font-size: 9px; opacity: .62; font-family: ui-monospace, Consolas, monospace; margin-left: 4px; font-style: normal; }
.mp u { text-decoration: none; font-size: 9px; border-radius: 999px; padding: 0 5px; margin-left: 4px; background: rgba(255,255,255,.75); }
.mp em { display: block; font-style: normal; color: #6741d9; margin-top: 3px; font-size: 11px; }

/* 因子色块上的能力因子小标（课文页） */
.afref { font-style: normal; font-size: 9px; color: #6741d9; border: 1px solid #d5cbff; background: #f9f7ff; border-radius: 6px; padding: 0 4px; margin-left: 3px; cursor: pointer; font-family: ui-monospace, Consolas, monospace; vertical-align: 1px; }
.afref.cross { color: #a06a00; border-style: dashed; border-color: #ffe1a6; background: #fff8e6; }   /* 跨环节复用 */

/* 色块内的补录说明与新格标记 */
.mp .amd { display: block; font-style: normal; color: #a06a00; font-size: 11px; margin-top: 3px; }
.mp s { text-decoration: none; font-size: 9px; color: #a06a00; background: #fff8e6; border: 1px solid #ffe1a6; border-radius: 999px; padding: 0 5px; margin-left: 4px; }

/* ================= 矩阵：文体（列）× 六层（行） ================= */
.mx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 0; margin-bottom: 12px; }
table.mx { border-collapse: collapse; font-size: 12px; }
table.mx th, table.mx td { border: 4px solid #fff; }
table.mx th { font-weight: 700; color: #3d4457; padding: 4px 6px; text-align: center; white-space: nowrap; border-top: 0; }
table.mx th small { display: block; font-weight: 400; font-size: 10px; color: #8b93a7; }
table.mx th.colb { color: #2b8a3e; }
/* 钉住的层名列：贴左、左外边距与左内边距都为 0，右侧投影遮住滑过来的格子 */
table.mx th.rowh { position: sticky; left: 0; background: #fff; z-index: 2; text-align: right; padding: 4px 8px 4px 0; border-left: 0; min-width: 88px; box-shadow: 6px 0 8px -6px rgba(31,36,48,.28); }
table.mx thead th.rowh { border-top: 0; }
table.mx th.rowh i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-left: 5px; vertical-align: 1px; }
table.mx td { min-width: 62px; padding: 7px 6px; text-align: center; border-radius: 9px; background: #f7f8fa; box-shadow: inset 0 0 0 1px #eef0f5; }
table.mx td b { display: block; font-size: 15px; line-height: 1.2; }
table.mx td small { display: block; font-size: 9px; color: #8b93a7; }
table.mx td.empty { background: #fffafa; box-shadow: inset 0 0 0 1px #ffc9c9; }
table.mx td.empty em { font-style: normal; color: #c92a2a; font-size: 11px; }
table.mx td.part { background: #eef4ff; box-shadow: inset 0 0 0 1px #d5e5f8; }
table.mx td.lit1 { background: #fff3bf; box-shadow: inset 0 0 0 1px #ffe8a3; }
table.mx td.lit2 { background: #ffe08a; box-shadow: inset 0 0 0 1px #ffd43b; }
table.mx td.lit3 { background: #ffd43b; box-shadow: inset 0 0 0 1px #f59f00; }
table.mx td.on { box-shadow: inset 0 0 0 2px #1971c2; }
table.mx td[data-mx] { cursor: pointer; }
.mp k { font-style: normal; font-size: 9px; color: #2b8a3e; background: #ebfbee; border: 1px solid #b2f2bb; border-radius: 999px; padding: 0 5px; margin-left: 4px; }
.mx td.key { box-shadow: inset 0 0 0 1px #ffd43b; }
.mx td.key::after { content: '★'; position: relative; display: block; font-size: 9px; color: #f59f00; line-height: .8; margin-top: -2px; }
.mx td.sum { background: #f2f4f8; }
.mx td.sum b { color: #3d4457; }
.mx th .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 3px; vertical-align: 1px; }
.mx th.rowh small { display: block; font-weight: 400; font-size: 9px; color: #8b93a7; }
.mp s.add { color: #1971c2; background: #eef4ff; border-color: #d5e5f8; }

/* 写作网·评分量规面板 */
.rub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rb { font-size: 12px; line-height: 1.5; padding: 4px 9px; border-radius: 8px; color: #c2255c; background: #c2255c14; border: 1px solid #c2255c44; }
.rb b { font-weight: 700; }
.rb u { text-decoration: none; font-size: 10px; background: rgba(255,255,255,.8); border-radius: 999px; padding: 0 5px; margin-left: 4px; }
.rb span { display: none; }
.rb:hover span { display: block; color: #3d4457; margin-top: 3px; font-size: 11px; }

/* ================= 新导航：二级页签与总纲条 ================= */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip.sm { padding: 6px 12px; font-size: 13px; min-height: 34px; }
.abstat { font-size: 12px; color: #6b7385; background: #fff; border: 1px solid #e6e8ee; border-radius: 12px; padding: 8px 11px; margin-bottom: 12px; line-height: 1.7; }
.abstat b { color: #1f2430; }

/* ---------- 顶栏同步状态点（失败必须看得见） ---------- */
.sync-dot { flex: 0 0 auto; margin-left: auto; align-self: center; font-size: 11px; color: #98a1b3;
  border: 1px solid #e6e8ee; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.sync-dot.ok { color: #2b8a3e; border-color: #b2dfdb; background: #f0fbf2; }
.sync-dot.warn { color: #a06a00; border-color: #ffe3a3; background: #fff8e6; }
.sync-dot.bad { color: #c92a2a; border-color: #ffc9c9; background: #fff5f5; }
