:root {
  --ink: #111e33;
  --ink-secondary: #24354d;
  --muted: #5e6f85;
  --subtle: #899ab0;
  --line: #e2e8f0;
  --line-light: #edf2f7;
  --paper: #f6f8fb;
  --white: #ffffff;

  /* 经济基础 - 宝石宝蓝 */
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-deep: #1e3a8a;
  --blue-surface: #eff5ff;
  --blue-subtle: rgba(37, 99, 235, 0.08);
  --blue-border: #bfdbfe;
  --blue-glow: rgba(37, 99, 235, 0.16);

  /* 工商管理 - 翡翠深青 */
  --teal: #0d9488;
  --teal-hover: #0f766e;
  --teal-deep: #134e48;
  --teal-surface: #f0fdfa;
  --teal-subtle: rgba(13, 148, 136, 0.08);
  --teal-border: #99f6e4;
  --teal-glow: rgba(13, 148, 136, 0.16);

  /* 状态色 */
  --rose: #e11d48;
  --rose-surface: #fff1f2;
  --rose-border: #fecdd3;
  --amber: #d97706;
  --amber-surface: #fffbeb;
  --amber-border: #fde68a;

  /* 阴影系统 */
  --shadow-subtle: 0 2px 6px rgba(17, 30, 51, 0.03);
  --shadow-card: 0 6px 20px -3px rgba(20, 35, 60, 0.05), 0 2px 6px -1px rgba(20, 35, 60, 0.03);
  --shadow-card-hover: 0 16px 36px -4px rgba(25, 45, 80, 0.1), 0 4px 12px -2px rgba(25, 45, 80, 0.04);
  --shadow-dropdown: 0 12px 30px -4px rgba(17, 30, 51, 0.12);

  /* 缓动函数 */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background-color: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  background-image: 
    radial-gradient(at 0% 0%, rgba(225, 238, 255, 0.45) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(225, 248, 245, 0.35) 0px, transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; border: 0; outline: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2.5px; }

/* 页面主体栅格 */
.shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* 顶部导航 Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(246, 248, 251, 0.85);
  margin: 0 -32px;
  padding: 0 32px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  user-select: none;
}

.brand-mark-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #182844 0%, #0d1727 100%);
  color: #fff;
  font: 700 21px/1 "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(13, 23, 39, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font: 700 21px/1.2 "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  letter-spacing: .08em;
  color: var(--ink);
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  margin-top: 3px;
  font-weight: 500;
}

/* 顶部操作区与用户信息 */
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-subtle);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}

.account-name {
  font-size: 13px;
  color: var(--ink-secondary);
  font-weight: 600;
}

.logout-btn {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all 0.18s var(--ease);
}

.logout-btn:hover {
  color: var(--rose);
  background: var(--rose-surface);
}

/* 欢迎区 Hero Area */
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding: 44px 0 32px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.55);
  margin-bottom: 28px;
}

.intro-left {
  flex: 1;
  max-width: 650px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 14px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(0.85); }
}

.page-title {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(30px, 3.8vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 12px;
}

.lede {
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
  margin: 0;
}

/* 科目分段切换器 (Segmented Control) */
.subject-switch-container {
  display: flex;
  align-items: center;
}

.subject-switch {
  display: flex;
  background: #e9eff7;
  padding: 4px;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(17, 30, 51, 0.08);
}

.subject-switch button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}

.subject-switch button:hover:not(.active) {
  color: var(--ink);
}

.subject-switch button.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(17, 30, 51, 0.08), 0 1px 2px rgba(17, 30, 51, 0.04);
}

.switch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.switch-dot.blue { background: var(--blue); }
/* ========================================================
   继续上次练习卡片 (Continue Practice Banner)
   ======================================================== */
.continue-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 255, 0.85));
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.08), 0 2px 6px -1px rgba(37, 99, 235, 0.04);
  margin-bottom: 24px;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.continue-banner:hover {
  box-shadow: 0 12px 30px -4px rgba(37, 99, 235, 0.12), 0 4px 10px -2px rgba(37, 99, 235, 0.06);
  border-color: rgba(147, 197, 253, 0.95);
}

