:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1f2733;
  --muted: #7a8699;
  --line: #e4e8f0;
  --brand: #3b6cf6;
  --brand-ink: #ffffff;
  --danger: #e5484d;
  --ok: #18a058;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 39, 51, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.app-version {
  display: block;
  font-size: 12px;
  font-weight: normal;
  color: var(--muted);
  margin: 2px 0 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header h1 { font-size: 20px; margin: 0; letter-spacing: 0.5px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btn-home {
  appearance: none; flex: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.btn-home:hover { border-color: var(--brand); color: var(--brand); }
.btn-home[hidden] { display: none; }

/* ===== 首页：功能选择 ===== */
#home[hidden], #dictation-app[hidden], #sheet-app[hidden] { display: none; }
.home { max-width: 1040px; margin: 0 auto; padding: 48px 22px 64px; }
.home-lead { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 680px; margin: 0 auto; }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } }
.home-card {
  appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-card:hover { border-color: var(--brand); }
.home-card:active { transform: translateY(1px); }
.home-icon { font-size: 36px; line-height: 1; }
.home-name { font-size: 20px; font-weight: 700; }
.home-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
.home-soon { font-size: 12px; color: #b3541e; }

.home-feedback { max-width: 680px; margin: 22px auto 0; }
.home-feedback .hint { margin: 8px 0 12px; }
.home-feedback textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: var(--ink);
}
.home-feedback textarea:focus { outline: none; border-color: var(--brand); }
.feedback-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }

/* ===== 答题卡批改 ===== */
.sheet-main { padding-top: 18px; }
.sheet-flow { margin: 0 0 12px; padding-left: 22px; font-size: 14px; line-height: 1.9; }
.sheet-flow b { color: var(--brand); }

.tabs {
  display: flex;
  gap: 6px;
  padding: 12px 22px 0;
  max-width: 1040px;
  margin: 0 auto;
}
.tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--card); color: var(--brand); font-weight: 600; border-color: var(--line); }
.pill {
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

main { max-width: 1040px; margin: 0 auto; padding: 0 22px 40px; }

.panel { display: none; padding-top: 18px; }
.panel.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 15px; }

