/* Modified manager.css */

/* Word card hover effect (Manager parity) */
.word-card:hover, .word-card:focus-within {
  border-color: rgba(124, 92, 257, .34) !important;
  box-shadow: 0 8px 18px rgba(76, 92, 143, .1) !important;
}

/* Word title enhanced styling */
.word-title { font-size: 22px !important; font-weight: 860 !important; margin-bottom: 8px !important; letter-spacing: .005em; }

/* Pronunciation row (replaces inline display:flex) */
.word-pron-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Card right action area */
.word-card-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  align-items: center;
  padding-left: 12px;
}

/* Status button (78×78 bento square) */
.word-status-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 78px;
  height: 78px;
  padding: 4px;
  border-radius: 20px;
  line-height: 1.2;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.word-status-btn .status-label {
  font-size: 16px;
  font-weight: 800;
  opacity: 0.95;
  line-height: 1;
  margin-bottom: 2px;
}
.word-status-btn .status-stat {
  font-size: 9px;
  opacity: 0.85;
  font-weight: 700;
}

/* Action buttons column (edit + delete) */
.word-action-btns-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 78px;
}
.word-action-btn {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.word-action-btn span {
  font-size: 17px;
}

/* Note editor inline button overrides */
.note-actions .vb-btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* Word card border-radius (Manager parity) */
.word-card {
  border-radius: 20px;
}

/* Toolbar: Manager 三组 flex 布局 */
.words-toolbar {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px !important;
  margin-top: 14px;
  background: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
  position: sticky;
  top: 52px;
  z-index: 50;
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}

/* 三组通用 */
.words-toolbar .toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  position: relative;
  z-index: 1;
}

/* 左组：搜索区 */
.words-toolbar .toolbar-group-search {
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
}
.words-toolbar .toolbar-group-search .searchPopoverWrap {
  flex: 1 1 360px;
  min-width: 220px;
}
.words-toolbar .toolbar-group-search .searchPopoverWrap .vb-input {
  width: 100%;
}
.words-toolbar .toolbar-group-search .vb-input:not(.searchPopoverWrap .vb-input) {
  width: auto;
  min-width: 0;
}

/* 中组：复习入口 */
.words-toolbar .toolbar-group-primary {
  justify-content: center !important;
  min-width: 100px;
}

/* 右组：系统控件 */
.words-toolbar .toolbar-group-system {
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
}

/* 全选 pill */
.words-toolbar .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.words-toolbar .pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--vb-brand, #7c3aed);
  cursor: pointer;
}

/* 视图切换 checkbox pill（Manager .toolbar-checkbox 风格） */
.toolbar-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.toolbar-checkbox:hover {
  border-color: #c4b5fd;
  background: #faf8ff;
}
.toolbar-checkbox input[type="checkbox"] {
  accent-color: #7c3aed;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* 分隔线 */
.toolbar-divider {
  width: 1px;
  height: 20px;
  background: rgba(124, 58, 237, 0.15);
  margin: 0 4px;
}

/* 导入/导出固定宽度 */
.btn-io {
  text-align: center;
  justify-content: center;
  min-width: 56px;
}

/* 排序方向按钮 */
#btn-sort-dir {
  justify-content: center !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

/* 响应式折叠 */
@media (max-width: 900px) {
  .words-toolbar .toolbar-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .words-toolbar .toolbar-group-search .searchPopoverWrap {
    flex-basis: 100%;
  }
  .words-toolbar .toolbar-group-system {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }
  .toolbar-divider {
    display: none;
  }
}

/* ================================================================
 * Quotes Toolbar: Manager 三组布局（复用 words-toolbar 模式）
 * ================================================================ */
.quotes-toolbar {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px !important;
  margin-top: 14px;
  background: var(--bg-primary, #f8fafc) !important;
  border: 0 !important;
  box-shadow: none !important;
  position: sticky;
  top: 52px;
  z-index: 50;
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}
.quotes-toolbar .toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  position: relative;
  z-index: 1;
}
.quotes-toolbar .toolbar-group-search {
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
}
.quotes-toolbar .toolbar-group-search .searchPopoverWrap {
  flex: 1 1 360px;
  min-width: 220px;
}
.quotes-toolbar .toolbar-group-search .searchPopoverWrap .vb-input {
  width: 100%;
}
.quotes-toolbar .toolbar-group-search .vb-input:not(.searchPopoverWrap .vb-input) {
  width: auto;
  min-width: 0;
}
.quotes-toolbar .toolbar-group-primary {
  justify-content: center !important;
  min-width: 100px;
}
.quotes-toolbar .toolbar-group-primary.is-empty {
  visibility: hidden !important;
  pointer-events: none !important;
}
.quotes-toolbar .toolbar-group-system {
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}
.quotes-toolbar .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.quotes-toolbar .pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--vb-brand, #7c3aed);
  cursor: pointer;
}
.quotes-toolbar #btn-sort-dir {
  justify-content: center !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}
@media (max-width: 900px) {
  .quotes-toolbar .toolbar-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .quotes-toolbar .toolbar-group-search .searchPopoverWrap {
    flex-basis: 100%;
  }
  .quotes-toolbar .toolbar-group-system {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }
}

/* 回到顶部悬浮按钮 */
#hub-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 1400;
  border: 1px solid rgba(124, 92, 255, .42);
  background: linear-gradient(90deg, #7c5cff, #a78bfa);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 860;
  box-shadow: 0 12px 24px rgba(79, 70, 229, .3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  cursor: pointer;
}
#hub-back-to-top[data-on="1"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ================================================================
 * Bento Dashboard 三卡布局（对齐 Manager heroHead 风格）
 * ================================================================ */

.bento-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(480px, 1.8fr);
  gap: 20px;
  margin-bottom: 20px;
}