.continue-banner.business {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.85));
  border-color: rgba(153, 246, 228, 0.8);
  box-shadow: 0 8px 24px -4px rgba(13, 148, 136, 0.08), 0 2px 6px -1px rgba(13, 148, 136, 0.04);
}

.continue-banner.business:hover {
  box-shadow: 0 12px 30px -4px rgba(13, 148, 136, 0.12), 0 4px 10px -2px rgba(13, 148, 136, 0.06);
  border-color: rgba(94, 234, 212, 0.95);
}

.continue-banner-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.continue-banner.business .continue-banner-glow {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, transparent 70%);
}

.continue-banner-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
}

.continue-banner-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.continue-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.live-pulse-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: rgba(220, 252, 231, 0.9);
  border: 1px solid rgba(134, 239, 172, 0.6);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse-dot-glow 1.8s infinite ease-in-out;
}

@keyframes pulse-dot-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.subject-mini-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.subject-mini-badge.blue {
  color: var(--blue-deep);
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
}

.subject-mini-badge.teal {
  color: var(--teal-deep);
  background: var(--teal-surface);
  border: 1px solid var(--teal-border);
}

.scope-mini-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
}

.continue-title-row {
  min-width: 0;
}

.continue-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.continue-progress-bar {
  width: 130px;
  height: 6px;
  background: rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  overflow: hidden;
}

.continue-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  transition: width 0.3s ease;
}

.continue-banner.business .continue-progress-fill {
  background: linear-gradient(90deg, var(--teal), #34d399);
}

.continue-progress-text {
  font-size: 12.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.continue-progress-text strong {
  color: var(--ink);
  font-weight: 600;
}

.continue-progress-text .progress-percent {
  color: var(--subtle);
  font-weight: normal;
}

.continue-progress-text .progress-sep {
  color: var(--line);
}

.continue-banner-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.continue-btn {
  padding: 9px 18px;
  font-size: 13.5px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.continue-banner.business .continue-btn {
  background: var(--teal);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.continue-banner.business .continue-btn:hover {
  background: var(--teal-hover);
}

.abandon-practice-btn {
  font-size: 12.5px;
  color: var(--subtle);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.abandon-practice-btn:hover {
  color: var(--rose);
  background: rgba(254, 226, 226, 0.5);
}

/* 视图选项卡 (Tabs) */
.view-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  margin-bottom: 30px;
}

.view-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 4px 16px;
  transition: color 0.18s ease;
}

.view-tabs button::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--blue);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.4);
  transition: all 0.22s var(--ease);
}

.view-tabs button:hover {
  color: var(--ink);
}

.view-tabs button.active {
  color: var(--blue);
  font-weight: 700;
}

.view-tabs button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* 选项卡徽标 */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #e5edf7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
  transition: all 0.18s ease;
}

.tab-badge.badge-amber {
  background: var(--amber-surface);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.tab-badge.badge-rose {
  background: var(--rose-surface);
  color: var(--rose);
  border: 1px solid var(--rose-border);
}

.tab-badge.badge-teal {
  background: var(--teal-surface);
  color: var(--teal);
  border: 1px solid var(--teal-border);
}

/* 章节网格标题 */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head h2 {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.section-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(226, 232, 240, 0.6);
  padding: 3px 9px;
  border-radius: 999px;
}

.section-caption {
  color: var(--muted);
  font-size: 13px;
}

/* ========================================================
   核心优化：章节卡片 (Chapter Card)
   告别大粗边！以通透微光泽、优雅徽标与高阶动效代替生硬纯色竖条
   ======================================================== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.chapter-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  padding: 26px 28px 24px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease), border-color 0.26s var(--ease);
}

/* 顶部极细渐变微光线 (代替原本左侧的大粗边！) */
.chapter-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 35%, rgba(96, 165, 250, 0.1) 85%);
  opacity: 0.9;
  transition: opacity 0.26s ease;
}

