/* ============================================================
   页面级样式
   通用组件已迁移至 base.css / components.css
   ============================================================ */

  /* 提取自内联样式 */
  .resume-title { font-size: 0.9rem; font-weight: 600; color: var(--primary); }
  .card-title { font-size: 0.9rem; font-weight: 600; }
  .text-body-sm { font-size: 0.85rem; line-height: 1.6; }
  .count-badge { background: var(--success-light); padding: 2px 8px; border-radius: 40px; font-size: 0.7rem; color: var(--text-secondary); }
  .dev-clear-btn { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 4px; padding: 4px 12px; cursor: pointer; transition: all 0.2s; }
  .dev-clear-btn:hover { background: var(--error-soft); color: var(--error); border-color: var(--error-light); }
  .progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
  .progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--secondary), #667eea); border-radius: 3px; transition: width 0.3s; }
  .progress-track-center { max-width: 300px; margin: 0 auto; }
  .modal-narrow { max-width: 420px !important; }
  .modal-slim { max-width: 380px !important; }
  .modal-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; box-sizing: border-box; }
  .modal-desc { font-size: 0.9rem; color: var(--text-secondary); }
  .extract-status-text { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
  .success-text { color: var(--success); }
  .mock-badge { background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }

  /* 拖拽区域 */
  .dropzone {
    background: var(--bg-hover);
    border: 2.5px dashed #bfdbfe;
    border-radius: 1.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    position: relative;
  }
  .dropzone.drag-over {
    background: var(--bg-hover);
    border-color: var(--primary-light);
    border-style: solid;
    transform: scale(0.99);
    box-shadow: 0 8px 20px rgba(44,123,229,0.12);
  }
  .dropzone-icon { font-size: 3.2rem; margin-bottom: 0.75rem; }
  .dropzone-title { font-weight: 600; font-size: 1.2rem; color: var(--text-main); margin-bottom: 0.25rem; }
  .dropzone-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
  .file-types-hint { font-size: 0.7rem; background: var(--success-soft); display: inline-block; padding: 0.25rem 0.75rem; border-radius: 40px; color: var(--text-secondary); }
  .extract-grade-badge { font-size: 0.8rem; background: var(--primary-soft); color: var(--primary); display: inline-block; padding: 0.35rem 0.9rem; border-radius: 40px; font-weight: 600; }
  .extract-grade-badge.warning { background: var(--warning-soft); color: var(--warning); }
  #fileInput { display: none; }

  /* 文件列表 */
  .files-container { background: var(--bg-card); border-radius: 1.25rem; border: 1px solid var(--border); overflow: hidden; transition: all 0.2s; margin-top: 0.25rem; margin-bottom: 14px; }
  .files-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
  .files-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
  .file-count-badge { background: var(--bg-subtle); padding: 2px 8px; border-radius: 40px; font-size: 0.7rem; font-weight: 600; color: var(--primary); }
  .clear-all-btn { background: none; border: none; font-size: 0.75rem; color: var(--text-muted); cursor: pointer; font-weight: 500; padding: 4px 8px; border-radius: 30px; transition: 0.2s; }
  .clear-all-btn:hover { background: var(--bg-subtle); color: var(--error); }

  .file-list { list-style: none; max-height: 320px; overflow-y: auto; padding: 0.2rem 0; }
  .file-item { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border-light); transition: background 0.15s; }
  .file-item:hover { background: var(--bg-hover); }
  .file-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
  .file-icon { font-size: 1.7rem; width: 32px; text-align: center; }
  .file-details { flex: 1; overflow: hidden; }
  .file-name { font-weight: 500; font-size: 0.9rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .file-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; display: flex; gap: 12px; }
  .remove-file { background: transparent; border: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 30px; transition: all 0.15s; }
  .remove-file:hover { color: var(--error); background: var(--error-soft); }
  .empty-files { text-align: center; padding: 2rem 1rem; color: var(--text-secondary); font-size: 0.85rem; }

  /* 提取模式切换 */
  #extractModeSwitch { padding: 12px 16px; margin-bottom: 16px; }
  .extract-mode-btn { flex: 1; padding: 10px 16px; border: 2px solid var(--border); border-radius: 60px; background: var(--bg-card); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: 0.2s; color: var(--text-muted); }
  .extract-mode-btn:hover { border-color: var(--primary); color: var(--primary); }
  .extract-mode-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

  /* 已有文档选择 */
  .existing-doc-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: 0.15s; }
  .existing-doc-item:hover { background: var(--bg-hover); }
  .existing-doc-item:last-child { border-bottom: none; }
  .existing-doc-info { font-weight: 500; font-size: 0.9rem; color: var(--text-main); }
  .existing-doc-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
  .existing-doc-badge { font-size: 0.7rem; background: var(--bg-subtle); padding: 2px 8px; border-radius: 40px; color: var(--primary); font-weight: 600; }

  /* 解析文档列表 */
  .parsed-doc-list-wrap {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 4px 0;
  }
  .parsed-doc-list-wrap::-webkit-scrollbar { width: 0; background: transparent; }
  .parsed-doc-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: 0.15s;
    border-radius: 6px; background: rgba(255,255,255,0.5);
  }
  .parsed-doc-item:last-child { border-bottom: none; }
  .parsed-doc-item:hover { background: rgba(255,255,255,0.8); transform: translateY(-1px); }
  .parsed-doc-item.selected { background: var(--bg-card); border: 2px solid var(--border-light); }
  .parsed-doc-info { flex: 1; min-width: 0; }
  .parsed-doc-name { font-weight: 500; font-size: 0.85rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .parsed-doc-meta { font-size: 0.7rem; color: var(--text-secondary); margin-top: 2px; }
  .doc-table-row {
    display: grid;
    grid-template-columns: 4px 1.6fr 2fr auto;
    gap: 0 14px;
    align-items: center;
    padding: 14px 16px;
    transition: all 0.2s;
    border-radius: 10px;
    background: var(--bg-card);
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border-bottom: none;
  }
  .doc-table-row:last-child { margin-bottom: 0; }
  .doc-table-row:hover { background: var(--bg-hover); box-shadow: 0 4px 12px rgba(0,113,227,0.08); }
  .doc-table-row.selected { background: var(--bg-hover); box-shadow: 0 0 0 2px var(--primary); }
  .doc-color-bar {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    background: var(--primary);
  }

  .doc-menu-wrap { position: relative; display: inline-block; width: 24px; height: 24px; opacity: 0.6; transition: opacity 0.2s; flex-shrink: 0; }
  .doc-menu-wrap:hover { opacity: 1; }
  .doc-menu-btn { position: absolute; inset: 0; background: none; border: none; border-radius: 50%; color: var(--text-muted); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; }
  .doc-menu-btn::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; box-shadow: -6px 0 0 currentColor, 6px 0 0 currentColor; }
  .doc-menu-btn:hover { background: var(--bg-subtle); color: var(--text-main); }
  .doc-menu-dropdown {
    display: none;
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 9999;
    min-width: max-content;
    overflow: hidden;
  }
  .doc-menu-dropdown.show { display: block; animation: menuPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  @keyframes menuPop {
    0%   { opacity: 0; transform: scale(0.75) translateY(-8px); }
    60%  { opacity: 1; transform: scale(1.06) translateY(2px); }
    100% { opacity: 1; transform: scale(1)   translateY(0); }
  }
  .doc-menu-item { padding: 4px 10px; font-size: 0.78rem; color: var(--error); cursor: pointer; transition: 0.15s; white-space: nowrap; }
  .doc-menu-item:hover { background: var(--error-soft); }

  .doc-col-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-main);
    min-width: 0;
    transition: color 0.2s, transform 0.2s;
  }
  .doc-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .doc-table-row:hover .doc-col-name {
    color: var(--primary);
  }
  .doc-col-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .doc-col-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
  }
  .session-table-row {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: 0.15s;
    border-radius: 6px;
    background: rgba(255,255,255,0.5);
  }
  .session-table-row:hover { background: rgba(255,255,255,0.8); transform: translateY(-1px); }
  .session-row-top {
    display: grid;
    grid-template-columns: 1.5fr 2fr auto;
    gap: 16px;
    align-items: center;
  }
  .session-col-name {
    font-weight: 500; font-size: 0.85rem; color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .session-col-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
  }
  .session-col-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
  }
  .session-row-bar {
    margin-top: 6px;
  }
  .session-row-bar .session-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-subtle);
    border-radius: 2px;
    overflow: hidden;
  }
  .parsed-doc-delete-btn {
    background: none; border: 1px solid var(--error-light); color: var(--error); cursor: pointer;
    font-size: 0.75rem; padding: 4px 10px; border-radius: 6px; transition: 0.15s;
  }
  .parsed-doc-delete-btn:hover { background: var(--error-soft); border-color: var(--error); }

  /* 上传新文档长条卡片 */
  .upload-new-card {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 8px;
    background: var(--primary);
    color: #fff; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: 0.2s;
    border: none; text-align: center;
  }
  .upload-new-card:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,113,227,0.25); }
  .upload-new-text { flex: 1; }

  /* AI 提示 */
  .ai-tip {
    font-size: 0.8rem; color: var(--text-secondary); padding: 10px 14px;
    background: var(--bg-hover); border-radius: 8px; border-left: 3px solid var(--primary-light);
    margin-top: 16px; line-height: 1.6;
  }

  /* 设置面板 */
  .setting-item { margin-bottom: 14px; }
  .setting-item:last-child { margin-bottom: 0; }
  .msg { font-size: 0.7rem; margin-top: 4px; color: var(--text-muted); }
  .msg.ok { color: var(--success); }
  .msg.err { color: var(--error); }
  .input-with-toggle { position: relative; display: flex; align-items: center; }
  .input-with-toggle input { padding-right: 40px; }
  .toggle-visibility { position: absolute; right: 10px; background: none; border: none; cursor: pointer; font-size: 16px; color: var(--text-muted); }
  .toggle-visibility:hover { color: var(--text-main); }

  /* --- 新设置面板样式 --- */
  .glass-card {
    background: var(--bg-subtle);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.02);
    padding: 2rem 2rem 2.2rem;
    transition: all 0.2s;
    border: 2px solid var(--border-light);
    margin-bottom: 1.2rem;
  }
  .header-section {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.6rem;
  }
  .title h2 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
  }
  .title p { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
  .security-badge {
    background: var(--bg-hover);
    border-radius: 40px;
    padding: 0.3rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .setting-group { margin-bottom: 0.6rem; }
  .save-action { margin-top: 1.8rem; display: flex; gap: 12px; align-items: center; }
  .model-row { display: flex; gap: 1rem; flex-wrap: wrap; }
  .model-group { flex: 1; min-width: 220px; }
  .model-group label { margin-bottom: 6px; }

  /* 提取Tab */
  .doc-info { padding: 12px 0; }
  .doc-name { font-size: 1rem; font-weight: 500; margin-bottom: 5px; }
  .doc-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
  .chunk-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
  .chunk-name { font-weight: 500; margin-bottom: 3px; font-size: 0.9rem; }
  .chunk-content { font-size: 0.8rem; color: var(--text-secondary); }
  .chunk-reason { font-size: 0.7rem; color: var(--error); background: var(--error-soft); padding: 3px 7px; border-radius: 4px; margin-top: 5px; display: inline-block; }
  .chunk-actions { display: flex; gap: 7px; margin-top: 8px; }
  .extract-summary { font-size: 0.85rem; margin-bottom: 12px; color: var(--text-main); }

  /* 选择范围Tab */
  .select-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
  .select-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 14px; padding: 4px 0; }
  .select-subtitle strong { color: var(--primary); font-size: 0.9rem; }
  .chapter-group { margin-bottom: 10px; }
  .chapter-header { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; cursor: pointer; user-select: none; border-radius: 8px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
  .chapter-header:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,113,227,0.08); background: var(--success-soft); }
  .chapter-title { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
  .chapter-meta { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }
  .chapter-toggle { color: var(--text-secondary); font-size: 0.75rem; transition: 0.2s; }
  .chapter-group.collapsed .chapter-body { display: none; }
  .chapter-group.collapsed .chapter-header { border-bottom: none; margin-bottom: 0; }
  #chunksList { max-height: 55vh; overflow-y: auto; padding-right: 4px; }
  .chunk-select-card { display: flex; align-items: flex-start; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 4px; margin-left: 24px; background: var(--bg-subtle); transition: background 0.15s; }
  .chunk-select-card:hover { background: var(--success-soft); }
  .chunk-select-card .chunk-info { flex: 1; }
  .chunk-select-card.completed { opacity: 0.55; background: var(--bg-subtle); border-color: var(--border); }
  .chunk-select-card.completed:hover { background: var(--bg-hover); }
  .select-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
  .select-count { font-size: 0.85rem; color: var(--text-secondary); }
  .select-count strong { color: var(--primary); font-size: 1rem; }
  .no-chunks-msg { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 0.9rem; }
  .no-chunks-msg span { display: block; font-size: 2rem; margin-bottom: 10px; }

  /* 复习目标Tab */
  .mode-card { border-radius: 16px; padding: 20px; margin-bottom: 16px; }
  .mode-recommendation { text-align: center; padding: 24px 0; }
  .mode-badge { display: inline-flex; align-items: center; gap: 6px; padding: 10px 28px; border-radius: 50px; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; text-align: center; }
  .mode-badge.memory { background: linear-gradient(135deg, var(--primary-light), #764ba2); color: #fff; }
  .mode-badge.apply { background: linear-gradient(135deg, #f093fb, #f5576c); color: #fff; }
  .mode-badge.both { background: linear-gradient(135deg, #4facfe, #00f2fe); color: #fff; }
  .mode-confidence { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 4px; }
  .mode-confidence-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
  .mode-tip { font-size: 0.9rem; color: var(--text-main); background: var(--bg-card); padding: 16px 20px; border-radius: 10px; margin-top: 12px; border: 1px solid var(--border-light); box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  .mode-tip .label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
  .mode-tip .mode-tip-content { line-height: 1.7; }
  .mode-tip p { margin-bottom: 10px; }
  .mode-tip p:last-child { margin-bottom: 0; }
  .mode-tip strong { color: var(--primary); font-weight: 700; }
  .mode-stat-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin-top: 4px; }
  .mode-stat-row { display: contents; }
  .mode-stat-key { color: var(--text-secondary); }
  .mode-stat-val { font-weight: 600; color: var(--text-main); text-align: right; }
  .mode-tip-list { margin: 0; padding-left: 18px; }
  .mode-tip-list li { margin-bottom: 6px; line-height: 1.6; }
  .mode-breakdown { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 0 4px; }
  .breakdown-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border-light); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
  .breakdown-chapter { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
  .breakdown-rec { font-size: 0.8rem; color: var(--text-secondary); }
  .mode-choices { display: flex; gap: 12px; margin: 20px 0; justify-content: center; flex-wrap: wrap; }
  .mode-choice-btn { flex: 1; min-width: 120px; padding: 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg-card); cursor: pointer; text-align: center; transition: all 0.2s; }
  .mode-choice-btn:hover { border-color: var(--primary); background: var(--bg-hover); }
  .mode-choice-btn.selected { border-color: var(--primary); background: #dbeafe; box-shadow: 0 0 0 3px rgba(0,113,227,0.15); }
  .mode-choice-btn .icon { font-size: 1.8rem; margin-bottom: 6px; }
  .mode-choice-btn .title { font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
  .mode-choice-btn .desc { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
  .mode-confirm-area { text-align: center; margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--border-light); }
  .no-selection-msg { text-align: center; padding: 60px 0; color: var(--text-muted); }
  .no-selection-msg span { font-size: 2.5rem; display: block; margin-bottom: 12px; }

  .plan-no-session-msg { text-align: center; padding: 60px 0; color: var(--text-muted); }
  .plan-no-session-msg span { font-size: 2.5rem; display: block; margin-bottom: 12px; }

  /* 答题式复习界面 */
  .review-layout { max-width: 640px; margin: 0 auto; padding: 16px 0; display: flex; flex-direction: column; gap: 12px; }
  .apply-card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,113,227,0.1), 0 2px 8px rgba(0,113,227,0.06);
    padding: 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
  }
  .apply-card-timer { position: absolute; top: 16px; right: 24px; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; line-height: 28px; }
  .apply-nav-wrap { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
  .nav-btn { padding: 8px 20px; border: 1px solid var(--border); background: var(--bg-card); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; cursor: pointer; color: var(--primary); white-space: nowrap; transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
  .nav-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
  .nav-btn:hover:not(:disabled) { background: #dbeafe; border-color: var(--primary); }
  .question-area { display: none; }
  .question-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; }
  .question-text { font-size: 0.95rem; color: var(--text-main); line-height: 1.7; padding: 12px; background: var(--bg-hover); border-radius: 10px; margin-bottom: 0; min-height: 40px; display: block; }
  .thinking-indicator { padding: 12px 16px; display: flex; align-items: center; gap: 8px; }
  .thinking-dots { display: flex; gap: 4px; }
  .thinking-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); animation: bounce 1.4s infinite ease-in-out; }
  .thinking-dots span:nth-child(2) { animation-delay: 0.16s; }
  .thinking-dots span:nth-child(3) { animation-delay: 0.32s; }
  @keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
  .thinking-text { font-size: 0.8rem; color: var(--text-muted); }
  .mcq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mcq-option { padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; text-align: center; }
  .mcq-option:hover { border-color: var(--primary); background: var(--bg-hover); }
  .mcq-option.selected { border-color: var(--primary); background: #dbeafe; }
  .mcq-option.disabled { opacity: 0.5; cursor: default; }
  .letter-fill { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 12px; }
  .letter-fill .letter { font-size: 1.2rem; font-weight: 700; color: var(--text-main); width: 36px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-bottom: 2px solid var(--border); }
  .letter-fill .letter.blank { border-bottom-color: var(--primary); padding: 0; }
  .letter-fill .letter.blank input { width: 100%; height: 100%; border: none; background: transparent; text-align: center; font-size: 1.2rem; font-weight: 700; color: var(--text-main); outline: none; border-bottom: 2px solid var(--primary); text-transform: uppercase; }
  .letter-fill .letter.blank input:focus { border-bottom-color: var(--primary-dark); }
  .input-area { display: flex; flex-direction: column; gap: 8px; }
  .input-row { display: flex; gap: 8px; align-items: center; }
  .input-row input { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: 50px; font-size: 0.9rem; outline: none; }
  .input-row input:focus { border-color: var(--primary); }
  .input-row .submit-btn { padding: 8px 20px; border: none; background: var(--primary); color: #fff; border-radius: 50px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
  .input-row .submit-btn:hover { background: var(--primary-dark); }
  .input-row .submit-btn:disabled { background: var(--border); cursor: default; }
  .input-area .input-nav-divider { width: 1px; height: 24px; background: var(--border); margin: 4px auto; flex-shrink: 0; align-self: center; }
  .answer-area { display: none; padding: 14px 16px; border-radius: 10px; margin-top: 0; font-size: 0.9rem; line-height: 1.7; }
  .answer-area.correct, .answer-area.wrong { animation: answerSlideIn 220ms ease-out; }
  .answer-area.correct { display: block; background: var(--success-soft); border: 1px solid var(--success-light); color: var(--success); }
  .answer-area.wrong { display: block; background: var(--error-soft); border: 1px solid var(--error-light); color: var(--error); }
  @keyframes answerSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .answer-area .answer-label { font-weight: 700; margin-bottom: 6px; }
  .answer-area .answer-detail { font-size: 0.8rem; opacity: 0.8; }
  .analysis-section { background: var(--warning-soft); border-radius: 10px; padding: 14px; margin-top: 10px; font-size: 0.85rem; line-height: 1.7; border: 1px solid var(--warning-light); color: var(--warning); }
  .principle-card { background: var(--warning-soft); border: 1px solid var(--warning-light); border-radius: 12px; padding: 14px 18px; margin: 12px 0; }
  .principle-card .card-title { font-size: 0.85rem; font-weight: 600; color: var(--warning); margin-bottom: 8px; }
  .principle-card .card-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
  .principle-card .prompt-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 0.8rem; color: var(--text-main); margin-bottom: 8px; white-space: pre-wrap; }
  .principle-card .card-actions { display: flex; gap: 8px; }
  .wrong-reminder-card { background: var(--warning-soft); border: 2px solid var(--warning-light); border-radius: 16px; padding: 20px; margin-bottom: 16px; text-align: center; }
  .wrong-reminder-card .wrong-count { font-size: 1.1rem; font-weight: 700; color: var(--warning); margin-bottom: 6px; }
  .wrong-reminder-card .reminder-tip { font-size: 0.8rem; color: var(--warning); margin-bottom: 14px; }
  .wrong-reminder-card .wrong-actions { display: flex; gap: 10px; justify-content: center; }
  .wrong-bar { background: var(--warning-soft); border: 1px solid var(--warning-light); border-radius: 8px; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.85rem; }
  .wrong-bar span { color: var(--warning); font-weight: 600; }
  .method-tip { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; padding: 6px 10px; background: var(--bg-subtle); border-radius: 6px; }

  /* ========== 阶段指示器（步骤条） ========== */
  .phase-indicator { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 6px 20px 4px; }
  .phase-step { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; z-index: 1; }
  .phase-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-subtle); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); transition: all var(--transition); }
  .phase-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; transition: all var(--transition); white-space: nowrap; }
  .phase-line { flex: 1; max-width: 56px; min-width: 24px; height: 2px; background: var(--border); margin: 0 6px; position: relative; top: -11px; transition: background var(--transition); }

  /* 当前阶段 */
  .phase-step.current .phase-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.15); animation: phasePulse 2s infinite; }
  .phase-step.current .phase-label { color: var(--primary); font-weight: 600; }

  /* 已完成阶段 */
  .phase-step.done .phase-dot { background: var(--success); border-color: var(--success); color: #fff; }
  .phase-step.done .phase-label { color: var(--success); font-weight: 500; }
  .phase-line.done { background: var(--success); }

  @keyframes phasePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(59,130,246,0.06); }
  }

  /* 公众号卡片 */
  .wechat-card { background: transparent; border: none; border-radius: 0; padding: 0; max-width: 480px; margin: 96px auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .wechat-qr { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: none; padding: 0; background: transparent; mix-blend-mode: multiply; }
  .wechat-desc { font-size: 0.85rem; color: var(--text-secondary); text-align: center; font-weight: 700; }
  .wechat-slogan { font-size: 0.92rem; color: var(--primary); text-align: center; font-weight: 700; line-height: 1.6; white-space: nowrap; }

  /* ========== 复习计划确认页 ========== */
  .plan-card { padding: 20px 24px; }
  .plan-stats { display: flex; justify-content: center; margin: 16px 0 20px; }
  .plan-stat-item { text-align: center; padding: 16px 40px; background: var(--bg-subtle); border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
  .plan-stat-num { font-size: 2.2rem; font-weight: 700; color: var(--primary); line-height: 1; }
  .plan-stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; font-weight: 500; }

  .plan-phase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
  .plan-phase-card { background: var(--bg-subtle); border-radius: var(--radius-lg); padding: 16px 10px; text-align: center; transition: var(--transition); border: 1px solid var(--border-light); position: relative; overflow: hidden; }
  .plan-phase-num { position: absolute; top: 4px; left: 8px; font-size: 2.2rem; font-weight: 800; color: var(--text-muted); line-height: 1; opacity: 0.55; pointer-events: none; user-select: none; }
  .plan-phase-icon { font-size: 1.4rem; margin-bottom: 8px; }
  .plan-phase-title { font-size: 0.85rem; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
  .plan-phase-desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

  .plan-section-title { font-size: 0.85rem; font-weight: 600; color: var(--primary); margin: 16px 0 10px; display: flex; align-items: center; gap: 6px; }
  .plan-chapter-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
  .plan-chapter-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-subtle); border-radius: var(--radius-md); border: 1px solid var(--border-light); transition: var(--transition); }
  .plan-chapter-row:hover { background: var(--bg-hover); }
  .plan-chapter-icon { font-size: 1.1rem; flex-shrink: 0; }
  .plan-chapter-info { flex: 1; min-width: 0; }
  .plan-chapter-name { font-size: 0.85rem; font-weight: 500; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .plan-chapter-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

  .plan-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

  /* ========== 记忆模式卡片（3D翻转） ========== */
  .memory-card-area { max-width: 640px; margin: 0 auto; padding: 16px 0; }

  /* 3D翻转容器 */
  .memory-card-flipper {
    perspective: 1200px;
    width: 100%;
  }
  .memory-card-inner {
    position: relative;
    width: 100%;
    min-height: 320px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    grid-template-areas: "stack";
  }
  .memory-card-inner.flipped {
    transform: rotateY(180deg);
  }
  .memory-card-face {
    position: relative;
    grid-area: stack;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,113,227,0.1), 0 2px 8px rgba(0,113,227,0.06);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
  }
  .memory-card-front {
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
  }
  .memory-skip-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
  }
  .memory-skip-btn:hover { color: var(--error); }
  .skip-icon {
    display: block;
    width: 18px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    position: relative;
  }
  .skip-icon::before,
  .skip-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 1.5px;
    background: currentColor;
    transform-origin: center;
  }
  .skip-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
  .skip-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .memory-card-timer { position: absolute; top: 16px; right: 24px; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; line-height: 28px; }
  .memory-card-back {
    transform: rotateY(180deg);
  }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

  /* 卡片内容样式 */
  .memory-card-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
  .memory-card-name { font-size: 1.6rem; font-weight: 700; color: var(--text-main); line-height: 1.4; margin-bottom: 16px; }
  .memory-card-hint { font-size: 1rem; color: var(--text-muted); margin-bottom: 28px; }
  .memory-card-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }

  .memory-card-title { font-size: 1.2rem; font-weight: 700; color: var(--primary); line-height: 1.4; margin-bottom: 12px; }
  .memory-card-content { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.8; white-space: pre-wrap; padding: 16px 18px; background: var(--bg-subtle); border-radius: var(--radius-lg); border: 1px solid var(--border-light); margin-bottom: 6px; }
  .memory-card-chapter { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }

  /* 记忆提示（弱化） */
  .memory-card-tip {
    margin-bottom: 12px;
    padding-left: 14px;
    border-left: 3px solid var(--warning-light);
  }
  .memory-card-tip-text {
    font-size: 0.95rem;
    color: var(--warning);
    line-height: 1.6;
  }
  .memory-card-tip:empty, .memory-card-tip[style*="display:none"] { display: none; }

  /* 评级区域 */
  .memory-rate-title { text-align: center; font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 16px; font-weight: 500; }
  .memory-rate-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
  .memory-rate-btn {
    flex: 1;
    min-width: 100px;
    max-width: 140px;
    padding: 16px 14px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .memory-rate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
  .memory-rate-btn:active { transform: translateY(0); }
  .memory-rate-btn .rate-label { font-size: 1rem; font-weight: 700; }

  .memory-rate-btn.rate-again { background: var(--error-soft); color: var(--error); }
  .memory-rate-btn.rate-again:hover { background: var(--error-soft); }
  .memory-rate-btn.rate-again.selected { background: var(--error); color: #fff; box-shadow: 0 4px 14px rgba(220,38,38,0.35); }
  .memory-rate-btn.rate-good { background: var(--success-soft); color: var(--success); }
  .memory-rate-btn.rate-good:hover { background: var(--success-light); }
  .memory-rate-btn.rate-good.selected { background: var(--success); color: #fff; box-shadow: 0 4px 14px rgba(22,163,74,0.35); }

  /* 翻面按钮 */
  .memory-flip-btn {
    padding: 12px 36px;
    font-size: 1rem;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,113,227,0.25);
  }
  .memory-flip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,113,227,0.35);
  }

  /* 再记一遍按钮 */
  .memory-retry-btn {
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 50px;
  }

  /* 卡片导航 */
  .memory-card-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  /* 重新选择入口 */
  .memory-card-reselect {
    text-align: center;
    margin-top: 16px;
  }
  .memory-card-reselect .btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 12px;
    transition: color 0.2s;
  }
  .memory-card-reselect .btn-text:hover {
    color: var(--primary);
  }

  /* 旧的AI提示样式保留兼容 */
  .memory-ai-hint { margin-top: 18px; padding: 14px 18px; background: var(--success-soft); border-left: 3px solid var(--border-light); border-radius: 0 8px 8px 0; font-size: 0.9rem; color: var(--success); line-height: 1.6; }

  /* 提取中横幅（已废弃，样式保留以防外部引用） */
  .extract-banner { background: var(--warning-soft); border: 1px solid var(--warning-light); border-radius: var(--radius-md); padding: 10px 16px; font-size: 0.9rem; color: var(--warning); font-weight: 600; text-align: center; }
  .extract-banner span::before { content: ''; }

  /* 打字机光标 */
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
  .typing::after {
    content: '|';
    color: var(--primary);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
  }

