/* 智慧课堂 全局样式 —— 配色：青主色 + 校园语义色（r38 由校园蓝 #2B65C8 换为青 #0E7490）
   主色 #0E7490（白底 5.36:1）；成功 #27AE60；警告 #E53935；强调/行动 #F57C00；进行中 #22D3EE
   ★ 语义色与主色分离：#0E7490 只做界面主色；「病假/事假」保留 #2B65C8，勿并入 --brand
   教师端浅色：#F7F8FA 底 / 白卡 / 文字 #1D2129；学生端 #F8F9FB 底、大圆角、大按钮；大屏高对比深色 */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #1d2129;
  --muted: #6e7681;
  --line: #e5e8ef;
  --brand: #0e7490;      /* 主色：青（白底对比度 5.36:1，可承载文字与按钮） */
  --brand-d: #155e75;    /* 主色·深（hover / 深底） */
  --brand-bg: #ecfeff;   /* 主色·浅底（徽章底 / 选中底 / 提示框底） */
  /* 注：参考图的亮青 #22D3EE 在浅色底上对比度仅 1.9:1，不可承载文字，本套色系暂不使用；
     留待将来做「大屏/深色主题」时再启用（黑底上 #22D3EE 对比度 11.6:1，很合适） */
  --blue: #2b65c8;       /* ★ 语义色：病假 / 事假（与主色有意分离，勿并入 --brand） */
  --blue-d: #2455ad;
  --blue-bg: #eaf1fc;
  --green: #27ae60;
  --green-bg: #e8f6ee;
  --red: #e53935;
  --red-bg: #fdeceb;
  --amber: #c77700;
  --amber-bg: #fdf3e3;
  --orange: #f57c00;
  --orange-bg: #fdf0e3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-d); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 6px 0; }
