/* CGYD 面试练习 v2 — 4 阶段 UI 样式（与 HTML mockup 完全对齐）
   深色顶栏 + 进度条 + 模式切换 + 波形动画 + 转写框 + 批改结果。 */
:root {
  --bg: #f5f7fa;
  --line: rgba(15,23,42,0.084);
  --line2: rgba(15,23,42,0.098);
  --line3: rgba(15,23,42,0.168);
  --card: rgba(15,23,42,0.042);
  --card2: rgba(15,23,42,0.08);
  --fg: #1e293b;
  --fg2: #6b7280;
  --fg3: #6b7280;
  --fg4: #475569;
  --accent: #2563eb;
  --accent2: #2563eb;
  --accent-deep: #2563eb;
  --ok: #059669;
  --warn: #dc2626;
  --shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.iv-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--line);
}
.iv-topnav .brand {
  font-size: 17px;
  font-weight: 700;
  color:#1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.iv-topnav .brand span { color: var(--accent); }
.iv-nav-links { display: flex; gap: 28px; list-style: none; }
.iv-nav-links a {
  text-decoration: none;
  color: var(--fg2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.iv-nav-links a:hover,
.iv-nav-links a.active { color:#2563eb; }
.iv-user-btn {
  padding: 5px 16px;
  border: 1px solid var(--line3);
  border-radius: 20px;
  font-size: 13px;
  color: var(--fg2);
  background: transparent;
  text-decoration: none;
}

/* ===== 容器 ===== */
.iv-container { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }

.iv-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg2);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.iv-back-btn:hover { color: var(--accent2); }

/* ===== 子分类 tabs ===== */
.iv-sub-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.iv-sub-tab {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--fg2);
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.iv-sub-tab:hover { color: var(--fg); border-color: var(--accent); }
.iv-sub-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #1e293b;
  box-shadow: var(--shadow);
}

/* ===== 进度条 ===== */
.iv-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
}
.iv-progress-bar::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.iv-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex: 1;
}
.iv-step .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8ecf2;
  border: 2px solid rgba(15,23,42,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--fg3);
  font-weight: 600;
  transition: all 0.3s;
}
.iv-step.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #1e293b;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.iv-step.done .dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #1e293b;
}
.iv-step .label { font-size: 12px; color: var(--fg3); }
.iv-step.active .label { color: var(--accent2); }
.iv-step.done .label { color: var(--ok); }

/* ===== 卡片 ===== */
.iv-card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.iv-card.question .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent2);
  background: rgba(59, 130, 246, 0.12);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.iv-card.question .q-title {
  font-size: 17px;
  font-weight: 600;
  color:#1e293b;
  line-height: 1.6;
  margin-bottom: 16px;
}
.iv-card.question .q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fg3);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.iv-card.action .action-title {
  font-size: 15px;
  font-weight: 600;
  color:#1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.iv-card.action .action-hint {
  font-size: 14px;
  color: var(--fg2);
  margin-bottom: 16px;
}

