:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1c1f23;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #e8f0fe;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --green: #15803d;
  --green-soft: #dcfce7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.title-wrap h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.stat {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.dot-amber { background: var(--amber); }

/* Search */
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbfc;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
}
.search-box button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  width: 42px;
  cursor: pointer;
}
.search-box button:hover { color: var(--text); }
.search-box:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.result-meta {
  color: var(--muted);
  font-size: 12.5px;
  margin: 10px 2px 6px;
  min-height: 18px;
}

/* Table */
.table-wrap {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.qtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.qtable thead th {
  position: sticky;
  top: 0;
  background: #f3f4f6;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.qtable td {
  padding: 9px 12px;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: top;
}
.qtable tbody tr { cursor: pointer; }
.qtable tbody tr:hover { background: var(--accent-soft); }
.col-idx { width: 44px; color: var(--muted); }
.col-ans { width: 130px; }
.ans {
  color: var(--green);
  font-weight: 600;
  word-break: break-all;
}
.q-text { word-break: break-all; }
/* OCR 识别到但题库未收录的行：琥珀色提示，点击复制题目文字 */
.qtable tbody tr.ocr-only { background: #fffaf0; }
.qtable tbody tr.ocr-only:hover { background: #fff3d6; }
.qtable tbody tr.ocr-only .ans { color: #b45309; }
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 13px;
}

/* Monitor */
.toggle-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s;
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.hidden { display: none !important; }

.note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #7c5e10;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin: 0 0 14px;
}
.note code {
  background: #fef3c7;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.monitor-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.btn {
  border: none;
  border-radius: 5px;
  padding: clamp(6px, 0.6vh, 9px) clamp(12px, 0.9vw, 18px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn-start { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.btn-stop  { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.opt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.opt input {
  width: 78px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.monitor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.preview, .ocr-out {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fafbfc;
  min-height: 160px;
}
.preview-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
#screenVideo {
  width: 100%;
  border-radius: 6px;
  background: #000;
  display: block;
}
.status {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.recognized {
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
}
.answer-box {
  margin-top: 10px;
  background: var(--green-soft);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.answer-label { font-size: 12px; color: var(--green); font-weight: 600; }
.answer-text { font-size: 16px; font-weight: 700; color: var(--green); word-break: break-all; }

/* Footer */
.foot {
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  margin-top: 8px;
}
.foot p { margin: 4px 0; }
.foot code {
  background: #eceef1;
  padding: 1px 6px;
  border-radius: 4px;
}
.foot .dim { color: #9aa1ab; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  background: #1c1f23;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 99;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .monitor-grid { grid-template-columns: 1fr; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ============ 监控助手 v2 ============ */
.state-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fafbfc;
  margin-bottom: 14px;
}
.state-indicator {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.state-indicator h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.state-indicator p { margin: 0; font-size: 12.5px; color: var(--muted); }
.st-gray   { border-left: 4px solid #9ca3af; }
.st-blue   { border-left: 4px solid var(--accent); }
.st-purple { border-left: 4px solid #7c3aed; }
.st-green  { border-left: 4px solid var(--green); }

.hole-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.hole-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  padding: 8px 4px;
}
.hole-card h4 { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.hole-card p { margin: 0; font-size: 12px; color: var(--muted); }
.hole-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.hole-card.active p { color: var(--accent); font-weight: 600; }

.tpl-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.tpl-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 5px 10px;
  font-size: 12px;
}
.tpl-thumb {
  width: 44px;
  height: 30px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.tpl-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.tpl-status { color: var(--muted); white-space: nowrap; }
.tpl-status.ok { color: var(--green); font-weight: 600; }

.monitor-grid { grid-template-columns: 3fr 2fr; }
#processCanvas {
  width: 100%;
  border-radius: 6px;
  background: #101418;
  display: block;
}
.opt b { color: var(--accent); }
.opt input[type="range"] { width: 110px; }

.log {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
}
.log-line { padding: 2px 0; word-break: break-all; color: var(--text); }
.log-line.success { color: var(--green); }
.log-line.warning { color: var(--amber); }
.log-line.error { color: #dc2626; }
.log-line.info { color: var(--muted); }

.ocr-out .answer-box { margin-top: 0; }

@media (max-width: 640px) {
  .hole-info { grid-template-columns: repeat(3, 1fr); }
  .tpl-strip { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: 1fr; }
}

/* ============ 题库补录 ============ */
.pending-list { display: flex; flex-direction: column; gap: 10px; }
.pending-empty { padding: 22px 0; }
.pending-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafbfc;
}
.pending-item.new { animation: flashIn .5s ease; }
@keyframes flashIn {
  from { background: var(--green-soft); border-color: #86efac; }
  to   { background: #fafbfc; border-color: var(--border); }
}
.pending-q {
  font-size: 13.5px;
  margin-bottom: 8px;
  word-break: break-all;
  line-height: 1.5;
}
.pq-label { color: var(--muted); font-weight: 600; }
.pq-text { color: var(--text); }
.pending-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pending-ans {
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
}
.pending-ans:focus { border-color: var(--accent); }
.btn-correct { background: linear-gradient(135deg, #27ae60, #2ecc71); color: #fff; }
.btn-discard { background: linear-gradient(135deg, #7f8c8d, #95a5a6); color: #fff; }
.btn-export { background: linear-gradient(135deg, #2980b9, #3498db); color: #fff; }
.add-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.add-count { font-size: 12.5px; color: var(--muted); }

/* ===== 华容道解法模块 ===== */
.dot-purple { background: #7c3aed; }
.hrd-body { display: block; }
.hrd-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 16px;
}
.hrd-controls .opt select {
  margin-left: 6px; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; background: #fff; color: var(--text);
}
.hrd-main { display: flex; flex-wrap: wrap; gap: 22px; }
.hrd-col { flex: 0 0 auto; }
.hrd-subtitle { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.hrd-board {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), var(--cell, 64px));
  gap: 4px;
  width: max-content;
  padding: 6px;
  background: #f1f3f5;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.hcell {
  width: var(--cell, 64px);
  height: var(--cell, 64px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 18px; font-weight: 700; color: var(--text);
  position: relative;
  user-select: none;
}
.hcell input {
  width: 100%; height: 100%;
  border: none; outline: none; background: transparent;
  text-align: center; font-size: 18px; font-weight: 700; color: var(--text);
  border-radius: 7px;
}
.hcell input:focus { background: var(--accent-soft); }
.hcell.blank { background: #e9ecef; color: transparent; }
.hcell.blank::after { content: "空"; position: absolute; font-size: 12px; font-weight: 600; color: #adb5bd; }
.hrd-target .hcell { background: #f8f9fa; color: var(--muted); font-size: 16px; }
.hrd-target .hcell.blank { background: #e9ecef; }
.hcell.highlight {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) inset;
  color: var(--accent);
}
.hcell.moved { background: var(--green-soft); border-color: #86efac; }
.hrd-legend { font-size: 12px; color: var(--muted); margin-top: 8px; max-width: 320px; line-height: 1.5; }
.hrd-msg { margin-top: 14px; font-size: 13.5px; min-height: 20px; }
.hrd-msg.info { color: var(--muted); }
.hrd-msg.error { color: #dc2626; font-weight: 600; }
.hrd-msg.ok { color: var(--green); font-weight: 600; }
.hrd-solution { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 16px; }
.hrd-sol-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hrd-sol-head #hrdSolInfo { font-size: 13.5px; font-weight: 600; color: var(--text); }
.hrd-play { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.hrd-playboard { margin-bottom: 14px; }
.hrd-steps {
  max-height: 240px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; background: #fff;
}
.hstep {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.hstep:last-child { border-bottom: none; }
.hstep:hover { background: var(--accent-soft); }
.hstep.active { background: var(--accent-soft); font-weight: 700; }
.hstep .idx { color: var(--muted); width: 40px; flex: 0 0 auto; }
.hstep .tag { background: var(--accent); color: #fff; border-radius: 5px; padding: 1px 8px; font-weight: 700; }
.hstep .dir { color: var(--muted); font-weight: 600; }
.hstep .pos { color: var(--muted); font-size: 12px; opacity: .8; }
.hstep .arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700;
  flex: 0 0 auto; font-size: 16px;
}
/* ===== 实时方向面板（主视觉） ===== */
.hrd-nextmove {
  display: flex; align-items: center; gap: 22px;
  margin-bottom: 14px; padding: 18px 22px;
  background: linear-gradient(135deg, #f7faff, #eef4ff);
  border: 2px solid var(--accent); border-radius: 14px;
  box-shadow: 0 2px 12px rgba(52, 152, 219, .15);
}
.hrd-nextmove .nm-arrow {
  width: 92px; height: 92px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 58px; font-weight: 800; color: #fff; line-height: 1;
  background: var(--accent); flex: 0 0 auto;
  transition: background .15s ease, transform .15s ease;
}
.hrd-nextmove .nm-arrow.dir-up { background: #e74c3c; }
.hrd-nextmove .nm-arrow.dir-down { background: #3498db; }
.hrd-nextmove .nm-arrow.dir-left { background: #27ae60; }
.hrd-nextmove .nm-arrow.dir-right { background: #f39c12; }
.hrd-nextmove .nm-arrow.nm-done { background: #16a085; }
.hrd-nextmove .nm-text { flex: 1 1 auto; }
.hrd-nextmove .nm-title { font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.hrd-nextmove .nm-dir {
  font-size: 42px; font-weight: 800; color: var(--text); line-height: 1.15; margin: 2px 0;
}
.hrd-nextmove .nm-sub { font-size: 13px; color: var(--muted); }
.hrd-nextmove .nm-side {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.hrd-nextmove .nm-count {
  font-size: 15px; font-weight: 700; color: var(--accent);
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
}
/* ===== 折叠详情 / 手动输入 ===== */
.hrd-details, .hrd-manual {
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; margin-bottom: 12px;
}
.hrd-manual { margin-top: 14px; }
.hrd-details > summary, .hrd-manual > summary {
  cursor: pointer; padding: 10px 14px; font-size: 13.5px; font-weight: 600;
  color: var(--accent); user-select: none; list-style: none;
}
.hrd-details > summary::-webkit-details-marker,
.hrd-manual > summary::-webkit-details-marker { display: none; }
.hrd-details > summary i, .hrd-manual > summary i { margin-right: 6px; }
.hrd-details > summary:hover, .hrd-manual > summary:hover { background: var(--accent-soft); }
.hrd-details[open] > summary, .hrd-manual[open] > summary { border-bottom: 1px solid var(--border); }
.hrd-details > :not(summary) { padding: 0 14px 14px; }
.hrd-manual > :not(summary) { padding: 14px; }
.hstep .arrow.dir-up { background: #e74c3c; }
.hstep .arrow.dir-down { background: #3498db; }
.hstep .arrow.dir-left { background: #27ae60; }
.hstep .arrow.dir-right { background: #f39c12; }
.hidden { display: none !important; }
@media (max-width: 560px) {
  .hrd-main { gap: 16px; }
  .hrd-nextmove { flex-wrap: wrap; gap: 14px; }
  .hrd-nextmove .nm-arrow { width: 72px; height: 72px; font-size: 44px; border-radius: 18px; }
  .hrd-nextmove .nm-dir { font-size: 32px; }
  .hrd-nextmove .nm-side { align-items: flex-start; }
}

/* ==================== 启动初始化遮罩（进度条） ==================== */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .35s ease;
}
.boot-hidden { opacity: 0; pointer-events: none; }
.boot-box {
  width: min(420px, 86vw);
  text-align: center;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.boot-logo { font-size: 40px; color: var(--accent); margin-bottom: 12px; }
.boot-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.boot-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.boot-track { height: 10px; border-radius: 6px; background: var(--border); overflow: hidden; }
.boot-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  transition: width .2s ease; border-radius: 6px;
}
.boot-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-top: 10px;
}

/* ==================== 搜题助手独立 OCR 工具栏 ==================== */
.search-tools {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 10px 0 4px;
}
.btn-mini {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-mini:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft, #eef4ff);
}
.btn-mini i { font-size: 13px; }

.ocr-result {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px; line-height: 1.5;
  border: 1px solid var(--border);
}
.ocr-result.ok {
  background: rgba(46, 204, 113, 0.10);
  border-color: rgba(46, 204, 113, 0.45);
  color: #1e7d4f;
}
.ocr-result.warn {
  background: rgba(241, 196, 15, 0.10);
  border-color: rgba(241, 196, 15, 0.45);
  color: #9a7b07;
}
.ocr-result .q { font-weight: 600; }
.ocr-result .a {
  font-weight: 700; color: #e74c3c;
  background: rgba(231, 76, 60, 0.10);
  padding: 1px 7px; border-radius: 5px;
}
.ocr-result .arrow { margin: 0 6px; opacity: .6; }

/* ===== 顶栏右侧：统计 + 常驻操作按钮（统一右上角） ===== */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-right { justify-content: flex-start; }
}

/* ===== 授权状态条（右上角，auth-status.js） ===== */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-month { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.pill-year  { background: #f3e8ff; color: #7c3aed; border: 1px solid #7c3aed; }
.auth-link {
  background: none; border: none; color: var(--muted);
  font-size: 12px; cursor: pointer; text-decoration: underline; margin-left: 8px;
}
.auth-link:hover { color: var(--accent); }
.auth-err { color: #c0392b; font-size: 12px; margin-left: 8px; }
.auth-activate { margin-left: 8px; }
#authFormWrap { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.auth-input { padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; width: 190px; }

/* ===== 授权激活门禁（全屏，auth-status.js） ===== */
.auth-pill.pill-none { background: #f1f3f5; color: var(--muted); border: 1px solid var(--border); }
.auth-lock {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245, 246, 248, .97);
}
.auth-lock-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 30px 34px; max-width: 440px; width: calc(100% - 40px); text-align: center;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .12);
}
.auth-lock-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.auth-lock-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.8; }
.auth-lock-note { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); opacity: .85; }
.auth-lock-row { display: flex; gap: 8px; justify-content: center; }
.auth-lock-msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
.auth-lock-msg.ok { color: var(--green); }
.auth-lock-msg.err { color: #c0392b; }
.auth-lock-buy { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.auth-buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--accent); transition: all .15s ease;
}
.auth-buy-btn:hover { background: var(--accent); color: #fff; }
.auth-buy-btn i { font-size: 12px; }

/* ============ 题库补录 · OCR 选项自动识别 ============ */
.pending-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 10px;
}
.pending-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.opt-tag {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.opt-tag.opt-low { background: #e67e22; }   /* 低置信度：提醒人工核对文字 */
.opt-input {
  flex: 1;
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.opt-input:focus { border-color: var(--accent); }
.btn-opt-pick { padding: 6px 12px; font-size: 12.5px; white-space: nowrap; }