.bento-card {
  background: rgba(255,255,255,0.70);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid rgba(124,58,237,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* ── 卡片 1：今日目标 ── */

.bento-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bento-title {
  font-size: 16px;
  font-weight: 850;
  margin: 0;
  color: var(--vb-text, #1e293b);
}
.bento-ring-pct {
  font-size: 14px;
  font-weight: 800;
  color: var(--vb-brand, #7c3aed);
  background: rgba(124,58,237,0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

/* 日进度条 */
.bento-daily-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  overflow: hidden;
}
.bento-daily-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #a78bfa);
  transition: width 300ms ease;
}

/* SVG 环形 + 对比柱 */
.bento-review-dashboard {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.bento-ring-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bento-goal-ring {
  width: 112px;
  height: 112px;
}
.bento-goal-ring .bg {
  stroke: rgba(15,23,42,0.08);
}
.bento-goal-ring .progress {
  stroke: #7c3aed;
  transition: stroke-dasharray 400ms ease;
}
.bento-goal-ring .ring-main {
  font-size: 8px;
  font-weight: 850;
  fill: var(--vb-text, #1e293b);
}
.bento-goal-ring .ring-sep {
  font-size: 5px;
  fill: var(--vb-muted, #94a3b8);
  font-weight: 600;
}

/* 周/月对比柱状图 */
.bento-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bento-compare-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bento-compare-label {
  font-size: 11px;
  font-weight: 750;
  color: var(--vb-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bento-compare-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}
.bento-compare-bar {
  width: 22px;
  height: 100%;
  border-radius: 8px;
  background: rgba(15,23,42,0.05);
  position: relative;
  overflow: hidden;
}
.bento-compare-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 8px;
  background: linear-gradient(to top, #7c3aed, #a78bfa);
  transition: height 300ms ease;
}
.bento-compare-bar-fill.secondary {
  background: linear-gradient(to top, #c4b5fd, #ddd6fe);
}
.bento-compare-nums {
  font-size: 11px;
  font-weight: 700;
  color: var(--vb-text, #1e293b);
}
.bento-compare-delta {
  font-size: 10px;
  font-weight: 800;
  color: #16a34a;
}

/* 累计复习 */
.bento-review-total {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(124,58,237,0.04);
}
.bento-review-total-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--vb-muted, #94a3b8);
}
.bento-review-total-num {
  font-size: 14px;
  font-weight: 850;
  color: var(--vb-text, #1e293b);
}

/* CTA 按钮 */
.bento-cta-wrap {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.bento-cta-btn {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.30);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bento-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,0.40);
}
.bento-cta-btn.secondary {
  background: rgba(124,58,237,0.08);
  color: var(--vb-brand, #7c3aed);
  box-shadow: none;
}
.bento-cta-btn.secondary:hover {
  background: rgba(124,58,237,0.14);
}

/* 连续打卡 */
.bento-streak {
  font-size: 12px;
  font-weight: 750;
  color: var(--vb-muted, #94a3b8);
  text-align: center;
}

/* ── 卡片 2：等级进度 ── */

.bento-level-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bento-level-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bento-level-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245,158,11,0.30);
}
.bento-level-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--vb-muted, #94a3b8);
}
.bento-level-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--vb-text, #1e293b);
  line-height: 1.1;
}

/* XP 进度条 */
.bento-xp-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bento-xp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--vb-muted, #94a3b8);
}
.bento-xp-today {
  color: #16a34a;
  font-weight: 800;
}
.bento-xp-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  overflow: hidden;
}
.bento-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #a78bfa);
  transition: width 300ms ease;
}
.bento-xp-fill.max {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245,158,11,0.3);
}
.bento-xp-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--vb-muted, #94a3b8);
}

/* 徽章墙 */
.bento-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bento-badge {
  font-size: 11px;
  font-weight: 850;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  color: #334155;
}
.bento-badge.is-gold {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border-color: rgba(202,138,4,0.45);
  color: #7a4a00;
}
.bento-badge.is-silver {
  background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
  border-color: rgba(148,163,184,0.55);
  color: #475569;
}
.bento-badge.is-bronze {
  background: linear-gradient(135deg, #fcd9b6, #d97706);
  border-color: rgba(180,83,9,0.45);
  color: #6b3b00;
}
.bento-badge-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 2px;
  font-size: 12px;
}
.bento-badge-count {
  font-weight: 700;
  color: var(--vb-text, #334155);
}
.bento-badge-wall-link {
  color: #7c3aed;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.bento-badge-wall-link:hover {
  text-decoration: underline;
}

/* ── 单词状态 ── */

.bento-wordstats-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(124,58,237,0.06);
}
.bento-ws-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bento-ws-title {
  font-size: 14px;
  font-weight: 850;
  color: var(--vb-text, #1e293b);
}
.bento-ws-total {
  font-size: 12px;
  font-weight: 750;
  color: var(--vb-muted, #94a3b8);
}

/* 比例条 */
.bento-ratio-bar {
  height: 8px;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  background: rgba(15,23,42,0.04);
}
.ratio-seg {
  height: 100%;
  transition: width 300ms ease;
}
.ratio-seg.red { background: linear-gradient(90deg, #f87171, #ef4444); }
.ratio-seg.yellow { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.ratio-seg.green { background: linear-gradient(90deg, #4ade80, #22c55e); }

/* 状态标签 */
.bento-status-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}
.status-tag.red { background: rgba(248,113,113,0.10); color: #dc2626; }
.status-tag.yellow { background: rgba(251,191,36,0.10); color: #d97706; }
.status-tag.green { background: rgba(74,222,128,0.10); color: #16a34a; }
.status-tag b { font-weight: 850; margin-left: 2px; }

/* 掌握度环形 */
.bento-mastery-row {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.bento-mastery-orbit {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bento-mastery-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.mo-track { stroke: rgba(15,23,42,0.06); }
.mo-progress {
  stroke: #22c55e;
  transition: stroke-dasharray 400ms ease;
}
.mo-center {
  position: relative;
  z-index: 1;
  text-align: center;
}
.mo-value {
  font-size: 24px;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
}
.mo-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--vb-muted, #94a3b8);
  margin-top: 2px;
}

/* Bento 响应式 */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* Bento 暗色模式 */
[data-theme="dark"] .bento-card {
  background: rgba(17,26,58,0.86);
  border-color: rgba(125,138,207,0.20);
}
[data-theme="dark"] .bento-title,
[data-theme="dark"] .bento-level-num,
[data-theme="dark"] .bento-ws-title,
[data-theme="dark"] .bento-review-total-num,
[data-theme="dark"] .bento-compare-nums {
  color: #e7eeff;
}
[data-theme="dark"] .bento-ring-pct {
  background: rgba(167,139,250,0.15);
  color: #a5b4fc;
}
[data-theme="dark"] .bento-daily-progress,
[data-theme="dark"] .bento-xp-track {
  background: rgba(148,163,184,0.15);
}
[data-theme="dark"] .bento-goal-ring .bg {
  stroke: rgba(148,163,184,0.15);
}
[data-theme="dark"] .bento-goal-ring .progress {
  stroke: #a78bfa;
}
[data-theme="dark"] .bento-goal-ring .ring-main {
  fill: #e7eeff;
}
[data-theme="dark"] .bento-goal-ring .ring-sep {
  fill: #94a3b8;
}
[data-theme="dark"] .bento-compare-bar {
  background: rgba(148,163,184,0.10);
}
[data-theme="dark"] .bento-compare-bar-fill {
  background: linear-gradient(to top, #7c3aed, #a78bfa);
}
[data-theme="dark"] .bento-compare-bar-fill.secondary {
  background: linear-gradient(to top, #6d28d9, #7c3aed);
}
[data-theme="dark"] .bento-review-total {
  background: rgba(124,58,237,0.08);
}
[data-theme="dark"] .bento-cta-btn.secondary {
  background: rgba(167,139,250,0.12);
  color: #a5b4fc;
}
[data-theme="dark"] .bento-cta-btn.secondary:hover {
  background: rgba(167,139,250,0.20);
}
[data-theme="dark"] .bento-badge {
  background: rgba(167,139,250,0.10);
  border-color: rgba(167,139,250,0.25);
  color: #e7eeff;
}
[data-theme="dark"] .bento-badge.is-gold {
  background: rgba(251,191,36,0.18);
  border-color: rgba(251,191,36,0.35);
  color: #fbbf24;
}
[data-theme="dark"] .bento-wordstats-section {
  border-top-color: rgba(125,138,207,0.15);
}
[data-theme="dark"] .bento-ratio-bar {
  background: rgba(148,163,184,0.10);
}
[data-theme="dark"] .status-tag.red {
  background: rgba(248,113,113,0.12);
  color: #fca5a5;
}
[data-theme="dark"] .status-tag.yellow {
  background: rgba(251,191,36,0.12);
  color: #fde68a;
}
[data-theme="dark"] .status-tag.green {
  background: rgba(74,222,128,0.12);
  color: #86efac;
}
[data-theme="dark"] .mo-track {
  stroke: rgba(148,163,184,0.12);
}
[data-theme="dark"] .mo-progress {
  stroke: #4ade80;
}
[data-theme="dark"] .mo-value {
  color: #4ade80;
}

.review-stats-wrapper { margin-top: 16px; }
.flag-btn { background:#f4f6ff; border:1px solid #e6e9ff; }

/* ========== 加载状态 & 错误状态 Overlay ========== */
.loading-overlay,
.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
}

.loading-overlay.vb-dark,
.error-overlay.vb-dark {
  background: rgba(15, 23, 42, 0.95);
}

.loading-content,
.error-content {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 14px;
  color: #64748b;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-title {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.error-message {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
  max-width: 320px;
}

.error-retry-btn {
  padding: 12px 32px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.error-retry-btn:hover {
  background: #4f46e5;
}

/* ========== Pronunciation flag badge (smaller & lighter) ========== */

.pron-flag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 28px;
	padding: 6px 12px;
	margin-right: 8px;
	border-radius: 12px;
	background: #F4F6FA;
	border: 1px solid rgba(0,0,0,0.06);
	box-shadow: none;
	font-size: 15px;
	line-height: 1;
	transition: all 0.2s ease;
}
.pron-flag:last-child { margin-right: 0; }
.pron-flag:hover {
	background: #E3EAF6;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.pron-flag-wrap {
	display: inline-flex;
	flex-direction: row;
	gap: 8px;
}

/* ========== Review stat cards: mini bar chart ========== */
.review-compare {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 8px;
}

.review-compare .numbers {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.review-compare .numbers .main {
	font-size: 18px;
	font-weight: 800;
}

.review-compare .numbers .sub {
	font-size: 12px;
	opacity: 0.75;
}

.mini-bars {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	height: 34px;
	width: 56px;
}

.mini-bars .bar {
	width: 20px;
	border-radius: 8px;
	background: rgba(255,255,255,0.55);
	border: 1px solid rgba(0,0,0,0.05);
}

.mini-bars .bar.current {
	background: rgba(255,255,255,0.85);
}

.mini-bars .bar.prev {
	background: rgba(255,255,255,0.45);
}

/* ========== Progress bar: make it look like a component, not a divider ========== */
.progress-card {
	border-radius: 16px;
	background: rgba(255,255,255,0.14);
	border: 1px solid rgba(255,255,255,0.18);
	padding: 12px 14px;
	backdrop-filter: blur(8px);
}

.progress-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.progress-row .label {
	font-size: 14px;
	opacity: 0.92;
	font-weight: 700;
}

.progress-row .pct {
	font-size: 13px;
	opacity: 0.9;
	font-weight: 700;
}

.progress-track {
	height: 12px;
	border-radius: 999px;
	background: rgba(255,255,255,0.22);
	overflow: hidden;
	border: 1px solid rgba(0,0,0,0.06);
}

.progress-fill {
	height: 100%;
	border-radius: 999px;
	background: rgba(255,255,255,0.85);
	box-shadow: 0 6px 16px rgba(0,0,0,0.08);
	width: 0%;
	transition: width 220ms ease;
}

/* ===== Gamified Dashboard ===== */
#dashboard{margin-top:14px;display:block}
#dashboard .dash-wrap{display:flex;flex-direction:column;gap:12px}
#dashboard .dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
#dashboard .dash-card{
  background:rgba(255,255,255,0.65);
  border-radius:16px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,0.45);
  box-shadow:0 10px 26px rgba(0,0,0,0.12), 0 0 22px rgba(124,58,237,0.10);
  backdrop-filter:blur(10px);
  transition:transform .18s ease, box-shadow .18s ease;
  position:relative;
  overflow:hidden;
  cursor:pointer;
}
#dashboard .dash-card:hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(0,0,0,0.16), 0 0 30px rgba(99,102,241,0.18)}
#dashboard .dash-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
#dashboard .dash-kpi{font-size:20px;font-weight:900;margin-top:6px}
#dashboard .dash-title{font-weight:900;font-size:13px;opacity:.9;letter-spacing:.2px}
#dashboard .dash-sub{font-size:12px;opacity:.8}
#dashboard .dash-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
#dashboard .dash-badge{font-size:11px;font-weight:900;border-radius:999px;padding:4px 8px;border:1px solid rgba(0,0,0,0.06);background:#fff;color:#334155}
#dashboard .dash-badge.is-gold{background:linear-gradient(135deg,#fde68a,#fbbf24);border-color:rgba(202,138,4,.45);color:#7a4a00;box-shadow:0 4px 12px rgba(251,191,36,.35)}
#dashboard .dash-badge.is-silver{background:linear-gradient(135deg,#e5e7eb,#cbd5e1);border-color:rgba(148,163,184,.55);color:#475569}
#dashboard .dash-badge.is-bronze{background:linear-gradient(135deg,#fcd9b6,#d97706);border-color:rgba(180,83,9,.45);color:#6b3b00}
#dashboard .dash-bar{height:10px;border-radius:999px;background:rgba(15,23,42,.10);overflow:hidden;border:1px solid rgba(15,23,42,.08);margin-top:8px}
#dashboard .dash-bar-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#60a5fa,#7c3aed)}
#dashboard .dash-stack{display:flex;height:10px;border-radius:999px;overflow:hidden;background:rgba(15,23,42,.10);border:1px solid rgba(15,23,42,.08);margin-top:8px}
#dashboard .dash-stack-red{background:#f87171;width:0%}
#dashboard .dash-stack-yellow{background:#f59e0b;width:0%}
#dashboard .dash-stack-green{background:#22c55e;width:0%}
#dashboard .dash-compare-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px}
#dashboard .dash-compare-kpi{display:flex;flex-direction:column;gap:2px}
#dashboard .dash-compare-kpi .big{font-size:20px;font-weight:900}
#dashboard .dash-compare-kpi .muted{font-size:12px;opacity:.75}
#dashboard .dash-delta{font-size:12px;font-weight:900;opacity:.85}
#dashboard .dash-btn{
  margin-top:8px;
  border:0;border-radius:999px;padding:10px 14px;font-weight:900;cursor:pointer;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;box-shadow:0 10px 20px rgba(79,70,229,.25)
}
#dashboard .celebrate{animation:dashCelebrate 1s ease}
@keyframes dashCelebrate{
  0%{transform:scale(1);box-shadow:0 10px 26px rgba(0,0,0,0.12), 0 0 22px rgba(124,58,237,0.10)}
  40%{transform:scale(1.03);box-shadow:0 18px 40px rgba(0,0,0,0.18), 0 0 36px rgba(124,58,237,0.22)}
  100%{transform:scale(1);box-shadow:0 10px 26px rgba(0,0,0,0.12), 0 0 22px rgba(124,58,237,0.10)}
}

/* Hide legacy top stats to avoid duplicate dashboard */
.hero .progressRow,
.hero #reviewMini,
.hero #badgeRow{ display:none !important; }

/* Mini compare cards occupy full width on small screens */
@media(max-width:980px){
  #dashboard .dash-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
}


/* === Visual System v2 Overrides (unified palette) === */

#dashboard .dash-card{
  border-radius: var(--vb-r-card);
  box-shadow: var(--vb-shadow-md);
  border: 1px solid var(--vb-border);
  background: rgba(255,255,255,0.70);
  color: var(--vb-text);
}
#dashboard .dash-title{color:var(--vb-text);opacity:1}
#dashboard .dash-kpi{color:var(--vb-text)}
#dashboard .dash-sub{color:var(--vb-muted);opacity:1}
#dashboard .dash-compare-kpi .muted{color:var(--vb-muted);opacity:1}
#dashboard .dash-delta{color:var(--vb-text);opacity:.85}
#dashboard .dash-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--vb-shadow-md);
}
#dashboard .dash-badge{border-radius: var(--vb-r-pill);font-size: var(--vb-fs-cap);}
#dashboard .dash-badge.is-gold{background: var(--vb-warning-bg);border-color: var(--vb-warning-bd);color: var(--vb-warning-fg);box-shadow:none}
#dashboard .dash-badge.is-silver{background: rgba(15,23,42,.06);border-color: var(--vb-border);color: var(--vb-text)}
#dashboard .dash-badge.is-bronze{background: rgba(15,23,42,.06);border-color: var(--vb-border);color: var(--vb-text)}
#dashboard .dash-btn{border-radius: var(--vb-r-btn);background: var(--vb-brand-grad);box-shadow: var(--vb-shadow-md)}
#dashboard .dash-bar-fill{background: var(--vb-brand-grad)}

/* Dark theme: dashboard cards must switch to dark surface, otherwise text contrast breaks. */
@media (prefers-color-scheme: dark){
  body:not(.vb-force-light) #dashboard .dash-card{
    background: rgba(17,26,58,0.86);
    border-color: rgba(125,138,207,0.34);
    color: #e7eeff;
  }
  body:not(.vb-force-light) #dashboard .dash-title,
  body:not(.vb-force-light) #dashboard .dash-kpi,
  body:not(.vb-force-light) #dashboard .dash-delta{
    color:#e7eeff;
  }
  body:not(.vb-force-light) #dashboard .dash-sub,
  body:not(.vb-force-light) #dashboard .dash-compare-kpi .muted{
    color:#b7c4ea;
  }
  body:not(.vb-force-light) #dashboard .dash-bar,
  body:not(.vb-force-light) #dashboard .dash-stack{
    background: rgba(148,163,184,.18);
    border-color: rgba(148,163,184,.26);
  }
  body:not(.vb-force-light) #dashboard .dash-badge.is-silver,
  body:not(.vb-force-light) #dashboard .dash-badge.is-bronze{
    background: rgba(167,139,250,.14);
    border-color: rgba(167,139,250,.32);
    color:#e7eeff;
  }

  /* Night mode: checkboxes and buttons */
  body:not(.vb-force-light) .pill input[type="checkbox"],
  body:not(.vb-force-light) input[type="checkbox"]{
    accent-color: #a78bfa;
    background: rgba(167,139,250,.2);
    border-color: rgba(167,139,250,.4);
  }
  body:not(.vb-force-light) .btn.secondary{
    background: rgba(167,139,250,.14);
    border-color: rgba(167,139,250,.35);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .btn.ghost{
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .btn.ghost:hover{
    background: rgba(167,139,250,.2);
  }
  body:not(.vb-force-light) .btn.primary{
    background: linear-gradient(135deg,#6d28d9,#5b21b6);
    border-color: rgba(167,139,250,.45);
    color: #fff;
  }
  body:not(.vb-force-light) .select{
    background: rgba(30,23,68,.85);
    border-color: rgba(167,139,250,.35);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .input,
  body:not(.vb-force-light) .searchInput{
    background: rgba(30,23,68,.85);
    border-color: rgba(167,139,250,.35);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .searchInput::placeholder{
    color: rgba(231,238,255,.5);
  }

  /* Night mode: module tabs */
  body:not(.vb-force-light) .module-tabs .tab{
    background: rgba(167,139,250,.1);
    border-color: rgba(167,139,250,.25);
    color: rgba(231,238,255,.75);
  }
  body:not(.vb-force-light) .module-tabs .tab.active{
    background: rgba(124,58,237,.35);
    border-color: rgba(167,139,250,.45);
    color: #fff;
  }
}

body.vb-force-dark #dashboard .dash-card{
  background: rgba(17,26,58,0.86);
  border-color: rgba(125,138,207,0.34);
  color: #e7eeff;
}
body.vb-force-dark #dashboard .dash-title,
body.vb-force-dark #dashboard .dash-kpi,
body.vb-force-dark #dashboard .dash-delta{
  color:#e7eeff;
}
body.vb-force-dark #dashboard .dash-sub,
body.vb-force-dark #dashboard .dash-compare-kpi .muted{
  color:#b7c4ea;
}
body.vb-force-dark #dashboard .dash-bar,
body.vb-force-dark #dashboard .dash-stack{
  background: rgba(148,163,184,.18);
  border-color: rgba(148,163,184,.26);
}
body.vb-force-dark #dashboard .dash-badge.is-silver,
body.vb-force-dark #dashboard .dash-badge.is-bronze{
  background: rgba(167,139,250,.14);
  border-color: rgba(167,139,250,.32);
  color:#e7eeff;
}

/* === Dark mode: word cards + toolbar === */
@media (prefers-color-scheme: dark) {
  body:not(.vb-force-light) .word-card {
    background: rgba(17,26,58,0.86);
    border-color: rgba(125,138,207,0.25);
  }
  body:not(.vb-force-light) .word-card:hover,
  body:not(.vb-force-light) .word-card:focus-within {
    border-color: rgba(167,139,250,.45);
    box-shadow: 0 8px 20px rgba(99,102,241,.18);
  }
  body:not(.vb-force-light) .word-title { color: #e7eeff; }
  body:not(.vb-force-light) .word-meaning,
  body:not(.vb-force-light) .word-en,
  body:not(.vb-force-light) .word-note { color: #b7c4ea; }
  body:not(.vb-force-light) .word-pron-row .muted { color: #b7c4ea; }
  body:not(.vb-force-light) .bento-sq-btn {
    background: rgba(30,41,80,0.85);
    border-color: rgba(125,138,207,0.3);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .bento-sq-btn:hover {
    background: rgba(40,51,100,0.9);
    border-color: rgba(167,139,250,.4);
  }
  body:not(.vb-force-light) .fold-btn {
    background: rgba(167,139,250,.08);
    border-color: rgba(167,139,250,.2);
    color: #b7c4ea;
  }
  body:not(.vb-force-light) .fold-btn:hover {
    background: rgba(167,139,250,.18);
    border-color: rgba(167,139,250,.35);
  }
  body:not(.vb-force-light) .toolbar-checkbox {
    background: rgba(30, 35, 55, 0.8);
    border-color: rgba(100, 110, 150, 0.25);
    color: #a8b6d8;
  }
  body:not(.vb-force-light) .toolbar-checkbox:hover {
    background: rgba(40, 45, 70, 0.9);
    border-color: rgba(120, 130, 170, 0.35);
  }
  body:not(.vb-force-light) .toolbar-checkbox input[type="checkbox"] {
    accent-color: #5a4d94;
    opacity: 0.85;
  }
  body:not(.vb-force-light) .toolbar-group-search .vb-input,
  body:not(.vb-force-light) .toolbar-group-system .vb-input {
    background: rgba(30,23,68,.85);
    border-color: rgba(167,139,250,.35);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .words-batch-bar {
    background: rgba(17,26,58,0.6);
  }
  body:not(.vb-force-light) .word-note-editor {
    background: rgba(30,41,80,0.6);
    border-color: rgba(125,138,207,0.2);
  }
}

body.vb-force-dark .word-card {
  background: rgba(17,26,58,0.86);
  border-color: rgba(125,138,207,0.25);
}
body.vb-force-dark .word-card:hover,
body.vb-force-dark .word-card:focus-within {
  border-color: rgba(167,139,250,.45);
  box-shadow: 0 8px 20px rgba(99,102,241,.18);
}
body.vb-force-dark .word-title { color: #e7eeff; }
body.vb-force-dark .word-meaning,
body.vb-force-dark .word-en,
body.vb-force-dark .word-note { color: #b7c4ea; }
body.vb-force-dark .word-pron-row .muted { color: #b7c4ea; }
body.vb-force-dark .bento-sq-btn {
  background: rgba(30,41,80,0.85);
  border-color: rgba(125,138,207,0.3);
  color: #e7eeff;
}
body.vb-force-dark .bento-sq-btn:hover {
  background: rgba(40,51,100,0.9);
  border-color: rgba(167,139,250,.4);
}
body.vb-force-dark .fold-btn {
  background: rgba(167,139,250,.08);
  border-color: rgba(167,139,250,.2);
  color: #b7c4ea;
}
body.vb-force-dark .fold-btn:hover {
  background: rgba(167,139,250,.18);
  border-color: rgba(167,139,250,.35);
}
body.vb-force-dark .toolbar-checkbox {
  background: rgba(30, 35, 55, 0.8);
  border-color: rgba(100, 110, 150, 0.25);
  color: #a8b6d8;
}
body.vb-force-dark .toolbar-checkbox:hover {
  background: rgba(40, 45, 70, 0.9);
  border-color: rgba(120, 130, 170, 0.35);
}
body.vb-force-dark .toolbar-checkbox input[type="checkbox"] {
  accent-color: #5a4d94;
  opacity: 0.85;
}
body.vb-force-dark .toolbar-group-search .vb-input,
body.vb-force-dark .toolbar-group-system .vb-input {
  background: rgba(30,23,68,.85);
  border-color: rgba(167,139,250,.35);
  color: #e7eeff;
}
body.vb-force-dark .words-batch-bar {
  background: rgba(17,26,58,0.6);
}
body.vb-force-dark .word-note-editor {
  background: rgba(30,41,80,0.6);
  border-color: rgba(125,138,207,0.2);
}

/* Toolbar compact menus */
.toolbarMenu{
  position: relative;
}
.toolbarMenu > summary{
  list-style: none;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  line-height: 1.2;
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px;
  box-sizing: border-box;
  white-space: nowrap;
}
.toolbarMenu > summary::-webkit-details-marker{
  display:none;
}
.toolbarMenu[open] > summary{
  border-color: rgba(124,58,237,.42);
  box-shadow: 0 0 0 2px rgba(124,58,237,.18);
}
.toolbarMenuPanel{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(124,58,237,.24);
  box-shadow: 0 12px 30px rgba(24,30,64,.16);
}
.toolbarMenuPanel .btn{
  min-height: 36px;
  height: 36px;
  justify-content: flex-start;
  font-size: 13px;
}
.toolbarMenuPanel .toolbarHelp{
  margin-top: 2px;
  color: #93a4d8;
  line-height: 1.35;
}
.toolbarOpt{
  display:flex;
  align-items:center;
  gap:8px;
  color:#1f2a52;
  font-size:12px;
  font-weight:700;
}
.toolbarOpt input{
  accent-color: #7c3aed;
}

body.vb-force-dark .toolbarMenuPanel{
  background: rgba(11,17,42,0.96);
  border: 1px solid rgba(124,58,237,.35);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
body.vb-force-dark .toolbarOpt{
  color:#dbe7ff;
}

/* Toolbar visibility control - 使用类名控制显示/隐藏，避免 style.display 被覆盖 */
#toolbarWords.toolbar-hidden,
#toolbarSentences.toolbar-hidden {
  display: none !important;
}

#toolbarWords .btn,
#toolbarWords .select,
#toolbarWords .toolbarMenu > summary,
#toolbarSentences .btn,
#toolbarSentences .select,
#toolbarSentences .toolbarMenu > summary{
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  line-height: 1.2;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#toolbarWords .select,
#toolbarSentences .select{
  line-height: 1.2;
}

body.vb-force-light .toolbarMenuPanel,
body:not(.vb-force-dark) .toolbarMenuPanel{
  background: #ffffff;
  border-color: rgba(124,58,237,.2);
  color: #1f2a52;
}
body.vb-force-light .toolbarOpt,
body:not(.vb-force-dark) .toolbarOpt{
  color:#1f2a52;
}

body.vb-force-light .toolbarMenu > summary,
body:not(.vb-force-dark) .toolbarMenu > summary{
  background: rgba(255,255,255,0.9);
  color: #1f2a52;
}

.assetFold{
  margin: 8px 0 12px;
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.64);
  overflow: hidden;
}
.assetFoldSummary{
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  color: #1f2a52;
}
.assetFoldSummary::-webkit-details-marker{
  display: none;
}
.assetFoldBody{
  padding: 8px 10px 12px;
}
body.vb-force-dark .assetFold{
  background: rgba(18,25,56,0.58);
  border-color: rgba(124,58,237,.32);
}
body.vb-force-dark .assetFoldSummary{
  color: #dbe7ff;
}

/* ===== Night mode: checkboxes and buttons ===== */
body.vb-force-dark .pill input[type="checkbox"],
body.vb-force-dark input[type="checkbox"]{
  accent-color: #a78bfa;
  color-scheme: dark;
}
body.vb-force-dark .btn.secondary{
  background: rgba(167,139,250,.14);
  border-color: rgba(167,139,250,.35);
  color: #e7eeff;
}
body.vb-force-dark .btn.ghost{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  color: #e7eeff;
}
body.vb-force-dark .btn.ghost:hover{
  background: rgba(167,139,250,.2);
}
body.vb-force-dark .btn.primary{
  background: linear-gradient(135deg,#6d28d9,#5b21b6);
  border-color: rgba(167,139,250,.45);
  color: #fff;
}
body.vb-force-dark .select{
  background: rgba(30,23,68,.85);
  border-color: rgba(167,139,250,.35);
  color: #e7eeff;
}
body.vb-force-dark .input{
  background: rgba(30,23,68,.85);
  border-color: rgba(167,139,250,.35);
  color: #e7eeff;
}
body.vb-force-dark .searchInput{
  background: rgba(30,23,68,.85);
  border-color: rgba(167,139,250,.35);
  color: #e7eeff;
}
body.vb-force-dark .searchInput::placeholder{
  color: rgba(231,238,255,.5);
}

/* Night mode: module tabs */
body.vb-force-dark .module-tabs .tab{
  background: rgba(167,139,250,.1);
  border-color: rgba(167,139,250,.25);
  color: rgba(231,238,255,.75);
}
body.vb-force-dark .module-tabs .tab.active{
  background: rgba(124,58,237,.35);
  border-color: rgba(167,139,250,.45);
  color: #fff;
}

/* Night mode: flag-btn, loading/error overlays */
body.vb-force-dark .flag-btn { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.25); }
body.vb-force-dark .loading-text,
body.vb-force-dark .error-title { color: #e7eeff; }
body.vb-force-dark .loading-subtext,
body.vb-force-dark .error-message { color: #b7c4ea; }

@media (prefers-color-scheme: dark) {
  body:not(.vb-force-light) .flag-btn { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.25); }
  body:not(.vb-force-light) .loading-text,
  body:not(.vb-force-light) .error-title { color: #e7eeff; }
  body:not(.vb-force-light) .loading-subtext,
  body:not(.vb-force-light) .error-message { color: #b7c4ea; }
}

/* ═══════════════════════════════════════════════════════════════
   暗色模式：工具栏硬编码白色覆盖 + Review 页面全量覆盖
   统一使用 body.vb-force-dark 新标准选择器（替代旧 [data-theme="dark"]）
   ═══════════════════════════════════════════════════════════════ */

/* --- 手动暗色：words-toolbar / quotes-toolbar 白色→深色 --- */
body.vb-force-dark .words-toolbar {
  background: rgba(17,26,58,0.96) !important;
  border-bottom: 1px solid rgba(125,138,207,0.25) !important;
}
body.vb-force-dark .quotes-toolbar {
  background: rgba(17,26,58,0.96) !important;
  border-bottom: 1px solid rgba(125,138,207,0.25) !important;
}
body.vb-force-dark .toolbarMenuPanel {
  background: rgba(17,26,58,0.98) !important;
  border-color: rgba(125,138,207,0.30) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.32) !important;
}
body.vb-force-dark .toolbarMenuPanel .toolbarHelp {
  color: #a5b4fc !important;
}

/* --- 手动暗色：Review 页面模式选择卡片 --- */
body.vb-force-dark .review-mode-btn {
  background: rgba(17,26,58,0.80);
  border-color: rgba(125,138,207,0.30);
  color: #e7eeff;
}
body.vb-force-dark .review-mode-btn:hover {
  border-color: #818cf8;
  background: rgba(30,45,80,0.85);
}
body.vb-force-dark .review-mode-btn.active {
  background: rgba(99,102,241,0.22);
  border-color: #818cf8;
}

/* --- 手动暗色：Review 配置面板 --- */
body.vb-force-dark .review-config-panel {
  background: rgba(17,26,58,0.70);
  border-color: rgba(125,138,207,0.25);
}
body.vb-force-dark .review-config-toggle {
  color: #b7c4ea;
}
body.vb-force-dark .review-config-row {
  color: #e7eeff;
}
body.vb-force-dark .review-config-row input[type="number"] {
  background: rgba(30,40,70,0.85);
  border-color: rgba(125,138,207,0.30);
  color: #e7eeff;
}
body.vb-force-dark .review-config-row .toggle-switch {
  background: rgba(148,163,184,0.30);
}
body.vb-force-dark .review-config-row .toggle-switch.on {
  background: #6366f1;
}
body.vb-force-dark .review-config-row .toggle-switch::after {
  background: #334155;
}

/* --- 手动暗色：Review ready 页 --- */
body.vb-force-dark .review-ready h2 { color: #e7eeff; }
body.vb-force-dark .review-ready p { color: #b7c4ea; }

/* --- 手动暗色：Review 卡片 --- */
body.vb-force-dark .review-card-face {
  background: rgba(17,26,58,0.92);
  border: 1px solid rgba(125,138,207,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,0.30);
}
body.vb-force-dark .review-word { color: #e7eeff; }
body.vb-force-dark .review-word-back { color: #e7eeff; }
body.vb-force-dark .review-phonetic-line { color: #94a3b8; }
body.vb-force-dark .review-cloze { color: #b7c4ea; }
body.vb-force-dark .review-card-divider {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* --- 手动暗色：Review 结果页 --- */
body.vb-force-dark .review-result h2 { color: #e7eeff; }
body.vb-force-dark .review-result-summary { color: #b7c4ea; }
body.vb-force-dark .review-result-encourage { color: #94a3b8; }
body.vb-force-dark .review-result-stat {
  background: rgba(17,26,58,0.70);
  border: 1px solid rgba(125,138,207,0.20);
}
body.vb-force-dark .review-result-stat .value { color: #e7eeff; }
body.vb-force-dark .review-result-stat .label { color: #94a3b8; }
body.vb-force-dark .review-result-detail {
  background: rgba(17,26,58,0.70);
  border: 1px solid rgba(125,138,207,0.20);
  color: #b7c4ea;
}
body.vb-force-dark .review-result-detail .detail-label { color: #94a3b8; }

/* --- 手动暗色：Review 空状态 --- */
body.vb-force-dark .review-empty h2 { color: #e7eeff; }
body.vb-force-dark .review-empty p { color: #94a3b8; }

/* --- 手动暗色：Review 编辑弹窗 --- */
body.vb-force-dark .review-edit-dialog {
  background: rgba(17,26,58,0.98);
  border: 1px solid rgba(125,138,207,0.30);
}
body.vb-force-dark .review-edit-title { color: #e7eeff; }
body.vb-force-dark .review-edit-field label { color: #94a3b8; }
body.vb-force-dark .review-edit-field textarea,
body.vb-force-dark .review-edit-field select {
  background: rgba(30,40,70,0.85);
  border-color: rgba(125,138,207,0.30);
  color: #e7eeff;
}

/* --- 手动暗色：Review 状态栏 / 统计行 --- */
body.vb-force-dark .review-status-bar { color: #94a3b8; }
body.vb-force-dark .review-stats-row .streak { color: #fcd34d; }
body.vb-force-dark .review-stats-row .correct { color: #4ade80; }
body.vb-force-dark .review-status-bar.is-feedback { color: #818cf8; }

/* --- 手动暗色：Review TTS 按钮 --- */
body.vb-force-dark .review-tts-btn {
  border-color: rgba(125,138,207,0.30);
  color: #b7c4ea;
}
body.vb-force-dark .review-tts-btn:hover {
  background: rgba(99,102,241,0.15);
  border-color: #818cf8;
}

/* --- 手动暗色：Review 评分按钮 (forgot/blurry/known) --- */
body.vb-force-dark .review-rate-btn.forgot { border-color: #f87171; }
body.vb-force-dark .review-rate-btn.forgot:hover { background: rgba(248,113,113,0.20); color: #f87171; }
body.vb-force-dark .review-rate-btn.blurry { border-color: #fcd34d; }
body.vb-force-dark .review-rate-btn.blurry:hover { background: rgba(252,211,77,0.20); color: #fcd34d; }
body.vb-force-dark .review-rate-btn.known { border-color: #4ade80; }
body.vb-force-dark .review-rate-btn.known:hover { background: rgba(74,222,128,0.20); color: #4ade80; }
body.vb-force-dark .review-rate-btn {
  background: rgba(17,26,58,0.85);
  color: #b7c4ea;
  border-color: rgba(125,138,207,0.30);
}
body.vb-force-dark .review-rate-btn:hover {
  background: rgba(30,45,80,0.90);
  border-color: rgba(167,139,250,0.40);
}

/* --- 手动暗色：Review 结果分数 --- */
body.vb-force-dark .review-result-score {
  background: linear-gradient(135deg, #818cf8, #4ade80);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- 手动暗色：卡片（通用 .card）强制深色 --- */
body.vb-force-dark .card {
  background: rgba(17,26,58,0.80);
  border-color: rgba(125,138,207,0.25);
  color: #e7eeff;
}
body.vb-force-dark .card-title { color: #e7eeff; }
body.vb-force-dark .card-body { color: #b7c4ea; }

/* --- 手动暗色：页面标题文字 --- */
body.vb-force-dark .page-header h1 { color: #e7eeff; }
body.vb-force-dark .page-header p { color: #b7c4ea; }

/* --- 手动暗色：Hub 主内容区背景（校准为更深色） --- */
body.vb-force-dark .hub-content {
  /* 使用 body 的背景色，保持一致性 */
}

/* --- 手动暗色：同步指示器 --- */
body.vb-force-dark .sync-indicator {
  background: rgba(30,45,80,0.60);
  color: #94a3b8;
}
body.vb-force-dark .sync-indicator .sync-text { color: #b7c4ea; }

/* --- 系统暗色 (prefers-color-scheme) 对应覆盖 --- */
@media (prefers-color-scheme: dark) {
  body:not(.vb-force-light) .words-toolbar {
    background: rgba(17,26,58,0.96) !important;
    border-bottom: 1px solid rgba(125,138,207,0.25) !important;
  }
  body:not(.vb-force-light) .quotes-toolbar {
    background: rgba(17,26,58,0.96) !important;
    border-bottom: 1px solid rgba(125,138,207,0.25) !important;
  }
  body:not(.vb-force-light) .review-mode-btn {
    background: rgba(17,26,58,0.80);
    border-color: rgba(125,138,207,0.30);
    color: #e7eeff;
  }
  body:not(.vb-force-light) .review-mode-btn:hover { border-color: #818cf8; }
  body:not(.vb-force-light) .review-mode-btn.active { background: rgba(99,102,241,0.22); border-color: #818cf8; }
  body:not(.vb-force-light) .review-config-panel {
    background: rgba(17,26,58,0.70);
    border-color: rgba(125,138,207,0.25);
  }
  body:not(.vb-force-light) .review-config-toggle { color: #b7c4ea; }
  body:not(.vb-force-light) .review-config-row { color: #e7eeff; }
  body:not(.vb-force-light) .review-card-face {
    background: rgba(17,26,58,0.92);
    border: 1px solid rgba(125,138,207,0.25);
  }
  body:not(.vb-force-light) .review-word,
  body:not(.vb-force-light) .review-word-back { color: #e7eeff; }
  body:not(.vb-force-light) .review-result h2 { color: #e7eeff; }
  body:not(.vb-force-light) .review-result-stat {
    background: rgba(17,26,58,0.70);
  }
  body:not(.vb-force-light) .review-result-stat .value { color: #e7eeff; }
}
