:root {
  --bg: #f5f7f6;
  --card: #ffffff;
  --ink: #17211f;
  --muted: #6a7a76;
  --line: #e2e8e6;
  --brand: #0f766e;
  --brand-deep: #0b5f59;
  --brand-soft: #e7f4f1;
  --warn: #b45309;
  --warn-soft: #fdf3e5;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 36, .05), 0 8px 24px -16px rgba(16, 40, 36, .25);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 650; letter-spacing: .2px;
  font-size: 15.5px;
}
.brand:hover { text-decoration: none; color: var(--brand); }
.brand svg { color: var(--brand); flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav .link-btn {
  padding: 6px 10px; border-radius: 8px;
  font-size: 14px; color: var(--muted);
}
.nav > a:hover, .nav .link-btn:hover {
  background: var(--brand-soft); color: var(--brand-deep); text-decoration: none;
}
.nav-user { font-weight: 550; color: var(--ink) !important; }

/* ---------------------------------------------------------- 布局 */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 18px 72px;
}

.foot {
  max-width: 900px; margin: 0 auto; padding: 0 18px 40px;
  color: #9aa8a4; font-size: 12.5px; text-align: center;
}

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h1 {
  margin: 0 0 2px; font-size: 24px; line-height: 1.3; font-weight: 680;
  letter-spacing: -.3px;
}
.sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.sub a { font-weight: 500; }

.hero { margin: 12px 0 22px; }
.hero h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.5px; }
.hero .sub { font-size: 14.5px; }