/* ===== 模式切换 ===== */
.iv-mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--card2);
  padding: 4px;
  border-radius: 10px;
}
.iv-mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--fg3);
  transition: all 0.2s;
}
.iv-mode-btn.active {
  background: var(--accent);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ===== 计时器 ===== */
.iv-timer { text-align: center; padding: 16px 0; }
.iv-timer .time {
  font-size: 48px;
  font-weight: 800;
  color:#1e293b;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.iv-timer .hint { font-size: 13px; color: var(--fg3); margin-top: 4px; }
.iv-timer .hint.recording { color: var(--warn); }

/* ===== 波形 ===== */
.iv-waveform {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin: 12px 0;
}
.iv-waveform .bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: iv-wave 1.2s ease-in-out infinite;
}
.iv-waveform .bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.iv-waveform .bar:nth-child(2) { height: 24px; animation-delay: 0.1s; }
.iv-waveform .bar:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.iv-waveform .bar:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.iv-waveform .bar:nth-child(5) { height: 28px; animation-delay: 0.4s; }
.iv-waveform .bar:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.iv-waveform .bar:nth-child(7) { height: 24px; animation-delay: 0.6s; }
@keyframes iv-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ===== 按钮 ===== */
.iv-btn-group { display: flex; gap: 10px; margin-top: 16px; }
.iv-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}
.iv-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #1e293b;
  box-shadow: var(--shadow);
}
.iv-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.iv-btn-outline { background: rgba(59, 130, 246, 0.12); color: var(--accent2); border: 1px solid rgba(59, 130, 246, 0.3); }
.iv-btn-outline:hover { background: rgba(59, 130, 246, 0.2); }
.iv-btn-ghost { background: rgba(15,23,42,0.07); color: var(--fg2); border: 1px solid rgba(15,23,42,0.112); }
.iv-btn-ghost:hover { background: rgba(15,23,42,0.112); color: var(--fg); }
.iv-btn-danger { background: rgba(239, 68, 68, 0.12); color: var(--warn); border: 1px solid rgba(239, 68, 68, 0.3); }
.iv-btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* ===== 转写框 ===== */
.iv-transcript {
  width: 100%;
  min-height: 160px;
  background: var(--card2);
  border: 1px solid rgba(15,23,42,0.112);
  border-radius: 10px;
  padding: 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
}
.iv-transcript:focus { outline: none; border-color: rgba(59, 130, 246, 0.5); }
.iv-transcript::placeholder { color: var(--fg4); }

.transcript-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--fg3);
  margin-top: 8px;
}
.transcript-meta .interim { color: var(--accent2); font-style: italic; }

/* ===== 上传区 ===== */
.iv-upload-area {
  border: 1.5px dashed rgba(15,23,42,0.168);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.iv-upload-area:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.03);
}
.iv-upload-area .icon { font-size: 24px; margin-bottom: 6px; }
.iv-upload-area .text { font-size: 13px; color: var(--fg2); }
.iv-upload-area .hint { font-size: 12px; color: var(--fg4); margin-top: 4px; }

/* ===== 批改结果 ===== */
.iv-card.result {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.iv-score-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.iv-card.result .score { font-size: 42px; font-weight: 800; color: var(--ok); }
.iv-card.result .unit { font-size: 16px; color: var(--fg3); }
.iv-card.result .desc { font-size: 13px; color: var(--fg2); margin-left: 4px; }
.iv-point-list { list-style: none; }
.iv-point-list li {
  padding: 8px 0;
  font-size: 14px;
  color: #475569;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(15,23,42,0.07);
}
.iv-point-list li:last-child { border-bottom: none; }
.iv-point-list .icon-ok { color: var(--ok); }
.iv-point-list .icon-miss { color: var(--warn); }
.iv-point-list .icon-tip { color: var(--accent2); }

/* ===== 杂 ===== */
.iv-empty { text-align: center; padding: 60px 20px; color: var(--fg3); }
.hidden { display: none !important; }
.mode-hint { font-size: 12px; color: var(--fg4); margin-top: 12px; }
.cgyd-img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; display: block; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .iv-topnav { padding: 0 16px; height: 52px; }
  .iv-nav-links { display: none; }
  .iv-container { padding: 16px 14px 40px; }

  .iv-step .label { font-size: 11px; }
  .iv-step .dot { width: 24px; height: 24px; font-size: 11px; }

  .iv-card { padding: 18px 16px; }
  .iv-card.question .q-title { font-size: 15px; }
  .iv-timer .time { font-size: 36px; }
  .iv-btn-group { flex-direction: column; }
  .iv-card.result .score { font-size: 34px; }
}
/* ===== B8/B9 移动端优化（v20260918）：录音大按钮 / 触达区 / 纵向确认 ===== */
@media (max-width: 768px) {
  /* B8 录音按钮：手机上做到拇指友好大按钮 */
  #iv-record-btn {
    min-height: 64px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 16px 20px;
    border-radius: 14px;
  }
  #iv-record-btn:active { transform: scale(.98); }
  /* 阶段2 的主按钮组也放大（开始口述 / 跳过录音） */
  #iv-auto-pane .iv-btn { min-height: 52px; font-size: 15px; }
  /* 麦克风权限提示：默认隐藏，JS 检测到不支持/被拒时显示 */
  .iv-mic-hint {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
  }
  .iv-mic-hint.show { display: block; }
  /* B9 纵向排列兜底：小屏强制纵向、选项卡不溢出 */
  .iv-btn-group { flex-direction: column; }
  .iv-btn { min-height: 48px; }
  .iv-mode-switch { flex-wrap: nowrap; }
  .iv-sub-tab { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .iv-q-title-wrap { word-break: break-word; overflow-wrap: anywhere; }
}
/* 桌面端麦克风提示也保留样式（隐藏，由 JS 控制显示） */
.iv-mic-hint {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
}
.iv-mic-hint.show { display: block; }

