/* 布局与组件 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  padding: 8px 14px;
  border: 2px solid var(--ink);
  z-index: 50;
}
.skip-link:focus { left: 8px; top: 8px; }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  background: var(--ink);
  color: #f2efe4;
  padding: 18px 16px 26px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand { color: #f2efe4; border-bottom-color: var(--ink-line); }
.sidebar .brand-name { color: #fff; }

.student-switch { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.student-switch label { font-size: 0.72rem; letter-spacing: 0.1em; opacity: 0.7; }
.student-switch select {
  width: 100%;
  padding: 8px 9px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #fff;
  background: var(--ink-soft);
  border: 2px solid var(--ink-line);
}
.sidebar-empty { font-size: 0.8rem; opacity: 0.75; }

.sidebar-week-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
.sidebar-week-nav a {
  text-align: center;
  font-size: 0.74rem;
  padding: 7px 2px;
  color: #eae6d8;
  text-decoration: none;
  background: var(--ink-soft);
  border: 2px solid var(--ink-line);
}
.sidebar-week-nav a:hover { background: var(--accent); border-color: #a8412a; color: #fff; }

.nav-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
  margin: 0 0 8px;
}

.main-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: #e9e5d8;
  text-decoration: none;
  border-left: 4px solid transparent;
  font-size: 0.94rem;
}
.nav-link:hover {
  /* 悬停给橙色，但比「当前页」浅一档（半透明 + 不加硬阴影）：
     这样「鼠标在这儿」和「你在这里」一眼能分清。
     原来只有 9% 白的底色，几乎看不出来（家长反馈）。 */
  background: rgba(232, 115, 74, 0.78);
  border-left-color: #fff;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}
.nav-link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* 选中态统一「抬起来」：实心填充 + 加粗左边线 + 加重的硬阴影。
   只留一条细的左侧竖线时，用户看不出到底选中没有（实测反馈），所以四者叠加。 */
.nav-link.is-active {
  background: var(--accent);
  border-left-color: #fff;
  color: #fff;
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}
.nav-short { display: none; }