.chapter-card.business::before {
  background: linear-gradient(90deg, #14b8a6 0%, #2dd4bf 35%, rgba(45, 212, 191, 0.1) 85%);
}

/* 悬停卡片上浮与呼吸微投影 */
.chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(191, 219, 254, 0.95);
}

.chapter-card.business:hover {
  border-color: rgba(153, 246, 228, 0.95);
}

/* 卡片右上角背景氛围光 */
.card-glow-bg {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
  transition: transform 0.35s ease;
}

.business .card-glow-bg {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
}

.chapter-card:hover .card-glow-bg {
  transform: scale(1.2);
}

/* 艺术水印章节号（自然半透，取代突兀的巨大数字占位） */
.chapter-number-watermark {
  position: absolute;
  right: 22px;
  top: 24px;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: #1e3a8a;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.business .chapter-number-watermark {
  color: #0f766e;
  opacity: 0.08;
}

.chapter-card:hover .chapter-number-watermark {
  opacity: 0.12;
  transform: translateY(-2px);
}

/* 卡片元信息 Meta */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .04em;
}

.tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.business .subject-tag {
  background: var(--teal-surface);
  border-color: var(--teal-border);
  color: var(--teal);
}

.business .tag-dot {
  background: var(--teal);
}

.count-tag {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.count-num {
  color: var(--ink);
  font-weight: 700;
}

/* 卡片主内容区 */
.card-main {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.chapter-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--blue);
  margin-bottom: 6px;
}

.business .chapter-badge {
  color: var(--teal);
}

.chapter-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color 0.18s ease;
}

.chapter-card:hover .chapter-title {
  color: var(--blue);
}

.chapter-card.business:hover .chapter-title {
  color: var(--teal);
}

.chapter-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

/* 进度条 Mini Progress */
.progress-section {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.mini-progress {
  height: 6px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}

.business .mini-progress span {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
}

/* 卡片底部操作与状态 */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  position: relative;
  z-index: 2;
}

.stat-pills {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-pill {
  font-size: 12.5px;
  color: var(--muted);
}

.stat-pill strong {
  color: var(--ink);
  font-weight: 700;
}

.stat-pill.highlight-correct strong {
  color: var(--teal);
}

.stat-label {
  color: var(--subtle);
  font-size: 12px;
  margin-right: 2px;
}

/* 按钮设计规范 */
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  position: relative;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #2b67e9 0%, #1e4fd8 100%);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3b74f0 0%, #2256e3 100%);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
}

.business .primary-button {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.business .primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.35);
}

.btn-arrow {
  transition: transform 0.2s var(--ease);
}

.primary-button:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

.secondary-button {
  color: var(--ink-secondary);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-subtle);
}

.secondary-button:hover:not(:disabled) {
  background: #f8fafc;
  color: var(--blue);
  border-color: var(--blue-border);
}

/* ========================================================
   高频考点速记看板 (Knowledge Panel)
   精致卡片容器 + 交互式芯片胶囊
   ======================================================== */
.knowledge-panel {
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.knowledge-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  bottom: 0;
  background: var(--blue);
  display: none; /* 彻底去除大粗边 */
}

.knowledge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.knowledge-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knowledge-icon-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--blue-surface);
  border-radius: 8px;
  font-size: 14px;
}

.business .knowledge-icon-badge {
  background: var(--teal-surface);
}

.knowledge-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.knowledge-badge-tip {
  font-size: 12px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 3px 9px;
  border-radius: 999px;
}

.knowledge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.knowledge-chip {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
  font-weight: 500;
  transition: all 0.2s var(--ease);
  cursor: default;
}

.knowledge-chip:hover {
  background: #ffffff;
  color: var(--blue);
  border-color: var(--blue-border);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.business .knowledge-chip:hover {
  color: var(--teal);
  border-color: var(--teal-border);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.08);
}

/* ========================================================
   收藏夹与错题本 (Collection Panel)
   ======================================================== */
