/**
 * IELTS Atlas - 全科专属备考工作站样式套件
 * 完美适配 NewJeans 极光微光模式 & ASCII 墨染字花模式
 */

/* ========================================================
   1. 通用布局与头部小组件
   ======================================================== */
.suite-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.suite-subnav {
  display: inline-flex;
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(255, 255, 255, 0.4));
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.suite-subnav-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hero-text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

.suite-subnav-btn:hover {
  color: var(--hero-text, #0f172a);
  background: rgba(0, 0, 0, 0.04);
}

.suite-subnav-btn.active {
  background: var(--hero-primary, #0ea5e9);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* ========================================================
   2. 口语工坊 (Speaking View)
   ======================================================== */
.speaking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.speaking-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.speaking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.speaking-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.speaking-badge.new {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.speaking-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--hero-text, #0f172a);
  margin-bottom: 4px;
}

.speaking-subtitle {
  font-size: 13px;
  color: var(--hero-text-muted, #64748b);
  margin-bottom: 12px;
}

.speaking-question-list {
  margin: 0 0 16px 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--hero-text, #334155);
}

.speaking-question-list li {
  margin-bottom: 6px;
}

.speaking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

/* 口语全真抽题模拟器面板 */
.speaking-simulator-panel {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
}

.simulator-timer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hero-card-bg, #ffffff);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 16px 0;
  border: 1px solid var(--hero-border, #e2e8f0);
}

.simulator-timer-val {
  font-size: 32px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #0ea5e9;
  letter-spacing: 2px;
}

.simulator-timer-val.warning {
  color: #f59e0b;
  animation: pulse 1s infinite;
}

.simulator-timer-val.danger {
  color: #ef4444;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ========================================================
   3. 写作工坊 (Writing View)
   ======================================================== */
.writing-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .writing-layout {
    grid-template-columns: 1fr;
  }
}

.writing-prompt-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.writing-editor-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.writing-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  margin-bottom: 14px;
}

.writing-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.writing-stat-badge.ready {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.writing-textarea {
  width: 100%;
  height: 460px;
  border: 1px solid var(--hero-border, #cbd5e1);
  border-radius: 10px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--hero-text, #1e293b);
  background: var(--hero-input-bg, #ffffff);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.writing-textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* 写作预测题库与范文卡片 */
.writing-prompt-previews {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 10px;
}

.writing-preview-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.writing-preview-item:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: #0ea5e9;
}

.writing-preview-item.active {
  border-color: #0ea5e9 !important;
  background: rgba(14, 165, 233, 0.08) !important;
  box-shadow: 0 0 0 1px #0ea5e9;
}

/* 写作图表自适应与暗色适配 */
.writing-chart-container {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cbt-chart-box {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.cbt-chart-box svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 高分范文精读双栏布局 */
.writing-model-reading-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .writing-model-reading-layout {
    flex-direction: column;
  }
  .writing-model-reading-layout .writing-prompt-card {
    max-width: 100% !important;
    width: 100%;
  }
}

.writing-model-content-card {
  min-width: 0;
  width: 100%;
}

.model-analysis-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.model-analysis-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 顾家北 100 句独立翻译工坊卡片 */
.translation-engine-card {
  width: 100%;
  margin-top: 10px;
}

/* ========================================================
   流式行内单词下划线打字机 (Qwerty-Learner 答题形式)
   ======================================================== */
.qwerty-typing-wrapper {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.qwerty-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  top: 0;
  left: 0;
  border: none;
}

.qwerty-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.qwerty-mode-group {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 10px;
}

.qwerty-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hero-text, #334155);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qwerty-mode-btn.active {
  background: var(--hero-primary, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.qwerty-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
  border: 1px solid var(--hero-border, #e2e8f0);
  color: var(--hero-text);
}

.qwerty-typing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 32px 32px 32px;
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.85));
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  min-height: 380px;
  position: relative;
  cursor: text;
}

.qwerty-cn-prompt {
  font-size: 24px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
  line-height: 1.6;
  margin: 16px 0 36px 0;
  text-align: center;
  max-width: 820px;
  letter-spacing: 0.3px;
}

.qwerty-stage-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 14px 16px;
  max-width: 860px;
  margin: 0 auto 32px auto;
  font-family: ui-monospace, "SF Mono", "Fira Code", Menlo, monospace;
}

.qwerty-word-slot {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  padding: 4px 6px;
  font-size: 22px;
  font-weight: 600;
  min-width: 32px;
  transition: all 0.2s ease;
  user-select: none;
}

.qwerty-word-slot.fixed-word {
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  color: var(--hero-text, #334155);
  opacity: 0.85;
}

.qwerty-word-slot.target-word {
  border-bottom: 2.5px dashed #94a3b8;
  color: #64748b;
  cursor: pointer;
}

.qwerty-word-slot.target-word.active-slot {
  border-bottom: 3px solid #8b5cf6 !important;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.25);
  animation: pulseUnderline 1.6s infinite ease-in-out;
}

.qwerty-word-slot.target-word.complete-slot {
  border-bottom: 2.5px solid #10b981 !important;
  color: #10b981;
}

.qwerty-char.typed {
  color: #10b981;
  font-weight: 700;
}

.qwerty-char.cursor-char {
  color: #8b5cf6;
  font-weight: 700;
  animation: blinkCaret 0.9s infinite;
}

.qwerty-char.placeholder-char {
  color: #cbd5e1;
  opacity: 0.6;
}

.qwerty-punct {
  color: var(--hero-text, #334155);
  margin-left: 2px;
  font-weight: normal;
}

@keyframes blinkCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

@keyframes pulseUnderline {
  0%, 100% { border-bottom-color: #8b5cf6; }
  50% { border-bottom-color: #c084fc; }
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

.error-shake {
  animation: shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
  border-bottom-color: #ef4444 !important;
}

.qwerty-shortcuts-bar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--hero-muted, #64748b);
  margin-top: 10px;
}

.qwerty-shortcuts-bar kbd {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--hero-border, #cbd5e1);
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  margin-right: 4px;
}

.qwerty-finished-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeInDown 0.3s ease-out;
}

.qwerty-explanation-panel {
  margin-top: 24px;
  padding: 24px;
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  animation: fadeInDown 0.3s ease-out;
}

@-webkit-keyframes heroSpin {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes heroSpin {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.hero-spinner {
  display: inline-block !important;
  vertical-align: middle !important;
  transform-origin: 50% 50% !important;
  -webkit-transform-origin: 50% 50% !important;
  transform-box: fill-box !important;
  -webkit-animation: heroSpin 0.85s linear infinite !important;
  animation: heroSpin 0.85s linear infinite !important;
}

.hero-spinner-ring {
  display: inline-block !important;
  vertical-align: middle !important;
  width: 22px !important;
  height: 22px !important;
  border: 3px solid rgba(139, 92, 246, 0.2) !important;
  border-top-color: #8b5cf6 !important;
  border-radius: 50% !important;
  -webkit-animation: heroSpin 0.85s linear infinite !important;
  animation: heroSpin 0.85s linear infinite !important;
}

#writing-history-modal-scroll-area::-webkit-scrollbar {
  width: 6px;
}
#writing-history-modal-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}
#writing-history-modal-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.25);
  border-radius: 4px;
}
#writing-history-modal-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.45);
}

/* 写作 AI 智能批改诊断面板 & 六边形雷达图 */
.writing-ai-grade-panel {
  animation: fadeInDown 0.25s ease-out;
  margin-top: 24px;
}

.radar-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--hero-card-bg, #ffffff);
  border-radius: 14px;
  border: 1px solid var(--hero-border, #e2e8f0);
}

.radar-svg {
  max-width: 320px;
  width: 100%;
  height: auto;
  overflow: visible;
}

.radar-axis {
  stroke: var(--hero-border, #cbd5e1);
  stroke-width: 1.2;
  stroke-dasharray: 2, 3;
}

.radar-ring {
  fill: none;
  stroke: var(--hero-border, #e2e8f0);
  stroke-width: 1;
}

.radar-polygon {
  fill: rgba(139, 92, 246, 0.25);
  stroke: #8b5cf6;
  stroke-width: 2.5;
  stroke-linejoin: round;
  transition: all 0.4s ease;
}

.radar-vertex-dot {
  fill: #8b5cf6;
  stroke: #ffffff;
  stroke-width: 2;
  r: 4.5;
  transition: r 0.2s ease;
}
.radar-vertex-dot:hover {
  r: 6.5;
  fill: #7c3aed;
}

.radar-label {
  font-size: 11px;
  font-weight: 700;
  fill: var(--hero-text, #334155);
  text-anchor: middle;
  dominant-baseline: middle;
}

.writing-corrections-box {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.correction-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--hero-border, #e2e8f0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.corr-orig {
  color: #ef4444;
  font-size: 13.5px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.corr-orig del {
  background: rgba(239, 68, 68, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.corr-rev {
  color: #10b981;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.corr-rev mark {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  padding: 2px 6px;
  border-radius: 4px;
}

.corr-reason {
  font-size: 12px;
  color: var(--hero-muted, #64748b);
  line-height: 1.5;
  border-left: 3px solid #8b5cf6;
  padding-left: 8px;
}

/* 写作 AI 智能诊断优雅宽屏排版系统 (彻底解决挤在左侧与大面积空白问题) */
.writing-ai-report-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.writing-ai-top-overview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.writing-ai-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  padding-bottom: 16px;
}

.writing-ai-overview-split {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .writing-ai-overview-split {
    grid-template-columns: 1fr;
  }
}

/* 兼容性保留 */
.writing-ai-columns-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.writing-ai-col-left,
.writing-ai-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 6 维标准逐项拆解卡片：全宽自适应大网格，宽屏 2-3 列，舒展呼吸 */
.writing-ai-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.writing-dimension-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.writing-dimension-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.writing-dimension-card.card-tr {
  border-left: 4px solid #0284c7;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.writing-dimension-card.card-cc {
  border-left: 4px solid #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.writing-dimension-card.card-lr {
  border-left: 4px solid #d97706;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.writing-dimension-card.card-gra {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.writing-dimension-card.card-tone {
  border-left: 4px solid #ec4899;
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.writing-dimension-card.card-mechanics {
  border-left: 4px solid #64748b;
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.03) 0%, var(--hero-card-bg, #ffffff) 100%);
}

.dim-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.dim-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hero-text);
}

.dim-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
}

.badge-tr { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.badge-cc { background: rgba(16, 185, 129, 0.12); color: #059669; }
.badge-lr { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.badge-gra { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.badge-tone { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.badge-mechanics { background: rgba(100, 116, 139, 0.12); color: #475569; }

.dim-card-body {
  font-size: 13px;
  color: var(--hero-text);
  line-height: 1.65;
  word-break: break-word;
}

/* 逐句改错宽版大网格 */
.writing-corrections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.correction-card-spacious {
  padding: 14px 16px;
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.corr-tag-bad {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
  font-weight: bold;
  margin-right: 6px;
}

.corr-tag-good {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #10b981;
  color: #fff;
  font-weight: bold;
  margin-right: 6px;
}

.corr-reason-spacious {
  font-size: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(14, 165, 233, 0.04);
  border-left: 3px solid #0ea5e9;
  border-radius: 6px;
  color: var(--hero-text);
  line-height: 1.5;
}

.writing-corrections-scroll-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 写作题库小格子点选与紧凑芯片 */
.writing-prompt-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 2px;
}

.writing-prompt-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: var(--hero-card-bg, #ffffff);
  color: var(--hero-text, #334155);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  user-select: none;
}

.writing-prompt-chip:hover {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.05);
  color: #0284c7;
}

.writing-prompt-chip.active {
  background: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.writing-prompt-chip.active .chip-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.writing-prompt-chip .chip-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  margin-bottom: 3px;
  width: fit-content;
}

.writing-prompt-chip .chip-title {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 自定义高颜值页面内模态框 (摒弃浏览器自带的丑陋 alert/confirm) */
.custom-inpage-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-inpage-modal-card {
  background: var(--hero-card-bg, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--hero-border, #cbd5e1);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 写作多轮答题时间轴卡片与版本对比样式 */
.writing-attempt-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.writing-attempt-card {
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 12px;
  background: var(--hero-card-bg, #ffffff);
  padding: 16px;
  transition: all 0.2s ease;
}

.writing-attempt-card:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}

.writing-attempt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.writing-attempt-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

.writing-attempt-essay-box {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--hero-text, #1e293b);
  white-space: pre-wrap;
}

.writing-ai-progress-box {
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.04), rgba(139, 92, 246, 0.06));
  border: 1.5px solid #8b5cf6;
  margin-top: 16px;
  animation: fadeIn 0.3s ease-out;
}

.progress-growth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 12px;
  font-weight: 700;
}

/* 顾家北 100 句流线型双向开放式翻译工坊样式 */
.streamlined-trans-wrapper {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.trans-direction-switch {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
}

.trans-dir-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--hero-text, #475569);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trans-dir-btn.active {
  background: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.pure-line-trans-wrapper {
  max-width: 980px;
  margin: 0 auto;
}

.pure-line-mode-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--hero-border, #e2e8f0);
  gap: 4px;
  flex-wrap: wrap;
}

.pure-line-mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hero-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pure-line-mode-btn:hover {
  color: var(--hero-text, #0f172a);
}

.pure-line-mode-btn.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pure-line-stage-card {
  padding: 36px 32px;
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
  margin-top: 16px;
}

/* 彻底消灭框线，实现大气自然居中纯横线作答 */
.trans-cn-prompt {
  font-size: 26px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
  text-align: center;
  margin: 12px auto 32px auto;
  line-height: 1.5;
  letter-spacing: 0.3px;
  max-width: 840px;
}

.trans-pure-line-stage {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trans-line-input-wrap {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trans-pure-line-input {
  width: 100%;
  max-width: 840px;
  padding: 12px 14px 14px 14px;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: var(--hero-text, #0f172a);
  background: transparent !important;
  border: none !important;
  border-bottom: 2.5px solid #94a3b8 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "SF Mono", monospace;
  letter-spacing: 0.3px;
}

.trans-pure-line-input:focus {
  border-bottom: 3.5px solid #0ea5e9 !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.18) !important;
}

.trans-pure-line-input::placeholder {
  color: #94a3b8;
  font-size: 16px;
  font-weight: 400;
  opacity: 0.65;
}

.trans-line-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 840px;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.trans-line-tip {
  font-size: 12px;
  color: var(--hero-muted, #64748b);
}
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.eval-loading-box {
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed #8b5cf6;
  border-radius: 12px;
  margin-top: 20px;
  animation: pulseUnderline 1.6s infinite ease-in-out;
}

.ai-eval-report-card {
  margin-top: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  animation: fadeInDown 0.3s ease-out;
}

.eval-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  margin-bottom: 20px;
}

.eval-match-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.eval-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.three-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.three-tier-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--hero-border, #e2e8f0);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.three-tier-card.user-card {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.3);
}

.three-tier-card.book-card {
  background: rgba(14, 165, 233, 0.03);
  border-color: rgba(14, 165, 233, 0.3);
}

.three-tier-card.better-card {
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.35);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================
   4. 听力专区 (Listening View)
   ======================================================== */
.listening-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.listening-portal-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.listening-portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.listening-tips-section {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.listening-tip-card {
  background: rgba(248, 250, 252, 0.7);
  border-left: 4px solid #0ea5e9;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 14px;
}

/* ========================================================
   5. 官方备考指南 (Guide View)
   ======================================================== */
.rubrics-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid var(--hero-border, #e2e8f0);
}

.rubrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.6;
}

.rubrics-table th {
  background: rgba(14, 165, 233, 0.08);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--hero-text, #0f172a);
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
}

.rubrics-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  color: var(--hero-text, #334155);
}

.rubrics-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* ========================================================
   6. 学习总览全景监控卡片 (Overview Upgrade)
   ======================================================== */
.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.overview-kpi-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(14px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.overview-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #0ea5e9;
}

.overview-kpi-icon {
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.1);
}

.overview-kpi-title {
  font-size: 13px;
  color: var(--hero-text-muted, #64748b);
  margin-bottom: 4px;
}

.overview-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

/* ASCII 墨染字花主题适配微调 */
body[data-bg-theme="ascii-flower"] .speaking-card,
[data-bg-theme="ascii-flower"] .speaking-card,
[data-theme="ascii-flower"] .speaking-card,
body[data-bg-theme="ascii-flower"] .writing-prompt-card,
[data-bg-theme="ascii-flower"] .writing-prompt-card,
body[data-bg-theme="ascii-flower"] .writing-editor-card,
[data-bg-theme="ascii-flower"] .writing-editor-card,
body[data-bg-theme="ascii-flower"] .listening-portal-card,
[data-bg-theme="ascii-flower"] .listening-portal-card,
body[data-bg-theme="ascii-flower"] .listening-tips-section,
[data-bg-theme="ascii-flower"] .listening-tips-section,
body[data-bg-theme="ascii-flower"] .listening-tip-card,
[data-bg-theme="ascii-flower"] .listening-tip-card,
body[data-bg-theme="ascii-flower"] .overview-kpi-card,
[data-bg-theme="ascii-flower"] .overview-kpi-card,
body[data-bg-theme="ascii-flower"] .speaking-simulator-panel,
[data-bg-theme="ascii-flower"] .speaking-simulator-panel,
body[data-bg-theme="ascii-flower"] .simulator-timer-box,
[data-bg-theme="ascii-flower"] .simulator-timer-box,
body[data-bg-theme="ascii-flower"] .suite-subnav,
[data-bg-theme="ascii-flower"] .suite-subnav {
  background: rgba(24, 24, 27, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .speaking-title,
body[data-bg-theme="ascii-flower"] .overview-kpi-value,
body[data-bg-theme="ascii-flower"] .rubrics-table th,
body[data-bg-theme="ascii-flower"] .hero-panel__title {
  color: #fafafa !important;
}

body[data-bg-theme="ascii-flower"] .speaking-question-list,
body[data-bg-theme="ascii-flower"] .rubrics-table td,
body[data-bg-theme="ascii-flower"] .writing-textarea {
  color: #d4d4d8 !important;
  background: rgba(9, 9, 11, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ========================================================
   系统设置模态卡片 (与成就弹窗一致，浮层卡片，不占领下方视图)
   ======================================================== */
.settings-modal-content {
  max-width: 660px !important;
  width: min(660px, 92vw) !important;
}

.settings-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.settings-modal-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.settings-modal-action-card:hover {
  background: #ffffff;
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

.settings-card-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.08);
  flex-shrink: 0;
}

.settings-card-info {
  flex: 1;
}

.settings-card-info h4 {
  margin: 0 0 3px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

.settings-card-info p {
  margin: 0;
  font-size: 12px;
  color: var(--hero-muted, #64748b);
  line-height: 1.4;
}

.settings-system-status-pill {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--hero-text, #334155);
}

/* 深色模式适配 */
body[data-bg-theme="ascii-flower"] .settings-modal-action-card {
  background: rgba(24, 24, 27, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-bg-theme="ascii-flower"] .settings-modal-action-card:hover {
  background: rgba(39, 39, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
}

body[data-bg-theme="ascii-flower"] .settings-card-info h4 {
  color: #f4f4f5;
}

body[data-bg-theme="ascii-flower"] .settings-card-info p {
  color: #a1a1aa;
}

body[data-bg-theme="ascii-flower"] .settings-system-status-pill {
  background: rgba(9, 9, 11, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7 !important;
}

/* 设置弹窗：主题切换按钮 —— 使用品牌渐变，替代难看的默认 olive 色 */
#settings-modal #theme-switcher-btn-entry {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(102, 126, 234, 0.4) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#settings-modal #theme-switcher-btn-entry:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(118, 75, 162, 0.35);
}

#settings-modal #clear-cache-btn {
  border-radius: 10px !important;
}

/* ========================================================
   原生雅思机考听力工作站 (Native CBT Listening Station)
   ======================================================== */
.listening-tab-panel {
  animation: fadeIn 0.25s ease-out;
}

.cbt-listening-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cbt-selector-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 100%;
}

.cbt-book-picker-wrap,
.cbt-test-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cbt-picker-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  white-space: nowrap;
}

.cbt-select-dropdown {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #0ea5e9;
  background: var(--hero-card-bg, #ffffff);
  color: var(--hero-text, #0f172a);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cbt-select-dropdown:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.cbt-test-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cbt-test-pill-btn {
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cbt-test-pill-btn:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.cbt-test-pill-btn.active {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.cbt-pill-dot {
  font-size: 8px;
  color: #10b981;
}

.cbt-test-pill-btn.active .cbt-pill-dot {
  color: #ffffff;
}

.cbt-top-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbt-audio-console-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.cbt-audio-console-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.cbt-play-btn {
  font-weight: 700;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cbt-play-btn.playing {
  background: #10b981 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.cbt-preload-status {
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.cbt-preload-status:empty {
  display: none;
}

.cbt-preload-status.ready {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.cbt-preload-status.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

.cbt-preload-status.playing-hint {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.cbt-audio-time {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

.cbt-audio-progress-wrap {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
}

.cbt-audio-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.cbt-audio-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.cbt-speed-group {
  display: flex;
  border: 1px solid var(--hero-border, #cbd5e1);
  border-radius: 8px;
  overflow: hidden;
}

.cbt-speed-btn {
  border: none;
  background: transparent;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: background 0.15s;
}

.cbt-speed-btn.active {
  background: #0ea5e9;
  color: #fff;
}

.cbt-parts-tabs-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

.cbt-part-tab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cbt-part-tab:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.cbt-part-tab.active {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

/* 题目呈现与交互 */
.cbt-exam-main-stage {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
}

.cbt-instruction-banner {
  background: rgba(14, 165, 233, 0.06);
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  margin-bottom: 20px;
}

.cbt-questions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cbt-external-part-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cbt-external-part-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 12px;
  text-decoration: none;
  color: var(--hero-text, #0f172a);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cbt-external-part-link:hover,
.cbt-external-part-link.active {
  border-color: #0ea5e9;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.14);
  transform: translateY(-2px);
}

.cbt-external-part-num {
  flex-shrink: 0;
  min-width: 60px;
  padding: 4px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  border-radius: 8px;
  background: #0ea5e9;
  color: #fff;
}

.cbt-external-part-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cbt-external-part-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbt-external-part-meta span {
  font-size: 12px;
  color: var(--hero-muted, #64748b);
}

.cbt-external-part-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: #0ea5e9;
  font-weight: 800;
}

.cbt-q-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}

.cbt-q-item:hover,
.cbt-q-item:focus-within {
  background: rgba(14, 165, 233, 0.03);
  border-color: #0ea5e9;
}

.cbt-q-num-badge {
  font-weight: 800;
  font-size: 13px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0ea5e9;
  color: #fff;
  flex-shrink: 0;
  margin-top: 3px;
}

.cbt-q-prompt-text {
  font-size: 14px;
  line-height: 2;
  color: var(--hero-text, #0f172a);
  flex: 1;
}

.cbt-blank-input {
  display: inline-block;
  min-width: 130px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #0ea5e9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.cbt-blank-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

/* 单选与多选题 */
.cbt-choice-body {
  flex: 1;
}

.cbt-choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cbt-choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #e2e8f0);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cbt-choice-option:hover {
  background: #ffffff;
  border-color: #0ea5e9;
}

.cbt-choice-option.selected {
  background: rgba(14, 165, 233, 0.1);
  border-color: #0ea5e9;
  font-weight: 600;
}

.cbt-choice-radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cbt-choice-option.selected .cbt-choice-radio-circle {
  border-color: #0ea5e9;
  background: #0ea5e9;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.cbt-choice-label {
  font-size: 13px;
  color: var(--hero-text, #0f172a);
}

/* 底部 1~40 题导航药丸 */
.cbt-bottom-navigator-bar {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.cbt-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cbt-q-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 12px;
  font-weight: 700;
  color: var(--hero-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbt-q-pill.in-current-part {
  border-color: #0ea5e9;
}

.cbt-q-pill.answered {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
}

.cbt-q-pill.flagged {
  border-color: #f59e0b !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

/* ========================================================
   即听即打训练器 (Dictation Speedrun)
   ======================================================== */
.dictation-shell-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.dictation-stats-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  color: var(--hero-text, #0f172a);
}

.dictation-practice-box {
  background: rgba(0, 0, 0, 0.015);
  border: 1px dashed var(--hero-border, #cbd5e1);
  border-radius: 14px;
  padding: 20px;
}

.dictation-audio-pulse {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  animation: audioPulse 2s infinite ease-in-out;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dictation-audio-pulse:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
}

.dictation-audio-pulse:active {
  transform: scale(0.95);
}

@keyframes audioPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(14, 165, 233, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.dictation-input {
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  padding: 12px 18px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.dictation-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.dictation-input.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  color: #065f46 !important;
}

.dictation-input.incorrect {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #991b1b !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* 深色模式适配 */
body[data-bg-theme="ascii-flower"] .cbt-audio-console-card,
body[data-bg-theme="ascii-flower"] .cbt-exam-main-stage,
body[data-bg-theme="ascii-flower"] .cbt-bottom-navigator-bar,
body[data-bg-theme="ascii-flower"] .dictation-shell-card {
  background: rgba(24, 24, 27, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-q-item {
  background: rgba(9, 9, 11, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-bg-theme="ascii-flower"] .cbt-blank-input {
  background: rgba(9, 9, 11, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-choice-option {
  background: rgba(9, 9, 11, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-bg-theme="ascii-flower"] .dictation-input {
  background: rgba(9, 9, 11, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fafafa !important;
}

/* ========================================================
   CBT 真实机考卷面、表格与嵌入式填空系统 (CD-IELTS Authentic)
   ======================================================== */
.cbt-exam-sheet-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  line-height: 1.85;
  color: var(--hero-text, #1e293b);
  font-size: 15px;
}

.cbt-sheet-title-banner {
  font-size: 14.5px;
  font-weight: 600;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.08);
  border-left: 4px solid #0ea5e9;
  padding: 9px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
  line-height: 1.6;
}

.cbt-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.cbt-exam-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  background: transparent;
  font-size: 14.5px;
}

.cbt-exam-table th,
.cbt-exam-table td {
  border: 1.5px solid var(--hero-border, #cbd5e1);
  padding: 12px 14px;
  vertical-align: middle;
  text-align: left;
}

.cbt-exam-table th {
  background: rgba(14, 165, 233, 0.06);
  font-weight: 700;
}

/* 嵌入式机考填空输入框与题号徽章 */
.cbt-blank-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 4px;
  vertical-align: baseline;
  position: relative;
}

.cbt-blank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.cbt-inline-input {
  width: 135px;
  min-width: 90px;
  max-width: 200px;
  height: 28px;
  padding: 2px 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid #0ea5e9;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cbt-inline-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
  background: #ffffff;
}

/* 紧凑型选择题（用于地图标记题 A-I） */
.cbt-choice-group.cbt-choice-compact {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.cbt-choice-group.cbt-choice-compact .cbt-choice-option {
  padding: 6px 14px;
  min-width: 44px;
  justify-content: center;
  font-weight: 700;
}

.cbt-choice-group.cbt-choice-compact .cbt-choice-radio-circle {
  display: none;
}

/* 地图题专属指示徽章与横幅 */
.cbt-map-pill-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 5px;
  vertical-align: middle;
}

.cbt-map-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(234, 88, 12, 0.08);
  border-left: 4px solid #ea580c;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: #9a3412;
  line-height: 1.5;
}

.cbt-map-jump-btn {
  background: #ea580c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3);
}

.cbt-map-jump-btn:hover {
  background: #c2410c;
}

/* 地图与图表卡片 */
.cbt-exam-map-card {
  margin: 18px 0 24px;
  text-align: center;
  background: #ffffff;
  border: 1.5px solid var(--hero-border, #cbd5e1);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.cbt-exam-map-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cbt-exam-map-img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* 暗色主题适配 */
body[data-bg-theme="ascii-flower"] .cbt-exam-sheet-card {
  background: rgba(18, 18, 24, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-sheet-title-banner {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-exam-table th,
body[data-bg-theme="ascii-flower"] .cbt-exam-table td {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body[data-bg-theme="ascii-flower"] .cbt-exam-table th {
  background: rgba(14, 165, 233, 0.12) !important;
}

body[data-bg-theme="ascii-flower"] .cbt-inline-input {
  background: rgba(9, 9, 11, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-exam-map-card {
  background: rgba(18, 18, 24, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========================================================
   6. 雅思阅读系统全面重构与 AI 深度赋能专属样式
   ======================================================== */

/* 彻底隐藏阅读题库中的所有查看 PDF 按钮，只保留开始做题 */
#browse-view [data-action="pdf"],
#browse-view .btn-outline,
#browse-view .exam-item-action-btn[data-action="pdf"],
#browse-view button[data-action="pdf"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 难度分级主卡片网格导航 */
.reading-difficulty-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 14px 0 20px 0;
}

@media (max-width: 1024px) {
  .reading-difficulty-deck {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.reading-difficulty-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.reading-difficulty-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.12);
}

.reading-difficulty-card.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(59, 130, 246, 0.02));
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 12px 30px rgba(37, 99, 235, 0.15);
}

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

.diff-card-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.diff-badge-all {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.diff-badge-p1 {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.diff-badge-p2 {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.diff-badge-p3 {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.diff-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--hero-muted, #64748b);
}

.diff-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.diff-card-summary {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--hero-muted, #64748b);
  margin: 0 0 14px 0;
  flex: 1;
}

.diff-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.diff-meta-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--hero-muted, #64748b);
}

/* 高中低频显性标牌 */
.reading-freq-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.reading-freq-badge.freq-high {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.reading-freq-badge.freq-medium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.reading-freq-badge.freq-low {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* 原生机考阅读工作台 */
#reading-exam-workspace {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--hero-border, #e2e8f0);
}

.reading-workspace-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

/* AI 逐题错因深度诊断卡片样式 */
.reading-mistake-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reading-mistake-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px dashed var(--hero-border, #e2e8f0);
  padding-bottom: 12px;
}

.reading-mistake-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
  line-height: 1.4;
}

.reading-mistake-card-pills {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.mistake-pill-user {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.mistake-pill-correct {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* 4大剖析维度气泡 */
.reading-ai-section-box {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
}

.reading-ai-section-box.why-wrong {
  background: rgba(239, 68, 68, 0.04);
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.reading-ai-section-box.where-to-look {
  background: rgba(37, 99, 235, 0.04);
  border-left: 4px solid #2563eb;
  color: #1e40af;
}

.reading-ai-section-box.how-to-analyze {
  background: rgba(139, 92, 246, 0.04);
  border-left: 4px solid #8b5cf6;
  color: #5b21b6;
}

.reading-ai-section-box.how-to-select {
  background: rgba(16, 185, 129, 0.04);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.reading-ai-section-box.action-tip {
  background: rgba(245, 158, 11, 0.05);
  border-left: 4px solid #f59e0b;
  color: #92400e;
  font-weight: 600;
}

.reading-ai-box-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 暗色主题适配 */
body[data-bg-theme="ascii-flower"] .reading-difficulty-card {
  background: rgba(20, 20, 26, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-bg-theme="ascii-flower"] .reading-difficulty-card.active {
  border-color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
}

body[data-bg-theme="ascii-flower"] .diff-card-title {
  color: #f1f5f9 !important;
}

body[data-bg-theme="ascii-flower"] .diff-card-summary {
  color: #94a3b8 !important;
}

body[data-bg-theme="ascii-flower"] .diff-meta-tag {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

body[data-bg-theme="ascii-flower"] .reading-workspace-bar {
  background: rgba(20, 20, 26, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-bg-theme="ascii-flower"] .reading-mistake-card {
  background: rgba(24, 24, 32, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-bg-theme="ascii-flower"] .reading-mistake-card-title {
  color: #f1f5f9 !important;
}

/* AI 逐题错因深度诊断卡片样式 */
.reading-ai-mistake-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.reading-mistake-badge {
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.reading-ai-dim-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .reading-ai-dim-grid {
    grid-template-columns: 1fr;
  }
}

.reading-ai-dim-item {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  border-left: 3.5px solid transparent;
}

.reading-ai-dim-item .dim-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 5px;
}

.reading-ai-dim-item.dim-why {
  background: rgba(239, 68, 68, 0.05);
  border-left-color: #ef4444;
}
.reading-ai-dim-item.dim-why .dim-title {
  color: #dc2626;
}

.reading-ai-dim-item.dim-locate {
  background: rgba(37, 99, 235, 0.05);
  border-left-color: #2563eb;
}
.reading-ai-dim-item.dim-locate .dim-title {
  color: #2563eb;
}

.reading-ai-dim-item.dim-para {
  background: rgba(139, 92, 246, 0.05);
  border-left-color: #8b5cf6;
}
.reading-ai-dim-item.dim-para .dim-title {
  color: #7c3aed;
}

.reading-ai-dim-item.dim-strat {
  background: rgba(16, 185, 129, 0.05);
  border-left-color: #10b981;
}
.reading-ai-dim-item.dim-strat .dim-title {
  color: #059669;
}

.reading-ai-examiner-tip {
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(249, 115, 22, 0.05));
  border: 1px dashed rgba(245, 158, 11, 0.4);
  font-size: 12.5px;
  color: #b45309;
  line-height: 1.5;
}

/* 阅读历次答题卡片与时间轴 */
.reading-attempt-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reading-attempt-card {
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 12px;
  background: var(--hero-card-bg, #ffffff);
  overflow: hidden;
  transition: all 0.2s ease;
}

.reading-attempt-card:hover {
  border-color: #3b82f6;
}

.reading-attempt-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.015);
}

.reading-attempt-body {
  padding: 16px 18px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

/* 暗色主题深度适配 */
body[data-bg-theme="ascii-flower"] .reading-ai-mistake-card,
body[data-bg-theme="ascii-flower"] .reading-attempt-card {
  background: rgba(24, 24, 32, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
body[data-bg-theme="ascii-flower"] .reading-attempt-header {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* ========================================================
   7. AI 全科英语能力深度分析看板与非覆盖长期记忆系统 (Overview AI Competency)
   ======================================================== */
.overview-ai-analytics-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
  margin-bottom: 40px;
}

/* 顶部 AI 看板引导与标题栏 */
.overview-ai-header-panel {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.overview-ai-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.overview-ai-robot-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(139, 92, 246, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12);
}

.overview-ai-header-title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--hero-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-ai-header-subtitle {
  font-size: 13px;
  color: var(--hero-text-muted, #64748b);
  margin: 0;
}

.overview-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 空状态卡片 */
.overview-ai-empty-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(16px);
  border: 1.5px dashed var(--hero-border, #cbd5e1);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
}

.overview-ai-empty-icon {
  font-size: 52px;
  margin-bottom: 16px;
  animation: pulse-slow 3s infinite ease-in-out;
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.overview-ai-empty-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--hero-text, #0f172a);
  margin: 0 0 10px 0;
}

.overview-ai-empty-desc {
  font-size: 14.5px;
  color: var(--hero-text-muted, #64748b);
  max-width: 620px;
  margin: 0 auto 24px auto;
  line-height: 1.7;
}

.overview-ai-empty-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* 核心看板卡片 */
.overview-ai-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.overview-ai-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--hero-text, #0f172a);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 2列网格：左侧雷达 + 右侧素养指标 */
.overview-ai-radar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .overview-ai-radar-grid {
    grid-template-columns: 1fr;
  }
}

.overview-ai-radar-chart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 320px;
}

.overview-ai-radar-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  overflow: visible;
}

/* 能力条列表 */
.overview-ai-competency-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.competency-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.competency-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

.competency-bar-track {
  height: 9px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
  position: relative;
}

.competency-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 进阶曲线走势 */
.overview-ai-trajectory-card {
  margin-top: 4px;
}

.trajectory-chart-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
}

.trajectory-svg {
  width: 100%;
  min-width: 600px;
  height: 190px;
}

/* 双栏长期记忆诊断看板 (🟢 已攻克 vs 🔴 顽固黑洞) */
.overview-ai-memory-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 850px) {
  .overview-ai-memory-dual-grid {
    grid-template-columns: 1fr;
  }
}

.memory-column-card {
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.memory-conquered-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
}

.memory-weakness-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
}

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

.memory-column-title {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.memory-conquered-box .memory-column-title {
  color: #059669;
}

.memory-weakness-box .memory-column-title {
  color: #dc2626;
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.memory-item-conquered {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.memory-item-weakness {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

.memory-weakness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weakness-badge-flame {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.weakness-badge-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* 下阶段行动方案卡片 */
.overview-ai-blueprint-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(139, 92, 246, 0.08));
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-ai-blueprint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.overview-ai-blueprint-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--hero-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-ai-blueprint-content {
  font-size: 14px;
  color: var(--hero-text, #1e293b);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.6);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

/* 历史记忆明细日志抽屉 */
.overview-ai-ledger-card {
  border-radius: 18px;
}

.ledger-table-wrap {
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.ledger-table th {
  padding: 10px 12px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--hero-text-muted, #64748b);
  font-weight: 700;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
}

.ledger-table td {
  padding: 12px;
  border-bottom: 1px solid var(--hero-border, #f1f5f9);
  color: var(--hero-text, #0f172a);
}

.ledger-badge-writing {
  background: rgba(168, 85, 247, 0.12);
  color: #9333ea;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.ledger-badge-reading {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.ledger-badge-listening {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* 暗色主题与 ASCII 墨染主题适配 */
body[data-bg-theme="ascii-flower"] .overview-ai-header-panel,
body[data-bg-theme="ascii-flower"] .overview-ai-card,
body[data-bg-theme="ascii-flower"] .overview-ai-empty-card,
body[data-bg-theme="ascii-flower"] .overview-ai-blueprint-card,
body[data-bg-theme="ascii-flower"] .memory-item-conquered,
body[data-bg-theme="ascii-flower"] .memory-item-weakness,
body[data-bg-theme="ascii-flower"] .overview-ai-blueprint-content {
  background: rgba(24, 24, 32, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .overview-ai-header-title,
body[data-bg-theme="ascii-flower"] .overview-ai-empty-title,
body[data-bg-theme="ascii-flower"] .overview-ai-card-title,
body[data-bg-theme="ascii-flower"] .competency-bar-header,
body[data-bg-theme="ascii-flower"] .ledger-table td,
body[data-bg-theme="ascii-flower"] .overview-ai-blueprint-title {
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .overview-ai-header-subtitle,
body[data-bg-theme="ascii-flower"] .overview-ai-empty-desc,
body[data-bg-theme="ascii-flower"] .ledger-table th {
  color: #a1a1aa !important;
}