.sidebar-note { font-size: 0.8rem; border-top: 2px dashed var(--ink-line); padding-top: 12px; }
.sidebar-note.account { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sidebar-note .who { opacity: 0.9; font-weight: 600; }
.sidebar-note a { color: var(--gold); }

/* ---------------- 主区 ---------------- */
.main { padding: 26px 30px 70px; max-width: 1200px; min-width: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
h1 { font-size: 1.65rem; margin: 0 0 4px; letter-spacing: 0.01em; }
h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.82rem; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small-link { color: var(--info); font-size: 0.85rem; text-decoration: none; }
.small-link:hover { text-decoration: underline; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid.narrow { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat-card { padding: 13px 15px; border-left-width: 6px; }
.stat-card.ok { border-left-color: var(--accent-2); }
.stat-card.warn { border-left-color: var(--accent); }
.stat-card.info { border-left-color: var(--info); }
.stat-top { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.stat-label { font-size: 0.82rem; }
.stat-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; margin: 2px 0 0; }
.stat-hint { font-size: 0.76rem; color: var(--muted); }
/* 可点的统计卡：整张卡是链接，悬停时给一点位移与箭头提示 */
.stat-card.stat-link { display: block; position: relative; text-decoration: none; color: inherit; }
.stat-card.stat-link:hover {
  border-color: var(--accent);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-lift);
}
.stat-card.stat-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* 箭头常态淡显、悬停变亮：触屏没有 hover，纯靠悬停提示等于没有提示 */
.stat-card.stat-link .stat-go {
  position: absolute; top: 7px; right: 10px; font-size: 0.95rem;
  color: var(--muted); opacity: 0.45;
}
.stat-card.stat-link:hover .stat-go,
.stat-card.stat-link:focus-visible .stat-go { opacity: 1; color: var(--accent); }

.card { padding: 15px 17px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }

.two-col {
  display: grid;
  /* minmax(0, 1fr) 而不是 1fr：1fr 不会小于内容的 min-content 宽度，
     错题那边的长句子会把右栏撑宽、把学习记录那栏挤窄（实测 616px vs 311px）。
     用 minmax(0, 1fr) 两栏才真正等宽，长文本靠 ellipsis 截断。 */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.two-col > .card { margin-bottom: 18px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  padding: 6px 8px;
  white-space: nowrap;
}
.data-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.data-table.compact { font-size: 0.85rem; }
.data-table.compact td { padding: 6px 6px; }
.cell-title { font-weight: 600; }
.cell-note { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { display: inline; }

/* ---- 入口页：一句话欢迎 + 一个大按钮 ---- */
.welcome {
  max-width: 30rem; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 0 4px;
}
.welcome-badge {
  width: 62px; height: 62px; display: grid; place-items: center;
  background: var(--accent); color: #fff; border: 3px solid var(--ink);
  box-shadow: var(--shadow); margin-bottom: 6px;
}
.welcome-badge svg { width: 30px; height: 30px; }
.welcome-title {
  margin: 0; font-size: 1.7rem; letter-spacing: -0.5px; line-height: 1.4;
}
.welcome-sub {
  margin: 0; font-family: var(--mono); font-size: 0.82rem; color: var(--muted);
  letter-spacing: 0.04em;
}
.welcome-line { margin: 8px 0 14px; color: var(--ink-soft); font-size: 0.92rem; }
.welcome-form { width: 100%; }
/* 大按钮：整个入口就这一个动作，所以做得够大、够明显 */
.welcome-enter {
  width: 100%; min-height: 68px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--accent); color: #fff;
  border: 3px solid var(--ink); box-shadow: var(--shadow-lift);
  font-family: inherit; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.06em;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.welcome-enter:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(24, 35, 74, 0.3); }
.welcome-enter:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(24, 35, 74, 0.3); }
.welcome-enter:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
.welcome-enter-arrow { font-size: 1.4rem; }
.welcome-note { margin: 14px 0 0; font-size: 0.86rem; color: var(--muted); }
.welcome-parent { margin: 4px 0 0; font-size: 0.86rem; color: var(--muted); }
.welcome-parent a { color: var(--info); }

/* 进站密码框：居中的一个大输入框 + 进入按钮 */
.gate-form { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gate-label { font-size: 0.86rem; color: var(--muted); letter-spacing: 0.06em; }
.gate-input {
  width: 100%; min-height: 56px; text-align: center;
  font-family: var(--mono); font-size: 1.25rem; letter-spacing: 0.22em;
  border: 3px solid var(--ink); background: #fff; color: var(--ink);
  box-shadow: var(--shadow-sm); padding: 6px 12px;
}
.gate-input:focus { outline: 3px solid var(--info); outline-offset: 2px; }
.gate-input::placeholder { letter-spacing: 0.1em; font-size: 1rem; }

/* ---- 当天学习：家长放内容，站点负责分类排版 ---- */
.study-form {
  border: 2px dashed var(--ink-line); background: var(--panel-2);
  padding: 12px 14px; margin-bottom: 14px;
}
.study-form-row { margin-bottom: 10px; }
.study-form-row label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.study-form textarea {
  width: 100%; font-family: var(--mono); font-size: 0.85rem; line-height: 1.7;
  border: 2px solid var(--ink); background: #fff; padding: 8px; resize: vertical;
}
.study-card {
  border: 2px solid var(--ink-line); background: #fff;
  padding: 10px 12px; margin-bottom: 12px; scroll-margin-top: 84px;
}
.study-card:target { box-shadow: 0 0 0 3px var(--accent); }
.study-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.study-title { font-weight: 700; }
.study-shot img { max-width: 100%; border: 2px solid var(--ink-line); display: block; }
.study-raw {
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word; margin: 8px 0 0;
  background: var(--panel-2); border-left: 3px solid var(--ink-line); padding: 8px 10px;
}

/* 双语对照：一句英文一行，中文紧随其下。行距放松，方便孩子指读。 */
.passage { margin: 6px 0 0; }
.para { border-left: 3px solid var(--ink-line); padding: 6px 0 6px 12px; margin-bottom: 14px; }
.para-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.para-no { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }
.pair { margin-bottom: 10px; }
.pair .en {
  margin: 0; font-size: 1.02rem; line-height: 1.75; font-weight: 600;
  font-family: var(--mono); letter-spacing: 0.01em;
}
.pair .zh { margin: 1px 0 0; font-size: 0.86rem; line-height: 1.7; color: var(--ink-soft); }
.passage .plain { margin: 0; font-size: 0.95rem; line-height: 1.9; white-space: pre-wrap; }
/* 跟读时标出来的词：读错的红底、读得不标准的黄底 */
.word-bad { background: #f7cfcf; border-bottom: 2px solid var(--danger); }
.word-warn { background: #fbeec2; border-bottom: 2px solid var(--gold); }
.word-ok { color: var(--ink); }

/* 跟读面板：听一句 → 读一句 → 看比对结果 */
.read-panel {
  border: 2px solid var(--info); background: #f4f8fd;
  padding: 10px 12px; margin: 0 0 10px;
}
.read-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.read-step { font-size: 0.74rem; color: var(--muted); font-family: var(--mono); }
.read-target {
  margin: 0 0 6px; font-family: var(--mono); font-size: 0.98rem; font-weight: 600;
  line-height: 1.7;
}
.read-status { margin: 0 0 6px; font-size: 0.84rem; color: var(--ink-soft); }
.read-result { font-size: 0.88rem; }
.read-label { margin: 0 0 4px; font-size: 0.8rem; color: var(--muted); }
.read-words { margin: 0 0 6px; font-family: var(--mono); font-size: 0.96rem; line-height: 1.9; }
.read-pass { margin: 0 0 6px; color: var(--ok); font-weight: 700; }
.read-note { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }
.btn.small { padding: 2px 10px; font-size: 0.8rem; }

.study-qa { margin-top: 14px; border-top: 2px dashed var(--ink-line); padding-top: 10px; }
.qa-title { font-size: 0.95rem; margin: 0 0 8px; }
.qa-list { margin: 0; padding-left: 0; list-style: none; }
.qa-list li {
  display: grid; grid-template-columns: 26px 1fr; gap: 4px 8px;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.qa-list li:last-child { border-bottom: 0; }
.q-no { font-family: var(--mono); font-weight: 700; color: var(--muted); }
.q-text { font-size: 0.95rem; }
.q-zh { display: block; font-size: 0.84rem; color: var(--ink-soft); }
.q-ans { grid-column: 2; font-size: 0.82rem; color: var(--ok); }
/* 批改结果：判定 + 孩子写的 + 正确答案 */
.qa-grade {
  grid-column: 2; margin-top: 6px; padding: 6px 8px;
  border-left: 4px solid var(--ok); background: #f2f8f2;
  display: flex; flex-direction: column; gap: 2px; font-size: 0.84rem;
}
.qa-grade.qa-bad { border-left-color: var(--danger); background: #fdf3f2; }
.qa-verdict { font-weight: 700; }
.qa-grade.qa-bad .qa-verdict { color: var(--danger); }
.qa-grade .qa-child { color: var(--ink-soft); }
.qa-grade .qa-right { color: var(--ok); font-weight: 600; }
.qa-grade.qa-bad .qa-right { color: var(--ok); }
.qa-comment { color: var(--muted); font-size: 0.8rem; }
.qa-form {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px;
  border: 2px dashed var(--ink-line); background: var(--panel-2);
}
.qa-upload { font-weight: 600; }
.qa-shot { margin-top: 10px; max-width: 420px; }
.btn.ghost.small { padding: 1px 8px; font-size: 0.76rem; }
.inline-form { display: inline; }
/* 周看板上那两块「定高窗口」：
   窗口高度按整数行算（记录 5 行、错题 6 行），多出来的在窗口内上下滚动。

   **行高必须由构造保证，不能靠内容撑**：表格里 height 只是最小值，
   标题一换行行就变高（窄屏实测 144px），"刚好 5 行"就装不下、最后一行被切一半。
   所以记录用固定表格布局 + 标题单行省略，错题用不换行 + 题干省略。 */
.window-rows {
  overflow-y: auto; scrollbar-width: thin;
  /* 末尾 +2px 是留给亚像素舍入的余量：实测 5 行内容是 225px 而按公式算是 224px，
     差这 1px 就会凭空冒出一条滚动条。2px 远小于一行（38px），不会漏出下一条。 */
  /* 用 height 而不是 max-height：max-height 只封顶，内容少的时候窗口会跟着缩，
     两块面板的高度就随记录条数变来变去。固定高度后记录少时下方留白、
     记录多时窗口内滚动，面板尺寸始终一致。 */
  /* 两块面板共用 --win-h：一样大是硬性要求，谁也别单独改行数或行高 */
  height: var(--win-h, calc(var(--win-head, 0px) + var(--win-row, 38px) * var(--rows, 5) + 2px));
  max-height: calc(var(--win-head, 0px) + var(--win-row, 38px) * var(--rows, 5) + 2px);
}
.window-rows .data-table.compact { table-layout: fixed; }
.window-rows .data-table.compact th,
.window-rows .data-table.compact td { overflow: hidden; vertical-align: middle; }
.window-rows .data-table.compact th { height: var(--win-head, 34px); }
/* 行高必须跟着 --win-row 走，不能写死：写死 38px 时窗口按 40px 算高度，
   5 行只占 195px，底下会露出第 6 行的一截（实测露出 7px，看着像被切断的行）。 */
.window-rows .data-table.compact tbody tr { height: var(--win-row, 38px); }
/* 行分隔线用 td 上的 inset 阴影，不用 border：
   折叠边框会让每行多算 1px（实测 5 行就多 5px），窗口就装不下第 5 行。
   阴影不参与布局，行高才是准的。 */
.window-rows .data-table.compact tbody td {
  border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line);
}
.row-link-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-rows > .mini-list { gap: 0; }
.window-rows .mini-item {
  height: var(--win-row, 40px); flex-wrap: nowrap; overflow: hidden;
  border-bottom: 1px dashed var(--line);
}
.window-rows .mini-item:last-child { border-bottom: 0; }
.window-rows .mini-item .mini-stem {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.window-rows .mini-item > .muted {
  flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 整行可点：标题里的链接用 ::after 铺满整行，点行内任意位置都算点它；
   同时留着一个真链接，键盘 Tab 也能到。 */
.data-table tr.row-clickable { position: relative; cursor: pointer; }
.data-table tr.row-clickable:hover td { background: var(--panel-2); }
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; }
/* 操作按钮必须浮在覆盖层之上，否则整行链接会把「编辑/删除」吃掉 */
.data-table tr.row-clickable .row-actions { position: relative; z-index: 2; }

/* 从看板跳进来时高亮那一条，否则用户不知道该看哪一行。
   同样用「填色 + 左边粗条」而不是一条细竖线。 */
/* 锚点行不再常驻高亮：从看板点进来时会定位到那一行，但一旦看别处就该恢复原样，
   所以这里刻意不写 :target 样式（下面这条留作说明用的空规则）。 */
.data-table tbody tr:target td.never-match {
  background: #fdf3d8;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}
/* （锚点行的左侧色条也已去掉） */
a.mini-item { text-decoration: none; color: inherit; }
a.mini-item:hover { background: var(--panel-2); border-left: 4px solid var(--accent); }
.q-card, .data-table tbody tr { scroll-margin-top: 84px; }
.q-card:target { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.study-card:target { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lift); }

.link-btn {
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--info);
  text-decoration: underline;
}
.link-btn:hover { background: none; color: var(--ink); }
.link-btn.ok { color: var(--accent-2); }
.link-btn.danger { color: var(--danger); }

/* 筛选 */
.filter-bar { display: flex; gap: 7px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-sep { width: 2px; height: 18px; background: var(--line); margin: 0 4px; }
.chip {
  font-size: 0.82rem;
  padding: 4px 11px;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.chip:hover { background: #fff4e2; }
.chip.is-active {
  background: var(--ink); color: #fff;
  box-shadow: 3px 3px 0 rgba(24, 35, 74, 0.28);
  transform: translate(-1px, -1px);
}

/* 错题卡 */
.wrong-list { display: flex; flex-direction: column; gap: 12px; }
.wrong-card { padding: 13px 15px; border-left-width: 6px; }
.wrong-card.is-done { border-left-color: var(--accent-2); background: #fbfdf9; }
.wrong-card:not(.is-done) { border-left-color: var(--accent); }
.wrong-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.wrong-source { font-size: 0.76rem; color: var(--muted); }
.wrong-stem { margin: 0 0 8px; font-size: 0.95rem; }
.wrong-answers { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ans { font-family: var(--mono); font-size: 0.8rem; padding: 3px 8px; border: 2px solid var(--line); background: #f7f4ea; }
.ans.bad { border-color: #d9a08c; background: #fdeee6; }
.ans.good { border-color: #9ec9b0; background: #e9f6ee; }
.wrong-note { margin: 0 0 8px; font-size: 0.85rem; color: var(--ink-soft); }
.wrong-list.compact .wrong-card { box-shadow: none; padding: 10px 12px; }
.wrong-list.compact .wrong-stem { font-size: 0.88rem; }

/* 表单 */
.form-card { }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.form-grid .col-2 { grid-column: 1 / -1; }
/* grid 项默认 min-width:auto，一张宽图会把整列顶破，必须允许收缩 */
.form-grid > * { min-width: 0; }
.form-grid > p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.form-grid label { font-size: 0.8rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffef9;
  border: 2px solid var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fffdf3; }
textarea { resize: vertical; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.inline-form { align-items: end; }
.inline-form label { font-size: 0.78rem; }

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  border: 2px dashed var(--line);
  padding: 18px;
  text-align: center;
  margin: 0;
}
.empty-card { text-align: center; }
.empty-card .empty { margin-bottom: 14px; }

.messages { margin-bottom: 14px; }
.msg { margin: 0 0 8px; padding: 9px 13px; border: 2px solid var(--ink); font-size: 0.88rem; box-shadow: var(--shadow-sm); }
.msg.ok { background: #dcf2e5; border-color: #2f6b4b; }
.msg.err { background: #fbe0dc; border-color: #a8412a; }
.notice { padding: 10px 14px; border: 2px dashed var(--ink-line); background: #fdf6e0; margin-bottom: 16px; font-size: 0.88rem; }

.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.child-card form { margin-top: 10px; }
.danger-zone { border-top: 2px dashed var(--line); padding-top: 8px; margin-top: 6px; }

code { font-family: var(--mono); font-size: 0.84rem; background: #efeadd; padding: 1px 5px; border: 1px solid var(--line); }

/* ---------------- 登录 / 注册 ---------------- */
.auth-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  max-width: 1080px;
  margin: 0 auto;
  align-items: center;
  gap: 40px;
  padding: 40px 30px;
}
.auth-intro h1 { font-size: 2.1rem; line-height: 1.35; margin: 6px 0 14px; }
.auth-intro p { color: var(--muted); }
.auth-intro .brand { border-bottom: none; margin-bottom: 26px; }
.auth-pixels { display: flex; gap: 14px; margin-top: 26px; color: var(--ink); opacity: 0.5; }
.auth-pixels .pixel-icon { width: 26px; height: 26px; }
.auth-box { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 24px; }
.auth-box .section-title { margin: 8px 0 4px; font-size: 1.3rem; }
.auth-box .form-grid { grid-template-columns: 1fr; margin-top: 14px; }
.auth-box .form-grid button { grid-column: 1 / -1; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.auth-actions form { margin: 0; }
.auth-alternate { margin-top: 16px; font-size: 0.88rem; color: var(--muted); }
.guest-entry-note { margin-top: 8px; }

/* 游客只读：主区里的修改表单直接隐藏（退出登录按钮在侧栏，不受影响） */
body[data-guest="true"] .main form[method="post"] { display: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar-week-nav { margin-bottom: 0; }
  .main-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
  .nav-link { border-left: none; border-bottom: 3px solid transparent; padding: 7px 10px; font-size: 0.85rem; }
  .nav-link.is-active { border-left: none; border-bottom-color: var(--accent); }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .nav-label { display: none; }
  .main { padding: 18px 14px 60px; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px; }
  .auth-intro h1 { font-size: 1.6rem; }
  h1 { font-size: 1.35rem; }
}

@media print {
  .sidebar, .head-actions, .row-actions, .filter-bar, .form-card, form { display: none !important; }
  .shell { grid-template-columns: 1fr; }
}

/* ==========================================================================
   模板模块：知识树 / 图表 / 逐题档案 / 材料 / 反馈 / 更多 / 入口页
   ========================================================================== */

/* ---- 学科配色（类名沿用中文，便于与服务端拼接保持一致） ---- */
.subj-tag {
  display: inline-block; font-size: 0.76rem; padding: 1px 8px; border: 2px solid var(--ink-soft);
  background: #eef1f9; color: var(--ink-soft); white-space: nowrap;
}
.subj-语文 { border-color: #b8562f; background: #ffe6d5; color: #8f3f1c; }
.subj-数学 { border-color: #2f5f92; background: #dbe9f8; color: #234f7d; }
.subj-英语 { border-color: #2f6b4b; background: #d9f0e2; color: #23553b; }
.subj-未分类 { border-color: #8a8674; background: #e8e5da; color: #5e5c50; }
.subj-dot { width: 10px; height: 10px; display: inline-block; border: 2px solid var(--ink); background: #ccc; }
.subj-dot.subj-语文 { background: var(--accent); }
.subj-dot.subj-数学 { background: var(--info); }
.subj-dot.subj-英语 { background: var(--accent-2); }

/* ---- 入口页 ---- */
.entry-shell {
  max-width: 620px; margin: 0 auto; min-height: 100vh; padding: 12vh 24px 60px;
  display: flex; flex-direction: column; gap: 18px;
}
.entry-shell .brand { border-bottom: 2px dashed var(--ink-line); padding-bottom: 16px; }
.entry-title { font-size: 1.9rem; margin: 8px 0 0; }
.entry-sub { color: var(--muted); margin: 0 0 6px; }
.entry-picker { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.entry-picker > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 700; display: flex;
  justify-content: space-between; align-items: center; border-bottom: 2px solid var(--line);
}
.picker-chevron { opacity: 0.6; }
.entry-options { display: flex; flex-direction: column; }
.lab-option { padding: 14px 16px; border-bottom: 1px dashed var(--line); }
.lab-option:last-child { border-bottom: none; }
.entry-link {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 12px 14px; border: 2px solid var(--ink); background: #fff8e8;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.entry-link:hover { background: #fff2d8; }
.entry-link.as-button { font-family: inherit; }
.entry-link i {
  width: 9px; height: 9px; display: inline-block; margin-right: 8px;
  background: var(--muted); border: 1px solid var(--ink); vertical-align: middle;
}
.lab-option[data-state="online"] .entry-link i { background: var(--accent-2); }
.lab-option[data-state="offline"] .entry-link i { background: var(--danger); }
.lab-status { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
.entry-dot { margin: 0 8px; opacity: 0.5; }

/* ---- 折线图 ---- */
.chart-card { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.chart-title { font-weight: 700; }
.line-chart { width: 100%; height: auto; display: block; }
.chart-grid line { stroke: var(--line); stroke-width: 1; }
.chart-grid text { fill: var(--muted); }
.chart-axis text { fill: var(--muted); }
.chart-line polyline { fill: none; stroke: var(--info); stroke-width: 2.5; }
.chart-line circle { fill: var(--card); stroke: var(--info); stroke-width: 2.5; }
.chart-line text { fill: var(--ink); }

/* ---- 分支错误率 ---- */
.ebar-chart { display: flex; flex-direction: column; gap: 9px; }
.ebar-row { display: grid; grid-template-columns: 150px 1fr 46px 96px; gap: 8px; align-items: center; font-size: 0.85rem; }
.ebar-name { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebar-track { height: 16px; border: 2px solid var(--ink); background: #efeadd; }
.ebar-fill { display: block; height: 100%; }
.ebar-fill.danger { background: var(--accent); }
.ebar-fill.warn { background: var(--gold); }
.ebar-fill.ok { background: var(--accent-2); }
.ebar-value { font-family: var(--mono); font-weight: 700; text-align: right; }
.ebar-sub { font-size: 0.74rem; color: var(--muted); text-align: right; }

/* ---- 学科卡片 ---- */
.subject-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.subject-card { background: var(--card); border: 2px solid var(--ink); border-top-width: 6px; box-shadow: var(--shadow-sm); padding: 12px 14px; }
.subject-card.subj-border-语文 { border-top-color: var(--accent); }
.subject-card.subj-border-数学 { border-top-color: var(--info); }
.subject-card.subj-border-英语 { border-top-color: var(--accent-2); }
.subject-name { font-weight: 700; font-size: 1.05rem; }
.subject-nums { font-size: 0.85rem; color: var(--muted); margin: 2px 0 6px; }
.subject-sep { margin: 0 6px; }
.subject-rate { font-family: var(--mono); font-weight: 700; font-size: 0.9rem; }
.subject-rate.ok { color: var(--accent-2); }
.subject-rate.warn { color: #b8562f; }
.subject-rate.danger { color: var(--danger); }
.subject-meter { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

.meter { flex: 1; height: 10px; border: 2px solid var(--ink); background: #efeadd; display: inline-block; }
.meter i { display: block; height: 100%; background: var(--info); }
.meter.ok i { background: var(--accent-2); }
.meter.warn i { background: var(--gold); }
.meter.danger i { background: var(--accent); }
.meter-value { font-family: var(--mono); font-size: 0.78rem; }

/* ---- 知识树 ---- */
.ktree { display: flex; flex-direction: column; gap: 14px; }
.ktree-subject { border: 2px solid var(--ink); background: #fffdf6; }
.ktree-subject-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: #f2eee2; border-bottom: 2px solid var(--line); }
.ktree-branch { border-bottom: 1px dashed var(--line); }
.ktree-branch:last-child { border-bottom: none; }
.ktree-branch > summary { cursor: pointer; display: flex; justify-content: space-between; padding: 8px 12px 8px 26px; font-weight: 600; font-size: 0.92rem; }
.ktree-branch > summary:hover { background: #fff8e8; }
.ktree-branch-name { position: relative; }
.ktree-stat { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.ktree-points { list-style: none; margin: 0; padding: 0 12px 8px 34px; }
.ktree-points li { border-top: 1px dotted var(--line); }
.ktree-points a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px; font-size: 0.86rem; color: var(--info); text-decoration: none; }
.ktree-points a:hover { background: #fff8e8; text-decoration: underline; }

/* ---- 排行 / 计划 ---- */
.rank-list, .plan-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; padding: 5px 0; border-bottom: 1px dotted var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-path { color: var(--ink); }
.rank-nums { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 0.88rem; }
.plan-list li:last-child { border-bottom: none; }

/* ---- 逐题档案 ---- */
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-card { background: var(--card); border: 2px solid var(--ink); border-left-width: 6px; box-shadow: var(--shadow-sm); padding: 12px 15px; }
.q-card.status-错误 { border-left-color: var(--accent); }
.q-card.status-部分正确 { border-left-color: var(--gold); }
.q-card.status-未作答 { border-left-color: var(--line); }
.q-card.status-待核对 { border-left-color: var(--info); }
.q-card.status-不适用 { border-left-color: #b9b2a0; }
.q-card.status-正确 { border-left-color: var(--accent-2); }
.q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.qtype-tag { font-family: var(--mono); font-size: 0.7rem; padding: 1px 6px; border: 1px dashed var(--ink-soft); color: var(--ink-soft); }
.q-number { font-family: var(--mono); font-size: 0.78rem; }
.q-node { font-size: 0.78rem; color: var(--muted); }
.q-stem { margin: 0 0 8px; font-size: 0.95rem; }
.q-answers { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.q-note { margin: 0 0 8px; font-size: 0.85rem; color: var(--ink-soft); }
.q-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.76rem; color: var(--muted); }
.q-meta { color: var(--muted); }

/* ---- 复测清单 ---- */
.drill-list { list-style: none; margin: 0; padding: 0; counter-reset: drill; }
.drill-item { padding: 10px 0; border-bottom: 1px dotted var(--line); }
.drill-item:last-child { border-bottom: none; }
.drill-stem { display: flex; gap: 8px; font-size: 0.92rem; }
.drill-no { font-family: var(--mono); color: var(--muted); }
.drill-answer > summary { cursor: pointer; font-size: 0.8rem; color: var(--info); margin-top: 6px; }
.drill-answer p { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; }

/* ---- 材料归档 ---- */
.material-list { display: flex; flex-direction: column; gap: 10px; }
.material-card { background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); padding: 11px 14px; }
.material-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.material-title { font-weight: 700; }
.material-meta { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.material-pages { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.material-page {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; font-size: 0.72rem; color: var(--muted);
}
.material-page img {
  display: block; width: 96px; height: 128px; object-fit: cover; object-position: top;
  border: 2px solid var(--ink); background: #fff;
}
.material-page:hover img { border-color: var(--accent); }
.material-page-actions { display: flex; gap: 6px; align-items: center; }
.material-page-actions form { display: inline; margin: 0; }
.material-page-actions .link-btn { font-size: 0.9rem; text-decoration: none; }
.material-page-actions .link-btn[disabled] { opacity: 0.3; cursor: not-allowed; }
.material-page-actions .link-btn.danger { color: var(--danger); }

/* ---- 反馈 / 更多 / 导出 / 用量 ---- */
.feedback-item { padding: 10px 0; border-bottom: 1px dotted var(--line); }
.feedback-item:last-child { border-bottom: none; }
.feedback-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.feedback-author { font-weight: 700; font-size: 0.9rem; }
.feedback-item p { margin: 0; font-size: 0.9rem; }
.inline-action { display: inline; }
.provider-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }

.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.more-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; text-decoration: none;
  color: var(--ink); background: #fffdf6; border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
.more-card:hover { background: #fff8e8; }
.more-icon { color: var(--ink-soft); display: flex; }
.more-text { display: flex; flex-direction: column; flex: 1; }
.more-text small { color: var(--muted); font-weight: 400; }
.more-arrow { color: var(--muted); }
.export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.usage-chart { display: flex; flex-direction: column; gap: 8px; }
.usage-row { display: grid; grid-template-columns: 130px 1fr 170px; gap: 10px; align-items: center; font-size: 0.85rem; }
.usage-bar { height: 14px; border: 2px solid var(--ink); background: #efeadd; }
.usage-bar i { display: block; height: 100%; background: var(--info); }
.usage-value { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-align: right; }


/* ---- 其它 ---- */
.side-link { display: flex; align-items: center; gap: 8px; color: #e9e5d8; text-decoration: none; font-size: 0.88rem; padding: 6px 8px; }
.side-link:hover { background: rgba(255, 255, 255, 0.09); }
.side-link.is-active { background: rgba(232, 115, 74, 0.2); color: #fff; font-weight: 600; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.filter-form select, .filter-form input[type="text"] { width: auto; min-width: 130px; }
.filter-note { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.chip-label { font-size: 0.76rem; color: var(--muted); margin-right: 2px; }
.card-head-right { display: flex; align-items: center; gap: 10px; }
.lead { font-size: 1rem; line-height: 1.7; margin: 0; }
.kv-list { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; margin: 0; font-size: 0.9rem; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.book-card { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: var(--shadow-sm); }
.book-card strong { font-size: 0.92rem; }
input[type="file"] { padding: 6px; background: #fffef9; border: 2px dashed var(--ink); font-size: 0.85rem; }
.mini-list { display: flex; flex-direction: column; gap: 7px; }
.mini-item { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; flex-wrap: wrap; }
.mini-stem { flex: 1; min-width: 120px; }

@media (max-width: 900px) {
  .ebar-row { grid-template-columns: 110px 1fr 42px; }
  .ebar-sub { grid-column: 2 / -1; text-align: left; }
.usage-row { grid-template-columns: 88px 1fr; }
.usage-value { grid-column: 2; text-align: left; }
  .q-foot { flex-direction: column; gap: 4px; }
}

/* ---- 原图定位 ---- */
.region-section { border-top: 2px dashed var(--line); padding-top: 10px; }
.region-title { font-weight: 700; margin: 0 0 4px; }
.region-picker { margin-top: 8px; }
.region-picker p { margin: 0 0 6px; }
.region-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.region-tab {
  font: inherit; font-size: 0.82rem; padding: 4px 12px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.region-tab.is-active { background: var(--ink); color: #fff; }
.region-stage {
  display: block; max-width: 100%; max-height: 720px; overflow: auto;
  border: 2px solid var(--ink); background: #fff; line-height: 0;
}
/* 高亮框的百分比必须相对「图片本身」而不是滚动容器，否则图片比容器高时框会错位 */
.region-canvas { position: relative; display: inline-block; line-height: 0; }
.region-stage img {
  display: block; max-width: 100%; height: auto; user-select: none;
  -webkit-user-drag: none; touch-action: none; cursor: crosshair;
}
.region-box {
  position: absolute; border: 3px solid var(--accent); background: rgba(232, 115, 74, 0.16);
  box-shadow: 0 0 0 9999px rgba(24, 35, 74, 0.32); pointer-events: none;
}
.region-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.region-actions .link-btn { border: none; background: none; }

.origin-block { margin: 8px 0; }
.q-crop-link { display: inline-block; max-width: 320px; }
.q-crop { display: block; max-width: 100%; border: 2px solid var(--ink); background: #fff; }
.origin-view > summary { cursor: pointer; font-size: 0.8rem; color: var(--info); margin-top: 6px; }
.origin-figure { position: relative; display: inline-block; max-width: 100%; margin-top: 8px; border: 2px solid var(--ink); line-height: 0; }
.origin-figure img { display: block; max-width: 100%; height: auto; }
.origin-highlight {
  position: absolute; border: 3px solid var(--accent); background: rgba(232, 115, 74, 0.22);
  box-shadow: 0 0 0 9999px rgba(24, 35, 74, 0.34);
}
.material-thumb { display: block; max-width: 220px; max-height: 150px; border: 2px solid var(--ink); margin-top: 8px; }

/* ---- 裁切图批注 ---- */
.annotate { margin-top: 8px; }
.annotate > summary { cursor: pointer; font-size: 0.8rem; color: var(--info); }
.annotate-body { margin-top: 8px; }
.annotate-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
/* 文字按钮做成小方块，免得「撤销一笔」「全部清空」糊成一串看不清 */
.annotate-toolbar .link-btn {
  padding: 2px 8px; border: 2px solid var(--ink-line); background: #fff;
  box-shadow: var(--shadow-sm); text-decoration: none;
}
.annotate-sep { width: 2px; height: 18px; background: var(--ink-line); }
.annotate-stamp {
  padding: 2px 10px; cursor: pointer; font: inherit; font-size: 0.82rem;
  border: 2px solid var(--ink-line); background: #fff; box-shadow: var(--shadow-sm);
}
.annotate-stamp:hover { border-color: var(--ink); }
.annotate-stamp.is-active { background: var(--accent); border-color: var(--ink); color: #fff; }
.annotate-text-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--muted);
}
.annotate-text-label input {
  width: 96px; padding: 2px 6px; font: inherit; font-size: 0.82rem;
  border: 2px solid var(--ink-line); background: #fff;
}
.annotate-color {
  width: 24px; height: 24px; padding: 0; cursor: pointer; flex: 0 0 auto;
  background: var(--c); border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
.annotate-color.is-active { outline: 3px solid var(--ink); outline-offset: 1px; }
/* 图片打底、透明画布覆盖：JS 没加载出来时至少还能看到裁切图。
   尺寸全部由图片决定，画布绝对定位铺满，避免出现「框比图高」的空档。 */
.annotate-stage {
  position: relative; display: block; width: 100%; max-width: 900px;
  border: 2px solid var(--ink); background: #fff; line-height: 0;
}
.annotate-stage img { display: block; width: 100%; height: auto; }
.annotate-stage canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair;
}
.annotate-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.annotate-save .muted { flex: 1 1 240px; min-width: 0; }
.q-section {
  font-size: 0.74rem; padding: 1px 7px; border: 2px dashed var(--ink-line);
  color: var(--ink-soft); background: #f4f1e6;
}

/* ---- 按大题栏目看正确率 ---- */
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.section-block { border: 2px solid var(--ink-line); background: var(--paper); }
.section-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px; border-bottom: 2px solid var(--ink-line); background: var(--panel-2);
}
.section-list { display: flex; flex-direction: column; }
.section-item { border-bottom: 1px dashed var(--ink-line); }
.section-item:last-child { border-bottom: 0; }
.section-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  text-decoration: none; color: inherit;
}
.section-row:hover { background: var(--panel-2); }
.section-nodes {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 0 10px 7px 10px;
}
.node-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; font-size: 0.72rem;
  border: 2px solid var(--ink-line); background: #fff;
}
.node-chip b { color: var(--danger); font-weight: 700; }
.section-name { flex: 1 1 auto; min-width: 0; font-size: 0.84rem; }
.section-nums { flex: 0 0 auto; font-size: 0.74rem; color: var(--muted); }
.section-rate {
  flex: 0 0 auto; min-width: 46px; text-align: right;
  font-size: 0.84rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.section-rate.tone-ok { color: var(--ok); }
.section-rate.tone-warn { color: var(--warn); }
.section-rate.tone-danger { color: var(--danger); }

/* ---- 周复测：按栏目组卷 ---- */
.drill-text { flex: 1 1 auto; min-width: 0; }
.drill-crop { display: inline-block; margin: 6px 0 0 34px; max-width: 100%; }
.drill-crop img {
  display: block; max-width: 460px; max-height: 150px; width: auto; height: auto;
  border: 2px solid var(--ink-line); background: #fff;
}
.drill-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0 34px; }
.drill-actions form { display: inline; margin: 0; }
.drill-actions button { font-size: 0.78rem; padding: 2px 10px; }

/* ---- 邀请码管理（仅管理员可见） ---- */
.invite-create { margin-bottom: 12px; }
.invite-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.invite-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.invite-form input { padding: 3px 8px; font: inherit; font-size: 0.86rem; border: 2px solid var(--ink-line); background: #fff; }
.invite-form input[type="number"] { width: 74px; }
.invite-sub { margin: 12px 0 6px; font-size: 0.86rem; }
.invite-list { display: flex; flex-direction: column; gap: 4px; }
.invite-row {
  display: flex; align-items: center; gap: 12px; padding: 5px 10px;
  border: 2px solid var(--ink-line); background: #fff;
}
.invite-row.used { background: var(--panel-2); }
.invite-row form { margin: 0 0 0 auto; }
.invite-code {
  font-family: ui-monospace, Consolas, monospace; font-size: 1rem;
  letter-spacing: 2px; font-weight: 700; padding: 1px 8px;
  background: var(--panel-2); border: 2px solid var(--ink-line);
}
/* 邀请链接：整条可见、可选中，方便直接发给对方 */
.invite-link {
  flex: 1 1 260px; min-width: 160px; padding: 3px 8px;
  font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem;
  color: var(--ink-soft); background: var(--panel-2);
  border: 2px solid var(--ink-line); cursor: text;
}
.invite-row .muted { flex: 0 1 auto; }
.invite-used { margin-top: 10px; }

/* ---- 学期周历：横表（每周一行，七天横向排开） ----
   列：月 | 标记 | 周 | 一 二 三 四 五 六 日 | 条数，共 11 条轨道。
   每个格子都用 grid-column 显式定位：不能靠元素顺序自动排布，
   否则某个格子一旦「有才渲染」，其余各行就会整体错位（踩过）。 */
.week-calendar.semester-calendar {
  border: 2px solid var(--ink); background: var(--paper);
  box-shadow: var(--shadow); margin: 0 0 16px; padding: 10px 12px 12px;
}
.term-navigation {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center; gap: 8px; margin-bottom: 10px;
}
.term-step {
  display: grid; place-items: center; min-height: 30px; text-decoration: none;
  border: 2px solid var(--ink); background: #fff; color: inherit;
  font-size: 1.15rem; line-height: 1; box-shadow: var(--shadow-sm);
}
.term-step:hover { background: var(--accent); color: #fff; }
.term-step[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; }
.term-title { text-align: center; line-height: 1.6; }
.term-title strong { display: block; font-size: 0.95rem; }
.semester-opening-tag {
  display: inline-block; margin-top: 2px; font-size: 0.72rem; color: var(--ink-soft);
  border: 2px dashed var(--ink-line); padding: 0 6px; background: #fff;
}
.semester-grid-shell { padding: 0; }
.semester-weekdays,
.semester-week {
  display: grid;
  grid-template-columns: 46px 22px 58px repeat(7, minmax(0, 1fr)) 32px;
  align-items: center;
}
.semester-weekdays {
  padding: 5px 10px; border-bottom: 2px solid var(--ink-line);
  font-size: 0.72rem; color: var(--muted); text-align: center;
}
.semester-weekdays span:first-child,
.semester-weekdays span:nth-child(3) { text-align: left; }
.semester-weekdays .weekend { color: var(--danger); }
.semester-scroll { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.semester-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.semester-weeks { display: flex; flex-direction: column; }
.semester-week { padding: 2px 10px; border-bottom: 1px dashed var(--ink-line); }
.semester-week:last-child { border-bottom: 0; }
.semester-week:hover { background: var(--panel-2); }
/* 当前周：整行抬起 + 橙色左边加粗，不再只是一条细竖线 */
.semester-week.is-current {
  background: #fdf3d8;
  border-left: 5px solid var(--accent);
  padding-left: 5px;
  box-shadow: 3px 3px 0 rgba(24, 35, 74, 0.22);
}
.semester-week.is-current .semester-week-button {
  background: var(--accent); color: #fff; padding: 0 6px;
}
.semester-week.is-selected { outline: 2px solid var(--info); outline-offset: -2px; }
.semester-week.is-selected .semester-month { font-weight: 800; text-decoration: underline; }
.semester-month { font-size: 0.72rem; color: var(--muted); }
.semester-week.is-current .semester-month { color: var(--ink); font-weight: 700; }
.semester-opening-slot { display: grid; place-items: center; }
.semester-opening-dot {
  width: 7px; height: 7px; background: var(--accent); border: 1px solid var(--ink);
}
.semester-week-button {
  font-size: 0.72rem; font-weight: 700; text-align: left; text-decoration: none;
  color: var(--ink-soft); overflow: hidden; white-space: nowrap;
}
.semester-week-button:hover { color: var(--accent); }
/* 当前周的周次标签：实心橙 + 白字（上面那条 is-current 规则里已经设过，这里不再重复覆盖） */
/* 每天一格：有内容的换底色；今天给数字加下划线（照参考站，不框整格） */
.semester-day {
  display: block; margin: 1px; padding: 3px 0; text-align: center;
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.76rem; font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.semester-day:hover { background: var(--accent); color: #fff; border-color: var(--ink); }
.semester-day.weekend { color: var(--danger); }
.semester-day.weekend:hover { color: #fff; }
.semester-day.has-upload {
  background: #e2efdc; border-color: var(--ok); color: var(--ink); font-weight: 700;
}
.semester-week.is-current .semester-day.has-upload { background: #cfe8b8; }
.semester-day.is-today time { border-bottom: 2px solid currentColor; }
/* 选中的那一天：实心蓝 + 深色描边 + 外圈光环，一眼能认出来 */
.semester-day.is-selected-day {
  background: var(--info); color: #fff; border-color: var(--ink); font-weight: 800;
  box-shadow: 0 0 0 2px var(--info), 2px 2px 0 rgba(24, 35, 74, 0.3);
}
.semester-day.is-selected-day time { border-bottom: 0; }
.semester-badge {
  justify-self: end; min-width: 24px; text-align: center; font-size: 0.68rem;
  font-weight: 700; padding: 0 4px; color: var(--ink);
  border: 1px solid var(--ink-line); background: var(--panel-2);
}
.semester-badge.is-empty { border-color: transparent; background: transparent; }
.mobile-week-controls { display: none; }

@media (max-width: 720px) {
  /* 窄屏保留横表但压缩固定列；整周导航只在日历放不下时启用 */
  .semester-weekdays,
  .semester-week { grid-template-columns: 30px 40px repeat(7, minmax(0, 1fr)); padding: 3px 6px; }
  .semester-weekdays span:nth-child(2),
  .semester-opening-slot,
  .semester-badge { display: none; }
  .semester-month { font-size: 0.62rem; }
  .semester-week-button { font-size: 0.62rem; text-align: center; }
  /* 窄屏不放阴影（会挤出格子），但左边的橙色粗条必须留着——它就是选中标识 */
  .semester-week.is-current { box-shadow: none; border-left-width: 5px; }
}

@media print {
  .no-print, [data-print] { display: none !important; }
  .line-chart { page-break-inside: avoid; }
  .semester-scroll { max-height: none; overflow: visible; }
  /* 打印时窗口要全展开，否则只印得出看得见的那几条 */
  .window-rows { max-height: none; overflow: visible; }
}

/* 更多页的「锁上本站」 */
.lock-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lock-form .muted { flex: 1 1 260px; }

/* ---- 当天学习：单词表（词汇页整理后的呈现）---- */
.study-words { list-style: none; margin: 10px 0 0; padding: 0; }
.study-words .word-row {
  display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 2px 12px; padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.study-words .word-row:last-child { border-bottom: 0; }
.study-words .word-en { font-weight: 700; font-family: var(--mono); font-size: 0.98rem; }
.study-words .word-ph { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.study-words .word-zh { grid-column: 2; font-size: 0.9rem; }
.study-words .word-ex {
  grid-column: 2; display: flex; flex-direction: column; gap: 1px;
  font-size: 0.86rem; color: var(--ink-soft);
}
.study-words .word-ex em { color: var(--muted); font-style: normal; font-size: 0.82rem; }

/* 已整理出内容时，原图只作佐证：缩成小图，点开看大图 */
.study-shot.small { max-width: 180px; }
.study-shot.small img { max-height: 120px; width: auto; }

/* ==========================================================================
   当天学习：紧凑化 + 单词表（左配图 / 右内容 / 播放与跟读按钮）
   目标：同样一屏能看更多内容。字号与内边距都比正文小一档。
   ========================================================================== */
.study-card { padding: 8px 10px; margin-bottom: 8px; }
.study-head { margin-bottom: 6px; gap: 6px; }
.study-shot.small { max-width: 150px; }
.study-shot.small img { max-height: 96px; }
.study-raw { font-size: 0.8rem; line-height: 1.6; margin: 6px 0 0; }
.pair { margin-bottom: 5px; }
.pair .en { font-size: 0.94rem; line-height: 1.5; }
.pair .zh { font-size: 0.8rem; line-height: 1.45; }
.qa-list li { padding: 5px 0; gap: 2px 8px; }
.study-form { padding: 9px 11px; margin-bottom: 10px; }
.study-form-row { margin-bottom: 7px; }
.study-form textarea { font-size: 0.8rem; line-height: 1.5; padding: 6px; }

/* 教材里标色/加粗的重点，还原成橙色 */
.hl { color: var(--accent); font-weight: 700; }

/* 单词表 */
.study-words { list-style: none; margin: 6px 0 0; padding: 0; }
.study-words .word-row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr);
  gap: 0 10px; padding: 5px 0; border-bottom: 1px dashed var(--line);
}
.study-words .word-row.no-pic { grid-template-columns: minmax(0, 1fr); }
.study-words .word-row:last-child { border-bottom: 0; }
.study-words .word-pic { display: block; }
/* 图片框固定 62×62，cover 填满；再放大 12% 把边缘那道邻居的细边挤出可视区
   （模型给的框会略微蹭到上下相邻词条的配图，实测如此）。 */
.study-words .word-pic {
  width: 62px; height: 62px; overflow: hidden;
  border: 2px solid var(--ink-line); background: #fff;
}
.study-words .word-pic img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); display: block;
}
.study-words .word-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.study-words .word-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.study-words .word-en { font-family: var(--mono); font-size: 0.94rem; font-weight: 700; }
.study-words .word-ph { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.study-words .word-zh { font-size: 0.84rem; }
/* 例句要当普通段落排：用 flex column 会把标色的 <b> 和标点各自挤成一行
   （实测出现过 "…at the travel / agency / ." 这种竖排）。中文译文单独一行即可。 */
.study-words .word-ex {
  display: block; font-size: 0.82rem; line-height: 1.45; color: var(--ink-soft);
}
.study-words .word-ex em {
  display: block; color: var(--muted); font-style: normal; font-size: 0.78rem;
}
.study-words .word-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 26px; height: 24px; padding: 0;
  border: 2px solid var(--ink-line); background: var(--panel-2); color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--accent); border-color: var(--ink); color: #fff; }
.icon-btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn .icon-sm { width: 14px; height: 14px; }
.study-words .word-result {
  display: block; margin-top: 2px; font-size: 0.8rem; color: var(--ink-soft);
}
.study-words .word-heard { color: var(--muted); }
.study-words .word-good { color: var(--ok); }
.study-words .word-tip { display: block; margin-top: 2px; color: var(--accent); }

/* ---- 学习测试（默写）---- */
.dictation { margin-top: 10px; padding-top: 8px; border-top: 2px dashed var(--ink-line); }
.dictation .muted { margin: 4px 0 0; }
.dictation-panel { margin-top: 8px; }
.dictation-step { margin: 0 0 6px; font-size: 0.9rem; }
.dictation-actions, .dictation-upload { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dictation-upload { margin-top: 8px; }
.dictation-upload label { font-size: 0.82rem; color: var(--muted); }
.dictation-result { margin-top: 8px; font-size: 0.85rem; }
.dictation-summary { margin: 0 0 4px; font-weight: 700; }
.dictation-list { list-style: none; margin: 0; padding: 0; }
.dictation-list li {
  display: flex; gap: 8px; align-items: baseline; padding: 3px 0;
  border-bottom: 1px dashed var(--line); font-size: 0.84rem;
}
.dictation-list li:last-child { border-bottom: 0; }
.dictation-list li b { font-family: var(--mono); min-width: 96px; }
.dictation-list li.ok span { color: var(--ok); }
.dictation-list li.bad span { color: #c0392b; }

/* 默写模式：盖住本课所有文字，只留图片当提示 */
.study-card.dictation-mode .word-head,
.study-card.dictation-mode .word-ex { visibility: hidden; }
.study-card.dictation-mode .study-passage,
.study-card.dictation-mode .study-raw,
.study-card.dictation-mode .qa-list,
.study-card.dictation-mode .study-shot { visibility: hidden; }
.study-card.dictation-mode .word-row { padding: 3px 0; }

/* 批改结果：中文意思在前、英文单词在后；下面接语音讲解的文字 */
.dictation-list li .dict-zh { min-width: 0; font-family: inherit; font-weight: 700; }
.dictation-list li .dict-en { font-family: var(--mono); min-width: 96px; }
.dictation-talk {
  margin: 6px 0 0; padding: 6px 8px; font-size: 0.84rem;
  background: var(--panel-2); border-left: 3px solid var(--accent);
}

/* 图片放大浮层：页内查看，点一下复原（替代新开窗口） */
.zoom-box {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 16px; cursor: zoom-out;
  background: rgba(12, 10, 30, 0.88);
}
.zoom-box img {
  max-width: 94vw; max-height: 84vh; object-fit: contain;
  border: 3px solid #fff; background: #fff; image-rendering: auto;
}
.zoom-tip {
  margin: 0; padding: 3px 10px; font-size: 0.82rem; color: var(--ink);
  background: #fff; border: 2px solid var(--ink-line);
}


/* 周看板「本周学习记录」面板：表头与各列一律居中 */
.data-table.records-panel th,
.data-table.records-panel td,
.data-table.records-panel td.cell-title { text-align: center; }
.data-table.records-panel td.cell-title .row-link-text { text-align: center; }


/* 学习记录行：鼠标滑过时凸显一个框，提示"这行可以点" */
.data-table tbody tr { transition: box-shadow 0.12s, background 0.12s; }
/* （旧版偏重的悬停样式已移除，统一用下面那套轻量的） */
.data-table tbody tr:hover .row-link-text { text-decoration: underline; }

/* 居中的询问小窗口 */
.ask-box {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 95; width: min(420px, 88vw); padding: 16px 18px;
  background: #fff; border: 3px solid var(--ink); box-shadow: var(--shadow-lift, 0 8px 24px rgba(0,0,0,.28));
}
.ask-box::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: rgba(12, 10, 30, 0.55);
}
.ask-text { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.6; }
.ask-actions { display: flex; gap: 8px; justify-content: flex-end; }


/* ==========================================================================
   行悬停：鼠标或手指移上去就「抬高 + 加框 + 框内底色变化」
   学习记录表、本周错题迷你列表、以及记录页的每一行都用同一套效果。
   ========================================================================== */
.data-table tbody tr,
.mini-item {
  position: relative;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, background 0.16s ease-out;
}
/* 只有周看板那两块面板（行可点）才抬高；学习记录页的行只加框、不变位置，
   整行往上跳一下在长列表里反而晃眼。 */
.data-table tbody tr.row-clickable:hover,
.data-table tbody tr.row-clickable:focus-within,
.mini-item:hover,
.mini-item:focus-within {
  /* 轻量版：只抬 1px、去掉那道硬投影，描边细一档，底色几乎看不出变化。
     之前 3px + 4px 硬投影 + 3px 内描边太重，看着发板。 */
  transform: translateY(-1px);
  background: #fffdfa;
  box-shadow: 0 2px 5px rgba(12, 10, 30, 0.10), inset 0 0 0 2px var(--accent);
  z-index: 3;
}
.data-table tbody tr:hover .row-link-text,
.mini-item:hover .mini-stem { text-decoration: underline; }

/* 时间选择框：年 / 月 / 周 / 日 */
.time-picker {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  justify-content: flex-start;   /* 靠左，不再居中 */
  margin-top: 14px; padding: 0; border: 0; background: transparent;
}
.time-cell { display: flex; flex-direction: column; gap: 3px; }
.time-cell span { font-size: 0.78rem; color: var(--muted); }
.time-cell select { min-width: 110px; }

/* 学习记录页的行：鼠标移上去只加框、改底色，不做位移 */
.data-table tbody tr:not(.row-clickable):hover,
.data-table tbody tr:not(.row-clickable):focus-within {
  background: #fffdfa;
  box-shadow: inset 0 0 0 2px var(--accent);
}


/* 时间线里不属于本月的日子：灰掉、不可点（本月的那一行才是可填的） */
.semester-day.is-outside {
  background: #ececec; color: #a8a8a8; box-shadow: none;
  cursor: not-allowed; pointer-events: none;
}
.semester-day.is-outside time { color: #a8a8a8; font-weight: 400; }


/* ==========================================================================
   学期时间线：表头与各格居中、月份黑粗、日期上的小字标注、今天的下划线
   ========================================================================== */
.semester-weekdays span,
.semester-day,
.semester-week-button,
.semester-month { text-align: center; justify-content: center; }
.semester-month { color: #111; font-weight: 700; }
.semester-week-button { justify-content: center; }

/* 日期格里竖排：小字在上、数字在下 */
.semester-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; line-height: 1.05;
}
.semester-day .day-tag { font-size: 0.6rem; letter-spacing: 0; white-space: nowrap; }
.semester-day .day-tag.name { color: #b8340f; font-weight: 700; }
.semester-day .day-tag.rest { color: #c05621; }
.semester-day .day-tag.school { color: #2b6cb0; }

/* 今天：日期数字下画横线（当周仍按原方式凸显） */
.semester-day.is-today time {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}


/* ==========================================================================
   时间线排版收尾：行与格都压缩、每个日期格子尺寸一致（含没有标注的），
   所有格子顶对齐、居中，避免出现"有的高有的矮、看着被拉变形"。
   ========================================================================== */
.semester-week {
  align-items: stretch;          /* 格子一律等高，不再各自居中 */
  padding: 1px 4px;              /* 行内边距压缩 */
  min-height: 34px;
}
.semester-day,
.semester-day:link,
.semester-day:visited {
  height: 100%;                  /* 撑满行高 → 所有格子一样大 */
  margin: 0 1px;                 /* 格间距压到 1px */
  padding: 1px 0 2px;
  font-size: 0.74rem;
  line-height: 1.02;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;   /* 内容居中 */
  gap: 0;
}
.semester-day time { font-variant-numeric: tabular-nums; }
.semester-day .day-tag {
  font-size: 0.55rem; line-height: 1.05; height: 0.62rem;  /* 高度固定，空占位也一致 */
  white-space: nowrap; overflow: hidden;
}
.semester-day.is-today time {
  border-bottom: 2px solid currentColor;   /* 今天：数字下画横线 */
  text-decoration: none;
}
.semester-weekdays { padding: 3px 4px; font-size: 0.7rem; }
.semester-weekdays span:nth-child(3) { text-align: center; }   /* 表头「周」也居中 */
.semester-month { color: #111; font-weight: 700; text-align: center; }
.semester-week-button { width: 100%; }


/* ==========================================================================
   当前周那一行：去掉左侧橙色竖线。
   原来那 5px 左边框 + 5px 左内边距会把整行内容往右推，格子因此与上下行对不齐
   （10月第二周那行就是这样歪的）。现在只保留淡黄底色，内边距与普通行一致。
   ========================================================================== */
.semester-week.is-current {
  background: #fdf3d8;
  border-left: 0;
  padding-left: 4px;
  padding-right: 4px;
  box-shadow: none;
}
.semester-week.is-current .semester-week-button {
  background: var(--accent); color: #fff; padding: 0 4px;
}


/* ==========================================================================
   月份、周次与日期格子等高：整行看起来是一排方框，而不是"中间几个高、两头矮"。
   日期格已经是 height:100%，这里把另外两个也拉齐，并统一里外间距。
   ========================================================================== */
.semester-week .semester-month,
.semester-week .semester-week-button,
.semester-week .semester-opening-slot {
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;       /* 文字竖直居中 */
  justify-content: center;   /* 文字水平居中 */
  margin: 0;
  padding: 1px 2px;
  font-size: 0.72rem;
  line-height: 1.02;
  box-sizing: border-box;
}
.semester-week .semester-week-button { padding: 1px 4px; }
.semester-week .semester-month {
  color: #111; font-weight: 700;
  background: transparent;
}


/* 标记列里的「开学周」：小字、橙色、居中，占原来那个圆点的位置 */
.semester-opening-slot { display: flex; align-items: center; justify-content: center; }
.semester-opening-mark {
  font-size: 0.56rem; line-height: 1.05; white-space: nowrap;
  color: var(--danger); font-weight: 700;   /* 红色（与周末同一色） */
}
.semester-opening-dot { display: none; }   /* 旧的圆点不再使用 */


/* （上一版的两栏布局已撤掉：时间栏是一条横向栏，整体靠左） */

/* 表头与内容一律居中，列与列对正 */
.data-table.records-full th,
.data-table.records-full td,
.data-table.records-full td.cell-title { text-align: center; }
.data-table.records-full td.cell-title .row-link-text { text-align: center; }



/* ==========================================================================
   学科配色统一：语文 / 数学 / 英语 / 综合（其它、未分类同色）
   全站所有学科标签都用 .subj-tag.subj-<学科>，这一处改完全站生效。
   ========================================================================== */
.subj-tag {
  display: inline-block; font-size: 0.76rem; line-height: 1.5;
  padding: 0 8px; border: 2px solid var(--ink-soft);
  background: #efeee8; color: #4a4a44;
  white-space: nowrap;
}
.subj-语文 { border-color: #b8562f; background: #ffe6d5; color: #8f3f1c; }
.subj-数学 { border-color: #2f5f92; background: #dbe9f8; color: #234f7d; }
.subj-英语 { border-color: #2f6b4b; background: #d9f0e2; color: #23553b; }
.subj-综合,
.subj-其它,
.subj-未分类 { border-color: #7d7a68; background: #eae7dc; color: #57543f; }

/* 学科小圆点也用同一套色 */
.subj-dot { width: 10px; height: 10px; display: inline-block; border: 2px solid var(--ink); }
.subj-dot.subj-语文 { background: #b8562f; }
.subj-dot.subj-数学 { background: #2f5f92; }
.subj-dot.subj-英语 { background: #2f6b4b; }
.subj-dot.subj-综合,
.subj-dot.subj-其它,
.subj-dot.subj-未分类 { background: #7d7a68; }

/* 旧类名保留映射，避免还有地方用到时没颜色 */
.subject-tag { display: inline-block; font-size: 0.76rem; padding: 0 8px;
  border: 2px solid var(--ink-soft); background: #efeee8; color: #4a4a44; }


/* ==========================================================================
   学科配色调整（按要求轮换）：
     语文 → 蓝（原数学）  数学 → 绿（原英语）  英语 → 偏红（原语文的赭红）
   标签、小圆点、学科卡片顶边三处一起换，保证同色系。
   ========================================================================== */
.subj-tag.subj-语文 { border-color: #2f5f92; background: #dbe9f8; color: #234f7d; }
.subj-tag.subj-数学 { border-color: #2f6b4b; background: #d9f0e2; color: #23553b; }
.subj-tag.subj-英语 { border-color: #b8562f; background: #ffe6d5; color: #8f3f1c; }

.subj-dot.subj-语文 { background: #2f5f92; }
.subj-dot.subj-数学 { background: #2f6b4b; }
.subj-dot.subj-英语 { background: #b8562f; }

.subject-card.subj-border-语文 { border-top-color: #2f5f92; }
.subject-card.subj-border-数学 { border-top-color: #2f6b4b; }
.subject-card.subj-border-英语 { border-top-color: #b8562f; }


/* 必选项没选时：闪一下红框，配合页面中间的小窗提醒 */
select.needs-pick { outline: 3px solid var(--danger); outline-offset: 1px; }
.study-form select { width: 100%; max-width: 320px; }


/* 单词已通过的小勾；最近一次默写的回看块 */
.word-done { color: var(--ok); font-weight: 700; margin-left: 4px; }
.quiz-recap {
  margin-top: 8px; padding: 8px 10px; font-size: 0.84rem;
  border: 2px dashed var(--ink-line); background: var(--panel-2);
}
.quiz-recap ul { list-style: none; margin: 6px 0 0; padding: 0; }
.quiz-recap li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.quiz-recap li .q-zh { min-width: 96px; font-weight: 700; }
.quiz-recap li .q-en { font-family: var(--mono); }
.quiz-recap li.ok { color: var(--ok); }
.quiz-recap li.bad { color: #c0392b; }



/* 测试详情折叠栏：默认收起，点开才看各次细节 */
.quiz-fold { margin-top: 8px; border: 2px dashed var(--ink-line); background: var(--panel-2); }
.quiz-fold > summary { cursor: pointer; padding: 7px 10px; font-size: 0.88rem; list-style: none; }
.quiz-fold > summary::-webkit-details-marker { display: none; }
.quiz-fold > summary::before { content: "▸ "; }
.quiz-fold[open] > summary::before { content: "▾ "; }
.quiz-fold .quiz-recap { border: 0; background: transparent; margin-top: 0; }
.quiz-attempt {
  position: relative; padding: 8px 92px 8px 0;
  border-bottom: 1px dashed var(--line);
}
.quiz-attempt:last-child { border-bottom: 0; }
.quiz-attempt ul { list-style: none; margin: 4px 0 0; padding: 0; }
/* 该次测试上传的图片：右下角小图 */
.quiz-shot { position: absolute; right: 0; bottom: 6px; }
.quiz-shot img {
  width: 76px; height: 76px; object-fit: cover;
  border: 2px solid var(--ink-line); display: block; background: #fff;
}


/* 测试详情：逐词一行三列，中文释义列定宽，右边的单词与说明整齐对齐 */
.quiz-attempt ul { display: block; }
.quiz-attempt li {
  display: grid !important;
  grid-template-columns: 150px 108px minmax(0, 1fr);
  gap: 4px 10px; align-items: baseline;
  padding: 2px 0;
}
.quiz-attempt li .q-zh { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-attempt li .q-en { font-family: var(--mono); }
.quiz-attempt li .q-why { grid-column: 3; }


/* 卡片底部：跟读 / 默写 两项完成情况并排显示 */
.study-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 跟读/默写那一段只保留 .muted.small 的样式。
   注意：这里**不能**再写 .study-meter { font-size/color: inherit }——
   它和 .muted/.small 优先级相同却排在后面，会把灰色小字覆盖回深色大字（踩过）。
   只需要把里面的 <b> 数字恢复成继承（否则 <b> 默认加粗放大）。 */
.study-meter b { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; }
.meter-sep { display: inline-block; width: 14px; }


/* 每个词后面的「停止」图标：平时淡一点，鼠标移上去或该项进行中才显眼 */
.icon-btn.stop-btn { color: var(--danger); }
.icon-btn.stop-btn:hover { background: var(--danger); color: #fff; }



/* 播放/跟读进行中的提示文字用红色（is-busy 由 JS 打上、停止或结束时移除） */
[data-word-result].is-busy { color: var(--danger); font-weight: 700; }



/* 卡片底部的「确认完成」按钮 */
.study-foot .done-btn { margin-left: auto; }
.done-note { color: var(--ok); font-weight: 700; margin-left: auto; }




/* 选择题的选项：每条一行，和题干区分开 */
.q-opt { display: block; font-size: 0.86rem; line-height: 1.7; color: var(--ink-soft); padding-left: 6px; }


/* 模型没拆出选项时，显示它原样抄下来的整题（保留换行） */
.q-raw { display: block; white-space: pre-wrap; font-size: 0.86rem; line-height: 1.7; color: var(--ink-soft); }


/* ---------- 对话体：一句一行，鼠标移到哪句哪句出蓝框和操作项 ---------- */
.sentence-row {
  position: relative;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 5px 8px 5px 10px;
  margin: 2px 0;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.sentence-row:hover,
.sentence-row.is-active {
  border-color: var(--info);          /* 蓝框 */
  background: #f4f8fd;
}
.sentence-main { min-width: 0; }
.speaker-tag {
  display: inline-block; margin-bottom: 2px;
  font-size: 0.74rem; font-weight: 700; padding: 0 7px;
  color: #fff; background: var(--info); border-radius: 999px;
}
.sentence-actions {
  display: inline-flex; gap: 4px; vertical-align: top;
  visibility: hidden;                  /* 平时不显示，鼠标移上来才出现 */
}
.sentence-row:hover .sentence-actions,
.sentence-row.is-active .sentence-actions { visibility: visible; }
.sentence-status { display: block; margin-top: 3px; font-size: 0.82rem; }
.sentence-status.is-busy { color: var(--danger); font-weight: 700; }
.sentence-status.is-good { color: var(--ok); font-weight: 700; }
.sentence-status.is-bad { color: var(--danger); }


/* ---------- 段落操作：鼠标移到哪段哪段蓝框 + 出三个操作 ---------- */
.para {
  position: relative;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
  margin: 4px 0;
  transition: border-color 0.12s ease, background 0.12s ease;
}
/* 段落本身不要蓝框：蓝框只在「句」上（家长要求，孩子小、按句来） */
.para.is-active { background: transparent; }
.para-actions { display: inline-flex; gap: 6px; margin-left: 10px; visibility: hidden; }/* 段落不加蓝框：蓝框只在句子上（家长要求） */

.para-status { margin: 4px 0 2px; font-size: 0.84rem; }
.para-status.is-busy { color: var(--danger); font-weight: 700; }
.para-status.is-good { color: var(--ok); font-weight: 700; }
.para-status.is-bad { color: var(--danger); }


/* ---------- 对话体逐句：紧凑排版（原来一句占太高） ---------- */
.sentence-row { padding: 2px 6px 2px 8px; margin: 0; border-radius: 4px; }
.sentence-row .sentence-main .en { margin: 0; line-height: 1.35; font-size: 0.9rem; }
.sentence-row .sentence-main .zh { margin: 0; line-height: 1.3; font-size: 0.8rem; }
.sentence-actions { margin-left: 8px; gap: 4px; }
.sentence-actions .btn.small { padding: 1px 8px; font-size: 0.78rem; }
.sentence-status { margin: 1px 0 0; font-size: 0.78rem; }
.para { padding: 0; margin: 6px 0; }
.para-head { margin-bottom: 2px; }
.passage .pair { margin: 0; }


/* 阅读理解：段落指令 + 该段的题；段内子项单独列 */
.qa-section-head {
  margin: 12px 0 4px; padding: 3px 9px;
  font-weight: 700; font-size: 0.9rem;
  color: #fff; background: var(--info); border-radius: 4px;
}
.qa-section-head:first-child { margin-top: 0; }
.q-sub { display: block; font-size: 0.86rem; line-height: 1.7; color: var(--ink-soft);
         padding-left: 6px; }


/* 已读对的句子：整行变暗，和还没读的区分开 */
.sentence-row.is-done .en,
.sentence-row.is-done .zh { color: var(--muted); }
.sentence-row.is-done { background: rgba(0, 0, 0, 0.02); }
.sentence-row.is-done .en::after {
  content: " ✓"; color: var(--ok); font-weight: 700;
}


/* 多图上传：选完显示"已选 N 张" */
#study_file_hint { display: block; margin-top: 4px; }
#study_file_hint.has-files { color: var(--ok); font-weight: 700; }


/* 学习记录行：鼠标移动到的行要有明确反馈（家长要求） */
.records-table tbody tr:hover,
tr.row-clickable:hover {
  background: rgba(45, 90, 220, 0.09);
  box-shadow: inset 3px 0 0 var(--accent, #2d5adc);
}
/* 从周看板点进来时，被定位的那一行整行高亮，一眼看到"就是这条" */
.records-table tbody tr:target,
tr.row-clickable:target {
  background: rgba(45, 90, 220, 0.14);
  box-shadow: inset 4px 0 0 var(--accent, #2d5adc);
  outline: 2px solid var(--accent, #2d5adc);
  outline-offset: -2px;
}
/* 触屏设备没有 hover：用按下时的反馈代替 */
@media (hover: none) {
  .records-table tbody tr:active,
  tr.row-clickable:active { background: rgba(45, 90, 220, 0.16); }
}
/* 窄屏（手机）：表格允许横向滚动，不要撑破页面 */
@media (max-width: 720px) {
  .records-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .records-table th, .records-table td { white-space: nowrap; }
}



/* /* 家长 2026-10-14：查看中的那一周不要任何蓝框（只保留"今天那周"的橙与"今天"的圈） */
.semester-week.is-selected {
  outline: 0 !important;
  box-shadow: none !important;
}
.semester-week.is-selected .semester-month {
  text-decoration: none !important;
  font-weight: inherit;
}
.semester-week.is-selected .semester-week-button {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

/* 今日的圈：红色 */
.semester-day.is-today::after {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 34' preserveAspectRatio='none'>\
<path d='M24 3 C13 1 4 8 4 17 C4 27 15 32 26 31 C36 30 41 23 40 15 C39 7 29 2 18 4' \
fill='none' stroke='%23d92b2b' stroke-width='2.4' stroke-linecap='round'/>\
</svg>");
}


/* ===== 家长 2026-10-14 第二轮修正（重加）=====
   1) 只取消"查看中那一周"的蓝框，**不影响"今天那周"的橙底白字** */
.semester-week.is-selected:not(.is-current) {
  outline: 0 !important;
  box-shadow: none !important;
}
.semester-week.is-selected:not(.is-current) .semester-week-button {
  background: transparent;
  color: inherit;
  box-shadow: none;
}
.semester-week.is-selected:not(.is-current) .semester-month {
  text-decoration: none !important;
  font-weight: inherit;
}
/* 今天那周：橙底 + 白字（保持） */
.semester-week.is-current .semester-week-button {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 0 6px !important;
}

/* 2) 今日数字下面的下横线取消 */
.semester-day.is-today time,
.semester-day.is-today.is-selected-day time {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

/* 3) 今日红圈：不闭合、双笔迹、略歪，像手画的 */
.semester-day.is-today {
  position: relative;
}
.semester-day.is-today::after {
  content: "";
  position: absolute;
  inset: -4px -7px;
  pointer-events: none;
  transform: rotate(-3deg);
  background:
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 40' preserveAspectRatio='none'>\
<path d='M30 5 C17 2 5 9 4 19 C3 30 16 36 30 35 C42 34 49 26 47 16 C45 7 33 3 21 6 C15 8 10 12 9 17' \
fill='none' stroke='%23d92b2b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/>\
<path d='M28 6 C16 4 6 11 5.5 20 C5 30 17 35 31 34' \
fill='none' stroke='%23d92b2b' stroke-width='1.1' stroke-linecap='round' opacity='0.5'/>\
</svg>") center / 100% 100% no-repeat;
}


/* ===== 家长 2026-10-14 第三轮：定位 = 固定住"悬停"的样子 =====
   目的：查看某一天内容时，从时间线一眼看出"我在看哪一周的哪一天"。 */

/* 1) 定位到的周标头：橙色字（与 .semester-week-button:hover 同色），无底色 */
.semester-week.is-selected:not(.is-current) .semester-week-button {
  color: var(--accent) !important;
  font-weight: 800 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* 该周的整行也极淡地标一下（不抢"今天那周"的橙底） */
.semester-week.is-selected:not(.is-current) {
  background: rgba(217, 119, 6, 0.06);
  outline: 0 !important;
}

/* 2) 定位到的那一天：固定成"悬停"的样子（橙底白字） */
.semester-day.is-selected-day {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--ink) !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
.semester-day.is-selected-day time {
  border-bottom: 0 !important;
  color: #fff !important;
}

/* 3) 今天那周仍是橙底白字（保持不动） */
.semester-week.is-current .semester-week-button {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
}


/* 知识点资料页 */
.note-body { line-height: 1.9; font-size: 0.95rem; }
.note-body .note-head { font-weight: 800; margin: 10px 0 4px; color: var(--ink); }
.note-body p { margin: 4px 0; }
.note-list { margin: 6px 0 0; padding-left: 18px; line-height: 1.9; }


/* 知识树一级节点也能点（点击进入该知识点的资料 / 学习内容） */
a.ktree-branch-name { text-decoration: none; color: inherit; border-bottom: 1px dashed var(--line); }
a.ktree-branch-name:hover { color: var(--brand); border-bottom-color: var(--brand); }


/* 归档材料的评析：分段、可读 */
.material-report { margin: 8px 0 0; padding: 8px 10px; background: rgba(0,0,0,0.02);
  border-left: 3px solid var(--line); border-radius: 4px; }
.material-report b { display: block; margin-bottom: 4px; }
.material-report p { margin: 3px 0; line-height: 1.75; font-size: 0.92rem; }


/* 归档评析：便于扫读的条目式排版 */
.material-report { margin: 8px 0 0; padding: 8px 10px; background: rgba(0,0,0,0.02);
  border-left: 3px solid var(--line); border-radius: 4px; }
.material-report .report-head { font-weight: 800; margin: 8px 0 4px; font-size: 0.95rem; }
.material-report .report-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0;
  padding: 4px 6px; background: #fff; border-radius: 4px; line-height: 1.6; }
.material-report .report-cell { font-size: 0.92rem; }
.material-report .report-cell:first-child { font-weight: 700; min-width: 3.4em; }
.material-report .report-line { margin: 3px 0; line-height: 1.8; font-size: 0.95rem; }
@media (max-width: 720px) { .material-report .report-row { flex-direction: column; gap: 2px; } }

.material-report .report-cell.mine { color: var(--danger); font-weight: 600; }
.material-report .report-cell.right { color: var(--ok); font-weight: 600; }
.material-report .report-cell.stem { color: var(--ink); }
.material-report .report-cell.no { font-weight: 800; min-width: 3.2em; }


/* 存档评析：按大题分组的卷面回顾 */
.material-report .report-type { margin-left: 8px; font-weight: 400; font-size: 0.8rem;
  color: var(--muted); }
.material-report .report-q { margin: 5px 0; padding: 6px 8px; border-radius: 4px;
  background: #fff; border-left: 3px solid var(--line); }
.material-report .report-q.bad { border-left-color: var(--danger); background: #fdf4f3; }
.material-report .report-q.ok { border-left-color: var(--ok); }
.material-report .report-stem { margin: 0 0 3px; line-height: 1.65; font-size: 0.94rem; }
.material-report .report-mine { margin: 0; color: var(--danger); font-size: 0.9rem; }
.material-report .report-right { margin: 0; color: var(--ok); font-weight: 600;
  font-size: 0.9rem; }
.material-report .report-why { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.88rem; }
.material-report .report-list { margin: 2px 0 6px; padding-left: 20px; line-height: 1.8; }


/* 评析：亮点 / 问题 / 整体评价 / 易错清单 */
.material-report .ok-list li { color: var(--ink); }
.material-report .bad-list li { color: var(--ink); }
.material-report .report-sub { font-weight: 700; margin: 6px 0 2px; font-size: 0.9rem; }
.material-report .report-verdict { margin: 6px 0; padding: 8px 10px; background: #fff8e6;
  border-left: 3px solid var(--warn, #d99b1a); border-radius: 4px; line-height: 1.8; }


/* 材料还没出评析时的状态提示 */
.review-state { margin: 8px 0; padding: 9px 12px; border-radius: 4px; line-height: 1.75;
  font-size: 0.92rem; }
.review-state.pending { background: #fff8e6; border-left: 3px solid #d99b1a; }
.review-state.failed { background: #fdf3f2; border-left: 3px solid var(--danger); }
.inline-form { display: inline; }


/* 试卷整体评析：按区块配色（亮点=绿 / 问题=红 / 建议=蓝 / 清单=黄） */
.material-report .report-block { margin: 10px 0; padding: 10px 12px; border-radius: 6px;
  border-left: 4px solid var(--line); background: #fff; }
.material-report .report-block .report-head { margin-top: 0; }
.material-report .report-block.ok { background: #f1f9f2; border-left-color: #2f8f4e; }
.material-report .report-block.ok .report-head { color: #2f8f4e; }
.material-report .report-block.bad { background: #fdf3f2; border-left-color: var(--danger); }
.material-report .report-block.bad .report-head { color: var(--danger); }
.material-report .report-block.tip { background: #f0f6fd; border-left-color: #2f6fb5; }
.material-report .report-block.tip .report-head { color: #2f6fb5; }
.material-report .report-block.list { background: #fffaf0; border-left-color: #d99b1a; }
.material-report .report-block.list .report-head { color: #a8741a; }

/* 专项小练习 */
.practice-list { margin: 0; padding-left: 0; list-style: none; }
.practice-q { margin: 10px 0; padding: 10px 12px; border-radius: 6px; background: #fff;
  border-left: 3px solid var(--line); }
.practice-q.ok { border-left-color: #2f8f4e; }
.practice-q.bad { border-left-color: var(--danger); }
.practice-stem { margin: 0 0 4px; font-weight: 700; }
.practice-opts { margin: 2px 0; }
.practice-opt { display: inline-block; margin-right: 12px; font-size: 0.92rem; }
.practice-sent { margin: 4px 0 0; line-height: 1.9; }
.practice-mine { margin: 4px 0 0; }
.practice-right { color: var(--ok); font-weight: 700; }
.practice-choice { margin-right: 14px; font-weight: 700; }
.practice-tip { margin: 0 0 4px; line-height: 1.8; }


/* 专项练习：词 → 多个句子 */
.practice-word { margin: 12px 0 16px; padding: 10px 12px; border-radius: 6px;
  background: #fff; border-left: 4px solid #2f6fb5; }
.practice-word-name { margin: 0 0 4px; font-weight: 800; font-size: 1rem; }
.practice-defs { margin: 0 0 6px; color: var(--ink-soft); line-height: 1.8; font-size: 0.92rem; }


/* 错题：题干原文标签 + 举例 */
.material-report .report-tag { margin-left: 8px; padding: 1px 6px; font-size: 0.72rem;
  font-weight: 700; color: #2f6fb5; background: #eaf2fb; border-radius: 3px; }
.material-report .report-eg { color: var(--ok); font-size: 0.9rem; }


/* 错题：序号一行，试卷原文节选一行（在序号下面） */
.material-report .report-no { margin: 0; font-size: 0.95rem; }
.material-report .report-src { margin: 2px 0 4px; padding: 6px 8px; background: #f7f4ec;
  border-left: 3px solid #c9a227; border-radius: 3px; line-height: 1.75; font-size: 0.92rem;
  color: var(--ink); white-space: pre-wrap; }
.material-report .report-tag { margin-left: 8px; padding: 1px 6px; font-size: 0.72rem;
  font-weight: 700; color: #a8741a; background: #fff4dd; border-radius: 3px; }


/* 专项练习：题目要求 + 释义成列 */
.practice-ask { margin: 0 0 6px; padding: 8px 10px; background: #eef4fb; border-radius: 4px;
  border-left: 3px solid #2f6fb5; line-height: 1.75; font-weight: 600; }
.practice-defs { margin: 4px 0 8px; padding-left: 20px; line-height: 1.85;
  color: var(--ink-soft); font-size: 0.93rem; }
.practice-defs .practice-opt { display: list-item; margin: 0; }


/* 专项练习：圆圈里直接写数字（隐藏原生圆点） */
.practice-choices { margin: 6px 0 0; }
.practice-choice { display: inline-block; margin-right: 10px; cursor: pointer; }
.practice-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.practice-dot { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 2px solid #2f6fb5; border-radius: 50%;
  color: #2f6fb5; font-weight: 700; font-size: 0.95rem; background: #fff;
  transition: background .12s, color .12s; }
.practice-choice:hover .practice-dot { background: #eaf2fb; }
.practice-choice input:checked + .practice-dot { background: #2f6fb5; color: #fff;
  border-color: #2f6fb5; }
.practice-how { margin-top: 6px; line-height: 1.85; font-size: 0.92rem; }
.practice-how ol { margin: 4px 0 0; padding-left: 22px; }
.practice-how li { margin: 2px 0; }
.practice-sent b, .practice-sent【 { color: var(--ink); }

/* 退回上一版：恢复原生圆点选项（覆盖圆圈样式的改动） */
.practice-choice input { position: static; opacity: 1; width: auto; height: auto; margin-right: 4px; }
.practice-dot { display: none; }
.practice-how { display: none; }

/* 点①就是选答案：圈里写数字可直接点（覆盖上一层的"恢复原生圆点"） */
.practice-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.practice-dot { display: inline-flex; }
.practice-how { display: none; }        /* "怎么做"四步块暂时不显示，保持当前版本的说明 */
.practice-ask { display: block; }


/* 答案圆圈：明显可点（里面是数字，外面是圈） */
.practice-choices { display: flex; gap: 14px; margin: 8px 0 0; align-items: center; }
.practice-choice { display: inline-block; cursor: pointer; }
.practice-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.practice-dot { display: inline-flex !important; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 2.5px solid #2f6fb5; border-radius: 50%;
  color: #2f6fb5; font-weight: 800; font-size: 1.05rem; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06); transition: all .12s; }
.practice-choice:hover .practice-dot { background: #eaf2fb; transform: translateY(-1px); }
.practice-choice input:checked + .practice-dot { background: #2f6fb5; color: #fff;
  border-color: #1d4e86; box-shadow: 0 0 0 3px rgba(47,111,181,0.18); }

/* 退回上一版：圆圈恢复原来的尺寸与样式 */
.practice-choices { display: block; margin: 6px 0 0; }
.practice-choice { display: inline-block; margin-right: 10px; }
.practice-dot { width: 30px; height: 30px; border: 2px solid #2f6fb5; font-size: 0.95rem;
  box-shadow: none; transform: none; }
.practice-choice:hover .practice-dot { transform: none; }
.practice-choice input:checked + .practice-dot { box-shadow: none; border-color: #2f6fb5; }


/* 更多页：能力自检 */
.cap-list { margin: 4px 0 8px; padding-left: 0; list-style: none; line-height: 1.9; }
.cap-list li { padding: 6px 8px; border-radius: 4px; margin: 4px 0; font-size: 0.94rem; }
.cap-list .cap-ok { background: #f1f9f2; border-left: 3px solid #2f8f4e; }
.cap-list .cap-bad { background: #fdf3f2; border-left: 3px solid var(--danger); }


/* API 凭据设置页 */
.setting-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.setting-label { flex: 0 0 240px; font-weight: 600; display: flex; flex-direction: column; }
.setting-input { flex: 1 1 auto; }
.setting-input input { width: 100%; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 4px; font-size: 0.95rem; }

/* 家长 2026-10-25：单词配图"显示不全"（cover + 放大把边缘裁掉了）
   → 改成 contain 完整显示整张图；框稍微放大一点，手机上看得清 */
.study-words .word-row { grid-template-columns: 72px minmax(0, 1fr); }
.study-words .word-row.no-pic { grid-template-columns: minmax(0, 1fr); }
.study-words .word-pic { width: 72px; height: 72px; overflow: hidden; background: #fff; }
.study-words .word-pic img {
  width: 100%; height: 100%;
  object-fit: contain;
  transform: none;
  display: block;
  background: #fff;
}


/* 整理中提示 */
.org-pending { color: #8a6d1a; background: #fff9e6; padding: 8px 10px;
  border-left: 3px solid #d99b1a; border-radius: 3px; line-height: 1.7; }


/* 讲解区两个按钮并排 + 颜色区分（再读一次=蓝 / 再听一遍解析=橙） */
.tip-actions { display: inline-flex; gap: 8px; margin: 6px 0; flex-wrap: wrap;
  align-items: center; }
.tip-actions .btn { white-space: nowrap; }
.btn.tip-replay { background: #fff4e0; color: #a8741a; border: 1.5px solid #e0a94a;
  font-weight: 600; }
.btn.tip-replay:hover { background: #ffe9c7; }

/* 阅读课「答一答」：选择题点选样式（家长 2026-10-26） */
.q-choice { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  margin: 6px 0; border: 1.5px solid #d8e0ee; border-radius: 10px; cursor: pointer;
  background: #fff; transition: border-color .15s, background .15s; }
.q-choice:hover { border-color: #7aa7ff; background: #f5f9ff; }
.q-choice input { accent-color: #2b6cf6; width: 18px; height: 18px; flex: none; }
.q-choice-text { font-size: 15px; line-height: 1.5; }
.qa-choice-form { margin: 14px 0; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; }


/* 答一答：点完选项立即显示的正误对比 + 解析（家长 2026-10-27） */
.qa-instant { margin: 8px 0 4px; padding: 10px 12px; border-radius: 10px;
  font-size: 15px; line-height: 1.6; border: 1.5px solid transparent; }
.qa-instant.is-ok { background: #eefaf0; border-color: #9fd8a8; }
.qa-instant.is-bad { background: #fff2f2; border-color: #f0b4b4; }
.qa-instant-head { font-weight: 700; margin: 0 0 4px; }
.qa-instant.is-ok .qa-instant-head { color: #1f8a3b; }
.qa-instant.is-bad .qa-instant-head { color: #c23b3b; }
.qa-instant-cmp { margin: 0; color: #4a5568; }
.qa-instant-tip { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #d9d9d9;
  color: #333; }


/* 未开始学习：整卡锁定（家长 2026-10-27） */
.study-card.is-locked .study-body,
.study-card.is-locked .study-qa,
.study-card.is-locked .study-words,
.study-card.is-locked .passage { opacity: .55; pointer-events: none; filter: grayscale(.3); }
.study-locked-hint { margin: 6px 0 0; color: #a8741a; background: #fff4e0;
  border: 1px dashed #e0a94a; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
/* 学习中标记 */
.learning-flag { display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #e8f1ff; color: #2b6cf6; font-size: 13px; font-weight: 600;
  border: 1px solid #b9d0ff; }
/* 已选/已判的选项锁灰 */
.q-choice.is-locked { background: #f6f7f9; cursor: default; }
.q-choice.is-locked input { cursor: default; }


/* 答题区三个图标：对齐成一排、放在句子下面（家长 2026-10-27） */
.qa-actions-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; flex-wrap: wrap; }
.qa-actions-row .qa-actions { display: inline-flex; align-items: center; gap: 10px; }
.qa-actions-row .icon-btn { display: inline-flex; align-items: center;
  justify-content: center; flex: none; }
.qa-actions-row .qa-status { margin: 0; }
.qa-instant-zh { margin: 6px 0 0; color: #4a5568; }
.qa-instant-right { color: #ffffff; font-weight: 700; }

/* 家长 2026-10-27：句子后面的三个图标**常显**（平板没有鼠标悬停，不能只 hover 才出现） */
.sentence-row .sentence-actions { visibility: visible !important; opacity: 1 !important; display: inline-flex; }
.sentence-row .sentence-actions .icon-btn { flex: none; }


/* 阅读理解门槛：整篇没读完前，下面的「读一读，答一答」锁住（家长 2026-10-27） */
.study-qa.is-locked .qa-list { opacity: .5; pointer-events: none; filter: grayscale(.3); }
.qa-locked-note { margin: 6px 0 10px; padding: 8px 12px; border-radius: 8px;
  background: #fff4e0; border: 1px dashed #e0a94a; color: #a8741a; font-size: 14px; }