.collection-panel {
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  padding: 36px 38px;
  max-width: 680px;
  box-shadow: var(--shadow-card);
}

.collection-panel h2 {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: 26px;
  margin: 4px 0 10px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 26px 0 28px;
}

.field-label {
  display: block;
  color: var(--ink-secondary);
  font-size: 12.5px;
  margin: 0 0 8px;
  font-weight: 600;
}

.field-control {
  width: 100%;
  min-height: 44px;
  background: #fbfcfe;
  border: 1px solid #d5dfeb;
  border-radius: 9px;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.empty-state-card {
  text-align: center;
  padding: 36px 20px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.empty-icon {
  font-size: 32px;
  color: var(--subtle);
  margin-bottom: 10px;
}

.empty-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  margin: 0;
}

/* ========================================================
   刷题界面 (Practice View)
   去除案例大粗边，提升选项对比与正误解析质感
   ======================================================== */
.practice-shell {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.practice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 16px;
  gap: 15px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}

.back-button:hover {
  color: var(--blue);
  background: var(--blue-surface);
}

.practice-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skipped-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.practice-count-badge {
  font-size: 13px;
  color: var(--muted);
  background: #e9eff7;
  padding: 4px 12px;
  border-radius: 999px;
}

.pos-num {
  color: var(--ink);
  font-weight: 700;
}

.progress-track {
  height: 6px;
  background: #e2eaf4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: inherit;
  transition: width 0.3s var(--ease);
}

.business .progress-track span {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
}

/* 答题卡片 */
.practice-card {
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.question-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px 34px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.question-index-badge {
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font: 700 22px/1 "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  border-radius: 12px;
}

.business .question-index-badge {
  background: var(--teal-surface);
  border-color: var(--teal-border);
  color: var(--teal);
}

.question-head-body {
  flex: 1;
  min-width: 0;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
}

.pill.subject-econ {
  color: var(--blue);
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
}

.pill.subject-business {
  color: var(--teal);
  background: var(--teal-surface);
  border: 1px solid var(--teal-border);
}

.pill.neutral {
  color: #475569;
  background: #f1f5f9;
}

.pill.source-pill {
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.pill.pill-skipped {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-weight: 600;
}

.question-title {
  font-size: clamp(18px, 2.2vw, 21px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
}

.question-body {
  padding: 28px 34px 32px;
}

/* 彻底重构案例框：去除原有的 border-left 3px 粗边！ */
.case-box {
  background: #f4f8f7;
  border: 1px solid #d1e7e2;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 26px;
  line-height: 1.85;
  font-size: 14px;
  white-space: pre-wrap;
  position: relative;
}

.case-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(13, 148, 136, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.case-title {
  display: block;
  color: var(--teal-deep);
  font-size: 15px;
  margin-bottom: 8px;
}

.case-text {
  color: var(--ink-secondary);
}

.question-image {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 22px;
}

.answer-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

/* 选项列表 (Option Cards) */
.option-list {
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  padding: 15px 18px;
  line-height: 1.65;
  background-color: #ffffff;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .option:not(.readonly):not(.selected):hover {
    border-color: #9cbfe8;
    background-color: #f8fbff;
  }
}

.option:not(.readonly):active {
  transform: scale(0.985);
}

.option.readonly {
  cursor: default;
}

.option.readonly:active {
  transform: none;
}

.option.selected,
.option:has(input:checked) {
  border-color: var(--blue);
  background-color: #f0f6ff;
  box-shadow: 0 0 0 1.5px var(--blue), 0 2px 10px rgba(37, 99, 235, 0.08);
}

.business .option.selected,
.business .option:has(input:checked) {
  border-color: var(--teal);
  background-color: #f0fdfa;
  box-shadow: 0 0 0 1.5px var(--teal), 0 2px 10px rgba(13, 148, 136, 0.08);
}

.option.correct,
.option.correct.selected,
.option.correct:has(input:checked) {
  border-color: #5eead4;
  background-color: #f0fdfa;
  box-shadow: 0 0 0 1.5px #0d9488, 0 2px 8px rgba(13, 148, 136, 0.08);
}

.option.incorrect,
.option.incorrect.selected,
.option.incorrect:has(input:checked) {
  border-color: #fda4af;
  background-color: #fff1f2;
  box-shadow: 0 0 0 1.5px #e11d48, 0 2px 8px rgba(225, 29, 72, 0.08);
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.option:focus-visible,
.option:has(input:focus-visible) {
  outline: 2.5px solid var(--blue);
  outline-offset: 2px;
}

.option-letter {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background-color: #edf3fa;
  color: #3b506c;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.option.selected .option-letter,
.option:has(input:checked) .option-letter {
  background-color: var(--blue);
  color: #ffffff;
  transform: scale(1.04);
}

.business .option.selected .option-letter,
.business .option:has(input:checked) .option-letter {
  background-color: var(--teal);
  color: #ffffff;
  transform: scale(1.04);
}

.option.correct .option-letter,
.option.correct.selected .option-letter {
  background-color: var(--teal);
  color: #ffffff;
  transform: scale(1.04);
}

.option.incorrect .option-letter,
.option.incorrect.selected .option-letter {
  background-color: var(--rose);
  color: #ffffff;
  transform: scale(1.04);
}

.option-text {
  flex: 1;
  font-size: 15px;
  color: var(--ink);
}

/* 答题结果卡片 (Result Panel) */
.result-panel {
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-top: 26px;
  line-height: 1.75;
  box-shadow: var(--shadow-subtle);
}

.result-panel.good {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}

.result-panel.bad {
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.result-badge-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.result-status-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.result-panel.good .result-status-icon {
  background: var(--teal);
}

.result-panel.bad .result-status-icon {
  background: var(--rose);
}

.result-panel h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.result-panel.good h3 { color: var(--teal-deep); }
.result-panel.bad h3 { color: #9f1239; }

.result-panel .answer-line {
  font-size: 15px;
  margin: 8px 0;
  color: var(--ink);
}

.answer-key {
  color: var(--teal);
  font-weight: 700;
  font-size: 16px;
}

.explanation-box {
  background: rgba(255, 255, 255, 0.7);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 12px 0;
}

.explanation-box p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  white-space: pre-wrap;
  line-height: 1.65;
}

.result-panel .point-line {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.point-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--ink-secondary);
  font-size: 12px;
}

/* 个人备考笔记与口诀模块 */
.note-box {
  margin-top: 14px;
  background: var(--amber-surface);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.06);
  transition: all 0.2s var(--ease);
}

.note-box.editing {
  background: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.note-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
}

.note-icon {
  font-size: 14px;
}

.note-hint {
  font-size: 11px;
  color: var(--muted);
}

.note-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-action-link {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.note-action-link:hover {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
}

.note-action-link.danger {
  color: var(--muted);
}

.note-action-link.danger:hover {
  background: var(--rose-surface);
  color: var(--rose);
}

.note-action-sep {
  color: var(--subtle);
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.note-content {
  font-size: 14px;
  line-height: 1.65;
  color: #78350f;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-highlight {
  background: linear-gradient(180deg, transparent 40%, #fef08a 40%);
  font-weight: 700;
  color: #92400e;
  padding: 1px 4px;
  border-radius: 3px;
}

.note-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(217, 119, 6, 0.22);
}

.note-footer .note-master-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(217, 119, 6, 0.25);
  color: #92400e;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.note-footer .note-master-btn:hover {
  background: #ffffff;
  color: #78350f;
  border-color: rgba(217, 119, 6, 0.45);
}

.note-footer .note-master-btn.is-mastered {
  background: #f0fdfa;
  color: var(--teal);
  border-color: var(--teal-border);
}

.note-footer .note-master-btn.is-mastered:hover {
  background: #ccfbf1;
  color: #0f766e;
}

/* 空笔记添加按钮 */
.note-empty-box {
  margin-top: 14px;
}

.note-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--amber-border);
  color: #b45309;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.note-add-btn:hover {
  background: var(--amber-surface);
  border-color: #f59e0b;
  color: #92400e;
  transform: translateY(-1px);
}

.note-add-icon {
  font-size: 14px;
  font-weight: bold;
}

/* 笔记编辑框 */
.note-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--ink);
  background: #ffffff;
  resize: vertical;
  min-height: 72px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.note-textarea:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.note-counter {
  font-size: 11px;
  color: var(--muted);
}

.note-btn-group {
  display: flex;
  gap: 8px;
}

.note-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.note-btn-cancel {
  background: var(--line-light);
  border-color: var(--line);
  color: var(--ink-secondary);
}

.note-btn-cancel:hover {
  background: #e2e8f0;
}

.note-btn-save {
  background: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.2);
}

.note-btn-save:hover {
  background: #b45309;
}

.note-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.source-line {
  color: var(--subtle);
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
  line-height: 1.7;
}

.source-line a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 题目底部操作栏 */
.question-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 20px 34px;
  background: #fbfcfe;
}

.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiet-button {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: all 0.16s ease;
}

.quiet-button:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.quiet-button.active {
  color: var(--amber);
  background: var(--amber-surface);
  border-color: var(--amber-border);
}

.quiet-button.danger {
  color: var(--rose);
}

.quiet-button.danger:hover {
  background: var(--rose-surface);
}

.quiet-button.skip-button {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.quiet-button.skip-button:hover {
  background: #f1f5f9;
  color: var(--ink);
  border-color: #cbd5e1;
}

.quiet-button .action-hint {
  font-size: 11.5px;
  opacity: 0.78;
  margin-left: 2px;
}

.quiet-button.active.level-2 {
  color: #ea580c;
  background: rgba(254, 242, 232, 0.9);
  border-color: rgba(253, 186, 116, 0.7);
}

.quiet-button.active.level-3 {
  color: var(--rose);
  background: var(--rose-surface);
  border-color: var(--rose-border);
}

.quiet-button.upgrade-action {
  color: #d97706;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.quiet-button.upgrade-action:hover {
  background: #fef3c7;
  color: #b45309;
}

.quiet-button.upgrade-action.level-3 {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.quiet-button.upgrade-action.level-3:hover {
  background: #ffedd5;
  color: #9a3412;
}

.favorite-top-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rose);
  background: var(--rose-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--rose-border);
}

/* 收藏夹多级子切换栏 */
.favorite-subtabs {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin: 16px 0 20px;
}

.favorite-subtab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.favorite-subtab-btn:hover {
  color: var(--ink);
}

.favorite-subtab-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.favorite-subtab-btn .subtab-count {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

.favorite-subtab-btn.active .subtab-count {
  background: var(--amber-surface);
  color: var(--amber);
}

.favorite-subtab-btn.active[data-level="2"] .subtab-count {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

.favorite-subtab-btn.active[data-level="3"] .subtab-count {
  background: var(--rose-surface);
  color: var(--rose);
}

/* ========================================================
   练习结束统计卡 (Finish Card)
   ======================================================== */
.finish-card {
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 50px 36px;
  text-align: center;
}

.finish-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--teal-surface);
  color: var(--teal);
  font: 700 32px Georgia, serif;
  margin: 0 auto 20px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15);
}