/* ---------------------------------------------------------- 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card.soft { background: #fbfcfc; box-shadow: none; }
.card-title {
  margin: 0 0 14px; font-size: 15px; font-weight: 650; color: var(--ink);
  letter-spacing: -.1px;
}

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- 表单 */
.form .field { display: block; margin-bottom: 16px; }
.label, .field > span:first-child {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 550; color: #3d4a47;
}
.label em, .field em { font-style: normal; color: #9aa8a4; font-weight: 400; }

input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;           /* iOS 少于 16px 会强制缩放 */
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7dfdc;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 74px; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
input::placeholder, textarea::placeholder { color: #a9b5b1; }

.two-col {
  display: grid; grid-template-columns: 160px 1fr; gap: 14px;
}
.two-col .field { margin-bottom: 12px; }
@media (max-width: 620px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 14.5px; font-weight: 550;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .06s, background .15s, border-color .15s, color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: #fff; border-color: #d7dfdc; color: #35423f; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: #fbfdfd; }
.btn-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0dcc0; }
.btn-warn:hover { background: #fbe9d3; color: #8f4207; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 16px; }
.btn-block { width: 100%; }

.link-btn {
  font: inherit; font-size: 13.5px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--brand);
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }

.inline-form { display: inline; margin: 0; }

.actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px;
}

/* ---------------------------------------------------------- 提示条 */
.flash {
  border-radius: 11px;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid transparent;
}
.flash-err { background: var(--danger-soft); color: #8d1d17; border-color: #f5d3d0; }
.flash-ok { background: var(--ok-soft); color: #14622f; border-color: #cfe9d8; }
.flash-warn { background: var(--warn-soft); color: #8f4207; border-color: #f0dcc0; }
.flash-info { background: var(--brand-soft); color: var(--brand-deep); border-color: #cfe7e3; }
.flash .btn { margin-left: 10px; }

/* ---------------------------------------------------------- 统计 */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px; text-align: center;
}
.stat b { display: block; font-size: 21px; font-weight: 680; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.s-ok b { color: var(--ok); }
.stat.s-warn b { color: var(--warn); }

/* ---------------------------------------------------------- 列表 */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(16, 40, 36, .03);
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.row:hover {
  text-decoration: none;
  border-color: #c3d6d1;
  box-shadow: 0 2px 14px -6px rgba(16, 40, 36, .25);
}
.row:active { transform: scale(.995); }

.subj {
  flex: none;
  min-width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--c, #0f766e);
  color: #fff; font-size: 13px; font-weight: 650; letter-spacing: .5px;
  padding: 0 8px;
}

.row-main { flex: 1; min-width: 0; }
.row-title {
  display: block; font-weight: 550; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-meta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row-meta .who { color: #3d4a47; font-weight: 600; }

.badge {
  flex: none;
  font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid transparent;
}
.badge-lg { font-size: 13px; padding: 6px 13px; }
.b-pending { background: #f1f4f3; color: #5b6b67; border-color: #e2e8e6; }
.b-graded { background: var(--ok-soft); color: #14622f; border-color: #cfe9d8; }
.b-returned { background: var(--danger-soft); color: #8d1d17; border-color: #f5d3d0; }

.empty {
  text-align: center; color: var(--muted);
  background: var(--card); border: 1px dashed #d7dfdc;
  border-radius: var(--radius); padding: 46px 20px;
}
.empty p { margin: 0 0 14px; }

/* ---------------------------------------------------------- 筛选 */
.toolbar { margin-bottom: 16px; display: grid; gap: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 550;
  background: #eff3f2; color: #4d5c58;
}
.tab:hover { background: #e6ecea; text-decoration: none; color: #35423f; }
.tab.on { background: var(--brand); color: #fff; }
.tab.on:hover { background: var(--brand-deep); color: #fff; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px; border-radius: 999px;
  font-size: 13px; background: #fff; border: 1px solid #d7dfdc; color: #4d5c58;
}
.chip:hover { border-color: var(--brand); color: var(--brand-deep); text-decoration: none; }
.chip.on { background: var(--brand-soft); border-color: #b9ddd7; color: var(--brand-deep); font-weight: 600; }

/* 单选 chips */
.chips.pick { gap: 7px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span {
  display: inline-block;
  padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px;
  background: #fff; border: 1px solid #d7dfdc; color: #4d5c58;
  cursor: pointer; transition: all .13s;
  user-select: none;
}
.chip-radio span:hover { border-color: var(--brand); color: var(--brand-deep); }
.chip-radio input:checked + span {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}
.chip-radio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(15, 118, 110, .18); }

/* ---------------------------------------------------------- 上传 */
.pick-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

.preview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 9px; margin-top: 4px;
}
.preview:empty { display: none; }
.pv {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: #eef2f1; border: 1px solid var(--line);
}
.pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv .pv-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  color: #fff; font-size: 10.5px; padding: 12px 6px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pv .pv-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(15, 25, 23, .62); color: #fff;
  font-size: 14px; line-height: 22px; padding: 0; text-align: center;
}
.pv .pv-del:hover { background: var(--danger); }

.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

/* ---------------------------------------------------------- 详情 */
.files {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.thumb {
  display: block; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: #eef2f1;
  aspect-ratio: 4 / 3;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--brand); }

.fileitem {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; border-radius: 11px;
  background: #fbfcfc; border: 1px solid var(--line);
  color: #35423f; font-size: 13.5px;
}
.fileitem:hover { border-color: var(--brand); text-decoration: none; }
.fileitem span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileitem em { font-style: normal; color: var(--muted); font-size: 12px; }

.note {
  background: #fbfcfc; border-left: 3px solid #cfe0dc;
  padding: 10px 14px; border-radius: 0 9px 9px 0;
  margin: 0 0 14px; color: #35423f; font-size: 14px;
  white-space: pre-wrap;
}

.result { border-color: #cfe7e3; background: linear-gradient(180deg, #fbfefd, #fff); }
.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.score { font-size: 34px; font-weight: 700; color: var(--brand-deep); line-height: 1; letter-spacing: -1px; }
.score small { font-size: 13px; font-weight: 500; margin-left: 2px; color: var(--muted); }
.lvl {
  font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
}
.lvl-优秀 { background: var(--ok-soft); color: #14622f; }
.lvl-良好 { background: var(--brand-soft); color: var(--brand-deep); }
.lvl-合格 { background: #f1f4f3; color: #5b6b67; }
.lvl-需订正 { background: var(--danger-soft); color: #8d1d17; }
.comment {
  margin: 0; padding: 12px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  white-space: pre-wrap; font-size: 14.5px; color: #2c3936;
}

.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

.muted { color: var(--muted); }
.danger-t { color: var(--danger); }

/* ---------------------------------------------------------- 账号管理 */
.userlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.userrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
  background: #fbfcfc; flex-wrap: wrap;
}
.userrow.off { opacity: .62; }
.uname { font-weight: 600; font-size: 14.5px; margin-right: 8px; }
.umeta { font-size: 12.5px; color: var(--muted); }
.tag-role {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: #e9effd; color: #24459a; margin: 0 3px;
}
.tag-role.child { background: var(--brand-soft); color: var(--brand-deep); }
.uacts { display: flex; align-items: center; gap: 8px; }

details.mini summary {
  cursor: pointer; font-size: 13px; color: var(--brand); list-style: none;
  padding: 6px 11px; border-radius: 8px; border: 1px solid #d7dfdc; background: #fff;
}
details.mini summary::-webkit-details-marker { display: none; }
details.mini[open] summary { border-color: var(--brand); }
.mini-form { display: flex; gap: 6px; margin-top: 8px; }
.mini-form input { font-size: 14px; padding: 6px 10px; width: 150px; }

/* ---------------------------------------------------------- 步骤 */
.steps { margin: 0; padding-left: 20px; color: #46544f; font-size: 14px; }
.steps li { margin-bottom: 8px; }
.steps b { color: var(--ink); }

/* ---------------------------------------------------------- 灯箱 */
.lightbox {
  border: 0; padding: 0; margin: auto;
  max-width: 96vw; max-height: 94vh;
  background: transparent;
}
.lightbox::backdrop { background: rgba(9, 16, 15, .86); }
.lightbox img {
  max-width: 96vw; max-height: 90vh; display: block;
  border-radius: 8px; margin: 0 auto;
}
.lb-close {
  position: fixed; top: 14px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 22px;
  background: rgba(255, 255, 255, .16); color: #fff;
  line-height: 40px; padding: 0;
}
.lb-close:hover { background: rgba(255, 255, 255, .3); }

/* ---------------------------------------------------------- 小屏 */
@media (max-width: 640px) {
  .wrap { padding: 16px 13px 64px; }
  .page-head h1 { font-size: 21px; }
  .stats { gap: 8px; }
  .stat { padding: 10px 4px; }
  .stat b { font-size: 18px; }
  .row { padding: 11px 12px; gap: 10px; }
  .subj { min-width: 42px; height: 42px; font-size: 12px; }
  .row-title { font-size: 14.5px; }
  .nav > a, .nav .link-btn { padding: 6px 7px; font-size: 13.5px; }
  .brand span { display: none; }
  .brand::after { content: "测试站"; font-weight: 650; }
  .files { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .btn-lg { width: 100%; }
}

/* ==================================================== 测验：列表 */
.qgrid { display: grid; gap: 12px; }

.quizrow { padding: 15px 16px; margin-bottom: 0; }
.qh { display: flex; align-items: center; gap: 12px; }
.qi { flex: 1; min-width: 0; }
.qt { font-weight: 600; font-size: 15px; line-height: 1.4; }
.qm { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.qacts {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line);
}

/* ==================================================== 测验：出卷 */
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qhead .card-title { margin-bottom: 0; }
.qhead-right { display: flex; align-items: center; gap: 10px; }

.qlist { display: grid; gap: 12px; margin-top: 14px; }

.qcard {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 11px;
  padding: 13px 14px 14px;
  background: #fcfdfd;
}
.qtop { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.qno {
  font-size: 12.5px; font-weight: 650; color: var(--brand-deep);
  background: var(--brand-soft); padding: 2px 9px; border-radius: 999px;
}
.qtype {
  width: auto; font-size: 13px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid #d7dfdc; background: #fff;
}
.qpt { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.qpt input {
  width: 64px; font-size: 14px; padding: 4px 7px; text-align: center;
  border: 1px solid #d7dfdc; border-radius: 7px;
}
.qdel { margin-left: auto; color: var(--danger); border-color: #f0d3d0; }
.qdel:hover { background: var(--danger-soft); border-color: #e5b9b5; color: var(--danger); }

.qstem {
  width: 100%; font-size: 15px; line-height: 1.55;
  border: 1px solid #d7dfdc; border-radius: 9px; padding: 9px 11px;
  margin-bottom: 10px; font-family: inherit; resize: vertical;
}

.opts { display: grid; gap: 7px; margin-bottom: 8px; }
.optrow { display: flex; align-items: center; gap: 8px; }
.optmark {
  flex: none; width: 24px; text-align: center;
  font-size: 12.5px; font-weight: 650; color: var(--muted);
}
.optrow input {
  flex: 1; font-size: 15px; padding: 7px 10px;
  border: 1px solid #e0e6e4; border-radius: 8px;
}
.odel {
  flex: none; width: 30px; padding: 0; font-size: 15px;
  color: var(--muted); border-color: transparent; background: transparent;
}
.odel:hover { color: var(--danger); background: var(--danger-soft); }

.qcard .field { margin-bottom: 10px; }
.qcard .two-col { grid-template-columns: 1fr 1fr; gap: 10px; }
.qmore { margin-top: 6px; }
.qmore summary {
  cursor: pointer; font-size: 12.5px; color: var(--muted);
  list-style: none; padding: 4px 0;
}
.qmore summary::-webkit-details-marker { display: none; }
.qmore summary::before { content: "▸ "; }
.qmore[open] summary::before { content: "▾ "; }
.qmore textarea {
  width: 100%; font-size: 14px; padding: 8px 10px; margin-top: 6px;
  border: 1px solid #e0e6e4; border-radius: 8px; font-family: inherit;
}

.qadd { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.dlg {
  border: 0; border-radius: 14px; padding: 20px 20px 16px;
  max-width: 640px; width: 92vw; box-shadow: 0 24px 60px -20px rgba(9, 30, 27, .5);
}
.dlg::backdrop { background: rgba(9, 16, 15, .55); }
.dlg-title { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.dlg textarea {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.5; border: 1px solid #d7dfdc;
  border-radius: 9px; padding: 10px; margin: 8px 0 4px; resize: vertical;
}
.dlg code {
  background: #f1f4f3; padding: 1px 5px; border-radius: 4px; font-size: 12px;
}

/* ==================================================== 测验：答题 */
.tcard { padding: 16px 16px 18px; }
.tq { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 11px; }
.qtag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: #eef2f1; color: #5b6b67; font-weight: 500;
}
.qpts { font-size: 12px; color: var(--muted); margin-left: auto; }

.stem {
  font-size: 15.5px; line-height: 1.65; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; margin-bottom: 13px;
}

.choices { display: grid; gap: 8px; }
.choices.judge { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .choices.judge { grid-template-columns: 1fr; } }

.choice {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border: 1px solid #d7dfdc; border-radius: 11px;
  background: #fff; cursor: pointer;
  transition: border-color .13s, background .13s;
  font-size: 15px;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: #b9cfc9; }
.choice.on,
.choice:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
}
.cletter {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f0f3f2; color: #5b6b67; font-size: 12.5px; font-weight: 650;
  transition: background .13s, color .13s;
}
.choice.on .cletter,
.choice:has(input:checked) .cletter { background: var(--brand); color: #fff; }
.ctext { flex: 1; word-break: break-word; }

.takefill {
  width: 100%; font-size: 16px; padding: 11px 13px;
  border: 1px solid #d7dfdc; border-radius: 10px;
}
.takeshort {
  width: 100%; font-size: 16px; line-height: 1.6; padding: 11px 13px;
  border: 1px solid #d7dfdc; border-radius: 10px; font-family: inherit;
  resize: vertical;
}

.submitbar { position: sticky; bottom: 0; background: rgba(245,247,246,.94);
  backdrop-filter: blur(8px); padding: 12px 0; margin-top: 6px; }

/* ==================================================== 测验：成绩 */
.scorebadge {
  display: flex; align-items: baseline; gap: 4px;
  background: var(--brand-soft); color: var(--brand-deep);
  padding: 8px 16px; border-radius: 12px;
}
.scorebadge b { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.scorebadge span { font-size: 13px; color: var(--muted); }

.pctbar {
  position: relative; height: 32px; border-radius: 999px;
  background: #e9eeec; overflow: hidden; margin-bottom: 16px;
}
.pctfill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, #0f766e, #14a08f);
  border-radius: 999px; transition: width .5s ease;
}
.pctlabel {
  position: relative; display: block; text-align: center;
  font-size: 12.5px; font-weight: 600; color: #22302d; line-height: 32px;
}

.rcard { border-left: 3px solid var(--line); }
.rc-ok { border-left-color: #34a853; }
.rc-bad { border-left-color: #d93025; }
.rc-todo { border-left-color: #e0a53f; }

.mark { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.mark.ok { background: var(--ok-soft); color: #14622f; }
.mark.bad { background: var(--danger-soft); color: #8d1d17; }
.mark.todo { background: var(--warn-soft); color: #8f4207; }

.ansrow { display: flex; gap: 10px; font-size: 14px; margin-bottom: 7px; align-items: flex-start; }
.anslabel {
  flex: none; width: 62px; font-size: 12.5px; color: var(--muted);
  padding-top: 1px;
}
.ansval { flex: 1; word-break: break-word; white-space: pre-wrap; }
.ansval.wrong { color: #b3261e; }
.ansval.good { color: #14622f; font-weight: 500; }

.fb {
  display: flex; gap: 10px; font-size: 14px; margin-top: 9px;
  padding: 10px 12px; background: #fbfcfc; border-radius: 9px;
  border: 1px solid var(--line); white-space: pre-wrap;
}
.fb.exp { background: #fdfaf4; border-color: #f0e6d3; }

/* ==================================================== 导入页 */
.checkline {
  display: flex; align-items: center; gap: 9px;
  margin-top: 12px; font-size: 14px; color: #3d4a47; cursor: pointer;
}
.checkline input { width: 18px; height: 18px; accent-color: var(--brand); }

details.doc { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
details.doc summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand-deep);
  list-style: none; padding: 4px 0;
}
details.doc summary::-webkit-details-marker { display: none; }
details.doc summary::before { content: "▸ "; }
details.doc[open] summary::before { content: "▾ "; }

.spectable {
  width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 13.5px;
}
.spectable th, .spectable td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spectable th { background: #f7f9f8; font-weight: 600; color: #3d4a47; width: 120px; }
.spectable code, p.hint code {
  background: #eef2f1; padding: 1px 5px; border-radius: 4px;
  font-size: 12.5px; color: #0b5f59;
}

pre.ex {
  background: #12211f; color: #d7e6e2; border-radius: 11px;
  padding: 14px 16px; overflow: auto; font-size: 12.5px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: 8px 0;
}

/* 预览页选项 */
.optview { display: grid; gap: 6px; margin-bottom: 12px; }
.optline { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.optline .optmark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f0f3f2; font-size: 11.5px; font-weight: 650; color: #5b6b67;
}

/* 孩子首页的待做测试条 */
.qstrip { margin-bottom: 20px; }
.strip-title {
  margin: 0 0 10px; font-size: 13px; font-weight: 650;
  color: var(--muted); letter-spacing: .3px;
}
.qlink { display: block; color: inherit; }
.qlink:hover { text-decoration: none; border-color: #c3d6d1; }

/* 待批改的分数框 */
.scorebadge.pending {
  background: var(--warn-soft); color: #8f4207;
  padding: 8px 14px; border-radius: 12px;
}
.scorebadge.pending b { font-size: 16px; font-weight: 650; letter-spacing: 0; }