/* ===== v20260918: 已做进度条 + 题号宫格 ===== */
.iv-done-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #ffffff; border: 1px solid rgba(15,23,42,0.084); border-radius: 12px; padding: 10px 16px; margin: 14px 0 0; font-size: 13px; color: #6b7280; }
.iv-done-bar b { color: #16a34a; }
.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; background: #ffffff; border: 1px solid rgba(15,23,42,0.084); border-radius: 12px; padding: 12px; margin: 10px 0 18px; }
.iv-cell { height: 34px; border-radius: 8px; border: 1px solid rgba(15,23,42,0.112); background: #eef2f7; color: #6b7280; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; font-family: inherit; }
.iv-cell:hover { border-color: #2563eb; color: #1e293b; }
.iv-cell.done { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); color: #16a34a; }
.iv-cell.cur { border-color: #2563eb; color: #1e293b; background: rgba(59,130,246,.25); font-weight: 700; box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
@media (max-width: 768px) {
  .iv-done-bar { font-size: 12px; padding: 9px 12px; }
  .iv-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; padding: 10px; }
  .iv-cell { height: 32px; font-size: 12px; }
}

/* ===== v20260918: D23 示范作答 / D24 听题（朗读）样式 ===== */
.iv-answer-toggle {
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .2s;
}
.iv-answer-toggle:hover { background: rgba(59, 130, 246, 0.14); }
.iv-answer-toggle:active { transform: scale(.995); }
.iv-answer-toggle .arr { display: inline-block; margin-left: 6px; transition: transform .2s; }
.iv-answer-toggle.open .arr { transform: rotate(90deg); }
.iv-answer-body {
  margin-top: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: #475569;
  background: #eef2f7;
  border: 1px solid rgba(15,23,42,0.084);
  border-radius: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.iv-answer-body .lbl {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 6px;
}
.iv-tts-btn {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.iv-tts-btn:hover { background: rgba(99, 102, 241, 0.18); }
.iv-tts-btn.playing { color: #b91c1c; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }

/* ===== 深色模式: 跟随系统（原深色主题全量保留） ===== */
@media (prefers-color-scheme: dark){/* CGYD 面试练习 v2 — 4 阶段 UI 样式（与 HTML mockup 完全对齐）
   深色顶栏 + 进度条 + 模式切换 + 波形动画 + 转写框 + 批改结果。 */
:root {
  --bg: #0b1120;
  --line: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.07);
  --line3: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.03);
  --card2: rgba(0, 0, 0, 0.2);
  --fg: #e2e8f0;
  --fg2: #94a3b8;
  --fg3: #64748b;
  --fg4: #475569;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --accent-deep: #2563eb;
  --ok: #10b981;
  --warn: #f87171;
  --shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.iv-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--line);
}
.iv-topnav .brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.iv-topnav .brand span { color: var(--accent); }
.iv-nav-links { display: flex; gap: 28px; list-style: none; }
.iv-nav-links a {
  text-decoration: none;
  color: var(--fg2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.iv-nav-links a:hover,
.iv-nav-links a.active { color: #fff; }
.iv-user-btn {
  padding: 5px 16px;
  border: 1px solid var(--line3);
  border-radius: 20px;
  font-size: 13px;
  color: var(--fg2);
  background: transparent;
  text-decoration: none;
}

/* ===== 容器 ===== */
.iv-container { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }

.iv-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg2);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.iv-back-btn:hover { color: var(--accent2); }

/* ===== 子分类 tabs ===== */
.iv-sub-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.iv-sub-tab {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--fg2);
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.iv-sub-tab:hover { color: var(--fg); border-color: var(--accent); }
.iv-sub-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow);
}

/* ===== 进度条 ===== */
.iv-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
}
.iv-progress-bar::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.iv-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex: 1;
}
.iv-step .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--fg3);
  font-weight: 600;
  transition: all 0.3s;
}
.iv-step.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.iv-step.done .dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.iv-step .label { font-size: 12px; color: var(--fg3); }
.iv-step.active .label { color: var(--accent2); }
.iv-step.done .label { color: var(--ok); }

