:root {
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: rgba(5,150,105,0.08);
  --success: #059669;
  --success-bg: #ecfdf5;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'Inter','Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  --transition: 0.2s ease;
}

*{margin:0;padding:0;box-sizing:border-box}

body {
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

/* === 侧边栏布局 === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar { width: 260px; background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); color: #e2e8f0; padding: 28px 20px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }

.sidebar-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo span { color: var(--primary); }

.sidebar-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-item:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.sidebar-item.active { background: rgba(255,255,255,0.08); color: #fff; font-weight: 600; }

.sidebar-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 16px 14px 6px;
  font-weight: 700;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== 顶部导航（在 main-area 内） ===== */
.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border: 1px solid var(--success);
}
.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--error);
  color: #fff;
  border: 1px solid var(--error);
}
.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border: 1px solid var(--warning);
}
.btn-warning:hover {
  background: #b45309;
}

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== 模式切换 ===== */
.mode-toggle {
  display: flex;
  gap: 0;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
}

.mode-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--primary);
  transition: all var(--transition);
  font-family: var(--font);
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ===== 页面容器 ===== */
.main-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.35s ease; }

@keyframes fadeIn {
  from { opacity: 0;}
  to { opacity: 1;}
}

/* ===== 上传页 ===== */
.upload-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.upload-icon {
  font-size: 72px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(102,126,234,0.2));
}

.upload-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.upload-desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 400px;
  line-height: 1.6;
}

.upload-area {
  width: 100%;
  max-width: 420px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);box-shadow: var(--shadow-lg);
}

.upload-area-text {
  font-size: 16px;
  color: var(--text-light);
  margin-top: 10px;
  font-weight: 500;
}

.upload-area-icon {
  font-size: 44px;
  opacity: 0.6;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.parse-status {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.parse-status.error { color: var(--error); }
.parse-status.success { color: var(--success); }

.alert-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  color: #92400e;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 16px;
  display: none;
  max-width: 420px;
  width: 100%;
}

.alert-banner.show { display: block; }

/* ===== 题目卡片 ===== */
.question-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.question-number {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  margin-bottom: 14px;
  background: var(--primary-light);
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 28px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
}

/* ===== 选项 ===== */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 15px;
  line-height: 1.7;
  background: var(--card-bg);
  user-select: none;
}

.option-item:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateX(4px);
}

.option-item.disabled { cursor: default; }

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  flex-shrink: 0;
  transition: all var(--transition);
}

.option-text { flex: 1; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; padding-top: 4px; }

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.option-item.selected .option-letter {
  background: var(--primary);
  color: #fff;
}

.option-item.correct {
  border-color: var(--success);
  background: var(--success-bg);
}
.option-item.correct .option-letter {
  background: var(--success);
  color: #fff;
}

.option-item.wrong {
  border-color: var(--error);
  background: var(--error-bg);
}
.option-item.wrong .option-letter {
  background: var(--error);
  color: #fff;
}

/* ===== 反馈 ===== */
.feedback-msg {
  margin-top: 20px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  display: none;
}

.feedback-msg.show { display: block; }

.feedback-msg.correct {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid var(--success);
}

.feedback-msg.wrong {
  background: var(--error-bg);
  color: #991b1b;
  border: 1px solid var(--error);
}

/* ===== 导航 ===== */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.nav-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.nav-progress:hover {
  background: var(--primary);
}

.nav-progress:hover .nav-progress-text,
.nav-progress:hover .nav-progress-icon {
  color: #fff;
}

.nav-progress-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  transition: color var(--transition);
}

.nav-progress-icon {
  font-size: 14px;
  color: var(--primary);
  transition: color var(--transition);
}

/* ===== 选题面板 ===== */
.qpicker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.qpicker-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 520px;
  width: 90%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.qpicker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.qpicker-title {
  font-size: 18px;
  font-weight: 800;
}

.qpicker-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qpicker-close:hover {
  background: var(--error-bg);
  color: var(--error);
}

.qpicker-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.qpicker-item {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qpicker-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.qpicker-item.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.qpicker-item.correct {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.qpicker-item.wrong {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

/* ===== 结果页 ===== */
.result-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
}

.result-main {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}

.result-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 10;
}

.ring-bar {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
}

.ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-pct {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.ring-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 4px;
}

.result-info {
  flex: 1;
  text-align: left;
}

.result-score-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.result-score-num {
  font-size: 40px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.result-score-sep {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-light);
}

.result-score-total {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-light);
}

.result-score-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  margin-left: 4px;
}

.result-score-desc {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-icon {
  font-size: 20px;
}

.stat-info {
  text-align: center;
}

.stat-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 4px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-actions-row {
  display: flex;
  gap: 10px;
}

.result-actions-row .btn {
  flex: 1;
  justify-content: center;
}

/* ===== 错题本 ===== */
.wrong-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 24px 20px;
}

.wrong-header {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.wrong-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 14px;
  border-left: 4px solid var(--error);
  transition: box-shadow var(--transition);
}

.wrong-item:hover {
  box-shadow: var(--shadow-lg);
}