.capture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 820px) { .capture-grid { grid-template-columns: 1fr; } }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f1420;
  border-radius: 10px;
  overflow: hidden;
}
#video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #6b7688; font-size: 14px;
}
.camera-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.camera-box .fold { margin-top: 18px; }   /* 上传图片按钮与「图片识别提示」之间拉开间距 */
.hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover:not(:disabled) { border-color: #cdd6e6; background: #fafbff; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover:not(:disabled) { background: #2f5ce0; }
.btn.danger { color: var(--danger); border-color: #f3c9cb; }
.btn.danger:hover:not(:disabled) { background: #fdf2f2; }

.result-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: var(--ink);
}
.result-actions { display: flex; gap: 8px; margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 4px; }
.chip {
  background: #eef2ff;
  border: 1px solid #d9e0ff;
  color: #33489c;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;   /* 「猜你想要」占满一行，自动换到输入框下面 */
}
.chip-x {
  border: none; background: transparent; color: #7f8dc7;
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px;
}
.chip-x:hover { color: var(--danger); }
.chip-no-audio { background: #fdf0f0; border-color: #f3c1c3; color: var(--danger); }
.chip-no-audio .chip-x { color: #c98b8e; }
.chip-off { opacity: .4; }   /* 原图上取消选中的词 */

/* 原图点选：叠加层在图上画每个单词的框 */
.ocr-img-frame {
  position: relative;
  margin: 12px 0 4px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  cursor: zoom-in;             /* 点一下放大选词 */
  touch-action: pan-y;         /* 手机上下滚动页面时不要误开视图 */
  user-select: none;
  -webkit-user-select: none;
}
.ocr-img-frame img { display: block; width: 100%; pointer-events: none; }
#ocr-overlay { position: absolute; inset: 0; pointer-events: none; }   /* 内嵌图只当入口，选词在放大视图里 */
.ocr-word {
  position: absolute;
  border: 1.5px solid rgba(47, 158, 68, .9);
  border-radius: 3px;
  cursor: pointer;
}
.ocr-word-off { background: rgba(0, 0, 0, .5); border-color: transparent; }
.ocr-word-red { border-style: dashed; border-color: var(--danger); }

/* 全屏放大选词视图 */
.ocr-viewer {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(10, 14, 24, .96);
  display: flex;
  flex-direction: column;
  touch-action: none;          /* 双指缩放/拖动查看时禁止页面滚动 */
}
.ocr-viewer[hidden] { display: none; }
.ocr-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: #dfe6f5;
  font-size: 13px;
  flex: none;
}
.ocr-viewer-bar .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
.ocr-viewer-stage {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ocr-viewer-zoom { will-change: transform; transform-origin: 0 0; }
.ocr-viewer .ocr-img-frame { margin: 0; box-shadow: none; cursor: default; }
.ocr-viewer .ocr-img-frame img { width: auto; max-width: 94vw; max-height: 84vh; }
#ocr-viewer-overlay { position: absolute; inset: 0; }

.lib-toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.lib-toolbar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.lib-list { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; touch-action: pan-y; }
.lib-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 6px; border-bottom: 1px solid var(--line);
  touch-action: manipulation;   /* 手机端禁用双击缩放，保证双击弹菜单稳定触发 */
}
/* 长按选词时防止 iOS 系统弹出选词菜单/复制呼出 */
.lib-item, .lib-item * { -webkit-touch-callout: none; user-select: none; }
.lib-item.sel { background: rgba(59, 108, 246, 0.08); box-shadow: inset 0 0 0 1px rgba(59, 108, 246, 0.5); }
.lib-check { width: 16px; height: 16px; flex: none; margin: 0 8px 0 0; accent-color: var(--brand); cursor: pointer; }
.lib-item:last-child { border-bottom: none; }
.lib-word { font-size: 16px; cursor: pointer; }
.lib-word:hover { color: var(--brand); text-decoration: underline; }
.lib-item.no-audio .lib-word { color: var(--danger); }
.lib-item.no-audio .lib-word:hover { color: var(--danger); }
.skip-tag { color: var(--danger); font-size: 12px; margin-left: 6px; }
.answer-sheet li.no-audio { color: var(--danger); }
.icon-btn {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 8px;
}
.icon-btn:hover { color: var(--danger); background: #fdf2f2; }
/* 折叠说明块（识别提示 / 录入规则）：纯 CSS 复选框开关（checkbox hack），
   零 JS 依赖——微信等老内核 WebView 即便脚本异常也能点开；
   不用 details/summary/:not()，仅用 label + :checked ~ 兄弟选择器（老引擎全支持） */
.fold {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  overflow: hidden;
}
/* 复选框视觉隐藏但保持可交互：点击 label 即切换 :checked */
.fold-toggle {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
.fold-head {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.fold-arrow {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  color: var(--muted);
  -webkit-transition: -webkit-transform .15s;
  transition: transform .15s;
}
.fold-body {
  display: none;
  padding: 8px 12px 10px 28px;
}
/* 勾选后展开：显示正文、标题加分隔线、箭头旋转朝下 */
.fold-toggle:checked ~ .fold-body { display: block; }
.fold-toggle:checked ~ .fold-head { border-bottom: 1px solid var(--line); }
.fold-toggle:checked ~ .fold-head .fold-arrow {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.fold-body > .hint:first-child { margin-top: 0; }
/* 「操作提示」块：常驻显示在录入规则折叠区下方，不随折叠隐藏 */
.fold-note {
  margin-top: 10px;
  padding: 8px 2px 0;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: #3b6cf6;
}
.lib-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.lib-footer-actions { display: flex; gap: 8px; flex: none; }

.muted { color: var(--muted); font-weight: 400; font-size: 13px; }

.settings { margin-bottom: 18px; }
.setting-row {
  display: grid;
  grid-template-columns: 84px 1fr 92px;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
}
.setting-row label { font-size: 14px; color: var(--ink); }
/* 滑动条行：标签和数值在上、滑块独占整行，滑块更长更好拖 */
.setting-row.slider {
  grid-template-columns: 1fr auto;
  grid-template-areas: "label val" "range range";
  row-gap: 6px;
}
.setting-row.slider > label { grid-area: label; }
.setting-row.slider input[type="range"] { grid-area: range; }
.setting-row.slider .setting-val { grid-area: val; }
.setting-val { font-size: 13px; color: var(--muted); text-align: right; }
.setting-val b {
  color: var(--brand);
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px dashed currentColor;   /* 虚线下划线提示可点击输入 */
}
.setting-num-input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  text-align: center;
  font-family: inherit;
  color: var(--brand);
}
input[type="range"] { width: 100%; accent-color: var(--brand); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; margin-top: 8px; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }

.player { text-align: center; }
.now {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 2px;
  min-height: 48px;
  margin: 6px 0 2px;
  word-break: break-word;
}
.now.paused { color: var(--muted); }
.progress { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.bar-fill { height: 100%; width: 0; background: var(--brand); transition: width .2s ease; }
.player-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.reveal { justify-content: center; display: flex; margin-top: 16px; }

.answer-sheet { margin-top: 18px; text-align: left; }
.answer-sheet ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 30px; }
.answer-sheet li { font-size: 15px; padding: 3px 0; break-inside: avoid; }
.answer-sheet .ans-word { cursor: pointer; color: var(--brand); }
.answer-sheet .ans-word:hover { text-decoration: underline; }
.answer-sheet .ans-hint { margin-top: 10px; }
@media (max-width: 620px) { .answer-sheet ol { columns: 1; } }

/* 统一弹窗（提示/确认/释义/长按菜单）：复用开屏公告 .announce/.announce-card 的遮罩与卡片样式 */
.modal { z-index: 310; }
.modal-card { max-width: 340px; }
.modal-card h2 { margin: 0 0 10px; word-break: break-word; }
.modal-body {
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
  margin: 0 0 16px;
  word-break: break-word;
}
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; width: auto; justify-content: center; padding-left: 8px; padding-right: 8px; white-space: nowrap; }

/* 扫描校正弹窗：预览整页扫描件，四角可拖动调整 */
.scan-modal {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(15, 20, 32, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
}
.scan-modal[hidden] { display: none; }
.scan-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(920px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.scan-head h2 { margin: 0; font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
.scan-progress { font-size: 13px; font-weight: 400; color: var(--muted); }
.scan-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.scan-stage {
  flex: 0 0 auto; height: min(58vh, 560px); min-height: 160px;
  display: flex;
  background: #0f1420; border-radius: 10px; overflow: auto; padding: 6px;
}
.scan-canvas { position: relative; line-height: 0; flex: 0 0 auto; margin: auto; }
.scan-canvas img {
  display: block; width: 100%; height: 100%;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.scan-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scan-svg polygon { fill: rgba(59, 108, 246, 0.14); stroke: #3b6cf6; stroke-width: 2; vector-effect: non-scaling-stroke; }
#scan-handles { position: absolute; inset: 0; }
.scan-handle {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  touch-action: none; cursor: grab;
}
.scan-handle:active { cursor: grabbing; }
.scan-loading {
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(15, 20, 32, 0.78); color: #fff;
  font-size: 12px; line-height: 1.6;
}
.scan-loading[hidden] { display: none; }
.scan-tools {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.scan-tools .btn { padding: 5px 10px; font-size: 12px; }
.scan-zoom-val { font-size: 12px; color: var(--muted); min-width: 42px; text-align: center; }
.scan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scan-actions .btn { padding: 8px 14px; }
.scan-tip { margin: 0; }
@media (max-width: 520px) {
  .scan-card { padding: 10px; gap: 8px; }
  .scan-stage { height: 46vh; }
  .scan-actions { gap: 6px; }
  .scan-actions .btn { flex: 1 1 auto; justify-content: center; padding: 8px 10px; }
}

input[type="range"]:disabled { opacity: 0.4; cursor: not-allowed; }
.setting-row.locked label,
.setting-row.locked .setting-val { opacity: 0.5; }

.conn-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  background: #b3541e;
  color: #fff;
  font-size: 13px;
  z-index: 200;
}
.conn-banner[hidden] { display: none; }
.btn-mini {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.btn-mini:active { background: rgba(255, 255, 255, 0.18); }

/* 页头「检查更新」按钮（浅色主题，区别于深底横幅的 .btn-mini） */
.btn-update {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}
.btn-update:hover { color: var(--brand); border-color: var(--brand); }
.btn-update:disabled { opacity: 0.5; cursor: default; }



.setting-row.wide { grid-template-columns: 84px 1fr; }
.text-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
}
.text-input:focus { outline: none; border-color: var(--brand); }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ===== 识别进度条：OCR 只有一次请求、拿不到真实百分比，数字为估算动画，完成跳 100% ===== */
.ocr-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ocr-progress[hidden] { display: none; }
.ocr-progress-row { display: flex; align-items: center; gap: 8px; }
.ocr-progress-track { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; flex: 1; }
.ocr-progress-fill {
  height: 100%; width: 36%;
  background: var(--brand); border-radius: 999px;
  animation: ocr-slide 1.15s ease-in-out infinite;
}
@keyframes ocr-slide {
  0% { margin-left: -36%; }
  100% { margin-left: 100%; }
}
.ocr-progress-text { color: var(--muted); font-size: 13px; }
.ocr-progress-pct {
  color: var(--brand); font-size: 13px; font-weight: 600;
  min-width: 42px; text-align: right; font-variant-numeric: tabular-nums;
}

/* ===== 标红单词就地修改 ===== */
.chip { cursor: pointer; }   /* 任何单词都可点一下修改拼写 */
.chip-edit-input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 14px;
  width: 110px;
  font-family: inherit;
}
.chip-edit-ok, .chip-edit-cancel {
  border: none; background: transparent; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.chip-edit-ok { color: var(--ok); }
.chip-edit-cancel { color: var(--danger); }
.lib-edit-input { flex: 1; min-width: 0; border-radius: 10px; width: auto; }

/* 编辑单词时的"猜你想要"相近单词推荐：不单独画框，直接排在输入框下面一行、共用词条外框 */
.chip-suggest {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #c98b8e;
  margin-top: 4px;
}
.chip-suggest-btn {
  border: 1px solid #f3c1c3;
  background: #fff;
  color: var(--danger);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.chip-suggest-btn:active { background: #fbe9ea; }

/* ===== 答题卡批改 · 模板设置 ===== */
.sheet-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 auto 14px;
}
.sheet-step {
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.sheet-step.active {
  background: var(--card);
  border-color: var(--line);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.sheet-step:disabled { opacity: .45; cursor: default; }
.sheet-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-box-select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.add-box-select:focus { outline: none; border-color: var(--brand); }
.sheet-save { font-size: 12px; color: var(--muted); }
.sheet-hint { margin-top: 10px; }
.sheet-empty {
  padding: 30px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.sheet-editor[hidden], .sheet-empty[hidden] { display: none; }
.sheet-pages {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 8px;
  touch-action: pan-x;
}
.sheet-page {
  appearance: none;
  position: relative;
  flex: none;
  width: 72px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
}
.sheet-page img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  pointer-events: none;
}
.sheet-page.active { border-color: var(--brand); }
.sheet-page-no {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(15, 20, 32, .65);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
}
.sheet-page-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.sheet-page-actions .btn { padding: 7px 12px; }
.sheet-zoom-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.sheet-zoom-bar .btn { padding: 5px 10px; font-size: 12px; }
.sheet-zoom-val { font-size: 12px; color: var(--muted); min-width: 44px; text-align: center; }
.sheet-stage {
  display: flex;
  background: #0f1420;
  border-radius: 10px;
  overflow: auto;
  margin: 0 0 12px;
  padding: 8px;
  height: min(72vh, 720px);
  min-height: 220px;
}
.sheet-canvas { position: relative; display: block; flex: 0 0 auto; margin: auto; line-height: 0; }
.sheet-canvas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-overlay { position: absolute; inset: 0; }
.sheet-box {
  position: absolute;
  border: 2px solid rgba(59, 108, 246, .9);
  background: rgba(59, 108, 246, .08);
  touch-action: none;
  cursor: move;
  z-index: 1;
}
.sheet-box.sub { border-color: rgba(217, 119, 6, .9); background: rgba(217, 119, 6, .08); }
.sheet-box.selected { box-shadow: 0 0 0 2px rgba(59, 108, 246, .35); z-index: 2; }
.sheet-box.sub.selected { box-shadow: 0 0 0 2px rgba(217, 119, 6, .35); }
.sheet-box.exam {
  border-color: rgba(15, 118, 110, .9);
  border-style: dashed;
  background: rgba(15, 118, 110, .08);
}
.sheet-box.exam.selected { box-shadow: 0 0 0 2px rgba(15, 118, 110, .35); }
.sheet-box.exam .sheet-box-handle { border-color: #0f766e; }
.sheet-box-handle {
  display: none;
  position: absolute;
  right: -9px;
  bottom: -9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #3b6cf6;
  touch-action: none;
  cursor: nwse-resize;
}
.sheet-box.selected .sheet-box-handle { display: block; }
.sheet-box.sub .sheet-box-handle { border-color: #d97706; }
.sheet-inspector {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.sheet-inspector label[hidden],
.sheet-inspector button[hidden],
.sheet-inspector .sheet-inspector-empty[hidden] { display: none !important; }
.sheet-inspector.empty > label,
.sheet-inspector.empty > button { display: none; }
.sheet-inspector:not(.empty) .sheet-inspector-empty { display: none; }
.sheet-inspector-empty { font-size: 13px; color: var(--muted); }
.sheet-inspector label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.sheet-inspector input[type="number"],
.sheet-inspector input[type="text"],
.sheet-inspector select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.sheet-inspector input[type="number"] { width: 76px; }
.sheet-inspector input[type="text"] { width: 120px; }
.sheet-inspector .btn { margin-left: auto; }
.sheet-inspector #sheet-exam-test { margin-left: 0; }
.sheet-exam-result { font-size: 13px; color: var(--muted); }
.sheet-exam-result.ok { color: #15803d; }
.sheet-exam-result.warn { color: #b45309; }

/* ===== 答题卡批改 · 评分标准 ===== */
.rule-summary { font-size: 13px; color: var(--muted); }
.rule-global {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14px;
  color: var(--ink);
  margin: 2px 0 14px;
}
.rule-global[hidden] { display: none; }
.rule-global-title { font-size: 14px; font-weight: 600; }
.rule-set { display: inline-flex; align-items: center; gap: 6px; }
.rule-set[hidden] { display: none; }
.rule-set input,
.rule-set select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--brand);
}
.rule-set input { width: 64px; text-align: center; }
.rule-set input:focus,
.rule-set select:focus { outline: none; border-color: var(--brand); }
.rule-ranges { margin: 0 0 14px; }
.rule-ranges[hidden] { display: none; }
.rule-ranges-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.rule-ranges-title { font-size: 14px; font-weight: 600; }
.rule-ranges-hint { font-size: 13px; color: var(--muted); }
.rule-range-list { display: flex; flex-direction: column; gap: 8px; }
.rule-range-empty { font-size: 13px; color: var(--muted); }
.rule-range-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
}
.rule-range-item.sel { border-color: var(--brand); background: #f3f7ff; }
.rule-range-box {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.rule-range-seg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rule-range-item input {
  width: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
  text-align: center;
  font-size: 14px;
  font-family: inherit;
  color: var(--brand);
  background: #fff;
}
.rule-range-item input[data-field="points"] { width: 62px; }
.rule-range-item input:focus { outline: none; border-color: var(--brand); }
.rule-range-count { font-size: 13px; color: var(--muted); }
.rule-range-item .btn { padding: 4px 9px; font-size: 13px; }
@media (max-width: 520px) {
  .rule-range-item input { width: 50px; padding: 5px 4px; }
  .rule-range-item input[data-field="points"] { width: 56px; }
  .rule-range-item .btn { margin-left: auto; }
}
.rule-warn { color: #b3541e; font-size: 13px; line-height: 1.6; margin: 0 0 12px; }
.rule-warn[hidden] { display: none; }
.rule-group { padding: 12px 0 6px; border-top: 1px solid var(--line); }
.rule-group:first-child { border-top: none; padding-top: 0; }
.rule-group-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.rule-group-title { font-size: 14px; font-weight: 600; }
.rule-group-stat { font-size: 13px; color: var(--muted); margin-right: auto; }
.rule-group-head .btn { padding: 5px 10px; font-size: 13px; }
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 4px 16px;
}
.rule-q {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.rule-q-no {
  min-width: 26px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rule-type {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  padding: 3px 7px;
  cursor: pointer;
}
.rule-type.multi {
  border-color: var(--brand);
  background: #eef2ff;
  color: var(--brand);
}
.rule-opts { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.rule-opt {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.rule-opt.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.rule-sub { margin-top: 18px; border-top: 1px solid var(--line); }
.rule-sub[hidden] { display: none; }
.rule-sub h3 { margin: 14px 0 8px; }
.rule-sub-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.rule-sub-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rule-sub-item input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 14px;
  font-family: inherit;
  color: var(--brand);
}
.rule-sub-item input:focus { outline: none; border-color: var(--brand); }

/* ===== 答题卡批改 · 学生录卡 ===== */
.stu-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.stu-picker select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  max-width: 170px;
}
.stu-picker select:focus { outline: none; border-color: var(--brand); }
.stu-legend { font-weight: 600; }
.stu-legend.ok { color: #15803d; }
.stu-legend.wrong { color: #b91c1c; }
.stu-legend.unknown { color: #8a6210; }
.stu-page-flag {
  position: absolute;
  right: 4px;
  top: 4px;
  background: rgba(217, 119, 6, .92);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
}
.sheet-page.todo img { filter: grayscale(1); opacity: .32; }

/* ===== 批量录卡 · 待人工处理 ===== */
.stu-batch {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
}
.stu-batch[hidden] { display: none; }
.stu-batch-summary {
  font-size: 13px;
  color: #92400e;
  margin-bottom: 8px;
}
.stu-batch-summary:empty { display: none; }
.stu-batch-list { display: flex; flex-direction: column; gap: 8px; }
.stu-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stu-pending img {
  width: 54px;
  height: 70px;
  object-fit: cover;
  border-radius: 5px;
  background: #f1f5f9;
  flex: none;
}
.stu-pending-meta {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.stu-pending-meta b { font-size: 13px; }
.stu-pending-meta span { color: var(--muted); }
.stu-pending-actions { display: flex; gap: 6px; flex: none; }
.stu-pending-actions .btn { padding: 6px 10px; font-size: 13px; }

.stu-marked { margin: 0 0 12px; }
.stu-marked-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.stu-marked-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.stu-marked-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stu-marked-page-head {
  max-width: 720px;
  margin: 0 auto 4px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stu-marked-frame {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}
.stu-marked-img { display: block; width: 100%; height: auto; }
.stu-marked-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.stu-marked-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #8a6210;
}
.stu-marked-note.err { color: #b91c1c; }
.stu-summary {
  font-size: 14px;
  color: var(--ink);
  margin: 2px 0 12px;
  font-variant-numeric: tabular-nums;
}
.stu-summary b.ok { color: #15803d; }
.stu-summary b.wrong { color: #b91c1c; }
.stu-summary b.unknown { color: #8a6210; }
.stu-group { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.stu-group:first-child { border-top: none; padding-top: 0; }
.stu-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.stu-group-title { font-size: 14px; font-weight: 600; }
.stu-group-stat { font-size: 13px; color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
.stu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}
.stu-q {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 4px;
  cursor: pointer;
  min-height: 34px;
}
.stu-q:active { transform: scale(.97); }
.stu-q-no { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.stu-q-mark { font-weight: 600; }
.stu-q-score { font-size: 10px; font-weight: 600; opacity: .8; }
.stu-q.ok { background: #e8f7ee; border-color: #86c99e; color: #15803d; }
.stu-q.wrong { background: #fdeaea; border-color: #e7a3a3; color: #b91c1c; }
.stu-q.unknown { background: #fdf5d8; border-color: #e2c56a; color: #8a6210; }
.stu-q.partial { background: #eef7e6; border-color: #a7c98a; color: #3f6f21; border-style: dashed; }
.stu-q.none { background: #f5f6f8; color: var(--muted); }
.stu-sub { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; color: var(--muted); }
.stu-sub[hidden] { display: none; }
.stu-sub-item {
  appearance: none;
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.stu-sub-item:hover { color: var(--brand); background: #f6f8fc; }
.stu-sub-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; }

/* ===== 答题卡批改 · 主观阅卷 ===== */
.grade-modes { display: inline-flex; gap: 4px; }
.grade-mode { padding: 6px 12px; font-size: 13px; }
.grade-mode.active { background: #eef3ff; border-color: var(--brand); color: var(--brand); font-weight: 600; }
#grade-stu-wrap[hidden], #grade-q-wrap[hidden] { display: none; }
.grade-subject {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 10px;
}
.grade-subject .grade-sub-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.grade-crop { width: 100%; margin: 0 auto; }
.grade-crop-box { position: relative; overflow: hidden; background: #f0f2f6; border-radius: 8px; }
.grade-crop-box img {
  position: absolute;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
}
.grade-missing {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: #f5f6f8;
  border-radius: 8px;
}
.grade-scorebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 10px; }
.grade-scorebar[hidden] { display: none; }
.grade-score { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.grade-score input {
  width: 86px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.grade-score input:focus { outline: none; border-color: var(--brand); }
.grade-full { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grade-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grade-nav-text { margin: 0 auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.stu-edit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.stu-edit[hidden] { display: none; }
.stu-edit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stu-edit-head b { color: var(--ink); }
.stu-edit-head .btn { margin-left: auto; padding: 5px 10px; font-size: 13px; }
.stu-edit-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stu-opt {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.stu-opt.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.stu-opt-clear { width: auto; padding: 0 12px; font-size: 13px; color: var(--muted); }
.stu-edit-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.stu-result-empty { padding: 22px 8px; text-align: center; color: var(--muted); font-size: 14px; }
.stu-result-warn {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdf5d8;
  color: #8a6210;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== 答题卡批改 · 成绩统计 ===== */
.stats-summary { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats-warn {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdf5d8;
  color: #8a6210;
  font-size: 13px;
  line-height: 1.6;
}
.stats-warn[hidden] { display: none; }
#stats-total h3, #stats-rank h3, #stats-questions h3 { margin: 18px 0 10px; font-size: 15px; }
#stats-total h3:first-child, #stats-rank h3:first-child, #stats-questions h3:first-child { margin-top: 0; }
.stats-full-line { font-size: 13px; color: var(--muted); margin: -4px 0 10px; font-variant-numeric: tabular-nums; }
.stats-hist { display: flex; flex-direction: column; gap: 6px; }
.stats-hist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stats-hist-label { width: 58px; flex: none; }
.stats-hist-track { flex: 1; height: 12px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.stats-hist-bar { height: 100%; background: var(--brand); border-radius: 999px; }
.stats-hist-num { width: 24px; flex: none; text-align: right; color: var(--ink); font-weight: 600; }
.stats-rank-list { border-top: 1px solid var(--line); }
.stats-rank-row { border-bottom: 1px solid var(--line); }
.stats-rank-line { display: flex; align-items: center; gap: 8px; padding: 9px 0; }
.stats-rank-no {
  width: 24px;
  flex: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stats-rank-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-rank-tag { flex: none; font-size: 11px; color: #8a6210; background: #fdf5d8; border-radius: 999px; padding: 1px 7px; }
.stats-rank-score { flex: none; width: 52px; text-align: right; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-detail-btn { flex: none; padding: 4px 9px; font-size: 12px; }
.stats-detail { padding: 0 0 10px 32px; font-size: 13px; color: var(--muted); }
.stats-detail[hidden] { display: none; }
.stats-detail-block { padding: 3px 0; }
.stats-detail-title { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.stats-detail-line { display: flex; align-items: baseline; gap: 8px; padding: 1px 0; font-variant-numeric: tabular-nums; }
.stats-detail-line b { color: var(--ink); font-weight: 600; }
.stats-detail-line i { font-style: normal; font-size: 12px; color: #8a6210; }
.stats-detail-line.todo b { color: #8a6210; font-weight: 400; }
.stats-detail-note { margin-top: 4px; font-size: 12px; color: #8a6210; line-height: 1.5; }
.stats-foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.stats-sub-h { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.stats-q-list { border-top: 1px solid var(--line); }
.stats-q-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.stats-q-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stats-q-title { font-size: 14px; font-weight: 600; }
.stats-q-rate { margin-left: auto; font-size: 13px; color: var(--brand); font-variant-numeric: tabular-nums; }
.stats-q-meta, .stats-q-dist {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.stats-q-dist { color: #5b6675; }

.modal-note { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.modal-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.modal-input:focus { outline: none; border-color: var(--brand); }

/* ===== 开屏公告弹层 ===== */
.announce {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 20, 32, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 20px;
}
.announce[hidden] { display: none; }
.announce-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.announce-card h2 { margin: 0 0 12px; font-size: 18px; }
.announce-card ul { margin: 0 0 16px; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.announce-card li { margin: 4px 0; }
.announce-card .hint { margin: 0 0 16px; font-size: 13px; }
.announce-card .btn { width: 100%; justify-content: center; }