/* ===== 卡片 ===== */
.iv-card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.iv-card.question .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent2);
  background: rgba(59, 130, 246, 0.12);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.iv-card.question .q-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 16px;
}
.iv-card.question .q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fg3);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.iv-card.action .action-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.iv-card.action .action-hint {
  font-size: 14px;
  color: var(--fg2);
  margin-bottom: 16px;
}

/* ===== 模式切换 ===== */
.iv-mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--card2);
  padding: 4px;
  border-radius: 10px;
}
.iv-mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--fg3);
  transition: all 0.2s;
}
.iv-mode-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ===== 计时器 ===== */
.iv-timer { text-align: center; padding: 16px 0; }
.iv-timer .time {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.iv-timer .hint { font-size: 13px; color: var(--fg3); margin-top: 4px; }
.iv-timer .hint.recording { color: var(--warn); }

/* ===== 波形 ===== */
.iv-waveform {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin: 12px 0;
}
.iv-waveform .bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: iv-wave 1.2s ease-in-out infinite;
}
.iv-waveform .bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.iv-waveform .bar:nth-child(2) { height: 24px; animation-delay: 0.1s; }
.iv-waveform .bar:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.iv-waveform .bar:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.iv-waveform .bar:nth-child(5) { height: 28px; animation-delay: 0.4s; }
.iv-waveform .bar:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.iv-waveform .bar:nth-child(7) { height: 24px; animation-delay: 0.6s; }
@keyframes iv-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ===== 按钮 ===== */
.iv-btn-group { display: flex; gap: 10px; margin-top: 16px; }
.iv-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}
.iv-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: var(--shadow);
}
.iv-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.iv-btn-outline { background: rgba(59, 130, 246, 0.12); color: var(--accent2); border: 1px solid rgba(59, 130, 246, 0.3); }
.iv-btn-outline:hover { background: rgba(59, 130, 246, 0.2); }
.iv-btn-ghost { background: rgba(255, 255, 255, 0.05); color: var(--fg2); border: 1px solid rgba(255, 255, 255, 0.08); }
.iv-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.iv-btn-danger { background: rgba(239, 68, 68, 0.12); color: var(--warn); border: 1px solid rgba(239, 68, 68, 0.3); }
.iv-btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* ===== 转写框 ===== */
.iv-transcript {
  width: 100%;
  min-height: 160px;
  background: var(--card2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
}
.iv-transcript:focus { outline: none; border-color: rgba(59, 130, 246, 0.5); }
.iv-transcript::placeholder { color: var(--fg4); }

.transcript-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--fg3);
  margin-top: 8px;
}
.transcript-meta .interim { color: var(--accent2); font-style: italic; }

/* ===== 上传区 ===== */
.iv-upload-area {
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.iv-upload-area:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.03);
}
.iv-upload-area .icon { font-size: 24px; margin-bottom: 6px; }
.iv-upload-area .text { font-size: 13px; color: var(--fg2); }
.iv-upload-area .hint { font-size: 12px; color: var(--fg4); margin-top: 4px; }