/* ============================================================
   卡片记忆小结页（memory-summary.js）
   ============================================================ */
.memory-summary {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  animation: msFadeIn 0.4s ease;
}
@keyframes msFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ms-header {
  text-align: center;
  margin-bottom: 16px;
}
.ms-emoji {
  font-size: 48px;
  margin-bottom: 8px;
}
.ms-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

/* 数据概览 */
.ms-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.ms-stat-card {
  flex: 1;
  max-width: 160px;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px 12px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
}
.ms-stat-card:hover {
  transform: translateY(-2px);
}
.ms-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
}
.ms-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* 未记住列表区域 */
.ms-section {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.ms-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg-subtle);
}
.ms-all-mastered {
  text-align: center;
  font-size: 18px;
  color: var(--success);
  font-weight: 600;
  padding: 20px 0;
}
.ms-failed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ms-failed-item {
  background: var(--bg-subtle);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  transition: background 0.15s ease;
}
.ms-failed-item:hover {
  background: var(--bg-hover);
}
.ms-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.ms-item-tip {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 按钮 */
.ms-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}
.ms-btn-primary,
.ms-btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.ms-btn-primary {
  background: var(--primary);
  color: #fff;
}
.ms-btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,113,227,0.25);
}
.ms-btn-primary:active {
  transform: translateY(0);
}
.ms-btn-secondary {
  background: var(--bg-hover);
  color: var(--text-main);
}
.ms-btn-secondary:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}
.ms-btn-secondary:active {
  transform: translateY(0);
}