.finish-pill {
  margin-bottom: 12px;
}

.finish-card h1 {
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: 30px;
  margin-bottom: 8px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 36px 0;
}

.stat-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 28px;
  min-width: 110px;
}

.stat-box strong {
  display: block;
  font: 700 32px/1.2 Georgia, serif;
  color: var(--ink);
}

.stat-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stat-box.success strong { color: var(--teal); }
.stat-box.danger strong { color: var(--rose); }

.finish-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ========================================================
   登录界面 (Login Screen)
   ======================================================== */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background: radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0, transparent 40%), var(--paper);
}

.login-card {
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 20px 48px rgba(25, 45, 80, 0.09);
}

.login-card .brand {
  margin-bottom: 36px;
}

.login-pill {
  margin-bottom: 14px;
}

.login-card h1 {
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: 30px;
  margin-bottom: 10px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 26px;
}

.login-card .field-control {
  margin-bottom: 18px;
}

.login-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  margin-top: 8px;
}

.form-error {
  color: var(--rose);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
  font-weight: 500;
}

/* 消息通知 Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  background: #111e33;
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 1000;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========================================================
   备考笔记专区 (Notes Panel)
   ======================================================== */
.notes-panel {
  background: #ffffff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  max-width: 880px;
  box-shadow: var(--shadow-card);
}