/* ===== 批改结果 ===== */
.iv-card.result {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.iv-score-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.iv-card.result .score { font-size: 42px; font-weight: 800; color: var(--ok); }
.iv-card.result .unit { font-size: 16px; color: var(--fg3); }
.iv-card.result .desc { font-size: 13px; color: var(--fg2); margin-left: 4px; }
.iv-point-list { list-style: none; }
.iv-point-list li {
  padding: 8px 0;
  font-size: 14px;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.iv-point-list li:last-child { border-bottom: none; }
.iv-point-list .icon-ok { color: var(--ok); }
.iv-point-list .icon-miss { color: var(--warn); }
.iv-point-list .icon-tip { color: var(--accent2); }

/* ===== 杂 ===== */
.iv-empty { text-align: center; padding: 60px 20px; color: var(--fg3); }
.hidden { display: none !important; }
.mode-hint { font-size: 12px; color: var(--fg4); margin-top: 12px; }
.cgyd-img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; display: block; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .iv-topnav { padding: 0 16px; height: 52px; }
  .iv-nav-links { display: none; }
  .iv-container { padding: 16px 14px 40px; }

  .iv-step .label { font-size: 11px; }
  .iv-step .dot { width: 24px; height: 24px; font-size: 11px; }

  .iv-card { padding: 18px 16px; }
  .iv-card.question .q-title { font-size: 15px; }
  .iv-timer .time { font-size: 36px; }
  .iv-btn-group { flex-direction: column; }
  .iv-card.result .score { font-size: 34px; }
}
/* ===== B8/B9 移动端优化（v20260918）：录音大按钮 / 触达区 / 纵向确认 ===== */
@media (max-width: 768px) {
  /* B8 录音按钮：手机上做到拇指友好大按钮 */
  #iv-record-btn {
    min-height: 64px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 16px 20px;
    border-radius: 14px;
  }
  #iv-record-btn:active { transform: scale(.98); }
  /* 阶段2 的主按钮组也放大（开始口述 / 跳过录音） */
  #iv-auto-pane .iv-btn { min-height: 52px; font-size: 15px; }
  /* 麦克风权限提示：默认隐藏，JS 检测到不支持/被拒时显示 */
  .iv-mic-hint {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
  }
  .iv-mic-hint.show { display: block; }
  /* B9 纵向排列兜底：小屏强制纵向、选项卡不溢出 */
  .iv-btn-group { flex-direction: column; }
  .iv-btn { min-height: 48px; }
  .iv-mode-switch { flex-wrap: nowrap; }
  .iv-sub-tab { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .iv-q-title-wrap { word-break: break-word; overflow-wrap: anywhere; }
}
/* 桌面端麦克风提示也保留样式（隐藏，由 JS 控制显示） */
.iv-mic-hint {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
}
.iv-mic-hint.show { display: block; }

/* ===== v20260918: 已做进度条 + 题号宫格 ===== */
.iv-done-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #161b27; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 10px 16px; margin: 14px 0 0; font-size: 13px; color: #94a3b8; }
.iv-done-bar b { color: #22c55e; }
.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; background: #161b27; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 12px; margin: 10px 0 18px; }
.iv-cell { height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); background: #0f172a; color: #94a3b8; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; font-family: inherit; }
.iv-cell:hover { border-color: #3b82f6; color: #e2e8f0; }
.iv-cell.done { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); color: #22c55e; }
.iv-cell.cur { border-color: #3b82f6; color: #fff; background: rgba(59,130,246,.25); font-weight: 700; box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
@media (max-width: 768px) {
  .iv-done-bar { font-size: 12px; padding: 9px 12px; }
  .iv-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; padding: 10px; }
  .iv-cell { height: 32px; font-size: 12px; }
}

/* ===== v20260918: D23 示范作答 / D24 听题（朗读）样式 ===== */
.iv-answer-toggle {
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .2s;
}
.iv-answer-toggle:hover { background: rgba(59, 130, 246, 0.14); }
.iv-answer-toggle:active { transform: scale(.995); }
.iv-answer-toggle .arr { display: inline-block; margin-left: 6px; transition: transform .2s; }
.iv-answer-toggle.open .arr { transform: rotate(90deg); }
.iv-answer-body {
  margin-top: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: #cbd5e1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.iv-answer-body .lbl {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 6px;
}
.iv-tts-btn {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.iv-tts-btn:hover { background: rgba(99, 102, 241, 0.18); }
.iv-tts-btn.playing { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
}
