html, body { height: 100%; overflow: hidden; }
/* 教师端 */
.tlogin {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 480px at 12% -10%, #e8eaff, transparent 60%),
    radial-gradient(800px 420px at 96% 0%, #e2f7f4, transparent 55%),
    #f4f6fb;
}
.tlogin-card {
  width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 34px 34px 26px;
  box-shadow: 0 30px 80px -40px rgba(40, 34, 95, .5); border: 1px solid rgba(255,255,255,.8);
}
.tlogin-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 22px; }
.tlogin-card h2 { margin: 0 0 6px; font-size: 26px; }
.tlogin-sub { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.tlogin-tip { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }
.tlogin-tip code { font-size: 11px; }
.tlogin-back { display: block; margin-top: 14px; text-align: center; font-size: 12px; color: #9aa1b3; }
.tlogin-back:hover { color: var(--brand); }

.tapp { padding-bottom: 30px; }
.tnav { display: flex; align-items: center; gap: 4px; background: #f4f5fb; border-radius: 12px; padding: 4px; }
.tnav button, .tnav a {
  height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink2); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center;
  transition: .16s; text-decoration: none;
}

.top-actions { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.top-actions[hidden] { display: none !important; }
.top-filter { border: 0; background: transparent; color: #6b7280; font-size: 12px; padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.top-filter em { font-style: normal; font-weight: 700; margin-left: 2px; }
.top-filter.on { background: #fff; color: #6c5ce7; box-shadow: 0 2px 8px rgba(76,63,170,.12); }
.top-actions .btn.primary { margin-left: 4px; }

.tnav button:hover, .tnav a:hover { color: var(--brand); background: rgba(255,255,255,.7); }
.tnav button.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 3px 9px -5px rgba(30,40,80,.35); }
.tview { width: 100%; max-width: none; margin: 0; padding: 10px 0 0; }

.tpage-head { display: flex; align-items: flex-end; gap: 16px; margin: 2px 2px 16px; }
.mine-tabs { display: flex; gap: 3px; background: #f1f2f8; border-radius: 10px; padding: 3px; }
.mine-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 6px 10px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.mine-tabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 5px rgba(30,30,60,.1); }
.mine-tabs em { font-style: normal; color: var(--brand); margin-left: 2px; }
.tpage-head h2 { margin: 0; font-size: 22px; }
.tpage-head .sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.tpage-head .grow { flex: 1; }

/* 任务大厅 */
.hall-filters { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; }
.filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-row > label { width: 42px; flex: none; font-size: 11.5px; color: var(--muted); }
.fchip {
  height: 27px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent;
  background: #f5f6fb; color: var(--ink2); font-size: 11.5px; cursor: pointer;
}
.fchip:hover { background: #eef0ff; color: var(--brand); }
.fchip.on { background: var(--brand-soft); color: var(--brand); border-color: #d5d1fb; font-weight: 600; }
.hall-group { margin-bottom: 20px; }
.hall-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font-size: 13px; color: var(--ink2); }
.hall-group h3 span { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.hall-group h3::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.task-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 14px 15px; display: flex; flex-direction: column; gap: 7px; transition: .16s; }
.task-card:hover { border-color: #d9d5fb; box-shadow: var(--shadow-sm); }
.tc-top { display: flex; align-items: center; gap: 7px; }
.tc-ava { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #6f63ff, #a07bff); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.tc-who { flex: 1; min-width: 0; line-height: 1.3; }
.tc-who b { font-size: 12.5px; }
.tc-who span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.tc-subj { font-size: 10px; padding: 3px 8px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.tc-title { font-size: 13px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.tc-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.tc-bottom { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tc-bottom .btn { margin-left: auto; }

/* 我的任务 */
.mine-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.mine-solo { display: flex; align-items: flex-start; }
.mine-solo .task-rail { width: 360px; max-width: 100%; }
.mine-solo .rail-item { cursor: default; }
.mine-solo .rail-item:hover { border-color: var(--line); background: #fff; }
.rail-open { margin-top: 8px; display: inline-flex; text-decoration: none; }
.rail-release { margin-top: 8px; margin-left: 6px; color: #7a8194; }
.rail-group { display: flex; align-items: center; gap: 6px; margin: 9px 2px 5px; font-size: 10px; color: var(--muted); font-weight: 600; }
.rail-group em { font-style: normal; color: var(--brand); font-weight: 600; }
.rail-state { display: inline-block !important; font-size: 9px; line-height: 1; padding: 3px 7px; border-radius: 8px; margin-top: 6px; }
.rail-state.wait { color: #b26a00; background: #fff7e8; }
.rail-state.ok { color: #087f3d; background: #e9f9ef; }
.rail-item.done { background: #fbfdfb; }
.rail-open.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c9c3fb; }
.embed-area {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  height: calc(100vh - 88px); box-shadow: var(--shadow-sm);
}
.embed-bar { display: flex; align-items: center; gap: 8px; flex: none; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #fbfcff; }
.embed-bar b { font-size: 12px; color: var(--ink2); }
.embed-bar .grow { flex: 1; }
.embed-bar .embed-actions { display: flex; align-items: center; gap: 3px; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.embed-bar .embed-actions .btn { flex: none; padding: 4px 6px; font-size: 11px; }
.embed-bar .embed-actions .btn.on { background: #1a6feb; color: #fff; border-color: #1a6feb; }
.embed-bar[hidden] { display: none !important; }
.embed-body { flex: 1; min-height: 0; display: flex; }
.embed-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.embed-area.fullscreen { position: fixed; inset: 0; z-index: 9999; height: 100vh; border: 0; border-radius: 0; }
body.embed-lock { overflow: hidden; }
.embed-empty { flex: 1; padding: 90px 24px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.8; }
.task-rail { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.task-rail .rail-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin: 0 2px 10px; }
.task-rail .rail-head span { margin-left: auto; font-size: 10px; color: var(--muted); font-weight: 400; }
.rail-list { display: block; max-height: calc(100vh - 210px); overflow: auto; }
.rail-group { display: block; margin-bottom: 10px; }
.rail-item { display: block; }
.rail-item b { word-break: normal; overflow-wrap: anywhere; }
.rail-group-title { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6b7280; font-weight: 600; padding: 2px 4px 5px; }
.rail-group-title span { margin-left: auto; font-size: 10px; color: #9aa3b2; font-weight: 400; }
.rail-empty.small { padding: 6px; }
.rail-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 10px; cursor: pointer; transition: .16s; }
.rail-item:hover { border-color: #d5d1fb; background: #fbfaff; }
.rail-item.on { border-color: #c9c3fb; background: linear-gradient(135deg, #f4f2ff, #fff); }
.rail-item b { display: block; font-size: 11.5px; line-height: 1.4; overflow-wrap: anywhere; }
.rail-item span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.rail-go { display: inline-block; font-style: normal; font-size: 10px; color: var(--brand); margin-top: 5px; }
.rail-empty { font-size: 11px; color: var(--muted); padding: 20px 8px; text-align: center; line-height: 1.7; }

.work { min-width: 0; }
.work-empty { background: #fff; border: 1px dashed #d9d5f7; border-radius: 18px; padding: 70px 24px; text-align: center; color: var(--muted); }
.work-empty .wi { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.work-empty .wi svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.work-empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink2); }
.work-empty p { margin: 0; font-size: 12px; line-height: 1.7; }

.work-head { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 12px 15px; border-bottom: 0; }
.wh-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wh-top h3 { margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.wh-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.wh-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wh-tools .btn { height: 31px; font-size: 11.5px; }
.wh-tools .btn.on { background: var(--brand-soft); color: var(--brand); border-color: #d5d1fb; }
.wh-tools .spacer { flex: 1; }
.wh-status { font-size: 10px; color: var(--muted); }

.work-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 0 0 16px 16px; overflow: hidden; background: #fff; }
.pdf-pane { padding: 12px; border-right: 1px solid var(--line); min-width: 0; }
.crop-pane { padding: 12px; min-width: 0; background: #fbfbfe; }
.pane-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink2); margin: 0 2px 9px; }
.pane-head span { font-size: 9.5px; color: var(--muted); font-weight: 400; }
.pane-head .grow { flex: 1; }

.pdf-stage { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef0f8; cursor: default; }
.pdf-stage.draw { cursor: crosshair; }
.pdf-stage img { display: block; width: 100%; height: auto; }
.line-layer { position: absolute; inset: 0; pointer-events: none; }
.pdf-line { position: absolute; left: 0; right: 0; height: 8px; margin-top: -3px; border-top: 2px solid #e5484d; pointer-events: auto; cursor: grab; }
.pdf-line::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 14px; }
.pdf-line::after { content: attr(data-label); position: absolute; right: 4px; top: -18px; font-size: 9px; background: #e5484d; color: #fff; border-radius: 4px; padding: 1px 5px; }
.pdf-line:hover { border-top-color: #b3252b; }
.pdf-line.dragging { border-top-color: #6c5ce7; cursor: grabbing; }
.pdf-hint { font-size: 10px; color: var(--muted); margin: 8px 2px 0; line-height: 1.6; }
.line-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.line-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: #b3252b; background: var(--red-soft); border-radius: 6px; padding: 2px 4px 2px 7px; }
.line-chip button { border: 0; background: transparent; color: #b3252b; cursor: pointer; font-size: 12px; line-height: 1; padding: 0 2px; }
.line-chip .ln-nudge { font-size: 10px; color: #6b7280; }

.page-nav { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.page-nav .pg { font-size: 11px; color: var(--muted); min-width: 62px; text-align: center; }

.crop-list { display: grid; gap: 10px; max-height: calc(100vh - 300px); overflow: auto; padding-right: 2px; }
.crop-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.crop-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line2); }
.crop-head span { margin-left: auto; font-size: 9px; color: var(--muted); font-weight: 400; }
.crop-img { display: block; width: 100%; background: #f4f5fb; border-bottom: 1px solid var(--line2); }
.crop-body { padding: 8px 10px 10px; display: grid; gap: 7px; }
.crop-field label { display: block; font-size: 9.5px; color: var(--muted); margin-bottom: 3px; }
.crop-field textarea { width: 100%; height: 42px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11px; line-height: 1.5; background: #fbfcff; outline: none; font-family: inherit; }
.crop-field textarea:focus { border-color: #b9b5fb; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.crop-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 40px 16px; line-height: 1.8; }

.ocr-box { margin-top: 10px; border: 1px solid #e3e0fd; background: #fbfaff; border-radius: 10px; padding: 10px 12px; }
.ocr-box h4 { margin: 0 0 6px; font-size: 11px; color: var(--brand); display: flex; align-items: center; gap: 6px; }
.ocr-box h4 span { margin-left: auto; font-size: 9px; color: var(--muted); font-weight: 400; }
.kw-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.kw-chip { font-size: 9.5px; background: var(--violet-soft); color: #6d30d4; border-radius: 5px; padding: 2px 6px; }
.ocr-text { max-height: 88px; overflow: auto; font-size: 10.5px; line-height: 1.7; color: var(--ink2); white-space: pre-wrap; background: #fff; border-radius: 8px; padding: 8px; border: 1px solid var(--line2); }

/* 逐题核对 */
.verify-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px; }
.verify-top h3 { margin: 0; font-size: 15px; }
.verify-top .grow { flex: 1; }
.vpos { font-size: 11px; color: var(--muted); min-width: 78px; text-align: center; }
.vcheck { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink2); }
.verify-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr) minmax(0, 1fr); gap: 13px; margin-top: 13px; align-items: start; }
.verify-grid.two { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.vcol { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.vcap { font-size: 10px; color: var(--muted); margin: 0 1px 7px; }
.vimg { display: block; width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #f4f5fb; }
.vkw-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.vkw-row span { width: 18px; height: 18px; border-radius: 5px; background: #f4f5fb; color: #8a92a6; font-size: 9px; display: grid; place-items: center; flex: none; }
.vkw-row input { flex: 1; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 11px; background: #fbfcff; outline: none; }
.vkw-row input:focus { border-color: #b9b5fb; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.vwide { width: 100%; margin-top: 4px; }
.vfield { width: 100%; height: 46px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11px; line-height: 1.5; background: #fbfcff; outline: none; font-family: inherit; }
.vfield:focus { border-color: #b9b5fb; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.vocr { width: 100%; height: 110px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 10.5px; line-height: 1.65; background: #fbfcff; color: var(--ink2); font-family: inherit; }
.vmatch { display: grid; gap: 8px; }
.match-card { border: 1px solid var(--line); border-radius: 10px; padding: 7px; background: #fff; }
.m-img { display: block; width: 100%; max-height: 108px; object-fit: contain; background: #f7f8fc; border-radius: 6px; }
.m-stem { font-size: 10.5px; line-height: 1.6; color: var(--ink2); margin-top: 5px; }
.m-meta { font-size: 9px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.vm-loading, .vm-empty { font-size: 10.5px; color: var(--muted); padding: 18px 8px; text-align: center; line-height: 1.7; }
.vnote { font-size: 9.5px; color: #aeb4c4; line-height: 1.7; margin: 9px 2px 0; }
@media (max-width: 1100px) {
  .verify-grid { grid-template-columns: 1fr; }
}


@media (max-width: 1200px) {
  .work-grid { grid-template-columns: 1fr; }
  .pdf-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .crop-list { max-height: none; }
}
@media (max-width: 900px) {
  .tview { padding: 14px 14px 0; }
  .tnav button, .tnav a { padding: 0 9px; font-size: 12px; }
  .mine-wrap { grid-template-columns: 1fr; }
  .rail-list { max-height: 220px; }
  .embed-area { height: 84vh; }
  .embed-frame { height: 100%; }
  .task-grid { grid-template-columns: 1fr; }
  .tpage-head { flex-wrap: wrap; }
}

/* AI 设置弹窗 */
.tmodal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tmodal[hidden] { display: none !important; }
.tmask { position: absolute; inset: 0; background: rgba(20, 22, 40, .45); }
.tpanel { position: relative; width: min(440px, 94vw); background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 24px 70px rgba(30, 30, 60, .28); }
.tpanel h3 { margin: 0 0 6px; font-size: 17px; }
.tm-desc { margin: 0 0 14px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.tpanel label { display: block; margin: 10px 0 5px; font-size: 11px; color: var(--muted); }
.tpanel input { width: 100%; box-sizing: border-box; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; font-size: 12px; outline: none; }
.tpanel input:focus { border-color: #b9b5fb; box-shadow: 0 0 0 3px rgba(99, 91, 255, .08); }
.tm-mask { color: #00a870; font-size: 10px; margin-left: 4px; }
.tm-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.tm-msg { margin-top: 8px; font-size: 11px; color: #e5484d; min-height: 14px; }

/* 已处理：批改结果查看/修改 */
.review-wrap { display: flex; flex-direction: column; height: 100%; width: 100%; background: #f5f6fb; }
.review-bar { display: flex; align-items: center; gap: 10px; flex: none; padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.review-bar b { font-size: 13px; }
.review-bar span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-bar .grow { flex: 1; }
.review-list { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-head .grow { flex: 1; }
.rv-no { font-size: 12px; font-weight: 700; color: var(--brand); }
.rv-type { font-size: 10px; color: var(--muted); }
.rv-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.rv-badge.ok { color: #087f3d; background: #e8f8ef; }
.rv-badge.bad { color: #c62828; background: #fff1f0; }
.rv-badge.wait { color: #8a6d00; background: #fff8e5; }
.review-img { display: block; width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--line2); border-radius: 10px; background: #fafbfc; }
.review-fields { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; margin-top: 9px; }
.review-fields label { display: block; font-size: 10px; color: var(--muted); }
.review-fields input, .review-fields textarea { width: 100%; box-sizing: border-box; margin-top: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11px; font-family: inherit; background: #fbfcff; outline: none; }
.review-fields input { height: 30px; }
.review-fields textarea { height: 56px; resize: vertical; }
.review-fields input:focus, .review-fields textarea:focus { border-color: #b9b5fb; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.review-actions { display: flex; gap: 8px; margin-top: 8px; }
.rv-btn.right.on, .rv-btn.wrong.on { background: #1a6feb; color: #fff; border-color: #1a6feb; font-weight: 700; }
@media (max-width: 900px) { .review-fields { grid-template-columns: 1fr; } }


/* 任务信息 / 页面排序弹层 */
.tmodal { position: fixed; inset: 0; z-index: 9999; background: rgba(16,22,36,.46); display: flex; align-items: center; justify-content: center; padding: 0; }
.tmbox { width: min(760px, 94vw); max-height: 88vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.28); padding: 18px 20px 16px; }
.tmbox.wide { width: 100vw; height: 100vh; max-height: none; border-radius: 0; display: flex; flex-direction: column; padding: 12px 16px 10px; }
.tmbox h3 { margin: 0 0 3px; font-size: 17px; }
.tmbox .tsub { margin: 0 0 14px; color: #86909c; font-size: 12px; }
.tedit-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tedit-row label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #4e5969; }
.tedit-row select { height: 34px; border: 1px solid #e5e6eb; border-radius: 8px; padding: 0 8px; font-size: 12px; background: #fff; }
.tacts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.tmbox.wide .pgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 10px; margin-top: 4px; max-height: none; overflow: auto; padding-right: 4px; }
.pgcard { position: relative; border: 1px solid #e5e6eb; border-radius: 10px; background: #fafbff; padding: 7px; text-align: center; min-height: 0; display: flex; flex-direction: column; }
.pgslots { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 5px; flex: none; justify-content: center; }
.pgslot { border: 1px solid #dbe4f5; background: #fff; color: #1a6feb; border-radius: 5px; padding: 1px 5px; font-size: 10px; line-height: 16px; cursor: pointer; }
.pgslot:hover { background: #eef4ff; }
.pgslot.on { background: #1a6feb; color: #fff; border-color: #1a6feb; }
.pgcard img { width: 100%; flex: 1; min-height: 0; height: auto; max-height: none; object-fit: contain; background: #fff; border-radius: 5px; display: block; }
.pgcard span { display: block; flex: none; margin-top: 5px; font-size: 10.5px; color: #86909c; }
.pgnum { position: absolute; left: 10px; top: 10px; z-index: 2; border: 0; border-radius: 7px; background: #1a6feb; color: #fff; font-size: 14px; font-weight: 700; padding: 4px 9px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.pgnum:hover { background: #0f5bd0; }
@media (max-width: 1100px) { .tmbox.wide .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tedit-row { grid-template-columns: repeat(2, 1fr); } .tmbox.wide .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 教师端内部嵌入：知识库 / 知识点批改 */
.teacher-embed { display: block; width: 100%; height: calc(100vh - 64px); border: 0; background: #f5f7fb; }

/* 一页一题 */
.crop-list.one { display: block; max-height: calc(100vh - 330px); overflow: auto; }
.crop-card.one .crop-img { max-height: calc(100vh - 430px); width: 100%; object-fit: contain; }
.crop-card.one .crop-img.bad { min-height: 120px; background: #fff5f5; }
.crop-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 9px; font-size: 11px; color: #6b7280; }
.crop-nav .btn[disabled] { opacity: .45; }

.embed-bar .embed-actions .btn.danger { color:#d4380d; border-color:#ffc9bd; }
.embed-bar .embed-actions .btn.danger:hover { background:#fff4f2; }
.embed-bar .embed-actions .btn:disabled { opacity:.45; cursor:not-allowed; }

.embed-bar .done-hint { font-size:10px; color:#b76e00; max-width:150px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.mine-tabs { display:flex; gap:5px; margin:0 2px 8px; }
.mine-tabs button { flex:1; border:1px solid #e2e6ef; background:#fff; color:#4e5969; border-radius:7px; padding:6px 4px; font-size:11.5px; cursor:pointer; }
.mine-tabs button.on { background:#1a6feb; border-color:#1a6feb; color:#fff; }

body { overscroll-behavior: none; }

.topbar .manage-link { font-size:11px; color:#4f46e5; text-decoration:none; border:1px solid #dcd8ff; background:#f4f2ff; border-radius:7px; padding:5px 9px; margin-right:8px; }
.topbar .manage-link:hover { background:#ece9ff; }

.retq-mask { position:fixed; inset:0; z-index:9999; background:rgba(20,24,40,.45); display:flex; align-items:center; justify-content:center; }
.retq-box { width:min(1000px,94vw); max-height:90vh; overflow:auto; background:#fff; border-radius:12px; padding:14px; }
.retq-head { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.retq-head b { font-size:15px; } .retq-head span { color:#8a93a6; font-size:11px; } .retq-head .retq-x { margin-left:auto; }
.retq-body { display:grid; grid-template-columns:1.2fr 1fr; gap:12px; }
.retq-img { background:#fafbfe; border:1px solid #e8ebf2; border-radius:8px; padding:6px; }
.retq-img img { width:100%; max-height:56vh; object-fit:contain; }
.retq-form { display:grid; gap:9px; align-content:start; }
.retq-form label { font-size:11px; color:#6b7280; display:grid; gap:4px; }
.retq-form input { border:1px solid #dfe3ec; border-radius:7px; padding:8px; font-size:12px; }
.retq-result { display:flex; gap:8px; }
.retq-result button { flex:1; padding:10px; border:1px solid #dfe3ec; background:#fff; border-radius:8px; cursor:pointer; }
.retq-result button.on { background:#e8f7ee; border-color:#7ac99a; color:#16803c; font-weight:700; }
.retq-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.retq-foot .retq-save { background:#16803c; border-color:#16803c; color:#fff; }

.task-count { display:inline-flex; align-items:center; gap:5px; font-size:11px; color:#4e5969; background:#fff; border:1px solid #dbe7ff; border-radius:7px; padding:2px 5px; }
.task-count input { width:52px; border:1px solid #dfe3ec; border-radius:5px; padding:4px 5px; font-size:11px; }
.task-count [data-task-count] { padding:4px 7px !important; }

.top-links { display:flex; gap:6px; margin-right:8px; }
.top-links a { text-decoration:none; color:#4e5969; font-size:11px; border:1px solid #e4e9f2; background:#fff; border-radius:7px; padding:5px 8px; }
.top-links a:hover { color:#1a4d9e; border-color:#bcd3f5; }