/* 错误提示 */
.ms-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--error);
  font-size: 15px;
}

/* ============================================================
   综合测验结果页（quiz-summary.js）
   ============================================================ */

/* 头部得分区 */
.qs-header {
  margin-bottom: 28px;
}
.qs-score-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 12px;
  letter-spacing: 0.5px;
}
.qs-score-percent {
  font-size: 64px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 8px 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.qs-score-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 统计卡片 */
.qs-stats {
  flex-wrap: wrap;
}
.qs-stat-card {
  opacity: 0;
  transform: translateY(16px);
  animation: qsFadeInUp 0.5s ease forwards;
}
@keyframes qsFadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 知识点掌握条形图 */
.qs-knowledge-section {
  padding: 24px;
}
.qs-knowledge-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qs-knowledge-item {
  opacity: 0;
  transform: translateY(12px);
  animation: qsFadeInUp 0.5s ease forwards;
}
.qs-knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.qs-knowledge-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.qs-knowledge-percent {
  font-size: 14px;
  font-weight: 700;
}
.qs-knowledge-bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}
.qs-knowledge-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 操作栏 */
.qs-actions {
  margin-top: 8px;
}

/* ============================================================
   错题紧凑列表（apply-summary.js hover/点击展开）
   ============================================================ */
.ms-failed-list-compact {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.ms-failed-row {
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s ease;
}
.ms-failed-row:last-child {
  border-bottom: none;
}
.ms-failed-row:hover {
  background: var(--bg-hover);
}
.ms-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
}
.ms-row-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  text-align: center;
}
.ms-row-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-row-chevron {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.ms-failed-row.expanded .ms-row-chevron {
  transform: rotate(90deg);
}
.ms-row-detail {
  max-height: 0;
  overflow: hidden;
  padding: 0 4px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
.ms-failed-row.expanded .ms-row-detail {
  max-height: 80px;
  padding: 0 4px 12px 36px;
}

/* ============================================================
   未掌握的知识点面板（wrong-answers.js）
   ============================================================ */

.wa-section {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.wa-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* 数字卡 */
.wa-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.wa-card {
  flex: 1;
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-subtle);
  border-radius: 16px;
  border: 1px solid var(--border-light);
}
.wa-card-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
}
.wa-card-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* 学科分布 */
.wa-bars-title,
.wa-weak-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}
.wa-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.wa-bar-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 60px;
}
.wa-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.wa-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), #667eea);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.wa-bar-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  min-width: 24px;
  text-align: right;
}

