/* ========================================
   元认知训练器 - 样式表
   ========================================
   改颜色：看 :root 里的变量
   改布局：看 .screen 和 .card
   改按钮：看 .btn 系列
   ======================================== */

/* ---- 颜色变量（改这里就能换主题色） ---- */
:root {
  --accent: #2d8b6e;      /* 主色 - 绿 */
  --accent2: #e8754a;     /* 辅色 - 橙 */
  --hell: #c44d3e;        /* 地狱模式 - 红 */
  --light: #4a90d9;       /* 轻量模式 - 蓝（暂时没用） */
  --bg: #f5f9f6;          /* 页面背景 */
  --card-bg: #ffffff;     /* 卡片背景 */
  --ink: #182926;         /* 正文颜色 */
  --muted: #6a7d77;       /* 次要文字 */
  --rule: #dfe8e4;        /* 边框颜色 */
  --error-bg: #fdf0ee;    /* 错误提示背景 */
  --success-bg: #eef7f3;  /* 成功提示背景 */
  --warning: #eaa53a;     /* 警告/提醒色 */
}

/* ---- 基础重置 ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

/* ---- 页面容器（手机宽度居中） ---- */
#app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 16px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* ---- 屏幕：每个页面的外层包裹 ---- */
.screen {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- 顶部 Logo 和标题 ---- */
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 8px;
  color: var(--ink);
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* ---- 卡片 ---- */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

/* ---- 题目卡片 ---- */
.question-card {
  background: var(--success-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 20px;
}

.question-card .label {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.question-card .text {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- 答案展示 ---- */
.answer-box {
  background: var(--success-bg);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 20px;
}

.answer-box .label {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.answer-box .text {
  font-size: 1rem;
  font-weight: 600;
  font-family: "Cambria Math", "Times New Roman", serif;
}

/* ---- 按钮 ---- */
.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-secondary {
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.btn-hell {
  background: var(--hell);
  color: #fff;
}

.btn-small {
  padding: 10px 14px;
  font-size: 0.85rem;
  width: auto;
  display: inline-block;
}

/* ---- 文本输入框 ---- */
.text-input {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--rule);
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.text-input:focus {
  outline: none;
  border-color: var(--hell);
}

/* ---- 知识点选项按钮（选 B 时用） ---- */
.option-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: 2px solid var(--rule);
  border-radius: 12px;
  background: var(--card-bg);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
  text-align: left;
  font-family: inherit;
}

.option-btn:hover {
  border-color: var(--hell);
}

.option-btn .opt-label {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.option-btn .opt-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

/* 已排除的选项（置灰） */
.option-btn.greyed {
  opacity: 0.4;
  border-style: dashed;
  pointer-events: none;
  text-decoration: line-through;
}

/* 选对的选项 */
.option-btn.correct {
  border-color: var(--accent);
  background: var(--success-bg);
}

/* ---- 反馈框 ---- */
.feedback {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.feedback.match {
  background: var(--success-bg);
  border: 1px solid var(--accent);
}

.feedback.mismatch {
  background: var(--error-bg);
  border: 1px solid var(--hell);
}

.feedback .fb-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.feedback.match .fb-title { color: var(--accent); }
.feedback.mismatch .fb-title { color: var(--hell); }

/* ---- 状态栏（显示进度） ---- */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.status-bar .mode-tag {
  background: var(--error-bg);
  color: var(--hell);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.72rem;
}

/* 轻量模式标签（绿色） */
.status-bar .mode-tag.light {
  background: var(--success-bg);
  color: var(--accent);
}

/* 变体回顾标签（橙色） */
.status-bar .variant-tag {
  background: #fff0e8;
  color: var(--accent2);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.72rem;
  margin-left: 4px;
}

/* ---- AI 状态提示 ---- */
.ai-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--rule);
}

/* ---- 分隔线 ---- */
.divider {
  height: 1px;
  background: var(--rule);
  margin: 20px 0;
  border: none;
}

/* ---- 提示文字 ---- */
.hint-text {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
}

/* ---- 柔和提醒（防偷懒用，语气软） ---- */
.soft-reminder {
  background: #fff8f0;
  border: 1px solid #f0d8b8;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: #8a6a3a;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.soft-reminder .reminder-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.soft-reminder .btn-soft {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.soft-reminder .btn-soft-primary {
  background: #f0d8b8;
  color: #6a4a1a;
}

.soft-reminder .btn-soft-secondary {
  background: transparent;
  color: #8a6a3a;
  border: 1px solid #f0d8b8;
}

/* ---- 结束屏统计 ---- */
.stats {
  text-align: center;
}

.stats .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}

.stats .stat-row:last-child {
  border-bottom: none;
}

.stats .stat-value {
  font-weight: 700;
  color: var(--accent);
}

/* ---- 鼓励语 ---- */
.encouragement {
  text-align: center;
  font-size: 0.92rem;
  color: var(--accent);
  margin: 16px 0 20px;
  line-height: 1.6;
  font-weight: 500;
}

/* ---- 休息提醒 ---- */
.rest-reminder {
  background: #f0f4ff;
  border: 1px solid #c8d8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.rest-reminder .rest-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.rest-reminder .rest-text {
  font-size: 0.86rem;
  color: #4a5a8a;
  line-height: 1.6;
}

/* ========================================
   错题本 & 错题详情
   ======================================== */

/* 错题列表项 */
.wrong-item {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.wrong-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wrong-item:active {
  transform: scale(0.99);
}

.wrong-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wrong-item-topic {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wrong-item-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--error-bg);
  color: var(--hell);
}

.wrong-item-question {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 6px;
}

.wrong-item-date {
  font-size: 0.72rem;
  color: var(--muted);
}

/* 答题历史 */
.history-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.history-item:last-child {
  border-bottom: none;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.history-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.history-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.history-tag.match {
  background: var(--success-bg);
  color: var(--accent);
}

.history-tag.mismatch {
  background: var(--error-bg);
  color: var(--hell);
}

.history-answer {
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.5;
}

/* ========================================
   认知缺陷地图
   ======================================== */

/* 顶部统计 */
.map-summary {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.map-stat {
  flex: 1;
}

.map-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.map-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* 知识点条形图 */
.map-bar-item {
  margin-bottom: 16px;
}

.map-bar-item:last-child {
  margin-bottom: 0;
}

.map-bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.map-bar-topic {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.map-bar-count {
  font-size: 0.74rem;
  color: var(--muted);
}

.map-bar-track {
  width: 100%;
  height: 10px;
  background: var(--rule);
  border-radius: 100px;
  overflow: hidden;
}

.map-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.5s ease;
}

.map-bar-fill.normal {
  background: var(--accent);
}

.map-bar-fill.high {
  background: var(--hell);
}

/* ========================================
   AI 加载 & AI 分析框
   ======================================== */

/* AI 分析加载屏 */
.ai-loading {
  text-align: center;
  padding: 80px 20px;
}

.ai-loading p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* 旋转加载动画 */
.ai-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* AI 个性化分析框（反馈页展示） */
.ai-analysis-box {
  background: #f0f4ff;
  border: 1px solid #c8d8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #3a4a6a;
  animation: fadeIn 0.3s ease;
}

.ai-analysis-box .ai-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #5a6a9a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* ========================================
   题库管理 & 掌握度追踪样式
   ======================================== */

/* 题库统计网格 */
.bank-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.bank-stat-item {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg);
  border-radius: 10px;
}

.bank-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.bank-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* 设置行（开关 + 文字） */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* 开关按钮 */
.toggle-btn {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  background: #ccc;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-btn.on {
  background: var(--accent);
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-btn.on .toggle-knob {
  transform: translateX(20px);
}

/* 掌握度祝贺横幅 */
.mastery-celebrate {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #eef7f3, #f0f4ff);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  animation: fadeIn 0.4s ease;
}

.mastery-celebrate-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.mastery-celebrate-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink);
}

/* 掌握度详情列表 */
.mastery-item {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.mastery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mastery-topic {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.mastery-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
}

.mastery-badge.mastered {
  background: var(--success-bg);
  color: var(--accent);
}

.mastery-badge.progress {
  background: #fff4ed;
  color: var(--accent2);
}

.mastery-stats {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.mastery-progress {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mastery-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mastery-progress-fill.mastered {
  background: var(--accent);
}

.mastery-progress-fill.progress {
  background: var(--accent2);
}

.mastery-action {
  display: flex;
  justify-content: flex-end;
}

/* ========================================
   响应式适配
   ======================================== */

/* 小屏手机（< 360px） */
@media (max-width: 359px) {
  #app {
    padding: 16px 12px;
  }

  .logo {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.82rem;
    margin-bottom: 30px;
  }

  .card {
    padding: 18px 14px;
  }

  .card h2 {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .question-card {
    padding: 14px 12px;
  }

  .question-card .text {
    font-size: 0.88rem;
  }

  .text-input {
    padding: 12px;
    font-size: 0.86rem;
    min-height: 70px;
  }

  .option-btn {
    padding: 14px 12px;
    font-size: 0.86rem;
  }

  .bank-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .bank-stat-num {
    font-size: 1.3rem;
  }

  .status-bar {
    font-size: 0.74rem;
  }
}

/* 平板及以上（>= 768px）：限制最大宽度，居中显示 */
@media (min-width: 768px) {
  #app {
    max-width: 480px;
    padding: 32px 24px;
  }

  .logo {
    font-size: 1.8rem;
    margin-top: 60px;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a2e;
    --card-bg: #16213e;
    --ink: #e0e0e0;
    --muted: #8899aa;
    --rule: #2a3a5c;
    --error-bg: #2a1a1a;
    --success-bg: #1a2a1a;
  }
}

/* ========================================
   首次使用引导
   ======================================== */

.onboard-screen {
  text-align: center;
}

.onboard-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: onboardBounce 0.6s ease;
}

@keyframes onboardBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.onboard-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.onboard-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 30px;
}

.onboard-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.onboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  transition: all 0.3s;
}

.onboard-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ========================================
   难度选择
   ======================================== */

.difficulty-card {
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  width: 100%;
  display: block;
}

.difficulty-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.difficulty-card:active {
  transform: scale(0.98);
}

.difficulty-card.selected {
  border-color: var(--accent);
  background: var(--success-bg);
}

.difficulty-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.difficulty-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.difficulty-card-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.difficulty-card-badge.easy {
  background: var(--success-bg);
  color: var(--accent);
}

.difficulty-card-badge.medium {
  background: #fff4ed;
  color: var(--accent2);
}

.difficulty-card-badge.hard {
  background: var(--error-bg);
  color: var(--hell);
}

.difficulty-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ========================================
   AI 离线模式提示
   ======================================== */

.ai-offline-hint {
  background: #fff8f0;
  border: 1px solid #f0d8b8;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: #8a6a3a;
  text-align: center;
  line-height: 1.5;
}

.ai-offline-hint strong {
  color: #6a4a1a;
}

/* ========================================
   解题过程输入 & 过程步骤展示
   ======================================== */

/* 过程输入区（做题页底部，选填） */
.process-section {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.process-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.process-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.process-input {
  min-height: 60px;
  font-size: 0.88rem;
}

/* 图片预览 */
.process-image-preview {
  position: relative;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.process-image-preview img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: cover;
}

.process-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-upload-btn {
  margin-top: 4px;
}

/* 过程步骤展示（反馈页用，展示用户自己的步骤+高亮错步） */
.process-steps-display {
  margin-bottom: 16px;
}

.process-step-display {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.process-step-display.wrong {
  border-color: var(--hell);
  background: var(--error-bg);
}

.process-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.process-step-display.wrong .process-step-num {
  background: var(--hell);
  color: #fff;
}

.process-step-desc {
  flex: 1;
  color: var(--ink);
}

.process-step-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--hell);
  color: #fff;
}

/* ---- AI 降级提示 ---- */
.ai-degrade-notice {
  background: rgba(234, 165, 58, 0.1);
  border: 1px solid var(--warning);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: #8a5a00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-retry {
  background: var(--warning);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-retry:active {
  opacity: 0.8;
}

/* ---- 文字按钮（报告问题等） ---- */
.btn-text {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px;
  font-size: 0.8rem;
  width: 100%;
  cursor: pointer;
  margin-top: 4px;
}

.btn-text:active {
  color: var(--accent);
}
