/* 智慧课堂 全局样式 —— 配色：青主色 + 校园语义色（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; }
.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; }

/* ---------- 课程卡片 ---------- */
.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); }
.s-top-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.s-wrap { max-width: 760px; margin: 16px auto; padding: 0 16px 80px; }
.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; }
}

