:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1e293b;
  --ink-2: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(30, 41, 59, .08);
}
body.theme-math {
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
}
body.theme-bio {
  --accent: #059669;
  --accent-soft: #d1fae5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}
.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 12px; color: var(--ink-2); }
.badge {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.badge.badge-demo { background: #fef3c7; color: #b45309; }
.badge.badge-loading { background: var(--line); color: var(--ink-2); }

/* ---------- 首页 ---------- */
.view { max-width: 1080px; margin: 0 auto; padding: 40px 24px 64px; }
.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 34px; letter-spacing: 1px; margin-bottom: 14px; }
.grad {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--ink-2); max-width: 640px; margin: 0 auto; }
.subject-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 36px; }
.subject-card {
  text-align: left; cursor: pointer; border: 2px solid transparent;
  background: var(--card); border-radius: 20px; padding: 32px;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
  font-family: inherit; color: inherit;
}
.subject-card:hover { transform: translateY(-4px); }
.subject-card.physics:hover { border-color: #2563eb; }
.subject-card.math:hover { border-color: #7c3aed; }
.subject-card.biology:hover { border-color: #059669; }
.subject-icon {
  font-size: 34px; width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.subject-card.physics .subject-icon { background: #dbeafe; }
.subject-card.math .subject-icon { background: #ede9fe; }
.subject-card.biology .subject-icon { background: #d1fae5; }
.subject-card h2 { font-size: 24px; margin-bottom: 8px; letter-spacing: 4px; }
.subject-card p { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.enter { font-weight: 600; font-size: 14px; }
.subject-card.physics .enter { color: #2563eb; }
.subject-card.math .enter { color: #7c3aed; }
.subject-card.biology .enter { color: #059669; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.feature b { font-size: 14px; }
.feature span { font-size: 12px; color: var(--ink-2); }

/* ---------- 解题页布局 ---------- */
#solverView { max-width: 1280px; }
.solver-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.input-panel {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); position: sticky; top: 84px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { font-size: 20px; color: var(--accent); }
.ghost-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-family: inherit; font-size: 14px; resize: vertical; outline: none;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.drop-zone {
  border: 2px dashed var(--line); border-radius: 10px; padding: 14px;
  text-align: center; color: var(--ink-2); font-size: 13px; cursor: pointer;
  transition: border-color .15s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); color: var(--accent); }
#imagePreviewWrap { position: relative; }
#imagePreview { max-width: 100%; max-height: 180px; border-radius: 8px; }
#removeImage {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px;
  border-radius: 50%; border: none; background: #ef4444; color: #fff;
  cursor: pointer; font-size: 14px; line-height: 1;
}

.solve-btn {
  width: 100%; margin-top: 18px; padding: 13px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.solve-btn:hover { opacity: .92; }
.solve-btn:active { transform: scale(.98); }
.solve-btn:disabled { opacity: .55; cursor: not-allowed; }
.input-error { margin-top: 10px; color: #dc2626; font-size: 13px; }

.sample-list { display: flex; flex-direction: column; gap: 8px; }
.sample-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; background: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sample-item:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }

/* ---------- 输出区 ---------- */
.output-panel { min-height: 480px; }
.empty-state {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  height: 480px; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; color: var(--ink-2);
}
.empty-art { font-size: 52px; }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, #e8ecf3 25%, #f4f6fa 50%, #e8ecf3 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-title { height: 34px; width: 55%; margin-bottom: 18px; }
.sk-line { height: 16px; width: 100%; margin-bottom: 12px; }
.sk-line.short { width: 70%; }
.sk-block { height: 240px; width: 100%; margin-top: 20px; }
.loading-tip { margin-top: 18px; text-align: center; color: var(--ink-2); font-size: 14px; }

.result { display: flex; flex-direction: column; gap: 18px; }
.demo-banner {
  background: #fef3c7; color: #92400e; border-radius: 10px;
  padding: 9px 14px; font-size: 13px;
}
.result-head { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.result-head h1 { font-size: 22px; margin-bottom: 10px; }
.result-head .analysis { color: var(--ink-2); font-size: 15px; }
.step-card { background: var(--card); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-num {
  min-width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-head h3 { font-size: 16.5px; }
.step-content { font-size: 15px; }
.step-content p { margin: 4px 0; }
.viz-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfcfe; }
.viz-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; text-align: center; }
.viz-box canvas { display: block; margin: 0 auto; max-width: 100%; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }

.answer-card {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-radius: var(--radius); padding: 22px 24px; color: #fff; box-shadow: var(--shadow);
}
.answer-card h3 { font-size: 15px; opacity: .85; margin-bottom: 6px; letter-spacing: 2px; }
.answer-card .answer-body { font-size: 17px; font-weight: 600; }
.keypoints { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-chip {
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
}

.err-card { background: #fef2f2; color: #b91c1c; border-radius: var(--radius); padding: 18px 22px; font-size: 14px; }

.katex { font-size: 1.05em; }
.katex-display { margin: 10px 0; overflow-x: auto; }

@media (max-width: 960px) {
  .solver-layout { grid-template-columns: 1fr; }
  .input-panel { position: static; }
  .subject-cards, .features { grid-template-columns: 1fr; }
}
/* ---------- 流式输出 ---------- */
.stream-cursor {
  display: inline-block; width: 9px; height: 17px; margin-left: 3px;
  background: var(--accent); vertical-align: -2px;
  animation: blink .8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.step-card.generating { border: 1.5px dashed var(--accent); }
.generating-tag { font-size: 12px; color: var(--accent); font-weight: 600; margin-left: 8px; }

/* ---------- 结果工具栏 / 变式练习 ---------- */
.result-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.export-btn {
  border: none; border-radius: 10px; padding: 10px 18px; cursor: pointer;
  background: #0f766e; color: #fff; font-size: 14px; font-weight: 600;
  transition: opacity .15s;
}
.export-btn:hover { opacity: .9; }
.practice-card {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.practice-card h3 { font-size: 16px; color: #92400e; margin-bottom: 8px; }
.practice-card .practice-q { font-size: 15px; }
.practice-card .practice-hint { margin-top: 10px; font-size: 13px; color: #b45309; }

/* ---------- 讲义（海淀风） ---------- */
.print-overlay {
  position: fixed; inset: 0; z-index: 100; overflow: auto;
  background: rgba(15, 23, 42, .55); padding: 24px 0 60px;
}
.print-overlay-bar {
  position: sticky; top: 0; z-index: 101;
  display: flex; align-items: center; gap: 14px; justify-content: center;
  background: #0f172a; color: #e2e8f0; padding: 10px 20px; font-size: 13.5px;
  border-radius: 0 0 12px 12px; max-width: 860px; margin: 0 auto 18px;
}
#printSheet { max-width: 820px; margin: 0 auto; }
.handout {
  background: #fff; color: #000; padding: 46px 52px;
  font-family: "SimSun", "宋体", serif; font-size: 14px; line-height: 1.9;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.hd-head { text-align: center; border-bottom: 3px double #000; padding-bottom: 12px; }
.hd-school { font-size: 22px; font-weight: 700; letter-spacing: 6px; }
.hd-tag { font-size: 12px; letter-spacing: 3px; color: #444; margin-top: 4px; }
.hd-title { text-align: center; font-size: 17px; font-weight: 700; margin: 14px 0 10px; }
.hd-meta {
  display: flex; justify-content: space-between; font-size: 12.5px;
  border-bottom: 1px solid #000; padding-bottom: 8px; margin-bottom: 16px;
}
.hd-meta span u { display: inline-block; min-width: 90px; border-bottom: 1px solid #666; }
.hd-sec { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.hd-sec::before { content: ""; display: inline-block; width: 5px; height: 15px; background: #000; margin-right: 8px; vertical-align: -2px; }
.hd-body { text-align: justify; }
.hd-body p { margin: 4px 0; }
.hd-kp { margin: 4px 0 4px 22px; }
.hd-step { border: 1px solid #999; padding: 10px 14px; margin: 10px 0; }
.hd-step-title { font-weight: 700; margin-bottom: 4px; }
.hd-fig { text-align: center; margin: 10px 0; }
.hd-fig img { max-width: 88%; }
.hd-fig .hd-fig-cap { font-size: 12px; color: #444; margin-top: 2px; }
.hd-answer { border: 2px solid #000; padding: 10px 16px; font-weight: 700; margin: 10px 0; }
.hd-blank-lines { margin-top: 10px; }
.hd-blank-lines div { border-bottom: 1px solid #999; height: 30px; }
.hd-hint { font-size: 12px; color: #555; margin-top: 8px; }
.hd-foot { border-top: 1px solid #000; margin-top: 26px; padding-top: 8px; font-size: 11.5px; color: #444; display: flex; justify-content: space-between; }
.hd-qimg { max-width: 70%; display: block; margin: 8px auto; }

@media print {
  body > *:not(#printOverlay) { display: none !important; }
  #printOverlay {
    display: block !important; position: static !important;
    background: none !important; padding: 0 !important; overflow: visible !important;
  }
  .print-overlay-bar { display: none !important; }
  #printSheet { max-width: none; margin: 0; }
  .handout { box-shadow: none; padding: 0; }
  @page { size: A4; margin: 16mm 14mm; }
}

.user-box { display: flex; align-items: center; gap: 6px; }
#userName { font-size: 13px; font-weight: 600; color: var(--accent); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; }

/* ---------- 历史抽屉 ---------- */
.history-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 320px;
  background: var(--card); box-shadow: var(--shadow); z-index: 20;
  transform: translateX(0); transition: transform .25s; padding: 18px;
  display: flex; flex-direction: column;
}
.history-drawer.hidden { transform: translateX(-110%); }
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.history-head h3 { font-size: 16px; }
.history-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.history-filters input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.history-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  transition: border-color .15s, background .15s; position: relative;
}
.history-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.history-item .h-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.history-item .h-meta { font-size: 11px; color: var(--ink-2); }
.history-item .h-fav {
  position: absolute; top: 8px; right: 8px; font-size: 13px; opacity: .5;
}
.history-item .h-fav.active { opacity: 1; }
.history-empty { color: var(--ink-2); font-size: 13px; text-align: center; margin-top: 20px; }

/* ---------- 登录弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
}
.login-dialog {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  width: 90%; max-width: 360px; box-shadow: var(--shadow); text-align: center;
}
.login-dialog h3 { margin-bottom: 6px; }
.login-dialog p { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.login-dialog input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  margin-bottom: 16px; font-size: 14px;
}
.dialog-btns { display: flex; gap: 10px; }
.dialog-btns .solve-btn { flex: 1; margin-top: 0; }
.dialog-btns .ghost-btn { flex: 1; padding: 11px; font-size: 14px; }

/* ---------- OCR 区域 ---------- */
.ocr-wrap {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fbfcfe;
}
.ocr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ocr-head span { font-size: 12px; color: var(--ink-2); }
.ocr-wrap textarea { border-color: var(--line); }
.ghost-btn.small { padding: 4px 8px; font-size: 12px; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 960px) {
  .history-drawer { width: 86%; }
}

/* ---------- 历史记录标签 ---------- */
.h-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.h-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.history-item { position: relative; }
/* ================= 分享到微信（弹窗 + 分享页） ================= */
.share-modal {
  background: #fff; border-radius: 16px; padding: 26px 28px; width: min(480px, 92vw);
  box-shadow: 0 20px 60px rgba(15,23,42,.25); max-height: 88vh; overflow-y: auto;
}
.share-modal h3 { font-size: 18px; margin-bottom: 4px; }
.share-modal .share-tip { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.share-qr-wrap { text-align: center; padding: 10px 0 4px; }
.share-qr-wrap .qr-box { display: inline-block; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.share-qr-hint { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.share-link-row { display: flex; gap: 8px; margin: 14px 0 6px; }
.share-link-row input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12.5px; color: var(--ink-2); background: #f8fafc; min-width: 0;
}
.share-copy-btn { white-space: nowrap; }
.share-actions { display: flex; gap: 10px; margin-top: 14px; }
.share-actions .export-btn { flex: 1; }
.share-divider { display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: 12px; margin: 16px 0 4px; }
.share-divider::before, .share-divider::after { content: ""; flex: 1; border-top: 1px dashed #e2e8f0; }
.share-wechat-guide { font-size: 12.5px; color: var(--ink-2); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; margin-top: 12px; line-height: 1.7; }

/* 分享页（好友打开看到的页面） */
.share-body { background: #f1f5f9; min-height: 100vh; }
.share-topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px;
  position: sticky; top: 0; z-index: 10;
}
.share-brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.share-pdf-btn { padding: 8px 18px; font-size: 14px; width: auto; white-space: nowrap; flex-shrink: 0; }
.share-main { max-width: 860px; margin: 24px auto; padding: 0 16px 60px; }
.share-loading, .share-error { text-align: center; color: var(--ink-2); padding: 60px 0; font-size: 15px; }
.share-error { color: #dc2626; }
.share-sheet { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(15,23,42,.08); padding: 30px 36px; }
.share-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.share-subject-chip { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; padding: 4px 14px; border-radius: 999px; }
.share-date { font-size: 12.5px; color: #94a3b8; }
.share-question { border-left: 4px solid var(--accent); background: #f8fafc; border-radius: 0 10px 10px 0; padding: 12px 16px; margin-bottom: 18px; }
.share-q-label { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 2px; margin-bottom: 4px; }
.share-q-img { max-width: 70%; display: block; margin: 8px auto; border-radius: 8px; }
.share-foot { margin-top: 26px; border-top: 1px dashed #e2e8f0; padding-top: 12px; font-size: 12px; color: #94a3b8; text-align: center; }
.share-body .result { padding: 0; }
@media (max-width: 640px) {
  .share-sheet { padding: 20px 16px; }
  .share-pdf-btn { padding: 7px 12px; font-size: 12.5px; }
}

/* ============ 新增学科（语文 / 历史 / 地理）主题色 ============ */
body.theme-chinese { --brand: #b91c1c; --brand-soft: #fee2e2; --accent: #7f1d1d; }
body.theme-history { --brand: #b45309; --brand-soft: #fef3c7; --accent: #92400e; }
body.theme-geo     { --brand: #0d9488; --brand-soft: #ccfbf1; --accent: #0f766e; }

.subject-card.chinese .subject-icon { background: #fee2e2; }
.subject-card.history .subject-icon { background: #fef3c7; }
.subject-card.geography .subject-icon { background: #ccfbf1; }
.subject-card.chinese:hover, .subject-card.chinese:focus { border-color: #b91c1c; }
.subject-card.history:hover, .subject-card.history:focus { border-color: #b45309; }
.subject-card.geography:hover, .subject-card.geography:focus { border-color: #0d9488; }

/* ============ 北京卷制度说明 ============ */
.beijing-note {
  margin: 6px 0 18px;
  background: #ffffff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 16px 18px;
}
.beijing-note h3 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px;
}
.bj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.bj-item {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
}
.bj-item b {
  display: block;
  font-size: 13.5px;
  color: #111827;
  margin-bottom: 3px;
}
.bj-item span {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.65;
}

/* ============ 多页拍照上传 ============ */
.multi-wrap { margin-top: 10px; }
.multi-head { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.multi-head .ghost-btn.small:disabled { opacity: .5; cursor: not-allowed; }
.multi-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.multi-thumb {
  position: relative;
  width: 62px; height: 78px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line, #e5e7eb);
  background: #f9fafb;
}
.multi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.multi-no {
  position: absolute; left: 3px; top: 3px;
  background: rgba(17, 24, 39, .65); color: #fff;
  font-size: 11px; border-radius: 4px; padding: 0 5px;
}
.multi-del {
  position: absolute; right: 2px; top: 2px;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  border: none; border-radius: 9px; background: #ef4444; color: #fff;
  font-size: 13px; cursor: pointer; padding: 0;
}
.multi-status {
  margin-top: 8px; font-size: 12.5px; color: #6b7280;
  background: #f9fafb; border-radius: 10px; padding: 10px 12px;
  line-height: 1.7;
}
.asm-summary { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.asm-chip {
  background: #eff6ff; color: #2563eb;
  border-radius: 6px; padding: 2px 8px; font-size: 12px;
}
.asm-chip.warn { background: #fffbeb; color: #b45309; }
.asm-warn {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 7px 10px; color: #92400e; font-size: 12px; margin: 6px 0;
}
.asm-qtitle { margin-top: 8px; font-size: 12.5px; color: #374151; }
.asm-qlist { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.asm-qbtn {
  border: 1px solid var(--line, #e5e7eb); background: #fff; color: #374151;
  border-radius: 14px; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
  font-family: inherit;
}
.asm-qbtn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ============ 题型徽标 / 得分点 / 术语 / 失分提醒 ============ */
.qtype-badge {
  display: inline-block; margin-top: 6px;
  background: #f5f3ff; color: #6d28d9;
  border-radius: 6px; padding: 2px 9px; font-size: 12.5px; font-weight: 600;
}
.qtype-badge.alt { background: #ecfdf5; color: #047857; margin-left: 6px; }

.scoring-card, .terms-card, .warning-card {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
}
.scoring-card h3, .terms-card h3, .warning-card h3 {
  font-size: 14.5px; font-weight: 700; color: #111827; margin: 0 0 8px;
}
.scoring-list, .warning-list { margin: 0; padding-left: 20px; }
.scoring-list li, .warning-list li {
  font-size: 13.5px; color: #374151; line-height: 1.8;
}
.warning-card { border-left: 3px solid #f59e0b; background: #fffbf5; }
.warning-card h3 { color: #92400e; }
.terms-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.term-chip {
  background: #ecfdf5; color: #047857;
  border-radius: 6px; padding: 3px 10px; font-size: 12.5px;
}

@media (max-width: 640px) {
  .bj-grid { grid-template-columns: 1fr; }
}