/* 薄弱知识点 */
.wa-weak-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: 12px;
  margin-bottom: 8px;
}
.wa-weak-rank {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-weak-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.wa-weak-count {
  font-size: 13px;
  color: var(--text-muted);
}

.wa-filters-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.wa-filters-row .wa-subject-tabs {
  margin-bottom: 0;
}
.wa-filters-row .wa-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

/* 学科 tabs */
.wa-subject-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.wa-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  user-select: none;
  line-height: 1.5;
}
.wa-tab:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text-main);
}
.wa-tab.active {
  background: var(--primary);
  color: #fff;
}

/* 导出按钮（pill 描边风，与 wa-tab 同高） */
.wa-export-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.5;
}
.wa-export-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* 列表项 */
.wa-list-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.wa-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  transition: background 0.15s;
}
.wa-list-item:hover {
  background: var(--bg-hover);
}
.wa-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.wa-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.wa-item-preview {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}
.wa-item-sm2 {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}
.wa-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.wa-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.wa-status-pending {
  background: var(--warning-light);
  color: var(--warning);
}
.wa-status-mastered {
  background: var(--success-light);
  color: var(--success);
}

/* 操作菜单 */
.wa-menu-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.wa-menu-dropdown {
  position: absolute;
  right: 0;
  top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 10;
  min-width: 120px;
  overflow: hidden;
}
.wa-menu-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
}
.wa-menu-item:hover {
  background: var(--bg-hover);
}
.wa-item-menu {
  position: relative;
}