.notes-panel h2 {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: 26px;
  margin: 4px 0 10px;
}

.notes-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.7) 0%, rgba(239, 246, 255, 0.7) 100%);
  border: 1px solid rgba(153, 246, 228, 0.6);
  border-radius: var(--radius-md);
  margin: 18px 0 24px;
}

.notes-stats-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

.notes-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}

.notes-stat-pill strong {
  color: var(--ink);
  font-weight: 700;
}

.notes-stat-pill.mastered strong {
  color: var(--teal);
}

.notes-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--teal) 0%, #0f766e 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transition: all 0.2s ease;
}

.notes-start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.notes-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-light);
}

.notes-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.notes-filter-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sort-segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.sort-btn {
  background: transparent;
  border: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-btn:hover {
  color: var(--ink);
}

.sort-btn.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.notes-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.notes-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.notes-toggle-label input[type="checkbox"] {
  accent-color: var(--teal);
  cursor: pointer;
}

.notes-toggle-label.highlight-wrong input[type="checkbox"] {
  accent-color: var(--coral, #f43f5e);
}

.notes-toggle-label.highlight-wrong:hover {
  color: var(--ink);
}

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

.note-item-card {
  background: #ffffff;
  border: 1px solid #e5edf5;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
  position: relative;
}

.note-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card);
}