small, .muted { color: var(--muted); }
code, pre { font-family: Consolas, "Courier New", monospace; }
pre { background: #f0f3f9; padding: 10px 12px; border-radius: 8px; overflow: auto; }

/* ---------- 布局 ---------- */
.topnav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 54px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.brand-logo { width: 26px; height: 26px; border-radius: 7px; display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links > a { color: var(--ink); font-size: 14px; }
.nav-user { color: var(--muted); font-size: 14px; }
.container { max-width: 1180px; margin: 22px auto; padding: 0 20px 60px; }
.container.wide { max-width: 1500px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card h2 { display: flex; align-items: center; justify-content: space-between; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.grow { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 9px; cursor: pointer;
  padding: 8px 16px; font-size: 14px; line-height: 1.4; background: #fff; color: var(--ink);
  border-color: var(--line); transition: all .15s; min-height: 36px;
}
.btn:hover { border-color: #c8d2e6; background: #f8fafd; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-d); color: #fff; }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: #116932; color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c1c1; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef2f8; color: var(--ink); }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 12px 26px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 13px; color: var(--muted); font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], select, textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 15px;
  background: #fff; color: var(--ink); font-family: inherit; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #a5f3fc; border-color: var(--brand); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; }

/* ---------- 提示 ---------- */
.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 12px; font-size: 14px; }
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.flash-warn { background: var(--amber-bg); color: var(--amber); }
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #22304a; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: fadein .2s; }
.toast.err { background: var(--red); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; }
.b-ok { background: var(--green-bg); color: var(--green); }
.b-err { background: var(--red-bg); color: var(--red); }
.b-warn { background: var(--amber-bg); color: var(--amber); }
.b-muted { background: #eef1f6; color: var(--muted); }
.b-brand { background: var(--brand-bg); color: var(--brand); }
.b-leave { background: var(--blue-bg); color: var(--blue); }

/* ---------- r15 测验豁免标记 ---------- */
.tag-exempt { display: inline-block; padding: 1px 9px; border-radius: 8px; background: #eef1f6; color: var(--muted); font-size: 12px; }
.tag-suggest { display: inline-block; padding: 1px 9px; border-radius: 8px; background: var(--brand-bg); color: var(--brand); font-size: 12px; cursor: pointer; }
.dot-miss { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber, #ef9f27); margin-left: 4px; vertical-align: middle; }
.btn-warn { background: var(--amber-bg, #faeeda); color: #854f0b; border-color: #efc98f; }
.btn-warn:hover { background: #f7e2c2; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { background: #f7f9fc; font-size: 13px; color: var(--muted); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafbfd; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
/* ★ 全局 .tbl 是 nowrap（教师端大批量表要看齐），但「模块」这类格子里塞了 60 个章节 chip，
 *   nowrap 会把表格撑到 1300px，导致整页横向溢出（r53b 实测 274px）。允许这类格子换行。 */
.tbl td.wrap, .tbl th.wrap { white-space: normal; }

/* ---------- 课程卡片 ---------- */
.grid-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.course-card .cname { font-size: 17px; font-weight: 700; }
.course-card .cmeta { color: var(--muted); font-size: 13px; }
.course-card .clive { position: absolute; top: 14px; right: 14px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 10px 18px; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #e6feff 0%, #f7feff 60%); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(20,40,90,.10); padding: 36px 34px; width: 380px; max-width: 94vw; }
.login-card .lg { width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ---------- 实时课堂控制台 ---------- */
.live-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.live-title { font-size: 18px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.pill b { font-size: 16px; }
.pill.live { background: var(--brand-bg); color: var(--brand); border-color: #a5f3fc; }
.pill.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.slide-stage { background: #0d1322; border-radius: var(--radius); position: relative; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.slide-stage img { max-width: 100%; max-height: 66vh; display: block; }
.slide-confuse { position: absolute; top: 12px; right: 14px; background: rgba(239,159,39,.92); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.slide-bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 12px 0; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; position: relative; }
.thumbs img { height: 64px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; opacity: .75; }
.thumbs img.cur { border-color: var(--brand); opacity: 1; }
.thumb-quiz-tag { position: absolute; top: 8px; font-size: 11px; background: var(--green-bg); color: var(--green); border: 1px solid var(--green); border-radius: 999px; padding: 0 6px; pointer-events: none; z-index: 2; }

/* —— 课件页随堂测验提示条（讲到绑定页一键发布）—— */
#slideQuizBar { margin-top: 10px; display: grid; gap: 8px; }
.sqbar { border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sqbar-draft { background: var(--green-bg); border: 1.5px solid var(--green); animation: sqpulse 2s infinite; }
.sqbar-live { background: var(--brand-bg); border: 1.5px solid var(--brand); display: block; }
.sqbar-done { background: #f1f3f8; border: 1px solid var(--line); }
.sqbar-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.sqbar-title { font-size: 16px; font-weight: 700; }
.sqbar-big { font-size: 24px; color: var(--brand); }
.sqbar-stats { border-top: 1px dashed var(--brand); margin-top: 8px; padding-top: 8px; }
.sqstat-row { padding: 6px 0; border-bottom: 1px solid rgba(37,99,235,.12); font-size: 14px; }
.sqopt { display: inline-flex; align-items: center; gap: 6px; margin: 3px 14px 3px 0; }
.sqopt-label { font-weight: 700; min-width: 26px; display: inline-block; text-align: center; white-space: nowrap; }
.sqopt-bar { display: inline-block; width: 130px; height: 12px; border-radius: 6px; background: rgba(37,99,235,.12); overflow: hidden; vertical-align: middle; }
.sqopt-bar i { display: block; height: 100%; background: var(--brand); transition: width .6s; }
.sqopt-num { font-weight: 700; }
@keyframes sqpulse { 50% { box-shadow: 0 0 0 5px rgba(21,128,61,.15); } }
.sign-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.qr-box { text-align: center; }
.qr-box img { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.qr-countdown { font-size: 14px; color: var(--muted); margin-top: 6px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.chip { border-radius: 9px; padding: 6px 8px; font-size: 13px; text-align: center; background: #f1f3f8; color: var(--muted); border: 1px solid transparent; }
.chip.on { background: var(--green-bg); color: var(--green); font-weight: 600; }
.chip.late { background: var(--amber-bg); color: var(--amber); }
.chip .fl { display: block; font-size: 11px; color: var(--red); font-weight: 600; }
.qbar-row { display: grid; grid-template-columns: 52px 1fr 46px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 5px; }
.qbar { background: #eef1f6; border-radius: 6px; height: 18px; overflow: hidden; }
.qbar > div { height: 100%; background: #67e8f9; border-radius: 6px; min-width: 2px; }
.qbar > div.right { background: #7fd3a4; }
.qbar > div.wrong { background: #f0a4a4; }
.pick-display { text-align: center; padding: 28px 10px; }
.pick-display .pname { font-size: 44px; font-weight: 800; color: var(--brand); transition: opacity .06s; }
.pick-display .pno { color: var(--muted); font-size: 16px; }
.pick-display .pname.rolling { color: var(--orange); text-shadow: 0 0 12px rgba(245,124,0,.35); }
.stat-big { font-size: 30px; font-weight: 800; }
.progress { background: #eef1f6; height: 10px; border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); transition: width .3s; }
.answer-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.answer-item .who { font-weight: 600; }
/* ---------- r33：复盘页「参考答案 / 解析」（勾选「提交后显示答案」后出现） ---------- */
.ref-box { border: 1px solid #a5f3fc; border-left: 4px solid var(--brand); border-radius: 10px;
  background: var(--brand-bg); padding: 10px 14px; margin-top: 10px; }
.ref-box .ref-h { font-size: 13px; font-weight: 700; color: var(--brand-d); margin-bottom: 4px; }
.ref-box .ref-b { white-space: pre-wrap; font-size: 14.5px; color: var(--ink); line-height: 1.7; }
.recheck-overlay { position: fixed; inset: 0; background: rgba(13, 19, 34, .78); z-index: 200; display: flex; align-items: center; justify-content: center; }
.recheck-card { background: #fff; border-radius: 18px; padding: 40px 50px; text-align: center; max-width: 92vw; }
.recheck-card h2 { font-size: 26px; }

/* ---------- 学生端 ---------- */
.s-top { background: #fff; border-bottom: 1px solid var(--line); }
/* r57：760 → 1040。760px 在 1366 屏上只占 56%（两侧各空 303px），1920 上只占 40%，
   像把手机版套在显示器上 —— 这是「学生端首页不好看」最主要的一条（r55 实测）。
   ★ 答题页 / 上课页这类长文本页用 .s-wrap.narrow 收窄到 820，避免一行太长难读。 */
.s-top-inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.s-wrap { max-width: 1040px; margin: 16px auto; padding: 0 16px 80px; }
.s-wrap.narrow { max-width: 820px; }
.s-banner { border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s-banner.sign { background: var(--amber-bg); color: var(--amber); }
.s-banner.quiz { background: var(--brand-bg); color: var(--brand); }
.s-banner.end { background: #eef1f6; color: var(--muted); }
.s-slide { width: 100%; border-radius: 10px; background: #0d1322; display: block; }
.s-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 0; }
.s-back { font-size: 26px; font-weight: 700; line-height: 1; text-decoration: none; color: inherit; opacity: .75; padding: 0 2px; flex: 0 0 auto; }
.s-back:hover { opacity: 1; }
.s-pagenav { display: inline-flex; gap: 8px; align-items: center; }
.btn-confuse { background: var(--orange-bg); color: var(--orange); border-color: #f5c993; padding: 10px 18px; }
.big-check { font-size: 64px; text-align: center; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.q-card .qstem { font-size: 16px; font-weight: 600; white-space: pre-wrap; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 8px; cursor: pointer; }
.opt:hover { border-color: #a5f3fc; }
.opt input { margin-top: 4px; }
.opt.sel { border-color: var(--brand); background: var(--brand-bg); }
.opt.right { border-color: var(--green); background: var(--green-bg); }
.opt.wrong { border-color: var(--red); background: var(--red-bg); }
/* ---------- r31：出题页 —— 选项框可输入提示 / 保存校验定位 ---------- */
.opt input::placeholder { color: #a9b4c4; }
.opt.opt-empty { border-style: dashed; }
.opt.opt-err { border-color: var(--red); background: var(--red-bg); border-style: solid; }
.card.q-err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
#saveProblems ul { margin: 6px 0 0; padding-left: 20px; }
#saveProblems ul li { margin: 2px 0; }
.pts { color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---------- 其他 ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--muted); }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; background: #fff; }
details.box summary { cursor: pointer; font-weight: 600; }
/* r26：可折叠的卡片（如「分组讨论」等低频模块）默认收起，标题行整条可点 */
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '展开 ▾'; margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 400; white-space: nowrap; }
details.card[open] > summary::after { content: '收起 ▴'; }
.footer-hint { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0 10px; }

@media (max-width: 900px) {
  .sign-layout { grid-template-columns: 1fr; }
  .qr-box img { width: 200px; height: 200px; }
}
@media (max-width: 640px) {
  .container { padding: 0 12px 60px; }
  .card { padding: 14px; }
  .nav-inner { padding: 0 12px; }
  .topnav .nav-links a:not(.btn) { display: none; }
  .chips { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .slide-stage img { max-height: 40vh; }
}

/* ---------- 真全屏（放映模式）：隐藏一切界面元素，只展示当前 Tab 主体 ---------- */
body.fs-present { background: #000; overflow: hidden; }
/* r19：签到页全屏时左右两卡改 position:fixed，<main> 高度塌缩为 0 → 页脚(备案号)会浮到
   屏幕顶部与标题重叠。全屏即投屏演示态，导航本就隐藏，页脚一并隐藏。 */
body.fs-present footer { display: none !important; }
body.fs-present .topnav,
body.fs-present .live-top,
body.fs-present nav.tabs,
body.fs-present .slide-bar,
body.fs-present .thumbs,
body.fs-present .flash { display: none !important; }
body.fs-present .container,
body.fs-present .container.wide { max-width: none; width: 100%; margin: 0; padding: 0; }
/* 课件：黑底铺满视口 */
body.fs-present .slide-stage { border-radius: 0; min-height: 100vh; background: #000; }
body.fs-present .slide-stage img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; }
body.fs-present .slide-confuse { z-index: 40; }
/* 随堂测验提示条：全屏时悬浮在底部控制条上方 */
body.fs-present #slideQuizBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; width: min(920px, 92vw); z-index: 50; }
/* 签到：全屏时左侧实时签到名单、右侧大二维码（投 LED 大屏：教师浏览器全屏后大屏即显示，远距离可扫） */
body.fs-present #tab-sign { height: 100vh; overflow: hidden; }
body.fs-present #tab-sign .sign-layout {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px;
  height: 100vh; padding: 3vh 3vw; align-items: stretch;
}
/* 名单放左列、二维码放右列（与 DOM 顺序对调） */
body.fs-present #tab-sign .sign-layout > .qr-box { order: 2; }
body.fs-present #tab-sign .sign-layout > .sign-right { order: 1; }
body.fs-present #tab-sign .sign-layout > div:last-child {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
body.fs-present #tab-sign .sign-layout > div:last-child .card {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px; color: #fff; flex: 1; min-height: 0; display: flex; flex-direction: column;
}
body.fs-present #tab-sign .sign-layout > div:last-child .card h2 { font-size: 26px; color: #fff; }
body.fs-present #tab-sign #signBig { font-size: 42px; color: #fff; }
body.fs-present #tab-sign #signChips {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(var(--sign-cols, 4), 1fr);
  gap: var(--sign-gap, 10px); align-content: start; padding-right: 6px;
}
body.fs-present #tab-sign .chip {
  font-size: var(--sign-fs, 26px); padding: var(--sign-pad, 12px 14px);
  border-radius: 10px; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.fs-present #tab-sign .chip.on { background: #1e8e3e; border-color: #1e8e3e; }
body.fs-present #tab-sign .chip.late { background: #d97706; border-color: #d97706; }
body.fs-present #tab-sign .chip .fl { display: none; }
body.fs-present #tab-sign #flagCard { flex: 0 0 auto; max-height: 22vh; overflow-y: auto; }
body.fs-present #tab-sign #photoCard { display: none !important; }
body.fs-present #tab-sign .qr-box {
  /* 固定在屏幕右侧垂直居中：不随内容/滚动条移动，也不被底部控制条遮挡（z-index 高于悬浮条） */
  position: fixed; right: 3vw; top: 50%; transform: translateY(-50%);
  z-index: 70; margin: 0; max-width: 46vw;
  text-align: center; background: transparent; border: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
body.fs-present #tab-sign .qr-box img { width: min(600px, 52vh, 38vw); height: auto; border-width: 10px; }
/* 缩小 PPT 翻页按钮高度（正常模式控制条 + 全屏悬浮条共用） */
.slide-bar .btn-lg, #fsHoverBar .btn-lg { padding: 6px 18px; font-size: 15px; }
body.fs-present #tab-sign .qr-box .qr-countdown { font-size: 30px; font-weight: 700; margin-top: 14px; color: #fff; }
/* 全屏隐藏操作控件（开始/停止/设置/提示），大屏只展示名单+二维码 */
body.fs-present #tab-sign .qr-box .row,
body.fs-present #tab-sign .qr-box .inline-form,
body.fs-present #tab-sign .qr-box p.muted { display: none; }

/* ---------- r12 签到管理页（sign_live.html）：普通模式尺寸 ---------- */
/* r19：二维码尺寸/列表限高改由 CSS 控制（原先写在 style 行内，行内优先级高于
   任何选择器，导致全屏时"二维码放大 600px""名单撑满 88vh"两条规则全部失效——
   表现为二维码一直是 300px、左侧名单只到 60vh） */
#signLive .qr-box { min-width: 300px; }
#signLive .qr-box img { width: 300px; height: auto; border: 6px solid #0E7490; border-radius: 14px; }
#signLive #qrCount { font-size: 13px; margin: 8px 0 0; }
#signLive #signListWrap { max-height: 60vh; }

/* ---------- r23 签到结果「方块」视图：姓名长方条 + 状态颜色 ---------- */
/* 列表 / 方块切换（分段按钮，与页面其它小控件同风格） */
.seg { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.seg-btn { border: none; background: #fff; color: var(--muted); font: inherit; font-size: 13px; line-height: 1.7; padding: 2px 12px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { background: var(--brand-bg); color: var(--brand); }
.seg-btn.on { background: var(--brand); color: #fff; font-weight: 600; }
.h2-l { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 状态色（与表格徽标同色系：绿=出勤 橙=迟到 蓝=病假/事假 红=缺勤 灰=未签）
   ★ 病假/事假的「蓝」用 --blue 语义色，不是主色青；色块与 .b-leave 徽章同色 */
.st-present { background: var(--green); }
.st-late    { background: #d97706; }
.st-sick    { background: var(--blue); }
.st-leave   { background: var(--blue); }
.st-absent  { background: var(--red); }
.st-none    { background: #9aa3b2; }

.sign-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.sign-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.sign-legend .lg[data-zero="1"] { opacity: .45; }
.sign-legend .lg b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sign-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.schips-wrap { padding: 8px; }
#signChipsWrap { height: 60vh; }   /* 与 #signListWrap 的 max-height:60vh 对齐 */
.schips { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 40px; gap: 8px;
  font-size: 15px; align-content: center; height: 100%; }
.schip { border: none; font-family: inherit; font-size: 1em; font-weight: 600; color: #fff; border-radius: 8px;
  cursor: pointer; padding: 0 6px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap; line-height: 1.2; }
.schip:hover { filter: brightness(1.08); }

/* ---------- r12 签到管理页全屏投码（sign_live.html） ---------- */
/* r19：二维码尺寸统一由 --qr-size 控制（左侧名单右边界同源），改一处即两边同步 */
body.fs-present #signLive { --qr-size: min(760px, 72vh, 46vw); }
body.fs-present #signLive > .row:first-child,
body.fs-present #signLive > p.muted { display: none !important; }
body.fs-present #signLive > .row { margin: 0; align-items: stretch; }
body.fs-present #signLive .qr-box {
  position: fixed; right: 3vw; top: 50%; transform: translateY(-50%);
  z-index: 70; background: transparent; border: none; box-shadow: none; min-width: 0;
  max-width: calc(var(--qr-size) + 60px); }
body.fs-present #signLive .qr-box img { width: var(--qr-size); height: auto; border-width: 10px; border-radius: 18px; }
body.fs-present #signLive .qr-box #qrCount { font-size: 30px; color: #fff; margin-top: 16px; white-space: nowrap; }
body.fs-present #signLive .qr-box .qrHint { display: none; }   /* 全屏只留"X 秒后自动更换"，避免换行 */
body.fs-present #signLive .qr-box .row { display: none; }
body.fs-present #signLive #signListWrap { max-height: none; }   /* 撑满卡片剩余高度 */
body.fs-present #signLive .grow.card {
  /* 左侧名单：上下边界尽量充满（2vh），右侧让开二维码实际占位（含内边距与轮换提示文字） */
  position: fixed; left: 2vw; top: 2vh; bottom: 2vh;
  right: calc(var(--qr-size) + 6vw + 60px); width: auto;
  margin-bottom: 0;              /* r19：去掉 .card 的 18px 下外边距，上下留白才对称(否则底边被抬起 18px) */
  background: transparent; border: none; box-shadow: none; overflow: hidden;
  display: flex; flex-direction: column; }
body.fs-present #signLive .grow.card h2 { font-size: 28px; color: #fff; flex: 0 0 auto; }
body.fs-present #signLive .grow.card h2 .badge { font-size: 22px; }
body.fs-present #signLive .grow.card .tbl-wrap {
  flex: 1; min-height: 0; max-height: none; overflow: auto;
  background: rgba(255,255,255,.05); border-radius: 12px; }
body.fs-present #signLive .tbl { background: transparent; min-width: 0; }
body.fs-present #signLive .tbl th, body.fs-present #signLive .tbl td { padding: 8px 10px; }
body.fs-present #signLive .tbl th { color: rgba(255,255,255,.75); font-size: 17px; background: transparent; border-color: rgba(255,255,255,.15); }
body.fs-present #signLive .tbl td { color: #fff; font-size: 18px; background: transparent; border-color: rgba(255,255,255,.15); }
body.fs-present #signLive .tbl td .badge { font-size: 15px; }
body.fs-present #signLive #stMenu { display: none !important; }
/* r23：全屏投屏时的方块视图——深色底、图例白字，方块铺满左侧整块 */
body.fs-present #signLive #signChipsWrap { height: auto; }
body.fs-present #signLive .grow.card .schips-wrap {
  flex: 1; min-height: 0; overflow: hidden;
  background: rgba(255,255,255,.05); border-radius: 12px; }
body.fs-present #signLive .grow.card .sign-legend { flex: 0 0 auto; color: rgba(255,255,255,.82); }
body.fs-present #signLive .grow.card .sign-legend .lg b { color: #fff; }
body.fs-present #signLive #editHint { display: none; }   /* 全屏为投屏展示态，不提供就地改状态 */
body.fs-present #signLive .seg { border-color: rgba(255,255,255,.18); }
body.fs-present #signLive .seg-btn { background: rgba(255,255,255,.1); color: rgba(255,255,255,.82); }
body.fs-present #signLive .seg-btn + .seg-btn { border-left-color: rgba(255,255,255,.18); }
body.fs-present #signLive .seg-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
body.fs-present #signLive .seg-btn.on { background: var(--brand); color: #fff; }
/* 测验/互动：全屏放大展示统计主体 */
body.fs-present #tab-quiz, body.fs-present #tab-misc { padding: 4vh 6vw; overflow-y: auto; }
body.fs-present #tab-quiz .muted, body.fs-present #tab-misc .muted { display: none; }
body.fs-present #tab-quiz .card h2, body.fs-present #tab-misc .card h2 { font-size: 26px; }
body.fs-present .pname { font-size: 88px; }
body.fs-present .pno { font-size: 30px; }
/* 全屏悬浮控制条 */
#fsHoverBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(13, 19, 34, .88); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s; }
#fsHoverBar.show { opacity: 1; pointer-events: auto; }

/* ---------- 课堂视频 ---------- */
.sqbar-media { background: var(--purple-bg, #f1ebfb); border-color: #cdb9f0; }
body.fs-present #mediaBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; width: min(920px, 92vw); z-index: 50; }
#mediaOverlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 90; display: flex; align-items: center; justify-content: center; }
#mediaOverlay .media-box { width: min(1100px, 94vw); text-align: center; }
#mediaOverlay video { width: 100%; max-height: 78vh; background: #000; border-radius: 12px; }
.media-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.media-banner video, .s-media-box video { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; }
.s-media-box { width: min(700px, 92vw); text-align: center; background: #fff; border-radius: 14px; padding: 12px; }

/* ---------- 公告与师生交流 ---------- */
.board-post { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: var(--bg-card, #fff); }
.board-ann { background: #fff7e8; border-color: #f0c98a; }
.board-teacher { background: var(--brand-bg); border-color: #a5f3fc; }
.board-student { background: #fff; }
.board-post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-post-head .badge { flex: none; }
.board-post-body { margin-top: 6px; font-size: 15px; line-height: 1.6; word-break: break-word; }

/* ---------- r28 AI 学情分析报告（图文版式） ---------- */
#repRoot { font-size: 14px; max-width: 1080px; margin: 0 auto; }
.rep-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 0 0 12px; border-bottom: 1.5px solid var(--brand); margin-bottom: 14px; }
.rep-title { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.rep-title::before { content: ''; display: inline-block; width: 4px; height: 16px; border-radius: 2px;
  background: var(--brand); margin-right: 8px; vertical-align: -2px; }
.rep-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.rep-head-r { text-align: right; }
.rep-stamp { font-size: 12px; color: var(--muted); line-height: 1.7; }

.rep-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 10px; margin-bottom: 16px; }
.rep-k { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.rep-k-l { font-size: 12px; color: var(--muted); }
.rep-k-v { font-size: 23px; font-weight: 700; color: var(--brand); line-height: 1.35; margin-top: 2px;
  font-variant-numeric: tabular-nums; }
.rep-k-u { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rep-k-s { font-size: 11.5px; color: #8a94a3; }

.rep-fig { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 10px; margin-bottom: 14px;
  background: #fcfdff; }
.rep-fig-t { font-size: 12.5px; font-weight: 600; color: #4a5566; margin-bottom: 8px; }
.rep-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.rep-note b { color: var(--ink); }

.rep-verdicts { display: grid; gap: 8px; margin-bottom: 16px; }
.rep-v { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.6; border-left: 3px solid var(--brand); background: #f0fdff; }
.rep-v-i { font-weight: 700; flex: none; width: 15px; text-align: center; }
.rep-v-g { border-left-color: #0f766e; background: #f3faf8; } .rep-v-g .rep-v-i { color: #0f766e; }
.rep-v-a { border-left-color: #c77700; background: #fffaf1; } .rep-v-a .rep-v-i { color: #c77700; }
.rep-v-r { border-left-color: var(--red); background: #fff6f5; } .rep-v-r .rep-v-i { color: var(--red); }

.rep-sec { display: flex; align-items: center; gap: 9px; margin: 16px 0 8px; }
.rep-sec-n { width: 23px; height: 23px; flex: none; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.rep-sec-t { font-size: 15px; font-weight: 700; color: var(--ink); }
.rep-p { font-size: 14px; line-height: 1.9; color: #34404f; margin: 0; text-align: justify; }

.rep-list { margin: 0; padding: 0; list-style: none; }
.rep-list li { position: relative; padding: 7px 10px 7px 30px; border-radius: 9px; font-size: 13.5px;
  line-height: 1.75; margin-bottom: 6px; background: #f8fafc; border: 1px solid var(--line); }
.rep-list li::before { position: absolute; left: 10px; top: 7px; font-size: 12.5px; font-weight: 700; }
.rep-list-r li { background: #fff7f6; border-color: #f7d9d6; }
.rep-list-r li::before { content: '!'; color: var(--red); }
.rep-list-a li { background: #f0fdff; border-color: #a5f3fc; }
.rep-list-a { counter-reset: repa; }
.rep-list-a li { counter-increment: repa; padding-left: 34px; }
.rep-list-a li::before { content: counter(repa); color: var(--brand); left: 12px; }

.rep-causes { display: grid; grid-template-columns: repeat(auto-fit, minmax(336px, 1fr)); gap: 10px; }
.rep-cause { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.8; color: #34404f; }
.rep-cause-t { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }

.rep-empty { background: #f8fafc; border: 1px dashed #ccd5e3; border-radius: 10px; padding: 14px 16px;
  font-size: 13.5px; color: var(--muted); line-height: 1.8; margin: 0; }
.rep-raw { white-space: pre-wrap; line-height: 1.9; font-size: 14px; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.rep-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.rep-foot-t { font-size: 11.5px; color: #8a94a3; line-height: 1.8; margin: 0; }
.rep-foot-act { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------------- r30 题干图片（教师端：出题页 / 统计与批改页） ---------------- */
.qstem-img { display: block; max-width: 420px; max-height: 300px; width: auto; height: auto;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
  margin: 6px 0 10px; cursor: zoom-in; }
.qstem-img-sm { max-width: 260px; max-height: 180px; margin: 4px 0 6px; }
a:hover > .qstem-img { border-color: var(--brand); }
.q-img { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; padding: 10px 12px;
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fbfcfe; }
.q-img-ph { align-items: center; }
.q-img > a { flex: none; line-height: 0; }
.q-img img { display: block; max-width: 300px; max-height: 220px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; cursor: zoom-in; }
.q-img img:hover { border-color: var(--brand); }
.q-img-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  font-size: 13px; min-width: 0; }
.q-img label.btn { margin: 0; }

/* ---------- r37 长页面「回到顶部」浮标（师生端共用） ---------- */
.cc-top-btn { position: fixed; right: 14px; bottom: 18px; z-index: 60;
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .96);
  color: var(--ink); font-size: 19px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 30, 60, .16);
  display: none; align-items: center; justify-content: center; }
.cc-top-btn.on { display: inline-flex; }
.cc-top-btn:hover { border-color: var(--brand); color: var(--brand); }

@media print {
  .cc-top-btn { display: none !important; }
  .rep-foot .btn, .rep-foot { border: none; }
  .rep-foot .btn { display: none; }
  #repRoot { font-size: 12.5px; }
  .rep-fig, .rep-k, .rep-list li, .rep-cause, .rep-v { break-inside: avoid; }
  .qstem-img { max-width: 62mm; max-height: 46mm; margin: 4px 0 6px; }
  .qstem-img, .q-img { break-inside: avoid; }
}

/* ================= r39 题库（M3） =================
   ★ 尺寸/边框/限高一律写在这里，不在模板里用行内样式压（行内样式会压过任何选择器，
     以后想统一调整就得改十几个模板）。模板里的行内样式只负责一次性宽度微调。 */

.bank-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; align-items: center; }
.bank-chips .chip { border-radius: 999px; padding: 4px 12px; font-size: 13px;
  background: #f1f3f8; color: var(--muted); border: 1px solid transparent; }
.bank-chips .chip b { color: var(--ink); font-size: 14px; }
.bank-chips .chip-ok { background: var(--green-bg); color: #1e7d47; }
.bank-chips .chip-ok b { color: #1e7d47; }
.bank-chips .chip-warn { background: var(--amber-bg); color: var(--amber); }
.bank-chips .chip-warn b { color: var(--amber); }
.bank-chips .chip-muted { background: #eef1f6; }

/* 筛选条 */
.bank-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin: 0 0 10px; }
.bank-bar input, .bank-bar select { height: 34px; padding: 0 8px; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: auto; }
.bank-bar .bank-kw { flex: 1 1 220px; min-width: 200px; }

.bank-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }

/* 批量操作条 */
.bank-batch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--brand-bg); border: 1px solid #bfe6ef; border-radius: var(--radius);
  padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; }
/* ★ 必须显式写：[hidden] 的 display:none 会被上面的 display:flex 盖掉，
   于是「没勾选时批量条一直露着」——这是 CSS 覆盖 HTML 属性的常见坑。 */
.bank-batch[hidden] { display: none; }
.bank-batch select, .bank-batch input { height: 32px; padding: 0 8px; font-size: 13px;
  border: 1px solid #bfe6ef; border-radius: 8px; background: #fff; color: var(--ink); }

/* 列表表 */
table.bank-tbl { min-width: 880px; table-layout: fixed; }
.bank-tbl td { white-space: normal; vertical-align: top; word-break: break-word; }
.bank-tbl th:nth-child(1), .bank-tbl td:nth-child(1) { text-align: center; }
.bank-tbl form { margin: 0; display: inline; }
.bank-stem { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-weight: 600; color: var(--ink); word-break: break-word; }
.bank-stem:hover { color: var(--brand); }
.bank-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.bank-tags .badge { font-size: 11.5px; padding: 1px 8px; font-weight: 500; }
.bank-topic { font-size: 12.5px; line-height: 1.55; word-break: break-all; }

.bank-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; }

/* 编辑页 */
.req { color: var(--red); }
.bank-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bank-opt-k { width: 22px; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.bank-opt input { flex: 1 1 auto; }
.bank-topic-pick { max-height: 320px; overflow: auto; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; background: #fcfdff; }
.bank-topic-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  border-radius: 6px; font-size: 13.5px; cursor: pointer; }
.bank-topic-item:hover { background: var(--brand-bg); }
.bank-save { display: flex; gap: 10px; align-items: center; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid var(--line); }

/* 知识点树 */
table.bank-tree { min-width: 720px; }
.bank-tree td { vertical-align: middle; padding: 5px 12px; }
.bank-tree .btn { margin-right: 4px; }
.bank-tree tr.bank-merged td { opacity: .55; }

/* ---------- r39 M4：AI 标定 / 疑重 ---------- */
.flash-info { background: var(--brand-bg); color: var(--brand); }

.calib-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px;
  margin-right: 14px; white-space: nowrap; }
.calib-chk input { width: auto; height: auto; }

.calib-prog-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
  font-size: 14px; }
.calib-track { height: 10px; border-radius: 999px; background: #e8edf4; overflow: hidden; }
.calib-fill { height: 100%; width: 0; border-radius: 999px; background: var(--brand);
  transition: width .4s ease; }

/* 疑重：左右题对照 */
table.dup-tbl td { padding-top: 9px; padding-bottom: 9px; }
.dup-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.dup-meta .dup-score { font-size: 15px; font-weight: 700; color: var(--ink); }
.dup-meta .dup-note { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.dup-done { display: inline-block; font-size: 12.5px; color: var(--muted); }
.dup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dup-side { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: #fcfdff; font-size: 13px; line-height: 1.55; }
.dup-side .dup-id { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dup-side.drop { border-color: #f0c5c5; background: #fff8f8; }
@media (max-width: 760px) { .dup-pair { grid-template-columns: 1fr; } }



/* ---------------- 抽题组卷（r39 M5） ---------------- */
.pick-wrap { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .pick-wrap { grid-template-columns: 1fr; } }
/* 条件区不用 sticky：它本身比视口高，贴顶后底部会被裁掉（"能力点"下面的按钮看不见）。
   改成自然高度 + 预览区给「↑ 调整条件」锚点，比硬撑一个滚动容器可靠。 */
.pick-cond { align-self: start; }
.pick-cond h2, .pick-main h2 { font-size: 15.5px; margin: 0 0 12px; color: var(--ink); }
.pick-row { margin-bottom: 15px; }
.pick-lab { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.pick-opts { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.pick-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px;
  cursor: pointer; white-space: nowrap; }
.pick-hint { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.pick-quotas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-q { display: flex; align-items: center; gap: 6px; }
.pick-q input { width: 54px; height: 30px; padding: 0 6px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 7px; }
.pick-avail { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pick-sel { width: 100%; font-size: 13px; border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 6px; background: #fff; color: var(--ink); line-height: 1.7; }
/* r39：能力点扩到 293 个后，多选框自带搜索（按编号/关键词过滤选项） */
.pick-find { width: 100%; height: 30px; margin-bottom: 6px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.pick-find::placeholder { color: var(--muted); }
.pick-misc { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 12.5px; }
.pick-misc input, .pick-misc select { height: 32px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.pick-misc input[type=number] { width: 76px; }
.pick-misc-wide { gap: 14px; }
.pick-misc-wide .pick-title { flex: 1 1 240px; }
.pick-misc-wide .pick-title input { width: 100%; }
.pick-go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pick-need { font-size: 12.5px; color: var(--muted); }
.pick-empty { color: var(--muted); font-size: 13.5px; padding: 30px 18px; text-align: center;
  background: #fafbfd; border: 1px dashed var(--line); border-radius: 10px; }
.pick-cards { display: flex; flex-direction: column; gap: 10px; }
.pick-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.pick-card-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pick-no { width: 21px; height: 21px; border-radius: 50%; background: var(--brand-bg); color: var(--brand);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pick-pts { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pick-used { font-size: 11.5px; color: var(--amber); }
.pick-card-act { margin-left: auto; display: flex; gap: 2px; }
.pick-card-act .btn { min-height: 26px; padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.pick-stem { font-size: 13.5px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.pick-opts-list { font-size: 12.8px; color: #333; margin-top: 6px; line-height: 1.7; }
.pick-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pick-count { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.pick-tune { font-size: 12.5px; font-weight: 400; margin-left: 10px; color: var(--brand); }
.pick-commit { margin-top: 14px; }

/* 知识点树（r39 图谱导入后：393 行，节点列自适应） */
/* 不固定 table-layout 的话，深缩进 + 长节点名会把表格顶宽，把「删」按钮挤出卡片 */
table.bank-tree { table-layout: fixed; width: 100%; }
table.bank-tree td:nth-child(1) { overflow: hidden; }
table.bank-tree td:nth-child(1) > span { display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
table.bank-tree td:last-child { white-space: nowrap; }
table.bank-tree td:last-child .btn { padding: 2px 7px; font-size: 12px; margin-right: 2px; }

/* ---------- r39 能力点掌握度（AB 粒度） ---------- */
.mas-tbl td { vertical-align: middle; }
.mas-tbl .mas-group td { background: #f7f9fc; font-weight: 600; }
.mas-name { font-weight: 600; }
.mas-bar { display: inline-block; width: 132px; height: 10px; border-radius: 999px;
  background: #eef1f6; overflow: hidden; vertical-align: middle; }
.mas-bar > .mas-fill { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.mas-fill.ok { background: var(--green); }
.mas-fill.brand { background: var(--brand); }
.mas-fill.warn { background: var(--amber); }
.mas-fill.err { background: var(--red); }
.mas-num { display: inline-block; margin-left: 8px; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums; }

/* ==========================================================================
   r39 E 图谱（知识图谱 / 能力图谱 / 学生进度）
   —— 语义色沿用既有口径：绿=已掌握、青=基本掌握、橙=待加强、红=薄弱、灰=未测。
      不要为了「好看」把它们换成品牌色，掌握度是要靠颜色一眼判断的。
   ========================================================================== */
.t-ok { color: var(--green); }
.t-brand { color: var(--brand); }
.t-warn { color: var(--amber); }
.t-err { color: var(--red); }
.t-muted { color: var(--muted); }

.g-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
          justify-content: space-between; }
.g-head-l { min-width: 0; }
.g-back { display: inline-block; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.g-back:hover { color: var(--brand); }
.g-sub { font-size: 13px; margin-top: 2px; }
.g-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.g-tab { padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px;
         background: #fff; font-size: 13.5px; color: var(--ink); }
.g-tab:hover { border-color: var(--brand); color: var(--brand); }
.g-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.g-course-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.g-course-tab { padding: 4px 12px; border: 1px dashed var(--line); border-radius: 8px;
                font-size: 13px; color: var(--muted); background: #fff; }
.g-course-tab.on { border-style: solid; border-color: var(--brand); color: var(--brand);
                   background: var(--brand-bg); font-weight: 600; }

.g-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.g-scope label { font-size: 13px; color: var(--muted); }
.g-scope select { min-width: 210px; max-width: 46vw; padding: 5px 8px; border-radius: 8px;
                  border: 1px solid var(--line); background: #fff; font-size: 13.5px; }
.g-scope-note { font-size: 12.5px; flex: 1 1 220px; }

.g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 12px;
            align-items: start; }
.g-canvas-card { padding: 0; overflow: hidden; }
.g-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
             padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.g-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px;
         overflow: hidden; }
.g-seg button { border: 0; background: #fff; padding: 4px 11px; font-size: 13px;
                color: var(--muted); cursor: pointer; }
.g-seg button + button { border-left: 1px solid var(--line); }
.g-seg button.on { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
/* ★ r62：加了一组 −/+ 按钮后，1440 宽屏下这块工具栏会挤成两行（实测高度 94px，
   第二行只站一个「复位」）。宽屏把搜索框的伸缩基数与上限压小，让一排装得下；
   手机反过来——那里每行本来就装不满，搜索框给满整行更整齐（见 @media 720）。 */
.g-search { flex: 1 1 170px; min-width: 130px; max-width: 260px; padding: 5px 10px;
            border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
@media (min-width: 721px) {
  .g-search { flex: 1 1 140px; max-width: 190px; }
}
.g-check { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center;
           gap: 5px; cursor: pointer; }
.g-hint { font-size: 12px; }
/* r62 缩放按钮：手机没有滚轮、也不是人人会用双指，给一对显式按钮兜底。
   ★ 必须放在工具栏（HTML）而不是画进 <svg>：svg 内的一切都跟着 viewBox 缩放。 */
.g-zoom { display: inline-flex; border: 1px solid var(--line); border-radius: 8px;
          overflow: hidden; flex: none; }
.g-zoom button { border: 0; background: #fff; width: 30px; height: 27px; font-size: 16px;
                 line-height: 1; color: var(--ink); cursor: pointer; padding: 0; }
.g-zoom button + button { border-left: 1px solid var(--line); }
.g-zoom button:active { background: var(--brand-bg); color: var(--brand); }
.g-zoom button:disabled { color: #c9d0da; cursor: default; background: #fff; }
/* 「双指捏合」这句只在触屏/窄屏出现：桌面写它反而误导（桌面是滚轮） */
.g-touch-tip { display: none; }

/* 深色画布（2026-10-18 晚）：老师要求「图像区换个深色底」——节点是彩色圆点，
   压在浅灰底上颜色发闷、模块扇区也读不出来；深底之后颜色和层级线都跳出来了。
   只改画布本身，卡片、工具栏、图例仍是浅色，页面整体不会被拖成暗色主题。

   r62（2026-10-24）：底色换成**星空**（老师要求「无星球，有星云」）。
   r63（同日晚）：老师指定用他给的那张星云照片 —— `static/img/graph-nebula.webp`，
     由 `scripts/make_graph_bg_photo.py` 从 `assets/graph-nebula-src.jpg` 合成
     （竖图 281×500 → 左右镜像延展成 1600×900，中心清晰、两侧压暗虚化；参数固定，重跑字节一致）。
     r62 的矢量星野 `graph-starfield.svg` 保留作备选，当前不引用。
   ★ 为什么挂在 .g-stage 而不是画进 <svg>：SVG 里的东西会跟着 viewBox 缩放，
     星点会随放大变成大圆球、随平移一起飘走；背景要「不动」，只能放在画布容器上。
   ★ 两层：照片 + 暗角 scrim。压暗放这里而不是烤进图片，是为了**改深浅不用重跑脚本**；
     没有 scrim 时照片中心亮度 150+，节点标签会糊。
   ★ 仍然保留颜色兜底：图没加载出来时是纯深色，不会闪白。 */
.g-stage { position: relative; background-color: #070b14;
  background-image:
    radial-gradient(ellipse 92% 88% at 50% 44%,
      rgba(4, 8, 18, .30) 0%, rgba(4, 8, 18, .44) 58%, rgba(4, 8, 18, .74) 100%),
    url('/static/img/graph-nebula.webp');
  background-size: 100% 100%, cover;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat; }
.g-svgwrap { width: 100%; height: min(76vh, 800px); }
.g-svgwrap svg { display: block; width: 100%; height: 100%; touch-action: none;
                 cursor: grab; }
.g-svgwrap svg:active { cursor: grabbing; }

.g-legend { position: absolute; left: 10px; bottom: 8px; display: flex; align-items: center;
            gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted);
            background: rgba(255, 255, 255, .82); border: 1px solid var(--line);
            border-radius: 8px; padding: 4px 9px; pointer-events: none; }
.g-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
              margin-right: 4px; vertical-align: -1px; }
.g-legend i.t-ok { background: var(--green); }
.g-legend i.t-brand { background: var(--brand); }
.g-legend i.t-warn { background: var(--amber); }
.g-legend i.t-err { background: var(--red); }
.g-legend i.t-muted { background: #b9c0cc; }
.g-legend-line { width: 1px; height: 12px; background: var(--line); display: inline-block; }
.g-legend-e { position: relative; padding-left: 14px; }
.g-legend-e::before { content: ""; position: absolute; left: 0; top: 50%; width: 11px;
                      height: 0; border-top: 2px solid var(--brand); }
.g-legend-e.rel::before { border-top: 2px dashed #94a3b8; }
/* 层级连线：粗线示意「上一层粗、越往下越细」 */
.g-legend-e.lvl::before { border-top: 3px solid #94a3b8; }
/* ★ [hidden] 是 UA 规则，作者写任何 display 都会压过它：
   g:2 这种「没导依赖边」的题库靠 boot() 给 .g-legend-line 挂 hidden，
   结果竖分隔线照样画出来（2026-10-18 实测）。同理见 .g-empty。 */
.g-legend [hidden] { display: none !important; }

.g-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 220px;
         background: #1d2129; color: #fff; border-radius: 8px; padding: 6px 10px;
         font-size: 12px; line-height: 1.45; box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
         border: 1px solid rgba(255, 255, 255, .14); }
.g-tip b { display: block; font-size: 12.5px; }
.g-tip em { display: block; font-style: normal; color: #cbd5e1; font-size: 11.5px; }
.g-tip-pct { font-weight: 700; }
.g-tip .t-ok { color: #6ee7a8; }
.g-tip .t-brand { color: #7fd7e8; }
.g-tip .t-warn { color: #f5c26b; }
.g-tip .t-err { color: #ff9b96; }
.g-tip .t-muted { color: #cbd5e1; }

.g-empty { position: absolute; inset: 0; display: flex; flex-direction: column;
           align-items: center; justify-content: center; gap: 6px; color: var(--muted);
           font-size: 13px; text-align: center; padding: 20px; }
.g-empty b { font-size: 15px; color: var(--ink); }

/* ---- SVG 图元（深色画布版） ---- */
/* ---- SVG 图元 ----
 * ★ 2026-10-19：SVG 里所有「屏幕上应当恒定」的线宽，一律写成 calc(基准 / var(--gk))。
 *   --gk 是「屏幕上 1 个用户单位等于几 px」的缩放比，由 graph.js 的 applyZoomStyles()
 *   写在 <svg> 的 style 上、由所有子元素继承。
 *   不折算的后果（老师 10-19 截图）：放大后描边跟着放大十几倍 ——
 *   节点变成大白圈、标签描边比字还粗、连线变成几十 px 的粗带子，整块画布糊住看不了。
 *   边的基准宽度由 JS 挂在 --w0 上（每条不同：辐条 2.6 / 一级 2.4 / 二级 1.5 / 三级 1.0）。
 */
.gedges path { fill: none; stroke: #64748b; opacity: .5; pointer-events: none;
               stroke-width: calc(var(--w0, 1) * 1px / var(--gk, 1)); }
/* 层级线：一级最粗、二级次之、三级最细（宽度在 graph.js 的 edgeW 里定，
   这里只管颜色与透明度，越深越淡，几百个点同屏也不会糊） */
.gedges .ge-tree { stroke: #cbd5e1; }
.gedges .ge-tree.lv2 { opacity: .58; }
.gedges .ge-tree.lv3 { opacity: .40; }
.gedges .ge-tree.lv4 { opacity: .30; }
.gedges .ge-spoke { stroke: #94a3b8; opacity: .55; }
.gedges .ge-prereq { stroke: #38bdf8; opacity: .45; }
.gedges .ge-related { stroke: #a3b1c6; opacity: .42;
                      stroke-dasharray: calc(4px / var(--gk, 1)) calc(4px / var(--gk, 1)); }
.gedges path.on { opacity: .95 !important; stroke-width: calc(2.2px / var(--gk, 1)); }
.gedges path.fade { opacity: .07; }
.gn { stroke: #0c1420; stroke-width: calc(1.6px / var(--gk, 1)); cursor: pointer; }
.gn.sel { stroke: #fbbf24; stroke-width: calc(2.8px / var(--gk, 1)); }
.gn-hub { stroke-width: calc(1.4px / var(--gk, 1)); }
.gn.fade { opacity: .16; }
.gn.dim { opacity: .22; }
/* 标签：深底用浅字＋深色描边做「挖空」，原来白描边在这里会泛一层毛边 */
#labs text { fill: #c7d2e2; pointer-events: none; paint-order: stroke;
             stroke: #0c1420; stroke-width: calc(2.8px / var(--gk, 1)); stroke-linejoin: round; }
/* 同心参考环：同样是用户单位，不折算的话放大后变成三道粗环 */
.grid circle { stroke-width: calc(1px / var(--gk, 1)); }
#labs .l1 { fill: #f1f5f9; font-weight: 700; }
#labs .deep { fill: #9fb0c7; }

/* ---- 右侧详情 ---- */
.g-side { max-height: min(78vh, 760px); overflow: auto; }
.g-side-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.g-side-kicker { font-size: 11.5px; color: var(--brand); letter-spacing: .06em; }
.g-side h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.4; }
.g-side h4 { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px;
             font-weight: 600; }
.g-path { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.g-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 6px;
         font-variant-numeric: tabular-nums; }
.g-big em { font-size: 12px; font-style: normal; font-weight: 600; margin-left: 8px;
            color: var(--muted); }
.g-big.t-ok em { color: var(--green); }
.g-big.t-brand em { color: var(--brand); }
.g-big.t-warn em { color: var(--amber); }
.g-big.t-err em { color: var(--red); }
.g-bar { height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.g-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand);
           width: 0; }
.g-bar i.t-ok { background: var(--green); }
.g-bar i.t-brand { background: var(--brand); }
.g-bar i.t-warn { background: var(--amber); }
.g-bar i.t-err { background: var(--red); }
.g-bar i.t-muted { background: #c3c9d4; }
.g-kv { display: grid; grid-template-columns: 84px 1fr; gap: 3px 8px; margin: 12px 0 0;
        font-size: 12.5px; }
.g-kv dt { color: var(--muted); }
.g-kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.g-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.g-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px;
          padding: 3px 9px; font-size: 12px; color: var(--ink); cursor: pointer;
          display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.g-chip i { font-style: normal; font-size: 11px; color: var(--muted);
            font-variant-numeric: tabular-nums; }
.g-chip:hover { border-color: var(--brand); color: var(--brand); }
.g-chip.plain { cursor: default; background: #f7f9fc; }
.g-chip.plain:hover { border-color: var(--line); color: var(--ink); }
.g-chip.t-ok i { color: var(--green); }
.g-chip.t-brand i { color: var(--brand); }
.g-chip.t-warn i { color: var(--amber); }
.g-chip.t-err i { color: var(--red); }
.g-side-foot { margin-top: 16px; }
.g-note { font-size: 12px; margin-top: 12px; }
.g-legend2 { display: flex; flex-direction: column; gap: 4px; margin-top: 12px;
             font-size: 12px; color: var(--muted); }
.g-legend2 i { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
               margin-right: 6px; vertical-align: -1px; }

/* ---- r52 全库练习入口条（图谱页顶部） ---- */
.g-run { display: flex; gap: 14px; align-items: center; justify-content: space-between;
         flex-wrap: wrap; border-left: 4px solid var(--blue); }
.g-run-s { font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ---- 学生端统计卡 ---- */
.g-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }.g-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
          padding: 12px 14px; box-shadow: var(--shadow); }
.g-stat-k { font-size: 12px; color: var(--muted); }
.g-stat-v { font-size: 27px; font-weight: 700; line-height: 1.25;
            font-variant-numeric: tabular-nums; }
.g-stat-v em { font-size: 12px; font-style: normal; font-weight: 600; color: var(--muted);
               margin-left: 3px; }
.g-stat-s { font-size: 11.5px; color: var(--muted); }
.g-hintbar { padding: 8px 12px 12px; font-size: 12px; margin: 0; }

/* ---- 学生进度矩阵 ---- */
.g-matrix-card { padding: 0; overflow: hidden; }
.g-matrix-wrap { overflow: auto; max-height: 72vh; }
table.g-matrix { border-collapse: separate; border-spacing: 0; width: 100%;
                 font-size: 13px; }
.g-matrix th, .g-matrix td { padding: 6px 8px; border-bottom: 1px solid var(--line);
                             white-space: nowrap; }
.g-matrix thead th { position: sticky; top: 0; z-index: 2; background: #fff;
                     font-size: 11.5px; font-weight: 600; color: var(--muted);
                     text-align: center; border-bottom: 1px solid var(--line); }
.g-matrix thead th span { display: inline-block; max-width: 76px; overflow: hidden;
                          text-overflow: ellipsis; vertical-align: bottom; }
.g-matrix td.c-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.g-matrix td.c-name { font-weight: 600; }
.g-matrix .c-ov { font-weight: 700; }
.gcell { text-align: center; font-variant-numeric: tabular-nums; min-width: 46px; }
.gcell.t-ok { background: var(--green-bg); color: var(--green); }
.gcell.t-brand { background: var(--brand-bg); color: var(--brand); }
.gcell.t-warn { background: var(--amber-bg); color: var(--amber); }
.gcell.t-err { background: var(--red-bg); color: var(--red); }
.gcell.t-muted { color: #9aa3b2; }
.g-matrix .c-prog { min-width: 120px; }
.g-matrix .c-prog .g-bar { width: 74px; display: inline-block; vertical-align: middle; }
.g-matrix .c-prog .g-bar i { background: var(--brand); }
.g-matrix .c-prog em { font-style: normal; font-size: 11.5px; color: var(--muted);
                       margin-left: 6px; font-variant-numeric: tabular-nums; }
.g-matrix-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
                   padding: 8px 12px; font-size: 11.5px; color: var(--muted);
                   border-top: 1px solid var(--line); }
.g-matrix-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
                     margin-right: 4px; vertical-align: -1px; }
.g-matrix-legend i.t-ok { background: var(--green); }
.g-matrix-legend i.t-brand { background: var(--brand); }
.g-matrix-legend i.t-warn { background: var(--amber); }
.g-matrix-legend i.t-err { background: var(--red); }
.g-matrix-legend i.t-muted { background: #c3c9d4; }
.g-matrix-legend em { font-style: normal; }

/* ---- 学生端建议 ---- */
.g-advice-list { display: flex; flex-direction: column; gap: 6px; }
.g-advice-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
                 border: 1px solid var(--line); border-radius: 8px; background: #fcfdff;
                 font-size: 13.5px; }
.g-advice-item b { flex: 1; font-weight: 600; }
.g-advice-item em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.g-advice-pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; }

@media (max-width: 1024px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); }
  .g-side { max-height: none; }
}
@media (max-width: 720px) {
  .g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-svgwrap { height: 58vh; }
  .g-hint { display: none; }
  .g-scope select { min-width: 0; max-width: 100%; flex: 1 1 100%; }
  .g-legend { position: static; margin: 6px 8px 8px; }
  .g-toolbar { padding: 8px 10px; }
  /* 手机上让搜索框独占一行：否则「只看我测过的 + −/+ + 复位」会把它挤到只剩「回车定…」 */
  .g-search { flex: 1 1 100%; max-width: none; }
  .g-touch-tip { display: inline; }
  /* 手机上画布要占满一屏才好转弯抹角地放大：58vh 里还要塞工具栏与图例 */
  .g-stage { overscroll-behavior: contain; }
}

/* ---- r39 E 修订：空态/扇区/能力图谱 ---- */
.g-empty[hidden] { display: none; }
/* 扇区：深底上只能靠「一点点更亮」区分模块，太亮会盖住节点 */
.gsectors .gsec { fill: rgba(255, 255, 255, .038); stroke: none; }
.gsectors .gsec.alt { fill: rgba(255, 255, 255, .078); }
.gedges .ge-spoke { stroke: #9fb0c7; opacity: .65; }
/* ★ 字号必须写 em：applyZoomStyles 是给 #labs 设 font-size 属性来做「屏幕恒定字号」的，
   子元素写 px 会把继承链截断，缩到 300 个点时中心那两个字就没有了 */
#labs .hub-t { font-size: 1.28em; font-weight: 700; fill: #7dd3fc; }
#labs .hub-s { font-size: .95em; fill: #9fb0c7; }
#labs .l1 { font-size: 1.02em; }
.gn.rootn { stroke-width: calc(2.2px / var(--gk, 1)); }
/* 2026-10-18 二次修订：树状不再限制 2 层，层级档位在四种画法下都完整可用，
   .g-cap2 的隐藏规则已删除（原来会把「知识点 / 全部」两个按钮藏掉） */
.g-empty { color: #93a4bb; }
.g-empty b { color: #e8eef7; }
.g-matrix td.c-no, .g-matrix td.c-name,
.g-matrix th.c-no, .g-matrix th.c-name {
  position: sticky; left: 0; background: #fff; z-index: 1;
}
.g-matrix th.c-name, .g-matrix td.c-name { left: 96px; }
.g-matrix thead th.c-no, .g-matrix thead th.c-name { z-index: 3; }
.g-matrix tbody tr:hover td { background: #f7fbff; }
.g-matrix thead th span { max-width: 58px; }
.gcell { min-width: 40px; padding: 6px 5px; }
body.s-wide .s-wrap { max-width: 1180px; }

/* ---- r39 E：学生端顶栏在手机上会横着挤爆（新增「我的图谱」后） ---- */
@media (max-width: 620px) {
  .s-top-inner { flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; }
  .s-top-inner .brand { font-size: 15px; }
  .s-top-inner .nav-links { gap: 10px; flex-wrap: wrap; row-gap: 2px; }
  .s-top-inner .nav-links > a { font-size: 13px !important; }
  .s-top-inner .nav-user { font-size: 12px; white-space: nowrap; }
}
@media (max-width: 720px) {
  .g-svgwrap { min-height: 340px; }
}
/* 图例改成画布下方的一行（原来浮在画布上，会压住最下面的知识点标签） */
.g-legend { position: static; margin: 0; padding: 8px 12px 10px; border: 0;
            border-top: 1px solid var(--line); border-radius: 0; background: #fff; }
.g-legend[hidden] { display: none; }

/* ---------------------------------------------------------------- r53b 学习进度
 * 一条通用进度条：侧栏（图谱）、练习页、选章节页、首页 KPI 卡共用。
 * ★ 不用行内样式：行内会压过任何选择器，尺寸/颜色改不动（项目老坑）。
 * 颜色语义沿用全站：绿=已掌握/出勤、青=进行中、橙=待加强、红=薄弱/缺勤、灰=未测。
 */
.pb { display: inline-block; width: 100%; max-width: 220px; height: 8px; border-radius: 999px;
      background: #eef1f6; overflow: hidden; vertical-align: middle; }
.pb i { display: block; height: 100%; border-radius: 999px; background: var(--brand); width: 0; }
.pb i.t-ok { background: var(--green); }
.pb i.t-brand { background: var(--brand); }
.pb i.t-warn { background: var(--amber); }
.pb i.t-err { background: var(--red); }
.pb i.t-muted { background: #c3c9d4; }
.pb-lg { height: 12px; max-width: 100%; }

/* 学生端五项 KPI（首页课程卡、学习情况页顶部）
 * ★ r57 起每项都带图形（环 / 分段条 / 点阵 / 刻度条），不再只是「标题 + 数字 + 小字」。
 * ★ 144px 是数出来的：首页左栏课程卡内容宽约 558px，144×3 + 2×8 = 448 排 3 列；
 *   掌握度卡 grid-column: span 2 → 首行 2+1、次行 3，两行正好 6 格，不会留半格空档。
 *   学习情况页（卡片内宽约 968px）auto-fit 排 6 列，同样 6 格成一行。
 * ★ 高度统一 3 行文本 + 一个图形，靠 min-height 让五张卡等高，否则环卡会比别人高。 */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(144px, 1fr));
        gap: 8px; margin-top: 10px; }
/* ★ min-height 120 让「环卡」和「小卡」底边对齐：环卡内容天然比小卡矮（环 56 + 两行小字），
   不设的话第一行 88px、第二行 119px，两行底边相差 31px，一眼就能看出参差（实测）。 */
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fbfcfe;
       display: flex; flex-direction: column; min-width: 0; min-height: 120px; }
.kpi--ring { grid-column: span 2; }
.kpi-row { display: flex; align-items: center; gap: 10px; }
.kpi-txt { min-width: 0; }
.kpi-txt em { margin-top: 0; }
/* ★ 必须写 .kpi .kpi-txt b（0,2,1）而不是 .kpi-txt b（0,1,1）：
   后者与下面的 .kpi b 同特异性，会被后定义的 22px 块级样式覆盖 →
   「已测 22/344 个能力点」被 22 撑成四行（量像素才发现的真 Bug）。 */
.kpi .kpi-txt b { display: inline; font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 13px; color: var(--muted); font-weight: 400; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; }
.kpi .pb { margin-top: 6px; height: 6px; }

/* ---- r57 可视化组件（模板 _viz.html）----
 * 语义色：绿=对/出勤、橙=待办/迟到、蓝=病事假、红=错/缺勤、青=进度。
 * ★ 文字色类补齐：原来只有 .pb i.t-* ，没有可给文字用的 .t-* （首页待办要用）。 */
.t-ok { color: var(--green); }
.t-warn { color: var(--amber); }
.t-err { color: var(--red); }
.t-brand { color: var(--brand); }
.t-muted { color: var(--muted); }

/* 环 56px（r=22 / stroke 6，与方案一致）；靠 .kpi 的 min-height 与小卡对齐底边 */
.v-ring { flex: 0 0 auto; display: block; width: 56px; height: 56px; }
.v-ring-t { font: 600 14px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; fill: var(--ink); }
.v-ring-t.is-none { font-size: 15px; fill: #a8b0bd; }

/* 练习分段条：每段一个模块，段内填充 = 该模块已练比例 */
.v-stack { display: flex; gap: 2px; height: 9px; margin-top: 6px; }
.v-stack i { flex: 1 1 0; min-width: 0; background: #eef1f6; border-radius: 2px; overflow: hidden; }
.v-stack i b { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.v-stack i.full b { background: var(--green); }
/* 碰过但没练完：段底淡青（"这个模块开始了"），内部填充仍是真实比例 */
/* 淡青要够深才看得出来：#cfeef6 在浅底卡上几乎与白同色（截图看不出练过几个模块） */
.v-stack i.on { background: #b3e2f0; }
.v-stack i.no { background: repeating-linear-gradient(90deg, #f1f3f7 0 3px, #e4e9f1 3px 6px); }

/* 考勤点阵：一次签到一个方块 */
.v-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 6px; }
.v-dot { width: 9px; height: 9px; border-radius: 2px; background: #e3e8ef; display: block; }
.v-dot.t-ok { background: var(--green); }
.v-dot.t-warn { background: #f0a020; }
.v-dot.t-brand { background: var(--blue); }
.v-dot.t-err { background: var(--red); }

/* 平时成绩刻度条：0~100，60 分处一条虚线 */
.v-gauge { position: relative; display: block; height: 8px; margin-top: 6px;
           background: #eef1f6; border-radius: 999px; }
.v-gauge .fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px;
                 background: var(--brand); }
.v-gauge .fill.low { background: var(--amber); }
.v-gauge .pass { position: absolute; top: -3px; width: 0; height: 14px; border-left: 1px dashed #98a4b6; }

/* 单条得分率条（成绩明细每行末尾） */
.v-rate { display: block; height: 4px; border-radius: 999px; background: #eef1f6; margin-top: 3px; overflow: hidden; }
.v-rate i { display: block; height: 100%; border-radius: 999px; }
.v-rate i.t-ok { background: var(--green); }
.v-rate i.t-brand { background: var(--brand); }
.v-rate i.t-warn { background: var(--amber); }
.v-rate i.t-err { background: var(--red); }

/* ---------------------------------------------------------------- r54 选章节页
 * 「全库练习 → 按章节选」的章节卡：一个章节一张卡，卡里直接写清「已练多少 / 还剩多少」，
 * 底下一条迷你进度条。原来是一个 chip 只印「3/24 题」，学生得自己心算还剩多少。
 * ★ 列宽 176px 是量出来的：60 个章节在 1366 宽下排 6 列、1920 宽下排 9 列，
 *   章节名（最长 12 个汉字）在两行内放得下，不会把卡片撑成一行高一行矮。
 */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; margin-top: 10px; }
.sec-card { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
            background: #fff; text-decoration: none; color: inherit; }
.sec-card:hover { border-color: var(--brand); background: #fbfdff; }
.sec-card b { display: block; font-size: 12.5px; line-height: 1.32; color: var(--ink); font-weight: 600; }
.sec-card .m { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px;
               color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.sec-card .pb { display: block; margin-top: 5px; height: 5px; max-width: 100%; }
.sec-card.done { border-color: #bfe3c9; background: #f7fdf9; }
.sec-card.done b { color: var(--green); }
.sec-card.empty { opacity: .5; cursor: default; background: #fafbfc; border-style: dashed; }
/* 模块（章）头部的三段计数：可练 / 已练 / 还剩 —— 数字右对齐才好比较 */
.mstat { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mstat b { color: var(--ink); font-weight: 600; }
.mstat .lft { color: var(--amber); font-weight: 600; }
@media (max-width: 640px) { .sec-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); } }

/* ---------------------------------------------------------------- r56 首页折叠块
 * 「历次课」「成绩明细」不再一排 chip/裸表格铺开，收进原生 details 折叠。
 * 收起时 summary 一行说清「有多少」；展开由浏览器负责，不写 JS（弱网也能用）。
 * ★ summary 一律清掉默认三角（list-style / ::-webkit-details-marker），
 *   换成右侧 ▾，展开时旋转 180° —— 两个浏览器的默认样式差得太多，必须都清。 */
.fold { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
                  padding: 9px 12px; font-size: 14px; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::marker { content: ''; }
.fold > summary:hover { background: #fbfcfe; }
.fold > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.fold-t { font-weight: 600; color: var(--ink); }
.fold-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fold-n b { color: var(--ink); }
/* ★ 箭头必须做成「看得见的按钮」：12px 纯文字 ▾ 在浅底上几乎消失，
   折叠条就会像一张空卡片（量像素才发现）。改成 CSS 画的实心三角 + 圆角底。
   ★ 用 border 三角而不是字符：字符三角的字面尺寸随字体变（微软雅黑/苹方不同），
     还会带上下留白，对齐不到圆底正中；border 三角尺寸完全可控。 */
.fold-caret { margin-left: auto; flex: 0 0 auto; width: 22px; height: 22px;
              display: inline-flex; align-items: center; justify-content: center;
              border-radius: 7px; background: #e8eef6;
              transition: transform .15s, background .15s; }
.fold-caret::before { content: ''; width: 0; height: 0;
                      border-left: 4.5px solid transparent;
                      border-right: 4.5px solid transparent;
                      border-top: 5.5px solid #475569;
                      transform: translateY(-1px); }
.fold > summary:hover .fold-caret { background: #d8e3f0; }
.fold > summary:hover .fold-caret::before { border-top-color: var(--brand); }
.fold[open] > summary { border-bottom: 1px solid var(--line); background: #fbfcfe; }
.fold[open] .fold-caret { transform: rotate(180deg); }
.fold-b { padding: 8px 12px 12px; }
.fold-b .tbl-wrap { margin: 0; }
.fold-b .tbl th { padding-top: 6px; }

/* 课次网格：每项「第N次课 · 名称」左，状态右；长标题省略而不是换行，保证卡片等高 */
.les-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 6px; }
.les { display: flex; align-items: center; justify-content: space-between; gap: 8px;
       padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
       font-size: 13px; line-height: 1.35; color: var(--ink); }
.les:hover { border-color: var(--brand); background: #fbfdff; color: var(--ink); }
.les b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.les em { font-style: normal; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.les.live { border-color: #f5c4b3; background: var(--red-bg); }
.les.live em { color: var(--red); font-weight: 600; }

/* 成绩合计：贴着「我的成绩」标题右端，不展开也能看到总数 */
.score-sum { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-sum b { font-size: 19px; font-weight: 600; color: var(--ink); }
.score-sum em { font-style: normal; }
@media (max-width: 640px) {
  .les-grid { grid-template-columns: 1fr; }
  .score-sum b { font-size: 16px; }
}

/* ---------------------------------------------------------------- r57 学生端首页
 * r55 体检结论：原来整页是「一列 760px 的卡片堆」，首屏第一个元素就是 <h2>待完成作业，
 * 没有落点、没有图形、1359px 高却只有 3 个完整卡片。现在改成：
 *   问候页头（深青实底）→ 直播/公告 → 左 7 : 右 5 双栏（左：课程 + 成绩，右：待办）
 * ★ 900px 以下回落单列 —— 与手机端原布局一致，只是顺序变成「待办在前」，不改手机版式。
 * ★ 语义色按功能分工：待办左条橙、已交灰、直播红字、进度青。
 */
.home-hero { background: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
             color: #fff; border-radius: 16px; padding: 16px 20px; margin: 12px 0 14px;
             display: flex; align-items: center; justify-content: space-between; gap: 16px;
             min-height: 88px; box-shadow: 0 6px 18px rgba(14, 116, 144, .18); }
.home-hero h1 { font-size: 22px; line-height: 1.3; margin: 0; color: #fff; letter-spacing: .3px; }
.home-hero p { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, .86); }
.home-hero p b { color: #fff; }
.hh-live { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px;
           background: rgba(255, 255, 255, .94); color: #b3261e; font-weight: 600; }
.hh-r { display: flex; gap: 8px; flex: 0 0 auto; }
.hh-btn { width: 74px; padding: 8px 4px 7px; border-radius: 11px; text-align: center;
          background: rgba(255, 255, 255, .16); color: #fff; font-size: 11.5px; line-height: 1.25;
          display: flex; flex-direction: column; align-items: center; gap: 3px;
          border: 1px solid rgba(255, 255, 255, .22); }
.hh-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.hh-btn i { font-style: normal; font-size: 17px; line-height: 1; }
@media (max-width: 640px) {
  .home-hero { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
  .home-hero h1 { font-size: 19px; }
  .hh-r { justify-content: space-between; }
  .hh-btn { flex: 1 1 0; width: auto; }
}

.home-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; align-items: start; }
/* ★ 单列时**待办必须回到最前**：DOM 里 main 在前、side 在后，若不换顺序，
   手机上「待办」会被推到课程卡下面（实测 mainTop=355 / sideTop=1077），
   而原来手机端第一眼就是待办 —— 那才是学生最想先看的。 */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 0; }
  .home-side { order: -1; }
}

/* 区块标题从 h2（18px 粗体）降级为小节标签：原来「我的课程」「我的成绩」这类废话标题
   与真正的课程名同字号，层级分不出来 */
.sec-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
             color: var(--muted); margin: 16px 0 8px; letter-spacing: .3px; }
.sec-label::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.sec-label .n { font-weight: 400; }

.card.course-card { border-radius: 14px; border-color: #edf0f4; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
                    padding: 16px 18px; margin-bottom: 12px; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cc-name { font-size: 17px; font-weight: 600; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.cc-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.cc-acts { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
/* ★ 手机上课程名会被右侧三个按钮挤成竖排（实测「人工智/能与机/械工程」），
   断点改上下两段：标题占满一行，按钮另起一行。 */
@media (max-width: 640px) {
  .cc-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .cc-acts { justify-content: flex-start; }
}

/* 待办条：左侧 3px 竖条区分「要交 / 已交」，已交整条降为灰底 */
.todo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
        background: #fff; border: 1px solid #edf0f4; margin-bottom: 8px; }
.todo::before { content: ''; width: 3px; align-self: stretch; border-radius: 2px; background: var(--orange); }
.todo.done { background: #fafbfc; }
.todo.done::before { background: #cfd6e0; }
.todo-b { flex: 1 1 auto; min-width: 0; }
.todo-b b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-b em { font-style: normal; font-size: 12px; color: var(--muted); }
.todo-b em.t-err { font-weight: 600; }
.todo .btn { flex: 0 0 auto; }
.todo-empty { border: 1px dashed #d8dee7; border-radius: 12px; padding: 14px; text-align: center;
              font-size: 13px; color: var(--muted); background: #fcfdfe; }

/* ---------------------------------------------------------------- r59 右栏「先补这几块」
 * 待办下面那张「今天该练什么」的卡。每行两行字 + 一条掌握度条：
 *   第一行 能力点名（左，可省略） 掌握度百分比（右，等宽数字）
 *   第二行 绑定的知识点（+ 多课程时的课程名）
 * ★ 分隔线用 inset 内阴影而不是 border-top：border 会给每行加 1px 高度，
 *   5 行就多 5px，且第一条与卡顶的间距会跟其余不一致。
 * ★ 行高合计按「5 行 + 提示 + 标题 ≈ 290px」定 —— 右栏空着的那一块正好吃得下，
 *   不会把左栏课程卡拽出长短腿（1366 宽实测：卡片 292px，左栏首屏不被撑长）。
 */
.card.wk-card { padding: 12px 12px 6px; border-radius: 14px; border-color: #edf0f4;
                box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.wk-tip { font-size: 12.5px; color: var(--muted); margin: 0 8px 6px; line-height: 1.5; }
.wk-it { display: block; padding: 7px 8px; border-radius: 10px; color: var(--ink); }
.wk-it + .wk-it { box-shadow: inset 0 1px 0 #f0f3f7; }
.wk-it:hover { background: #f7fbfc; color: var(--ink); }
.wk-h { display: flex; align-items: baseline; gap: 8px; }
.wk-h b { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.4;
          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-pct { flex: 0 0 auto; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-m { display: block; font-size: 12px; color: var(--muted); line-height: 1.45;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-m em { font-style: normal; background: #f1f3f7; border-radius: 4px;
           padding: 0 5px; margin-left: 6px; }
.wk-more { display: block; text-align: center; font-size: 12.5px; padding: 7px 0 3px;
           border-top: 1px solid #f0f3f7; margin-top: 4px; }
/* 无弱项态：一句话 + 一个去处，居中收窄，别做成一块大空卡 */
.wk-card.wk-allok,
.wk-card.wk-blank { text-align: center; padding: 14px 12px 12px; }
.wk-card.wk-allok b,
.wk-card.wk-blank b { display: block; font-size: 14px; }
.wk-card.wk-allok .wk-tip,
.wk-card.wk-blank .wk-tip { margin: 3px 0 10px; }
/* 未测态：不用绿色（绿色在别处读作「已达标」），用中性描边区分「还没有数据」 */
.wk-card.wk-blank { border-style: dashed; border-color: #dfe4ec; }

/* 成绩：得分 + 下方得分率条（原来 0/12 与 12/12 一样重，看不出塌方） */
.sc-cell { display: block; min-width: 72px; }
.sc-cell b { font-size: 15px; }
.sc-cell small { color: var(--muted); font-size: 12px; }
.sc-cell .v-rate { margin-top: 2px; }
.rate-pct { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 5px; }

/* 课次：在 r56 的等高网格上加圆点（时间线语义，但不改折叠结构） */
.les { position: relative; padding-left: 20px; }
.les::before { content: ''; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
               width: 6px; height: 6px; border-radius: 50%; background: #c3cbd6; }
.les.live::before { background: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }

/* ── r59c 练习题型选择 ──────────────────────────────────────────────
   chip 直接复用 .btn 的尺寸会太高（学生扫一眼要看到 6 个），做成小方片。
   ★ 勾选态用 inset ring 而不是 border：border 会让选中时整行高度跳 1px，
     连点几下「判断」整条工具栏会上下抖。 */
.qp-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
          margin: 0 0 14px; padding: 9px 11px; background: #fff;
          border: 1px solid var(--line); border-radius: 12px; }
.qp-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.qp-chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
           font-size: 13px; line-height: 1; padding: 6px 9px; border-radius: 999px;
           background: #f4f6f9; color: var(--ink); user-select: none;
           border: 1px solid transparent; transition: background .12s, color .12s; }
.qp-chip input { display: none; }
.qp-chip em { font-style: normal; font-size: 11.5px; color: var(--muted);
              font-variant-numeric: tabular-nums; }
.qp-chip:hover { background: #eaeff5; }
.qp-chip.on { background: var(--brand-bg); color: var(--brand-d);
              box-shadow: inset 0 0 0 1px var(--brand); }
.qp-chip.on em { color: var(--brand-d); opacity: .8; }
.qp-tip { font-size: 12px; color: var(--muted); margin-left: 2px; }
@media (max-width: 640px) {
  .qp-bar { padding: 8px 9px; }
  .qp-tip { flex-basis: 100%; margin: 2px 0 0; }
}

/* ── r60 学生使用手册页 ──────────────────────────────────────────────
   两栏：左目录（sticky）+ 右正文。目录不是「好看」，是这页有 10 章、约 400 行，
   学生只想查「作业没交怎么算」时得能直接跳。
   ★ 顶栏 .s-top 不是 sticky（r37 定过，别改），所以锚点跳转不会被遮住，
     不需要 scroll-margin-top。 */
.help-wrap { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 26px;
             align-items: start; }
.help-side { position: sticky; top: 14px; font-size: 13.5px; }
.help-side-t { font-size: 12px; color: var(--muted); letter-spacing: .04em;
               margin: 0 0 6px 9px; }
.help-toc { display: flex; flex-direction: column; gap: 1px; }
.help-toc a { display: block; padding: 5px 9px; border-radius: 7px;
              color: var(--ink); line-height: 1.4; }
.help-toc a:hover { background: #eef4f7; color: var(--brand-d); }
.help-top { display: block; margin: 10px 0 0 9px; font-size: 12.5px; color: var(--muted); }
.help-main { min-width: 0; }
/* 同理：目录在单栏时要能压缩，否则横排的 10 个 chip 会把列撑宽 */
.help-side { min-width: 0; }
.help-kicker { font-size: 13px; color: var(--brand-d); font-weight: 600;
               letter-spacing: .02em; margin: 2px 0 10px; }
.help-main .help-h1 { font-size: 24px; margin: 4px 0 12px; }
.help-h2 { font-size: 19px; margin: 26px 0 10px; padding-top: 2px; }
.help-h3 { font-size: 15.5px; margin: 18px 0 6px; }
.help-main p { font-size: 14.5px; line-height: 1.75; margin: 8px 0; }
.help-ul, .help-ol { font-size: 14.5px; line-height: 1.75; margin: 8px 0;
                     padding-left: 22px; }
.help-ul li, .help-ol li { margin: 3px 0; }
.help-main code { background: #f1f4f8; border-radius: 4px; padding: 1px 5px;
                  font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace;
                  color: #0f4c5c; }
.help-pre { background: #f7f9fc; border: 1px solid var(--line); border-left: 3px solid var(--brand);
            border-radius: 8px; padding: 10px 13px; margin: 10px 0; overflow-x: auto; }
.help-pre code { background: none; padding: 0; font-size: 13px; line-height: 1.7;
                 color: var(--ink); white-space: pre; }
.help-note { background: #f6fafb; border: 1px solid #dceaf0; border-radius: 10px;
             padding: 9px 13px; margin: 12px 0; }
.help-note p { margin: 4px 0; font-size: 13.5px; line-height: 1.7; color: #2b4a55; }
.help-hr { border: 0; border-top: 1px solid #eef1f5; margin: 20px 0; }
/* 表格：12 张，是这页的主体。★ 用 .help-tbl 包一层横向滚动——
   手机上「项 / 权重 / 分数从哪来 / 满分算法」四列会顶破屏幕，
   让表格自己滚，别让整页跟着横向滚。 */
.help-tbl { overflow-x: auto; margin: 10px 0 12px;
            border: 1px solid var(--line); border-radius: 10px; }
.help-tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.help-tbl th, .help-tbl td { padding: 7px 11px; text-align: left;
                             border-bottom: 1px solid #eef1f5; vertical-align: top;
                             line-height: 1.6; }
.help-tbl thead th { background: #f5f8fa; font-weight: 600; color: #33505c;
                     white-space: nowrap; border-bottom: 1px solid var(--line); }
.help-tbl tbody tr:last-child td { border-bottom: 0; }
.help-tbl td code { white-space: nowrap; }
.help-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid #eef1f5;
             font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) {
  /* ★ 必须写 minmax(0, 1fr)，不能写 1fr：`1fr` 的最小尺寸是 auto，
     格子会被里面最宽的东西（表格）撑开 —— 实测只写 1fr 时容器宽 1379px、
     整页横向滚动 1395px，而 .help-tbl 的 overflow-x 因为「宽得够」反而不生效。
     这是「表格自己滚」失效的真正原因，不是 overflow 写错。 */
  .help-wrap { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* 单栏时目录改成顶部横向滚动，不再吸顶：吸顶会吃掉本来就小的视口 */
  .help-side { position: static; border-bottom: 1px solid #eef1f5; padding-bottom: 8px; }
  .help-side-t { margin-left: 2px; }
  .help-toc { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px;
              -webkit-overflow-scrolling: touch; }
  .help-toc a { white-space: nowrap; background: #f4f6f9; border-radius: 999px;
                padding: 5px 11px; font-size: 13px; }
  .help-top { display: none; }
  .help-main p, .help-ul, .help-ol { font-size: 14px; }
  .help-h2 { font-size: 17.5px; margin-top: 22px; }
  /* 手机上算式代码块改成自动折行：这些「代码」其实是算式说明（不是要复制的代码），
     横向滚动会让「÷ 预计签到总次数 N」被截在屏幕外，学生以为公式就长那样。 */
  .help-pre { padding: 9px 11px; }
  .help-pre code { white-space: pre-wrap; overflow-wrap: break-word; }
}