/* 导出区 */
.wa-export-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  margin-top: 8px;
}
.wa-export-checkbox,
.wa-export-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.wa-export-actions {
  margin-top: 20px;
}

/* 详情弹窗 */
.wa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.wa-modal {
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.wa-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.wa-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.wa-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.wa-modal-body {
  padding: 20px 24px;
}
.wa-detail-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.6;
}
.wa-detail-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.wa-detail-answer-row {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.wa-detail-explanation {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 14px;
  background: var(--bg-subtle);
  border-radius: 12px;
}

.wa-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- 自主检测 ---------- */
.st-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-hover);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.st-question {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bg-subtle);
}
.st-q-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}
.st-q-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.6;
}
.st-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.st-options.st-multi {
  flex-direction: column;
  gap: 6px;
}
.st-option-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.st-option-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.st-option-btn.selected {
  border-color: var(--primary);
  background: var(--bg-hover);
  color: var(--primary);
  font-weight: 600;
}
.st-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.st-option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.st-option-check:hover {
  background: var(--bg-hover);
}
.st-option-check input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.st-actions {
  margin-top: 20px;
  text-align: center;
}
.st-submit-btn {
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.st-submit-btn:hover {
  background: var(--primary-dark);
}
.st-result-pass {
  text-align: center;
  padding: 16px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.st-result-fail {
  text-align: center;
  padding: 16px;
  background: var(--error-soft);
  color: var(--error);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.st-result-details {
  margin-bottom: 16px;
}
.st-result-item {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}
.st-result-item.correct {
  background: var(--success-light);
  color: var(--success);
}
.st-result-item.wrong {
  background: var(--error-soft);
  color: var(--error);
}
.st-result-answer {
  margin-top: 4px;
  font-weight: 600;
}
.st-result-explanation {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
