/* ========== 全局变量与重置 ========== */
:root {
  /* 品牌基调：官网 the1 体系（暖奶油白 + 近黑墨 + 硬细线 + 单一绿强调） */
  --brand-canvas: #f5f0e8;
  --brand-paper: #ffffff;
  --brand-ink: #1f1f1f;
  --brand-ink-2: #5c5751;
  --brand-ink-3: #918a80;
  --brand-accent: #8338ec;
  --brand-accent-dark: #6226b8;
  --brand-line: rgba(0, 0, 0, 0.1);
  --brand-shadow: none;

  --noun: #4A90D9;
  --verb: #E74C3C;
  --adj: #27AE60;
  --adv: #F39C12;
  --prep: #9B59B6;
  --conj: #7F8C8D;
  --article: #85C1E9;
  --indirect-obj: #2E5B8C;

  --bg-1: #FDF8F0;
  --bg-2: #F5EFE4;
  --bg-page: var(--brand-canvas);
  --bg-card: #FFFFFF;
  --text-1: #2D3436;
  --text-2: #636E72;
  --text-3: #B2BEC3;
  --border: var(--brand-line);
  --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(45, 52, 54, 0.08);
  --shadow-lg: 0 16px 48px rgba(45, 52, 54, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, #root {
  height: 100%;
  overflow-x: visible;
  overflow-y: visible;
}

/* ========== 全局统一返回按钮 ========== */
.page-back-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  transition: all 0.15s ease;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.page-back-btn:hover {
  background: #f0f0f5;
  color: #111827;
}

/* Dashboard 布局：顶层完全开放不裁剪 tooltip 等气泡；滚动由 .db-main 接管 */
.db-layout {
  overflow: visible;
  display: flex;
  height: 100vh;
}
html, body, #root {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Noto Sans SC", "Quicksand", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Quicksand", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-hand {
  font-family: "Patrick Hand", cursive;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(74, 144, 217, 0.4);
  outline-offset: 2px;
}

/* ========== 页面过渡 ========== */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}
.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms var(--ease-smooth), transform 400ms var(--ease-bounce);
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* ========== 词块样式 ========== */
.word-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 18px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
  user-select: none;
  transition: transform 200ms var(--ease-bounce), box-shadow 200ms var(--ease-smooth);
  position: relative;
  white-space: nowrap;
}

.word-block:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.word-block.noun { background: var(--noun); }
.word-block.verb { background: var(--verb); }
.word-block.adj { background: var(--adj); }
.word-block.adv { background: var(--adv); }
.word-block.prep { background: var(--prep); }
.word-block.conj { background: var(--conj); }
.word-block.article { background: var(--article); }
.word-block.indirect-obj { background: var(--indirect-obj); }

.word-block .pos-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-2);
  background: white;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}
.word-block:hover .pos-label {
  opacity: 1;
}

/* 积木顶部凸起效果 */
.word-block::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: inherit;
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
}

/* 积木飞入动画 */
@keyframes flyInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(120px) scale(0.8);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.word-block.fly-in {
  animation: flyInFromBottom 700ms var(--ease-bounce) both;
}

/* 脉动发光 */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(231, 76, 60, 0.5);
  }
  50% {
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 0 0 12px rgba(231, 76, 60, 0);
  }
}
.word-block.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* 抖动动画（错误） */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.word-block.shake {
  animation: shake 400ms ease-in-out;
}

/* 门禁提示脉冲动画 */
@keyframes gate-pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.7; transform: translateY(-2px); }
}

/* 课程页 tab 按钮可见性增强 */
.course-page-typeset .btn-ghost {
  color: var(--text-1) !important;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 200ms var(--ease-smooth);
  white-space: nowrap;
}
.btn-primary {
  background: var(--noun);
  color: white;
  box-shadow: 0 4px 0 #357ABD;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #357ABD;
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #357ABD;
}
.btn-secondary {
  background: white;
  color: var(--text-1);
  box-shadow: 0 2px 0 var(--border);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-1);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text-1);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* ========== 动画拆解弧线 ========== */
@keyframes drawArc {
  0% { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}
.arc-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawArc 800ms var(--ease-smooth) forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 500ms var(--ease-smooth) both;
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.3); }
  60% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.pop-in {
  animation: popIn 500ms var(--ease-bounce) both;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* ========== 彩带 ========== */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confettiFall 2s ease-in forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(400px) rotate(720deg);
  }
}

/* ========== 句法树 ========== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.tree-children {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  position: relative;
}
.tree-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--border);
  transform: translateY(-8px);
}
.tree-node-label {
  padding: 4px 12px;
  background: var(--bg-2);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-2);
  position: relative;
  z-index: 1;
}
.tree-leaf {
  font-weight: 600;
  color: var(--text-1);
}

/* ========== 折叠面板 ========== */
.collapsible {
  border-radius: var(--radius-md);
  background: var(--bg-1);
  border: 1px solid var(--border);
  overflow: hidden;
}
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 200ms;
}
.collapsible-header:hover {
  background: var(--bg-2);
}
.collapsible-body {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-smooth), padding 400ms var(--ease-smooth);
}
.collapsible.open .collapsible-body {
  padding: 0 20px 20px;
  max-height: 800px;
}
.collapsible-icon {
  transition: transform 300ms var(--ease-smooth);
}
.collapsible.open .collapsible-icon {
  transform: rotate(180deg);
}

/* ========== 拖拽词块 ========== */
.draggable {
  cursor: grab;
}
.draggable:active {
  cursor: grabbing;
}
.draggable.dragging {
  opacity: 0.7;
  transform: scale(1.1) rotate(3deg);
  z-index: 100;
}

.drop-zone {
  min-height: 80px;
  border: 3px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  align-items: center;
  transition: all 300ms var(--ease-smooth);
  background: rgba(255, 255, 255, 0.5);
}
.drop-zone.drag-over {
  border-color: var(--noun);
  background: rgba(74, 144, 217, 0.08);
}
.drop-zone p.placeholder {
  width: 100%;
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 50;
    height: 100vh;
    transition: transform 300ms var(--ease-smooth);
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* ========== 强化版（Advanced）设计系统 ========== */
/* Ditto 风格：阳光野花工作室 */
:root {
  /* 核心配色（对齐品牌 token：暖白底 + 近黑墨 + 硬边框） */
  --adv-text-1: var(--brand-ink);  /* 主文字 */
  --adv-text-2: var(--brand-ink-2);/* 次要文字 */
  --adv-text-3: var(--brand-ink-3);/* 辅助色 */
  --adv-text-4: var(--brand-ink-3);/* 最淡的文字色 */
  --adv-bg-1: var(--brand-canvas); /* Canvas 暖奶油白 */
  --adv-bg-2: #efe9df;             /* 卡片底（暖米白） */
  --adv-bg-3: #e4e8d6;             /* 更深的米白 */
  --adv-bg-card: #efe9df;          /* 卡片底色 */
  --adv-bg-white: #ffffff;         /* 纯白（输入框等） */
  --adv-border: var(--brand-ink);  /* 硬边框线 */
  --adv-border-soft: var(--brand-ink); /* 软边框 */
  --adv-hi-yellow: #ffe228;        /* Hi-Yellow 强化版主操作色（保留） */
  --adv-hi-yellow-hover: #ffd700;
  --adv-hi-yellow-pressed: #f5cc00;
  --adv-moss-green: #59e25d;       /* Moss Green 苔藓绿装饰色 */
  --adv-fuchsia: #e261e5;          /* Fuchsia 品红装饰色 */
  --adv-deep-ink: var(--brand-ink);/* 深墨色 */
  
  /* 功能色（低饱和，Ditto风格） */
  --adv-green: #43b047;
  --adv-red: #d4457a;
  --adv-orange: #e69a2c;
  --adv-purple: #7c5ca8;
  --adv-blue: #4a6fd6;

  /* 阴影：Ditto风格基本不用阴影，用底色区分 */
  --adv-shadow-sm: none;
  --adv-shadow-md: none;
  --adv-shadow-lg: none;

  /* 缓动 */
  --adv-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --adv-ease-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* 字体 */
  --adv-font-serif: 'Hedvig Letters Serif', Georgia, 'Times New Roman', serif;
  --adv-font-sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --adv-font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* 词性颜色 - Ditto风格浅色背景 */
  --adv-pos-noun: #d4e8d4;     /* 名词-浅绿背景 */
  --adv-pos-verb: #f5d4e8;     /* 动词-浅品红背景 */
  --adv-pos-adj: #fff4b8;      /* 形容词-浅黄背景 */
  --adv-pos-adv: #e0d4f5;      /* 副词-浅紫背景 */
  --adv-pos-prep: #d4e0f5;     /* 介词-浅蓝背景 */
  --adv-pos-conj: #e8e8e8;     /* 连词-浅灰背景 */
  --adv-pos-article: #d4f0f5;  /* 冠词-浅青背景 */

  /* 兼容旧变量名 */
  --adv-lake-blue: #ffe228;
  --adv-blue: #ffe228;
  --adv-blue-hover: #ffd700;
  --adv-blue-pressed: #f5cc00;
  --adv-bg-periwinkle: #eff2e5;
}

body.advanced-version {
  font-family: var(--adv-font-sans);
  background: var(--adv-bg-1);
  color: var(--adv-text-1);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
  position: relative;
  overflow-x: hidden;
}

/* 标题字体：衬线体，700 weight */
body.advanced-version h1,
body.advanced-version h2,
body.advanced-version h3,
body.advanced-version .adv-section-title,
body.advanced-version .adv-card-title,
body.advanced-version .font-display {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.advanced-version .font-display {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* 强化版按钮 - Ditto超大胶囊形 */
body.advanced-version .btn {
  border-radius: 1440px;
  font-family: var(--adv-font-sans);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 32px;
  border: 1px solid transparent;
  transition: all 350ms var(--adv-ease);
  cursor: pointer;
}
body.advanced-version .btn-primary {
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
  box-shadow: none;
}
body.advanced-version .btn-primary:hover {
  background: var(--adv-hi-yellow-hover);
  transform: none;
  box-shadow: none;
}
body.advanced-version .btn-primary:active {
  background: var(--adv-hi-yellow-pressed);
  transform: none;
  box-shadow: none;
}
body.advanced-version .btn-primary:disabled {
  background: var(--adv-bg-2);
  color: var(--adv-text-3);
  cursor: not-allowed;
  border: 1px solid var(--adv-bg-2);
}
body.advanced-version .btn-secondary {
  background: var(--adv-deep-ink);
  color: white;
  border: 1px solid var(--adv-deep-ink);
  box-shadow: none;
}
body.advanced-version .btn-secondary:hover {
  background: #1f1740;
  transform: none;
}
body.advanced-version .btn-ghost {
  color: var(--adv-deep-ink);
  background: transparent;
  border: 1px solid var(--adv-deep-ink);
}
body.advanced-version .btn-ghost:hover {
  background: var(--adv-deep-ink);
  color: white;
}

/* 强化版卡片 - Ditto Soft Meadow底，无边框无阴影 */
body.advanced-version .card {
  background: var(--adv-bg-2);
  border-radius: 24px;
  box-shadow: none;
  border: none;
  padding: 32px;
}

/* 版本切换 Segmented Control - Ditto风格 */
.segmented-control {
  display: inline-flex;
  background: var(--adv-bg-2);
  border: none;
  border-radius: 1440px;
  padding: 4px;
  position: relative;
}
.segmented-control button {
  position: relative;
  z-index: 1;
  padding: 8px 28px;
  font-size: 15px;
  font-family: var(--adv-font-sans);
  font-weight: 500;
  color: var(--adv-text-2);
  border-radius: 1440px;
  transition: all 300ms var(--adv-ease);
  white-space: nowrap;
}
.segmented-control button.active {
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
  box-shadow: none;
  font-weight: 500;
}
.segmented-control button:not(.active):hover {
  color: var(--adv-text-1);
  background: var(--adv-bg-3);
}

/* 强化版例句卡片 - Ditto风格：Soft Meadow底 + Hi-Yellow竖线 */
.adv-sentence-card {
  position: relative;
  padding: 24px 28px 24px 40px;
  background: var(--adv-bg-2);
  border-radius: 24px;
  border: none;
  box-shadow: none;
  margin-bottom: 16px;
}
.adv-sentence-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 2px;
  background: var(--adv-hi-yellow);
}

/* 强化版强调高亮 - Ditto浅色背景 */
.adv-highlight {
  background: var(--adv-pos-noun);
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--adv-text-1);
}

/* 强化版淡入上滑 */
@keyframes advFadeInUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.adv-fade-in-up {
  animation: advFadeInUp 450ms var(--adv-ease-out) both;
}

@keyframes advFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.adv-fade-in {
  animation: advFadeIn 350ms var(--adv-ease) both;
}

/* 强化版分隔线 */
.adv-divider {
  height: 1px;
  background: var(--adv-deep-ink);
  opacity: 0.1;
  margin: 0;
}

/* 强化版滚动条 */
body.advanced-version ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
body.advanced-version ::-webkit-scrollbar-thumb {
  background: var(--adv-bg-3);
  border-radius: 4px;
}
body.advanced-version ::-webkit-scrollbar-thumb:hover {
  background: var(--adv-text-4);
}
body.advanced-version ::-webkit-scrollbar-track {
  background: transparent;
}

/* 强化版侧边栏样式覆盖 - Ditto */
body.advanced-version .sidebar {
  background: var(--adv-bg-2) !important;
  border-right: none !important;
}
body.advanced-version .sidebar .sidebar-item {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  border-radius: 1440px;
  font-weight: 500;
}
body.advanced-version .sidebar .sidebar-item.active {
  background: var(--adv-hi-yellow) !important;
  color: var(--adv-deep-ink) !important;
  font-weight: 500;
}
body.advanced-version .sidebar .sidebar-item.completed {
  color: var(--adv-text-3);
}

/* 强化版顶部栏 - Ditto */
body.advanced-version .course-topbar {
  background: var(--adv-bg-1) !important;
  border-bottom: 1px solid rgba(19, 14, 48, 0.08) !important;
}

/* 强化版课程内容区 */
body.advanced-version .course-content {
  max-width: 1432px;
  margin: 0 auto;
  padding: 40px 48px;
}

/* 强化版概念卡片特殊样式 */
body.advanced-version .adv-concept-card {
  border-radius: 24px;
  border: none;
  background: var(--adv-bg-2);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

/* 强化版选择/选择题选项 - Ditto胶囊形 */
body.advanced-version .adv-choice-option {
  border-radius: 1440px;
  padding: 14px 24px;
  border: 1px solid var(--adv-deep-ink);
  background: var(--adv-bg-2);
  transition: all 300ms var(--adv-ease);
  cursor: pointer;
  font-family: var(--adv-font-sans);
  font-size: 15px;
}
body.advanced-version .adv-choice-option:hover {
  border-color: var(--adv-deep-ink);
  background: white;
}
body.advanced-version .adv-choice-option.selected {
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
  border-color: var(--adv-hi-yellow);
}

/* 强化版词块 - Ditto */
body.advanced-version .adv-word-block {
  border-radius: 24px;
  padding: 10px 20px;
  border: 1px solid var(--adv-deep-ink);
  background: white;
  font-family: var(--adv-font-sans);
  font-size: 15px;
  font-weight: 500;
  transition: all 300ms var(--adv-ease);
  cursor: pointer;
}
body.advanced-version .adv-word-block:hover {
  border-color: var(--adv-hi-yellow);
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
}

/* 强化版标签/徽章 - Ditto */
body.advanced-version .adv-badge {
  border-radius: 1440px;
  padding: 6px 18px;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* 强化版进度条 - Ditto */
body.advanced-version .adv-progress-bar {
  height: 8px;
  background: var(--adv-bg-2);
  border-radius: 1440px;
  overflow: hidden;
}
body.advanced-version .adv-progress-bar-fill {
  height: 100%;
  background: var(--adv-hi-yellow);
  border-radius: 1440px;
  transition: width 400ms var(--adv-ease);
}

/* 有机色块 - 性能优化版（低blur + 默认静止 + GPU加速） */
@keyframes advBlobFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}
@keyframes advBlobFloat2 {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(6px) scale(1.03); }
}

/* 色块通用优化：开启GPU加速、contain隔离重绘 */
[class*="adv-blob-"] {
  will-change: transform;
  transform: translateZ(0);
  contain: layout paint;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 强化版装饰有机色块 - Ditto（性能优化版） */
.adv-blob-moss {
  position: absolute;
  pointer-events: none;
  width: 280px;
  height: 280px;
  background: var(--adv-moss-green);
  filter: blur(25px);
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  opacity: 0.35;
  z-index: 0;
  /* 默认静止，减少持续动画消耗 */
  animation: none;
}
.adv-blob-fuchsia {
  position: absolute;
  pointer-events: none;
  width: 240px;
  height: 240px;
  background: var(--adv-fuchsia);
  filter: blur(25px);
  border-radius: 58% 42% 30% 70% / 55% 55% 45% 45%;
  opacity: 0.3;
  z-index: 0;
  animation: none;
}
.adv-blob-yellow {
  position: absolute;
  pointer-events: none;
  width: 260px;
  height: 260px;
  background: var(--adv-hi-yellow);
  filter: blur(28px);
  border-radius: 50% 50% 45% 55% / 40% 60% 40% 60%;
  opacity: 0.28;
  z-index: 0;
  animation: none;
}

/* 小装饰色块（更轻量） */
.adv-blob-small-moss {
  position: absolute;
  pointer-events: none;
  width: 100px;
  height: 100px;
  background: var(--adv-moss-green);
  filter: blur(18px);
  border-radius: 50%;
  opacity: 0.3;
  z-index: 0;
  animation: none;
}
.adv-blob-small-fuchsia {
  position: absolute;
  pointer-events: none;
  width: 80px;
  height: 80px;
  background: var(--adv-fuchsia);
  filter: blur(16px);
  border-radius: 50%;
  opacity: 0.25;
  z-index: 0;
  animation: none;
}

/* ========== 首页 Ditto 风格 ========== */
.home-ditto {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  background: var(--adv-bg-1);
  font-family: var(--adv-font-sans);
  color: var(--adv-text-1);
  position: relative;
}

.home-ditto-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  position: relative;
  z-index: 1;
}

/* Hero 区 */
.home-hero {
  text-align: center;
  padding: 24px 0 56px;
  position: relative;
}

.home-hero-blobs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.home-hero-content {
  position: relative;
  z-index: 1;
}

.home-hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--adv-bg-2);
  border-radius: 1440px;
  font-size: 14px;
  color: var(--adv-text-2);
  cursor: pointer;
  margin-bottom: 20px;
  transition: background 200ms var(--adv-ease);
  border: none;
}
.home-hero-greeting:hover {
  background: var(--adv-bg-3);
}
.home-hero-greeting strong {
  color: var(--adv-text-1);
  font-weight: 600;
}
.home-hero-greeting .edit-icon {
  font-size: 11px;
  opacity: 0.5;
  margin-left: 4px;
}

.home-hero-name-editor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 18px;
  background: white;
  border: 1.5px solid var(--adv-deep-ink);
  border-radius: 1440px;
  margin-bottom: 20px;
}
.home-hero-name-editor input {
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--adv-text-1);
  width: 120px;
  text-align: center;
  background: transparent;
  font-family: var(--adv-font-sans);
}
.home-hero-name-editor button {
  border: none;
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
  padding: 6px 16px;
  border-radius: 1440px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--adv-font-sans);
  transition: background 200ms var(--adv-ease);
}
.home-hero-name-editor button:hover {
  background: var(--adv-hi-yellow-hover);
}
.home-hero-name-editor button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.home-hero-title {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 56px;
  color: var(--adv-text-1);
  margin-bottom: 16px;
  line-height: 1.1;
}

.home-hero-subtitle {
  font-family: var(--adv-font-sans);
  font-size: 18px;
  color: var(--adv-text-2);
  font-weight: 400;
  margin-bottom: 28px;
}

/* 解锁状态徽章 */
.home-unlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 1440px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 500;
}
.home-unlock-badge.unlocked {
  background: var(--adv-pos-noun);
  color: var(--adv-text-1);
}
.home-unlock-badge.trial {
  background: var(--adv-pos-adj);
  color: var(--adv-text-1);
}
.home-unlock-badge .badge-icon {
  font-size: 14px;
}

/* 解锁按钮 */
.home-unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--adv-hi-yellow);
  color: var(--adv-deep-ink);
  border: none;
  border-radius: 1440px;
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 250ms var(--adv-ease), transform 250ms var(--adv-ease);
}
.home-unlock-btn:hover {
  background: var(--adv-hi-yellow-hover);
  transform: translateY(-1px);
}
.home-unlock-btn:active {
  background: var(--adv-hi-yellow-pressed);
  transform: translateY(0);
}

/* 课程网格 */
.home-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .home-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-hero-title {
    font-size: 40px;
  }
}

@media (max-width: 560px) {
  .home-course-grid {
    grid-template-columns: 1fr;
  }
  .home-hero-title {
    font-size: 32px;
  }
  .home-ditto-inner {
    padding: 32px 20px 60px;
  }
}

/* 课程卡片 - Ditto */
.home-course-card {
  background: var(--adv-bg-2);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background 300ms var(--adv-ease), transform 300ms var(--adv-ease);
  border: none;
  box-shadow: none;
}
.home-course-card:hover:not(.locked) {
  background: var(--adv-bg-3);
  transform: translateY(-3px);
}
.home-course-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-course-card-number {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  font-size: 36px;
  color: var(--adv-text-1);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.home-course-card-label {
  font-family: var(--adv-font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--adv-text-3);
}

.home-course-card-title {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--adv-text-1);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}

.home-course-card-subtitle {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  color: var(--adv-text-2);
  line-height: 1.5;
  margin: 0;
}

/* 卡片锁定图标 */
.home-course-card-lock {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
  opacity: 0.6;
}

/* 卡片按钮组 */
.home-course-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.home-btn-base {
  flex: 1;
  padding: 10px 14px;
  background: var(--adv-deep-ink);
  color: white;
  border: none;
  border-radius: 1440px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 250ms var(--adv-ease), opacity 250ms var(--adv-ease);
  text-align: center;
  white-space: nowrap;
}
.home-btn-base:hover:not(:disabled) {
  background: #1f1740;
}
.home-btn-base:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.home-btn-advanced {
  flex: 1;
  padding: 10px 14px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 1440px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 250ms var(--adv-ease), opacity 250ms var(--adv-ease);
  text-align: center;
  white-space: nowrap;
}
.home-btn-advanced:hover:not(:disabled) {
  background: #6d28d9;
}
.home-btn-advanced:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 底部区域 */
.home-footer {
  text-align: center;
  padding: 64px 0 20px;
}

.home-footer-quote {
  font-family: var(--adv-font-serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--adv-text-1);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.home-footer-sub {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  color: var(--adv-text-3);
  margin-bottom: 28px;
}

.home-footer-unlock-btn {
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 600;
}

/* ========== 首页 Karl 风格（弹出式故事书） ========== */
:root {
  --karl-yellow: #ffe600;
  --karl-blue: #007fff;
  --karl-coral: #ef3b2c;
  --karl-ink: #333333;
  --karl-white: #ffffff;
  --karl-font-display: 'Changa One', system-ui, -apple-system, sans-serif;
  --karl-font-body: Arial, Helvetica, 'Inter', sans-serif;
}

.home-karl {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  background: var(--karl-yellow);
  color: var(--karl-ink);
  font-family: var(--karl-font-body);
  font-size: 14px;
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
}

.home-karl-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  position: relative;
  z-index: 2;
}

/* Hero 区 */
.home-karl-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px 0 80px;
}

/* 蓝色大圆形（地球） */
.home-karl-globe {
  position: absolute;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: var(--karl-blue);
  border-radius: 1440px;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

.home-karl-globe-content {
  text-align: center;
  padding-top: 30px;
}

.home-karl-title {
  font-family: var(--karl-font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 0.8;
  color: var(--karl-white);
  text-transform: none;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.home-karl-subtitle {
  font-family: var(--karl-font-body);
  font-size: 16px;
  color: var(--karl-white);
  font-weight: 400;
  opacity: 0.9;
}

/* 云朵装饰 - 扁平卡通 */
.home-karl-cloud {
  position: absolute;
  background: var(--karl-white);
  z-index: 1;
  pointer-events: none;
}
.home-karl-cloud::before,
.home-karl-cloud::after {
  content: '';
  position: absolute;
  background: var(--karl-white);
  border-radius: 50%;
}
.home-karl-cloud-1 {
  width: 80px;
  height: 24px;
  top: 80px;
  left: 8%;
  border-radius: 24px;
}
.home-karl-cloud-1::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 12px;
}
.home-karl-cloud-1::after {
  width: 30px;
  height: 30px;
  top: -15px;
  left: 42px;
}

.home-karl-cloud-2 {
  width: 100px;
  height: 28px;
  top: 120px;
  right: 10%;
  border-radius: 28px;
}
.home-karl-cloud-2::before {
  width: 48px;
  height: 48px;
  top: -28px;
  left: 16px;
}
.home-karl-cloud-2::after {
  width: 36px;
  height: 36px;
  top: -18px;
  left: 54px;
}

.home-karl-cloud-3 {
  width: 60px;
  height: 20px;
  top: 180px;
  left: 20%;
  border-radius: 20px;
}
.home-karl-cloud-3::before {
  width: 30px;
  height: 30px;
  top: -15px;
  left: 8px;
}
.home-karl-cloud-3::after {
  width: 24px;
  height: 24px;
  top: -12px;
  left: 30px;
}

/* 卡通小房子 */
.home-karl-house {
  position: absolute;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.home-karl-house-1 {
  left: 5%;
  bottom: 0;
}
.home-karl-house-2 {
  right: 8%;
  bottom: 0;
}

.home-karl-house-body {
  width: 60px;
  height: 48px;
  background: var(--karl-ink);
  opacity: 0.15;
  position: relative;
}
.home-karl-house-roof {
  width: 0;
  height: 0;
  border-left: 38px solid transparent;
  border-right: 38px solid transparent;
  border-bottom: 28px solid var(--karl-coral);
  position: relative;
  left: -8px;
  top: -1px;
}
.home-karl-house-window {
  width: 16px;
  height: 16px;
  background: var(--karl-white);
  position: absolute;
  top: 14px;
  left: 22px;
}

/* 顶部导航/状态栏 */
.home-karl-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 0 24px;
  position: relative;
  z-index: 3;
}

.home-karl-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--karl-font-body);
  font-size: 13px;
  color: var(--karl-ink);
}

.home-karl-greeting {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--karl-white);
  border: 1.5px solid var(--karl-ink);
  border-radius: 0;
  font-size: 13px;
  color: var(--karl-ink);
  cursor: pointer;
  font-family: var(--karl-font-body);
  transition: background 200ms ease;
}
.home-karl-greeting:hover {
  background: #fffbe0;
}
.home-karl-greeting strong {
  font-weight: 700;
}
.home-karl-greeting .edit-icon {
  font-size: 10px;
  opacity: 0.6;
  margin-left: 2px;
}

.home-karl-name-editor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px 2px 10px;
  background: var(--karl-white);
  border: 1.5px solid var(--karl-ink);
  border-radius: 0;
}
.home-karl-name-editor input {
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--karl-ink);
  width: 100px;
  background: transparent;
  font-family: var(--karl-font-body);
}
.home-karl-name-editor button {
  border: none;
  background: var(--karl-ink);
  color: white;
  padding: 4px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--karl-font-body);
}
.home-karl-name-editor button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 解锁状态徽章 */
.home-karl-unlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1.5px solid var(--karl-ink);
  border-radius: 0;
  font-family: var(--karl-font-body);
  font-size: 12px;
  font-weight: 700;
  background: var(--karl-white);
  color: var(--karl-ink);
}
.home-karl-unlock-badge.unlocked {
  background: var(--karl-ink);
  color: var(--karl-white);
}

.home-karl-unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 18px;
  background: var(--karl-ink);
  color: white;
  border: 1.5px solid var(--karl-ink);
  border-radius: 0;
  font-family: var(--karl-font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms ease;
}
.home-karl-unlock-btn:hover {
  background: #000;
}

/* 课程列表区 */
.home-karl-courses-section {
  position: relative;
  z-index: 2;
  padding-top: 60px;
}

.home-karl-section-title {
  font-family: var(--karl-font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
  color: var(--karl-ink);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.home-karl-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .home-karl-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-karl-title {
    font-size: 48px;
  }
  .home-karl-globe {
    width: 500px;
    height: 500px;
    bottom: -100px;
  }
  .home-karl-hero {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .home-karl-course-grid {
    grid-template-columns: 1fr;
  }
  .home-karl-title {
    font-size: 36px;
  }
  .home-karl-globe {
    width: 380px;
    height: 380px;
    bottom: -80px;
  }
  .home-karl-inner {
    padding: 16px 20px 60px;
  }
  .home-karl-hero {
    min-height: 360px;
    padding-bottom: 60px;
  }
}

/* 课程卡片 - Karl 风格：白底直角，扁平 */
.home-karl-card {
  background: var(--karl-white);
  border-radius: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: border 200ms ease;
  border: 2px solid transparent;
}
.home-karl-card:hover:not(.locked) {
  border: 2px solid var(--karl-ink);
}
.home-karl-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.home-karl-card-number {
  font-family: var(--karl-font-display);
  font-weight: 400;
  font-size: 32px;
  color: var(--karl-ink);
  line-height: 1;
  margin: 0;
}

.home-karl-card-label {
  font-family: var(--karl-font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--karl-ink);
  opacity: 0.5;
}

.home-karl-card-title {
  font-family: var(--karl-font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--karl-ink);
  line-height: 1.1;
  margin: 0;
}

.home-karl-card-subtitle {
  font-family: var(--karl-font-body);
  font-size: 12px;
  color: var(--karl-ink);
  line-height: 1.5;
  margin: 0;
  opacity: 0.7;
}

.home-karl-card-lock {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
}

.home-karl-card-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  background: var(--karl-ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.home-karl-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.home-karl-btn-base {
  flex: 1;
  padding: 8px 12px;
  background: var(--karl-ink);
  color: white;
  border: none;
  border-radius: 0;
  font-family: var(--karl-font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 200ms ease;
  text-align: center;
  white-space: nowrap;
}
.home-karl-btn-base:hover:not(:disabled) {
  opacity: 0.85;
}
.home-karl-btn-base:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.home-karl-btn-advanced {
  flex: 1;
  padding: 8px 12px;
  background: var(--karl-blue);
  color: white;
  border: none;
  border-radius: 0;
  font-family: var(--karl-font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 200ms ease;
  text-align: center;
  white-space: nowrap;
}
.home-karl-btn-advanced:hover:not(:disabled) {
  opacity: 0.85;
}
.home-karl-btn-advanced:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 底部区域 */
.home-karl-footer {
  text-align: center;
  padding: 80px 0 20px;
  position: relative;
  z-index: 2;
}

.home-karl-footer-quote {
  font-family: var(--karl-font-display);
  font-weight: 400;
  font-size: 40px;
  color: var(--karl-ink);
  line-height: 0.9;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.home-karl-footer-sub {
  font-family: var(--karl-font-body);
  font-size: 13px;
  color: var(--karl-ink);
  opacity: 0.6;
  margin-bottom: 24px;
}

.home-karl-footer-unlock-btn {
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  background: var(--karl-blue);
  color: white;
  border: none;
  border-radius: 0;
  font-family: var(--karl-font-body);
  cursor: pointer;
  transition: opacity 200ms ease;
}
.home-karl-footer-unlock-btn:hover {
  opacity: 0.85;
}

/* ========== 首页 General Intelligence Company 风格（文学杂志/编辑设计） ========== */
:root {
  --gic-parchment: #fefffc;      /* 暖米白页面底色 */
  --gic-paper: #ffffff;          /* 纯白卡片底 */
  --gic-linen: #f9faf7;          /* 输入/微妙表面 */
  --gic-graphite: #2c2c2c;       /* 标题文字 */
  --gic-charcoal: #444141;       /* 正文/按钮文字 */
  --gic-ash: #646464;            /* 辅助文字 */
  --gic-mist: #dee2de;           /* 卡片边框（绿调） */
  --gic-twilight: #282834;       /* 导航/图标边框 */
  --gic-dusk: #1f1f29;           /* 填充按钮（近黑带冷紫调） */
  --gic-signal-blue: #41a1cf;    /* 描边主按钮蓝 */
  --gic-cerulean: #0081c0;       /* 装饰鲜蓝 */
  --gic-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --gic-font-sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

.home-gic {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  background: var(--gic-parchment);
  color: var(--gic-charcoal);
  font-family: var(--gic-font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  position: relative;
}

.home-gic-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 32px 96px;
  position: relative;
  z-index: 1;
}

/* 浮动导航胶囊 */
.home-gic-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 20px;
  height: 50px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gic-twilight);
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 6px;
  font-family: var(--gic-font-sans);
}

.home-gic-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--gic-font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--gic-graphite);
  letter-spacing: -0.01em;
}
.home-gic-nav-logo-mark {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--gic-twilight);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gic-twilight);
}

.home-gic-nav-switch {
  display: flex;
  gap: 4px;
}
.home-gic-nav-switch button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--gic-ash);
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
  letter-spacing: -0.01em;
}
.home-gic-nav-switch button.active {
  color: var(--gic-signal-blue);
  background: rgba(65, 161, 207, 0.08);
}
.home-gic-nav-switch button:hover {
  color: var(--gic-charcoal);
}

.home-gic-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.home-gic-greeting {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  color: var(--gic-charcoal);
  cursor: pointer;
  font-family: var(--gic-font-sans);
  font-weight: 500;
  transition: background 200ms ease, border-color 200ms ease;
  letter-spacing: -0.01em;
}
.home-gic-greeting:hover {
  background: var(--gic-linen);
  border-color: var(--gic-mist);
}
.home-gic-greeting strong {
  font-weight: 600;
  color: var(--gic-graphite);
}
.home-gic-greeting .edit-icon {
  font-size: 10px;
  opacity: 0.5;
}

.home-gic-name-editor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 12px;
  background: white;
  border: 1px solid var(--gic-twilight);
  border-radius: 8px;
}
.home-gic-name-editor input {
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--gic-graphite);
  width: 100px;
  background: transparent;
  font-family: var(--gic-font-sans);
  letter-spacing: -0.01em;
}
.home-gic-name-editor button {
  border: none;
  background: var(--gic-dusk);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--gic-font-sans);
  transition: opacity 200ms ease;
}
.home-gic-name-editor button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.home-gic-unlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--gic-mist);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--gic-linen);
  color: var(--gic-ash);
}
.home-gic-unlock-badge.unlocked {
  color: var(--gic-graphite);
  border-color: var(--gic-mist);
  background: var(--gic-linen);
}

/* Hero 区 */
.home-gic-hero {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
  border-bottom: 1px solid var(--gic-mist);
  margin-bottom: 64px;
}

.home-gic-hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-gic-hero-eyebrow {
  font-family: var(--gic-font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--gic-ash);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-gic-hero-title {
  font-family: var(--gic-font-serif);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.05;
  color: var(--gic-graphite);
  letter-spacing: -0.02em;
  margin: 0;
}

.home-gic-hero-subtitle {
  font-family: var(--gic-font-sans);
  font-size: 16px;
  color: var(--gic-ash);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 480px;
}

.home-gic-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.home-gic-hero-name {
  font-size: 15px;
  color: var(--gic-charcoal);
  font-weight: 500;
}

.home-gic-hero-unlock-status {
  font-size: 13px;
  color: var(--gic-ash);
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-gic-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--gic-signal-blue);
  border: 1px solid var(--gic-signal-blue);
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 250ms ease;
  letter-spacing: -0.01em;
  width: fit-content;
}
.home-gic-btn-primary:hover {
  background: rgba(65, 161, 207, 0.08);
}

.home-gic-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--gic-twilight);
  border: 1px solid var(--gic-twilight);
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 250ms ease;
  letter-spacing: -0.01em;
}
.home-gic-btn-secondary:hover {
  background: rgba(40, 40, 52, 0.06);
}

.home-gic-btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--gic-dusk);
  color: white;
  border: 1px solid var(--gic-dusk);
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 250ms ease;
  letter-spacing: -0.01em;
}
.home-gic-btn-fill:hover {
  background: #12121a;
  border-color: #12121a;
}

/* Hero 右侧装饰卡片 */
.home-gic-hero-card {
  background: var(--gic-cerulean);
  border-radius: 24px;
  padding: 40px 36px;
  color: white;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 1px, rgba(0, 0, 0, 0.08) 0px 4px 5px;
  position: relative;
  overflow: hidden;
}

.home-gic-hero-card-label {
  font-family: var(--gic-font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.home-gic-hero-card-big {
  font-family: var(--gic-font-serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-gic-hero-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-gic-hero-card-stat-num {
  font-family: var(--gic-font-serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.home-gic-hero-card-stat-label {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 400;
}

.home-gic-hero-card-stats-row {
  display: flex;
  gap: 32px;
  margin-top: 16px;
}

/* 句子结构装饰（线稿风） */
.home-gic-hero-sentence {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 20px;
  opacity: 0.9;
}
.home-gic-hero-word {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--gic-font-sans);
}

/* 课程列表区 */
.home-gic-courses-section {
  padding-bottom: 40px;
}

.home-gic-section-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  margin-bottom: 28px;
}

.home-gic-section-title {
  font-family: var(--gic-font-serif);
  font-weight: 500;
  font-size: 27px;
  color: var(--gic-graphite);
  letter-spacing: -0.02em;
  margin: 0;
}

.home-gic-section-count {
  font-family: var(--gic-font-sans);
  font-size: 13px;
  color: var(--gic-ash);
  font-weight: 400;
}

.home-gic-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .home-gic-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-gic-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .home-gic-hero-title {
    font-size: 42px;
  }
  .home-gic-inner {
    padding: 80px 24px 72px;
  }
}

@media (max-width: 600px) {
  .home-gic-course-grid {
    grid-template-columns: 1fr;
  }
  .home-gic-hero-title {
    font-size: 36px;
  }
  .home-gic-nav {
    gap: 12px;
    padding: 8px 14px;
  }
  .home-gic-nav-logo span:last-child {
    display: none;
  }
  .home-gic-nav-right .home-gic-greeting span:not(strong) {
    display: none;
  }
}

/* 课程卡片 - GIC 编辑风格 */
.home-gic-card {
  background: var(--gic-paper);
  border-radius: 12px;
  border: 1px solid var(--gic-mist);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all 250ms ease;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 1px, rgba(0, 0, 0, 0.08) 0px 4px 5px;
}
.home-gic-card:hover:not(.locked) {
  border-color: var(--gic-twilight);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 3px, rgba(0, 0, 0, 0.1) 0px 8px 16px;
}
.home-gic-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.home-gic-card-number {
  font-family: var(--gic-font-serif);
  font-weight: 400;
  font-size: 32px;
  color: var(--gic-graphite);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.home-gic-card-label {
  font-family: var(--gic-font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gic-ash);
}

.home-gic-card-title {
  font-family: var(--gic-font-serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--gic-graphite);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.home-gic-card-subtitle {
  font-family: var(--gic-font-sans);
  font-size: 13px;
  color: var(--gic-ash);
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.home-gic-card-lock {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 15px;
  opacity: 0.7;
}

.home-gic-card-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gic-graphite);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.home-gic-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.home-gic-card-btn-base {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  color: var(--gic-twilight);
  border: 1px solid var(--gic-twilight);
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.home-gic-card-btn-base:hover:not(:disabled) {
  background: rgba(40, 40, 52, 0.06);
}
.home-gic-card-btn-base:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.home-gic-card-btn-advanced {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  color: var(--gic-signal-blue);
  border: 1px solid var(--gic-signal-blue);
  border-radius: 8px;
  font-family: var(--gic-font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.home-gic-card-btn-advanced:hover:not(:disabled) {
  background: rgba(65, 161, 207, 0.08);
}
.home-gic-card-btn-advanced:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 底部区域 */
.home-gic-footer {
  text-align: left;
  padding: 80px 0 20px;
  border-top: 1px solid var(--gic-mist);
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.home-gic-footer-quote {
  font-family: var(--gic-font-serif);
  font-weight: 400;
  font-size: 36px;
  color: var(--gic-graphite);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 640px;
}

.home-gic-footer-sub {
  font-family: var(--gic-font-sans);
  font-size: 13px;
  color: var(--gic-ash);
  letter-spacing: -0.01em;
}

.home-gic-footer-unlock-btn {
  margin-top: 8px;
}

/* ========== 首页 The1 风格（建筑级排版 + 动态首页） ========== */
:root {
  --the1-concrete: #F0EEF6;              /* 官网首页浅灰紫底 */
  --the1-green: #027b49;                  /* 阶段一绿（四彩装饰色，钉住不随主色变紫） */
  --the1-pink: #f19ec8;          /* 柔粉（官网阶段色） */
  --the1-red: #fa4d43;           /* 朱红（官网阶段色） */
  --the1-yellow: #fbb833;        /* 暖黄（官网阶段色） */
  --the1-iron: var(--brand-ink);         /* 近黑文字/按钮 */
  --the1-carbon: var(--brand-ink);       /* 细线边框 */
  --the1-paper: var(--brand-paper);      /* 卡片底 */
  --the1-font: 'Archivo Narrow', 'Inter', system-ui, -apple-system, sans-serif;
}

.home-the1 {
  width: 100%;
  background: var(--the1-concrete);
  color: var(--the1-iron);
  font-family: var(--the1-font);
  font-weight: 400;
  position: relative;
  /* 禁止横向滚动：装饰元素溢出（如超大背景数字、卡片动画位移动画）不应产生横向滚动条 */
  overflow-x: hidden;
  overflow-x: clip;
}

.home-the1-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 120px;
  position: relative;
  z-index: 2;
}

/* 超大背景数字 - 视差 */
.home-the1-bg-num {
  position: fixed;
  right: -40px;
  top: 10%;
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 300px;
  line-height: 0.8;
  color: var(--the1-iron);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.04em;
  transition: transform 100ms linear;
}

.home-the1-bg-drift {
  animation: the1-drift 14s ease-in-out infinite;
}

@keyframes the1-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-20px); }
}

/* 四色油漆条 */
.home-the1-paintbar {
  display: flex;
  width: 100%;
  height: 8px;
  overflow: hidden;
}
.home-the1-paintbar span {
  flex: 1;
  display: block;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}
.home-the1-paintbar.in span {
  animation: the1-paint-unfold 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.home-the1-paintbar span:nth-child(1) { background: var(--the1-green); }
.home-the1-paintbar span:nth-child(2) { background: var(--the1-pink); }
.home-the1-paintbar span:nth-child(3) { background: var(--the1-red); }
.home-the1-paintbar span:nth-child(4) { background: var(--the1-yellow); }
.home-the1-paintbar.in span:nth-child(1) { animation-delay: 0.1s; }
.home-the1-paintbar.in span:nth-child(2) { animation-delay: 0.2s; }
.home-the1-paintbar.in span:nth-child(3) { animation-delay: 0.3s; }
.home-the1-paintbar.in span:nth-child(4) { animation-delay: 0.4s; }

@keyframes the1-paint-unfold {
  0% { transform: scaleX(0); opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* Hero 区 */
.home-the1-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 60px;
  position: relative;
}

.home-the1-hero-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* 撑满 viewport 宽度（突破 inner 的 max-width: 1280px）*/
  margin: 0 calc(-50vw + 50%);
  /* padding = inner 居中偏移 + inner 自身 padding，确保和 inner 内容左对齐 */
  padding: 14px calc(max(0px, (100vw - 1280px)/2) + 40px);
  /* 半透明 + 毛玻璃，融入下方任何背景色 */
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.home-the1-brand {
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--the1-iron);
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-the1-brand-mark {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  display: inline-block;
  border-radius: 6px;
}
.home-the1-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-the1-brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.home-the1-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.home-the1-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.home-the1-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.home-the1-user-detail {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.home-the1-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--the1-iron);
}

.home-the1-user-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.home-the1-user-status.active {
  color: #10b981;
}

.home-the1-user-status.pending {
  color: #9ca3af;
}

.home-the1-user-status.expired {
  color: #ef4444;
}

.home-the1-admin-btn {
  padding: 6px 14px;
  background: #faf5ff;
  border: 1px solid #c4b5fd;
  color: #7c3aed;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--the1-font);
  transition: all 200ms ease;
}
.home-the1-admin-btn:hover {
  background: #8338EC;
  color: white;
  border-color: #8338EC;
}

.home-the1-logout-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #6b7280;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--the1-font);
  transition: all 200ms ease;
}
.home-the1-logout-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Hero 标题 */
.home-the1-hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 40px;
  align-items: center;
  text-align: center;
}

.home-the1-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 6px 16px;
  border-radius: 100px;
  transform: translateY(20px);
  opacity: 0;
  display: inline-block;
  width: fit-content;
}
.home-the1-eyebrow.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

.home-the1-title {
  font-family: var(--the1-font);
  font-weight: 800;
  font-size: clamp(56px, 12vw, 120px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--the1-iron);
  margin: 0;
}
.home-the1-title-gradient {
  background: linear-gradient(135deg, #8338EC 0%, #6366F1 40%, #FF4D6D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-the1-title.in {
  animation: the1-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}
.home-the1-title { transform: translateY(40px); opacity: 0; }

@keyframes the1-fade-up {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.home-the1-paintbar-small {
  display: flex;
  gap: 0;
  width: 200px;
  height: 6px;
  transform: scaleX(0);
  transform-origin: left;
}
.home-the1-paintbar-small.in {
  animation: the1-paintbar-grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
}
.home-the1-paintbar-small span { flex: 1; }
.home-the1-paintbar-small span:nth-child(1) { background: var(--the1-green); }
.home-the1-paintbar-small span:nth-child(2) { background: var(--the1-pink); }
.home-the1-paintbar-small span:nth-child(3) { background: var(--the1-red); }
.home-the1-paintbar-small span:nth-child(4) { background: var(--the1-yellow); }

@keyframes the1-paintbar-grow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.home-the1-subtitle {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  color: #374151;
  max-width: 560px;
  opacity: 0;
  transform: translateY(20px);
  margin: 0;
}
.home-the1-subtitle.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
}

/* Hero 英文 slogan */
.home-the1-hero-slogan {
  font-family: var(--the1-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--the1-iron);
  opacity: 0.65;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(16px);
  font-style: italic;
}
.home-the1-hero-slogan.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s forwards;
}

/* Hero 专属客服按钮容器 */
.home-the1-hero-cs {
  margin-top: -8px;
  opacity: 0;
  transform: translateY(20px);
}
.home-the1-hero-cs.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.95s forwards;
}
.home-the1-hero-cs .home-the1-cs-btn {
  font-size: 14px;
  padding: 10px 22px;
  border-width: 1.5px;
}

/* Hero 社会证明 */
.home-the1-hero-social {
  font-size: 14px;
  color: #9ca3af;
  opacity: 0;
  transform: translateY(16px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-the1-hero-social::before,
.home-the1-hero-social::after {
  content: '';
  width: 24px;
  height: 1px;
  background: #e5e7eb;
}
.home-the1-hero-social.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
}

/* Hero CTA 按钮组 */
.home-the1-hero-cta {
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-the1-hero-cta.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.85s forwards;
}

.home-the1-btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: var(--the1-font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  text-decoration: none;
  letter-spacing: 0.01em;
  border: none;
  white-space: nowrap;
}
.home-the1-btn-primary {
  background: linear-gradient(135deg, #8338EC 0%, #6366F1 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.35);
}
.home-the1-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(131, 56, 236, 0.45);
}
.home-the1-btn-secondary {
  background: #fff;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.home-the1-btn-secondary:hover {
  border-color: #8338EC;
  color: #7c3aed;
  transform: translateY(-2px);
}

@keyframes the1-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Hero 底部小字提示 */
.home-the1-hero-note {
  font-size: 13px;
  color: #9ca3af;
  opacity: 0;
  transform: translateY(16px);
  margin: 0;
}
.home-the1-hero-note.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.95s forwards;
}

/* ===== 今日学习卡片 ===== */
.home-today-card {
  padding: 20px 0 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.home-today-card.in {
  opacity: 1;
  transform: translateY(0);
}

.home-today-card-inner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 24px;
  padding: 28px 32px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.home-today-card-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-today-card-inner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-today-card-guest .home-today-card-inner {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  box-shadow: 0 20px 40px rgba(17, 153, 142, 0.3);
}

.home-today-header {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.home-today-date {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.home-today-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
  color: #fff;
}

.home-today-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* 横向紧凑统计行（登录用户） */
.home-today-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 0;
  margin-bottom: 20px;
}
.home-today-stats-row .home-today-stat {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 4px 12px;
  text-align: center;
  flex: 1;
  transition: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.home-today-stats-row .home-today-stat:hover {
  background: transparent;
  transform: none;
}
.home-today-stats-row .home-today-stat-label {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
  margin-bottom: 4px;
  order: 1;
}
.home-today-stats-row .home-today-stat-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  order: 2;
}
.home-today-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.home-today-stat {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, background 0.2s;
}

.home-today-stat:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.home-today-stat-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  color: #fff;
}

.home-today-stat-label {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
  color: #fff;
}

.home-today-actions {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.home-today-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.home-today-btn-primary {
  background: #fff;
  color: #667eea;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.home-today-card-guest .home-today-btn-primary {
  color: #11998e;
}

.home-today-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.home-today-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

.home-today-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .home-today-card-inner {
    padding: 24px 20px;
    border-radius: 20px;
  }
  .home-today-title {
    font-size: 22px;
  }
  .home-today-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .home-today-stat-num {
    font-size: 24px;
  }
  .home-today-btn {
    font-size: 14px;
    padding: 12px 16px;
  }
  /* 移动端：横向统计行改为2x2网格 */
  .home-today-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 12px;
  }
  .home-today-stats-row .home-today-stat-divider {
    display: none;
  }
  .home-today-stats-row .home-today-stat {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 8px;
  }
  /* Hero 按钮移动端 */
  .home-the1-btn-hero {
    padding: 14px 24px;
    font-size: 15px;
    width: 100%;
  }
  .home-the1-hero-cta {
    width: 100%;
    flex-direction: column;
  }
  .home-the1-brand-sub {
    display: none;
  }
}

/* 课程旅程区 */
.home-the1-journey-section {
  padding: 80px 0 60px;
}

.home-the1-section-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  margin-bottom: 40px;
}

.home-the1-section-title {
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--the1-iron);
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
}
.home-the1-section-title.in {
  animation: the1-fade-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.home-the1-section-meta {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 阶段区块 */
.home-the1-stage {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(24px);
}
.home-the1-stage.in {
  animation: the1-fade-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.home-the1-stage-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.home-the1-stage-bar {
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--the1-paper);
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: translateX(-100%);
  width: fit-content;
}
.home-the1-stage.in .home-the1-stage-bar {
  animation: the1-slide-right 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}
@keyframes the1-slide-right {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

.home-the1-stage-num {
  font-weight: 700;
  opacity: 0.7;
}

.home-the1-stage-desc {
  font-size: 14px;
  color: var(--the1-iron);
  opacity: 0.6;
}

/* 阶段颜色 */
.stage-green .home-the1-stage-bar { background: var(--the1-green); }
.stage-yellow .home-the1-stage-bar { background: var(--the1-yellow); color: var(--the1-iron); }
.stage-pink .home-the1-stage-bar { background: var(--the1-pink); color: var(--the1-iron); }
.stage-red .home-the1-stage-bar { background: var(--the1-red); }
.stage-purple .home-the1-stage-bar { background: linear-gradient(135deg, #7c3aed, #ec4899); color: #fff; }

/* 课程卡片网格 */
.home-the1-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 卡片之间保留纵横间距：原先 gap:0 会让上下两张卡紧贴在一起 */
  gap: 20px;
}

/* 课程卡片 - The1 风格 */
.home-the1-card {
  background: var(--the1-paper);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  /* 原先靠"容器 border-top/left + 卡片 border-right/bottom"拼出共享细线，
     现在卡片间有了间距，改为每张卡独立描边 */
  border: 1px solid rgba(0,0,0,0.1);
  transition: all 250ms ease;
  opacity: 0;
  transform: translateY(20px);
  min-height: 200px;
}
.home-the1-card.in {
  animation: the1-card-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes the1-card-in {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 左侧色条 */
.home-the1-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  transition: width 250ms ease;
}
.home-the1-card:hover::before {
  width: 8px;
}
.home-the1-card.stripe-green::before { background: var(--the1-green); }
.home-the1-card.stripe-yellow::before { background: var(--the1-yellow); }
.home-the1-card.stripe-pink::before { background: var(--the1-pink); }
.home-the1-card.stripe-red::before { background: var(--the1-red); }
.home-the1-card.stripe-purple::before { background: linear-gradient(180deg, #7c3aed, #ec4899); }

.home-the1-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.home-the1-card.locked.in {
  animation: the1-card-in-locked 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes the1-card-in-locked {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 0.5; transform: translateY(0); }
}

.home-the1-card-number {
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--the1-iron);
  letter-spacing: -0.02em;
  margin: 0;
  padding-left: 12px;
}

.home-the1-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  padding-left: 12px;
}

.home-the1-card-title {
  font-family: var(--the1-font);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  color: var(--the1-iron);
  letter-spacing: -0.01em;
  margin: 0;
  padding-left: 12px;
}

.home-the1-card-subtitle {
  font-size: 15px;
  line-height: 1.35;
  color: var(--the1-iron);
  opacity: 0.7;
  margin: 0;
  padding-left: 12px;
  font-weight: 400;
}

.home-the1-card-lock {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 15px;
}

.home-the1-card-dot {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-green { background: var(--the1-green); }
.dot-yellow { background: var(--the1-yellow); }
.dot-pink { background: var(--the1-pink); }
.dot-red { background: var(--the1-red); }

.home-the1-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-left: 12px;
}

.home-the1-btn-base {
  flex: 1;
  padding: 8px 14px;
  background: var(--the1-iron);
  color: white;
  border: 1px solid var(--the1-iron);
  border-radius: 100px;
  font-family: var(--the1-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  white-space: nowrap;
}
.home-the1-btn-base:hover:not(:disabled) {
  opacity: 0.85;
}
.home-the1-btn-base:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.home-the1-btn-advanced {
  flex: 1;
  padding: 8px 14px;
  background: var(--the1-green);
  color: white;
  border: 1px solid var(--the1-green);
  border-radius: 100px;
  font-family: var(--the1-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  white-space: nowrap;
}
.home-the1-btn-advanced:hover:not(:disabled) { opacity: 0.85; }
.home-the1-btn-advanced:disabled { opacity: 0.35; cursor: not-allowed; }

/* 每个阶段强化版按钮使用对应阶段色 */
.stage-green .home-the1-btn-advanced { background: var(--the1-green); border-color: var(--the1-green); }
.stage-yellow .home-the1-btn-advanced { background: var(--the1-yellow); border-color: var(--the1-yellow); color: var(--the1-iron); }
.stage-pink .home-the1-btn-advanced { background: var(--the1-pink); border-color: var(--the1-pink); color: var(--the1-iron); }
.stage-red .home-the1-btn-advanced { background: var(--the1-red); border-color: var(--the1-red); }

@media (max-width: 960px) {
  .home-the1-course-grid { grid-template-columns: repeat(2, 1fr); }
  .home-the1-inner { padding: 0 24px 80px; }
  .home-the1-hero-topbar { padding: 14px calc(max(0px, (100vw - 1280px)/2) + 24px); }
}

@media (max-width: 600px) {
  .home-the1-course-grid { grid-template-columns: 1fr; }
  .home-the1-inner { padding: 0 16px 60px; }
  .home-the1-hero-topbar { padding: 14px calc(max(0px, (100vw - 1280px)/2) + 16px); }
  .home-the1-bg-num { font-size: 200px; right: -20px; }
  .home-the1-section-title { font-size: 32px; }
  .home-the1-title { font-size: clamp(32px, 11vw, 44px); line-height: 1.1; }
}

/* 底部造句建造板块 */
.home-the1-build-section {
  margin-top: 80px;
  padding: 60px 0 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  opacity: 0;
  transform: translateY(24px);
}
.home-the1-build-section.in {
  animation: the1-fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.home-the1-build-paintbar {
  display: flex;
  width: 100%;
  max-width: 400px;
  height: 6px;
}
.home-the1-build-paintbar span { flex: 1; }
.home-the1-build-paintbar span:nth-child(1) { background: var(--the1-green); }
.home-the1-build-paintbar span:nth-child(2) { background: var(--the1-pink); }
.home-the1-build-paintbar span:nth-child(3) { background: var(--the1-red); }
.home-the1-build-paintbar span:nth-child(4) { background: var(--the1-yellow); }

.home-the1-build-title {
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--the1-iron);
  margin: 0;
  text-transform: uppercase;
}

.home-the1-build-sub {
  font-size: 15px;
  opacity: 0.6;
  letter-spacing: 0.03em;
  margin: 0;
}

.home-the1-build-cs {
  margin-top: 8px;
}

/* 专属客服按钮 - 大号 */
.home-the1-cs-btn-lg {
  font-size: 16px;
  padding: 16px 36px;
  border-width: 2px;
  gap: 10px;
}

/* 底部迷你版权栏 */
.home-the1-footer-mini {
  margin-top: 60px;
  padding: 30px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.home-the1-footer-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--the1-iron, #1f2937);
  cursor: pointer;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}
.home-the1-footer-link:hover {
  opacity: 0.75;
}

/* ===== 联系我们弹窗 ===== */
.home-the1-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.home-the1-modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: 320px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  text-align: center;
  animation: home-the1-modal-in 0.22s ease-out;
}
@keyframes home-the1-modal-in {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.home-the1-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-the1-modal-close:hover { background: #e5e7eb; color: #374151; }
.home-the1-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.home-the1-modal-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 18px;
}
.home-the1-modal-tip {
  margin-top: 14px;
  font-size: 12px;
  color: #9ca3af;
}

/* ===== FAQ 区 ===== */
.home-the1-faq-section {
  padding: 80px 24px;
  background: #fafafa;
}
.home-the1-faq-inner {
  max-width: 760px;
  margin: 0 auto;
}
.home-the1-faq-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.home-the1-faq-subtitle {
  font-size: 16px;
  text-align: center;
  color: #6b7280;
  margin: 0 0 48px;
}
.home-the1-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-the1-faq-item {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-the1-faq-item:hover {
  border-color: #e9d5ff;
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.06);
}
.home-the1-faq-question {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
  transition: color 0.2s;
}
.home-the1-faq-item.open .home-the1-faq-q-text {
  color: #7c3aed;
}
.home-the1-faq-icon {
  font-size: 20px;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.2s, color 0.2s;
}
.home-the1-faq-item.open .home-the1-faq-icon {
  color: #7c3aed;
}
.home-the1-faq-answer-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.home-the1-faq-item.open .home-the1-faq-answer-wrap {
  max-height: 400px;
}
.home-the1-faq-answer {
  padding: 0 24px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
}

/* ===== 底部 CTA 区 ===== */
.home-the1-bottom-cta {
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  padding: 80px 24px;
  text-align: center;
}
.home-the1-bottom-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}
.home-the1-bottom-cta-title {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.home-the1-bottom-cta-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 40px;
  line-height: 1.6;
}
.home-the1-bottom-cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.home-the1-bottom-cta-btn {
  padding: 16px 36px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}
.home-the1-bottom-cta-primary {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.home-the1-bottom-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.home-the1-bottom-cta-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
}
.home-the1-bottom-cta-secondary:hover {
  border-color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
}
.home-the1-bottom-cta-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .home-the1-faq-section { padding: 56px 16px; }
  .home-the1-faq-title { font-size: 28px; }
  .home-the1-faq-subtitle { font-size: 14px; margin-bottom: 32px; }
  .home-the1-faq-question { padding: 16px 20px; font-size: 15px; }
  .home-the1-faq-answer { padding: 0 20px 16px; font-size: 14px; }

  .home-the1-bottom-cta { padding: 56px 20px; }
  .home-the1-bottom-cta-title { font-size: 28px; }
  .home-the1-bottom-cta-sub { font-size: 15px; margin-bottom: 28px; }
  .home-the1-bottom-cta-btns { flex-direction: column; gap: 12px; }
  .home-the1-bottom-cta-btn { width: 100%; padding: 14px 24px; font-size: 16px; }
}

/* 专属客服按钮 */
.home-the1-cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--the1-iron);
  border: 1.5px solid var(--the1-iron);
  border-radius: 100px;
  font-family: var(--the1-font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  letter-spacing: 0.02em;
}
.home-the1-cs-btn:hover {
  background: var(--the1-iron);
  color: white;
}
.home-the1-cs-btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* 客服弹窗遮罩（cs-modal-* 为专属客服弹窗独立类名，避免与首页 home-the1-modal-* 弹窗冲突） */
.cs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  padding: 20px;
}
.cs-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* 客服弹窗卡片 */
.cs-modal-card {
  background: white;
  border-radius: 12px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 340px;
  position: relative;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 10px 40px;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: all 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
  font-family: var(--the1-font);
  color: var(--the1-iron);
}
.cs-modal-overlay.open .cs-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cs-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--the1-iron);
  font-size: 20px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: all 200ms ease;
  font-family: var(--the1-font);
  line-height: 1;
}
.cs-modal-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.cs-modal-title {
  font-family: var(--the1-font);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--the1-iron);
  margin: 0 0 8px;
}

.cs-modal-subtitle {
  font-size: 15px;
  line-height: 1.4;
  color: var(--the1-iron);
  opacity: 0.7;
  margin: 0 0 24px;
  font-weight: 400;
}

.cs-modal-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  display: block;
  border-radius: 8px;
  background: #f5f0e8;
  object-fit: cover;
}

.cs-modal-action {
  margin-top: 4px;
}

.cs-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--the1-iron);
  color: white;
  border: 1px solid var(--the1-iron);
  border-radius: 100px;
  font-family: var(--the1-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  letter-spacing: 0.02em;
}
.cs-modal-btn:hover {
  opacity: 0.88;
}

.cs-modal-btn.copied {
  background: var(--the1-green);
  border-color: var(--the1-green);
}


/* ========== 场景化语音按钮 ========== */
.scene-voice-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  overflow: visible;
  color: #fff;
  background: linear-gradient(135deg, #F39C12, #E67E22);
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.scene-voice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.scene-voice-btn:active {
  transform: scale(0.96);
}

.scene-voice-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.scene-voice-text {
  white-space: nowrap;
}

/* 尺寸 */
.scene-voice-small {
  padding: 6px 12px;
  font-size: 12px;
}
.scene-voice-small .scene-voice-icon {
  width: 16px;
  height: 16px;
}

.scene-voice-large {
  padding: 12px 22px;
  font-size: 15px;
}
.scene-voice-large .scene-voice-icon {
  width: 22px;
  height: 22px;
}

/* 类型变体 */
.scene-voice-correct {
  background: linear-gradient(135deg, #27AE60, #2ECC71);
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}
.scene-voice-correct:hover {
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.scene-voice-wrong {
  background: linear-gradient(135deg, #E67E22, #F39C12);
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}
.scene-voice-wrong:hover {
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.scene-voice-celebrate {
  background: linear-gradient(135deg, #9B59B6, #E74C3C);
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}
.scene-voice-celebrate:hover {
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.scene-voice-warm {
  background: linear-gradient(135deg, #F39C12, #E67E22);
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

/* 强化版样式 */
.advanced-version .scene-voice-btn {
  background: #130e30;
  color: #ffe228;
  box-shadow: 0 2px 8px rgba(19, 14, 48, 0.25);
  border: 2px solid #130e30;
}
.advanced-version .scene-voice-btn:hover {
  background: #ffe228;
  color: #130e30;
  box-shadow: 0 4px 12px rgba(255, 226, 40, 0.4);
}
.advanced-version .scene-voice-correct {
  background: #1b5e20;
  color: #c8e6c9;
  border-color: #1b5e20;
}
.advanced-version .scene-voice-correct:hover {
  background: #c8e6c9;
  color: #1b5e20;
}
.advanced-version .scene-voice-wrong {
  background: #e65100;
  color: #fff3e0;
  border-color: #e65100;
}
.advanced-version .scene-voice-wrong:hover {
  background: #fff3e0;
  color: #e65100;
}

/* 播放中动画 */
.scene-voice-btn.playing {
  animation: sceneVoicePulse 1.5s ease-in-out infinite;
}

@keyframes sceneVoicePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* 波纹 */
.scene-voice-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  border: 2px solid currentColor;
  animation: sceneVoiceRipple 1.5s ease-out infinite;
}
.scene-voice-ripple-2 {
  animation-delay: 0.5s;
}

@keyframes sceneVoiceRipple {
  0% { width: 100%; height: 100%; opacity: 0.5; }
  100% { width: 160%; height: 160%; opacity: 0; }
}

/* 已播放状态 */
.scene-voice-btn.has-played {
  opacity: 0.9;
}

/* 纯图标模式（无文字时） */
.scene-voice-btn:not(:has(.scene-voice-text)) {
  padding: 8px;
  width: 36px;
  height: 36px;
  justify-content: center;
}
.scene-voice-btn.scene-voice-small:not(:has(.scene-voice-text)) {
  width: 30px;
  height: 30px;
  padding: 6px;
}
.scene-voice-btn.scene-voice-large:not(:has(.scene-voice-text)) {
  width: 44px;
  height: 44px;
  padding: 10px;
}

/* ========== 老师寄语卡片 ========== */
.voice-message-card {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF8E7, #FFEFD5);
  border: 2px solid rgba(243, 156, 18, 0.2);
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.voice-message-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(243, 156, 18, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.voice-message-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.voice-message-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.voice-message-title {
  font-size: 15px;
  font-weight: 700;
  color: #9B5A0B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-message-text {
  font-size: 14px;
  line-height: 1.7;
  color: #6B4423;
  white-space: pre-line;
}

/* 类型变体 */
.voice-message-correct {
  background: linear-gradient(135deg, #E8F8EF, #D4F0E0);
  border-color: rgba(39, 174, 96, 0.25);
}
.voice-message-correct::before {
  background: radial-gradient(circle, rgba(39, 174, 96, 0.15) 0%, transparent 70%);
}
.voice-message-correct .voice-message-title {
  color: #1B7A3D;
}
.voice-message-correct .voice-message-text {
  color: #2E5D3A;
}

.voice-message-wrong {
  background: linear-gradient(135deg, #FFF0E0, #FFE8CC);
  border-color: rgba(230, 126, 34, 0.25);
}
.voice-message-wrong::before {
  background: radial-gradient(circle, rgba(230, 126, 34, 0.15) 0%, transparent 70%);
}
.voice-message-wrong .voice-message-title {
  color: #B85C00;
}
.voice-message-wrong .voice-message-text {
  color: #7A4410;
}

.voice-message-celebrate {
  background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
  border-color: rgba(155, 89, 182, 0.3);
}
.voice-message-celebrate::before {
  background: radial-gradient(circle, rgba(155, 89, 182, 0.2) 0%, transparent 70%);
}
.voice-message-celebrate .voice-message-title {
  color: #6A1B9A;
}
.voice-message-celebrate .voice-message-text {
  color: #4A148C;
}

/* 强化版卡片 */
.advanced-version .voice-message-card {
  background: #f9fbf2;
  border: 2px solid #130e30;
  border-radius: 20px;
  box-shadow: 4px 4px 0 #130e30;
}
.advanced-version .voice-message-card::before {
  display: none;
}
.advanced-version .voice-message-title {
  color: #130e30;
  font-family: 'Baloo 2', 'Noto Sans SC', sans-serif;
}
.advanced-version .voice-message-text {
  color: #130e30;
  opacity: 0.8;
}

/* 移动端 */
@media (max-width: 768px) {
  .voice-message-card {
    padding: 14px 16px;
    gap: 12px;
  }
  .voice-message-icon {
    font-size: 32px;
  }
  .voice-message-text {
    font-size: 13px;
    line-height: 1.6;
  }
}


/* ============================================================
   Learning Footprint Modal —— 学习足迹模态框
   ============================================================ */

.lfp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lfp-fadeIn 0.3s ease;
}

@keyframes lfp-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lfp-modal {
  background: #FAF7F2;
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(131, 56, 236, 0.2), 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: lfp-scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

@keyframes lfp-scaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 头部 */
.lfp-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 24px 28px 16px;
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.08), rgba(58, 134, 255, 0.06));
  border-bottom: 1px solid rgba(131, 56, 236, 0.08);
  position: relative;
}

.lfp-header-text { flex: 1; }

.lfp-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #8338EC, #3A86FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Noto Sans SC', sans-serif;
}

.lfp-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: #6B7280;
}

.lfp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.lfp-action-btn {
  padding: 8px 14px;
  border: 1px solid #E5E7EB;
  background: #fff;
  border-radius: 10px;
  font-size: 13px;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.lfp-action-btn:hover {
  border-color: #C4B5FD;
  background: #F5F3FF;
  color: #7C3AED;
}

.lfp-caret {
  font-size: 10px;
  opacity: 0.6;
}

.lfp-export-wrap { position: relative; }

.lfp-export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 180px;
  z-index: 100;
  animation: lfp-menuIn 0.2s ease;
}

@keyframes lfp-menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lfp-export-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.lfp-export-menu button:hover {
  background: #F5F3FF;
  color: #7C3AED;
}

.lfp-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lfp-close-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #4B5563;
}

/* 内容区 */
.lfp-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 统计卡片 */
.lfp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lfp-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lfp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(131, 56, 236, 0.1);
}

.lfp-stat-num {
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(135deg, #8338EC, #3A86FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Quicksand', sans-serif;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lfp-fire-icon {
  font-size: 22px;
  -webkit-text-fill-color: initial;
}

.lfp-stat-label {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* 通用 section */
.lfp-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.lfp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.lfp-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  font-family: 'Noto Sans SC', sans-serif;
}

/* 月历导航 */
.lfp-month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lfp-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #E5E7EB;
  background: #fff;
  border-radius: 8px;
  color: #6B7280;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}

.lfp-nav-btn:hover {
  border-color: #C4B5FD;
  background: #F5F3FF;
  color: #7C3AED;
}

.lfp-month-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  min-width: 90px;
  text-align: center;
}

/* 日历 */
.lfp-calendar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: lfp-fadeIn 0.3s ease;
}

.lfp-calendar.lfp-slide-left {
  animation: lfp-slideLeft 0.3s ease;
}

.lfp-calendar.lfp-slide-right {
  animation: lfp-slideRight 0.3s ease;
}

@keyframes lfp-slideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes lfp-slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.lfp-calendar-weekdays,
.lfp-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.lfp-calendar-weekday {
  font-size: 12px;
  color: #9CA3AF;
  text-align: center;
  padding: 4px 0;
  font-weight: 500;
}

.lfp-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #6B7280;
  border-radius: 8px;
  cursor: default;
  transition: transform 0.15s;
  background: #F9FAFB;
  font-weight: 500;
}

.lfp-calendar-day.lfp-empty {
  background: transparent;
  cursor: default;
}

.lfp-calendar-day.lfp-today {
  border: 2px solid #8338EC;
  box-sizing: border-box;
  font-weight: 700;
}

.lfp-calendar-day.lfp-has-activity {
  cursor: pointer;
  font-weight: 600;
}

.lfp-calendar-day.lfp-has-activity:hover {
  transform: scale(1.1);
}

.lfp-calendar-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: #6B7280;
}

/* 热力图 */
.lfp-heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.lfp-heatmap {
  display: flex;
  gap: 3px;
  min-width: 100%;
  width: fit-content;
}

.lfp-heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: lfp-heatFadeIn 0.5s ease both;
}

@keyframes lfp-heatFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.lfp-heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.lfp-heatmap-cell:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(131, 56, 236, 0.3);
  z-index: 1;
  position: relative;
}

.lfp-heat-level-0 { background: #F3F4F6; }
.lfp-heat-level-1 { background: #E9D5FF; }
.lfp-heat-level-2 { background: #C084FC; }
.lfp-heat-level-3 { background: #9333EA; }
.lfp-heat-level-4 { background: #6B21A8; }

.lfp-heatmap-cell.lfp-heat-future {
  background: transparent;
  cursor: default;
}

.lfp-heatmap-cell.lfp-heat-future:hover {
  transform: none;
  box-shadow: none;
}

.lfp-heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.lfp-legend-label {
  font-size: 11px;
  color: #9CA3AF;
}

.lfp-heatmap-summary {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: #6B7280;
}

/* 空状态 */
.lfp-empty-heatmap {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
}

.lfp-empty-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.lfp-empty-heatmap p {
  margin: 0;
  font-size: 14px;
}

/* Tooltip */
.lfp-tooltip {
  position: absolute;
  background: rgba(31, 41, 55, 0.95);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: lfp-tooltipIn 0.15s ease;
}

@keyframes lfp-tooltipIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lfp-tooltip-date {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  color: #C4B5FD;
}

.lfp-tooltip-item {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  line-height: 1.6;
}

.lfp-tooltip-item strong {
  color: #fff;
  font-weight: 600;
}

/* 今日学习卡片可点击提示 */
.home-today-stat-clickable {
  cursor: pointer;
  transition: transform 0.2s;
}

.home-today-stat-clickable:hover {
  transform: translateY(-1px);
}

.home-today-stat-clickable .home-today-stat-num {
  position: relative;
}

.home-today-stat-clickable .home-today-stat-num::after {
  content: '›';
  margin-left: 2px;
  font-size: 0.8em;
  opacity: 0.5;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .lfp-overlay { padding: 0; align-items: flex-end; }
  .lfp-modal {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: lfp-slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes lfp-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .lfp-header { padding: 20px 18px 14px; }
  .lfp-body { padding: 16px 18px 24px; }
  .lfp-title { font-size: 20px; }
  .lfp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lfp-stat-num { font-size: 26px; }
  .lfp-section { padding: 16px; }
  .lfp-section-title { font-size: 15px; }
  .lfp-calendar-day { font-size: 12px; border-radius: 6px; }
}

/* 学习足迹 — 顶部导航栏按钮 */
.home-the1-footprint-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(58, 134, 255, 0.1));
  border: 1px solid rgba(131, 56, 236, 0.25);
  color: #7c3aed;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--the1-font);
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.home-the1-footprint-btn:hover {
  background: linear-gradient(135deg, #8338EC, #3A86FF);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.25);
}

/* 联系我们按钮 — 显眼，吸顶导航右侧 */
.home-the1-contact-btn {
  padding: 7px 16px;
  background: linear-gradient(135deg, #FF6B6B, #FF4D6D);
  border: none;
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--the1-font);
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(255, 77, 109, 0.3);
  letter-spacing: 0.02em;
}
.home-the1-contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 77, 109, 0.4);
  background: linear-gradient(135deg, #FF5577, #EE3A5A);
}

/* 学习足迹 — 今日卡片底部入口 */
.home-today-footprint-entry {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F3F4F6;
}

.home-today-footprint-btn {
  width: 100%;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid rgba(131, 56, 236, 0.15);
  border-radius: 12px;
  color: #7c3aed;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--the1-font);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.home-today-footprint-btn:hover {
  background: #faf5ff;
  border-color: #C4B5FD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.15);
}

.home-today-footprint-icon {
  font-size: 16px;
}

.home-today-footprint-arrow {
  transition: transform 0.2s;
  font-weight: 700;
}

.home-today-footprint-btn:hover .home-today-footprint-arrow {
  transform: translateX(3px);
}

/* 加强可点击数字的视觉提示 */
.home-today-stat-clickable {
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border-radius: 8px;
}

.home-today-stat-clickable:hover {
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.06), rgba(58, 134, 255, 0.06));
  transform: translateY(-1px);
}

.home-today-stat-clickable:hover .home-today-stat-num {
  background: linear-gradient(135deg, #8338EC, #3A86FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-today-stat-clickable .home-today-stat-num::after {
  content: '›';
  margin-left: 2px;
  font-size: 0.8em;
  opacity: 0.5;
  -webkit-text-fill-color: #8338EC;
  transition: opacity 0.2s, transform 0.2s;
}

.home-today-stat-clickable:hover .home-today-stat-num::after {
  opacity: 1;
  transform: translateX(2px);
}


/* ==========================================================================
   Dashboard 布局 - 高级感设计规范
   Design Tokens: --primary #7c3aed, --success #16a34a, 灰度体系
   ========================================================================== */

/* ---- 设计变量 ---- */
.db-layout {
  /* 对齐首页色系：主强调 = 首页品牌紫（MySol Logo 渐变紫），不用深绿 */
  --brand-accent: #8338ec;
  --brand-accent-dark: #6226b8;
  /* --ts-primary 在 :root 已按根绿值计算并继承（改不到），作用域内重新声明使其跟随紫色 */
  --ts-primary: var(--brand-accent);
  --ts-success: var(--brand-accent);
  --db-primary: var(--brand-accent);
  --db-success: var(--brand-accent);
  --db-text-1: var(--brand-ink);
  --db-text-2: var(--brand-ink-2);
  --db-text-3: var(--brand-ink-3);
  --db-border: var(--brand-line);
  --db-icon-bg: rgba(131, 56, 236, 0.08);
  --db-success-bg: rgba(131, 56, 236, 0.08);
  --db-bg: var(--brand-canvas);
  --db-card-bg: var(--brand-paper);
  --db-primary-gradient: var(--brand-accent);
}

.db-layout {
  display: flex;
  height: 100vh;
  background: var(--db-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--db-text-1);
}

/* ---- 图标容器通用 ---- */
.db-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.db-icon-box-primary {
  background: var(--db-icon-bg);
  color: var(--db-primary);
}
.db-icon-box-success {
  background: var(--db-success-bg);
  color: var(--db-success);
}
.db-icon-box-muted {
  background: #f3f4f6;
  color: var(--db-text-3);
}

/* ---- 侧边栏容器 ---- */
.db-sidebar-wrapper {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  background: var(--db-card-bg);
  border-right: 1px solid var(--db-border);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, transform 0.3s ease;
}

.db-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 顶部不再留白：Logo 区与顶栏同高（64px）对齐 */
  padding: 0 14px 16px;
  gap: 20px;
  overflow: visible;
}

/* 导航列表独立滚动，保持侧边栏顶部底部固定而中间可滚 */
.db-sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

/* 折叠态：导航列表停止裁剪，让 hover 气泡能伸出窄栏 */
.db-sidebar-wrapper.collapsed .db-sidebar-nav {
  overflow: visible;
}

/* 折叠态：取消 wrapper 内部裁剪，让 hover 名称气泡能伸出 64px 窄栏不被裁剪 */
.db-sidebar-wrapper.collapsed {
  overflow: visible;
}
.db-sidebar-wrapper.collapsed .db-sidebar {
  overflow: visible;
}

/* ---- Logo 区 ---- */
.db-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 8px;
  box-sizing: border-box;
  flex-shrink: 0;
  border-bottom: 1px solid var(--db-border);
  cursor: pointer;
  transition: opacity 0.2s;
}
.db-sidebar-logo:hover {
  opacity: 0.85;
}

.db-sidebar-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--db-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.db-sidebar-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--db-text-1);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.db-sidebar-logo-sub {
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
  margin-top: 2px;
}

/* ---- 导航 ---- */
.db-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.db-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--db-text-2);
  font-family: inherit;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.db-nav-item:hover {
  background: var(--db-icon-bg);
  color: var(--db-primary);
}

.db-nav-item.active {
  background: var(--db-icon-bg);
  color: var(--db-primary);
  font-weight: 600;
}

.db-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-nav-label {
  flex: 1;
}

/* ---- 积分展示卡 ---- */
.db-sidebar-score {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.db-sidebar-score:hover {
  border-color: var(--db-primary);
}

.db-sidebar-score-label {
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
  margin-bottom: 8px;
}

.db-sidebar-score-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--db-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.db-sidebar-score-iconbox {
  width: 22px;
  height: 22px;
}

.db-sidebar-score-sub {
  font-size: 11px;
  color: var(--db-text-3);
  margin-top: 8px;
  font-weight: 400;
}

/* ---- 底部用户信息 ---- */
.db-sidebar-footer {
  border-top: 1px solid var(--db-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.db-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
}

.db-sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--db-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.db-sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.db-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-sidebar-user-status {
  font-size: 11px;
  font-weight: 400;
  color: var(--db-text-3);
  margin-top: 1px;
}

.db-sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--db-border);
  color: var(--db-text-2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.db-sidebar-logout-btn:hover {
  border-color: var(--db-text-3);
  color: var(--db-text-1);
}

.db-sidebar-logout-icon {
  width: 14px;
  height: 14px;
}

/* ---- 侧边栏折叠切换按钮 ---- */
.db-sidebar-collapse-btn {
  margin-left: auto;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  color: var(--db-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}
.db-sidebar-collapse-btn svg {
  width: 18px;
  height: 18px;
}
.db-sidebar-collapse-btn:hover {
  background: var(--db-icon-bg);
  color: var(--db-primary);
  border-color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.18);
}
.db-sidebar-collapse-btn:active {
  transform: scale(0.92);
}
.db-sidebar-collapse-btn:focus-visible {
  outline: 2px solid var(--db-primary);
  outline-offset: 2px;
}

/* ---- 侧边栏折叠态（仅图标） ---- */
.db-sidebar-wrapper.collapsed {
  width: 64px;
}
.db-sidebar-wrapper.collapsed .db-sidebar {
  padding: 20px 8px;
}
.db-sidebar-wrapper.collapsed .db-sidebar-logo-sub,
.db-sidebar-wrapper.collapsed .db-nav-label,
.db-sidebar-wrapper.collapsed .db-sidebar-user-info,
.db-sidebar-wrapper.collapsed .db-nav-group-label,
.db-sidebar-wrapper.collapsed .db-nav-group-chevron,
.db-sidebar-wrapper.collapsed .db-sidebar-logout-text {
  display: none;
}
/* 折叠态：顶部只保留展开按钮，避免 MySol 与按钮拥挤 */
.db-sidebar-wrapper.collapsed .db-sidebar-logo-name,
.db-sidebar-wrapper.collapsed .db-nav-feedback-badge {
  display: none;
}
.db-sidebar-wrapper.collapsed .db-sidebar-logo {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 10px;
}
.db-sidebar-wrapper.collapsed .db-sidebar-collapse-btn {
  margin-left: 0;
}
.db-sidebar-wrapper.collapsed .db-nav-item,
.db-sidebar-wrapper.collapsed .db-nav-group-header {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.db-sidebar-wrapper.collapsed .db-nav-item-indented {
  padding-left: 0 !important;
}
.db-sidebar-wrapper.collapsed .db-sidebar-user {
  justify-content: center;
}
.db-sidebar-wrapper.collapsed .db-sidebar-logout-btn {
  padding: 8px;
}
.db-sidebar-wrapper.collapsed .db-nav-divider {
  margin: 6px 4px;
}

/* ---- 折叠态 hover 菜单名称气泡 ---- */
.db-sidebar-wrapper.collapsed [data-tip] {
  position: relative;
}
.db-sidebar-wrapper.collapsed [data-tip]::after,
.db-sidebar-collapse-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: rgba(17, 24, 39, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.db-sidebar-wrapper.collapsed [data-tip]:hover::after,
.db-sidebar-collapse-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
/* 展开态：折叠按钮的气泡向左弹（避免伸出 240px 侧栏被滚动容器裁剪） */
.db-sidebar-wrapper:not(.collapsed) .db-sidebar-collapse-btn::after {
  left: auto;
  right: calc(100% + 10px);
}
/* 折叠按钮展开态也需要气泡（不依赖 collapsed） */
.db-sidebar-collapse-btn {
  position: relative;
}
/* 学习档案子项展开后允许气泡溢出分组容器 */
.db-sidebar-wrapper .db-nav-group-content.open {
  overflow: visible;
}

/* ---- 主内容区 ---- */
.db-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- 顶部栏 ---- */
.db-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 64px;
  padding: 0 32px;
  box-sizing: border-box;
  flex-shrink: 0;
  border-bottom: 1px solid var(--db-border);
  background: var(--db-card-bg);
}

.db-topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.db-topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.db-topbar-score {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  cursor: pointer;
  transition: all 0.2s ease;
}
.db-topbar-score:hover {
  border-color: var(--db-primary);
}
.db-topbar-score-icon {
  color: #FACC15;
  fill: #FACC15;
  stroke: #FACC15;
}
.db-topbar-score-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--db-primary);
  line-height: 1;
}

/* 顶栏会员徽章：免费用户点击引导开通，会员显示等级 */
.db-topbar-member {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #8338ec, #b06bff);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(131, 56, 236, 0.35);
  position: relative;
  overflow: hidden;
}
.db-topbar-member::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.db-topbar-member:hover::before {
  transform: translateX(100%);
}
.db-topbar-member:hover {
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.5);
  transform: translateY(-1px);
}
.db-topbar-member.is-free .db-member-icon {
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.6));
}
.db-topbar-member.is-member {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.db-topbar-member.is-member:hover {
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
}

.db-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--db-text-1);
  margin: 0;
  letter-spacing: -0.01em;
}

.db-topbar-date {
  font-size: 13px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

/* 右上角头像（打开用户菜单） */
.db-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease;
}
.db-topbar-user:hover,
.db-topbar-user.is-open {
  background: var(--db-icon-bg);
}
.db-topbar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-topbar-user-chevron {
  color: var(--db-text-3);
  transition: transform 0.18s ease;
}
.db-topbar-user.is-open .db-topbar-user-chevron {
  transform: rotate(180deg);
}

.db-topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--db-primary), var(--brand-accent, #7c3aed));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.db-topbar-user:hover .db-topbar-avatar {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.db-topbar-streak {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--db-icon-bg);
  border-radius: 8px;
  color: var(--db-primary);
}

.db-topbar-streak-icon {
  width: 16px;
  height: 16px;
}

.db-topbar-streak-num {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.db-topbar-streak-label {
  font-size: 11px;
  color: var(--db-text-2);
  font-weight: 400;
}

/* ---- 内容区 ---- */
.db-content {
  padding: 28px 32px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* 我的订单页：内部列表滚动，标题/筛选/分页固定 */
.db-content.db-content-orders {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* 顶部有权限横幅时，订单面板高度相应减少 */
body.has-perm-banner .orders-panel-root {
  height: calc(100vh - 160px) !important;
}

/* ---- 三列网格 ---- */
.db-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ---- 卡片基础样式 ---- */
.db-card {
  background: var(--db-card-bg);
  border-radius: 12px;
  border: 1px solid var(--db-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.db-card:hover {
  border-color: #e0e3ea;
}

.db-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.db-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--db-text-1);
  margin: 0;
  letter-spacing: -0.005em;
}

.db-card-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--db-text-3);
  transition: all 0.15s ease;
}
.db-card-icon-btn:hover {
  background: var(--db-icon-bg);
  color: var(--db-primary);
}

/* ---- 打卡卡片 ---- */
.db-checkin-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 0 8px;
}

.db-checkin-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  text-align: center;
  padding: 8px 0;
}

.db-checkin-stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--db-text-1);
  letter-spacing: -0.02em;
}

.db-checkin-stat-label {
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-checkin-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--db-border);
  flex-shrink: 0;
}

/* ---- 今日目标 ---- */
.db-today-goal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f9fafb;
  border-radius: 10px;
  color: var(--db-text-2);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s ease;
}

.db-today-goal.achieved {
  background: var(--db-success-bg);
  color: var(--db-success);
  font-weight: 500;
}

.db-today-goal-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- 本周打卡 ---- */
.db-week-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.db-week-label {
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.db-week-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.db-week-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.db-week-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--db-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s ease;
}

.db-week-dot.checked {
  background: var(--db-primary);
  color: white;
}

.db-week-dot.today:not(.checked) {
  background: var(--db-icon-bg);
  border: 1px solid #ddd6fe;
}

.db-week-dot.future {
  opacity: 0.5;
}

.db-week-day {
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
}

/* ---- 操作按钮 ---- */
.db-checkin-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.db-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.db-btn-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 幽灵按钮 - 文字+箭头 */
.db-btn-ghost {
  background: transparent;
  color: var(--db-primary);
  padding: 10px 4px;
  font-weight: 500;
}
.db-btn-ghost:hover {
  color: #6d28d9;
}
.db-btn-ghost:hover .db-btn-arrow {
  transform: translateX(2px);
}
.db-btn-ghost .db-btn-arrow {
  transition: transform 0.15s ease;
}

/* 幽灵按钮 - 主色实心小按钮 */
.db-btn-ghost-primary {
  background: transparent;
  color: var(--db-primary);
  font-weight: 600;
  padding: 8px 12px;
}
.db-btn-ghost-primary:hover {
  background: var(--db-icon-bg);
}

/* 唯一渐变按钮 - 全站最强调CTA */
.db-btn-gradient {
  background: var(--db-primary-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}
.db-btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ---- 任务卡片 ---- */
.db-task-score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--db-icon-bg);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--db-primary);
}

.db-task-section-title {
  font-size: 11px;
  font-weight: 400;
  color: var(--db-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--db-border);
}

.db-task-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.db-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--db-border);
  transition: all 0.15s ease;
}
.db-task-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.db-task-item:first-child {
  padding-top: 8px;
}

.db-task-item.completed {
  opacity: 0.7;
}

.db-task-content {
  flex: 1;
  min-width: 0;
}

.db-task-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-task-reward-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--db-primary);
  background: var(--db-icon-bg);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.db-task-reward-badge.claimed {
  color: var(--db-success);
  background: var(--db-success-bg);
}

.db-task-desc {
  font-size: 12px;
  color: var(--db-text-2);
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.4;
}

/* 去完成 - 文字按钮 */
.db-task-link-btn {
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--db-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.db-task-link-btn:hover {
  color: #6d28d9;
}
.db-task-link-btn:hover .db-btn-arrow {
  transform: translateX(2px);
}
.db-task-link-btn .db-btn-arrow {
  transition: transform 0.15s ease;
}

/* 已完成状态 */
.db-task-completed {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--db-success);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---- 热力图卡片 ---- */
.db-heatmap-month {
  display: flex;
  align-items: center;
  gap: 4px;
}

.db-heatmap-arrow {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--db-text-2);
  transition: all 0.15s ease;
}
.db-heatmap-arrow:hover {
  background: var(--db-icon-bg);
  color: var(--db-primary);
}

.db-heatmap-month-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--db-text-2);
  min-width: 68px;
  text-align: center;
}

.db-heatmap-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}

.db-heatmap-weekdays span {
  text-align: center;
  font-size: 10px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.db-heatmap-cell-wrapper {
  aspect-ratio: 1;
}

.db-heatmap-cell {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 400;
  background: #f3f4f6;
  color: transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.db-heatmap-cell:hover {
  transform: scale(1.1);
}

.db-heatmap-cell.today {
  box-shadow: 0 0 0 2px var(--db-primary);
}

.db-heatmap-cell.future {
  opacity: 0.3;
}

/* 热力等级 - 5级主色透明度渐变 */
.heat-level-0 { background: #f3f4f6; }
.heat-level-1 { background: rgba(124, 58, 237, 0.15); }
.heat-level-2 { background: rgba(124, 58, 237, 0.3); }
.heat-level-3 { background: rgba(124, 58, 237, 0.5); }
.heat-level-4 { background: rgba(124, 58, 237, 0.7); }

.heat-level-1, .heat-level-2, .heat-level-3, .heat-level-4 {
  color: white;
}

.db-heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 10px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-heatmap-legend-cells {
  display: flex;
  gap: 3px;
}

.db-heatmap-cell.small {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  cursor: default;
}

.db-heatmap-cell.small:hover {
  transform: none;
}

/* 卡片分隔线 */
.db-card-divider {
  height: 1px;
  background: var(--db-border);
  margin: 0 -20px;
}

.db-sub-header {
  padding-top: 0;
}

.db-sub-title {
  font-size: 14px;
  font-weight: 600;
}

/* ---- 最近学习 ---- */
.db-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 -8px;
}

.db-recent-item:hover {
  background: var(--db-bg);
}

.db-recent-info {
  flex: 1;
  min-width: 0;
}

.db-recent-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
}

.db-recent-meta {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-recent-version {
  color: var(--db-primary);
  font-weight: 500;
}

.db-recent-arrow {
  color: var(--db-text-3);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.db-recent-item:hover .db-recent-arrow {
  color: var(--db-primary);
  transform: translateX(2px);
}

.db-recent-empty {
  text-align: center;
  padding: 16px 8px;
  color: var(--db-text-3);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.db-recent-empty-icon {
  width: 40px;
  height: 40px;
}

.db-recent-empty p {
  margin: 0;
  font-size: 12px;
}

/* ---- 底部卡片 ---- */
.db-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.db-bottom-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.db-bottom-card-content {
  flex: 1;
  min-width: 0;
}

.db-bottom-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
}

.db-bottom-card-desc {
  font-size: 12px;
  color: var(--db-text-2);
  margin-top: 2px;
  font-weight: 400;
}

.db-bottom-card-arrow {
  color: var(--db-text-3);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.db-bottom-card:hover .db-bottom-card-arrow {
  color: var(--db-primary);
  transform: translateX(2px);
}

/* ---- 设置面板 ---- */
.db-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: db-fade-in 0.2s ease;
}

.db-settings-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  animation: db-slide-up 0.3s ease;
  border: 1px solid var(--db-border);
}

.db-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--db-border);
}

.db-settings-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--db-text-1);
}

.db-settings-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--db-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.db-settings-close:hover {
  background: #f3f4f6;
  color: var(--db-text-1);
}

.db-settings-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.db-settings-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--db-border);
}
.db-settings-item:last-child {
  border-bottom: none;
}

.db-settings-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--db-text-1);
}

.db-settings-desc {
  font-size: 12px;
  color: var(--db-text-2);
  margin-top: 2px;
  font-weight: 400;
}

.db-settings-value {
  font-size: 13px;
  color: var(--db-text-2);
  font-weight: 400;
}

.db-select {
  padding: 6px 12px;
  border: 1px solid var(--db-border);
  border-radius: 8px;
  background: white;
  font-size: 13px;
  color: var(--db-text-1);
  cursor: pointer;
  font-family: inherit;
}
.db-select:focus {
  outline: none;
  border-color: var(--db-primary);
}

/* ---- 动画 ---- */
@keyframes db-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes db-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- 响应式 ---- */
@media (max-width: 1200px) {
  .db-home-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

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

  .db-sidebar-wrapper {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    box-shadow: none;
  }
  .db-sidebar-wrapper.open {
    transform: translateX(0);
  }
  .db-sidebar-wrapper.collapsed {
    width: 240px;
  }
  /* 移动端抽屉始终完整显示文字，折叠态视觉规则全部还原 */
  .db-sidebar-wrapper.collapsed .db-sidebar-logo-text,
  .db-sidebar-wrapper.collapsed .db-nav-label,
  .db-sidebar-wrapper.collapsed .db-sidebar-user-info,
  .db-sidebar-wrapper.collapsed .db-nav-group-label,
  .db-sidebar-wrapper.collapsed .db-nav-group-chevron,
  .db-sidebar-wrapper.collapsed .db-sidebar-logout-text {
    display: flex;
  }
  .db-sidebar-wrapper.collapsed .db-sidebar-logo {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 16px;
  }
  .db-sidebar-wrapper.collapsed .db-sidebar-collapse-btn {
    margin-left: auto;
  }
  .db-sidebar-wrapper.collapsed .db-nav-item,
  .db-sidebar-wrapper.collapsed .db-nav-group-header {
    justify-content: flex-start;
    padding: 10px 12px;
  }
  .db-sidebar-wrapper.collapsed .db-nav-group-header {
    padding: 8px 16px;
  }
  .db-sidebar-wrapper.collapsed .db-nav-item-indented {
    padding-left: 32px !important;
  }
  .db-sidebar-wrapper.collapsed .db-sidebar-user {
    justify-content: flex-start;
  }
  .db-sidebar-wrapper.collapsed .db-sidebar-logout-btn {
    padding: 8px 12px;
  }
  /* 移动端不显示 hover 气泡 */
  .db-sidebar-wrapper.collapsed [data-tip]::after,
  .db-sidebar-collapse-btn::after {
    display: none;
  }
  /* 移动端抽屉恢复内部滚动，防止折叠态内容超高无法滚动 */
  .db-sidebar-wrapper.collapsed .db-sidebar {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .db-content {
    padding: 20px 16px;
  }

  .db-topbar {
    padding: 16px;
  }

  .db-page-title {
    font-size: 18px;
  }

  .db-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- 移动端顶栏 ---- */
.db-mobile-header {
  display: none;
}
.db-mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--db-text-2);
}

@media (max-width: 900px) {
  .db-mobile-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    background: var(--db-card-bg);
    border-bottom: 1px solid var(--db-border);
  }
  .db-mobile-menu-btn {
    display: flex;
  }
}

/* ---- 用户菜单 ---- */
.db-user-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: transparent;
}

.db-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  min-width: 252px;
  background: #fff;
  border: 1px solid var(--db-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(31, 27, 75, 0.14), 0 2px 6px rgba(31, 27, 75, 0.06);
  animation: db-fade-in 0.16s ease;
}

.db-user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--db-border);
}

.db-user-menu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--db-primary), var(--brand-accent, #7c3aed));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.db-user-menu-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--db-text-1);
  line-height: 1.3;
}

.db-user-menu-status {
  font-size: 12px;
  color: var(--db-text-2, #6b7280);
  margin-top: 1px;
}

.db-user-menu-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--db-primary), var(--brand-accent, #7c3aed));
  color: #fff;
  font-size: 13px;
}

.db-user-menu-score-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
}

.db-user-menu-divider {
  height: 1px;
  background: var(--db-border);
  margin: 8px 2px;
}

.db-user-menu-logout {
  color: #dc2626;
}
.db-user-menu-logout:hover {
  background: #fef2f2;
}

.db-user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--db-border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.db-user-menu-trigger:hover {
  border-color: var(--db-primary);
}

.db-user-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--db-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.db-user-menu-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--db-text-1);
}

.db-user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 20;
  animation: db-fade-in 0.15s ease;
}

.db-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--db-text-1);
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}
.db-user-menu-item:hover {
  background: var(--db-bg);
}

.db-user-menu-item.danger {
  color: #dc2626;
}
.db-user-menu-item.danger:hover {
  background: #fef2f2;
}

.db-user-menu-section {
  padding: 8px 12px;
  border-bottom: 1px solid var(--db-border);
  margin-bottom: 4px;
}

.db-user-menu-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 4px;
}

.db-user-menu-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--db-bg, #f7f6fb);
  font-size: 12px;
  color: var(--db-text-2, #6b7280);
  white-space: nowrap;
}

.db-user-menu-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--db-text-1);
}

.db-user-menu-stat-value.ai {
  color: var(--db-primary);
}

.db-user-menu-stat-value.unlock {
  color: var(--db-success);
}

.db-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--db-text-1);
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}
.db-user-menu-item:hover {
  background: var(--db-bg, #f7f6fb);
}
.db-user-menu-item svg {
  color: var(--db-text-2, #6b7280);
  flex-shrink: 0;
}
.db-user-menu-item:hover svg {
  color: var(--db-primary);
}

/* ===== 学习看板：课程掌握度卡片 ===== */
.db-mastery-card .db-card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 14px;
}
.db-mastery-card .db-card-title {
  font-size: 15px;
}
.db-card-subtitle {
  font-size: 12px;
  color: var(--db-text-3);
  font-weight: 400;
}

.db-mastery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-mastery-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.db-mastery-item:hover {
  background: var(--db-icon-bg);
}

.db-mastery-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  flex-shrink: 0;
}
.db-mastery-item-index {
  font-size: 12px;
  font-weight: 600;
  color: var(--db-text-3);
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
}
.db-mastery-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--db-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-mastery-item-center {
  flex: 1;
  min-width: 0;
}
.db-mastery-progress-track {
  height: 6px;
  background: var(--db-icon-bg);
  border-radius: 3px;
  overflow: hidden;
}
.db-mastery-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.db-mastery-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 64px;
  flex-shrink: 0;
}
.db-mastery-item-percent {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.db-mastery-item-minutes {
  font-size: 11px;
  color: var(--db-text-3);
  line-height: 1;
}
.db-mastery-item-fta {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 2px 5px;
  background: #f8fafc;
  border-radius: 4px;
  margin-top: 2px;
}

/* 空状态 */
.db-mastery-empty,
.db-weak-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  gap: 10px;
}
.db-mastery-empty-icon,
.db-weak-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--db-icon-bg);
  color: var(--db-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.db-mastery-empty-title,
.db-weak-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--db-text-1);
}
.db-mastery-empty-desc,
.db-weak-empty-desc {
  font-size: 13px;
  color: var(--db-text-2);
  line-height: 1.6;
  margin-bottom: 6px;
}

/* ===== 学习看板：薄弱知识点卡片 ===== */
.db-weak-card .db-card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 14px;
}
.db-weak-card .db-card-title {
  font-size: 15px;
}

.db-weak-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.db-weak-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--db-icon-bg);
}

.db-weak-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-weak-item-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-weak-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-weak-item-rate {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.db-weak-item-rate-sub {
  color: var(--db-text-3);
  font-weight: 400;
  margin-left: 2px;
}

.db-weak-item-btn {
  padding: 5px 10px !important;
  font-size: 12px !important;
  flex-shrink: 0;
}

.db-weak-footer-tip {
  font-size: 11px;
  color: var(--db-text-3);
  text-align: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--db-border);
}

/* 移动端适配 */
@media (max-width: 900px) {
  .db-mastery-item-left {
    min-width: 80px;
  }
  .db-mastery-item-title {
    font-size: 12px;
  }
}

/* 学习看板栅格：掌握度 + 薄弱点 并排 */
.db-analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.db-analytics-grid .db-card {
  height: fit-content;
}

@media (max-width: 1100px) {
  .db-analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 学习看板：学习趋势卡片 ===== */
.db-trend-card {
  width: 100%;
}
.db-trend-section {
  margin-top: 16px;
  width: 100%;
}

.db-trend-card .db-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.db-trend-card .db-card-title {
  margin: 0;
}
.db-trend-card .db-card-subtitle {
  display: block;
  margin-top: 2px;
}

.db-trend-range {
  display: flex;
  gap: 4px;
  background: var(--db-icon-bg);
  padding: 3px;
  border-radius: 8px;
}
.db-trend-range-btn {
  border: none;
  background: transparent;
  color: var(--db-text-2);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.db-trend-range-btn:hover {
  color: var(--db-text-1);
}
.db-trend-range-btn.active {
  background: var(--db-primary);
  color: #fff;
}

/* Tabs */
.db-trend-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--db-border, #eef0f4);
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.db-trend-tab {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  white-space: nowrap;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
.db-trend-tab:hover {
  color: #374151;
}
.db-trend-tab.active {
  color: var(--db-primary);
  border-bottom-color: var(--db-primary);
}

.db-trend-canvas {
  width: 100%;
  height: 200px;
  display: block;
}
.db-trend-chart-wrap {
  width: 100%;
  margin: 4px 0 12px;
}

.db-trend-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  gap: 10px;
}
.db-trend-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--db-icon-bg);
  color: var(--db-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.db-trend-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--db-text-1);
}
.db-trend-empty-desc {
  font-size: 13px;
  color: var(--db-text-2);
  line-height: 1.6;
  margin-bottom: 6px;
}
.db-trend-canvas-few {
  width: 100%;
  margin-top: 4px;
  opacity: 0.7;
}
.db-trend-canvas-few .db-trend-canvas {
  height: 140px;
}

.db-trend-compare {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--db-border, #eef0f4);
  font-size: 13px;
  color: var(--db-text-2);
}
.db-trend-compare-label {
  color: var(--db-text-3);
  font-size: 12px;
}
.db-trend-compare-value {
  flex: 1;
}
.db-trend-compare-value strong {
  color: var(--db-text-1);
  font-weight: 600;
  margin: 0 2px;
}
.db-trend-compare-change {
  font-weight: 600;
  font-size: 13px;
}
.db-trend-breakdown-pct {
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 640px) {
  .db-trend-canvas {
    height: 180px;
  }
  .db-trend-range-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}


/* ============================================
   学习体检（诊断测试）样式
   ============================================ */

/* Dashboard 学习体检卡片 */
.db-diagnostic-card {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  color: #fff;
  border: none;
  overflow: hidden;
  position: relative;
}
.db-diagnostic-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.db-diagnostic-card .db-card-title {
  color: #fff;
  font-size: 16px;
}
.db-diagnostic-icon {
  margin-right: 4px;
}
.db-diagnostic-card .db-btn-text-link {
  color: rgba(255, 255, 255, 0.9);
}
.db-diagnostic-card .db-btn-text-link:hover {
  color: #fff;
}
.db-diagnostic-body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.db-diagnostic-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  flex: 1;
}
.db-diagnostic-card .db-btn-primary {
  background: #fff;
  color: #7c3aed;
  white-space: nowrap;
}
.db-diagnostic-card .db-btn-primary:hover {
  background: #f3e8ff;
  color: #7c3aed;
}

/* 诊断测试页面容器 */
.diag-page {
  min-height: 100vh;
  background: #fafafa;
  padding: 0;
  font-family: "Noto Sans SC", "Quicksand", system-ui, -apple-system, sans-serif;
}

/* 顶部栏 */
.diag-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  position: sticky;
  top: 0;
  z-index: 100;
}
.diag-topbar-back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.diag-topbar-back:hover {
  background: #f3f4f6;
}
.diag-topbar-progress-wrap {
  flex: 1;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.diag-topbar-progress-bar {
  height: 6px;
  background: #eef0f4;
  border-radius: 3px;
  overflow: hidden;
}
.diag-topbar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.diag-topbar-progress-text {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}
.diag-timer {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  padding: 6px 14px;
  border-radius: 20px;
  min-width: 70px;
  text-align: center;
  transition: all 0.3s;
}
.diag-timer.warning {
  background: #fef3c7;
  color: #d97706;
}
.diag-timer.danger {
  background: #fee2e2;
  color: #dc2626;
  animation: diag-pulse 1s ease-in-out infinite;
}
@keyframes diag-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 题目内容区 */
.diag-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* 题型通用 */
.diag-question {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.diag-q-prompt {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* 挑错定位题 */
.diag-q-sentence {
  font-size: 20px;
  font-weight: 500;
  color: #1f2937;
  text-align: center;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 24px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}
.diag-q-options {
  display: grid;
  gap: 10px;
}
.diag-q-option {
  text-align: left;
  padding: 14px 18px;
  border: 2px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: all 0.2s;
}
.diag-q-option:hover:not(.disabled) {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.diag-q-option.correct {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #166534;
}
.diag-q-option.wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}
.diag-q-option.disabled {
  cursor: default;
}

/* 语法填空题 */
.diag-fill-sentence {
  font-size: 20px;
  font-weight: 500;
  color: #1f2937;
  text-align: center;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 16px;
  line-height: 2;
  letter-spacing: 0.02em;
}
.diag-fill-word {
  margin: 0 4px;
}
.diag-fill-blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 3px solid #7c3aed;
  margin: 0 6px;
  color: #7c3aed;
  font-weight: 700;
  vertical-align: bottom;
}
.diag-fill-ipa {
  font-size: 14px;
  color: #7c3aed;
  text-align: center;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: #f5f3ff;
  border-radius: 8px;
  display: inline-block;
  width: 100%;
}
.diag-fill-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.diag-fill-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #eef0f4;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.diag-fill-input:focus {
  border-color: #7c3aed;
}
.diag-fill-submit {
  padding: 14px 24px;
  white-space: nowrap;
}

/* 语序排列题 */
.diag-order-selected {
  min-height: 60px;
  padding: 16px;
  background: #f5f3ff;
  border: 2px dashed #c4b5fd;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.diag-order-placeholder {
  width: 100%;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}
.diag-order-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}
.diag-order-word {
  padding: 8px 16px;
  border: 2px solid #eef0f4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: all 0.15s;
  user-select: none;
}
.diag-order-word:hover:not(.used):not(.disabled) {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #7c3aed;
}
.diag-order-word.selected {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
}
.diag-order-word.used {
  opacity: 0.3;
  cursor: default;
}
.diag-order-word.disabled {
  cursor: default;
}
.diag-order-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 微语境题 */
.diag-context-scene {
  font-size: 14px;
  color: #6b7280;
  background: #fef9c3;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.diag-context-options {
  display: grid;
  gap: 12px;
}
.diag-context-opt {
  display: flex;
  gap: 16px;
  padding: 18px;
  border: 2px solid #eef0f4;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.diag-context-opt:hover:not(.disabled) {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.diag-context-opt.correct {
  border-color: #22c55e;
  background: #f0fdf4;
}
.diag-context-opt.wrong {
  border-color: #ef4444;
  background: #fef2f2;
}
.diag-context-opt.disabled {
  cursor: default;
}
.diag-context-opt-label {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.diag-context-opt.correct .diag-context-opt-label {
  background: #22c55e;
}
.diag-context-opt.wrong .diag-context-opt-label {
  background: #ef4444;
}
.diag-context-opt-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
  flex: 1;
  padding-top: 4px;
}
.diag-context-opt.correct .diag-context-opt-text {
  color: #166534;
}
.diag-context-opt.wrong .diag-context-opt-text {
  color: #991b1b;
}

/* 解析区 */
.diag-q-explanation {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  background: #f9fafb;
  border-left: 4px solid #9ca3af;
}
.diag-q-explanation.correct {
  background: #f0fdf4;
  border-left-color: #22c55e;
}
.diag-q-explanation.wrong {
  background: #fef2f2;
  border-left-color: #ef4444;
}
.diag-q-exp-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}
.diag-q-explanation.correct .diag-q-exp-title {
  color: #166534;
}
.diag-q-explanation.wrong .diag-q-exp-title {
  color: #991b1b;
}
.diag-q-exp-answer {
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
  font-weight: 500;
}
.diag-q-exp-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* 底部操作 */
.diag-bottom {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  justify-content: flex-end;
}
.diag-skip-btn {
  color: #9ca3af;
}
.diag-next-btn {
  min-width: 160px;
}

/* 通用按钮 */
.diag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.diag-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.diag-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.diag-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.diag-btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.diag-btn-ghost:hover:not(:disabled) {
  background: #f3f4f6;
  color: #374151;
}
.diag-btn-large {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 12px;
}
.diag-btn-small {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

/* 诊断说明页 */
.diag-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: linear-gradient(135deg, #f5f3ff 0%, #eaf2ff 100%);
}
.diag-intro-hero {
  text-align: center;
  margin-bottom: 40px;
}
.diag-intro-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.diag-intro-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
}
.diag-intro-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}
.diag-intro-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 520px;
  width: 100%;
  margin-bottom: 40px;
}
.diag-intro-feat {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.diag-intro-feat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.diag-intro-feat-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}
.diag-intro-feat-desc {
  font-size: 12px;
  color: #9ca3af;
}
.diag-intro-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  align-items: center;
}
.diag-intro-actions .diag-btn {
  width: 100%;
}

/* 诊断报告页 */
.diag-report {
  min-height: 100vh;
  background: #fafafa;
  padding-bottom: 40px;
}
.diag-report-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
}
.diag-report-back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 8px;
}
.diag-report-back:hover {
  background: #f3f4f6;
}
.diag-report-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.diag-report-level-card {
  max-width: 680px;
  margin: 24px auto;
  padding: 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #7c3aed;
  text-align: center;
}
.diag-report-level-label {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 8px;
}
.diag-report-level-name {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 8px;
}
.diag-report-level-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}
.diag-report-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}
.diag-report-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}
.diag-report-stat-label {
  font-size: 12px;
  color: #9ca3af;
}

.diag-report-section {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.diag-report-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

/* 13课掌握情况格子图 */
.diag-report-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.diag-lesson-cell {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #eef0f4;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: inherit;
}
.diag-lesson-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.diag-lesson-cell.status-master {
  border-color: #22c55e;
  background: #f0fdf4;
}
.diag-lesson-cell.status-learn {
  border-color: #eab308;
  background: #fefce8;
}
.diag-lesson-cell.status-focus {
  border-color: #ef4444;
  background: #fef2f2;
}
.diag-lesson-cell.status-none {
  border-color: #e5e7eb;
  background: #f9fafb;
}
.diag-lesson-cell-num {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.diag-lesson-cell-name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.3;
}
.diag-lesson-cell-status {
  font-size: 11px;
  color: #6b7280;
}

/* 薄弱知识点列表 */
.diag-report-weak-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag-weak-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.diag-weak-rank {
  font-size: 12px;
  font-weight: 700;
  color: #ef4444;
  background: #fef2f2;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.diag-weak-info {
  flex: 1;
  min-width: 0;
}
.diag-weak-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.diag-weak-lesson {
  font-size: 12px;
  color: #9ca3af;
}

/* 学习路径建议 */
.diag-report-path-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.diag-path-summary {
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
  line-height: 1.6;
}
.master-text { color: #16a34a; font-weight: 600; }
.learn-text { color: #d97706; font-weight: 600; }
.focus-text { color: #dc2626; font-weight: 600; }
.diag-path-suggest {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* 报告底部操作 */
.diag-report-actions {
  max-width: 680px;
  margin: 32px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.diag-report-actions .diag-btn {
  width: 100%;
  max-width: 320px;
}

/* 响应式 */
@media (max-width: 640px) {
  .diag-content { padding: 20px 16px; }
  .diag-question { padding: 20px; border-radius: 12px; }
  .diag-q-sentence { font-size: 16px; padding: 16px; }
  .diag-fill-sentence { font-size: 16px; padding: 16px; }
  .diag-intro-title { font-size: 26px; }
  .diag-intro-features { grid-template-columns: 1fr; }
  .diag-report-level-card { padding: 24px; margin: 16px; }
  .diag-report-level-name { font-size: 32px; }
  .diag-report-lesson-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 保存进度提示卡片 */
.diag-intro-saved-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border-left: 4px solid #7c3aed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.diag-intro-saved-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.diag-intro-saved-content {
  flex: 1;
}
.diag-intro-saved-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}
.diag-intro-saved-desc {
  font-size: 13px;
  color: #6b7280;
}

.diag-btn-text-link {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}
.diag-btn-text-link:hover {
  color: #6b7280;
}


/* ========== 思维训练页面（严格按Demo规格） ========== */

.tt-app {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 顶部栏 */
.tt-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fafafa;
  padding: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tt-back-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.tt-back-btn:hover {
  background: #f0f0f5;
  color: #111827;
}

/* 五关进度条 */
.tt-gate-bar {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid #eef0f4;
}
.tt-gate-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #9ca3af;
  transition: all 0.25s;
}
.tt-gate-item.done {
  color: #c4b5fd;
}
.tt-gate-item.active {
  background: #7c3aed;
  color: #ffffff;
}
.tt-gate-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0eff4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  color: #9ca3af;
}
.tt-gate-item.done .tt-gate-num {
  background: #ede9fe;
  color: #a78bfa;
}
.tt-gate-item.active .tt-gate-num {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.tt-gate-text {
  min-width: 0;
}
.tt-gate-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.tt-gate-sub {
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右上角计时器 */
.tt-timer-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #eef0f4;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  justify-content: center;
}
.tt-timer-icon {
  font-size: 14px;
}

/* 主内容区 */
.tt-main {
  margin-top: 16px;
}

/* 关卡容器 */
.tt-gate {
  animation: ttFadeIn 0.25s ease;
}
@keyframes ttFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 题干卡片 */
.tt-prompt-card {
  background: #ffffff;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
}
.tt-prompt-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f4f1ff;
  color: #7c3aed;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.tt-prompt-text {
  font-size: 15px;
  line-height: 1.8;
  color: #111827;
  font-style: italic;
}

/* 步骤通用 */
.tt-step {
  background: #ffffff;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  animation: ttFadeIn 0.3s ease;
}
.tt-step-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #111827;
  line-height: 1.4;
}
.tt-step-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 18px;
  line-height: 1.6;
}

/* 选项卡通用 */
.tt-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.tt-option-card:hover {
  border-color: #7c3aed;
}
.tt-option-label {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f4f1ff;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.tt-option-content {
  flex: 1;
}
.tt-option-main {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}
.tt-option-sub {
  font-size: 12px;
  color: #6b7280;
  font-family: "SF Mono", Consolas, monospace;
}
.tt-option-card.correct {
  background: #f0fdf4;
  border-color: #16a34a;
}
.tt-option-card.correct .tt-option-label {
  background: #16a34a;
  color: #fff;
}
.tt-option-card.wrong {
  background: #fef2f2;
  border-color: #dc2626;
}
.tt-option-card.wrong .tt-option-label {
  background: #dc2626;
  color: #fff;
}

/* 弹跳动画 */
.bounce {
  animation: ttBounce 0.4s ease;
}
@keyframes ttBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* 抖动动画 */
.shake {
  animation: ttShake 0.4s ease;
}
@keyframes ttShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* 反馈条 */
.tt-feedback {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}
.tt-feedback-good {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.tt-feedback-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.tt-feedback-info {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ---- 第1关 题型选项 ---- */
.tt-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- 第1关 限定词 ---- */
.tt-kw-progress-wrap {
  margin-bottom: 16px;
}
.tt-kw-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 6px;
}
.tt-kw-progress-bar {
  height: 6px;
  background: #f0eff4;
  border-radius: 3px;
  overflow: hidden;
}
.tt-kw-progress-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.tt-clickable-prompt {
  font-size: 15px;
  line-height: 2;
  color: #111827;
  font-style: italic;
  user-select: none;
  padding: 14px 16px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #eef0f4;
}
.tt-kw-token {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
  background: rgba(124,58,237,0.08);
  font-weight: 500;
}
.tt-kw-token:hover {
  background: rgba(124,58,237,0.15);
}
.tt-kw-token.found {
  background: #dcfce7;
  color: #15803d;
  font-weight: 600;
}
.tt-kw-token.wrong {
  background: #fee2e2;
  color: #b91c1c;
}
.tt-text-token {
  cursor: pointer;
  padding: 2px 0;
  border-radius: 4px;
  transition: all 0.15s;
}
.tt-text-token.wrong {
  background: #fee2e2;
  color: #b91c1c;
}

/* ---- 第1关 拼复述 ---- */
.tt-picked-area {
  min-height: 64px;
  padding: 14px 16px;
  background: #fafafa;
  border: 1.5px dashed #e5e7eb;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tt-picked-placeholder {
  color: #9ca3af;
  font-size: 13px;
}
.tt-picked-chip {
  padding: 6px 14px;
  background: #7c3aed;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: ttBounce 0.2s ease;
}
.tt-card-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.tt-pool-card {
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.tt-pool-card:hover {
  border-color: #7c3aed;
  background: #faf8ff;
}
.tt-pool-card.wrong {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
}

/* 通用按钮 */
.tt-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tt-btn-primary {
  background: #7c3aed;
  color: #fff;
}
.tt-btn-primary:hover {
  background: #6d28d9;
}
.tt-btn-primary.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #7c3aed;
}
.tt-btn-ghost {
  background: #fff;
  color: #6b7280;
  border: 1px solid #eef0f4;
}
.tt-btn-ghost:hover {
  background: #f9fafb;
  color: #111827;
}
.tt-btn-success {
  background: #10b981;
  color: #fff;
  border: 1px solid #10b981;
}
.tt-btn-success:hover {
  background: #059669;
}
.tt-btn-warn {
  background: #f59e0b;
  color: #fff;
  border: 1px solid #f59e0b;
}
.tt-btn-warn:hover {
  background: #d97706;
}
.tt-btn-small {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.tt-btn-large {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.tt-action-center {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* ---- 第2关 立场 ---- */
.tt-point-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tt-point-card {
  padding: 16px 18px;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
  transition: all 0.2s;
}
.tt-point-card.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}
.tt-point-card.wrong {
  border-color: #dc2626;
  background: #fef2f2;
}
.tt-point-text {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  margin-bottom: 12px;
}
.tt-point-judge {
  display: flex;
  gap: 8px;
}
.tt-judge-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #eef0f4;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-judge-btn:hover {
  border-color: #d1d5db;
}
.tt-judge-btn.pro.active {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #15803d;
  font-weight: 600;
}
.tt-judge-btn.con.active {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
  font-weight: 600;
}
.tt-point-feedback {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fee2e2;
  border-radius: 8px;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.5;
}

/* 第2关 排序 */
.tt-rank-display {
  min-height: 60px;
  padding: 12px;
  background: #fafafa;
  border: 1.5px dashed #e5e7eb;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tt-rank-placeholder {
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  padding: 10px 0;
}
.tt-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #7c3aed;
  border-radius: 8px;
}
.tt-rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tt-rank-text {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  line-height: 1.5;
}
.tt-rank-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.tt-rank-card {
  position: relative;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #111827;
  line-height: 1.5;
  transition: all 0.2s;
}
.tt-rank-card:hover {
  border-color: #7c3aed;
  background: #faf8ff;
}
.tt-rank-card.ranked {
  border-color: #7c3aed;
  background: #faf8ff;
  padding-right: 46px;
}
.tt-rank-card .tt-rank-card-num {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- 第3关 垂直深潜 ---- */
.tt-dive-path {
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.tt-path-dim {
  color: #9ca3af;
  font-style: italic;
}
.tt-path-crumb {
  color: #7c3aed;
  font-weight: 500;
}
.tt-path-arrow {
  color: #d1d5db;
  margin: 0 2px;
}
.tt-path-current {
  color: #16a34a;
  font-weight: 600;
}

.tt-dive-layer {
  margin-bottom: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  transition: all 0.3s;
  animation: ttFadeIn 0.3s ease;
}
.tt-dive-layer.done {
  opacity: 0.55;
}
.tt-dive-layer.active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}
.tt-layer-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.tt-dive-layer.active .tt-layer-label {
  color: #7c3aed;
}
.tt-dive-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tt-dive-card {
  padding: 10px 16px;
  background: #fafafa;
  border: 1.5px solid #eef0f4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  transition: all 0.15s;
}
.tt-dive-card:hover {
  border-color: #7c3aed;
  background: #faf8ff;
}
.tt-dive-card.selected {
  border-color: #7c3aed;
  background: #f4f1ff;
  color: #7c3aed;
}

.tt-example-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tt-example-card {
  padding: 14px 16px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-example-card:hover {
  border-color: #f59e0b;
}
.tt-example-card.correct {
  background: #f0fdf4;
  border-color: #16a34a;
}
.tt-example-card.wrong {
  background: #fef2f2;
  border-color: #dc2626;
}
.tt-example-text {
  font-size: 13px;
  line-height: 1.6;
  color: #111827;
  font-style: italic;
}

/* ---- 第4关 具体化阶梯 ---- */
.tt-ladder {
  position: relative;
  padding-left: 24px;
  margin-bottom: 20px;
}
.tt-ladder::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #e5e7eb;
}
.tt-ladder-rung {
  position: relative;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.3s;
}
.tt-ladder-rung::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #fff;
}
.tt-ladder-rung.done::before {
  background: #16a34a;
}
.tt-ladder-rung.active::before {
  background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.tt-ladder-rung.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tt-ladder-rung.active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}
.tt-ladder-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.tt-ladder-tag.l1 { background: #ede9fe; color: #7c3aed; }
.tt-ladder-tag.l2 { background: #ddd6fe; color: #6d28d9; }
.tt-ladder-tag.l3 { background: #c4b5fd; color: #5b21b6; }
.tt-ladder-tag.l4 { background: #a78bfa; color: #4c1d95; }
.tt-ladder-rung.done .tt-ladder-tag {
  background: #16a34a;
  color: #fff;
}
.tt-ladder-content {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  line-height: 1.6;
}
.tt-ladder-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.tt-ladder-options-row {
  flex-direction: row;
  gap: 10px;
}
.tt-ladder-option {
  padding: 10px 14px;
  background: #fafafa;
  border: 1.5px solid #eef0f4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  transition: all 0.15s;
}
.tt-ladder-option:hover {
  border-color: #7c3aed;
  background: #faf8ff;
}
.tt-ladder-option.wrong {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
}
.tt-ladder-option-small {
  flex: 1;
  padding: 10px 12px;
  background: #fafafa;
  border: 1.5px solid #eef0f4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  transition: all 0.15s;
}
.tt-ladder-option-small:hover {
  border-color: #7c3aed;
}
.tt-ladder-option-small.selected {
  background: #f4f1ff;
  border-color: #7c3aed;
  color: #7c3aed;
  font-weight: 600;
}
.tt-ladder-input-wrap {
  margin-top: 8px;
}
.tt-ladder-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #eef0f4;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.tt-ladder-input:focus {
  outline: none;
  border-color: #7c3aed;
}
.tt-input-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 8px;
}
.tt-char-count {
  font-size: 12px;
  color: #9ca3af;
}
.tt-l3-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ---- 第5关 让步反杀 ---- */
.tt-con-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tt-con-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-con-card:hover {
  border-color: #dc2626;
  background: #fffafa;
}
.tt-con-card.correct {
  background: #f0fdf4;
  border-color: #16a34a;
}
.tt-con-card.wrong {
  background: #fef2f2;
  border-color: #dc2626;
}
.tt-con-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.tt-con-card.correct .tt-con-num {
  background: #bbf7d0;
  color: #16a34a;
}
.tt-con-text {
  font-size: 13px;
  line-height: 1.6;
  color: #111827;
}
.tt-con-highlight {
  display: inline-block;
  padding: 3px 8px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 6px;
  font-style: italic;
  font-size: 13px;
  margin-right: 6px;
  font-weight: 500;
}

.tt-rebuttal-wrap {
  margin-top: 12px;
}
.tt-rebuttal-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.tt-rebuttal-input:focus {
  outline: none;
  border-color: #7c3aed;
}

/* ---- 结算页 ---- */
.tt-result-gate {
  text-align: center;
  padding-top: 10px;
}
.tt-result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-result-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #111827;
}
.tt-result-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
}

/* 提纲卡片 */
.tt-outline-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}
.tt-outline-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.tt-outline-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.tt-outline-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: none;
}
.tt-outline-prompt {
  font-size: 13px;
  line-height: 1.7;
  color: #111827;
  font-style: italic;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
}
.tt-outline-meta {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.8;
  padding: 0 4px;
}
.tt-outline-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tt-outline-point {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}
.tt-outline-num {
  font-weight: 700;
  color: #7c3aed;
  flex-shrink: 0;
}
.tt-outline-ladder {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tt-ol-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  line-height: 1.5;
}
.tt-ol-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  padding-top: 1px;
}
.tt-outline-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  line-height: 1.6;
}
.tt-ol-crumb {
  color: #7c3aed;
  font-weight: 500;
}
.tt-ol-arrow {
  color: #d1d5db;
  font-size: 12px;
}
.tt-ol-example {
  font-style: italic;
  color: #16a34a;
  font-weight: 500;
}
.tt-ol-con {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tt-ol-con-line {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.tt-ol-con-line.anti {
  background: #fef2f2;
  border-color: #fecaca;
}
.tt-ol-con-line.ref {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tt-ol-con-side {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 12px;
  padding-top: 1px;
}
.tt-ol-con-line.anti .tt-ol-con-side { color: #dc2626; }
.tt-ol-con-line.ref .tt-ol-con-side { color: #16a34a; }

/* 教练总评 */
.tt-coach-comment {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: #f4f1ff;
  border-radius: 10px;
  margin-bottom: 24px;
  text-align: left;
}
.tt-coach-avatar {
  font-size: 32px;
  flex-shrink: 0;
}
.tt-coach-body { flex: 1; }
.tt-coach-title {
  font-size: 15px;
  font-weight: 700;
  color: #5b21b6;
  margin-bottom: 6px;
}
.tt-coach-text {
  font-size: 13px;
  line-height: 1.8;
  color: #4c1d95;
}

.tt-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* 响应式 */
@media (max-width: 640px) {
  .tt-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tt-gate-bar {
    order: 3;
    width: 100%;
    padding: 10px 12px;
  }
  .tt-gate-sub {
    display: none;
  }
  .tt-gate-title {
    font-size: 12px;
  }
  .tt-gate-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .tt-timer-bar {
    padding: 6px 12px;
    font-size: 13px;
  }
  .tt-prompt-card,
  .tt-step {
    padding: 16px;
  }
  .tt-prompt-text {
    font-size: 14px;
    line-height: 1.7;
  }
  .tt-step-title {
    font-size: 16px;
  }
  .tt-ladder-options-row {
    flex-direction: column;
  }
  .tt-outline-card {
    padding: 16px;
  }
}

/* ========== 方向切换Tab ========== */

.tt-dir-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 0 0;
  max-width: 720px;
  margin: 0 auto;
}
.tt-dir-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #6b7280;
  border: 2px solid #eef0f4;
  transition: all 0.2s;
}
.tt-dir-tab:hover {
  border-color: #d1d5db;
  color: #374151;
}
.tt-dir-tab.active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.tt-dir-icon {
  font-size: 18px;
}

/* 题目选择器 */
.tt-question-picker {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
.tt-qp-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tt-qp-domains {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f4;
}
.tt-qp-domain-btn {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tt-qp-domain-btn:hover {
  border-color: #a78bfa;
  color: #7c3aed;
}
.tt-qp-domain-btn.active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
  font-weight: 600;
}
.tt-qp-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid #eef0f4;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tt-qp-cat-btn:hover {
  border-color: #c4b5fd;
  color: #7c3aed;
}
.tt-qp-cat-btn.active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.tt-qp-cat-count {
  font-size: 11px;
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.tt-qp-cat-btn.active .tt-qp-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.tt-qp-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: ttQpSlideDown 0.25s ease;
}
@keyframes ttQpSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.tt-qp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid #eef0f4;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.tt-qp-item:hover {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.tt-qp-item.current {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}
.tt-qp-item-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tt-qp-item-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eef0f4;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-qp-item.current .tt-qp-item-num {
  background: #7c3aed;
  color: #fff;
}
.tt-qp-item-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 600;
}
.tt-qp-item.current .tt-qp-item-badge {
  background: #ede9fe;
  color: #7c3aed;
}
.tt-qp-item-body {
  flex: 1;
  min-width: 0;
}
.tt-qp-item-en {
  font-size: 12px;
  color: #374151;
  line-height: 1.5;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-qp-item-zh {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-qp-item-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ========== 口语思维训练 ========== */

.ist-app {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 顶部栏 */
.ist-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fafafa;
  padding: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ist-back-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.ist-back-btn:hover {
  background: #f0f0f5;
  color: #111827;
}

/* 步骤条 */
.ist-step-bar {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  gap: 2px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #eef0f4;
}
.ist-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: all 0.2s;
}
.ist-step-item.active {
  background: #f5f3ff;
}
.ist-step-item.done .ist-step-num {
  background: #0F6E56;
  color: #fff;
}
.ist-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef0f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}
.ist-step-item.active .ist-step-num {
  background: #534AB7;
  color: #fff;
}
.ist-step-text {
  min-width: 0;
  overflow: hidden;
}
.ist-step-title {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ist-step-item.active .ist-step-title {
  color: #534AB7;
}
.ist-step-sub {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 主内容区 */
.ist-main {
  padding: 20px 0 40px;
}
.ist-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 通用按钮 */
.ist-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.ist-btn-primary {
  background: #534AB7;
  color: #fff;
}
.ist-btn-primary:hover {
  background: #453DA0;
}
.ist-btn-primary.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #534AB7;
}
.ist-btn-ghost {
  background: #fff;
  color: #6b7280;
  border: 1px solid #e5e4df;
}
.ist-btn-ghost:hover {
  background: #f9fafb;
  color: #111827;
}
.ist-btn-small {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.ist-btn-large {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.ist-action-center {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

/* ========== 素材库阶段 ========== */

.ist-mb-header {
  text-align: center;
  padding: 20px 0 8px;
}
.ist-mb-badge {
  display: inline-block;
  background: #f5f3ff;
  color: #534AB7;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.ist-mb-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
}
.ist-mb-subtitle {
  font-size: 14px;
  color: #6b7280;
}
.ist-mb-desc {
  background: #fafaf7;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: #4b5563;
}
.ist-mb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ist-mb-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ist-mb-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #534AB7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-top: 8px;
}
.ist-mb-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ist-mb-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.ist-mb-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e4df;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}
.ist-mb-input:focus {
  outline: none;
  border-color: #534AB7;
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.1);
}
.ist-mb-counter {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
}
.ist-mb-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.ist-mb-footer-note {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

/* ========== Part Header ========== */

.ist-part-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0 0;
}
.ist-part-badge {
  display: inline-block;
  background: #534AB7;
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.ist-part-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111827;
  min-width: 0;
}
.ist-timer {
  font-size: 14px;
  font-weight: 700;
  color: #534AB7;
  background: #f5f3ff;
  padding: 4px 12px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.ist-timer.warning {
  color: #A32D2D;
  background: #fef2f2;
  animation: ist-pulse 1s infinite;
}
@keyframes ist-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 题目卡片 */
.ist-prompt-card {
  background: #fff;
  border-left: 3px solid #534AB7;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  background: #faf8ff;
}
.ist-prompt-en {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.6;
  margin-bottom: 8px;
}
.ist-prompt-zh {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}
.ist-material-hint {
  margin-top: 10px;
}
.ist-hit-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.ist-hit-chip.hit {
  background: #ecfdf5;
  color: #0F6E56;
}
.ist-hit-chip.miss {
  background: #f3f4f6;
  color: #6b7280;
}
.ist-autofill-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

/* ========== 选项区 ========== */

.ist-select-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ist-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.ist-cat-label {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.ist-cat-sub {
  font-size: 12px;
  color: #6b7280;
}
.ist-cat-progress {
  margin-left: auto;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
}
.ist-option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ist-option-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e5e4df;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.ist-option-card:hover {
  border-color: #534AB7;
  background: #faf8ff;
}
.ist-option-card.selected.lv3 {
  border-color: #0F6E56;
  background: #f0fdf4;
  color: #0F6E56;
}
.ist-option-card.selected.lv2 {
  border-color: #6b7280;
  background: #f9fafb;
  color: #374151;
}
.ist-option-card.selected.lv1 {
  border-color: #A32D2D;
  background: #fef2f2;
  color: #A32D2D;
}
.ist-option-card.wrong {
  animation: ist-shake 0.4s ease;
}
@keyframes ist-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.ist-option-idx {
  font-weight: 600;
  color: #9ca3af;
  flex-shrink: 0;
}
.ist-option-card.selected .ist-option-idx {
  color: inherit;
}
.ist-option-text {
  font-size: 14px;
  line-height: 1.5;
}
.ist-option-fb {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  margin-left: 24px;
}
.ist-option-fb.fb-good {
  background: #ecfdf5;
  color: #0F6E56;
}
.ist-option-fb.fb-normal {
  background: #f3f4f6;
  color: #4b5563;
}
.ist-option-fb.fb-bad {
  background: #fef2f2;
  color: #A32D2D;
}

/* ========== 录音作答区 ========== */

.ist-answer-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ist-record-section {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e4df;
}
.ist-record-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid #534AB7;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.ist-record-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(83, 74, 183, 0.2);
}
.ist-record-btn.recording {
  border-color: #A32D2D;
  animation: ist-record-pulse 1.5s infinite;
}
@keyframes ist-record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 45, 45, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(163, 45, 45, 0); }
}
.ist-record-icon {
  font-size: 28px;
  color: #534AB7;
}
.ist-record-btn.recording .ist-record-icon {
  color: #A32D2D;
  font-size: 20px;
}
.ist-record-tip {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.ist-record-hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
.ist-demo-link {
  display: inline-block;
  font-size: 12px;
  color: #534AB7;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 4px;
}
.ist-transcript-box {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  padding: 14px 16px;
}
.ist-transcript-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}
.ist-transcript-text {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  min-height: 40px;
}
.ist-transcript-count {
  text-align: right;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
  font-weight: 600;
}
.ist-transcript-final {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
}
.ist-audio-player {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.ist-audio-player audio {
  width: 100%;
  max-width: 400px;
}

/* ========== 结果区 ========== */

.ist-result-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ist-result-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e5e4df;
  text-align: center;
}
.ist-result-card.pass {
  border-color: #0F6E56;
  background: #f0fdf4;
}
.ist-result-card.fail {
  border-color: #A32D2D;
  background: #fef2f2;
}
.ist-result-status {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.ist-result-card.pass .ist-result-status { color: #0F6E56; }
.ist-result-card.fail .ist-result-status { color: #A32D2D; }

.ist-result-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ist-result-stat {
  text-align: center;
}
.ist-result-num {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}
.ist-result-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.ist-result-advice {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
}
.ist-advice-text.pass { color: #0F6E56; }
.ist-advice-text.fail { color: #A32D2D; }
.ist-advice-text strong { font-weight: 700; }

/* ========== Part 2 五类卡 ========== */

.ist-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ist-cat-card {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ist-cat-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ist-cat-name {
  font-size: 13px;
  font-weight: 700;
  color: #534AB7;
}
.ist-cat-desc {
  font-size: 11px;
  color: #9ca3af;
}
.ist-mini-card-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ist-mini-card {
  padding: 6px 8px;
  border: 1px solid #e5e4df;
  border-radius: 6px;
  font-size: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
  color: #4b5563;
}
.ist-mini-card:hover {
  border-color: #534AB7;
  background: #faf8ff;
}
.ist-mini-card.selected.lv3 {
  border-color: #0F6E56;
  background: #ecfdf5;
  color: #0F6E56;
  font-weight: 600;
}
.ist-mini-card.selected.lv2 {
  border-color: #6b7280;
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
}
.ist-mini-card.selected.lv1 {
  border-color: #A32D2D;
  background: #fef2f2;
  color: #A32D2D;
  font-weight: 600;
}
.ist-custom-card {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 8px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafafa;
}
.ist-custom-card.selected.lv3 {
  border-style: solid;
  border-color: #0F6E56;
  background: #ecfdf5;
}
.ist-custom-card.selected.lv2 {
  border-style: solid;
  border-color: #6b7280;
  background: #f3f4f6;
}
.ist-custom-card.selected.lv1,
.ist-custom-card.wrong {
  border-style: solid;
  border-color: #A32D2D;
  background: #fef2f2;
}
.ist-custom-card.wrong {
  animation: ist-shake 0.4s ease;
}
.ist-custom-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}
.ist-custom-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e5e4df;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}
.ist-custom-input:focus {
  outline: none;
  border-color: #534AB7;
}
.ist-material-suggest {
  font-size: 11px;
  color: #0F6E56;
  cursor: pointer;
  text-decoration: underline;
}
.ist-custom-fb {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1.4;
}
.ist-custom-fb.fb-good { background: #d1fae5; color: #0F6E56; }
.ist-custom-fb.fb-normal { background: #e5e7eb; color: #374151; }
.ist-custom-fb.fb-bad { background: #fee2e2; color: #A32D2D; }
.ist-custom-card .ist-btn {
  margin-top: 2px;
  font-size: 12px;
  padding: 5px 10px;
}

/* 骨架bar */
.ist-skeleton-bar {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  padding: 10px 14px;
}
.ist-skeleton-label {
  font-size: 12px;
  font-weight: 600;
  color: #534AB7;
  margin-bottom: 6px;
}
.ist-skeleton-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ist-skeleton-chip {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #e5e4df;
  color: #4b5563;
}
.ist-skeleton-chip.lv3 { border-color: #0F6E56; color: #0F6E56; }
.ist-skeleton-chip.lv2 { border-color: #6b7280; color: #374151; }
.ist-skeleton-chip.lv1 { border-color: #A32D2D; color: #A32D2D; }
.ist-skeleton-chip strong { font-weight: 700; }

/* ========== 总结算 ========== */

.ist-summary-header {
  text-align: center;
  padding: 24px 0 8px;
}
.ist-summary-badge {
  font-size: 48px;
  margin-bottom: 8px;
}
.ist-summary-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.ist-result-table {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  overflow: hidden;
}
.ist-table-row {
  display: grid;
  grid-template-columns: 70px 1fr 90px 80px;
  gap: 0;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
  padding: 12px 14px;
}
.ist-table-row:last-child { border-bottom: none; }
.ist-table-row.ist-table-head {
  background: #f9fafb;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: none;
}
.ist-table-col { font-size: 13px; }
.ist-table-col.col-name { font-weight: 700; color: #111827; }
.ist-table-col.col-result { color: #4b5563; }
.ist-table-col.col-type { color: #6b7280; font-size: 12px; }
.ist-table-col.col-status { text-align: right; }
.ist-table-sub {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.ist-status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.ist-status-tag.pass {
  background: #dcfce7;
  color: #0F6E56;
}
.ist-status-tag.fail {
  background: #fee2e2;
  color: #A32D2D;
}

.ist-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ist-stat-card {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}
.ist-stat-card.good {
  border-color: #0F6E56;
  background: #f0fdf4;
}
.ist-stat-card-num {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}
.ist-stat-card.good .ist-stat-card-num { color: #0F6E56; }
.ist-stat-card-label {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
  margin-top: 4px;
}
.ist-stat-card-sub {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}

.ist-coach-comment {
  display: flex;
  gap: 12px;
  background: #f5f3ff;
  border-radius: 12px;
  padding: 16px;
}
.ist-coach-avatar {
  font-size: 36px;
  flex-shrink: 0;
}
.ist-coach-body { flex: 1; }
.ist-coach-title {
  font-size: 15px;
  font-weight: 700;
  color: #534AB7;
  margin-bottom: 8px;
}
.ist-coach-text {
  font-size: 13px;
  line-height: 1.7;
  color: #4c1d95;
}
.ist-coach-text strong { font-weight: 700; }

.ist-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* 移动端 */
@media (max-width: 640px) {
  .ist-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .ist-step-bar {
    order: 3;
    width: 100%;
    padding: 8px 10px;
  }
  .ist-step-sub { display: none; }
  .ist-step-title { font-size: 11px; }
  .ist-step-num { width: 22px; height: 22px; font-size: 11px; }
  .ist-cat-grid { grid-template-columns: 1fr; }
  .ist-stat-cards { grid-template-columns: 1fr; }
  .ist-table-row { grid-template-columns: 55px 1fr 70px; }
  .ist-table-col.col-type { display: none; }
  .tt-dir-tabs { padding: 12px 16px 0; }
  .ist-app { padding: 0 16px 40px; }
}

/* ========== 口语话题选择页 ========== */
.ist-topic-select {
  padding-top: 0;
}

.ist-ts-header {
  position: relative;
  padding: 20px 0 8px;
  margin-bottom: 8px;
}

.ist-ts-header .ist-back-btn {
  position: absolute;
  top: 20px;
  left: 0;
}

.ist-ts-title-wrap {
  text-align: center;
  padding: 8px 40px 0;
}

.ist-ts-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(83, 74, 183, 0.1);
  color: #534AB7;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ist-ts-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.ist-ts-subtitle {
  font-size: 13px;
  color: var(--text-2);
}

.ist-ts-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 16px;
}

.ist-ts-type-btn {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s var(--ease-smooth);
  font-family: inherit;
}

.ist-ts-type-btn:hover {
  border-color: #534AB7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ist-ts-type-btn.active {
  border-color: #534AB7;
  background: linear-gradient(135deg, #534AB7 0%, #6B5FD1 100%);
  color: #fff;
}

.ist-ts-type-num {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ist-ts-type-btn.active .ist-ts-type-num {
  color: #fff;
}

.ist-ts-type-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ist-ts-type-sub {
  font-size: 12px;
  opacity: 0.7;
}

.ist-ts-demo-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFEDD5 100%);
  border: 1px solid #F5D6A0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.ist-ts-demo-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ist-ts-demo-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #FFB347;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.ist-ts-demo-body {
  flex: 1;
  min-width: 0;
}

.ist-ts-demo-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.ist-ts-demo-sub {
  font-size: 12px;
  color: var(--text-2);
}

.ist-ts-demo-arrow {
  flex-shrink: 0;
  color: #FFB347;
  font-weight: 700;
  font-size: 18px;
}

.ist-ts-search-wrap {
  margin-bottom: 14px;
}

.ist-ts-search {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  transition: border-color 0.2s;
}

.ist-ts-search:focus {
  outline: none;
  border-color: #534AB7;
}

.ist-ts-search::placeholder {
  color: var(--text-3);
}

.ist-ts-filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ist-ts-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ist-ts-filter-label {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  width: 40px;
}

.ist-ts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.ist-ts-chip {
  padding: 5px 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.ist-ts-chip:hover {
  border-color: #534AB7;
  color: #534AB7;
}

.ist-ts-chip.active {
  background: #534AB7;
  border-color: #534AB7;
  color: #fff;
}

.ist-ts-chip.ist-chip-must {
  border-color: #E74C3C;
  color: #E74C3C;
}

.ist-ts-chip.ist-chip-must.active {
  background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
  border-color: #E74C3C;
  color: #fff;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.ist-ts-result-count {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.ist-ts-result-count strong {
  color: #534AB7;
  font-weight: 700;
}

.ist-ts-topic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
}

.ist-ts-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 14px;
}

.ist-ts-topic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.ist-ts-topic-card:hover {
  border-color: #534AB7;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.ist-ts-topic-main {
  flex: 1;
  min-width: 0;
}

.ist-ts-topic-en {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ist-ts-topic-zh {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ist-ts-topic-cue {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

.ist-ts-topic-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ist-ts-topic-tag {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.ist-ts-topic-tag.ist-tag-must {
  background: #FDE8E8;
  color: #E74C3C;
}

.ist-ts-topic-tag.ist-tag-new {
  background: #E8F8F0;
  color: #27AE60;
}

.ist-ts-topic-tag.ist-tag-kept {
  background: #EEF2FF;
  color: #534AB7;
}

.ist-ts-topic-count {
  font-size: 12px;
  color: var(--text-2);
  padding: 3px 8px;
  background: var(--bg-2);
  border-radius: 10px;
}

.ist-ts-topic-type {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
}

.ist-ts-topic-type.has-p3 {
  background: #E8F0FE;
  color: #4A90D9;
}

.ist-ts-topic-type.only-p2 {
  background: #F5EFE4;
  color: #B8935A;
}

.ist-ts-topic-arrow {
  color: var(--text-3);
  font-size: 14px;
  margin-left: 4px;
}

/* 话题标签在顶部步骤条 */
.ist-topic-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #534AB7;
  background: rgba(83, 74, 183, 0.08);
  padding: 4px 12px;
  border-radius: 12px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .ist-ts-title { font-size: 20px; }
  .ist-ts-type-tabs { gap: 8px; }
  .ist-ts-type-btn { padding: 12px; }
  .ist-ts-type-num { font-size: 22px; }
  .ist-topic-label { max-width: 120px; font-size: 12px; }
}

/* ============================================================
   思维训练顶部导航
   ============================================================ */
.tt-top-nav {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid #eef0f4;
  margin-bottom: 16px;
}
.tt-top-nav-btn {
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.tt-top-nav-btn:hover {
  color: #7c3aed;
}
.tt-top-nav-btn.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
  font-weight: 600;
}
.tt-main-view {
  padding: 0 24px 24px;
}

/* ============================================================
   提纲库
   ============================================================ */
.ol-page {
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.ol-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ol-back-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.ol-back-btn:hover {
  background: #f3f4f6;
  color: #7c3aed;
}
.ol-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}
.ol-stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
}
.ol-stat {
  text-align: center;
  padding: 8px 16px;
  background: #f9fafb;
  border-radius: 10px;
  min-width: 80px;
}
.ol-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #7c3aed;
}
.ol-stat-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.ol-domain-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f4;
}
.ol-domain-chip {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ol-domain-chip:hover {
  border-color: #a78bfa;
  color: #7c3aed;
}
.ol-domain-chip.active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
  font-weight: 600;
}

.ol-loading {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
}

.ol-domain-group {
  margin-bottom: 28px;
}
.ol-domain-title {
  font-size: 14px;
  font-weight: 600;
  color: #7c3aed;
  margin: 0 0 12px 0;
  padding-left: 8px;
  border-left: 3px solid #7c3aed;
}
.ol-outline-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.ol-outline-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.ol-outline-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
  transform: translateY(-1px);
}
.ol-card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 8px;
}
.ol-card-topic {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 10px;
}
.ol-card-time {
  font-size: 11px;
  color: #9ca3af;
}
.ol-card-prompt {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ol-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #9ca3af;
}

.ol-empty {
  text-align: center;
  padding: 80px 20px;
}
.ol-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.ol-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.ol-empty-sub {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 24px;
}

.ol-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.ol-btn-primary {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.ol-btn-primary:hover {
  background: #6d28d9;
}
.ol-btn-ghost {
  background: transparent;
  color: #6b7280;
  border-color: #e5e7eb;
}
.ol-btn-ghost:hover {
  border-color: #d1d5db;
  color: #374151;
}
.ol-btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.ol-btn-danger:hover {
  background: #fee2e2;
}

.ol-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.ol-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
.ol-modal-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f4;
}
.ol-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.ol-modal-actions {
  display: flex;
  gap: 8px;
}
.ol-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.ol-edit-textarea {
  width: 100%;
  min-height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.ol-edit-textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.ol-detail-content {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}
.ol-detail-content h2 {
  font-size: 18px;
  margin: 16px 0 8px;
  color: #1f2937;
}
.ol-detail-content h3 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: #7c3aed;
}
.ol-detail-content li {
  margin-left: 20px;
  margin-bottom: 4px;
}
.ol-detail-content strong {
  color: #1f2937;
}
.ol-detail-content em {
  color: #9ca3af;
  font-size: 12px;
}
.ol-detail-content hr {
  border: none;
  border-top: 1px solid #eef0f4;
  margin: 16px 0;
}

/* ============================================================
   毕业地图
   ============================================================ */
.gm-page {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.gm-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.gm-back-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.gm-back-btn:hover {
  background: #f3f4f6;
  color: #7c3aed;
}
.gm-header-main {
  flex: 1;
}
.gm-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}
.gm-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}
.gm-lit-num {
  color: #7c3aed;
  font-size: 16px;
}
.gm-grad-num {
  color: #f59e0b;
  font-size: 16px;
}

.gm-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 20px;
}
.gm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.gm-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.gm-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.gm-overview-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.gm-ov-num {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.gm-ov-label {
  font-size: 12px;
  color: #9ca3af;
}
.gm-ov-grad .gm-ov-num { color: #f59e0b; }
.gm-ov-prof .gm-ov-num { color: #10b981; }
.gm-ov-prac .gm-ov-num { color: #3b82f6; }
.gm-ov-unt .gm-ov-num { color: #9ca3af; }

.gm-domains {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.gm-domain-section {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 16px 20px;
}
.gm-domain-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gm-domain-count {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  background: #f3f4f6;
  padding: 1px 8px;
  border-radius: 10px;
}
.gm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.gm-cell {
  padding: 12px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.gm-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.gm-cell-untouched {
  background: #f3f4f6 !important;
  color: #9ca3af;
}
.gm-cell-practiced {
  color: #1e40af;
}
.gm-cell-proficient {
  color: #065f46;
}
.gm-cell-graduated {
  color: #92400e;
}
.gm-cell-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.gm-cell-status {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 500;
}

.gm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.gm-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
.gm-modal-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f4;
}
.gm-modal-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}
.gm-modal-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.gm-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
}
.gm-close-btn:hover {
  color: #374151;
}
.gm-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.gm-modal-domain {
  display: inline-block;
  font-size: 12px;
  color: #7c3aed;
  background: #ede9fe;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.gm-modal-angle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.gm-modal-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.gm-stat-item {
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.gm-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}
.gm-stat-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.gm-modal-last {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.gm-q-section {
  margin-top: 20px;
}
.gm-q-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.gm-q-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gm-q-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #f9fafb;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.gm-q-item:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.gm-q-item-p1 {
  cursor: default;
  background: #f9fafb;
}
.gm-q-item-p1:hover {
  border-color: #eef0f4;
  background: #f9fafb;
}
.gm-q-type {
  font-size: 11px;
  font-weight: 600;
  color: #7c3aed;
  margin-bottom: 2px;
}
.gm-q-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}
.gm-q-empty {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 13px;
}

/* 响应式 */
@media (max-width: 640px) {
  .gm-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .gm-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
  .gm-cell-name {
    font-size: 11px;
  }
  .ol-stats {
    width: 100%;
    justify-content: space-around;
  }
}

/* ============================================================
   今日复习页面 (wr-*)
   ============================================================ */
.wr-page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 进度卡 */
.wr-progress-card {
  margin: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}
.wr-progress-text {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}
.wr-progress-num {
  font-size: 28px;
  font-weight: 800;
  color: #78350f;
}
.wr-progress-slash {
  color: #a16207;
  margin: 0 2px;
}
.wr-progress-total {
  font-size: 15px;
  font-weight: 500;
  color: #92400e;
}
.wr-progress-bar {
  height: 8px;
  background: rgba(180, 83, 9, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.wr-progress-sub {
  font-size: 12px;
  color: #a16207;
}

/* 话题列表 */
.wr-topic-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wr-topic-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.wr-topic-card:hover {
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
  transform: translateY(-1px);
}
.wr-topic-card.reviewed {
  opacity: 0.6;
  background: #f9fafb;
}
.wr-rank {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wr-rank-num {
  font-size: 16px;
  font-weight: 800;
  color: #d97706;
}
.wr-topic-body {
  flex: 1;
  min-width: 0;
}
.wr-topic-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wr-reviewed-badge {
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 10px;
}
.wr-topic-sub {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}
.wr-domain-mini {
  color: #374151;
  font-weight: 500;
}
.wr-signal-chips-sm {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wr-signal-chip-sm {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 8px;
}
.wr-priority-right {
  flex-shrink: 0;
  text-align: center;
}
.wr-priority-score {
  font-size: 22px;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
}
.wr-priority-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* 空状态 */
.wr-empty {
  padding: 80px 24px;
  text-align: center;
}
.wr-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.wr-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.wr-empty-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* 话题详情页 */
.wr-topic-header {
  margin: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}
.wr-topic-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.wr-topic-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.wr-domain-tag {
  font-size: 12px;
  font-weight: 500;
  color: #4f46e5;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 8px;
}
.wr-priority-badge {
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 8px;
}
.wr-reviewed-tag {
  font-size: 12px;
  font-weight: 500;
  color: #059669;
  background: #d1fae5;
  padding: 3px 10px;
  border-radius: 8px;
}
.wr-signal-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.wr-signal-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid;
}
.wr-last-practice {
  font-size: 12px;
  color: #6b7280;
}

/* 题目分区 */
.wr-section {
  margin: 16px;
}
.wr-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wr-section-icon {
  font-size: 16px;
}
.wr-question-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wr-question-card {
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.wr-question-card:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}
.wr-q-type {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}
.wr-q-prompt {
  font-size: 13px;
  color: #111827;
  line-height: 1.5;
  font-weight: 500;
}
.wr-q-zh {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}
.wr-q-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #d1d5db;
  font-size: 16px;
  font-weight: 600;
}
.wr-empty-small {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
}
.wr-bottom-space {
  height: 40px;
}

/* 首页今日复习小卡片 */
.tt-review-card {
  margin: 12px 16px 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s;
  border: 1px solid #fdba74;
}
.tt-review-card:hover {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
  transform: translateY(-1px);
}
.tt-review-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.tt-review-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.tt-review-title {
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 2px;
}
.tt-review-sub {
  font-size: 12px;
  color: #c2410c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.tt-review-arrow {
  color: #c2410c;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   毕业地图薄弱信号
   ============================================================ */
.gm-cell-weak {
  position: relative;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}
.gm-weak-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.gm-weak-section {
  margin-top: 16px;
  padding: 14px;
  background: #fef2f2;
  border-radius: 12px;
  border: 1px solid #fecaca;
}
.gm-weak-title {
  font-size: 14px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gm-weak-icon {
  font-size: 16px;
}
.gm-weak-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.gm-weak-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid;
}
.gm-weak-hint {
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.5;
}

/* 响应式 */
@media (max-width: 640px) {
  .wr-progress-card { margin: 12px; padding: 16px; }
  .wr-topic-list { padding: 0 12px; gap: 10px; }
  .wr-topic-card { padding: 14px; }
  .wr-topic-header { margin: 12px; padding: 16px; }
  .wr-section { margin: 12px; }
  .tt-review-card { margin: 10px 12px 2px; }
}

/* ============================================================
   口语录音库页面 (rl-*)
   ============================================================ */
.rl-page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 工具栏 */
.rl-toolbar {
  margin: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.rl-stat-pill {
  font-size: 14px;
  color: #374151;
  background: #f3f4f6;
  padding: 8px 16px;
  border-radius: 20px;
}
.rl-stat-pill strong {
  color: #111827;
  font-weight: 700;
  font-size: 16px;
}
.rl-tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rl-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.rl-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.rl-btn-primary {
  background: #534ab7;
  color: #ffffff;
}
.rl-btn-primary:hover:not(:disabled) {
  background: #4338a0;
}
.rl-btn-ghost {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.rl-btn-ghost:hover:not(:disabled) {
  border-color: #534ab7;
  color: #534ab7;
}
.rl-btn-large {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* 对比模式条 */
.rl-compare-bar {
  margin: 0 16px 12px;
  padding: 12px 16px;
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #4c1d95;
  font-weight: 500;
}
.rl-compare-side {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rl-side-btn {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #a78bfa;
  background: #ffffff;
  color: #6d28d9;
  cursor: pointer;
}
.rl-side-btn.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}
.rl-compare-play {
  margin-left: 8px;
  padding: 6px 14px;
  font-size: 12px;
}

/* 警告框 */
.rl-warn-box {
  margin: 16px;
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rl-warn-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.rl-warn-title {
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}
.rl-warn-desc {
  font-size: 12px;
  color: #b45309;
  line-height: 1.5;
}
.rl-warn-small {
  margin-top: 8px;
  font-size: 12px;
  color: #b45309;
}

/* 空状态 */
.rl-empty {
  padding: 80px 24px;
  text-align: center;
}
.rl-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.rl-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.rl-empty-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 20px;
}

.rl-loading {
  padding: 40px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}
.rl-loading-sm {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
}
.rl-empty-sm {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
}

/* 话题分区 */
.rl-topics {
  padding: 0 16px;
}
.rl-domain-section {
  margin-bottom: 20px;
}
.rl-domain-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
  padding: 0 4px;
}
.rl-topic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rl-topic-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.rl-topic-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: background 0.2s;
}
.rl-topic-head:hover {
  background: #f9fafb;
}
.rl-topic-info {
  flex: 1;
  min-width: 0;
}
.rl-topic-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}
.rl-topic-meta {
  font-size: 12px;
  color: #6b7280;
}
.rl-expand-arrow {
  font-size: 10px;
  color: #9ca3af;
  flex-shrink: 0;
  margin-left: 12px;
}

/* 录音列表 */
.rl-rec-list {
  border-top: 1px solid #f3f4f6;
  padding: 8px 0;
}
.rl-rec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: background 0.15s;
}
.rl-rec-item:hover {
  background: #f9fafb;
}
.rl-rec-item.selected {
  background: #ede9fe;
}
.rl-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #534ab7;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.rl-play-btn:hover {
  background: #4338a0;
}
.rl-play-btn.playing {
  background: #ef4444;
}
.rl-compare-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  color: #7c3aed;
  font-weight: 700;
}
.rl-rec-info {
  flex: 1;
  min-width: 0;
}
.rl-rec-time {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}
.rl-rec-duration {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.rl-rec-score {
  font-size: 12px;
  font-weight: 500;
  color: #f59e0b;
}
.rl-rec-quality {
  font-size: 12px;
  font-weight: 500;
  color: #10b981;
}
.rl-rec-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}
.rl-progress-bar {
  margin-top: 6px;
  height: 3px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  max-width: 200px;
}
.rl-progress-fill {
  height: 100%;
  background: #534ab7;
  border-radius: 2px;
  transition: width 0.1s linear;
}
.rl-rec-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.rl-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rl-action-btn:hover {
  background: #f3f4f6;
}
.rl-action-delete:hover {
  background: #fee2e2;
}

/* 弹窗 */
.rl-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rl-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow: auto;
}
.rl-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.rl-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.rl-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rl-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
}
.rl-modal-body {
  padding: 20px;
}
.rl-import-hint {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
  line-height: 1.5;
}
.rl-file-input {
  width: 100%;
  padding: 12px;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.rl-import-loading,
.rl-export-loading {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 14px;
}
.rl-export-info {
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 12px;
}
.rl-export-info strong {
  color: #111827;
  font-size: 18px;
}
.rl-export-done {
  margin-top: 12px;
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
}
.rl-import-result {
  font-size: 14px;
  color: #374151;
}
.rl-import-row {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.rl-import-row strong {
  color: #059669;
  font-size: 16px;
}
.rl-import-errors {
  margin-top: 12px;
  padding: 12px;
  background: #fef2f2;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 12px;
}
.rl-import-errors ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.rl-bottom-space {
  height: 40px;
}

/* ============================================================
   毕业地图录音角标
   ============================================================ */
.gm-rec-badge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.gm-rec-section {
  margin-top: 16px;
  padding: 14px;
  background: #eef2ff;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
}
.gm-rec-title {
  font-size: 14px;
  font-weight: 700;
  color: #3730a3;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gm-rec-icon {
  font-size: 16px;
}
.gm-rec-info {
  font-size: 12px;
  color: #4338ca;
  line-height: 1.5;
}

/* ============================================================
   Part2 录音保存提示
   ============================================================ */
.ist-rec-save-tip {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}
.ist-rec-save-tip.saving {
  background: #fef3c7;
  color: #92400e;
}
.ist-rec-save-tip.saved {
  background: #d1fae5;
  color: #065f46;
}
.ist-rec-save-tip.error {
  background: #fee2e2;
  color: #991b1b;
}

/* 响应式补充 */
@media (max-width: 640px) {
  .rl-toolbar { margin: 12px; }
  .rl-compare-bar { margin: 0 12px 12px; }
  .rl-topics { padding: 0 12px; }
  .rl-warn-box { margin: 12px; }
}

/* ============================================================
   学习资产卡片 (la-*)
   ============================================================ */
.la-card {
  margin: 12px 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.la-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.la-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.la-title {
  font-size: 15px;
  font-weight: 700;
  color: #4c1d95;
  display: flex;
  align-items: center;
  gap: 6px;
}
.la-icon {
  font-size: 16px;
}
.la-streak {
  font-size: 12px;
  color: #6d28d9;
  font-weight: 600;
}

/* 进度条 */
.la-week-progress {
  margin-bottom: 12px;
}
.la-week-label {
  font-size: 12px;
  color: #5b21b6;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.la-week-label strong {
  color: #4c1d95;
  font-size: 14px;
  font-weight: 700;
}
.la-week-remaining {
  font-size: 11px;
  color: #7c3aed;
  opacity: 0.7;
  margin-left: 4px;
}
.la-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.la-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.la-progress-fill.completed {
  background: linear-gradient(90deg, #10b981, #059669);
}

/* 7天格子 */
.la-week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.la-day-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: all 0.2s ease;
}
.la-day-cell.done {
  background: #7c3aed;
  color: #ffffff;
}
.la-day-cell.makeup {
  background: #f59e0b;
  color: #ffffff;
}
.la-day-cell.future {
  background: rgba(255, 255, 255, 0.3);
  opacity: 0.5;
}
.la-day-cell.today {
  border: 2px solid #7c3aed;
  box-sizing: border-box;
}
.la-day-cell.today.done {
  border-color: #ffffff;
}
.la-day-cell.can-makeup {
  cursor: pointer;
  border: 2px dashed #a78bfa;
  animation: la-pulse 2s ease-in-out infinite;
}
.la-day-cell.can-makeup:hover {
  background: rgba(139, 92, 246, 0.2);
}
@keyframes la-pulse {
  0%, 100% { border-color: #a78bfa; }
  50% { border-color: #7c3aed; }
}
.la-day-label {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  opacity: 0.8;
}
.la-day-dot {
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}
.la-day-today-marker {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* 补签提示 */
.la-makeup-msg {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 12px;
  color: #6d28d9;
  font-weight: 500;
  text-align: center;
  animation: la-fadein 0.3s ease;
}
@keyframes la-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 展开详情 */
.la-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  animation: la-expand 0.3s ease;
}
@keyframes la-expand {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}
.la-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.la-stat-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.la-stat-num {
  font-size: 14px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 2px;
}
.la-stat-label {
  font-size: 11px;
  color: #6d28d9;
  opacity: 0.8;
}
.la-makeup-row {
  margin-bottom: 12px;
  font-size: 12px;
  color: #5b21b6;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.la-makeup-info strong.ok {
  color: #059669;
  font-size: 13px;
}
.la-makeup-info strong.used {
  color: #6b7280;
  font-size: 13px;
}

/* 历史周 */
.la-history {
  margin-top: 8px;
}
.la-history-title {
  font-size: 12px;
  color: #5b21b6;
  font-weight: 600;
  margin-bottom: 10px;
}
.la-history-weeks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: end;
  height: 80px;
}
.la-history-week {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.la-hw-bar {
  width: 100%;
  height: 60%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.la-hw-fill {
  width: 100%;
  background: #8b5cf6;
  border-radius: 4px;
  transition: height 0.5s ease;
}
.la-history-week.completed .la-hw-fill {
  background: #10b981;
}
.la-hw-label {
  font-size: 10px;
  color: #6d28d9;
  font-weight: 500;
  white-space: nowrap;
}

.la-expand-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: #7c3aed;
  opacity: 0.7;
}

/* 毕业地图奖杯 */
.gm-trophy {
  display: inline-block;
  margin-left: 8px;
  font-size: 18px;
  animation: gm-trophy-bounce 1.5s ease-in-out infinite;
}
@keyframes gm-trophy-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ============================================================
   离开成本面板 / 学习资产仪表盘 (scp-*)
   ============================================================ */
.scp-panel {
  margin: 12px 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #fce7f3 100%);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.15);
}
.scp-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.scp-panel::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.scp-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.scp-title {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scp-title-icon {
  font-size: 18px;
}
.scp-companion {
  font-size: 12px;
  color: #b45309;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.scp-companion strong {
  color: #d97706;
  font-size: 14px;
  font-weight: 700;
}

/* 空状态 */
.scp-empty {
  text-align: center;
  padding: 20px 0 8px;
  position: relative;
  z-index: 1;
}
.scp-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.scp-empty-text {
  font-size: 13px;
  color: #92400e;
  opacity: 0.7;
}

/* 核心4格 */
.scp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}
.scp-stat-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.scp-stat-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
.scp-stat-card.scp-pop {
  animation: scp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scp-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); background: #fef08a; }
  100% { transform: scale(1); }
}
.scp-stat-icon {
  font-size: 18px;
  margin-bottom: 2px;
}
.scp-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #78350f;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  line-height: 1.2;
}
.scp-stat-label {
  font-size: 11px;
  color: #b45309;
  margin-top: 2px;
  opacity: 0.8;
}

/* 时长详情 */
.scp-time-detail {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 8px 0;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  animation: scp-fadein 0.25s ease;
}
@keyframes scp-fadein {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 100px; }
}
.scp-td-item {
  text-align: center;
  flex: 1;
}
.scp-td-val {
  font-size: 14px;
  font-weight: 700;
  color: #78350f;
  font-variant-numeric: tabular-nums;
}
.scp-td-lab {
  font-size: 10px;
  color: #b45309;
  opacity: 0.7;
  margin-top: 1px;
}
.scp-td-divider {
  width: 1px;
  height: 24px;
  background: rgba(180, 83, 9, 0.2);
}

/* 进阶资产 */
.scp-sub-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}
.scp-sub-item {
  font-size: 11px;
  color: #92400e;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0.9;
}
.scp-sub-item strong {
  color: #78350f;
  font-weight: 700;
  font-size: 12px;
}
.scp-sub-icon {
  font-size: 12px;
}

/* 操作按钮 */
.scp-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}
.scp-btn-export, .scp-btn-import {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217, 119, 6, 0.4);
  background: rgba(255, 255, 255, 0.5);
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.scp-btn-export:hover, .scp-btn-import:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #d97706;
}
.scp-btn-export:disabled, .scp-btn-import:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.scp-btn-import {
  border-style: dashed;
}

/* 进度浮层 */
.scp-progress-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: scp-fadein 0.2s ease;
}
.scp-progress-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.scp-progress-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
  text-align: center;
}
.scp-progress-stage {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
  text-align: center;
}
.scp-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.scp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.scp-progress-done {
  font-size: 12px;
  color: #059669;
  text-align: center;
  font-weight: 500;
  padding-top: 4px;
}

/* 对话框 */
.scp-dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  animation: scp-fadein 0.2s ease;
}
.scp-dialog-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  width: 300px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.scp-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}
.scp-dialog-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}
.scp-dialog-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scp-dialog-btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.scp-dialog-btn-primary {
  background: #f59e0b;
  color: #ffffff;
}
.scp-dialog-btn-primary:hover {
  background: #d97706;
}
.scp-dialog-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}
.scp-dialog-btn-secondary:hover {
  background: #e5e7eb;
}
.scp-dialog-btn-cancel {
  background: transparent;
  color: #9ca3af;
}
.scp-dialog-btn-cancel:hover {
  color: #6b7280;
}

/* 响应式 */
@media (max-width: 640px) {
  .la-card { margin: 10px 12px 0; padding: 14px; }
  .la-day-cell { border-radius: 8px; }
  .scp-panel { margin: 10px 12px 0; padding: 14px; }
  .scp-stat-num { font-size: 20px; }
  .scp-stats-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .scp-sub-row { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 思维训练优化新增样式 ===== */

/* 更多菜单下拉 */
.tt-top-nav-more {
  position: relative;
}
.tt-more-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 6px;
  min-width: 140px;
  z-index: 100;
}
.tt-more-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
}
.tt-more-item:hover {
  background: #f5f3ff;
  color: #7c3aed;
}

/* 继续训练卡片 */
.tt-continue-card {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.tt-continue-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.tt-continue-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}
.tt-continue-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  position: relative;
}
.tt-continue-meta {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 18px;
  position: relative;
}
.tt-continue-dot {
  margin: 0 8px;
  opacity: 0.6;
}
.tt-continue-actions {
  display: flex;
  gap: 10px;
  position: relative;
}
.tt-continue-btn-primary {
  flex: 1;
  padding: 12px 20px;
  background: #fff;
  color: #7c3aed;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tt-continue-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.tt-continue-btn-ghost {
  padding: 12px 18px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.tt-continue-btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

/* 今日推荐卡片 */
.tt-recommend-card {
  background: #fff;
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}
.tt-recommend-badge {
  display: inline-block;
  background: #f5f3ff;
  color: #7c3aed;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.tt-recommend-topic {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 4px;
}
.tt-recommend-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
  line-height: 1.4;
}
.tt-recommend-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.tt-recommend-dot { margin: 0 8px; color: #d1d5db; }
.tt-recommend-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tt-recommend-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 筛选展开 */
.tt-qp-filter-row {
  margin-bottom: 12px;
}
.tt-qp-filter-toggle {
  padding: 8px 14px;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.tt-qp-filter-toggle:hover {
  background: #ede9fe;
}

/* 弹层通用 */
.tt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.tt-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.tt-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}
.tt-modal-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.tt-modal-actions {
  display: flex;
  gap: 10px;
}
.tt-modal-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.tt-modal-btn:hover { opacity: 0.9; }
.tt-modal-ghost {
  background: #f3f4f6;
  color: #4b5563;
}
.tt-modal-primary {
  background: #8b5cf6;
  color: #fff;
}
.tt-modal-danger {
  background: #ef4444;
  color: #fff;
}

/* Onboarding 引导浮层 */
.tt-onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(4px);
}
.tt-onboarding-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  width: 360px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}
.tt-onboarding-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
}
.tt-onboarding-close:hover { color: #4b5563; }
.tt-onboarding-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.tt-onboarding-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
}
.tt-onboarding-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
  margin: 0 0 24px 0;
}
.tt-onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.tt-onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: all 0.3s;
}
.tt-onboarding-dot.active {
  width: 24px;
  border-radius: 4px;
  background: #8b5cf6;
}
.tt-onboarding-actions {
  display: flex;
  gap: 10px;
}
.tt-onboarding-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.tt-onboarding-btn:hover { opacity: 0.9; }
.tt-onboarding-skip {
  background: #f3f4f6;
  color: #6b7280;
  flex: 0.6;
}
.tt-onboarding-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  flex: 1.4;
}

/* 得分卡 */
.tt-score-card {
  background: linear-gradient(135deg, #faf9ff, #f5f3ff);
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}
.tt-score-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.tt-score-number {
  font-size: 56px;
  font-weight: 800;
  color: #7c3aed;
  line-height: 1;
}
.tt-score-total {
  font-size: 20px;
  font-weight: 500;
  color: #a78bfa;
}
.tt-score-level {
  padding: 8px 16px;
  border: 2px solid;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}
.tt-score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tt-score-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.tt-score-bar-label {
  width: 64px;
  color: #4b5563;
  flex-shrink: 0;
}
.tt-score-bar-wrap {
  flex: 1;
  height: 8px;
  background: #ede9fe;
  border-radius: 4px;
  overflow: hidden;
}
.tt-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
  border-radius: 4px;
  transition: width 1s ease-out;
}
.tt-score-bar-num {
  width: 24px;
  text-align: right;
  color: #7c3aed;
  font-weight: 600;
  flex-shrink: 0;
}

/* 亮点 & 待提升卡片 */
.tt-highlight-card,
.tt-improve-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid #f3f4f6;
}
.tt-highlight-card { border-left: 4px solid #10b981; }
.tt-improve-card { border-left: 4px solid #f59e0b; }
.tt-highlight-title,
.tt-improve-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}
.tt-highlight-list,
.tt-improve-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tt-highlight-item,
.tt-improve-item {
  font-size: 14px;
  color: #4b5563;
  padding: 4px 0;
  line-height: 1.6;
}
.tt-highlight-item::before {
  content: '✓ ';
  color: #10b981;
  font-weight: 700;
}
.tt-improve-item::before {
  content: '→ ';
  color: #f59e0b;
  font-weight: 700;
}

/* 分享按钮行 */
.tt-share-row {
  margin-bottom: 16px;
}
.tt-share-btn {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #7c3aed;
  border: 1.5px solid #8b5cf6;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-share-btn:hover {
  background: #f5f3ff;
}

/* 分享弹层 */
.tt-share-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 380px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}
.tt-share-canvas-wrap {
  margin: 16px 0;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-share-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ===== 错误页增强样式 ===== */
.eb-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
  text-align: left;
}
.eb-error-label {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 4px;
}
.eb-error-msg {
  font-size: 13px;
  color: #991b1b;
  line-height: 1.5;
  word-break: break-all;
}
.eb-tips {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  text-align: left;
}
.eb-tips-title {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 8px;
}
.eb-tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.eb-tips-list li {
  font-size: 13px;
  color: #15803d;
  padding: 3px 0;
  line-height: 1.6;
}
.eb-tips-list li::before {
  content: '✓ ';
  font-weight: 700;
}
.eb-secondary-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
}
.eb-link-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.eb-link-btn:hover {
  color: #7c3aed;
}

/* ===== 备份提醒条 ===== */
.tt-backup-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400e;
}
.tt-backup-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.tt-backup-text {
  flex: 1;
  line-height: 1.5;
}
.tt-backup-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.tt-backup-btn:hover {
  background: #d97706;
}
.tt-backup-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: #d97706;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

/* ===== 存储空间警告 ===== */
.tt-storage-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #991b1b;
}
.tt-storage-icon { font-size: 20px; flex-shrink: 0; }
.tt-storage-text { flex: 1; line-height: 1.5; }
.tt-storage-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: #dc2626;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

/* ===== 快捷键提示 ===== */
.tt-shortcut-hint {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #9ca3af;
  background: rgba(255,255,255,0.85);
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  border: 1px solid #f3f4f6;
  pointer-events: none;
  z-index: 50;
  letter-spacing: 0.5px;
}

/* ===== SunkCostPanel 周报按钮 ===== */
.scp-btn-report {
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.scp-btn-report:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}
.scp-actions {
  gap: 8px;
}

/* ============================================================
   SentencePortrait — 句子画像
   ============================================================ */

/* 首屏钩子 */
.sp-hero {
  background: linear-gradient(135deg, #ede9fe 0%, #fae8ff 50%, #fce7f3 100%);
  border-radius: 16px;
  padding: 32px 28px 28px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid #ddd6fe;
  position: relative;
  overflow: hidden;
}
.sp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.sp-hero-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
  position: relative;
}
.sp-hero-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.5;
  position: relative;
}
.sp-hero-demo {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
}
.sp-hero-demo-sentence {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  line-height: 1.8;
  min-height: 50px;
}
.sp-hero-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  animation: sp-hero-chip-in 0.5s ease-out forwards;
}
@keyframes sp-hero-chip-in {
  0% { opacity: 0; transform: translateY(8px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sp-hero-trunk { background: #f3f4f6; color: #4b5563; }
.sp-hero-attributive { background: #ede9fe; color: #6d28d9; }
.sp-hero-adverbial { background: #d1fae5; color: #047857; }
.sp-hero-specific { background: #fef3c7; color: #92400e; }
.sp-hero-demo-caption {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}
.sp-hero-cta {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transition: all 0.3s;
  animation: sp-hero-breathe 2s ease-in-out infinite;
  font-family: inherit;
  position: relative;
}
.sp-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}
@keyframes sp-hero-breathe {
  0%, 100% { box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6); }
}

/* 用户提示条（已造句时显示） */
.sp-user-strip {
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 13px;
  color: #6b7280;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sp-user-strip-text strong {
  color: #1f2937;
  font-weight: 600;
}
.sp-user-strip-title {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sp-user-strip-level {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* 演示模式提示 */
.sp-demo-tip {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 12px;
  color: #166534;
  text-align: center;
}

.sp-page {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: #1f2937;
}

/* 顶部栏 */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}
.sp-back-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sp-back-btn:hover {
  background: #f3f4f6;
  color: #374151;
}
.sp-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sp-sound-btn {
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sp-sound-btn:hover {
  background: #e5e7eb;
}
.sp-sound-btn.off {
  opacity: 0.5;
}

/* 主体布局 */
.sp-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

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

/* 场景卡 */
.sp-scene-card {
  background: linear-gradient(135deg, #ede9fe, #fae8ff);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid #ddd6fe;
}
.sp-scene-label {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.sp-scene-en {
  font-size: 18px;
  font-weight: 600;
  color: #4c1d95;
  margin-bottom: 4px;
  line-height: 1.4;
}
.sp-scene-zh {
  font-size: 13px;
  color: #6b21a8;
  opacity: 0.8;
}
.sp-scene-next {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sp-scene-next:hover {
  background: rgba(124, 58, 237, 0.1);
}

/* 输入区 */
.sp-input-area {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}
.sp-input-area.shake {
  animation: sp-shake 0.4s;
  border-color: #fca5a5;
}
@keyframes sp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.sp-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.sp-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.sp-input-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
  line-height: 1.5;
}
.sp-input-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.sp-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.sp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.sp-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}
.sp-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}
.sp-btn-secondary {
  background: #f3f4f6;
  color: #4b5563;
}
.sp-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

/* 画布 */
.sp-canvas {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}
.sp-canvas-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.sp-canvas-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #1f2937;
}
.sp-canvas-meta {
  font-size: 12px;
  color: #6b7280;
}
.sp-error-count {
  color: #ef4444;
  font-weight: 500;
}
.sp-no-error {
  color: #10b981;
  font-weight: 500;
}

/* 图例 */
.sp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
  padding-top: 4px;
}
.sp-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.sp-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chip 行 */
.sp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  line-height: 1.6;
  min-height: 40px;
}
.sp-chip {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
  white-space: nowrap;
}
.sp-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.sp-chip-trunk {
  background: #f3f4f6;
  color: #4b5563;
}
.sp-chip-attributive {
  background: #ede9fe;
  color: #6d28d9;
}
.sp-chip-adverbial {
  background: #d1fae5;
  color: #047857;
}
.sp-chip-noun_clause,
.sp-chip-noun_clause_object {
  background: #fce7f3;
  color: #be185d;
}
.sp-chip-specific {
  background: #fef3c7;
  color: #92400e;
}
.sp-chip-error {
  background: #fee2e2;
  color: #b91c1c;
  text-decoration: underline wavy #ef4444;
}
.sp-chip-passive {
  background: #fed7aa;
  color: #9a3412;
}
.sp-chip-ving {
  background: #ffedd5;
  color: #c2410c;
}
.sp-chip-ving,
.sp-chip-passive {
  text-decoration: none;
}

/* 结构行 */
.sp-structure-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 10px 12px;
  background: #f5f3ff;
  border-radius: 8px;
  margin-bottom: 14px;
}
.sp-structure-label {
  font-weight: 600;
  color: #6d28d9;
}
.sp-structure-names {
  color: #4c1d95;
  font-weight: 500;
}
.sp-connector-label {
  color: #7c3aed;
  font-size: 12px;
  opacity: 0.8;
}

/* 错误明细 */
.sp-errors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-error-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 3px solid #ef4444;
  font-size: 13px;
  line-height: 1.5;
}
.sp-error-badge {
  background: #ef4444;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.sp-error-text {
  color: #991b1b;
  font-weight: 500;
  margin-right: 4px;
}
.sp-error-msg {
  color: #7f1d1d;
  flex: 1;
}

/* 历史记录 */
.sp-history {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}
.sp-history-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1f2937;
}
.sp-history-empty {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 20px 0;
}
.sp-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.sp-history-item {
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 8px;
  border-left: 3px solid #8b5cf6;
  transition: background 0.2s;
}
.sp-history-item:hover {
  background: #f5f3ff;
}
.sp-history-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 4px;
  word-break: break-word;
}
.sp-history-meta {
  font-size: 11px;
  color: #9ca3af;
}
.sp-history-error {
  color: #ef4444;
}
.sp-history-ok {
  color: #10b981;
}

/* ===== 右栏：画像面板 ===== */
.sp-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-portrait-panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
  transition: all 0.3s;
}
.sp-portrait-panel.level-up-flash {
  animation: sp-levelup 2s ease-out;
}
@keyframes sp-levelup {
  0% { box-shadow: 0 0 0 rgba(139, 92, 246, 0); }
  30% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.5); transform: scale(1.02); }
  100% { box-shadow: 0 1px 3px rgba(0,0,0,0.05); transform: scale(1); }
}
.sp-portrait-panel.grow-flash {
  animation: sp-grow 1.5s ease-out;
}
@keyframes sp-grow {
  0% { border-color: #f3f4f6; }
  30% { border-color: #10b981; }
  100% { border-color: #f3f4f6; }
}

.sp-portrait-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.sp-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  position: relative;
}
.sp-avatar-char {
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.sp-avatar-pop {
  animation: sp-avatar-pop 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes sp-avatar-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-5deg); }
  50% { transform: scale(1.4) rotate(5deg); }
  70% { transform: scale(1.2) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
.sp-title-info {
  flex: 1;
}
.sp-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.sp-title-name {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.3;
}
.sp-title-glow {
  animation: sp-title-glow 1.5s ease-out;
}
@keyframes sp-title-glow {
  0% { color: #1f2937; transform: scale(1); }
  30% { color: #8b5cf6; transform: scale(1.1); text-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
  60% { color: #ec4899; }
  100% { color: #1f2937; transform: scale(1); text-shadow: none; }
}
.sp-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}
.sp-title-sub {
  font-size: 12px;
  color: #9ca3af;
}

/* 称号进度 */
.sp-title-progress {
  margin-bottom: 16px;
}
.sp-title-progress-labels {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 6px;
}
.sp-title-current-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.sp-title-next-label {
  font-size: 11px;
  color: #9ca3af;
}
.sp-title-progress-bar {
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}
.sp-title-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease-out;
}
.sp-title-max {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.sp-title-max-icon {
  font-size: 16px;
}

/* 维度 */
.sp-dimensions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-dim {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-dim-locked {
  opacity: 0.5;
}
.sp-dim-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.sp-dim-name {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.sp-dim-lock {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 4px;
}
.sp-dim-score {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.sp-progress-bar {
  position: relative;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: visible;
}
.sp-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out;
}
.sp-progress-structure { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.sp-progress-accuracy { background: linear-gradient(90deg, #10b981, #059669); }
.sp-progress-specificity { background: linear-gradient(90deg, #f59e0b, #d97706); }
.sp-progress-ttr { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.sp-progress-connectors { background: linear-gradient(90deg, #dc2626, #b91c1c); }
.sp-progress-length { background: linear-gradient(90deg, #6b7280, #4b5563); }

.sp-progress-goal {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 12px;
  background: #1f2937;
  border-radius: 1px;
  opacity: 0.3;
}
.sp-dim-locked .sp-progress-goal {
  display: none;
}

/* 提示 */
.sp-tips {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}
.sp-tips-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}
.sp-tips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #8b5cf6;
  font-size: 12px;
  line-height: 1.6;
  color: #4b5563;
  transition: background 0.2s;
}
.sp-tip-item:hover {
  background: #f3f4f6;
}
.sp-tip-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.sp-tip-text {
  flex: 1;
}
.sp-tip-structure { border-left-color: #8b5cf6; }
.sp-tip-specific { border-left-color: #f59e0b; }
.sp-tip-connector { border-left-color: #10b981; }
.sp-tip-accuracy { border-left-color: #ef4444; }
.sp-tips-empty {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 12px 0;
}

/* 生成分享卡按钮 */
.sp-share-btn {
  width: 100%;
  margin-top: 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sp-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}
.sp-share-btn-icon {
  font-size: 16px;
}

/* 分享卡弹窗 */
.sp-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: sp-modal-fade 0.2s ease-out;
  padding: 20px;
}
@keyframes sp-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sp-share-dialog {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sp-dialog-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sp-dialog-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.sp-share-dialog-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.sp-share-dialog-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}
.sp-share-dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.sp-share-dialog-close:hover {
  color: #4b5563;
}
.sp-share-dialog-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #f9fafb;
}
.sp-share-canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: block;
}
.sp-share-loading-overlay {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  bottom: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #6b7280;
  font-size: 14px;
  z-index: 2;
}
.sp-share-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: sp-spin 0.8s linear infinite;
}
@keyframes sp-spin {
  to { transform: rotate(360deg); }
}
.sp-share-dialog-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.sp-share-dialog-footer .sp-btn {
  flex: 1;
}

/* 升级提示 Toast */
.sp-levelup-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  padding: 12px 18px 12px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: sp-toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 14px;
}
@keyframes sp-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.sp-levelup-toast-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-levelup-toast-icon {
  font-size: 18px;
}
.sp-levelup-toast-text strong {
  font-weight: 700;
}
.sp-levelup-toast-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  margin-left: 6px;
}
.sp-levelup-toast-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
.sp-levelup-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  margin-left: 4px;
}
.sp-levelup-toast-close:hover {
  color: #fff;
}

/* ============ 句式收集册 ============ */
.sp-collection {
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sp-collection-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.sp-collection-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.sp-collection-count {
  font-size: 12px;
  font-weight: 500;
  color: #8b5cf6;
  background: #f5f3ff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
.sp-collection-toggle {
  font-size: 10px;
  color: #9ca3af;
  transition: transform 0.2s;
}
.sp-collection-toggle.open {
  transform: rotate(180deg);
}
.sp-collection-all {
  margin: 8px 0 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  text-align: center;
  font-weight: 500;
  animation: sp-collection-all-in 0.5s ease-out;
}
@keyframes sp-collection-all-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.sp-collection-all strong {
  color: #b45309;
  font-weight: 700;
  margin: 0 2px;
}
.sp-collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.sp-col-card {
  border-radius: 8px;
  padding: 10px 6px 8px;
  text-align: center;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  position: relative;
}
.sp-col-card.locked {
  opacity: 0.55;
}
.sp-col-card.locked:hover {
  opacity: 0.75;
}
.sp-col-card.unlocked {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sp-col-card-icon {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.sp-col-card.unlocked .sp-col-card-icon {
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.sp-col-card-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.sp-col-card-status {
  font-size: 10px;
  margin-top: 2px;
  opacity: 0.8;
}
.sp-col-card-new {
  animation: sp-card-unlock 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sp-card-unlock {
  0% { transform: scale(0.5) rotateY(90deg); opacity: 0; }
  50% { transform: scale(1.15) rotateY(0deg); }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

/* ============ 常见错误 Top3 ============ */
.sp-top-errors {
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sp-top-errors-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
}
.sp-top-errors-empty {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  padding: 8px 0;
}
.sp-top-errors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-top-error-item {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f9fafb;
  border-left: 3px solid #ef4444;
  transition: background 0.2s;
}
.sp-top-error-item:hover {
  background: #f3f4f6;
}
.sp-top-error-item.expanded {
  background: #fef2f2;
}
.sp-top-error-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 5px;
}
.sp-top-error-rank {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sp-top-error-name {
  flex: 1;
  color: #1f2937;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-top-error-count {
  color: #6b7280;
  font-size: 11px;
  flex-shrink: 0;
  font-weight: 500;
}
.sp-top-error-bar {
  height: 3px;
  background: #f3f4f6;
  border-radius: 2px;
  overflow: hidden;
}
.sp-top-error-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  border-radius: 2px;
  transition: width 0.5s ease-out;
}
.sp-top-error-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #fecaca;
  animation: sp-error-detail-in 0.3s ease-out;
}
@keyframes sp-error-detail-in {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 100px; }
}
.sp-top-error-detail-text {
  font-size: 12px;
  color: #991b1b;
  line-height: 1.5;
  margin-bottom: 4px;
}
.sp-top-error-detail-meta {
  font-size: 11px;
  color: #9ca3af;
}

/* ============ 错误卡片式 ============ */
.sp-errors-cards {
  margin-top: 12px;
  padding: 12px;
  background: #fef2f2;
  border-radius: 10px;
  border: 1px solid #fecaca;
}
.sp-errors-title {
  font-size: 13px;
  font-weight: 600;
  color: #991b1b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sp-errors-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-error-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #ef4444;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sp-error-card-head {
  margin-bottom: 4px;
}
.sp-error-card-snippet {
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.sp-error-card-body {
  font-size: 12px;
  line-height: 1.5;
}
.sp-error-card-msg {
  color: #1f2937;
  margin-bottom: 4px;
}
.sp-error-card-tip {
  color: #059669;
  font-weight: 500;
}
.sp-no-error-card {
  margin-top: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-radius: 10px;
  color: #065f46;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #6ee7b7;
}
.sp-no-error-icon {
  font-size: 18px;
}

/* ============ 句子进化 ============ */
.sp-evolve-section {
  margin-top: 12px;
}
.sp-evolve-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.sp-evolve-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.sp-evolve-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.sp-evolve-compare {
  background: #fff;
  border-radius: 12px;
  border: 2px solid #fbbf24;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
  animation: sp-evolve-in 0.4s ease-out;
}
@keyframes sp-evolve-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-evolve-col {
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}
.sp-evolve-col.sp-evolve-new {
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  border: 1px dashed #f59e0b;
}
.sp-evolve-col.sp-evolve-loading {
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  gap: 10px;
  color: #9ca3af;
  font-size: 13px;
}
.sp-evolve-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-evolve-badges {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.sp-evolve-badge {
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  animation: sp-badge-pop 0.5s ease-out;
}
@keyframes sp-badge-pop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.sp-evolve-sentence {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.8;
}
.sp-chip-new {
  animation: sp-chip-highlight 1s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}
@keyframes sp-chip-highlight {
  0%, 100% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.7); }
}
.sp-evolve-arrow {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
  margin: 4px 0;
  animation: sp-arrow-bounce 1.2s ease-in-out infinite;
}
@keyframes sp-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
.sp-evolve-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: sp-spin 0.8s linear infinite;
}
.sp-evolve-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.sp-evolve-actions .sp-btn {
  flex: 1;
}
.sp-btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}
.sp-evolve-success {
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1px solid #34d399;
  border-radius: 10px;
  color: #065f46;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  animation: sp-success-in 0.4s ease-out;
}
@keyframes sp-success-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.sp-evolve-success-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #10b981;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

/* ============ P2 布局调整 ============ */
.sp-layout {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }
}
.sp-right {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 4px;
}
.sp-right::-webkit-scrollbar {
  width: 4px;
}
.sp-right::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 2px;
}

/* 画布 chip 最大高度，超出滚动 */
.sp-canvas-chips {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px 2px;
}
.sp-canvas-chips::-webkit-scrollbar {
  width: 4px;
}
.sp-canvas-chips::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 2px;
}

/* 画布与历史之间分隔线 */
.sp-history {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}
.sp-history-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
}
.sp-history-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.sp-history-toggle {
  font-size: 10px;
  color: #9ca3af;
  transition: transform 0.2s;
}
.sp-history-toggle.open {
  transform: rotate(180deg);
}
.sp-history-list {
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
}

/* 所有卡片统一圆角和阴影 */
.sp-portrait-panel,
.sp-collection,
.sp-top-errors,
.sp-daily-challenge,
.sp-achievements,
.sp-tips,
.sp-share-dialog {
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03) !important;
}

/* 进度条统一 */
.sp-progress-bar,
.sp-dc-task-bar,
.sp-top-error-bar {
  height: 8px !important;
  border-radius: 4px !important;
}
.sp-progress-fill,
.sp-dc-task-bar-fill,
.sp-top-error-bar-fill {
  border-radius: 4px !important;
}

/* ============ 积分 ============ */
.sp-score-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}
.sp-score-icon {
  font-size: 14px;
}
.sp-score-text {
  font-weight: 600;
  color: #f59e0b;
}

/* ============ 每日挑战 ============ */
.sp-daily-challenge {
  margin-top: 16px;
}
.sp-dc-card {
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  transition: all 0.3s;
}
.sp-dc-card.all-done {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #34d399;
}
.sp-dc-card.sp-dc-flash {
  animation: sp-dc-flash 1s ease-in-out;
}
@keyframes sp-dc-flash {
  0%, 100% { transform: scale(1); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
  50% { transform: scale(1.02); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
}
.sp-dc-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.sp-dc-title {
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}
.sp-dc-reward {
  font-size: 11px;
  font-weight: 600;
  color: #d97706;
  background: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: 10px;
}
.sp-dc-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-dc-task {
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 8px 10px;
  transition: all 0.2s;
}
.sp-dc-task.done {
  background: rgba(16, 185, 129, 0.15);
}
.sp-dc-task-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 5px;
  font-size: 12px;
}
.sp-dc-task-name {
  font-weight: 500;
  color: #78350f;
}
.sp-dc-task.done .sp-dc-task-name {
  color: #065f46;
  text-decoration: line-through;
}
.sp-dc-task-count {
  font-weight: 600;
  color: #d97706;
  font-size: 11px;
  flex-shrink: 0;
  margin-left: 8px;
}
.sp-dc-task-bar {
  height: 6px !important;
  background: rgba(255,255,255,0.8);
  border-radius: 3px !important;
  overflow: hidden;
}
.sp-dc-task-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 3px !important;
  transition: width 0.5s ease-out;
}
.sp-dc-task.done .sp-dc-task-bar-fill {
  background: linear-gradient(90deg, #10b981, #059669);
}
.sp-dc-all-done {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 13px;
  color: #065f46;
  font-weight: 500;
  justify-content: center;
}
.sp-dc-done-icon {
  font-size: 20px;
}

/* ============ 成就 ============ */
.sp-achievements {
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sp-ach-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
}
.sp-ach-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.sp-ach-count {
  font-size: 12px;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
.sp-ach-toggle {
  font-size: 10px;
  color: #9ca3af;
  transition: transform 0.2s;
}
.sp-ach-toggle.open {
  transform: rotate(180deg);
}
.sp-ach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.sp-ach-item {
  border-radius: 8px;
  padding: 8px 4px 6px;
  text-align: center;
  transition: all 0.3s;
  cursor: default;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
}
.sp-ach-item.locked {
  opacity: 0.4;
  filter: grayscale(0.7);
}
.sp-ach-item.unlocked {
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  border-color: #fcd34d;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}
.sp-ach-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}
.sp-ach-name {
  font-size: 10px;
  color: #374151;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 成就弹窗 */
.sp-ach-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: sp-modal-fade-in 0.3s ease-out;
}
@keyframes sp-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sp-ach-modal-inner {
  background: #fff;
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  min-width: 260px;
  animation: sp-ach-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sp-ach-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.sp-ach-modal-icon {
  font-size: 60px;
  margin-bottom: 10px;
  animation: sp-ach-icon-bounce 1s ease-in-out infinite;
}
@keyframes sp-ach-icon-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(10deg); }
}
.sp-ach-modal-title {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 6px;
}
.sp-ach-modal-name {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}
.sp-ach-modal-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.sp-ach-modal-reward {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  color: #b45309;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.sp-ach-modal-close {
  width: 100%;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sp-ach-modal-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ============ 6维度空状态 ============ */
.sp-dim-empty {
  text-align: center;
  padding: 24px 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-top: 16px;
  border: 1px dashed #e5e7eb;
}
.sp-dim-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
  animation: sp-float 3s ease-in-out infinite;
}
@keyframes sp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.sp-dim-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}
.sp-dim-empty-sub {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}
.sp-dim-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sp-dim-skeleton-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-dim-skeleton-name {
  width: 40%;
  height: 10px;
  background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: sp-skeleton-pulse 1.5s ease-in-out infinite;
}
.sp-dim-skeleton-bar {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: sp-skeleton-pulse 1.5s ease-in-out infinite 0.2s;
}
@keyframes sp-skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 常见错误空状态绿色 */
.sp-top-errors-ok {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-top-errors-ok-icon {
  font-size: 16px;
}

/* 句子进化区背景独立 */
.sp-evolve-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

/* 统一卡片标题 */
.sp-collection-header,
.sp-ach-header,
.sp-top-errors-title,
.sp-tips-title {
  font-size: 14px;
  font-weight: 600;
}

/* 分享卡按钮更醒目 */
.sp-share-btn {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 4px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.2s;
}
.sp-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}
.sp-share-btn:active {
  transform: translateY(0);
}
.sp-share-btn-icon {
  font-size: 16px;
}

/* 右栏滚动提示 */
.sp-right-scroll-hint {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 6px;
  margin-top: -40px;
  font-size: 11px;
  color: #9ca3af;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 40%);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
  font-weight: 500;
}
.sp-right-scroll-hint.visible {
  opacity: 1;
  transform: translateY(0);
}
.sp-right-scroll-icon {
  animation: sp-scroll-bounce 1.5s ease-in-out infinite;
  font-weight: bold;
}
@keyframes sp-scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==============================================
   Daily Tasks Page — 每日任务页面
   ============================================== */


.daily-tasks-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dt-back-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  font-family: inherit;
}
.dt-back-btn:hover { color: #8338EC; }

/* ---- 目标卡片 ---- */
.dt-goal-card {
  background: linear-gradient(135deg, #8338EC 0%, #6366F1 50%, #A855F7 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.25);
  position: relative;
  overflow: hidden;
}
.dt-goal-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.dt-goal-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.dt-goal-left { position: relative; z-index: 1; }
.dt-goal-badge {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.dt-goal-main {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.dt-goal-sub {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 6px;
}
.dt-goal-edit-btn {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.dt-goal-edit-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* ---- Section ---- */
.dt-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef0f4;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.dt-section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.dt-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.005em;
}
.dt-section-progress-text {
  font-size: 13px;
  font-weight: 500;
  color: #8338EC;
  margin-left: 4px;
}

/* ---- 进度条 ---- */
.dt-progress-bar {
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}
.dt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8338EC, #A855F7);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- 任务列表 ---- */
.dt-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dt-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #eef0f4;
  background: #fafbfc;
  transition: all 0.2s ease;
}
.dt-task-item:hover {
  border-color: #ddd6fe;
  background: #faf5ff;
}
.dt-task-item.completed {
  opacity: 0.6;
  background: #f9fafb;
}
.dt-task-item.completed .dt-task-title {
  text-decoration: line-through;
  color: #9ca3af;
}
.dt-task-item.completed .dt-task-subtitle {
  color: #d1d5db;
}

.dt-task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 12px;
  color: transparent;
}
.dt-task-checkbox:hover {
  border-color: #8338EC;
}
.dt-task-checkbox.checked {
  background: #8338EC;
  border-color: #8338EC;
  color: #fff;
  animation: dt-check-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dt-check-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.dt-task-content {
  flex: 1;
  min-width: 0;
}
.dt-task-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  word-break: break-word;
}
.dt-task-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.4;
}

.dt-task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dt-task-actions.visible {
  opacity: 1;
}
.dt-task-type-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.dt-task-type-tag.system {
  background: #ede9fe;
  color: #7c3aed;
}
.dt-task-type-tag.custom {
  background: #f3f4f6;
  color: #6b7280;
}
.dt-task-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.6;
  transition: all 0.15s ease;
}
.dt-task-action-btn:hover {
  opacity: 1;
  background: rgba(0,0,0,0.05);
}
.dt-task-action-btn.delete:hover {
  background: #fef2f2;
}

/* ---- 底部操作区 ---- */
.dt-task-actions-bottom {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.dt-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dt-btn:active { transform: scale(0.98); }
.dt-btn-primary {
  background: linear-gradient(135deg, #8338EC, #6366F1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.25);
}
.dt-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(131, 56, 236, 0.35);
}
.dt-btn-secondary {
  background: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.dt-btn-secondary:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.dt-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.dt-task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- 空状态 ---- */
.dt-empty {
  text-align: center;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dt-empty-icon { font-size: 36px; }
.dt-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.dt-empty-desc {
  font-size: 12px;
  color: #9ca3af;
  max-width: 280px;
}

/* ---- 本周概览 ---- */
.dt-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.dt-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.dt-week-day.today {
  border-color: #8338EC;
  background: #faf5ff;
}
.dt-week-day.all-done {
  background: #ecfdf5;
}
.dt-week-day.all-done.today {
  border-color: #10b981;
  background: #d1fae5;
}
.dt-week-day.future {
  opacity: 0.4;
}
.dt-week-day-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}
.dt-week-day-num {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}
.dt-week-day-progress {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
}
.dt-week-day.all-done .dt-week-day-progress {
  color: #10b981;
}
.dt-week-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  padding-top: 4px;
}
.dt-week-stats-dot { color: #d1d5db; }

/* ---- 同步分享 ---- */
.dt-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.dt-share-card {
  background: #fafbfc;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  text-align: center;
}
.dt-share-card:hover {
  border-color: #c4b5fd;
  background: #faf5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.1);
}
.dt-share-icon { font-size: 24px; }
.dt-share-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.dt-share-desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}
.dt-feishu-send-btn {
  width: 100%;
}

/* ---- Profile Modal ---- */
.dtp-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: dt-fade-in 0.2s ease;
}
@keyframes dt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dtp-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dt-modal-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dt-modal-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.dtp-modal-small {
  max-width: 400px;
}
.dt-modal-feishu {
  max-width: 500px;
}

.dtp-modal-header {
  padding: 20px 24px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}
.dtp-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.01em;
}
.dtp-modal-sub {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}
.dtp-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.dtp-modal-close:hover { color: #374151; }

.dtp-progress-bar {
  height: 3px;
  background: #f3f4f6;
  margin: 0 24px;
  border-radius: 2px;
  overflow: hidden;
}
.dtp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8338EC, #A855F7);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.dtp-modal-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.dtp-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dtp-step-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}
.dtp-step-desc {
  font-size: 13px;
  color: #6b7280;
  margin-top: -8px;
}

.dtp-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-top: 4px;
}

.dtp-option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.dtp-option-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dtp-option-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  position: relative;
}
.dtp-option-card:hover {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.dtp-option-card.active {
  border-color: #8338EC;
  background: #faf5ff;
}
.dtp-option-label {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.dtp-option-card.active .dtp-option-label {
  color: #7c3aed;
}
.dtp-option-sub {
  font-size: 11px;
  color: #9ca3af;
}
.dtp-option-check {
  position: absolute;
  top: 6px;
  right: 8px;
  color: #8338EC;
  font-size: 12px;
  font-weight: 700;
}

.dtp-hint {
  font-size: 12px;
  color: #8338EC;
  background: #faf5ff;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.5;
}

.dtp-modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #f3f4f6;
}
.dtp-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.dtp-btn-primary {
  background: linear-gradient(135deg, #8338EC, #6366F1);
  color: #fff;
}
.dtp-btn-primary:hover { opacity: 0.9; }
.dtp-btn-primary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dtp-btn-ghost {
  background: #f3f4f6;
  color: #374151;
}
.dtp-btn-ghost:hover { background: #e5e7eb; }

/* ---- 表单输入 ---- */
.dt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.dt-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.dt-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.dt-input:focus {
  outline: none;
  border-color: #8338EC;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}

/* ---- 飞书设置 ---- */
.dt-feishu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dt-feishu-method-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #8338EC;
  background: #ede9fe;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
}
.dt-feishu-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}
.dt-feishu-btn {
  align-self: flex-start;
}
.dt-feishu-btn-row {
  display: flex;
  gap: 10px;
}
.dt-feishu-result {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
}
.dt-feishu-result.ok {
  background: #ecfdf5;
  color: #059669;
}
.dt-feishu-result.error {
  background: #fef2f2;
  color: #dc2626;
}
.dt-feishu-security {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
}
.dt-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 16px 0;
}

/* ---- Toast ---- */
.dt-toast {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  animation: dt-toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.dt-toast.success {
  background: #1f2937;
  color: #fff;
}
.dt-toast.error {
  background: #dc2626;
  color: #fff;
}
@keyframes dt-toast-in {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
  .daily-tasks-page {
    padding: 16px 14px 40px;
  }
  .dt-goal-card {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .dt-goal-main { font-size: 18px; }
  .dt-goal-edit-btn { align-self: flex-end; }
  .dtp-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dt-share-grid {
    grid-template-columns: 1fr;
  }
  .dt-week-day {
    padding: 8px 2px;
  }
  .dt-week-day-progress { font-size: 9px; }
  .dt-task-actions {
    opacity: 1;
  }
}

/* ==============================================
   Onboarding — 新用户引导路径
   ============================================== */

.ob-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 40%, #fff 100%);
  position: relative;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}
.ob-menu-btn:hover {
  background: #faf5ff;
  border-color: #c4b5fd;
}

.ob-skip-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 6px;
}
.ob-skip-btn:hover {
  color: #8338EC;
  background: #faf5ff;
}

.ob-step {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: ob-fade-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ob-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Hero ---- */
.ob-hero {
  text-align: center;
  width: 100%;
}
.ob-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  letter-spacing: -0.02em;
  margin: 0;
}
.ob-hero-highlight {
  background: linear-gradient(135deg, #8338EC, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 拼写卡片 ---- */
.ob-spelling-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.08);
  border: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ob-spelling-card.shake {
  animation: ob-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-color: #fca5a5;
}
@keyframes ob-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.ob-spelling-card.celebrate {
  animation: ob-celebrate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-color: #86efac;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2);
}
@keyframes ob-celebrate {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.ob-spelling-progress {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: #8338EC;
  background: #faf5ff;
  padding: 4px 12px;
  border-radius: 20px;
}

.ob-sentence-cn {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  line-height: 1.6;
}
.ob-sentence-en-hint {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  font-style: italic;
  margin-top: -10px;
}

.ob-word-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ob-word-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.3s ease;
  position: relative;
}
.ob-word-card.current {
  border-color: #8338EC;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}
.ob-word-card.done {
  border-color: #10b981;
  background: #ecfdf5;
}
.ob-word-card.done .ob-word-text {
  color: #059669;
}
.ob-word-card.past {
  opacity: 0.6;
}
.ob-word-check {
  position: absolute;
  top: 10px;
  right: 14px;
  color: #10b981;
  font-size: 16px;
  font-weight: 700;
  animation: ob-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ob-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.ob-word-text {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.02em;
}
.ob-word-ipa {
  font-size: 12px;
  color: #8338EC;
  font-style: italic;
}
.ob-word-meaning {
  font-size: 12px;
  color: #6b7280;
}
.ob-word-pos {
  color: #9ca3af;
  font-size: 11px;
}
.ob-word-input {
  margin-top: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  color: #8338EC;
  letter-spacing: 0.1em;
  background: #fff;
  outline: none;
  box-sizing: border-box;
  text-transform: lowercase;
}
.ob-word-input:focus {
  border-color: #8338EC;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}

.ob-spelling-hint {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}

/* ---- Intro Card ---- */
.ob-intro-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  animation: ob-fade-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ob-intro-check {
  font-size: 48px;
  margin-bottom: 8px;
  animation: ob-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ob-intro-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}
.ob-intro-sub {
  font-size: 15px;
  color: #8338EC;
  font-weight: 600;
  margin-top: 4px;
}
.ob-intro-desc {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* ---- Quiz ---- */
.ob-quiz-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ob-quiz-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.ob-quiz-label {
  font-size: 13px;
  font-weight: 600;
  color: #8338EC;
}
.ob-quiz-time {
  font-size: 12px;
  color: #9ca3af;
}
.ob-progress-bar {
  height: 4px;
  background: #f3f4f6;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 -24px;
}
.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8338EC, #ec4899);
  transition: width 0.4s ease;
}
.ob-quiz-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: #8338EC;
  background: #ede9fe;
  padding: 4px 10px;
  border-radius: 4px;
}
.ob-quiz-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.5;
}

.ob-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-quiz-option {
  width: 100%;
  padding: 14px 16px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: #374151;
  text-align: left;
  transition: all 0.2s ease;
}
.ob-quiz-option:hover:not(:disabled) {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.ob-quiz-option.selected {
  border-color: #8338EC;
  background: #faf5ff;
}
.ob-quiz-option.correct {
  border-color: #10b981;
  background: #ecfdf5;
  color: #059669;
}
.ob-quiz-option.wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}
.ob-quiz-option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}
.ob-quiz-option.selected .ob-quiz-option-letter {
  border-color: #8338EC;
  color: #8338EC;
}
.ob-quiz-option.correct .ob-quiz-option-letter {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}
.ob-quiz-option.wrong .ob-quiz-option-letter {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}
.ob-quiz-option-text {
  flex: 1;
  line-height: 1.5;
}
.ob-quiz-option-icon {
  font-weight: 700;
  font-size: 16px;
}

/* ---- 排序题 ---- */
.ob-sort-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ob-sort-output {
  min-height: 60px;
  background: #faf5ff;
  border: 2px dashed #c4b5fd;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ob-sort-placeholder {
  color: #a78bfa;
  font-size: 13px;
  width: 100%;
  text-align: center;
}
.ob-sort-chunk-selected {
  background: #fff;
  border: 2px solid #8338EC;
  color: #6d28d9;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ob-sort-chunk-selected:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
}
.ob-sort-chunk-selected.correct {
  border-color: #10b981;
  color: #059669;
  background: #ecfdf5;
}
.ob-sort-chunk-selected.wrong {
  border-color: #ef4444;
  color: #dc2626;
  background: #fef2f2;
  animation: ob-shake 0.4s;
}
.ob-sort-chunks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ob-sort-chunk-btn {
  background: #fff;
  border: 2px solid #e5e7eb;
  color: #374151;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.ob-sort-chunk-btn:hover:not(:disabled) {
  border-color: #c4b5fd;
  background: #faf5ff;
  transform: translateY(-1px);
}
.ob-sort-chunk-btn:disabled,
.ob-sort-chunk-btn.used {
  opacity: 0.3;
  cursor: not-allowed;
}
.ob-sort-reset {
  align-self: center;
  background: none;
  border: none;
  color: #8338EC;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.ob-sort-reset:hover { text-decoration: underline; }

/* ---- Portrait ---- */
.ob-portrait-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.ob-portrait-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}
.ob-portrait-sub {
  font-size: 13px;
  color: #9ca3af;
  margin-top: -12px;
}

.ob-muscle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.ob-muscle-block {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.ob-muscle-block.strong {
  background: #ecfdf5;
  border-color: #10b981;
  animation: ob-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ob-muscle-block.weak {
  background: #fef2f2;
  border-color: #f87171;
  animation: ob-shake 0.5s;
}
.ob-muscle-block.untested {
  opacity: 0.4;
}
.ob-muscle-icon { font-size: 24px; }
.ob-muscle-name {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}
.ob-muscle-block.strong .ob-muscle-name { color: #059669; }
.ob-muscle-block.weak .ob-muscle-name { color: #dc2626; }
.ob-muscle-status {
  font-size: 10px;
  color: #9ca3af;
}
.ob-muscle-block.strong .ob-muscle-status { color: #10b981; }
.ob-muscle-block.weak .ob-muscle-status { color: #f87171; }

.ob-portrait-summary {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.6;
  padding: 16px 20px;
  background: #faf5ff;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}
.ob-portrait-encourage {
  font-size: 13px;
  font-weight: 500;
  color: #8338EC;
  margin-top: 6px;
}

/* ---- 通用按钮 ---- */
.ob-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ob-btn:active { transform: scale(0.98); }
.ob-btn-primary {
  background: linear-gradient(135deg, #8338EC, #ec4899);
  color: #fff;
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.3);
  width: 100%;
}
.ob-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(131, 56, 236, 0.4);
}
.ob-btn-large {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 14px;
}
.ob-btn-link {
  background: none;
  color: #8338EC;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
}
.ob-btn-link:hover { text-decoration: underline; }

/* ---- 响应式 ---- */
@media (max-width: 480px) {
  .ob-hero-title { font-size: 22px; }
  .ob-muscle-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ob-muscle-block { padding: 10px 4px; }
  .ob-muscle-name { font-size: 11px; }
  .ob-muscle-status { font-size: 9px; }
  .ob-portrait-card { padding: 24px 18px; }
  .ob-spelling-card { padding: 20px 16px; }
  .ob-quiz-card { padding: 18px; }
  .ob-menu-btn { top: 14px; left: 14px; }
  .ob-skip-btn { top: 14px; right: 14px; }
}

/* ---- 侧边栏抽屉 ---- */
.ob-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  animation: ob-fade-in 0.2s ease;
}
@keyframes ob-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ob-sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: #fff;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}
.ob-sidebar-drawer.open {
  transform: translateX(0);
}
.ob-sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, #8338EC, #ec4899);
}
.ob-sidebar-logo {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.ob-sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.ob-sidebar-close:hover {
  background: rgba(255,255,255,0.15);
}
.ob-sidebar-menu {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.ob-sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: none;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.ob-sidebar-item:hover {
  background: #faf5ff;
  color: #8338EC;
}
.ob-sidebar-item:active {
  transform: scale(0.98);
}
.ob-sidebar-item-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}
.ob-sidebar-item-label {
  flex: 1;
}
.ob-sidebar-footer {
  padding: 16px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid #f3f4f6;
}

/* ---- Step 4 课程完成庆祝页 ---- */
.ob-celebrate-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.15);
  text-align: center;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}
.ob-celebrate-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  animation: ob-bounce 0.8s ease;
}
@keyframes ob-bounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
.ob-celebrate-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 24px;
}
.ob-progress-bar-card {
  background: #faf5ff;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  text-align: left;
}
.ob-progress-bar-label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}
.ob-progress-bar-gain {
  color: #10b981;
  font-weight: 700;
  font-size: 14px;
}
.ob-progress-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ob-progress-bar-before, .ob-progress-bar-after {
  flex: 1;
}
.ob-progress-bar-before span {
  font-size: 12px;
  color: #9ca3af;
  display: block;
  margin-bottom: 4px;
}
.ob-progress-bar-after span {
  font-size: 12px;
  color: #10b981;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  text-align: right;
}
.ob-progress-bar-track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.ob-progress-bar-fill.before {
  height: 100%;
  background: #d1d5db;
  border-radius: 4px;
}
.ob-progress-bar-fill.after {
  height: 100%;
  background: linear-gradient(90deg, #8338EC, #ec4899);
  border-radius: 4px;
}
.ob-progress-bar-arrow {
  color: #10b981;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.ob-step-desc {
  font-size: 16px;
  color: #374151;
  margin-bottom: 8px;
}
.ob-step-desc-sub {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
  margin-bottom: 24px;
}

/* ---- Step 5 造句 ---- */
.ob-sentence-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.12);
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}
.ob-sentence-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  text-align: center;
}
.ob-sentence-hint {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 16px;
  font-style: italic;
}
.ob-sentence-prefix {
  color: #8338EC;
  font-weight: 600;
  font-style: normal;
}
.ob-sentence-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s;
}
.ob-sentence-input-row:focus-within {
  border-color: #8338EC;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}
.ob-sentence-prefix-text {
  font-size: 15px;
  color: #8338EC;
  font-weight: 600;
  white-space: nowrap;
}
.ob-sentence-input.prefix-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #1f2937;
  outline: none;
  padding: 0;
}
.ob-sentence-textarea {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #1f2937;
  resize: none;
  outline: none;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.ob-sentence-textarea:focus {
  border-color: #8338EC;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}
.ob-sentence-result {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.ob-sentence-result.correct {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.ob-sentence-result.wrong {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.ob-sentence-result-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}
.ob-sentence-result.correct .ob-sentence-result-title { color: #059669; }
.ob-sentence-result.wrong .ob-sentence-result-title { color: #dc2626; }
.ob-sentence-result-structure {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #059669;
  margin-top: 4px;
}
.ob-sentence-error-list {
  margin: 0;
  padding-left: 18px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.7;
}
.ob-sentence-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ---- Step 6 学习计划 ---- */
.ob-plan-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(131, 56, 236, 0.12);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.ob-plan-header {
  text-align: center;
  margin-bottom: 20px;
}
.ob-plan-emoji {
  font-size: 40px;
  margin-bottom: 8px;
}
.ob-plan-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}
.ob-plan-info {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.ob-plan-info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.ob-plan-info-item {
  flex: 1;
}
.ob-plan-info-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.ob-plan-info-value {
  font-size: 15px;
  font-weight: 700;
  color: #8338EC;
}
.ob-plan-weakness {
  font-size: 13px;
  color: #6b7280;
  padding-top: 10px;
  border-top: 1px solid rgba(131, 56, 236, 0.1);
}
.ob-plan-weakness-value {
  color: #ec4899;
  font-weight: 600;
}
.ob-plan-sentence-feedback {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.ob-plan-today-title {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}
.ob-plan-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.ob-plan-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 12px;
  transition: all 0.2s;
}
.ob-plan-task-item.completed {
  background: #ecfdf5;
}
.ob-plan-task-check {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.ob-plan-task-item.completed .ob-plan-task-check { color: #10b981; }
.ob-plan-task-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.ob-plan-task-content {
  flex: 1;
  min-width: 0;
}
.ob-plan-task-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.ob-plan-task-item.completed .ob-plan-task-title {
  text-decoration: line-through;
  color: #6b7280;
}
.ob-plan-task-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}
.ob-plan-footer-note {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 18px;
}
.ob-plan-saved {
  text-align: center;
  padding: 14px;
  background: #ecfdf5;
  border-radius: 12px;
  color: #059669;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  animation: ob-bounce 0.5s ease;
}

/* 老师协助卡片 */
.ob-teacher-card {
  margin-top: 20px;
  padding: 16px;
  border: 2px dashed #d8b4fe;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #faf5ff;
}
.ob-teacher-card:hover {
  border-color: #8338EC;
  background: #f3e8ff;
}
.ob-teacher-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.ob-teacher-content {
  flex: 1;
  min-width: 0;
}
.ob-teacher-title {
  font-size: 14px;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 2px;
}
.ob-teacher-desc {
  font-size: 12px;
  color: #9ca3af;
}
.ob-teacher-arrow {
  font-size: 18px;
  color: #a78bfa;
  flex-shrink: 0;
}

/* ---- 弹窗 ---- */
.ob-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ob-fade-in 0.2s ease;
}
.ob-modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: ob-bounce 0.3s ease;
}
.ob-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.ob-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}
.ob-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}
.ob-modal-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 20px;
}
.ob-qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ob-qr-icon {
  font-size: 48px;
}
.ob-qr-text {
  font-size: 13px;
  color: #9ca3af;
}
.ob-modal-tip {
  font-size: 13px;
  color: #ec4899;
  font-weight: 600;
}

/* ========= 口语思维训练 - 话题选择页 ========= */
.tt-topic-select-page {
  padding: 16px 20px 32px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tt-topic-tabs {
  display: flex;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 4px;
}

.tt-topic-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tt-topic-tab.active {
  background: #fff;
  color: #7c3aed;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tt-topic-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tt-topic-search-input:focus {
  border-color: #7c3aed;
}

.tt-topic-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tt-topic-cat-chip {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.tt-topic-cat-chip:hover {
  border-color: #c4b5fd;
  color: #7c3aed;
}

.tt-topic-cat-chip.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
}

.tt-topic-count {
  font-size: 13px;
  color: #9ca3af;
}

.tt-topic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tt-topic-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.tt-topic-card:hover {
  border-color: #c4b5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,0.08);
}

.tt-topic-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.tt-topic-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.tt-topic-card-tag {
  font-size: 11px;
  font-weight: 600;
  color: #f97316;
  background: #fff7ed;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.tt-topic-card-en {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.tt-topic-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #9ca3af;
}

.tt-topic-card-cat {
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 6px;
}

.tt-topic-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

/* 顶部标题样式 */
.ist-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  flex: 1;
}

/* ============ 口语思维话题页（新样式） ============ */
.st-topic-select {
  padding: 20px 16px 32px;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 快速体验卡片 */
.st-quick-demo-card {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.st-quick-demo-card::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.st-quick-demo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.18);
  border-color: #fbbf24;
}
.st-quick-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #fbbf24);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.st-quick-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.st-quick-title {
  font-size: 17px;
  font-weight: 700;
  color: #92400e;
  line-height: 1.3;
}
.st-quick-sub {
  font-size: 13px;
  color: #a16207;
  line-height: 1.5;
}
.st-quick-arrow {
  font-size: 20px;
  color: #f97316;
  font-weight: 600;
  flex-shrink: 0;
}

/* 搜索框 */
.st-search-wrap {
  width: 100%;
}
.st-search-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
  background: #fff;
  color: #111827;
}
.st-search-input::placeholder {
  color: #9ca3af;
}
.st-search-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* 筛选行 */
.st-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.st-filter-label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
  width: 40px;
}
.st-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.st-filter-chip {
  padding: 7px 16px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.st-filter-chip:hover {
  border-color: #c4b5fd;
  color: #7c3aed;
}
.st-filter-chip.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

/* 结果计数 */
.st-topic-count {
  font-size: 14px;
  color: #6b7280;
  padding-top: 4px;
}
.st-topic-count-num {
  color: #7c3aed;
  font-weight: 700;
  font-size: 16px;
}

/* 话题列表 */
.st-topic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-topic-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.st-topic-card:hover {
  border-color: #c4b5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
  background: #fafaff;
}
.st-topic-card-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.st-topic-card-title-en {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}
.st-topic-card-title-zh {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}
.st-topic-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.st-topic-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.5;
}
.st-tag-new {
  background: #ecfdf5;
  color: #059669;
}
.st-tag-kept {
  background: #eff6ff;
  color: #2563eb;
}
.st-tag-required {
  background: #fef2f2;
  color: #dc2626;
}
.st-topic-qcount {
  font-size: 12px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.st-topic-arrow {
  color: #d1d5db;
  font-size: 16px;
  margin-left: 2px;
}
.st-topic-card:hover .st-topic-arrow {
  color: #7c3aed;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .st-topic-select {
    padding: 16px 14px 28px;
    gap: 14px;
  }
  .st-quick-demo-card {
    padding: 14px 16px;
    gap: 12px;
  }
  .st-quick-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 18px;
  }
  .st-quick-title {
    font-size: 15px;
  }
  .st-quick-sub {
    font-size: 12px;
  }
  .st-filter-label {
    font-size: 14px;
    width: 36px;
  }
  .st-filter-chip {
    padding: 6px 14px;
    font-size: 12.5px;
  }
  .st-topic-card {
    padding: 14px 16px;
  }
  .st-topic-card-title-en {
    font-size: 15px;
  }
}

/* ==========================================================================
   课程列表：阶段标题块/卡片色条沿用官网四彩配色（绿/黄/粉/红），与首页一致
   仅作用于 /courses（根节点 .courses-the1），主强调为首页品牌紫
   ========================================================================== */
.courses-the1 {
  --brand-accent: #8338ec;
  --brand-accent-dark: #6226b8;
  /* 同 .db-layout：ts token 在 :root 已冻结为根绿值，作用域内重新声明跟随紫色 */
  --ts-primary: var(--brand-accent);
  --ts-success: var(--brand-accent);
  /* 阶段一彩条与官网一致保持绿色（--the1-green 默认跟随主强调，这里钉回官网绿） */
  --the1-green: #027b49;
  /* CoursesPage 没有 HomePage 的 heroIn 动画触发，强制所有需要 .in 才显示的元素立即可见 */
  /* Title: opacity:0 + transform:translateY(40px) by default */
}
.courses-the1 .home-the1-title,
.courses-the1 .home-the1-section-title,
.courses-the1 .home-the1-section-title.in,
.courses-the1 .home-the1-stage,
.courses-the1 .home-the1-stage.in,
.courses-the1 .home-the1-stage-bar,
.courses-the1 .home-the1-stage.in .home-the1-stage-bar,
.courses-the1 .home-the1-card,
.courses-the1 .home-the1-card.in,
.courses-the1 .home-the1-paintbar,
.courses-the1 .home-the1-paintbar span {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.courses-the1 .home-the1-btn-advanced,
.courses-the1 .stage-green .home-the1-btn-advanced,
.courses-the1 .stage-yellow .home-the1-btn-advanced,
.courses-the1 .stage-pink .home-the1-btn-advanced,
.courses-the1 .stage-red .home-the1-btn-advanced {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-paper);
}

/* sp-header 里标题组占剩余空间，让返回按钮靠左 */
.sp-header > div {
  flex: 1;
  min-width: 0;
}

/* ====== 新版 Dashboard 5 个模块 ====== */

/* --- 模块1：Hero 用户信息条 --- */
.db-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #faf6ff 0%, #f0eaff 100%);
  border: 1px solid #e8e3f3;
  margin-bottom: 14px;
}
.db-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.db-hero-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8338ec, #b06bff);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-hero-info { min-width: 0; }
.db-hero-name-row { display: flex; align-items: center; gap: 8px; }
.db-hero-name {
  font-size: 17px; font-weight: 700; color: #1f1533;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-hero-member-tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 99px; flex-shrink: 0;
}
.db-hero-motto {
  font-size: 12.5px; color: #6b5b9a;
  margin-top: 3px; display: flex; align-items: center; gap: 5px;
  cursor: pointer; max-width: 360px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-hero-motto:hover { color: #7c3aed; }
.db-hero-motto-edit { opacity: 0.5; flex-shrink: 0; }

.db-hero-right {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.db-hero-meta-item { text-align: center; min-width: 72px; }
.db-hero-meta-val {
  display: block; font-size: 16px; font-weight: 700; color: #1f1533;
}
.db-hero-streak { color: #f97316; }
.db-hero-meta-label {
  display: block; font-size: 11px; color: #8b84a7; margin-top: 2px;
}
.db-hero-meta-sep {
  width: 1px; height: 28px; background: #d8d3e8;
}

/* --- 模块2：继续学习紫卡 --- */
.db-continue-card {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8338ec 0%, #6d28d9 100%);
  color: #fff;
  cursor: pointer;
  margin-bottom: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.db-continue-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(109, 40, 217, 0.35);
}
.db-continue-body { flex: 1; min-width: 0; }
.db-continue-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(255,255,255,0.2);
  margin-bottom: 8px;
}
.db-continue-lesson {
  font-size: 20px; font-weight: 800;
  margin-bottom: 10px;
}
.db-continue-progress-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.db-continue-progress-bar {
  flex: 1; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.25); overflow: hidden;
}
.db-continue-progress-fill {
  height: 100%; border-radius: 3px;
  background: #fff; transition: width 0.4s;
}
.db-continue-progress-pct {
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.db-continue-meta {
  font-size: 11.5px; opacity: 0.75;
}
.db-continue-ring-wrap {
  position: relative; width: 60px; height: 60px; flex-shrink: 0;
}
.db-continue-ring { transform: rotate(0deg); }
.db-continue-ring-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.db-continue-arrow {
  flex-shrink: 0; opacity: 0.7;
}

/* --- 模块3：语块通关卡 --- */
.db-chunk-card { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.db-chunk-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.db-chunk-body { padding-top: 4px; }
.db-chunk-progress { margin-bottom: 10px; }
.db-chunk-progress-bar {
  height: 10px; border-radius: 5px;
  background: #f0eaff; overflow: hidden; margin-bottom: 8px;
}
.db-chunk-progress-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #8338ec, #b06bff);
}
.db-chunk-progress-text {
  font-size: 13px; color: #5b4e8a; font-weight: 600;
}
.db-chunk-hint {
  font-size: 12px; color: #8b84a7;
  display: flex; align-items: center; justify-content: space-between;
}

/* --- 模块4：学习日历 --- */
.db-calendar-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.db-calendar-sub { font-size: 11.5px; color: #8b84a7; }
.db-calendar-grid-wrap { padding-top: 4px; }
.db-calendar-week-labels {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin-bottom: 6px;
}
.db-calendar-week-label {
  font-size: 10px; color: #8b84a7; text-align: center;
  padding: 0 0 4px;
}
.db-calendar-weeks { display: flex; flex-direction: column; gap: 4px; }
.db-calendar-week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.db-calendar-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f3f4f6;
  transition: transform 0.1s;
}
.db-calendar-cell:hover {
  transform: none;
  filter: brightness(0.94);
  box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.18);
}
.db-calendar-lv0 { background: #f3f4f6; }
.db-calendar-lv1 { background: #e8e3f3; }
.db-calendar-lv2 { background: #b4a7e6; }
.db-calendar-lv3 { background: #6d28d9; }
.db-calendar-cell.is-today {
  outline: 2px solid #f97316;
  outline-offset: -2px;
}
.db-calendar-legend {
  display: flex; align-items: center; gap: 4px;
  margin-top: 10px; font-size: 11px; color: #8b84a7;
}
.db-calendar-legend span { margin: 0 3px; }
.db-calendar-today {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e5e1f0;
}
.db-calendar-today-label {
  font-size: 11.5px; color: #8b84a7; margin-bottom: 6px;
}
.db-calendar-mood-row {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.db-calendar-mood {
  width: 36px; height: 36px; font-size: 20px;
  border: 1.5px solid #e8e3f3; border-radius: 10px;
  background: #fff; cursor: pointer;
  transition: all 0.15s;
}
.db-calendar-mood:hover { border-color: #b4a7e6; }
.db-calendar-mood.active {
  border-color: #8338ec; background: #f0eaff;
}
.db-calendar-harvest-input {
  width: 100%; box-sizing: border-box;
  font-size: 12.5px; color: #1f1533;
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid #e8e3f3; background: #fafaff;
  outline: none;
  transition: border-color 0.15s;
}
.db-calendar-harvest-input:focus { border-color: #8338ec; }

/* --- 模块5：积分环形卡 --- */
.db-points-detail-btn {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: #8338ec; font-weight: 500;
  display: flex; align-items: center; gap: 3px; padding: 0;
}
.db-points-detail-btn:hover { color: #6d28d9; }
.db-points-ring-row {
  display: flex; gap: 24px; align-items: center;
  padding-top: 6px;
}
.db-points-ring-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.db-points-ring-svg { transform: rotate(0); }
.db-points-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.db-points-ring-pct {
  font-size: 22px; font-weight: 800; color: #1f1533;
}
.db-points-ring-pct-label {
  font-size: 10px; color: #8b84a7; margin-top: 2px;
}
.db-points-ring-info { flex: 1; min-width: 0; }
.db-points-ring-total {
  font-size: 30px; font-weight: 800; color: #1f1533; line-height: 1;
}
.db-points-ring-total-label {
  font-size: 11.5px; color: #8b84a7; margin-top: 4px; margin-bottom: 6px;
}
.db-points-ring-month-plus {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: #f97316; background: #fff7ed;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 10px;
}
.db-points-ring-legend { display: flex; flex-direction: column; gap: 4px; }
.db-points-ring-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #5b4e8a;
}
.db-points-ring-legend-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}
.db-points-ring-legend-pct {
  margin-left: auto; color: #8b84a7; font-weight: 600;
}
.db-points-ring-bottom {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed #e5e1f0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #8b84a7;
}
.db-points-earn-btn {
  background: #8338ec; color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.db-points-earn-btn:hover { background: #6d28d9; }

/* --- 模块6：今日任务 --- */
.db-daily-tasks-header {
  display: flex; align-items: center; justify-content: space-between;
}
.db-daily-tasks-title-wrap {
  display: flex; align-items: center; gap: 10px;
}
.db-daily-tasks-count {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: #f0eaff; color: #8338ec;
}
.db-daily-tasks-modes {
  display: flex; gap: 0; background: #f3f4f6;
  border-radius: 99px; padding: 2px;
}
.db-daily-tasks-mode {
  font-size: 11px; padding: 3px 10px; border-radius: 99px;
  background: none; border: none; cursor: pointer;
  color: #8b84a7; font-weight: 500;
  transition: all 0.15s;
}
.db-daily-tasks-mode.active {
  background: #fff; color: #1f1533; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.db-daily-tasks-meta-line {
  font-size: 11.5px; color: #8b84a7; margin: 8px 0 10px;
}
.db-daily-tasks-list { display: flex; flex-direction: column; gap: 6px; }
.db-daily-task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid #f0ebfa; background: #fafaff;
  transition: all 0.15s;
}
.db-daily-task-item.completed {
  background: #f7fef8; border-color: #dcfce7; opacity: 0.75;
}
.db-daily-task-check {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-daily-task-item.completed .db-daily-task-check {
  background: #22c55e; color: #fff;
}
.db-daily-task-check-empty {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #c4b5fd;
}
.db-daily-task-main { flex: 1; min-width: 0; }
.db-daily-task-title {
  font-size: 13.5px; font-weight: 600; color: #1f1533;
}
.db-daily-task-sub {
  font-size: 11.5px; color: #8b84a7; margin-top: 1px;
}
.db-daily-task-tag-done {
  font-size: 11px; font-weight: 600; color: #22c55e;
  padding: 2px 10px; border-radius: 99px; background: #dcfce7;
}
.db-daily-task-start-btn {
  background: #8338ec; color: #fff; border: none; border-radius: 8px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
  transition: background 0.15s;
}
.db-daily-task-start-btn:hover { background: #6d28d9; }
.db-daily-tasks-footer {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #e5e1f0;
  font-size: 12px; color: #8b84a7;
  display: flex; align-items: center; justify-content: space-between;
}
.db-daily-tasks-expected-points {
  color: #f97316; font-weight: 700; font-size: 13px;
}
.db-daily-tasks-meta-right { font-weight: 500; }
.db-daily-tasks-footer { justify-content: flex-start; gap: 0; }
.db-daily-tasks-footer-done { justify-content: space-between; }
.db-daily-tasks-done-text { color: #16a34a; font-weight: 600; }
.db-daily-tasks-share-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #8338EC, #7c3aed);
  color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.db-daily-tasks-share-btn:hover { opacity: 0.9; }

/* db-home 双列布局 */
.db-home-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* 响应式：窄屏单列 */
@media (max-width: 860px) {
  .db-home-two-col { grid-template-columns: 1fr; }
  .db-points-ring-row { flex-direction: column; }
  .db-hero-right { flex-wrap: wrap; gap: 8px; }
}

/* ====== 新版首页：两列网格布局（左自适应 + 右固定 360） ====== */
.db-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-bottom: 0;
  align-items: stretch;
}
@media (max-width: 900px) {
  .db-home-grid { grid-template-columns: 1fr; }
}

/* ====== 语块通关卡 ====== */
.db-chunk-card { cursor: default; }
.db-chunk-card:hover { transform: none; box-shadow: none; }
.db-chunk-card .db-card-header { justify-content: space-between; }
.db-chunk-stamp {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 11px; color: #8b84a7;
  padding: 2px 9px; border-radius: 99px;
  background: #f4f1fb; border: 1px solid #e8e3f3;
}
.db-chunk-stamp b { font-size: 13px; color: #6d28d9; }
.db-chunk-sub {
  font-size: 12px; color: #8b84a7; margin: 2px 0 2px;
}
.db-chunk-progress {
  display: flex; align-items: center; gap: 10px;
}
.db-chunk-progress-bar {
  flex: 1; height: 8px; border-radius: 4px;
  background: #f2f0f7; overflow: hidden;
}
.db-chunk-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #8338ec, #b06bff);
  transition: width 0.4s ease;
}
.db-chunk-progress-num {
  font-size: 12px; color: #5b4e8a; white-space: nowrap;
}
.db-chunk-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.db-chunk-chip {
  font-size: 11.5px; color: #5b4e8a;
  padding: 3px 10px; border-radius: 99px;
  background: #faf8ff; border: 1px solid #e8e3f3;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-chunk-chip-more { color: #8b84a7; background: #fff; }
.db-chunk-actions {
  display: flex; align-items: center; gap: 12px; margin-top: 2px;
}
.db-chunk-go-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: #8338ec; color: #fff; border: none;
  font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 9px; cursor: pointer;
  transition: background 0.15s;
}
.db-chunk-go-btn:hover { background: #6d28d9; }
.db-chunk-link {
  font-size: 12px; color: #8b84a7; cursor: pointer;
}
.db-chunk-link:hover { color: #6d28d9; }
.db-chunk-empty {
  font-size: 12.5px; color: #8b84a7;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}

/* ====== 积分卡（donut + 图例） ====== */
.db-points-ring-card .db-card-header { justify-content: space-between; }
.db-points-top {
  display: flex; align-items: center; gap: 10px; margin-top: -4px;
}
.db-points-gain {
  font-size: 11.5px; font-weight: 600; color: #6d28d9;
  background: #f4f1fb; border: 1px solid #e8e3f3;
  padding: 2px 9px; border-radius: 99px;
}
.db-points-donut {
  width: 140px; height: 140px; border-radius: 50%;
  position: relative; flex-shrink: 0;
}
.db-points-donut::after {
  content: '';
  position: absolute; inset: 12px;
  background: #fff; border-radius: 50%;
}
.db-points-donut-center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
}
.db-points-donut-center b { font-size: 21px; font-weight: 800; color: #1f1533; }
.db-points-donut-center span { font-size: 10px; color: #8b84a7; }
.db-points-ring-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #5b4e8a;
}
.db-points-legend-label { color: #5b4e8a; }
.db-points-legend-val { margin-left: auto; font-size: 13px; color: #1f1533; }
.db-points-ring-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

/* ====== 第一行：继续学习 + 语块通关（固定 170px 高） ====== */
.db-home-grid-hero > .db-continue-card,
.db-home-grid-hero > .db-chunk-card {
  height: 170px;
  min-height: 170px;
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 0;
}

/* --- 继续学习：还原参考稿 --- */
.db-continue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 16px 17px 14px;
  border-radius: 16px;
  color: #FBF7EF;
  background:
    radial-gradient(120% 150% at 100% 0%, #8B5CF6 0%, rgba(139,92,246,0) 55%),
    linear-gradient(135deg, #4A2A7D 0%, #5E2FA3 52%, #7C4ADA 100%);
  box-shadow: 0 22px 38px -30px rgba(58,29,96,.9);
  cursor: pointer;
  transition: transform .15s;
}
.db-continue-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px -30px rgba(58,29,96,.9);
}
.db-continue-card::after {
  content: '';
  position: absolute;
  right: -55px; bottom: -85px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255,247,235,.22);
  box-shadow: 0 0 0 24px rgba(255,247,235,.06), 0 0 0 52px rgba(255,247,235,.045);
  pointer-events: none;
}
.db-continue-top {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  font-size: 9.5px; letter-spacing: .12em;
  color: #DCCBF6; text-transform: uppercase;
}
.db-continue-live {
  width: 5px; height: 5px; border-radius: 50%; background: #F3C15B;
}
.db-continue-title {
  position: relative; z-index: 1;
  font-size: 20px; font-weight: 600; line-height: 1.25;
  margin: 8px 0 4px; color: #FBF7EF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-continue-sub {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: #D8C9EC;
  white-space: nowrap; overflow: hidden;
}
.db-continue-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: #A98FD0; display: inline-block;
}
.db-continue-progress {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 10px;
}
.db-continue-track {
  flex: 1; height: 5px; border-radius: 5px;
  background: rgba(255,255,255,.16); overflow: hidden;
}
.db-continue-track i {
  display: block; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #F3C15B, #FFE0A3);
  transition: width .4s;
}
.db-continue-pct {
  font-size: 10px; color: #E9DBF8; white-space: nowrap;
}
.db-continue-actions {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px;
}
.db-continue-btn {
  flex: 0 0 90px; width: 90px; min-width: 90px; height: 30px; padding: 0;
  border: 0; border-radius: 8px; cursor: pointer;
  background: #F3C15B; color: #3A2A15;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
  transition: .18s;
}
.db-continue-btn:hover { transform: translateY(-1px); background: #FFD277; }
.db-continue-last { margin-left: auto; font-size: 9px; color: #BBA7DA; white-space: nowrap; }

/* --- 语块通关：塞进 170px（间距按 demo 收紧） --- */
.db-home-grid-hero > .db-chunk-card {
  display: flex; flex-direction: column;
  gap: 0;
  padding: 14px 15px;
}
.db-home-grid-hero .db-chunk-card .db-card-header { margin-bottom: 0; }
.db-home-grid-hero .db-chunk-card .db-card-title { font-size: 13px; }
.db-home-grid-hero .db-chunk-card .db-chunk-stamp { padding: 1px 8px; }
.db-home-grid-hero .db-chunk-card .db-chunk-sub { font-size: 10.5px; margin: 4px 0 0; }
.db-home-grid-hero .db-chunk-card .db-chunk-progress { margin-top: 6px; margin-bottom: 0; gap: 8px; }
.db-home-grid-hero .db-chunk-card .db-chunk-progress-bar {
  height: 6px;
  background: #F3E7CE;
}
.db-home-grid-hero .db-chunk-card .db-chunk-progress-fill {
  background: linear-gradient(90deg, #E8B563, #D99B34);
}
.db-home-grid-hero .db-chunk-card .db-chunk-progress-num {
  font-size: 11px; color: #8A5A22;
}
.db-home-grid-hero .db-chunk-card .db-chunk-chips {
  margin-top: 4px; flex: 1; min-height: 20px; align-content: flex-start; overflow: hidden;
}
.db-home-grid-hero .db-chunk-card .db-chunk-chip { font-size: 10.5px; padding: 2px 8px; }
.db-home-grid-hero .db-chunk-card .db-chunk-actions {
  margin-top: auto; padding-top: 7px;
}
.db-home-grid-hero .db-chunk-card .db-chunk-go-btn {
  height: 26px; padding: 0 11px; font-size: 11px; border-radius: 7px;
}
.db-home-grid-hero .db-chunk-card .db-chunk-link { font-size: 11px; }

/* ====== 首页布局：内容宽 1200 / 右列 360 / 模块间距 14 ====== */
.db-content > .db-home {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.db-home-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-bottom: 0;
  align-items: stretch;
}
.db-home-grid-hero > .db-continue-card,
.db-home-grid-hero > .db-chunk-card {
  height: 170px;
  min-height: 170px;
}
.db-home-grid > .db-calendar-card,
.db-home-grid > .db-points-ring-card {
  height: 340px;
  min-height: 340px;
  box-sizing: border-box;
  overflow: hidden;
}

/* 学习日历压进 300px */
.db-calendar-card {
  padding: 16px 18px;
  gap: 8px;
  display: flex;
  flex-direction: column;
}
.db-calendar-card .db-card-header { flex-shrink: 0; justify-content: space-between; }
.db-calendar-title-wrap { flex-direction: row; align-items: baseline; gap: 8px; }
.db-calendar-month-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.db-calendar-month-label { min-width: 34px; text-align: center; font-size: 11px; font-weight: 600; color: #5b4e8a; }
.db-calendar-nav-btn {
  width: 20px; height: 20px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e8e3f3; border-radius: 6px;
  background: #f6f3fb; color: #5b4e8a;
  font-size: 13px; line-height: 1;
}
.db-calendar-nav-btn:hover:not(:disabled) { background: #ece6f8; }
.db-calendar-nav-btn:disabled { opacity: .35; cursor: default; }
.db-calendar-grid-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}
.db-calendar-weeks { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.db-calendar-week { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.db-calendar-cell {
  aspect-ratio: auto;
  height: 30px;
  min-height: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 6px;
  transition: filter .15s, box-shadow .15s;
}
/* hover 不放大，仅让各自背景色做轻微变化 */
.db-home .db-calendar-cell:hover {
  transform: none;
  filter: brightness(0.9);
  box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.22);
}
.db-home .db-calendar-cell.db-calendar-empty:hover {
  filter: none;
  box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.12);
}
.db-calendar-cell.db-calendar-empty { background: transparent; }
.db-calendar-day-num {
  font-size: 10px;
  line-height: 1;
  color: #9a94ad;
  font-variant-numeric: tabular-nums;
}
.db-calendar-cell.db-calendar-lv1 .db-calendar-day-num { color: #5b4e8a; }
.db-calendar-cell.db-calendar-lv2 .db-calendar-day-num { color: #3d2f66; }
.db-calendar-cell.db-calendar-lv3 .db-calendar-day-num { color: #FBF7EF; }
.db-calendar-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #6D28D9; display: block;
}
.db-calendar-cell.db-calendar-lv3 .db-calendar-dot { background: #FBF7EF; }
.db-calendar-legend { margin-top: 8px; flex-shrink: 0; }
.db-calendar-legend > div { width: 12px; height: 12px; border-radius: 3px; }
.db-calendar-legend-checkin { display: inline-flex; align-items: center; gap: 4px; color: #5b4e8a; }
.db-calendar-legend-gap { flex: 1; }

/* 我的积分（330px 高度内） */
.db-points-ring-card {
  padding: 16px 18px;
  gap: 8px;
}
.db-points-ring-row {
  gap: 18px;
  padding-top: 0;
  flex: 1;
  min-height: 0;
  align-items: center;
}
.db-points-donut { width: 104px; height: 104px; }
.db-points-donut::after { inset: 9px; }
.db-points-donut-center b { font-size: 17px; }
.db-points-ring-total { font-weight: 600; }
.db-points-ring-total-label { margin-top: 1px; margin-bottom: 4px; }
.db-points-ring-bottom { margin-top: 0; padding-top: 10px; flex-shrink: 0; }

/* 语块勋章标题 */
.db-chunk-title-wrap { display: flex; align-items: center; gap: 6px; }
.db-chunk-medal-icon { color: #b8860b; }

@media (max-width: 900px) {
  .db-home-grid { grid-template-columns: 1fr; }
  .db-home-grid > .db-calendar-card,
  .db-home-grid > .db-points-ring-card { height: auto; min-height: 300px; }
}
/* ChunkMasteryCard —— 语块掌握度卡片 */

.db-chunk-mastery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 顶部复习按钮 */
.db-mastery-review-btn {
  background: var(--db-primary, var(--brand-accent));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}
.db-mastery-review-btn:hover {
  opacity: 0.9;
}

/* 四个统计数字 */
.db-mastery-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 4px 0;
}
.db-mastery-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.db-mastery-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.db-mastery-stat-label {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1;
}

/* 环形图 + 数据列表（v2 左右分栏） */
.db-mastery-chart-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.db-mastery-donut-wrap-v2 {
  flex: 0 0 140px;
  width: 140px;
  height: 140px;
}
.db-mastery-donut-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 横向条形图列表 */
.db-mastery-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.db-mastery-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.db-mastery-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.db-mastery-bar-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-mastery-bar-label {
  flex: 1;
  color: #6b7280;
  font-size: 13px;
}
.db-mastery-bar-count {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.db-mastery-bar-count strong {
  font-size: 14px;
  font-weight: 600;
}
.db-mastery-bar-track {
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 28px; /* 对齐图标后的文字起点 */
}
.db-mastery-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* 响应式：移动端上下布局 */
@media (max-width: 768px) {
  .db-mastery-chart-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .db-mastery-donut-wrap-v2 {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }
  .db-mastery-bar-track {
    margin-left: 28px;
  }
}

/* 今日/明日待复习 */
.db-mastery-due {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.db-mastery-due:hover {
  background: #f3f4f6;
}
.db-mastery-due-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.db-mastery-due-label {
  font-size: 12px;
  color: #6b7280;
}
.db-mastery-due-value {
  font-size: 14px;
  color: #374151;
  font-variant-numeric: tabular-nums;
}
.db-mastery-due-value strong {
  font-size: 18px;
  font-weight: 700;
}
.db-mastery-due-divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}
.db-mastery-due-action {
  margin-left: 12px;
  color: var(--db-primary, var(--brand-accent));
  font-size: 13px;
  font-weight: 500;
}

/* 艾宾浩斯周期 */
.db-mastery-cycle {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-mastery-cycle-title {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.db-mastery-cycle-pct {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}
.db-mastery-cycle-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.db-mastery-stage {
  display: flex;
  align-items: center;
  gap: 10px;
}
.db-mastery-stage-label {
  width: 32px;
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  flex-shrink: 0;
}
.db-mastery-stage-bar {
  flex: 1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}
.db-mastery-stage-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.db-mastery-stage-count {
  width: 48px;
  font-size: 11px;
  color: #6b7280;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 空状态 */
.db-mastery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  gap: 8px;
}
.db-mastery-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  margin-bottom: 4px;
}
.db-mastery-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.db-mastery-empty-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  max-width: 260px;
}
.db-mastery-empty-btn {
  margin-top: 12px;
  background: var(--db-primary, var(--brand-accent));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}
.db-mastery-empty-btn:hover {
  opacity: 0.9;
}

/* 响应式 */
@media (max-width: 640px) {
  .db-mastery-stat-value {
    font-size: 20px;
  }
  .db-mastery-row {
    gap: 16px;
  }
  .db-mastery-donut-wrap {
    width: 120px;
    height: 120px;
  }
}
/* Dashboard 优化 v1 —— 布局重组、卡片密度、Tab 区、色彩配额 */

/* ---- 密度优化：卡片基础 ---- */
.db-home-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-bottom: 0;
}
.db-card {
  padding: 18px;
  gap: 14px;
  border-radius: 12px;
  border: 1px solid var(--db-border);
}
.db-card-header {
  margin-bottom: 0;
}
.db-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.db-card-subtitle {
  font-size: 11px;
  color: #9ca3af;
}

/* 打卡卡片标签缩小 */
.db-checkin-stat-label {
  font-size: 11px;
  color: #9ca3af;
}
.db-week-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.db-week-day {
  font-size: 11px;
  color: #9ca3af;
}
.db-task-section-title {
  font-size: 11px;
  color: #9ca3af;
  padding-top: 12px;
  margin-top: 2px;
}

/* ---- 快捷入口 ---- */
.db-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.db-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  text-align: left;
}
.db-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--brand-shadow);
  border-color: #e0e3ea;
}
.db-quick-btn-primary {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  border-color: transparent;
  color: #fff;
}
.db-quick-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.3);
}
.db-quick-btn-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-quick-btn-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.db-quick-btn-sub {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-quick-btn-secondary .db-quick-btn-title {
  color: #111827;
}
.db-quick-btn-secondary .db-quick-btn-sub {
  color: #6b7280;
  opacity: 1;
}
.db-quick-btn-arrow {
  flex-shrink: 0;
  opacity: 0.7;
}
.db-quick-btn-primary .db-quick-btn-arrow {
  color: #fff;
}
.db-quick-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.db-quick-btn-secondary .db-quick-btn-arrow {
  color: #6b7280;
}

/* ---- 学习数据 Tab 区 ---- */
.db-data-section {
  margin-top: 8px;
  margin-bottom: 24px;
}
.db-data-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--db-border);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.db-data-tabs::-webkit-scrollbar {
  display: none;
}
.db-data-tab {
  position: relative;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.db-data-tab:hover {
  color: #374151;
}
.db-data-tab.active {
  color: var(--brand-accent);
  font-weight: 600;
}
.db-data-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 1px;
}
.db-data-tab-content {
  animation: db-fade-in 0.25s ease;
}

/* ---- 概览 Tab ---- */
.db-overview-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.db-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.db-overview-card {
  background: #fff;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}
.db-overview-card:hover {
  border-color: #e0e3ea;
}
.db-overview-icon {
  display: flex;
}
.db-overview-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.db-overview-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

/* 课程掌握 Tab 内的两张卡片并排 */
.db-course-tab {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.db-course-tab .db-card {
  height: fit-content;
}

/* 底部入口密度调整 */
.db-bottom-grid {
  gap: 16px;
}
.db-bottom-card {
  padding: 16px 18px;
  gap: 12px;
}
.db-bottom-card-title {
  font-size: 13px;
  font-weight: 600;
}
.db-bottom-card-desc {
  font-size: 12px;
  color: #6b7280;
}

/* ---- 响应式 ---- */
@media (max-width: 1200px) {
  .db-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .db-course-tab {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .db-home-grid {
    grid-template-columns: 1fr;
  }
  .db-quick-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .db-data-tabs {
    gap: 18px;
  }
  .db-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .db-overview-card {
    padding: 14px;
  }
  .db-overview-value {
    font-size: 22px;
  }
  .db-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- 动画 ---- */
@keyframes db-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- 学习数据入口 ---- */
.db-scroll-to-data {
  display: flex;
  justify-content: center;
  padding: 4px 0 20px;
}
.db-scroll-to-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--db-primary, var(--brand-accent));
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, transform 0.2s ease;
}
.db-scroll-to-data-btn:hover {
  color: #5b21b6;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.db-scroll-to-data-btn:hover .db-scroll-to-data-icon {
  transform: translateY(2px);
}
.db-scroll-to-data-icon {
  transition: transform 0.2s ease;
  animation: db-bounce-down 2s ease-in-out infinite;
}
@keyframes db-bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@media (max-width: 768px) {
  .db-scroll-to-data {
    padding: 0 0 16px;
  }
}

/* =======================================================
   Dashboard Home V2 新布局样式
   ======================================================= */

.db-home-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- 区域1：学习体检横幅 ---- */
.db-diag-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  gap: 16px;
  flex-shrink: 0;
}
.db-diag-banner-large {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  padding: 22px 28px;
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.18);
}
.db-diag-banner-large .db-diag-banner-title {
  color: #fff;
}
.db-diag-banner-large .db-diag-banner-desc {
  color: rgba(255, 255, 255, 0.8);
}
.db-diag-banner-large .db-diag-banner-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.db-diag-banner-small {
  background: #faf8ff;
  padding: 12px 18px;
  border: 1px solid #efebf9;
}
.db-diag-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.db-diag-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-diag-banner-icon.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(131, 56, 236, 0.12);
  color: var(--brand-accent);
}
.db-diag-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.db-diag-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.01em;
}
.db-diag-banner-title.small {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.db-diag-banner-desc {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.5;
}
.db-diag-banner-btn-white {
  flex-shrink: 0;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-accent);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: var(--brand-shadow);
}
.db-diag-banner-btn-white:hover {
  transform: translateY(-1px);
  box-shadow: var(--brand-shadow);
}
.db-diag-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.db-diag-banner-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #d4c5f0;
  color: var(--brand-accent);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.db-diag-banner-btn-sm:hover {
  background: rgba(131, 56, 236, 0.08);
  border-color: var(--brand-accent);
}
.db-diag-banner-link {
  font-size: 12px;
  color: #9ca3af;
  padding: 6px 8px;
}
.db-diag-banner-link:hover {
  color: var(--brand-accent);
}

/* ---- 区域3：两列布局 ---- */
.db-home-row {
  display: grid;
  gap: 16px;
}
.db-two-col {
  grid-template-columns: 1fr 1fr;
}

/* ---- 区域3a：今日任务 V2 ---- */
.db-tasks-v2-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.db-task-progress-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-accent);
  background: rgba(131, 56, 236, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
}
.db-tasks-v2-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-task-v2-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.db-task-v2-item:hover {
  background: #f9fafb;
}
.db-task-v2-item.completed {
  opacity: 0.55;
}
.db-task-v2-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
}
.db-task-v2-item.completed .db-task-v2-check {
  background: #10b981;
  border-color: #10b981;
}
.db-task-v2-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-task-v2-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #1f2937;
}
.db-task-v2-item.completed .db-task-v2-title {
  text-decoration: line-through;
  color: #9ca3af;
}
.db-task-v2-desc {
  font-size: 11.5px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-task-v2-arrow {
  color: #d1d5db;
  flex-shrink: 0;
}
.db-card-footer {
  padding-top: 4px;
  border-top: 1px solid var(--db-border);
  display: flex;
  justify-content: flex-end;
}

.db-btn-ghost {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #d4c5f0;
  color: var(--brand-accent);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.db-btn-ghost:hover {
  background: rgba(131, 56, 236, 0.08);
  border-color: var(--brand-accent);
}

/* ---- 今日重点任务（新版）---- */
.db-focus-task-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.db-focus-task-item:hover {
  background: #f9fafb;
}
.db-focus-task-item.completed {
  opacity: 0.55;
}
.db-focus-task-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.db-focus-task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  margin-top: 1px;
}
.db-focus-task-check.done {
  background: #10b981;
  border-color: #10b981;
}
.db-focus-task-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.db-focus-task-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}
.db-focus-task-item.completed .db-focus-task-title {
  text-decoration: line-through;
  color: #9ca3af;
  font-weight: 500;
}
.db-focus-task-desc {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.4;
}
.db-focus-task-action {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--brand-accent);
  background: rgba(131, 56, 236, 0.08);
  border: 1px solid #e4def5;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.db-focus-task-action:hover {
  background: var(--brand-accent);
  color: #fff;
  border-color: var(--brand-accent);
}
.db-focus-task-action-icon {
  opacity: 0.7;
}

/* 任务全完成空态 */
.db-tasks-all-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0;
}
.db-tasks-all-done-icon {
  font-size: 28px;
}
.db-tasks-all-done-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* 小幽灵按钮（footer用） */
.db-btn-ghost-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ---- 区域4：课程掌握地图卡片 ---- */
.db-mastery-map-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- 区域5：学习数据概览（弱化） ---- */
.db-stats-v2-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.db-stats-v2-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.db-stats-v2-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: #fafafa;
  border-radius: 10px;
  text-align: center;
}
.db-stats-v2-value {
  font-size: 20px;
  font-weight: 700;
  color: #374151;
  letter-spacing: -0.02em;
}
.db-stats-v2-label {
  font-size: 11.5px;
  color: #9ca3af;
  font-weight: 400;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .db-two-col {
    grid-template-columns: 1fr;
  }
  .db-stats-v2-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .db-diag-banner-large {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }
  .db-diag-banner-btn {
    width: 100%;
  }
  .db-diag-banner-small {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }
  .db-diag-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .db-focus-task-item {
    flex-direction: column;
    gap: 8px;
  }
  .db-focus-task-action {
    align-self: flex-start;
    margin-left: 28px;
  }
}

/* ============================================================
   Dashboard Home V3 — 今日训练为核心
   ============================================================ */

/* 目标卡片 */
.db-goal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.2);
}
.db-goal-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.db-goal-eyebrow {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 500;
}
.db-goal-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.db-goal-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.db-goal-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.db-goal-stat-unit {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
}
.db-goal-stat-label {
  font-size: 12px;
  opacity: 0.75;
}
.db-goal-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.25);
}
.db-goal-edit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.db-goal-edit-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* 今日任务大卡片 */
.db-today-tasks-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.db-today-tasks-header {
  margin-bottom: 4px;
}
.db-today-tasks-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.db-today-tasks-title {
  font-size: 16px !important;
  font-weight: 700 !important;
}
.db-task-progress-badge-lg {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-accent);
  background: rgba(131, 56, 236, 0.08);
  padding: 4px 14px;
  border-radius: 999px;
}
.db-today-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-today-task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}
.db-today-task-item:hover {
  background: rgba(131, 56, 236, 0.08);
  border-color: #9fc9aa;
}
.db-today-task-item.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
  opacity: 0.8;
}
.db-today-task-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--brand-shadow);
}
.db-today-task-main {
  flex: 1;
  min-width: 0;
}
.db-today-task-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.db-today-task-meta {
  font-size: 12px;
  color: #9ca3af;
}
.db-today-task-done-time {
  color: #10b981;
  font-weight: 500;
}
.db-today-task-check.done {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-today-task-start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.db-today-task-start-btn:hover {
  background: var(--brand-accent-dark);
  transform: translateY(-1px);
}
.db-today-tasks-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 13px;
}
.db-today-tasks-empty-icon {
  font-size: 36px;
}
.db-today-all-done-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.db-today-tasks-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--db-border);
}

/* 本周概览 + 语感肌肉 两列 */
.db-week-muscle-row {
  gap: 16px;
}
.db-week-overview-card,
.db-muscle-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.db-week-streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  background: #fef3c7;
  padding: 3px 10px;
  border-radius: 999px;
}
.db-week-overview-card .db-card-header,
.db-muscle-card .db-card-header {
  justify-content: space-between;
  gap: 12px;
}
.db-week-grid {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.db-week-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.db-week-cell.today {
  background: rgba(131, 56, 236, 0.08);
}
.db-week-cell-day {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.db-week-cell.today .db-week-cell-day {
  color: var(--brand-accent);
  font-weight: 700;
}
.db-week-cell-dot {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f4f6;
  font-size: 11px;
  color: transparent;
  font-weight: 700;
}
.db-week-cell.done .db-week-cell-dot {
  background: #10b981;
  color: #fff;
}
.db-week-cell.today:not(.done) .db-week-cell-dot {
  border: 2px solid var(--brand-accent);
  background: #fff;
}

/* 语感肌肉 */
.db-muscle-card {
  cursor: pointer;
  transition: all 0.2s ease;
}
.db-muscle-card:hover {
  border-color: #9fc9aa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.1);
}
.db-muscle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.db-muscle-dot {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f3f4f6;
  font-size: 20px;
  transition: all 0.3s ease;
}
.db-muscle-dot.lit {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.db-muscle-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-muscle-title-hint {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}
.db-muscle-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* ---- 快捷入口区（V3，3列） ---- */
.db-quick-actions-v3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.db-quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
}
.db-quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--brand-shadow);
  border-color: #e0e3ea;
}
.db-quick-action-primary {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  border-color: transparent;
  color: #fff;
}
.db-quick-action-primary:hover {
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.35);
  border-color: transparent;
}
.db-quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(131, 56, 236, 0.08);
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-quick-action-primary .db-quick-action-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.db-quick-action-icon-checkup {
  background: #fef3c7;
  color: #d97706;
}
.db-quick-action-icon-library {
  background: #dbeafe;
  color: #2563eb;
}
.db-quick-action-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  width: 100%;
}
.db-quick-action-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.db-quick-action-sub {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-quick-action-primary .db-quick-action-sub {
  opacity: 0.75;
}
.db-quick-action-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  opacity: 0.5;
  font-size: 14px;
}
.db-quick-action-primary .db-quick-action-arrow {
  color: #fff;
  opacity: 0.7;
}

/* ---- 学习数据概览 ---- */
.db-data-overview-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.db-data-overview-card:hover {
  border-color: #9fc9aa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.08);
}
.db-data-overview-more {
  font-size: 12px;
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}
.db-data-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.db-data-overview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: #fafafa;
  border-radius: 10px;
  text-align: center;
  transition: background 0.2s ease;
}
.db-data-overview-card:hover .db-data-overview-item {
  background: #f5f3ff;
}
.db-data-overview-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--brand-shadow);
}
.db-data-overview-value {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.db-data-overview-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

/* 老师协助入口（首页底） */
.db-teacher-dash-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 2px dashed #9fc9aa;
  border-radius: 12px;
  background: #faf5ff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s ease;
}
.db-teacher-dash-card:hover {
  background: rgba(131, 56, 236, 0.08);
  border-color: var(--brand-accent);
  transform: translateY(-1px);
}
.db-teacher-dash-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.db-teacher-dash-body {
  flex: 1;
  min-width: 0;
}
.db-teacher-dash-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 4px;
}
.db-teacher-dash-sub {
  font-size: 12px;
  color: #9ca3af;
}
.db-teacher-dash-arrow {
  color: var(--brand-accent);
  flex-shrink: 0;
}

/* 庆祝弹窗 */
.db-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: db-fadeIn 0.2s ease;
}
@keyframes db-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.db-celebration-modal {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: 400px;
  max-width: 90vw;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: db-slideUp 0.3s ease forwards;
}
@keyframes db-slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
/* 海报预览弹窗 */
.db-poster-modal {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: 380px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  animation: db-slideUp 0.3s ease forwards;
}
.db-celebration-confetti {
  font-size: 56px;
  margin-bottom: 16px;
  animation: db-bounce 0.8s ease infinite alternate;
}
@keyframes db-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
.db-celebration-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}
.db-celebration-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
}
.db-celebration-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.db-celebration-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  background: #fafafa;
  border-radius: 12px;
}
.db-celebration-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-accent);
}
.db-celebration-stat-label {
  font-size: 12px;
  color: #9ca3af;
}
.db-celebration-poster-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}
.db-celebration-poster-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(131, 56, 236, 0.35);
}
.db-celebration-continue-btn {
  font-size: 14px;
  color: #9ca3af;
  padding: 8px 16px;
}
.db-btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}

.db-poster-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  text-align: center;
}
.db-poster-preview {
  /* 不用 flex:1（flex-basis:0 会让高度随内容变化），改为固定高度 */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border-radius: 12px;
  background: #f9fafb;
  /* 固定高度（750×1180 海报在 332px 宽下的等比高度），小屏自动收缩，避免生成前后弹窗高度跳动 */
  height: min(522px, calc(90vh - 180px));
}
.db-poster-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--brand-shadow);
}
.db-poster-loading {
  color: #9ca3af;
  font-size: 14px;
  animation: db-poster-pulse 1.2s ease-in-out infinite;
}
@keyframes db-poster-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
.db-poster-actions {
  display: flex;
  gap: 10px;
}
.db-poster-actions .db-btn {
  flex: 1;
}


/* ============ 训练模块统一宽度 + 首页间距优化 ============ */

/* 所有训练模块根容器统一 max-width 920px，和 sp-page（口语思维）对齐 */
.db-content > .sp-page,
.db-content > .reading-syn-root,
.db-content > .lsn-root,
.db-content > .cl-inline,
.db-content > .lfp-inline,
.db-content > .db-home.db-home-v3 {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* 首页单独放宽到 1200px（其他训练页仍保持 920px） */
.db-content > .db-home.db-home-v3 {
  max-width: 1200px;
}

/* 首页模块间距统一 gap */
.db-home.db-home-v3 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.db-card {
  margin-bottom: 0; /* 用 gap 代替单卡 margin */
}

/* 侧边栏折叠 tooltip z-index 提高 */
.db-nav-item-feedback[data-tip]::after,
.db-nav-item[data-tip]::after {
  z-index: 9999;
}
.db-nav-item-feedback[data-tip]::before,
.db-nav-item[data-tip]::before {
  z-index: 9999;
}
/* Dashboard layout 优化 v2 —— 呼吸感、热力图、按钮层级
   对标 julebu.ai 的克制感
   [layout优化] 卡片呼吸感更新
   [layout优化] 热力图样式更新
   [layout优化] 按钮层级更新
*/

/* ========== 卡片内呼吸感 ========== */

/* 卡片基础：padding 20px + gap 16px */
.db-card {
  padding: 20px;
  gap: 16px;
}
.db-card-header {
  margin-bottom: 0;
}
.db-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

/* 打卡卡片：数字与标签层级强化 */
.db-checkin-stats {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 32px;
  padding: 0;
}
.db-checkin-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: none;
  text-align: left;
  padding: 0;
}
.db-checkin-stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: #111827;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.db-checkin-stat-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}
/* 去掉竖线分隔 */
.db-checkin-stat-divider {
  display: none;
}

/* 今日目标：去掉背景块，纯文字+图标 */
.db-today-goal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s ease;
  border: none;
  border-radius: 0;
}
.db-today-goal.achieved {
  background: transparent;
  color: #10b981;
  font-weight: 500;
}
.db-today-goal-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 本周打卡：格子无边框，未完成用浅灰 */
.db-week-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-week-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.db-week-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.db-week-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.db-week-dot {
  width: 100%;
  aspect-ratio: 1;
  max-width: 32px;
  border-radius: 6px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.15s ease;
  border: none;
}
.db-week-dot.checked {
  background: var(--brand-accent);
  color: white;
}
.db-week-dot.today:not(.checked) {
  background: #f3f4f6;
  border: 1px solid #c7dfcd;
}
.db-week-dot.future {
  opacity: 0.4;
}
.db-week-day {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

/* 操作按钮：全部改为文字+箭头幽灵按钮 */
.db-checkin-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 4px;
}
.db-btn-text-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-accent);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.db-btn-text-link:hover {
  color: var(--brand-accent-dark);
}
.db-btn-text-link:hover .db-btn-arrow {
  transform: translateX(2px);
}
.db-btn-text-link .db-btn-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

/* ========== 任务卡片：无边框，间距分组 ========== */

.db-task-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.db-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 8px;
  border-bottom: none;
  transition: background 0.15s ease;
}
.db-task-item:last-child {
  border-bottom: none;
  padding-bottom: 10px;
}
.db-task-item:first-child {
  padding-top: 10px;
}
.db-task-item:hover {
  background: #f9fafb;
}
.db-task-item.completed {
  opacity: 0.6;
}
.db-task-item.completed:hover {
  background: transparent;
}

.db-task-content {
  flex: 1;
  min-width: 0;
}
.db-task-title {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.db-task-desc {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
  font-weight: 400;
  line-height: 1.4;
}

/* 任务 reward badge 调小 */
.db-task-reward-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--brand-accent);
  background: #f5f3ff;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* 去完成：纯文字+箭头 */
.db-task-link-btn {
  padding: 6px 8px;
  margin: -6px -8px;
  border: none;
  background: transparent;
  color: var(--brand-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.db-task-link-btn:hover {
  color: var(--brand-accent-dark);
  background: #faf5ff;
}
.db-task-link-btn:hover .db-btn-arrow {
  transform: translateX(2px);
}
.db-task-link-btn .db-btn-arrow {
  transition: transform 0.15s ease;
}

/* 已完成：绿色 check + 文字 */
.db-task-completed {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #10b981;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 0;
}

/* 任务 section title */
.db-task-section-title {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  text-transform: none;
  letter-spacing: 0;
  padding-top: 16px;
  margin-top: 0;
  border-top: none;
  margin-bottom: 0;
}

/* 任务积分徽章 */
.db-task-score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f5f3ff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-accent);
}

/* ========== 热力图样式优化 ========== */

.db-heatmap-month {
  display: flex;
  align-items: center;
  gap: 6px;
}
.db-heatmap-arrow {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.15s ease;
}
.db-heatmap-arrow:hover {
  background: #f3f4f6;
  color: var(--brand-accent);
}
.db-heatmap-month-text {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  min-width: 72px;
  text-align: center;
}

.db-heatmap-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.db-heatmap-weekdays span {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  padding: 2px 0;
}

.db-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.db-heatmap-cell-wrapper {
  aspect-ratio: 1;
}
.db-heatmap-cell {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  background: #f3f4f6;
  color: transparent;
  border: none;
  transition: transform 0.15s ease, opacity 0.2s ease;
  cursor: pointer;
}
.db-heatmap-cell:hover {
  transform: scale(1.1);
}
.db-heatmap-cell.today {
  box-shadow: 0 0 0 2px var(--brand-accent);
}
.db-heatmap-cell.future {
  opacity: 0.3;
}

/* 热力等级：5级品牌绿渐变（无描边） */
.heat-level-0 { background: rgba(0, 0, 0, 0.06); }
.heat-level-1 { background: #e3efe6; }
.heat-level-2 { background: #c7dfcd; }
.heat-level-3 { background: #9fc9aa; }
.heat-level-4 { background: #6fb387; }
.heat-level-5 { background: var(--brand-accent); }

.heat-level-1, .heat-level-2, .heat-level-3, .heat-level-4, .heat-level-5 {
  color: white;
}

/* 图例 */
.db-heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 8px;
}
.db-heatmap-legend-cells {
  display: flex;
  gap: 2px;
}
.db-heatmap-cell.small {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  cursor: default;
}
.db-heatmap-cell.small:hover {
  transform: none;
}

/* ========== 按钮层级：首屏唯一主按钮 ========== */

/* 快捷入口：两个等宽 */
.db-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.db-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  text-align: left;
  border: 1px solid transparent;
}
.db-quick-btn:hover {
  transform: translateY(-1px);
}

/* 主 CTA：唯一渐变按钮 */
.db-quick-btn-primary {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(131, 56, 236, 0.25);
}
.db-quick-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.35);
}

/* 次级：白底紫边框幽灵按钮 */
.db-quick-btn-secondary {
  background: #fff;
  border: 1px solid var(--brand-accent);
  color: var(--brand-accent);
}
.db-quick-btn-secondary:hover {
  background: #faf5ff;
  box-shadow: 0 4px 14px rgba(131, 56, 236, 0.12);
  border-color: var(--brand-accent-dark);
  color: var(--brand-accent-dark);
}
.db-quick-btn-secondary .db-quick-btn-title {
  color: var(--brand-accent);
}
.db-quick-btn-secondary .db-quick-btn-sub {
  color: rgba(131, 56, 236, 0.7);
}
.db-quick-btn-secondary .db-quick-btn-arrow {
  color: var(--brand-accent);
}

.db-quick-btn-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-quick-btn-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.db-quick-btn-sub {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-quick-btn-arrow {
  flex-shrink: 0;
  opacity: 0.9;
  transition: transform 0.2s ease;
}
.db-quick-btn:hover .db-quick-btn-arrow {
  transform: translateX(2px);
}
.db-quick-btn-primary .db-quick-btn-arrow {
  color: #fff;
}
.db-quick-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.db-quick-btn-secondary .db-quick-icon-wrap {
  background: #f5f3ff;
  color: var(--brand-accent);
}

/* ========== 概览4小卡：浅灰背景无边框 ========== */

.db-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.db-overview-card {
  background: #f9fafb;
  border: none;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.db-overview-card:hover {
  background: #f3f4f6;
}
.db-overview-icon {
  display: flex;
}
.db-overview-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.db-overview-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

/* ========== Tab区：文字+下划线 ========== */
.db-data-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.db-data-tabs::-webkit-scrollbar {
  display: none;
}
.db-data-tab {
  position: relative;
  background: transparent;
  border: none;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.db-data-tab:hover {
  color: #374151;
}
.db-data-tab.active {
  color: var(--brand-accent);
  font-weight: 600;
}
.db-data-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 1px;
}

/* ========== 响应式 ========== */

/* 桌面 ≥1200px：三列布局，热力图格子 14px */
@media (min-width: 1200px) {
  .db-heatmap-cell {
    font-size: 11px;
  }
}

/* 平板 768-1199px：两列布局，热力图格子 13px */
@media (max-width: 1199px) and (min-width: 768px) {
  .db-home-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .db-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .db-course-tab {
    grid-template-columns: 1fr;
  }
  .db-heatmap-cell {
    font-size: 10px;
  }
}

/* 移动端 <768px：单列，热力图格子 12px，按钮全宽 */
@media (max-width: 768px) {
  .db-card {
    padding: 16px;
    gap: 14px;
  }
  .db-home-grid {
    grid-template-columns: 1fr;
  }
  .db-quick-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .db-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .db-overview-card {
    padding: 14px;
  }
  .db-overview-value {
    font-size: 22px;
  }
  .db-bottom-grid {
    grid-template-columns: 1fr;
  }
  .db-data-tabs {
    gap: 18px;
  }
  .db-checkin-stats {
    gap: 24px;
  }
  .db-checkin-stat-num {
    font-size: 24px;
  }
}

/* 动画 */
@keyframes db-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Quieter 优化 —— 顶部横幅降权 + 次级按钮统一幽灵化
   对标 julebu.ai 克制感
   [quieter优化] 顶部横幅降权完成
   [quieter优化] 次级按钮幽灵化完成
   [quieter优化] 横幅关闭记忆功能完成
*/

/* ========== 顶部横幅降权 ========== */

/* 横幅容器：极淡紫背景 + 底部边框 + 40px 高度 */
div[style*="backdrop-filter"][style*="sticky"] {
  /* 使用选择器覆盖内联样式的 banner */
}

/* 通过具体元素匹配 + 高优先级覆盖 */
.perm-banner-wrap {
  position: static;
  width: 100%;
  height: 40px;
  background: #faf5ff !important;
  border-bottom: 1px solid #e3efe6 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px !important;
  backdrop-filter: blur(8px);
  transition: height 0.2s ease-out, opacity 0.2s ease-out;
  overflow: hidden;
}
.perm-banner-wrap.banner-hidden {
  height: 0;
  opacity: 0;
  border-bottom: none !important;
}

/* ========== 横幅占位适配：个人中心布局高度 = 100vh - 横幅高度 ========== */
/* 无横幅时保持原有 100% 高度；有横幅时整体减去 40px，避免整个框架被顶出去滚动 */
.has-perm-banner .db-layout {
  min-height: calc(100vh - 40px);
  height: calc(100vh - 40px);
}
.has-perm-banner .db-sidebar-wrapper {
  height: calc(100vh - 40px);
  top: 40px;
}
.has-perm-banner .db-main {
  height: calc(100vh - 40px);
  overflow-y: auto;
}
/* 课程页根节点是内联 height:100vh，需 !important 覆盖，减去横幅高度 */
body.has-perm-banner .course-page-typeset {
  height: calc(100vh - 40px) !important;
}
/* 横幅关闭瞬间（banner-hidden 高度过渡 0.2s）平滑收起，不跳变 */
body:not(.has-perm-banner) .db-layout,
body:not(.has-perm-banner) .db-sidebar-wrapper,
body:not(.has-perm-banner) .db-main {
  transition: height 0.2s ease-out, min-height 0.2s ease-out;
}

.perm-banner-text {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-banner-text .banner-emphasis {
  color: var(--brand-accent);
  font-weight: 600;
}
.perm-banner-icon {
  width: 16px;
  height: 16px;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.perm-banner-btn {
  height: 32px;
  padding: 0 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: var(--brand-accent) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(131, 56, 236, 0.1);
  letter-spacing: 0 !important;
}
.perm-banner-btn:hover {
  background: var(--brand-accent-dark) !important;
  box-shadow: 0 2px 6px rgba(131, 56, 236, 0.2);
}

.perm-banner-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: transparent !important;
  border: none !important;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 1;
  transition: all 0.15s ease;
}
.perm-banner-close:hover {
  color: #6b7280 !important;
  background: #f3f4f6 !important;
  opacity: 1 !important;
}

/* ========== 通用幽灵按钮规范 ========== */

/* 默认幽灵按钮：白底灰边框 */
.btn-ghost,
.btn-secondary {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-ghost:hover,
.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.btn-ghost:active,
.btn-secondary:active {
  background: #f3f4f6;
}

/* 主色幽灵按钮：白底主色边框 */
.btn-ghost-primary {
  background: #fff;
  border: 1px solid var(--brand-accent);
  color: var(--brand-accent);
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-ghost-primary:hover {
  background: #faf5ff;
  border-color: var(--brand-accent-dark);
  color: var(--brand-accent-dark);
}

/* 小型幽灵按钮 */
.btn-ghost.btn-sm,
.btn-ghost-primary.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* 危险幽灵按钮：红色 */
.btn-ghost-danger {
  background: #fff;
  border: 1px solid #fecaca;
  color: #dc2626;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-ghost-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* 文字+箭头按钮 */
.btn-text-link {
  background: transparent;
  border: none;
  color: var(--brand-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-text-link:hover {
  color: var(--brand-accent-dark);
  background: #faf5ff;
}
.btn-text-link .btn-arrow {
  transition: transform 0.15s ease;
  width: 13px;
  height: 13px;
}
.btn-text-link:hover .btn-arrow {
  transform: translateX(2px);
}

/* 实心主按钮（全页稀缺） */
.btn-primary {
  background: var(--brand-accent);
  border: none;
  color: #fff;
  height: 36px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: var(--brand-shadow);
}
.btn-primary:hover {
  background: var(--brand-accent-dark);
  box-shadow: var(--brand-shadow);
  transform: none;
}
.btn-primary:active {
  transform: none;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ========== 分段控制器 ========== */

.segmented-control {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.segmented-control button {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.segmented-control button:hover {
  color: #374151;
}
.segmented-control button.active {
  background: #fff;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ========== 通用 btn-secondary 幽灵化 ========== */

.btn-secondary {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}
.btn-secondary:hover {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ========== 通用 btn-ghost 标准化 ========== */

.btn-ghost {
  background: transparent !important;
  color: #6b7280 !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}
.btn-ghost:hover {
  background: #f9fafb !important;
  color: #374151 !important;
}

/* ========== 通用 btn-ghost-primary 主色幽灵 ========== */

.btn-ghost-primary {
  background: #fff !important;
  border: 1px solid var(--brand-accent) !important;
  color: var(--brand-accent) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-ghost-primary:hover {
  background: #faf5ff !important;
  border-color: var(--brand-accent-dark) !important;
  color: var(--brand-accent-dark) !important;
}

/* ========== 通用 btn-text-link 文字+箭头 ========== */

.btn-text-link {
  background: transparent !important;
  border: none !important;
  color: var(--brand-accent) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-text-link:hover {
  background: #faf5ff !important;
  color: var(--brand-accent-dark) !important;
}

/* ========== 学习足迹：按钮标准化 ========== */

.lfp-action-btn {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}
.lfp-action-btn:hover {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
  box-shadow: none !important;
}


/* ========== 语块库 Quieter 优化 ========== */
/* [语块库优化] 统计卡片色彩统一完成 */
/* [语块库优化] tooltip移除/整合完成 */
/* [语块库优化] 刷新状态按钮弱化完成 */
/* [语块库优化] 空状态按钮确认完成 */

/* --- 统计卡片：统一极浅灰背景，去掉黄/蓝/绿彩色 --- */
.chunk-lib-stats-bar {
  gap: 12px !important;
}
.chunk-lib-stat-card {
  background: #f9fafb !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 16px !important;
  transition: background 0.15s ease !important;
  background-image: none !important;
}
.chunk-lib-stat-card:hover {
  background: #f3f4f6 !important;
}
.chunk-lib-stat-card.streak,
.chunk-lib-stat-card.cycle,
.chunk-lib-stat-card.today {
  background: #f9fafb !important;
  background-image: none !important;
}
.chunk-lib-stat-num {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  line-height: 1.2 !important;
}
.chunk-lib-stat-card.streak .chunk-lib-stat-num {
  color: var(--brand-accent) !important; /* 连续天数用主色强调 */
}
.chunk-lib-stat-label {
  font-size: 11px !important;
  font-weight: 400 !important;
  color: #9ca3af !important;
  margin-top: 4px !important;
}

/* --- 纯文字按钮（刷新状态等） --- */
.btn-text-plain {
  background: transparent !important;
  border: none !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap;
}
.btn-text-plain:hover {
  color: #374151 !important;
  background: #f9fafb !important;
}

/* --- 空状态按钮区居中对齐 --- */
.chunk-lib-empty-actions-centered {
  justify-content: center !important;
  gap: 12px !important;
}

/* --- 空状态额外提示文字 --- */
.chunk-lib-empty-hint {
  font-size: 12px !important;
  color: #9ca3af !important;
  margin-top: -4px !important;
  margin-bottom: 12px !important;
  line-height: 1.5;
}

/* --- 空状态卡片：图标弱化 --- */
.chunk-lib-empty-icon-wrap {
  background: #faf5ff !important;
  color: #9fc9aa !important;
}
.chunk-lib-empty-icon-wrap svg {
  color: inherit !important;
}

/* --- 空状态按钮文字+箭头加强 --- */
.chunk-lib-empty .btn-text-link {
  font-size: 14px !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
}

/* ========== 语块库按钮幽灵化 ========== */

/* 再巩固一遍：橙色渐变 → 主色幽灵按钮 */
.practice-all-btn {
  background: #fff !important;
  border: 1px solid var(--brand-accent) !important;
  color: var(--brand-accent) !important;
  box-shadow: none !important;
}
.practice-all-btn:hover {
  background: #faf5ff !important;
  box-shadow: none !important;
  transform: none !important;
  border-color: var(--brand-accent-dark) !important;
  color: var(--brand-accent-dark) !important;
}

/* 开始今日复习：主CTA保留，但收敛一点渐变 */
.start-review-btn {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%) !important;
  box-shadow: 0 4px 14px rgba(131, 56, 236, 0.25) !important;
}
.start-review-btn:hover {
  box-shadow: 0 6px 20px rgba(131, 56, 236, 0.35) !important;
}

/* ========== 学习趋势 Tab：分段控制器 ========== */

.db-trend-range {
  display: flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.db-trend-range-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  font-family: inherit;
}
.db-trend-range-btn:hover {
  color: #374151 !important;
  background: transparent;
}
.db-trend-range-btn.active {
  background: #fff !important;
  color: #111827 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ========== 响应式 ========== */

@media (max-width: 768px) {
  .perm-banner-wrap {
    padding: 0 12px !important;
    gap: 10px;
  }
  .perm-banner-text {
    font-size: 12px !important;
  }
  .perm-banner-btn {
    height: 28px;
    padding: 0 12px !important;
    font-size: 12px !important;
  }
}
/* ===== 骨架屏样式 ===== */

/* ---- 动画 ---- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes skeleton-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton-block {
  background: #f3f4f6;
  border-radius: 6px;
  display: inline-block;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  border-radius: 4px;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-rect {
  border-radius: 8px;
}

.skeleton-list {
  width: 100%;
}

/* ---- 卡片骨架通用 ---- */
.skeleton-card {
  pointer-events: none;
}

.skeleton-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.skeleton-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* 打卡卡片骨架 */
.skeleton-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.skeleton-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.skeleton-week-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  justify-items: center;
}
.skeleton-week-dots .skeleton-block {
  border-radius: 8px;
}
.skeleton-btn-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* 任务卡片骨架 */
.skeleton-task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.skeleton-task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 热力图骨架 */
.skeleton-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.skeleton-heatmap-cell {
  aspect-ratio: 1;
  background: #f3f4f6;
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-heatmap-cell.small {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.skeleton-heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.skeleton-heatmap-legend-cells {
  display: flex;
  gap: 4px;
}

/* 快捷入口骨架 */
.skeleton-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  background: #fff;
  pointer-events: none;
}
.skeleton-quick-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 图表骨架 */
.skeleton-chart {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--db-border);
  padding: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8px;
  pointer-events: none;
}
.skeleton-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8px;
  flex: 1;
  height: 100%;
}
.skeleton-bar {
  flex: 1;
  background: #f3f4f6;
  border-radius: 4px 4px 0 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  max-width: 40px;
}

/* 语块卡片骨架 */
.skeleton-chunk-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  pointer-events: none;
}

/* 课程卡片骨架 */
.skeleton-course-card {
  background: #fff;
  border: 1px solid var(--db-border);
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
}
.skeleton-course-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 趋势图加载 */
.db-trend-loading {
  padding: 4px 0;
}
.db-trend-loading .skeleton-chart {
  border: none;
  padding: 0;
  background: transparent;
}

/* 加载超时提示 */
.skeleton-timeout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  margin-top: 8px;
}
.skeleton-timeout-text {
  font-size: 12px;
  color: #9ca3af;
}
.skeleton-timeout-btn-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.skeleton-timeout-btn-wrap .db-btn {
  flex: none;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

/* ---- 课程页骨架屏 ---- */
.course-skeleton .skeleton-block {
  background: #e5e7eb;
}
.course-skeleton-topbar {
  flex-shrink: 0;
}
.course-skeleton-back {
  border-radius: 8px;
}
.course-skeleton-version {
  border-radius: 8px;
}
.course-skeleton-sidebar-item {
  position: relative;
}
.course-skeleton-sidebar-item .skeleton-block {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.course-skeleton-title {
  height: 28px !important;
  border-radius: 6px;
}
.course-skeleton-divider {
  background: #f3f4f6 !important;
  border-radius: 1px;
}
.course-skeleton-highlight-card .skeleton-block {
  background: rgba(124, 58, 237, 0.15);
}
.course-skeleton-btn {
  border-radius: 8px;
}
.course-skeleton-slow-hint {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .course-skeleton-sidebar {
    display: none !important;
  }
  .course-skeleton-content {
    padding: 20px 16px !important;
  }
  .course-skeleton-topbar {
    padding: 12px 16px !important;
  }
}
/* ===== 错误边界样式 ===== */

/* 全屏错误页 */
.error-boundary-full {
  position: fixed;
  inset: 0;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  font-family: inherit;
}

.error-boundary-card-big {
  max-width: 440px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef0f4;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.error-boundary-icon-big {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f4f1ff;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.error-boundary-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.error-boundary-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.error-boundary-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-boundary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.error-boundary-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}
.error-boundary-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.error-boundary-btn-ghost {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.error-boundary-btn-ghost:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.error-boundary-btn-link {
  display: block;
  margin: 16px auto 0;
  background: transparent;
  color: #9ca3af;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
}
.error-boundary-btn-link:hover {
  color: #6b7280;
}

/* 卡片内局部错误 */
.error-boundary-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  min-height: 200px;
}

.error-boundary-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-boundary-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.error-boundary-card-desc {
  font-size: 12px;
  color: #6b7280;
}

.error-boundary-card .db-btn {
  flex: none;
  padding: 6px 14px;
  font-size: 12px;
  margin-top: 4px;
}
/* ==================== 认证登录页 ==================== */
.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3ff 0%, #f0f7ff 50%, #fff5f5 100%);
}

.auth-bg-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: auth-blob-float 12s ease-in-out infinite;
}

.auth-blob-1 {
  width: 400px;
  height: 400px;
  background: #c084fc;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.auth-blob-2 {
  width: 350px;
  height: 350px;
  background: #f472b6;
  bottom: -80px;
  right: -80px;
  animation-delay: -4s;
}

.auth-blob-3 {
  width: 300px;
  height: 300px;
  background: #60a5fa;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -8s;
  opacity: 0.25;
}

@keyframes auth-blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 10px 30px rgba(131, 56, 236, 0.3);
}

.auth-app-name {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px 0;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-app-slogan {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(131, 56, 236, 0.15), 0 4px 20px rgba(0, 0, 0, 0.06);
}

.auth-tabs {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.auth-tab.active {
  background: white;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-error {
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-success {
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-wrapper .auth-input {
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s;
}

.auth-password-toggle:hover {
  color: #6366f1;
}

/* 手机号/邮箱切换 - 文字链接式，与登录/注册Tab风格区分 */
.auth-account-switch-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #6366f1;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  font-family: inherit;
}

.auth-account-switch-link:hover {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-input:focus {
  border-color: #8338EC;
  box-shadow: 0 0 0 4px rgba(131, 56, 236, 0.1);
}

.auth-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 12px;
  color: #1e40af;
  line-height: 1.5;
}

.auth-warn-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-hint-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.2;
}

.auth-hint-text {
  flex: 1;
}

.auth-submit-btn {
  padding: 14px 24px;
  border: none;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  color: white;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(131, 56, 236, 0.3);
  margin-top: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(131, 56, 236, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 8px 0;
}

.auth-forgot-btn {
  border: none;
  background: none;
  color: #8338EC;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}

.auth-forgot-btn:hover {
  text-decoration: underline;
}

.auth-footer-tip {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0 0 0;
}

.auth-link-btn {
  border: none;
  background: none;
  color: #8338EC;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
  font-family: inherit;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-copyright {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 24px;
}

/* ==================== 顶部用户信息栏（通用） ==================== */
.user-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f3f4f6;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.user-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.user-topbar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-topbar-phone {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.user-topbar-status {
  font-size: 11px;
  font-weight: 500;
}

.user-status-active {
  color: #16a34a;
}

.user-status-warning {
  color: #f59e0b;
}

.user-status-expired {
  color: #ef4444;
}

.user-status-pending {
  color: #6b7280;
}

.user-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-topbar-btn {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.user-topbar-btn:hover {
  border-color: #8338EC;
  color: #8338EC;
}

.user-topbar-btn.admin-btn {
  border-color: #8338EC;
  color: #8338EC;
  background: #faf5ff;
  font-weight: 600;
}

.user-topbar-btn.admin-btn:hover {
  background: #8338EC;
  color: white;
}

/* 到期提醒条 */
.expiry-alert-bar {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fcd34d;
  padding: 8px 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  animation: expiry-pulse 2s ease-in-out infinite;
}

@keyframes expiry-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.expiry-alert-bar strong {
  color: #78350f;
}

/* ==================== 管理员后台 ==================== */
.admin-page {
  min-height: 100vh;
  background: #f8fafc;
  padding-bottom: 40px;
}

.admin-header {
  background: linear-gradient(135deg, #8338EC, #6d28d9);
  color: white;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(131, 56, 236, 0.3);
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-logo {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  backdrop-filter: blur(10px);
}

.admin-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.admin-subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  opacity: 0.85;
}

.admin-ghost-btn {
  padding: 8px 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: white;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-ghost-btn:hover {
  background: white;
  color: #8338EC;
}

/* ---------- Admin Tabs ---------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 0 32px;
  max-width: 1200px;
  margin: 0 auto 16px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-tab-btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-tab-btn:hover {
  color: #334155;
}

.admin-tab-btn.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border-left: 4px solid #e5e7eb;
}

.admin-stat-card.admin-stat-active {
  border-left-color: #10b981;
}

.admin-stat-card.admin-stat-pending {
  border-left-color: #f59e0b;
}

.admin-stat-card.admin-stat-warning {
  border-left-color: #ef4444;
}

.admin-stat-card.admin-stat-advanced {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.admin-stat-num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #1f2937, #6b7280);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.admin-stat-active .admin-stat-num {
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-pending .admin-stat-num {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-warning .admin-stat-num {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  max-width: 1200px;
  margin: 0 auto 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 400px;
}

.admin-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.admin-search-input:focus {
  border-color: #8338EC;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}

.admin-search-btn {
  padding: 10px 20px;
  border: none;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-refresh-btn {
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: #6b7280;
}

.admin-refresh-btn:hover {
  border-color: #8338EC;
  color: #8338EC;
}

.admin-table-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.admin-loading, .admin-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 15px;
}

.admin-error {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 32px;
  color: #dc2626;
  font-size: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.admin-table th {
  background: #f9fafb;
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #fafafa;
}

.admin-td-phone {
  font-weight: 600;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.admin-badge-active {
  background: #d1fae5;
  color: #065f46;
}

.admin-badge-pending {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.admin-badge-expired {
  background: #fee2e2;
  color: #991b1b;
}

.admin-badge-disabled {
  background: #e5e7eb;
  color: #4b5563;
}

.admin-badge-advanced {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #5b21b6;
}

.admin-days-normal {
  color: #16a34a;
  font-weight: 600;
}

.admin-days-warning {
  color: #f59e0b;
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #8338EC, #7c3aed);
  color: white;
}

.admin-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(131, 56, 236, 0.4);
}

.admin-btn-success {
  background: #10b981;
  color: white;
}

.admin-btn-success:hover:not(:disabled) {
  background: #059669;
}

.admin-btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.admin-btn-danger:hover:not(:disabled) {
  background: #fecaca;
}

.admin-btn-ghost {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-btn-ghost:hover:not(:disabled) {
  background: #e5e7eb;
  color: #374151;
}

/* 基础版按钮 */
.admin-btn-basic-outline {
  background: white;
  color: #3b82f6;
  border: 1px solid #3b82f6;
}
.admin-btn-basic-outline:hover:not(:disabled) {
  background: #eff6ff;
  color: #2563eb;
}
.admin-btn-basic-active {
  background: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
}
.admin-btn-basic-active:hover:not(:disabled) {
  background: #2563eb;
}

/* 强化版按钮 */
.admin-btn-adv-outline {
  background: white;
  color: #7c3aed;
  border: 1px solid #7c3aed;
}
.admin-btn-adv-outline:hover:not(:disabled) {
  background: #f5f3ff;
  color: #6d28d9;
}
.admin-btn-adv-active {
  background: #7c3aed;
  color: white;
  border: 1px solid #7c3aed;
}
.admin-btn-adv-active:hover:not(:disabled) {
  background: #6d28d9;
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 管理员弹窗 */
.admin-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.admin-dialog {
  background: white;
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: admin-dialog-in 0.25s ease;
}

@keyframes admin-dialog-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 忘记密码弹窗：遮罩淡入 + 卡片回弹 */
@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes authPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-dialog-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-dialog-sub {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  font-family: ui-monospace, monospace;
}

.admin-dialog-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 12px 0 20px 0;
  line-height: 1.6;
}

.admin-duration-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.admin-duration-card {
  padding: 16px 12px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-duration-card:hover {
  border-color: #c4b5fd;
}

.admin-duration-card.active {
  border-color: #8338EC;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}

.admin-duration-days {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 4px;
}

.admin-duration-card.active .admin-duration-days {
  color: #8338EC;
}

.admin-duration-desc {
  font-size: 12px;
  color: #9ca3af;
}

/* 授权类型选择 */
.admin-type-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.admin-type-card {
  padding: 14px 12px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-type-card:hover:not(:disabled) {
  border-color: #c4b5fd;
}

.admin-type-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-type-card.active {
  border-color: #8338EC;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.1);
}

.admin-type-label {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.admin-type-card.active .admin-type-label {
  color: #8338EC;
}

.admin-type-desc {
  font-size: 12px;
  color: #9ca3af;
}

.admin-dialog-hint {
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 12px;
  color: #166534;
  line-height: 1.6;
  margin-bottom: 16px;
}

.admin-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.admin-dialog-actions .admin-btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
  }
  .admin-header {
    padding: 16px;
  }
  .admin-toolbar, .admin-table-wrapper, .admin-error {
    padding-left: 16px;
    padding-right: 16px;
  }
  .admin-table {
    font-size: 12px;
  }
  .admin-table th, .admin-table td {
    padding: 10px 8px;
  }
  .admin-actions {
    flex-direction: column;
  }
}

/* ==== 手动添加用户功能 ==== */
.admin-mode-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #fff7e6 0%, #ffe8cc 100%);
  border-bottom: 1px solid #ffd591;
  font-size: 13px;
  color: #ad6800;
}
.admin-mode-banner strong {
  color: #d46b08;
  font-weight: 700;
  margin: 0 2px;
}
.admin-mode-icon {
  font-size: 18px;
  line-height: 1;
}

.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-add-btn {
  padding: 8px 18px !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(74, 144, 217, 0.25);
}

.admin-form-group {
  margin-bottom: 20px;
}
.admin-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.admin-form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1.5px solid #e0e6ed;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}
.admin-form-input:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.admin-dialog-error {
  padding: 10px 14px;
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* 添加用户弹窗的时长选项包含"不授权"项，调整4列布局 */
.admin-dialog .admin-duration-options {
  grid-template-columns: repeat(4, 1fr);
}

/* AI 调用管理面板 */
.admin-ai-manage-panel {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 32px;
}

.admin-ai-manage-panel > div:first-child {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.admin-ai-manage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06));
  border-bottom: 1px solid #e2e8f0;
}

.admin-ai-manage-body {
  display: flex;
  gap: 24px;
  padding: 16px;
  align-items: stretch;
}

.admin-ai-quota-info {
  flex: 1;
  min-width: 0;
}

.admin-ai-quota-actions {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}

.admin-btn-outline {
  background: white;
  color: #6366f1;
  border: 1px solid #c7d2fe;
}

.admin-btn-outline:hover:not(:disabled) {
  background: #eef2ff;
}

/* AI 统计卡片（5列适配） */
.admin-ai-stats {
  grid-template-columns: repeat(5, 1fr) !important;
}

@media (max-width: 900px) {
  .admin-ai-stats {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .admin-ai-manage-body {
    flex-direction: column;
    gap: 16px;
  }
  .admin-ai-quota-actions {
    width: 100%;
  }
}

/* ==================== 账号类型切换 Tab ==================== */
.auth-account-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.auth-account-type-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.auth-account-type-tab:hover {
  color: #475569;
}
.auth-account-type-tab.active {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
}

/* ================================
   句子拼写 Demo v2（根据提示拼写 + 语法 + 发音 + 音效）
   ================================ */
.home-the1-spelling-demo {
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: 0.35s;
}
.home-the1-spelling-demo.in {
  opacity: 1;
  transform: translateY(0);
}

.spd-container {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  padding: 24px 32px 20px;
  box-shadow:
    0 20px 60px rgba(131, 56, 236, 0.10),
    0 4px 16px rgba(0, 0, 0, 0.04);
  border: 2px solid rgba(131, 56, 236, 0.08);
  cursor: text;
  user-select: none;
  overflow: visible;
  scroll-behavior: auto;
}
.spd-container.spd-shake {
  animation: spdShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes spdShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

/* ===== 顶部栏 ===== */
.spd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.spd-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.spd-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.spd-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 140px;
}
.spd-progress-track {
  flex: 1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 99px;
  overflow: hidden;
}
.spd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8338EC, #FF4D6D);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1);
}
.spd-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: #8338EC;
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: right;
  flex-shrink: 0;
}

/* 连击 */
.spd-combo {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff7ed, #fef3ff);
  padding: 4px 12px;
  border-radius: 99px;
  animation: spdComboPop 0.4s cubic-bezier(.34,1.56,.64,1) both;
  flex-shrink: 0;
}
@keyframes spdComboPop {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}
.spd-combo-fire {
  font-size: 16px;
  animation: spdFireFlicker 0.5s ease-in-out infinite alternate;
}
@keyframes spdFireFlicker {
  from { transform: scale(1); }
  to { transform: scale(1.15) rotate(-5deg); }
}
.spd-combo-text {
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* 圆形 icon 按钮 */
.spd-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f9fafb;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.spd-icon-btn:hover {
  background: #f3f4f6;
  transform: scale(1.08);
}
/* 按钮上的小键盘角标：暗示有快捷键可看 */
.spd-icon-btn .spd-btn-kbd-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8338ec;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.spd-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: linear-gradient(135deg, #fdf4ff, #fef2f2);
  padding: 6px 14px;
  border-radius: 99px;
  flex-shrink: 0;
}
.spd-score-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.spd-score-num {
  font-size: 18px;
  font-weight: 800;
  color: #8338EC;
  font-variant-numeric: tabular-nums;
}

/* ===== 错句来源标签 ===== */
.spd-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin: 0 auto 8px;
  justify-content: center;
  width: fit-content;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.spd-source-tag .spd-source-icon {
  font-size: 12px;
  font-style: normal;
}
/* error_correction：淡紫色 — 来自造句/输出训练 */
.spd-source-error_correction {
  background: #f4f1ff;
  color: #7c3aed;
}
/* spelling_miss：淡橙色 — 上次拼错的句子 */
.spd-source-spelling_miss {
  background: #fff4e6;
  color: #d97706;
}
/* weak_point：淡蓝绿色 — 针对薄弱点 */
.spd-source-weak_point {
  background: #ecfdf5;
  color: #059669;
}

/* ===== 错句回炉小角标（header 内） ===== */
.spd-error-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 99px;
  font-size: 12px;
  color: #ea580c;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: help;
  animation: spdHintIn 0.4s ease both;
  user-select: none;
}
.spd-error-badge-icon {
  font-size: 13px;
  font-weight: 700;
}
.spd-error-badge:hover {
  background: #ffedd5;
  border-color: #fdba74;
}
@keyframes spdHintIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 中文句子 ===== */
.spd-chinese {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  word-break: break-word;
  min-height: 28px;
}

/* ===== 单词卡片行 ===== */
.spd-words-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  min-height: 120px;
  /* 顶部预留空间：徽章奇偶双行错开（even 行 -34px）+ 当前卡上浮(-3px)，不足会被 overflow-y:hidden 裁掉；
     水平同理给首尾徽章留出余量 */
  padding: 42px 12px 12px;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.spd-words-row::-webkit-scrollbar {
  height: 4px;
}
.spd-words-row::-webkit-scrollbar-track {
  background: transparent;
}
.spd-words-row::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 99px;
}
.spd-words-row::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
/* 单词卡片行整体居中：首尾卡片各自吸收一半剩余空隙。
   内容溢出时 auto 外边距自动归零，退化为左对齐并保留横向滚动，不会出现左侧被裁掉无法滚动的问题 */
.spd-words-row > :first-child {
  margin-left: auto;
}
.spd-words-row > :last-child {
  margin-right: auto;
}
/* 单词数少时居中 */
.spd-words-row.spd-words-center {
  justify-content: center;
}
.spd-word-card {
  position: relative;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px 8px 6px;
  min-width: 60px;
  width: auto;
  max-width: 140px;
  height: 104px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1),
              box-shadow 0.25s ease,
              background-color 0.25s ease,
              border-color 0.25s ease;
  animation: spdWordIn 0.4s cubic-bezier(.4,0,.2,1) both;
  cursor: help;
  box-sizing: border-box;
}
@keyframes spdWordIn {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.spd-word-card:nth-child(1) { animation-delay: 0.04s; }
.spd-word-card:nth-child(2) { animation-delay: 0.08s; }
.spd-word-card:nth-child(3) { animation-delay: 0.12s; }
.spd-word-card:nth-child(4) { animation-delay: 0.16s; }
.spd-word-card:nth-child(5) { animation-delay: 0.20s; }
.spd-word-card:nth-child(6) { animation-delay: 0.24s; }
.spd-word-card:nth-child(7) { animation-delay: 0.28s; }
.spd-word-card:nth-child(8) { animation-delay: 0.32s; }
.spd-word-card:nth-child(9) { animation-delay: 0.36s; }
.spd-word-card:nth-child(10) { animation-delay: 0.40s; }

.spd-word-ipa {
  font-size: 11px;
  color: #9ca3af;
  font-family: 'Inter', system-ui, sans-serif;
  margin-bottom: 4px;
  margin-top: 1px;
  line-height: 1.2;
  min-height: 14px;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 音标找不到时的回退显示：显示单词本身（灰色小字）*/
.spd-word-ipa.spd-word-ipa-fallback {
  color: #d1d5db;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.01em;
}
.spd-word-text {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.2;
  margin-bottom: 3px;
  margin-top: 2px;
  min-height: 24px;
  width: 100%;
  text-align: center;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 长单词自动缩小字号 */
.spd-word-card.spd-word-long .spd-word-text {
  font-size: 16px;
  letter-spacing: 0;
}
.spd-word-card.spd-word-xlong .spd-word-text {
  font-size: 14px;
  letter-spacing: 0;
}
.spd-word-zh {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.25;
  margin-bottom: 2px;
  min-height: 14px;
  max-height: 28px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.spd-word-pos {
  font-size: 11px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 10px;
  border-radius: 99px;
  display: inline-block;
  line-height: 1.5;
}

/* 单词卡片底部进度横线 */
.spd-word-card::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #e5e7eb;
  transition: background 0.25s ease, width 0.25s ease;
}
.spd-word-card.spd-word-done::after {
  background: #10b981;
  width: 36px;
}
.spd-word-card.spd-word-current::after {
  background: #6366f1;
  width: 36px;
}
.spd-word-card.spd-word-wrong::after {
  background: #ef4444;
  width: 36px;
}

/* 语法成分标签（卡片顶部小胶囊） */
.spd-grammar-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
  z-index: 3;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
/* 长语法名（如"非限制性定语从句（as）"约130px宽）超出卡片间距(约80px)，
   相邻徽章会互相叠压——奇偶两行错开显示 */
.spd-word-card:nth-child(even) .spd-grammar-tag {
  top: -34px;
}
/* 单词行超宽滚动时，首尾卡片贴着滚动边界，徽章居中悬挂会超出边界被裁——改为向行内伸展 */
.spd-words-row:not(.spd-words-center) > .spd-word-card:first-child .spd-grammar-tag {
  left: -6px;
  transform: none;
}
.spd-words-row:not(.spd-words-center) > .spd-word-card:last-child .spd-grammar-tag {
  left: auto;
  right: -6px;
  transform: none;
}

/* 火苗动画 */
.spd-fire-anim {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  pointer-events: none;
  z-index: 10;
  animation: spdFireFloat 0.85s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes spdFireFloat {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(0.5); }
  25% { opacity: 1; transform: translateX(-50%) translateY(-12px) scale(1.3); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-56px) scale(0.8); }
}

/* 当前输入中 */
.spd-word-card.spd-word-current {
  background: #eef2ff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.10), 0 10px 28px rgba(79, 70, 229, 0.18);
  transform: translateY(-3px) scale(1.08);
  z-index: 2;
}
.spd-word-card.spd-word-current .spd-word-text {
  color: #4338ca;
}
.spd-word-card.spd-word-current .spd-word-ipa { color: #818cf8; }
.spd-word-card.spd-word-current .spd-word-zh,
.spd-word-card.spd-word-current .spd-word-pos { opacity: 0.6; }
.spd-word-cursor {
  position: absolute;
  top: calc(50% - 4px);
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spd-cursor-blink {
  display: inline-block;
  width: 3px;
  height: 30px;
  background: #4f46e5;
  border-radius: 2px;
  animation: spdCursorBlink 1.1s step-end infinite;
}
@keyframes spdCursorBlink {
  50% { opacity: 0; }
}

/* 显示答案时的幽灵文字（未开始的词） */
.spd-word-text.spd-word-ghost {
  opacity: 0.2;
  color: #9ca3af;
  font-weight: 500;
}

/* 已完成 */
.spd-word-card.spd-word-done {
  background: #ecfdf5;
  border-color: #10b981;
  transform: scale(0.95);
}
.spd-word-card.spd-word-done .spd-word-text { color: #059669; }
.spd-word-card.spd-word-done .spd-word-ipa { color: #34d399; }
.spd-word-card.spd-word-done .spd-word-zh { color: #059669; }
.spd-word-card.spd-word-done .spd-word-pos {
  background: #d1fae5;
  color: #047857;
}

/* 错误 */
.spd-word-card.spd-word-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  animation: spdWrongShake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes spdWrongShake {
  10%, 90% { transform: translateX(-3px); }
  20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.spd-word-card.spd-word-wrong .spd-word-text { color: #dc2626; }

/* 朗读高亮 */
.spd-word-card.spd-word-speaking {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 8px 24px rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  background: #fffbeb;
}

/* 语法高亮（hover 同组成员） */
.spd-word-card.spd-word-grammar-hl {
  border-color: var(--grammar-color, #8338EC);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--grammar-color, #8338EC) 18%, transparent);
}

/* 隐藏输入框（保持在可视区域内，防止 focus 滚动） */
.spd-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  left: 50%;
  top: 50%;
}

/* 底部提示文字 */
.spd-hint {
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
  margin-top: 4px;
  font-weight: 500;
}
.spd-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  margin: 0 2px;
}

/* 底部快捷键条 */
.spd-shortcuts-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 8px;
  padding: 8px 14px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  font-size: 11px;
  color: #6b7280;
  user-select: none;
  line-height: 1.6;
}
.spd-shortcut-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.spd-shortcuts-bar kbd {
  display: inline-block;
  padding: 1px 5px;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}
.spd-shortcut-divider {
  color: #d1d5db;
  font-weight: 700;
}

/* ===== 语法气泡 ===== */
.spd-grammar-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  background: #fff;
  border-radius: 18px;
  padding: 14px 18px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  min-width: 260px;
  max-width: 340px;
  z-index: 100;
  pointer-events: none;
  animation: spdTipIn 0.2s ease both;
  border: 1px solid rgba(0,0,0,0.04);
}
@keyframes spdTipIn {
  from { opacity: 0; transform: translate(-50%, calc(-90% - 12px)); }
  to { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
}
.spd-grammar-tooltip::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.spd-grammar-tip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.spd-grammar-tip-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.spd-grammar-tip-name {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}
.spd-grammar-tip-en {
  margin-left: auto;
  font-size: 14px;
  font-style: italic;
  color: #9ca3af;
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
}
.spd-grammar-tip-desc {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}

/* ===== 底部三个操作按钮 ===== */
.spd-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-top: 20px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.spd-bottom-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
  color: #6b7280;
  font-size: 14px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.spd-bottom-btn:hover { color: #4f46e5; }
.spd-bottom-btn:hover .spd-btn-keys kbd {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}
.spd-bottom-btn:active { transform: scale(0.97); }
.spd-bottom-btn.spd-btn-speaking {
  color: #7c3aed;
  pointer-events: none;
}
.spd-bottom-btn.spd-btn-speaking .spd-btn-keys kbd {
  border-color: #c4b5fd;
  background: #ede9fe;
  color: #7c3aed;
}
.spd-bottom-btn.spd-btn-speaking .spd-btn-label {
  animation: spd-speaking-pulse 1.2s ease-in-out infinite;
}
@keyframes spd-speaking-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.spd-btn-keys {
  display: flex;
  align-items: center;
  gap: 4px;
}
.spd-btn-keys kbd {
  display: inline-block;
  padding: 5px 11px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: #6b7280;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 22px;
  text-align: center;
  line-height: 1.2;
}
.spd-btn-label {
  font-weight: 500;
  font-size: 14px;
}

/* ===== 句子完成总结 ===== */
.spd-complete-view {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: spdFadeIn 0.4s ease both;
}
@keyframes spdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.spd-complete-inner {
  text-align: center;
  padding: 24px;
  animation: spdCompleteSlide 0.55s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes spdCompleteSlide {
  0% { opacity: 0; transform: translateY(24px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.spd-complete-title {
  font-size: 64px;
  font-weight: 900;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}
.spd-complete-sentence {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
}
.spd-complete-stats {
  font-size: 16px;
  color: #9ca3af;
  margin: 0 0 28px;
  font-weight: 500;
}
.spd-complete-stats kbd {
  display: inline-block;
  padding: 3px 10px;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #6b7280;
  margin: 0 3px;
  font-weight: 600;
}
.spd-next-btn {
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: #fff;
  border: none;
  padding: 18px 56px;
  border-radius: 99px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}
.spd-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(79, 70, 229, 0.45);
}
.spd-next-btn:active { transform: translateY(0); }

/* ===== 引导注册卡 ===== */
.spd-upsell-container {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spd-upsell-card {
  text-align: center;
  padding: 8px 16px;
}
.spd-upsell-emoji {
  font-size: 60px;
  margin-bottom: 8px;
  animation: spdPerfectPop 0.6s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes spdPerfectPop {
  0% { opacity: 0; transform: scale(0.5); }
  60% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.spd-upsell-title {
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(135deg, #8338EC, #FF4D6D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 10px;
}
.spd-upsell-sub {
  font-size: 16px;
  color: #4b5563;
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 16px;
}
.spd-upsell-sub strong {
  color: #8338EC;
  font-weight: 700;
}
.spd-upsell-score {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 24px;
}
.spd-upsell-score span {
  font-size: 26px;
  font-weight: 800;
  color: #f59e0b;
  margin: 0 4px;
}
.spd-upsell-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.spd-upsell-btn {
  padding: 14px 28px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.spd-upsell-btn-primary {
  background: linear-gradient(135deg, #8338EC, #6366F1);
  color: #fff;
  box-shadow: 0 8px 24px rgba(131, 56, 236, 0.35);
}
.spd-upsell-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(131, 56, 236, 0.45);
}
.spd-upsell-btn-secondary {
  background: #fff;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}
.spd-upsell-btn-secondary:hover {
  border-color: #8338EC;
  color: #8338EC;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .home-the1-spelling-demo { max-width: 100%; margin-top: 4px; }
  .spd-container { padding: 18px 14px 14px; border-radius: 20px; }
  .spd-header { margin-bottom: 12px; gap: 8px; }
  .spd-header-left { gap: 8px; }
  .spd-progress-wrap { gap: 6px; min-width: auto; }
  .spd-progress-text { font-size: 11px; min-width: 36px; }
  .spd-combo { padding: 3px 8px; }
  .spd-combo-text { font-size: 11px; }
  .spd-combo-fire { font-size: 13px; }
  .spd-icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .spd-score { padding: 4px 10px; }
  .spd-score-label { font-size: 10px; }
  .spd-score-num { font-size: 15px; }
  .spd-chinese { font-size: 17px; margin-bottom: 12px; }
  .spd-words-row { gap: 8px; min-height: 100px; padding: 38px 10px 6px; }
  .spd-word-card { padding: 8px 6px 6px; min-width: 60px; width: 60px; height: 96px; border-radius: 14px; }
  .spd-word-ipa { font-size: 9.5px; margin-bottom: 3px; min-height: 13px; }
  .spd-word-text { font-size: 18px; margin-bottom: 3px; min-height: 22px; }
  .spd-word-zh { font-size: 11px; margin-bottom: 2px; }
  .spd-word-pos { font-size: 10px; padding: 1px 7px; }
  .spd-word-card::after { bottom: 6px; width: 22px; height: 2px; }
  .spd-word-card.spd-word-done::after,
  .spd-word-card.spd-word-current::after,
  .spd-word-card.spd-word-wrong::after { width: 28px; }
  .spd-grammar-tag { font-size: 9px; padding: 1px 7px; top: -8px; }
  .spd-cursor-blink { height: 22px; width: 2px; }
  .spd-fire-anim { font-size: 20px; top: -14px; }
  .spd-grammar-tooltip { min-width: 200px; max-width: 260px; padding: 12px 14px; }
  .spd-grammar-tip-name { font-size: 16px; }
  .spd-grammar-tip-desc { font-size: 13px; line-height: 1.6; }
  .spd-bottom-bar { gap: 18px; margin-top: 14px; }
  .spd-bottom-btn { gap: 6px; font-size: 13px; }
  .spd-btn-keys kbd { padding: 4px 8px; font-size: 12px; }
  .spd-shortcuts-bar { padding: 6px 10px; font-size: 10px; gap: 4px; margin: 10px 0 6px; }
  .spd-complete-title { font-size: 44px; }
  .spd-complete-sentence { font-size: 19px; }
  .spd-complete-stats { font-size: 14px; }
  .spd-next-btn { padding: 14px 40px; font-size: 16px; }
  .spd-upsell-title { font-size: 28px; }
  .spd-upsell-sub { font-size: 14px; }
  .spd-upsell-btn { padding: 12px 22px; font-size: 14px; }
  .spd-hint { font-size: 12px; }
}

@media (max-width: 480px) {
  .spd-word-card { min-width: 50px; width: 50px; height: 80px; padding: 6px 4px 5px; border-radius: 12px; }
  .spd-word-card::after { bottom: 4px; width: 18px; height: 2px; }
  .spd-word-card.spd-word-done::after,
  .spd-word-card.spd-word-current::after,
  .spd-word-card.spd-word-wrong::after { width: 22px; }
  .spd-word-ipa { display: none; }
  .spd-word-text { font-size: 16px; min-height: 20px; }
  .spd-word-zh { font-size: 10px; }
  .spd-word-pos { font-size: 9px; padding: 1px 5px; }
  .spd-cursor-blink { height: 18px; }
  .spd-combo-text { display: none; }
  .spd-combo { padding: 3px 6px; }
  .spd-bottom-bar { gap: 12px; }
  .spd-bottom-btn { font-size: 12px; gap: 4px; }
  .spd-btn-keys kbd { padding: 3px 7px; font-size: 11px; }
  .spd-grammar-tag { display: none; }
  .spd-chinese { font-size: 15px; }
}

/* ========== 拼写挑战小节（课程内） ========== */
.spelling-challenge-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.section-header-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-kicker {
  font-size: 14px;
  font-weight: 600;
  color: #8338EC;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title-xl {
  font-size: 36px;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0;
}

.section-subtitle-lg {
  font-size: 16px;
  color: #6B7280;
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
}

.spc-demo-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.spd-course-container {
  max-width: 900px;
  width: 100%;
}

.spc-tip-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #F3E8FF;
  border-radius: 10px;
  font-size: 13px;
  color: #6B21A8;
  flex-wrap: wrap;
  justify-content: center;
}

.spc-tip-bar kbd {
  display: inline-block;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid #E9D5FF;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  color: #8338EC;
  font-weight: 500;
}

/* ========== 拼写挑战完成总结 ========== */
.spelling-challenge-summary {
  display: flex;
  justify-content: center;
  width: 100%;
}

.spc-complete-card {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(135deg, #ffffff 0%, #F3E8FF 100%);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 12px 40px rgba(131, 56, 236, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.spc-complete-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 🎉 完成标题区 */
.spc-complete-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.spc-complete-headline {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.spc-complete-emoji {
  font-size: 56px;
  line-height: 1;
  animation: spc-bounce 1s ease-in-out infinite;
}

@keyframes spc-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.spc-complete-sub {
  font-size: 15px;
  color: #6B7280;
  margin: 0;
  line-height: 1.6;
}

.spc-stats-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-radius: 16px;
  padding: 20px 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.spc-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.spc-stat-divider {
  width: 1px;
  background: #E5E7EB;
  margin: 8px 0;
}

.spc-stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.spc-stat-label {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 500;
}

.spc-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.spc-btn {
  flex: 1;
  min-width: 180px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.spc-btn-primary {
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(131, 56, 236, 0.3);
}

.spc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(131, 56, 236, 0.4);
}

.spc-btn-secondary {
  background: #fff;
  color: #8338EC;
  border: 2px solid #8338EC;
}

.spc-btn-secondary:hover {
  background: #F3E8FF;
}

.spc-btn-done {
  background: #ECFDF5;
  color: #059669;
  border-color: #10B981;
  cursor: default;
}

.spc-btn-done:hover {
  background: #ECFDF5;
  transform: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .section-title-xl { font-size: 26px; }
  .section-subtitle-lg { font-size: 14px; }
  .spc-complete-card { padding: 32px 20px; }
  .spc-complete-title { font-size: 26px; }
  .spc-complete-emoji { font-size: 48px; }
  .spc-stats-row { flex-wrap: wrap; gap: 0; padding: 12px; }
  .spc-stat-item { flex: 0 0 50%; padding: 12px 8px; }
  .spc-stat-divider { display: none; }
  .spc-stat-num { font-size: 22px; }
  .spc-actions { flex-direction: column; }
  .spc-btn { width: 100%; }
  .spc-tip-bar { font-size: 12px; padding: 10px 14px; }
}

/* ==========================================================================
   P0 优化：单句完成视图 + 结算页升级
   ========================================================================== */

/* ---- 单句完成视图优化 ---- */
.spd-complete-en {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 10px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
}

.spd-complete-en-word {
  display: inline-block;
  transition: all 0.2s ease;
  padding: 2px 4px;
  border-radius: 4px;
}

.spd-complete-en-word.speaking {
  color: #7c3aed;
  background: #ede9fe;
  transform: translateY(-2px);
  font-weight: 700;
}

.spd-complete-zh {
  font-size: 17px;
  color: #6b7280;
  margin: 0 0 16px;
  font-weight: 500;
}

.spd-complete-speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #f4f1ff;
  color: #7c3aed;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.spd-complete-speak-btn:hover {
  background: #ede9fe;
}

.spd-complete-speak-btn.playing {
  background: #7c3aed;
  color: #fff;
  animation: spd-pulse 1.5s ease-in-out infinite;
}

@keyframes spd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.spd-complete-stats {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 6px;
  font-weight: 500;
}

.spd-complete-hint {
  font-size: 12px;
  color: #d1d5db;
  margin-bottom: 12px;
  font-weight: 400;
}

.spd-complete-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-bottom-width: 2px;
  border-radius: 6px;
  font-size: 11px;
  font-family: inherit;
  color: #9ca3af;
  margin: 0 2px;
  font-weight: 600;
}

/* ---- 结算页等级徽章 ---- */
.spc-grade-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
  margin-bottom: -8px;
}

.spc-grade-label {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  font-family: Georgia, serif;
}

.spc-grade-text {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  opacity: 0.9;
}

/* ---- 结算页标题 ---- */
.spelling-challenge-summary .spc-complete-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  color: #111827 !important;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* ---- 结算页统计 ---- */
.spc-stats-row .spc-stat-num {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.02em;
}

.spc-stats-row .spc-stat-label {
  font-size: 12px !important;
  color: #9ca3af !important;
  font-weight: 400 !important;
}

/* ---- 结算页 Enter 提示 ---- */
.spc-complete-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}

.spc-complete-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-bottom-width: 2px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  font-family: inherit;
  margin: 0 2px;
}

/* 结算卡片背景更简洁 */
.spc-complete-card {
  background: #ffffff !important;
  border: 1px solid #eef0f4 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  gap: 16px !important;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .spd-complete-title { font-size: 44px; }
  .spd-complete-en { font-size: 16px; }
  .spd-complete-zh { font-size: 15px; }
  .spc-grade-badge { width: 64px; height: 64px; }
  .spc-grade-label { font-size: 28px; }
  .spelling-challenge-summary .spc-complete-title { font-size: 18px !important; }
}
/* 内容报错弹窗样式 */

.cer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: cerFadeIn 0.2s ease;
  padding: 16px;
}

@keyframes cerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cer-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: cerScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  padding: 28px 24px 20px;
}

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

.cer-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f7;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

.cer-modal-close:hover {
  background: #e8e8eb;
}

.cer-modal-close:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cer-modal-header {
  margin-bottom: 20px;
}

.cer-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.cer-modal-subtitle {
  font-size: 13px;
  color: #888;
  margin: 0;
  line-height: 1.5;
}

/* 问题类型 */
.cer-types-section {
  margin-bottom: 22px;
}

.cer-types-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.cer-types-hint {
  font-weight: 400;
  color: #999;
  font-size: 12px;
  margin-left: 4px;
}

.cer-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cer-type-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid #e8e8ed;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  font-family: inherit;
}

.cer-type-card:hover:not(:disabled) {
  border-color: #b8a9e8;
  background: #faf8ff;
}

.cer-type-card.selected {
  border-color: #6d5bd0;
  background: #f3f0ff;
}

.cer-type-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cer-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f0f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #666;
}

.cer-type-card.selected .cer-type-icon {
  background: #e8e3ff;
  color: #6d5bd0;
}

.cer-type-text {
  flex: 1;
  min-width: 0;
}

.cer-type-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.cer-type-desc {
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.cer-type-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6d5bd0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* 补充说明 */
.cer-remark-section {
  margin-bottom: 22px;
}

.cer-remark-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.cer-remark-optional {
  font-weight: 400;
  color: #999;
  font-size: 12px;
  margin-left: 4px;
}

.cer-remark-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e8e8ed;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
  color: #333;
}

.cer-remark-input:focus {
  outline: none;
  border-color: #6d5bd0;
}

.cer-remark-input::placeholder {
  color: #bbb;
}

.cer-remark-input:disabled {
  background: #f7f7fa;
  cursor: not-allowed;
}

.cer-remark-count {
  text-align: right;
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
}

/* 图片上传 */
.cer-image-upload-section {
  margin-top: 12px;
}

.cer-image-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cer-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8ed;
  background: #f7f7fa;
  flex-shrink: 0;
}

.cer-image-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cer-image-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff5c5c;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s ease;
}

.cer-image-thumb-remove:hover:not(:disabled) {
  transform: scale(1.1);
}

.cer-image-thumb-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cer-image-uploader {
  width: 72px;
  height: 72px;
  border: 1.5px dashed #d0c7e8;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #faf8ff;
  transition: all 0.2s ease;
  flex-shrink: 0;
  gap: 2px;
}

.cer-image-uploader:hover {
  border-color: #6d5bd0;
  background: #f3f0ff;
}

.cer-image-uploader.dragover {
  border-color: #6d5bd0;
  background: #e8e3ff;
  border-style: solid;
}

.cer-image-uploader-icon {
  font-size: 20px;
  color: #6d5bd0;
  line-height: 1;
}

.cer-image-uploader-text {
  font-size: 10px;
  color: #6d5bd0;
  font-weight: 500;
  line-height: 1.2;
}

.cer-image-uploader-hint {
  display: none;
}

.cer-image-uploader-large {
  width: 100%;
  height: 100px;
  border-radius: 10px;
  gap: 6px;
}

.cer-image-uploader-large .cer-image-uploader-icon {
  font-size: 24px;
}

.cer-image-uploader-large .cer-image-uploader-text {
  font-size: 13px;
  font-weight: 600;
}

.cer-image-uploader-large .cer-image-uploader-hint {
  display: block;
  font-size: 11px;
  color: #a09ac0;
  line-height: 1.4;
}

/* 底部按钮 */
.cer-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cer-btn {
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}

.cer-btn-ghost {
  background: #f0f0f5;
  color: #555;
}

.cer-btn-ghost:hover:not(:disabled) {
  background: #e5e5eb;
}

.cer-btn-primary {
  background: linear-gradient(135deg, #7c6edb 0%, #6d5bd0 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 91, 208, 0.3);
}

.cer-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(109, 91, 208, 0.4);
}

.cer-btn-primary.disabled,
.cer-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cer-btn:disabled {
  cursor: not-allowed;
}

/* Toast */
.cer-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.cer-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 响应式 */
@media (max-width: 480px) {
  .cer-modal {
    max-width: 100%;
    padding: 24px 18px 16px;
    border-radius: 14px;
  }

  .cer-types-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cer-type-card {
    padding: 10px;
  }

  .cer-type-icon {
    width: 32px;
    height: 32px;
  }

  .cer-modal-footer {
    gap: 8px;
  }

  .cer-btn {
    padding: 10px 18px;
    font-size: 13px;
  }
}
/* AI 语块推荐组件样式 */

.ai-chunk-section {
  margin-top: 20px;
  background: linear-gradient(135deg, #faf8ff 0%, #f5f3ff 100%);
  border: 1.5px solid #e8e3ff;
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.ai-chunk-section::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(109, 91, 208, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-chunk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.ai-chunk-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chunk-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6d5bd0 0%, #8b7ce0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(109, 91, 208, 0.3);
}

.ai-chunk-title {
  font-size: 16px;
  font-weight: 700;
  color: #2d2a4a;
  margin: 0;
  line-height: 1.3;
}

.ai-chunk-subtitle {
  font-size: 12px;
  color: #8a84a8;
  margin-top: 2px;
  font-weight: 400;
}

.ai-chunk-gen-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6d5bd0 0%, #8b7ce0 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 91, 208, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.ai-chunk-gen-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(109, 91, 208, 0.4);
}

.ai-chunk-gen-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 未生成状态 - 空态 */
.ai-chunk-empty {
  text-align: center;
  padding: 24px 20px;
  color: #8a84a8;
  font-size: 13px;
  line-height: 1.6;
}

.ai-chunk-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.ai-chunk-empty strong {
  display: block;
  color: #4a4568;
  font-size: 14px;
  margin-bottom: 4px;
}

/* 加载状态 */
.ai-chunk-loading {
  text-align: center;
  padding: 32px 20px;
}

.ai-chunk-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e3ff;
  border-top-color: #6d5bd0;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: aiChunkSpin 0.8s linear infinite;
}

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

.ai-chunk-loading-text {
  font-size: 14px;
  color: #4a4568;
  font-weight: 600;
  margin-bottom: 6px;
}

.ai-chunk-loading-hint {
  font-size: 12px;
  color: #a09ac0;
}

/* 错误状态 */
.ai-chunk-error {
  text-align: center;
  padding: 20px;
  background: #fff5f5;
  border-radius: 10px;
  border: 1px solid #ffd9d9;
}

.ai-chunk-error-text {
  color: #d64545;
  font-size: 13px;
  margin-bottom: 12px;
}

.ai-chunk-error-btn {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: #fff;
  color: #d64545;
  border: 1px solid #ffd9d9;
  cursor: pointer;
  font-family: inherit;
}

.ai-chunk-error-btn:hover {
  background: #fff5f5;
}

/* 语块分类标题行 */
.ai-chunk-category {
  margin-bottom: 16px;
}

.ai-chunk-category:last-child {
  margin-bottom: 0;
}

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

.ai-chunk-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.ai-chunk-category-tag.topic_vocab {
  background: #eef1ff;
  color: #4a63d8;
}

.ai-chunk-category-tag.linkers {
  background: #eef8f2;
  color: #2ea04d;
}

.ai-chunk-category-tag.argument_patterns {
  background: #fff3e6;
  color: #d97706;
}

.ai-chunk-category-tag.opening_closing {
  background: #f3e8ff;
  color: #9333ea;
}

.ai-chunk-category-tag.spoken_linkers {
  background: #eef8f2;
  color: #2ea04d;
}

.ai-chunk-category-tag.idiomatic {
  background: #ffe4ec;
  color: #db2777;
}

.ai-chunk-category-tag.part2_patterns {
  background: #fff3e6;
  color: #d97706;
}

.ai-chunk-category-tag.part3_patterns {
  background: #e0f2fe;
  color: #0284c7;
}

.ai-chunk-category-count {
  font-size: 11px;
  color: #a09ac0;
  font-weight: 400;
}

/* 语块卡片 */
.ai-chunk-card {
  background: #fff;
  border: 1px solid #e8e5f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.ai-chunk-card:hover {
  border-color: #c4b8f0;
  box-shadow: 0 2px 8px rgba(109, 91, 208, 0.08);
}

.ai-chunk-card.saved {
  border-color: #86c999;
  background: #f5faf6;
}

.ai-chunk-card-body {
  flex: 1;
  min-width: 0;
}

.ai-chunk-expression {
  font-size: 14px;
  font-weight: 700;
  color: #2d2a4a;
  margin-bottom: 3px;
  line-height: 1.4;
}

.ai-chunk-meaning {
  font-size: 12px;
  color: #6d6794;
  margin-bottom: 6px;
  line-height: 1.5;
}

.ai-chunk-example {
  font-size: 11.5px;
  color: #a09ac0;
  line-height: 1.5;
  font-style: italic;
  padding: 6px 10px;
  background: #f7f5fc;
  border-radius: 6px;
  border-left: 2px solid #d0c7f0;
}

.ai-chunk-save-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #d0c7f0;
  background: #fff;
  color: #6d5bd0;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1.3;
}

.ai-chunk-save-btn:hover:not(:disabled) {
  background: #6d5bd0;
  color: #fff;
  border-color: #6d5bd0;
}

.ai-chunk-save-btn.saved {
  background: #eaf5ed;
  border-color: #86c999;
  color: #2ea04d;
  cursor: default;
}

.ai-chunk-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 底部操作栏 */
.ai-chunk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #ddd6f0;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-chunk-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8a84a8;
}

.ai-chunk-count-num {
  font-weight: 700;
  color: #6d5bd0;
}

.ai-chunk-actions-right {
  display: flex;
  gap: 8px;
}

.ai-chunk-action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.ai-chunk-action-btn.regenerate {
  background: #fff;
  border: 1px solid #d0c7f0;
  color: #6d5bd0;
}

.ai-chunk-action-btn.regenerate:hover:not(:disabled) {
  background: #f5f3ff;
}

.ai-chunk-action-btn.save-all {
  background: linear-gradient(135deg, #6d5bd0 0%, #8b7ce0 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(109, 91, 208, 0.25);
}

.ai-chunk-action-btn.save-all:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 91, 208, 0.35);
}

.ai-chunk-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 600px) {
  .ai-chunk-section {
    padding: 16px 14px;
  }

  .ai-chunk-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-chunk-gen-btn {
    width: 100%;
  }

  .ai-chunk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-chunk-actions-right {
    width: 100%;
  }

  .ai-chunk-action-btn {
    flex: 1;
    text-align: center;
  }
}
/* ============================================================
   TYPESSET SYSTEM — 字体层级系统
   对标 julebu.ai 克制感：大数字极粗 + 标签极淡
   消除 12px / 15px 中间地带，建立清晰字体角色
   ============================================================ */

/* [typeset优化] 字体层级系统建立完成 */
/* [typeset优化] 12px中间地带清除完成 */
/* [typeset优化] 跨页面字体一致性统一完成 */

:root {
  --ts-font-display: 20px;
  --ts-font-card-title: 14px;
  --ts-font-number-lg: 28px;
  --ts-font-number-md: 24px;
  --ts-font-body: 14px;
  --ts-font-label: 11px;
  --ts-font-button: 13px;
  --ts-font-link: 13px;

  --ts-weight-bold: 700;
  --ts-weight-semibold: 600;
  --ts-weight-medium: 500;
  --ts-weight-regular: 400;

  --ts-text-1: var(--brand-ink, #1f1f1f);
  --ts-text-2: var(--brand-ink-2, #5c5751);
  --ts-text-3: var(--brand-ink-3, #918a80);
  --ts-text-4: var(--brand-ink-3, #918a80);
  --ts-primary: var(--brand-accent, #027b49);
  --ts-success: var(--brand-accent, #027b49);
}

/* ============================================================
   一、全局基础：消除 12px / 15px 中间地带
   ============================================================ */

/* --- 页面大标题统一 20px 700 --- */
.db-page-title {
  font-size: var(--ts-font-display) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}

/* --- 卡片标题统一 14px 600 --- */
.db-card-title {
  font-size: var(--ts-font-card-title) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
  letter-spacing: -0.005em !important;
}
.db-bottom-card-title {
  font-size: var(--ts-font-card-title) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}

/* ============================================================
   二、Dashboard 首页
   ============================================================ */

/* --- 顶部区域 --- */
.db-topbar-date {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

.db-topbar-streak-num {
  font-size: 16px !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-primary) !important;
}
.db-topbar-streak-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* --- 每日打卡大数字 28px 700 --- */
.db-checkin-stat-num {
  font-size: var(--ts-font-number-lg) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums;
}
.db-checkin-stat-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}

/* --- 概览卡片数字 24px 700 --- */
.db-overview-value {
  font-size: var(--ts-font-number-md) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
}
.db-overview-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}

/* --- 新手任务 --- */
.db-task-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.4 !important;
}
.db-task-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.5 !important;
}
.db-task-reward-badge {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-primary) !important;
}

/* --- 文字链接按钮 13px 500 --- */
.db-btn-text-link,
.btn-text-link {
  font-size: var(--ts-font-link) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-primary) !important;
}

/* --- 快捷入口 --- */
.db-quick-btn-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  letter-spacing: -0.01em;
}
.db-quick-btn-sub {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.db-quick-btn-secondary .db-quick-btn-sub {
  color: rgba(131, 56, 236, 0.7) !important;
}

/* --- 热力图 --- */
.db-heatmap-month-text {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}
.db-heatmap-weekdays span {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}
.db-heatmap-legend {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}

/* --- 最近学习 --- */
.db-recent-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}
.db-recent-meta {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.db-recent-version {
  font-weight: var(--ts-weight-medium) !important;
}

/* --- 底部卡片描述 --- */
.db-bottom-card-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.5 !important;
}

/* --- 趋势图范围按钮 --- */
.db-trend-range-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}

/* ============================================================
   三、语块库面板
   ============================================================ */

.chunk-lib-title {
  font-size: 18px !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  letter-spacing: -0.02em !important;
}
.chunk-lib-subtitle {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* 设置项 */
.chunk-lib-setting-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.3 !important;
}
.chunk-lib-setting-desc {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.01em;
}

/* Tabs */
.chunk-lib-tab {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}
.chunk-lib-tab.active {
  color: var(--ts-primary) !important;
}

/* 语块卡片 */
.chunk-card-full-text {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.4 !important;
}
.chunk-card-full-trans {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.5 !important;
}

/* 迷你语块翻译 */
.chunk-mini-trans {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* filter chips */
.filter-chip {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}

/* 空状态 */
.chunk-lib-empty-title {
  font-size: 16px !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}
.chunk-lib-empty-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.6 !important;
}

/* 空状态提示文字 */
.chunk-lib-empty-hint {
  font-size: var(--ts-font-label) !important;
  color: var(--ts-text-4) !important;
}

/* 完成页统计标签 */
.finish-stat-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* ============================================================
   四、拼写挑战页（spelling-demo）
   ============================================================ */

/* 中文句子 */
.spd-chinese {
  font-size: 20px !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}

/* 单词英文 */
.spd-word-text {
  font-size: 18px !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  letter-spacing: -0.01em;
}

/* 单词音标 */
.spd-word-ipa {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* 单词中文 */
.spd-word-zh {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.4 !important;
}

/* 单词词性 */
.spd-word-pos {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  background: #f3f4f6;
}

/* 进度文字 */
.spd-progress-text {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-primary) !important;
  font-variant-numeric: tabular-nums;
}

/* 得分 */
.spd-score-num {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-primary) !important;
  font-variant-numeric: tabular-nums;
}

/* 完成页 */
.spc-complete-title {
  font-size: 32px !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-primary) !important;
  background: none !important;
  -webkit-text-fill-color: var(--ts-primary) !important;
  -webkit-background-clip: unset !important;
}

.spc-stat-num {
  font-size: var(--ts-font-number-lg) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
}
.spc-stat-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}

.spc-complete-sub {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.6 !important;
}

/* 按钮 */
.spc-btn {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
}

/* 首答正确率板块 */
.spc-fta-section {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.spc-fta-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.spc-fta-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ts-text-1);
}
.spc-fta-sub {
  font-size: 12px;
  color: var(--ts-text-4);
}
.spc-fta-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.spc-fta-big {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.spc-fta-detail {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 14px;
  color: var(--ts-text-3);
  font-variant-numeric: tabular-nums;
}
.spc-fta-divider {
  color: var(--ts-text-5);
}
.spc-fta-unit {
  font-size: 12px;
  color: var(--ts-text-4);
  margin-left: 4px;
}
.spc-fta-bar {
  flex: 1 1 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.spc-fta-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}

/* 易错词板块 */
.spc-error-words-section {
  margin-top: 20px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.spc-error-words-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.spc-error-words-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ts-text-1);
}
.spc-error-words-count {
  font-size: 12px;
  color: #dc2626;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: 10px;
}
.spc-error-words-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}
.spc-error-word-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fee2e2;
}
.spc-error-word-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.spc-error-word-en {
  font-size: 16px;
  font-weight: 700;
  color: #dc2626;
  font-family: 'SFMono-Regular', Menlo, monospace;
}
.spc-error-word-phonetic {
  font-size: 12px;
  color: var(--ts-text-3);
  font-family: 'SFMono-Regular', Menlo, monospace;
}
.spc-error-word-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.spc-error-word-zh {
  font-size: 13px;
  color: var(--ts-text-2);
}
.spc-error-word-badge {
  font-size: 11px;
  font-weight: 600;
  color: #dc2626;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fecaca;
}
.spc-error-word-badge.skipped {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}

/* 全首答正确庆祝 */
.spc-perfect-celebrate {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.spc-perfect-icon {
  font-size: 24px;
}
.spc-perfect-text {
  font-size: 15px;
  font-weight: 600;
  color: #059669;
}

.spd-btn-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
}

/* ============================================================
   五、学习数据 / 掌握度卡片
   ============================================================ */

.db-mastery-bar-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.db-mastery-due-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* 易错词列表 */
.db-weak-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 16px 0;
}
.db-weak-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.db-weak-section-title span:first-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--ts-text-1);
}
.db-weak-section-sub {
  font-size: 11px;
  color: var(--ts-text-4);
}
.db-error-words-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.db-error-word-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fee2e2;
}
.db-error-word-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.db-error-word-en {
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  font-family: 'SFMono-Regular', Menlo, monospace;
}
.db-error-word-zh {
  font-size: 12px;
  color: var(--ts-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.db-error-word-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.db-error-word-count {
  font-size: 11px;
  font-weight: 600;
  color: #dc2626;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fecaca;
}
.db-btn-ghost-sm {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  color: var(--ts-primary);
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.db-btn-ghost-sm:hover {
  background: #eef2ff;
}
}
.db-mastery-stat-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.db-mastery-cycle-pct {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-primary) !important;
}
.db-mastery-stage-count {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.db-mastery-empty-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}

/* ============================================================
   六、按钮统一
   ============================================================ */

.btn-primary,
.btn-ghost-primary,
.btn-secondary {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
}

.btn-text-plain {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
}

/* 小按钮 */
.btn.small,
.btn-ghost.btn-sm,
.btn-ghost-primary.btn-sm {
  font-size: var(--ts-font-label) !important;
}

/* ============================================================
   七、其他通用：消除12px/15px
   ============================================================ */

/* segmented control 按钮 */
.segmented-control button {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}

/* 通用描述/提示 → 13px 正文辅助或 11px 标签 */
.add-chunk-tip,
.sample-chunks-hint,
.db-recent-empty-desc,
.flip-card-footer-hint,
.spelling-footer-hint,
.review-finish-hint,
.spelling-finish-hint,
.spd-complete-hint,
.spc-complete-hint,
.chunk-mini-more {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  line-height: 1.6 !important;
}

/* 明显的标签/徽章类 → 11px */
.chunk-lib-mode-btn,
.review-mode-progress-text,
.spelling-grade-desc,
.spelling-speak-error,
.spd-grammar-tag {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  letter-spacing: 0.01em;
}

/* 语法标签：彩色底（内联设置）+ 白色文字 */
.spd-grammar-tag {
  color: #fff !important;
  font-weight: var(--ts-weight-medium) !important;
}

/* 编辑区 textarea */
.chunk-edit-textarea {
  font-size: var(--ts-font-body) !important;
}

/* ============================================================
   八、侧边栏导航
   ============================================================ */

.db-nav-item {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-2) !important;
}
.db-nav-item.active {
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-primary) !important;
}

.db-sidebar-score-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}
.db-sidebar-score-value {
  font-size: 20px !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-primary) !important;
  letter-spacing: -0.02em;
}

.db-sidebar-user-name {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}
.db-sidebar-user-status {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

.db-sidebar-logout-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}

/* ============================================================
   九、设置页
   ============================================================ */

.db-settings-header h3 {
  font-size: var(--ts-font-display) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
  line-height: 1.2 !important;
}
.db-settings-group-title,
.db-settings-section-title {
  font-size: var(--ts-font-card-title) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-1) !important;
}
.db-settings-label {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-1) !important;
}
.db-settings-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
  line-height: 1.5 !important;
}
.db-settings-value {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}

/* ============================================================
   十、Auth / 登录注册页
   ============================================================ */

.auth-tab-btn {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-4) !important;
}
.auth-input {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-regular) !important;
}
.auth-tip-info,
.auth-tip-warning {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  line-height: 1.5 !important;
}
.auth-forgot-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-primary) !important;
}
.auth-copyright {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.auth-footer-tip {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.user-topbar-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}

/* ============================================================
   十一、句子分析器 sentence-analyzer
   ============================================================ */

.sa-sentence-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}
.sa-legend-item {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.sa-mod-target {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-bold) !important;
}

/* ============================================================
   十二、memory-workshop 内存工坊
   ============================================================ */

.mem-mode-toggle-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-4) !important;
  letter-spacing: 0.02em;
}
.mem-input-tip {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.mem-input-section-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-1) !important;
}
.mem-primary-btn {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
}
.mem-fill-hint-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  line-height: 1.6 !important;
}
.mem-history-item-date {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.mem-diff-tab {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-4) !important;
}
.mem-result-subtitle {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.mem-wrong-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
}
.mem-practice-counter {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-2) !important;
}
.mem-stat-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.chunk-manager-subtitle {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
  color: var(--ts-text-3) !important;
}
.chunk-card-meta {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.chunk-import-course-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
}
.mem-diff-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.mem-drop-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
  color: var(--ts-text-3) !important;
}
.mem-recall-en {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
}

/* ============================================================
   十三、Admin 管理后台（auth.css 内）
   ============================================================ */

.admin-table th {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-bold) !important;
  color: var(--ts-text-3) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-badge {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-semibold) !important;
}
.admin-btn {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
}
.admin-stat-label {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-3) !important;
}
.admin-duration-desc,
.admin-type-desc {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}
.admin-dialog-hint {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  line-height: 1.6 !important;
}
.admin-loading,
.admin-empty {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-regular) !important;
  color: var(--ts-text-4) !important;
}

/* ============================================================
   十四、课程学习页（course-page-typeset 作用域）
   覆盖大量内联样式 fontSize / fontWeight / color
   ============================================================ */

/* [typeset修复] 课程页内联样式统一完成 */

/* --- 基础正文：14px 400 #374151，行高 1.7 --- */
.course-page-typeset p,
.course-page-typeset .section-body p {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-2) !important; (课程页保留内联颜色) */
  line-height: 1.7 !important;
}

/* --- 小节标题（通用 h3 / section-title 模式） --- */
.course-page-typeset h3,
.course-page-typeset .section-title {
  font-size: 16px !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
  line-height: 1.3 !important;
}

/* --- 强调/加粗 --- */
.course-page-typeset strong,
.course-page-typeset b {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
}

/* --- 英文例句（高亮卡片/例句容器） --- */
.course-page-typeset .example-sentence,
.course-page-typeset .sentence-example,
.course-page-typeset .example-en {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-medium) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
}

/* --- 中文翻译/释义 --- */
.course-page-typeset .translation,
.course-page-typeset .example-zh,
.course-page-typeset .cn-trans {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-3) !important; (课程页保留内联颜色) */
  line-height: 1.5 !important;
}

/* --- 语法标签/词性标签 --- */
.course-page-typeset .grammar-tag,
.course-page-typeset .pos-tag,
.course-page-typeset .tag-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-medium) !important;
  /* color: var(--ts-primary) !important; (课程页保留内联颜色) */
  letter-spacing: 0.01em;
}

/* --- 步骤指示器（第 N/3 步） --- */
.course-page-typeset .step-indicator,
.course-page-typeset [style*="第"][style*="步"] {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-4) !important; (课程页保留内联颜色) */
}

/* --- 提示/说明类小字（hint / tip / note） --- */
.course-page-typeset .hint-text,
.course-page-typeset .tip-text,
.course-page-typeset .note-text,
.course-page-typeset .explanation {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-3) !important; (课程页保留内联颜色) */
  line-height: 1.6 !important;
}

/* --- 底部按钮文字 --- */
.course-page-typeset .bottom-action-btn,
.course-page-typeset .course-footer button {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-medium) !important;
}
.course-page-typeset .bottom-action-btn.primary {
  font-weight: var(--ts-weight-semibold) !important;
}

/* --- 页码/进度文字 --- */
.course-page-typeset .page-indicator,
.course-page-typeset .progress-text {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-4) !important; (课程页保留内联颜色) */
}

/* --- 列表项 --- */
.course-page-typeset li {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-2) !important; (课程页保留内联颜色) */
  line-height: 1.7 !important;
}

/* --- 注意框/提示框 --- */
.course-page-typeset .notice-box-title,
.course-page-typeset .callout-title {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
}
.course-page-typeset .notice-box-content,
.course-page-typeset .callout-content {
  font-size: var(--ts-font-button) !important;
  font-weight: var(--ts-weight-regular) !important;
  /* color: var(--ts-text-3) !important; (课程页保留内联颜色) */
  line-height: 1.6 !important;
}

/* --- 积木/语块库词条文字 --- */
.course-page-typeset .word-block-text,
.course-page-typeset .vocab-item-text {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
}

/* --- 练习结果/反馈大标题 --- */
.course-page-typeset .result-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-bold) !important;
}

/* --- 句型卡片标题 --- */
.course-page-typeset .pattern-card-title {
  font-size: var(--ts-font-body) !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-text-1) !important; (课程页保留内联颜色) */
}

/* --- 句子拆解 / 句法树 --- */
.course-page-typeset .tree-node {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-semibold) !important;
}
.course-page-typeset .tree-label,
.course-page-typeset .breakdown-label {
  font-size: var(--ts-font-label) !important;
  font-weight: var(--ts-weight-semibold) !important;
  /* color: var(--ts-primary) !important; (课程页保留内联颜色) */
}

/* ============================================================
   响应式字体层级 — 移动端/平板适当缩小
   仅缩小大标题、大数字、拼写挑战等大型元素
   正文14px、标签11px、按钮13px 保持不变
   ============================================================ */

/* 平板（768-1199px） */
@media (max-width: 1199px) {
  .db-page-title {
    font-size: 18px !important;
  }

  .chunk-lib-title {
    font-size: 16px !important;
  }

  /* 拼写挑战中文句子 */
  .spd-chinese {
    font-size: 18px !important;
  }

  /* 拼写挑战单词 */
  .spd-word-text {
    font-size: 16px !important;
  }

  /* 侧边栏积分数字 */
  .db-topbar-streak-num {
    font-size: 18px !important;
  }
}

/* 移动端（<768px） */
@media (max-width: 767px) {
  .db-page-title {
    font-size: 16px !important;
  }

  .chunk-lib-title {
    font-size: 15px !important;
  }

  /* 大数字适当缩小 */
  .db-checkin-stat-num {
    font-size: 24px !important;
  }

  .db-overview-value {
    font-size: 22px !important;
  }

  .db-topbar-streak-num {
    font-size: 16px !important;
  }

  /* 拼写挑战中文句子 */
  .spd-chinese {
    font-size: 16px !important;
  }

  /* 拼写挑战单词 */
  .spd-word-text {
    font-size: 15px !important;
  }

  /* 完成页大数字 */
  .spc-stat-num {
    font-size: 22px !important;
  }

  /* 首答正确率移动端 */
  .spc-fta-big {
    font-size: 28px !important;
  }
  .spc-fta-section {
    padding: 16px !important;
  }
  .spc-error-words-section {
    padding: 16px !important;
  }

  /* 打卡按钮在移动端保持全宽，文字不变 */
  /* 标签 11px 不缩小（本就很小） */
  /* 正文 14px 不缩小（保持可读性） */
}

/* 小屏手机（<480px） */
@media (max-width: 479px) {
  .db-page-title {
    font-size: 15px !important;
  }

  .db-checkin-stat-num {
    font-size: 22px !important;
  }

  .db-overview-value {
    font-size: 20px !important;
  }

  .spd-chinese {
    font-size: 15px !important;
  }

  .spd-word-text {
    font-size: 14px !important;
  }

  .spc-stat-num {
    font-size: 20px !important;
  }

  .chunk-lib-title {
    font-size: 14px !important;
  }

  .db-topbar-streak-num {
    font-size: 15px !important;
  }
}

/* 大桌面（≥1440px）适度放大，提升大屏利用率 */
@media (min-width: 1440px) {
  .db-page-title {
    font-size: 22px !important;
  }

  .db-checkin-stat-num {
    font-size: 30px !important;
  }

  .chunk-lib-title {
    font-size: 20px !important;
  }
}

/* ============================================================
   侧边栏分组折叠导航
   ============================================================ */

.db-nav-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 6px 12px;
}

.db-nav-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  margin: 2px 0;
  transition: background-color 150ms ease;
}

.db-nav-group-header:hover {
  background: #f9fafb;
}

.db-nav-group-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.db-nav-group-label {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.db-nav-group-chevron {
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.db-nav-group-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 200ms ease;
}

.db-nav-group-content.open {
  max-height: 200px;
}

.db-nav-item-indented {
  padding-left: 32px !important;
}

/* 选中态左侧主色条 */
.db-nav-item.active {
  position: relative;
}

.db-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--brand-accent);
  border-radius: 0 2px 2px 0;
}

/* 底部单卡片布局 */
.db-bottom-grid-single {
  grid-template-columns: 1fr;
}

.db-bottom-grid-single .db-bottom-card {
  max-width: 100%;
}

/* ============================================================
   页面内呈现（语块库/学习足迹/学习数据/设置）
   ============================================================ */

/* 语块库页面模式 */
.chunk-lib-inline {
  width: 100%;
  background: transparent;
}

.chunk-lib-page-header {
  margin-bottom: 20px;
}

.chunk-lib-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
}

.chunk-lib-page-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.chunk-lib-inline .chunk-lib-stats-bar {
  margin-bottom: 16px;
}

.chunk-lib-inline .chunk-lib-settings {
  margin-bottom: 16px;
}

.chunk-lib-inline .chunk-lib-tabs {
  margin-bottom: 16px;
}

.chunk-lib-inline .chunk-lib-body {
  max-height: none;
  overflow: visible;
}

/* 学习足迹页面模式 */
.lfp-inline {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  background: transparent;
  position: relative;
}

.lfp-inline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.lfp-inline .lfp-body {
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
}

/* 学习数据页面 */
.db-data-page {
  width: 100%;
}

.db-data-page-header {
  margin-bottom: 20px;
}

.db-data-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
}

.db-data-page-subtitle {
  font-size: 13px;
  color: #6b7280;
}

/* 设置页面 */
.db-settings-page {
  width: 100%;
  max-width: 640px;
}

.db-settings-page-header {
  margin-bottom: 20px;
}

.db-settings-page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
}

.db-settings-page-sub {
  font-size: 13px;
  color: #6b7280;
}

.db-settings-page-body {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.db-settings-page-body .db-settings-item {
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.db-settings-page-body .db-settings-item:last-child {
  border-bottom: none;
}

/* ===== 开关（Toggle） ===== */
.db-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.db-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.db-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #D1D5DB;
  border-radius: 24px;
  transition: background 0.2s ease;
}

.db-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.db-toggle input:checked + .db-toggle-slider {
  background: var(--db-primary, var(--brand-accent));
}

.db-toggle input:checked + .db-toggle-slider::before {
  transform: translateX(20px);
}

/* ===== 按钮补充 ===== */
.db-btn-primary {
  background: var(--db-primary, var(--brand-accent));
  color: white;
  border: none;
}

.db-btn-primary:hover {
  background: var(--db-primary-dark, var(--brand-accent-dark));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(131, 56, 236, 0.25);
}

.db-btn.small {
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

.db-btn-ghost {
  background: #F3F4F6;
  color: #4B5563;
  border: 1px solid #E5E7EB;
}

.db-btn-ghost:hover {
  background: #E5E7EB;
  color: #1F2937;
}

.db-btn-ghost-primary {
  background: transparent;
  color: var(--db-primary, var(--brand-accent));
  border: 1px solid var(--db-primary, var(--brand-accent));
  font-weight: 600;
}

.db-btn-ghost-primary:hover {
  background: rgba(131, 56, 236, 0.08);
}

/* ===== 设置页 - 数据管理模块 ===== */

.db-settings-section {
  margin-bottom: 24px;
}

.db-settings-section:last-child {
  margin-bottom: 0;
}

.db-settings-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  padding: 0;
}

.db-settings-section-desc {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

/* 设置项改造：支持左右布局（内容 + 操作） */
.db-settings-page-body .db-settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.db-settings-item-label {
  font-size: 14px;
  font-weight: 500;
  color: #1F2937;
  margin-bottom: 2px;
}

.db-settings-item-desc {
  font-size: 12px;
  color: #6B7280;
}

/* ===== 存储概览卡片 ===== */
.dm-storage-card {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #F0F9FF 100%);
  border: 1px solid #D1FAE5;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

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

.dm-storage-label {
  font-size: 13px;
  color: #059669;
  font-weight: 500;
}

.dm-storage-value {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dm-storage-bar {
  height: 6px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.dm-storage-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.dm-storage-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dm-storage-stat {
  text-align: center;
}

.dm-storage-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.dm-storage-stat-label {
  font-size: 11px;
  color: #6B7280;
  margin-top: 4px;
}

.dm-warn-banner {
  background: #FEF3C7;
  color: #92400E;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

/* ===== 操作按钮 ===== */
.dm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.dm-actions .db-btn {
  flex: 1;
  min-width: 110px;
  justify-content: center;
}

/* ===== 备份列表 ===== */
.dm-backups-section {
  margin-bottom: 24px;
}

.dm-backups-title {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-backups-sub {
  font-size: 12px;
  font-weight: 400;
  color: #9CA3AF;
}

.dm-backups-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
}

.dm-backup-time {
  font-size: 13px;
  font-weight: 500;
  color: #1F2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-backup-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #E0E7FF;
  color: #4338CA;
  border-radius: 4px;
  font-weight: 500;
}

.dm-backup-meta {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 3px;
}

.dm-empty {
  text-align: center;
  padding: 24px;
  color: #9CA3AF;
  font-size: 13px;
  background: #F9FAFB;
  border-radius: 10px;
  border: 1px dashed #E5E7EB;
}

/* ===== 云端同步 ===== */
.dm-cloud-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  margin-bottom: 24px;
}

.dm-cloud-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dm-cloud-icon {
  font-size: 28px;
}

.dm-cloud-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E40AF;
}

.dm-cloud-desc {
  font-size: 12px;
  color: #3B82F6;
  margin-top: 2px;
}

/* ===== 危险操作区 ===== */
.dm-danger-section {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 16px;
}

.dm-danger-title {
  font-size: 14px;
  font-weight: 600;
  color: #DC2626;
  margin: 0 0 12px 0;
}

.db-btn-danger {
  background: #DC2626;
  color: #fff;
  border: 1px solid #DC2626;
}

.db-btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}

.db-btn-danger.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* ===== 弹窗 ===== */
.dm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.dm-modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dm-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.dm-input {
  outline: none;
  transition: border-color 0.2s;
}

.dm-input:focus {
  border-color: #3B82F6 !important;
}

/* ===== Toast ===== */
.dm-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: dm-toast-in 0.3s ease;
}

.dm-toast-success {
  background: #10B981;
  color: #fff;
}

.dm-toast-error {
  background: #EF4444;
  color: #fff;
}

@keyframes dm-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .dm-storage-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dm-actions .db-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  
  .dm-cloud-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .dm-storage-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .dm-storage-stat-val {
    font-size: 16px;
  }
  
  .dm-actions .db-btn {
    flex: 1 1 100%;
  }
}
/* ChunkLibraryPanel - 语块库面板样式（Demo 风格） */
:root{
  --cl-acc:#8338EC; --cl-acc-bg:#F3EBFF;
  --cl-vio:#7c3aed; --cl-vio-bg:#EEECFF;
  --cl-warn:#E8A23D; --cl-warn-bg:#FBF1DE;
  --cl-bad:#D95C5C; --cl-bad-bg:#FBE5E5;
  --cl-dim:#8A8F98; --cl-txt:#23262B; --cl-line:#E8EAEF; --cl-bg:#F6F7FB;
  --cl-blue:#3D7DF6; --cl-orange:#E08A20;
}

.cl-root{font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; color:var(--cl-txt); font-size:14px;}
.cl-inline{max-width:920px; margin:0 auto; padding:8px 18px 40px; position:relative;}
.cl-modal{position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; overflow-y:auto;}
.cl-modal-card{background:var(--cl-bg); border-radius:18px; max-width:760px; width:100%; max-height:92vh; overflow-y:auto; padding:28px 20px 40px; position:relative; box-shadow:0 12px 48px rgba(0,0,0,.18);}

.cl-head{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px;}
.cl-head h1{font-size:22px; font-weight:600; margin:0;}
.cl-head .cl-sub{color:var(--cl-dim); font-size:12.5px; margin-top:4px;}

.cl-card{background:#fff; border:1px solid var(--cl-line); border-radius:14px; padding:18px; margin-bottom:14px;}
.cl-card h2{font-size:16px; font-weight:600; margin:0 0 4px; color:var(--cl-txt);}
.cl-row{display:flex; align-items:center;}
.cl-between{justify-content:space-between;}
.cl-btnrow{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap;}

.cl-act{border:1px solid var(--cl-line); background:#fff; border-radius:10px; padding:9px 16px; font-size:13.5px; cursor:pointer; color:var(--cl-txt); transition:all .15s; font-family:inherit;}
.cl-act:hover{border-color:var(--cl-acc); color:var(--cl-acc);}
.cl-act-primary{background:var(--cl-acc); border-color:var(--cl-acc); color:#fff;}
.cl-act-primary:hover{opacity:.9; color:#fff;}
.cl-act-primary:disabled{opacity:.4; cursor:default;}
.cl-act-big{padding:12px 26px; font-size:15px;}
.cl-act-vio{background:var(--cl-vio); border-color:var(--cl-vio); color:#fff;}
.cl-act-vio:hover{opacity:.9; color:#fff;}
.cl-act-ghost{background:transparent;}

.cl-tag{display:inline-block; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:500;}
.cl-tag-acc{background:var(--cl-acc-bg); color:var(--cl-acc);}
.cl-tag-vio{background:var(--cl-vio-bg); color:var(--cl-vio);}
.cl-tag-warn{background:var(--cl-warn-bg); color:var(--cl-warn);}
.cl-tag-bad{background:var(--cl-bad-bg); color:var(--cl-bad);}
.cl-tag-dim{background:#F0F1F4; color:var(--cl-dim);}

.cl-metric{flex:1; text-align:center; padding:10px 4px;}
.cl-metric .cl-v{font-size:24px; font-weight:600;}
.cl-metric .cl-l{font-size:11.5px; color:var(--cl-dim); margin-top:3px;}
.cl-grid{display:flex; gap:8px;}
.cl-bar{height:8px; background:#F0F1F4; border-radius:6px; overflow:hidden; flex:1;}
.cl-bar i{display:block; height:100%; border-radius:6px;}
.cl-note{font-size:11.5px; color:var(--cl-dim); margin-top:10px; line-height:1.6;}
.cl-sub{color:var(--cl-dim); font-size:12.5px; margin-top:4px;}
.cl-empty{text-align:center; padding:40px 20px;}
.cl-empty .cl-em{font-size:40px; margin-bottom:8px;}
.cl-tagline{margin-top:18px; padding:14px 16px; background:linear-gradient(135deg, var(--cl-acc-bg) 0%, #fff 100%); border-radius:10px; font-size:13px; color:var(--cl-txt); line-height:1.7; border-left:3px solid var(--cl-acc);}

.cl-addrow{display:flex; gap:8px;}
.cl-addrow input{flex:1; border:1px solid var(--cl-line); border-radius:10px; padding:10px 14px; font-size:14px; outline:none; font-family:inherit;}
.cl-addrow input:focus{border-color:var(--cl-acc);}
.cl-ipaline{font-size:14px; color:var(--cl-dim); letter-spacing:.3px; margin-top:2px; font-family:Georgia, "Times New Roman", serif;}
.cl-pos{display:inline-block; margin-right:6px; background:#F0F1F4; color:var(--cl-dim); border-radius:4px; padding:1px 7px; font-size:11.5px; font-family:inherit; letter-spacing:0; vertical-align:middle;}

/* ===== 翻卡片 ===== */
.cl-progress{display:flex; align-items:center; gap:10px; margin-bottom:14px;}
.cl-progress .cl-pbar{flex:1; height:6px; background:#E8EAEF; border-radius:4px; overflow:hidden;}
.cl-progress .cl-pbar i{display:block; height:100%; background:var(--cl-acc); border-radius:4px; transition:width .3s;}
.cl-flipwrap{perspective:1200px; cursor:pointer;}
.cl-flipcard{position:relative; width:100%; height:280px; transition:transform .5s; transform-style:preserve-3d;}
.cl-flipcard.flipped{transform:rotateY(180deg);}
.cl-face{position:absolute; inset:0; backface-visibility:hidden; border-radius:18px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; text-align:center;}
.cl-face-front{background:#fff; border:1px solid var(--cl-line);}
.cl-face-back{background:#fff; border:2px solid var(--cl-acc); transform:rotateY(180deg);}
.cl-face .cl-zh{font-size:26px; font-weight:600; line-height:1.5;}
.cl-face .cl-en{font-size:30px; font-weight:600; color:var(--cl-acc); line-height:1.4;}
.cl-face .cl-flip-hint{position:absolute; bottom:18px; font-size:11.5px; color:var(--cl-dim);}
.cl-judge{display:flex; gap:12px; margin-top:16px;}
.cl-judge button{flex:1; padding:14px; border-radius:12px; font-size:15px; cursor:pointer; border:1px solid var(--cl-line); background:#fff; transition:all .15s; font-family:inherit;}
.cl-judge button:disabled{opacity:.35; cursor:default;}
.cl-judge button.cl-bad:hover:not(:disabled){border-color:var(--cl-bad); color:var(--cl-bad); background:var(--cl-bad-bg);}
.cl-judge button.cl-good:hover:not(:disabled){border-color:var(--cl-acc); color:var(--cl-acc); background:var(--cl-acc-bg);}

/* ===== 结算 ===== */
.cl-slimrow{display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-radius:10px; font-size:13.5px;}
.cl-slimrow.out{background:var(--cl-acc-bg); color:var(--cl-acc);}
.cl-slimrow.stay{background:var(--cl-warn-bg); color:var(--cl-warn);}

/* ===== 拼写（整块输入，demo 风格 + 紫色主色） ===== */
.cl-sp-top{display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-bottom:8px;}
.cl-sp-top .cl-score{background:#f3ebff; color:#6226b8; border-radius:18px; padding:5px 14px; font-size:13px; font-weight:600;}
.cl-sp-top .cl-prog{color:var(--cl-vio); font-weight:600; font-size:14px;}
.cl-sp-big{text-align:center; margin:10px 0 4px;}
.cl-sp-big .cl-sp-zh{font-size:26px; font-weight:600; line-height:1.4; color:#1A1A1A;}
.cl-sp-meta{text-align:center; color:var(--cl-dim); font-size:13px; margin-top:6px; margin-bottom:18px;}
.cl-sp-meta .cl-ipa{font-family:Georgia,"Times New Roman",serif; font-size:14px; color:var(--cl-txt);}
.cl-sp-meta .cl-pos{margin-left:8px; background:#F0F1F4; border-radius:4px; padding:1px 7px; font-size:11.5px;}
.cl-sp-input{display:block; width:100%; max-width:520px; margin:0 auto; border:2px solid var(--cl-line); border-radius:12px; padding:14px 18px; font-size:20px; text-align:center; outline:none; font-family:inherit; letter-spacing:.4px; background:#fff;}
.cl-sp-input:focus{border-color:var(--cl-vio); box-shadow:0 0 0 3px var(--cl-vio-bg);}
.cl-sp-input.err{border-color:#A63232; background:#FEF3F3; animation:clShake .3s;}
@keyframes clShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.cl-sp-msg{text-align:center; min-height:22px; margin-top:10px; font-size:13.5px; color:var(--cl-dim);}
.cl-sp-msg.bad{color:#A63232; font-weight:500;}
.cl-sp-msg.good{color:#15803d; font-weight:500;}
.cl-sp-ans{text-align:center; margin-top:10px; padding:12px 16px; background:#f3ebff; border-radius:10px; font-size:22px; font-weight:600; color:#6226b8; letter-spacing:.6px;}
.cl-sp-ans .cl-lb{display:block; font-size:11.5px; color:var(--cl-dim); font-weight:400; letter-spacing:0; margin-bottom:4px;}
.cl-sp-foot{display:flex; gap:10px; justify-content:center; margin-top:18px; flex-wrap:wrap;}
.cl-sp-foot .cl-act{font-size:13px; padding:8px 14px;}
.cl-sp-hint{text-align:center; color:var(--cl-dim); font-size:12.5px; margin:20px 0 6px;}
.cl-kbd{display:inline-block; border:1px solid var(--cl-line); border-bottom-width:2px; border-radius:5px; padding:0 6px; font-size:11px; background:#FAFAFC; margin:0 2px;}

/* ===== 拼写连击 ===== */
.cl-combo{background:var(--cl-vio-bg); color:var(--cl-vio); border-radius:18px; padding:5px 13px; font-size:13px; font-weight:600;}
.cl-combo.flash{animation:clComboPop .25s;}
@keyframes clComboPop{0%{transform:scale(1.3)}100%{transform:scale(1)}}

/* ===== 拼写结算 ===== */
.cl-result-rate{text-align:center; padding:14px 0 8px;}
.cl-result-rate .cl-num{font-size:52px; font-weight:600; line-height:1.1;}
.cl-result-rate .cl-num.ok{color:var(--cl-vio);}
.cl-result-rate .cl-num.no{color:var(--cl-bad);}
.cl-slimlist{display:flex; flex-direction:column; gap:8px; margin-top:10px;}
.cl-pickrow{display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; margin-bottom:6px; background:#FAFBFD; border:1px solid var(--cl-line); cursor:pointer; transition:all .15s;}
.cl-pickrow:hover{border-color:#C8CBD2;}
.cl-pickrow.on{background:#f3ebff; border-color:#d4c8ec;}
.cl-pickrow.no{background:#FEF3F3; border-color:#F2D2D2;}
.cl-pickrow .cl-cb{width:19px; height:19px; border:2px solid #C8CBD2; border-radius:5px; flex:none; display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; background:#fff;}
.cl-pickrow.on .cl-cb{background:#8338ec; border-color:#8338ec;}
.cl-pickrow .cl-nm{flex:1; font-size:14px; font-weight:600; word-break:break-all;}
.cl-pickrow .cl-st{font-size:11.5px; color:var(--cl-dim); white-space:nowrap;}
.cl-pickrow .cl-st.bad{color:var(--cl-bad);}
.cl-pickrow .cl-st.ok{color:var(--cl-vio);}
.cl-slimtip{background:linear-gradient(135deg, #f3ebff 0%, #fff 100%); border-left:3px solid #8338ec; border-radius:10px; padding:12px 14px; font-size:13px; line-height:1.75;}
.cl-slimtip b{color:#6226b8;}
.cl-keepnote{margin-top:10px; padding:11px 14px; background:#f5ebfa; border-radius:10px; font-size:13px; color:#6B21A8; line-height:1.7;}

/* ===== 倒计时横幅 ===== */
.cl-cd-banner{margin-bottom:14px; padding:14px 18px; background:linear-gradient(135deg, var(--cl-vio) 0%, #9b6dd9 100%); color:#fff; border-radius:12px; font-size:14px; font-weight:500; box-shadow:0 4px 16px rgba(141,93,205,.25); display:flex; align-items:center; gap:8px;}
.cl-cd-banner.gold{background:linear-gradient(135deg, #d4a942 0%, #b8851f 100%); box-shadow:0 4px 16px rgba(212,169,66,.25);}
.cl-cd-banner b{font-size:16px; margin:0 2px;}
.cl-cd-banner #cdNum{display:inline-block; min-width:18px; font-weight:700; text-align:center; font-size:16px; padding:0 2px;}

/* ===== 按钮 ===== */
.cl-backbtn{position:fixed; top:14px; left:16px; z-index:99; width:38px; height:38px; border-radius:50%; border:1px solid var(--cl-line); background:#fff; cursor:pointer; font-size:16px; color:var(--cl-txt); box-shadow:0 2px 8px rgba(0,0,0,.05); line-height:1; font-family:inherit;}
.cl-backbtn:hover{border-color:var(--cl-acc); color:var(--cl-acc);}
.cl-modal-card .cl-backbtn{position:absolute; top:14px; left:14px;}

/* === inline 模式（页面内嵌）：backBtn absolute 覆盖在 cl-root 左上角 === */
.cl-root.cl-inline{position:relative;}
.cl-root.cl-inline > .page-back-btn{position:absolute; top:14px; left:0; margin:0; z-index:5;}
.cl-root.cl-inline.cl-inner .cl-head{padding-left:80px; margin-top:0;}

/* === modal 模式：backBtn absolute，cl-head 让位 === */
.cl-modal-card .page-back-btn{position:absolute; top:26px; left:14px; z-index:2;}
.cl-modal-card.cl-inner .cl-head{padding-left:64px; margin-top:0;}
.cl-helpbtn-inline{display:inline-block; margin-left:6px; padding:2px 9px; border:1px solid var(--cl-line); background:#fff; border-radius:14px; font-size:11.5px; color:var(--cl-dim); cursor:pointer; font-family:inherit; transition:all .2s;}
.cl-helpbtn-inline:hover{border-color:var(--cl-acc); color:var(--cl-acc); background:var(--cl-acc-bg);}

/* ===== Toast ===== */
.cl-toast{position:fixed; left:50%; bottom:36px; transform:translateX(-50%) translateY(20px); background:var(--cl-txt); color:#fff; padding:10px 20px; border-radius:24px; font-size:13px; opacity:0; pointer-events:none; transition:all .25s; z-index:100; white-space:nowrap;}
.cl-toast.show{opacity:1; transform:translateX(-50%) translateY(0);}

/* ===== 帮助侧栏 ===== */
.cl-helppanel{position:fixed; top:0; right:0; bottom:0; width:420px; max-width:92vw; background:#fff; box-shadow:-8px 0 32px rgba(0,0,0,.12); z-index:200; transform:translateX(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); display:flex; flex-direction:column;}
.cl-helppanel.cl-open{transform:translateX(0);}
.cl-helppanel .cl-hp-head{padding:24px 24px 16px; border-bottom:1px solid var(--cl-line); display:flex; align-items:center; justify-content:space-between;}
.cl-helppanel .cl-hp-head h2{margin:0; font-size:18px; font-weight:600;}
.cl-helppanel .cl-hp-close{width:32px; height:32px; border:none; background:#f4f6f8; border-radius:50%; cursor:pointer; font-size:16px; color:var(--cl-dim); font-family:inherit;}
.cl-helppanel .cl-hp-close:hover{background:var(--cl-acc-bg); color:var(--cl-acc);}
.cl-helppanel .cl-hp-body{padding:20px 24px; overflow-y:auto; flex:1;}
.cl-hp-back{position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.25); z-index:199; opacity:1; pointer-events:auto; transition:opacity .25s;}
.cl-hp-seg{margin-bottom:22px; padding:16px; background:#fafcfb; border-radius:12px; border:1px solid #eef2f0;}
.cl-hp-seg h3{margin:0 0 8px; font-size:14px; color:var(--cl-acc); font-weight:600; display:flex; align-items:center; gap:6px;}
.cl-hp-seg p{margin:6px 0; font-size:13.5px; line-height:1.7; color:var(--cl-txt);}
.cl-hp-seg ol{margin:6px 0; padding-left:20px; font-size:13.5px; line-height:1.85; color:var(--cl-txt);}
.cl-hp-seg li{margin-bottom:4px;}
.cl-hp-seg .cl-hl{background:#fff8e1; padding:1px 4px; border-radius:3px; font-weight:500;}

/* ===== 徽章墙 ===== */
.cl-badgewall{display:flex; gap:10px; margin-top:12px; padding-top:12px; border-top:1px dashed #E0D4F5; overflow-x:auto;}
.cl-badge{flex:0 0 auto; width:62px; text-align:center;}
.cl-badge .cl-bg{width:56px; height:56px; margin:0 auto; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:23px; line-height:1.1;}
.cl-badge .cl-bc{font-size:10.5px; margin-top:5px; color:var(--cl-dim);}
.cl-badge.cl-lit .cl-bg{background:linear-gradient(160deg, #FFE9AD 0%, #E3A93D 100%); border:2px solid #C98A18; box-shadow:0 3px 10px rgba(211,160,48,.28);}
.cl-badge.cl-lit .cl-bc{color:#A97A15; font-weight:600;}
.cl-badge.cl-now .cl-bg{background:#fff; border:2px dashed #BFC4CD;}
.cl-badge.cl-now .cl-be{opacity:.32;}
.cl-badge.cl-now .cl-bp{font-size:11px; color:var(--cl-txt); font-weight:600; margin-top:1px;}
.cl-badge.cl-lock .cl-bg{background:#F6F7F9; border:2px dashed #E3E5EA;}
.cl-badge.cl-lock .cl-be{opacity:.16;}
.cl-badgeline{font-size:12px; font-weight:500; color:var(--cl-acc); margin-top:9px;}
.cl-mzc{transition:all .15s;}
.cl-mzc.cl-win{background:linear-gradient(135deg, #FAF6FF 0%, #FFFFFF 75%); border-color:#E0D4F5; cursor:pointer;}
.cl-mzc.cl-win:hover{border-color:var(--cl-acc); box-shadow:0 4px 14px rgba(131,56,236,.1);}
.cl-mzc.cl-off{cursor:default;}
.cl-mzc-hd{display:flex; justify-content:space-between; align-items:center; gap:10px;}

/* ===== 分组可展开卡片 ===== */
.cl-gcard{background:#fff; border:1px solid var(--cl-line); border-radius:12px; margin-bottom:10px; overflow:hidden;}
.cl-gcard .cl-gh{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:11px 14px; background:#FAFBFD; border-bottom:1px solid var(--cl-line); cursor:pointer;}
.cl-gcard.cl-fold .cl-gh{border-bottom:none;}
.cl-gcard.cl-fold .cl-glist{display:none;}
.cl-gcard .cl-gh:hover{background:#F4F6FA;}
.cl-glist{padding:2px 0;}
.cl-grow{display:flex; align-items:center; gap:10px; padding:9px 14px; border-bottom:1px solid #F3F5F8;}
.cl-grow:last-child{border-bottom:none;}
.cl-grow .cl-en{font-weight:600; font-size:14px;}
.cl-grow .cl-ipa{font-size:11.5px; color:var(--cl-dim); font-family:Georgia,"Times New Roman",serif; margin-top:2px;}
.cl-grow .cl-zh{font-size:12.5px; color:var(--cl-dim); margin-top:1px;}
.cl-mark{display:inline-block; margin-left:7px; padding:1px 8px; border-radius:10px; font-size:10.5px; background:var(--cl-bad-bg); color:var(--cl-bad); vertical-align:1px;}
.cl-mini{border:1px solid var(--cl-line); background:#fff; border-radius:8px; padding:5px 10px; font-size:11.5px; cursor:pointer; color:var(--cl-dim); white-space:nowrap; font-family:inherit;}
.cl-mini:hover{border-color:var(--cl-acc); color:var(--cl-acc);}
.cl-mini.cl-warn:hover{border-color:var(--cl-warn); color:var(--cl-warn);}

/* ===== 搜索框 ===== */
.cl-lib-search{width:100%; border:1px solid var(--cl-line); border-radius:10px; padding:9px 14px; font-size:13.5px; outline:none; margin-bottom:12px; font-family:inherit;}
.cl-lib-search:focus{border-color:var(--cl-acc);}

/* ===== 2×2 数据卡 + 通关率 ===== */
.cl-stat2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;}
.cl-stcell{background:#F0F1F4; border-radius:10px; padding:10px 12px;}
.cl-stcell .cl-k{font-size:11.5px; color:var(--cl-dim);}
.cl-stcell .cl-v{font-size:23px; font-weight:600; line-height:1.25;}
.cl-stcell .cl-d{font-size:11.5px; margin-top:1px;}
.cl-stcell .cl-d.cl-up{color:var(--cl-acc);}
.cl-stcell .cl-d.cl-down{color:var(--cl-warn);}
.cl-stcell .cl-d.cl-flat{color:var(--cl-dim);}
.cl-ratecard{grid-column:1 / -1; background:var(--cl-acc-bg); border-radius:10px; padding:9px 12px;}
.cl-ratecard .cl-rh{display:flex; align-items:center; gap:7px;}
.cl-ratecard .cl-rv{font-size:18px; font-weight:600; color:var(--cl-acc);}
.cl-ratecard .cl-rl{font-size:12px; color:var(--cl-acc); margin-right:2px;}
.cl-ratecard .cl-rbar{flex:1; height:6px; border-radius:3px; background:#fff; overflow:hidden;}
.cl-ratecard .cl-rbar i{display:block; height:100%; background:var(--cl-acc); border-radius:3px;}
.cl-ratecard .cl-rn{font-size:12px; color:#6B21B5; line-height:1.65; margin-top:5px;}

/* ===== 图表 ===== */
.cl-legend{display:flex; gap:12px; font-size:11.5px; color:var(--cl-dim); white-space:nowrap; margin-top:14px;}
.cl-legend i{display:inline-block; width:9px; height:9px; border-radius:3px; margin-right:5px; vertical-align:0;}
.cl-chartbox{width:100%; overflow-x:auto; margin-top:2px;}
.cl-chartbox svg{display:block; width:100%; height:auto; min-width:480px;}
.cl-trendline{display:flex; align-items:center; gap:8px; margin-top:10px; padding:9px 13px; background:#F7F9FC; border-radius:10px; font-size:12.5px; color:var(--cl-txt); line-height:1.6;}
.cl-trendline .cl-up{color:var(--cl-acc); font-weight:600;}
.cl-trendline .cl-down{color:var(--cl-warn); font-weight:600;}

/* ===== 分享栏 ===== */
.cl-sharebar{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--cl-line); flex-wrap:wrap;}
.cl-sharebar .cl-pt{font-size:13px; color:var(--cl-txt);}
.cl-msline{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px;}
.cl-mstag{font-size:11px; padding:3px 9px; border-radius:20px; background:#F0F1F4; color:var(--cl-dim);}
.cl-mstag.cl-on{background:var(--cl-acc-bg); color:var(--cl-acc);}

/* ===== 分享弹层 ===== */
.cl-sharemodal{position:fixed; inset:0; z-index:120; background:rgba(16,20,28,.55); display:flex; align-items:center; justify-content:center; padding:18px;}
.cl-sharemodal .cl-box{background:#fff; border-radius:16px; padding:18px; max-width:440px; width:100%; max-height:92vh; overflow:auto;}
.cl-sharemodal canvas{display:block; width:100%; height:auto; border-radius:12px; border:1px solid var(--cl-line);}
.cl-sharebtnrow{display:flex; gap:10px; margin-top:14px;}
.cl-sharebtnrow .cl-act{flex:1; text-align:center; white-space:nowrap; padding:9px 10px; font-size:13px;}

/* ===== 帮助气泡 ===== */
.cl-helpbubble{position:fixed; top:62px; right:16px; z-index:98; background:var(--cl-acc); color:#fff; padding:10px 14px; border-radius:14px; font-size:13px; max-width:240px; line-height:1.5; box-shadow:0 4px 16px rgba(131,56,236,.25); opacity:0; transform:translateY(-8px); pointer-events:none; transition:all .35s;}
.cl-helpbubble.cl-show{opacity:1; transform:translateY(0); pointer-events:auto;}
.cl-helpbubble::after{content:""; position:absolute; top:-6px; right:14px; width:12px; height:12px; background:var(--cl-acc); transform:rotate(45deg);}
.cl-helpbubble .cl-x{position:absolute; top:4px; right:8px; cursor:pointer; opacity:.7; font-size:14px;}
.cl-helpbtn{position:fixed; top:14px; right:16px; z-index:99; width:38px; height:38px; border-radius:50%; border:1px solid var(--cl-line); background:#fff; cursor:pointer; font-size:15px; color:var(--cl-dim); font-weight:600; box-shadow:0 2px 8px rgba(0,0,0,.05); transition:all .2s; font-family:inherit;}
.cl-helpbtn:hover{border-color:var(--cl-acc); color:var(--cl-acc); transform:scale(1.08);}
.cl-mutebtn{position:fixed; top:14px; right:60px; z-index:99; width:38px; height:38px; border-radius:50%; border:1px solid var(--cl-line); background:#fff; cursor:pointer; font-size:15px; color:var(--cl-dim); box-shadow:0 2px 8px rgba(0,0,0,.05); font-family:inherit;}
.cl-mutebtn:hover{border-color:var(--cl-acc); color:var(--cl-acc);}
.cl-modal-card .cl-helpbtn, .cl-modal-card .cl-mutebtn{position:absolute;}

/* ===== 移动端适配 ===== */
@media (max-width: 768px){
  .cl-inline{padding:8px 12px 40px;}
  .cl-modal{padding:0;}
  .cl-modal-card{max-height:100vh; border-radius:0; padding:24px 16px 40px;}
  .cl-sp-card{width:80px; min-height:104px;}
  .cl-sp-cards{gap:6px;}
  .cl-face .cl-zh{font-size:22px;}
  .cl-face .cl-en{font-size:24px;}
}