.note-item-card.is-mastered {
  background: #fafcfb;
  border-color: #e2e8f0;
}

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

.note-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.note-card-chapter {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-surface);
  border: 1px solid var(--blue-border);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.note-card-chapter.business {
  color: var(--teal);
  background: var(--teal-surface);
  border-color: var(--teal-border);
}

.note-card-type {
  font-size: 11px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.note-wrong-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #e11d48;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mastered-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.note-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.note-card-time {
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

.note-card-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.note-card-stem {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 14px;
}

.note-card-quote {
  background: #f9fbfd;
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.note-card-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 6px;
}

.note-card-quote-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.note-card-edit-box {
  background: #fbfcfe;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.note-card-edit-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.note-card-edit-box textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.note-card-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #f1f5f9;
}

.note-practice-single-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--blue-surface);
  color: var(--blue);
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.note-practice-single-btn:hover {
  background: #dbeafe;
  color: var(--blue-hover);
}

.note-master-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.note-master-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
  border-color: #cbd5e1;
}

.note-master-btn.is-mastered {
  background: #f0fdfa;
  color: var(--teal);
  border-color: var(--teal-border);
  font-weight: 600;
}

.note-action-link.active-mastered {
  color: var(--teal);
  font-weight: 600;
}

/* ========================================================
   响应式适配 (Responsive Design)
   ======================================================== */