.wrong-item-number {
  font-size: 12px;
  color: var(--error);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wrong-item-question {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  margin: 8px 0 14px;
  white-space: pre-wrap;
}

.wrong-item-info {
  display: flex;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
}

.wrong-item-info span {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.wrong-your {
  background: var(--error-bg);
  color: var(--error);
}

.wrong-correct {
  background: var(--success-bg);
  color: var(--success);
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-actions .btn-outline:first-child {
  margin-right: auto;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* 隐藏浏览器原生密码显示/清除图标，避免与自定义眼睛重复 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 兼容新版 Edge/Chrome 的原生 password reveal 按钮 */
input::-webkit-credentials-auto-fill-button {
  display: none !important;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error { border: 2px solid var(--error); color: var(--error); }
.toast.success { border: 2px solid var(--success); color: var(--success); }
.toast.info { border: 2px solid var(--primary); color: var(--primary); }

/* ===== 移动端底部导航 ===== */
.mobile-navbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 4px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex: 1;
  cursor: pointer;
}

.mobile-nav-item:hover { color: var(--primary); }
.mobile-nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}

.mobile-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.mobile-nav-text {
  font-size: 11px;
  font-weight: 600;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  /* 移动端底部导航显示 */
  .mobile-navbar { display: flex; }

  /* 主内容区添加底部padding，避免被导航遮挡 */
  .main-content { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }

  /* 隐藏侧边栏 */
  .sidebar { display: none; }

  /* 调整app布局 */
  .app-layout { flex-direction: column; }
  .main-area { min-height: 100vh; }
}

@media (max-width: 640px) {
  /* 题目卡片优化 */
  .question-card {
    padding: 20px 16px;
    margin-bottom: 12px;
  }
  .question-text { font-size: 16px; line-height: 1.7; }

  /* 选项按钮优化 - 全宽纵向堆叠 */
  .options-list { gap: 10px; }
  .option-item {
    padding: 16px 14px;
    font-size: 14px;
    min-height: 56px;
    border-radius: 10px;
  }
  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .option-text { padding-top: 2px; }

  /* 结果页优化 - 紧凑横排，避免移动端纵向拉长 */
  .result-page { min-height: auto; }
  .result-card { padding: 20px 16px; }
  .result-main { gap: 16px; margin-bottom: 20px; }
  .result-ring { width: 96px; height: 96px; }
  .ring-pct { font-size: 22px; }
  .ring-label { font-size: 11px; margin-top: 2px; }
  .result-score-num { font-size: 32px; }
  .result-score-sep, .result-score-total { font-size: 20px; }
  .result-stats { gap: 8px; margin-bottom: 20px; }
  .stat-item { padding: 12px 6px; gap: 6px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 11px; }
  .result-actions { gap: 8px; }

  /* 按钮优化 */
  .btn { padding: 10px 16px; font-size: 14px; border-radius: 8px; }
  .btn-sm { padding: 8px 14px; font-size: 13px; }

  /* 上传页优化 */
  .upload-area { padding: 28px 16px; border-radius: 12px; }
  .upload-title { font-size: 20px; }
  .upload-icon { font-size: 56px; }

  /* 导航按钮优化 */
  .nav-buttons {
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, #f8f9fa 70%, transparent);
    margin: 0;
    gap: 10px;
  }
  .nav-progress { display: none; }
  .nav-buttons .btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* 选题面板优化 */
  .qpicker-panel { padding: 16px 12px; max-width: 94%; border-radius: 16px 16px 0 0; }
  .qpicker-title { font-size: 16px; }
  .qpicker-grid { grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .qpicker-item { font-size: 12px; border-radius: 6px; }

  /* 顶部栏优化 */
  .topbar { padding: 10px 16px; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* 错题本优化 */
  .wrong-page { padding: 16px 12px; }
  .wrong-header { font-size: 18px; margin-bottom: 16px; }
  .wrong-item { padding: 18px 16px; border-radius: 10px; }
  .wrong-item-question { font-size: 15px; }

  /* 模态框优化 */
  .modal-box { padding: 24px 20px; border-radius: 12px; }

  /* 空状态优化 */
  #quizEmptyState, #resultEmptyState, #wrongEmptyState { padding: 40px 16px; }

  /* 修正答案按钮 - 移动端布局优化：紧贴反馈信息下方，左对齐，避免被浮动导航遮挡 */
  .correct-trigger-row {
    margin-top: 10px;
    justify-content: flex-start;
  }
  .feedback-msg {
    margin-top: 14px;
    padding: 12px 16px;
  }
  /* 修正答案操作条 - 移动端紧凑布局，避免内容溢出 */
  .correct-bar {
    margin-top: 10px;
    padding: 10px 12px;
    gap: 8px;
  }
  .correct-bar-label { font-size: 13px; }
  .correct-bar .correct-opt {
    min-width: 40px;
    padding: 8px 10px;
  }
}

/* ===== 答案人工修正功能 ===== */
.correct-trigger-row {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.correct-trigger-btn { font-size: 13px; }
.correct-trigger-btn.corrected {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-bg);
}
.correct-trigger-btn.corrected:hover {
  background: var(--success);
  color: #fff;
}

.correct-bar {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.correct-bar-label {
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}
.correct-bar-opts {
  display: flex;
  gap: 8px;
}
.correct-bar .correct-opt {
  min-width: 44px;
  justify-content: center;
  transition: all 0.15s ease;
}
.correct-bar .correct-opt:hover {
  border-color: var(--success);
  color: var(--success);
}
.correct-bar .correct-opt.selected {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 2px 6px rgba(5,150,105,0.3);
}

/* 已校对 / 存疑 标签 */
.corrected-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}
.doubtful-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

/* 错题本修正入口 */
.wrong-item-correct {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wrong-correct-trigger { font-size: 13px; }
.wrong-correct-opts {
  display: flex;
  gap: 8px;
}
.wrong-correct-opts .correct-opt-btn {
  min-width: 40px;
  justify-content: center;
}

/* 结果页批量校对列表 */
.correct-list-wrap {
  margin-top: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}
.correct-list-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.correct-list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.correct-list-item:last-child { border-bottom: none; }
.correct-list-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.correct-list-q {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.5;
}
.correct-list-opts {
  display: flex;
  gap: 8px;
}
.correct-opt-btn {
  min-width: 40px;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.correct-opt-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.correct-opt-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.correct-list-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