@media (max-width: 768px) {
  .shell { padding: 0 20px 50px; }
  .topbar { margin: 0 -20px; padding: 0 20px; height: 72px; }
  .brand-name { font-size: 19px; }
  .user-chip { display: none; }
  .intro { flex-direction: column; align-items: stretch; gap: 20px; padding: 32px 0 24px; }
  .subject-switch { width: 100%; }
  .subject-switch button { flex: 1; justify-content: center; }
  .view-tabs { gap: 20px; overflow-x: auto; margin-bottom: 24px; }
  .view-tabs button { white-space: nowrap; }
  .continue-banner-main { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .continue-banner-right { justify-content: space-between; width: 100%; }
  .continue-btn { flex: 1; justify-content: center; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-card { padding: 22px 22px 20px; }
  .knowledge-panel { padding: 20px 22px; }
  .collection-panel { padding: 24px 22px; }
  .notes-panel { padding: 24px 20px; }
  .notes-filter-row { grid-template-columns: 1fr; }
  .note-item-card { padding: 16px 18px; }
  .note-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .note-card-tags {
    gap: 6px;
    width: 100%;
  }
  .note-card-actions {
    justify-content: space-between;
    width: 100%;
    padding-top: 2px;
  }
  .note-action-link {
    padding: 3px 6px;
    font-size: 12.5px;
  }
  .note-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .note-card-footer-left {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .note-quiz-modal-btn,
  .note-practice-single-btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    font-size: 12.5px;
    padding: 7px 10px;
  }
  .note-master-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 12.5px;
    padding: 7px 10px;
  }
  .filters { grid-template-columns: 1fr; }
  .practice-shell { padding: 0 16px 50px; }
  .question-head { padding: 22px 20px 18px; gap: 14px; }
  .question-index-badge { min-width: 40px; height: 40px; font-size: 18px; }
  .question-body { padding: 22px 20px 26px; }
  .option { padding: 13px 14px; }
  .question-actions { padding: 16px 20px; flex-direction: column-reverse; align-items: stretch; }
  .quiet-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .favorite-subtabs { gap: 4px; padding: 3px; }
  .favorite-subtab-btn { font-size: 12.5px; padding: 8px 6px; }
  .practice-cta-btn { width: 100%; min-height: 46px; }
  .finish-card { padding: 36px 20px; }
  .result-stats { flex-direction: column; gap: 12px; }
  .login-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ==========================================================================
   富文本与数学公式渲染 (KaTeX & Markdown)
   ========================================================================== */

.md-highlight {
  background: linear-gradient(180deg, transparent 38%, #fef08a 38%);
  font-weight: 700;
  color: #854d0e;
  padding: 1px 4px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.md-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: rgba(100, 116, 139, 0.1);
  color: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  word-break: break-word;
}

.md-code .md-highlight,
.md-highlight .md-code {
  padding: 1px 4px;
}

.katex {
  font-size: 1.05em;
  text-rendering: auto;
  line-height: normal;
}

.question-title .katex {
  font-size: 0.95em;
}

.option-text .katex {
  font-size: 1.0em;
}

.katex-display {
  margin: 0.6em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.katex-display::-webkit-scrollbar {
  height: 4px;
}
.katex-display::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 2px;
}

/* ==========================================================================
   备考笔记单题自测弹窗 (Note Quiz Modal)
   ========================================================================== */

.note-card-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-quiz-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
  transition: all 0.15s ease;
}

.note-quiz-modal-btn:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
  transform: translateY(-0.5px);
}

.note-quiz-modal-btn svg {
  flex-shrink: 0;
}

.note-quiz-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.note-quiz-modal-container {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  animation: modalPopIn 0.22s var(--ease);
}

.note-quiz-modal-container.loading {
  padding: 60px 24px;
  align-items: center;
  justify-content: center;
}

.note-quiz-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.note-quiz-modal-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: modalSpin 0.75s linear infinite;
}

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

.note-quiz-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  flex-shrink: 0;
}

.note-quiz-modal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-quiz-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-fav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-fav-group .quiet-button {
  padding: 5px 10px;
  font-size: 12px;
}

.note-quiz-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--subtle);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.note-quiz-modal-close:hover {
  background: #f1f5f9;
  color: var(--rose);
}

.note-quiz-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}

.note-quiz-modal-stem {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

.note-quiz-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  flex-shrink: 0;
}

.note-quiz-modal-footer .secondary-button,
.note-quiz-modal-footer .primary-button {
  padding: 8px 18px;
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .note-quiz-modal-overlay {
    padding: 10px;
  }
  .note-quiz-modal-container {
    max-height: 94vh;
    border-radius: 12px;
  }
  .note-quiz-modal-body {
    padding: 16px;
    gap: 14px;
  }
}

