/* components.css — 拟物组件库 */

/* === 主按钮（拟物绿） === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  padding: 14px 22px;
  border-radius: var(--r-md);
  background: var(--c-bg-card);
  color: var(--theme-color);
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-up-sm);
  transition: transform .1s, box-shadow .1s, background .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #FAFAFA; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,0.1); }

/* 主题色实心按钮 */
.btn-primary {
  background: var(--theme-color);
  color: #FFF;
  border-color: var(--theme-dark);
  box-shadow: 0 4px 0 var(--theme-dark);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.btn-primary:hover { background: var(--theme-color); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--theme-dark); }

/* 危险按钮（红） */
.btn-danger {
  background: var(--c-red);
  color: #FFF;
  border-color: var(--c-red-dark);
  box-shadow: 0 4px 0 var(--c-red-dark);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.btn-danger:active { transform: translateY(4px); box-shadow: 0 0 0 var(--c-red-dark); }

/* 警告按钮（黄） */
.btn-warn {
  background: var(--c-yellow);
  color: var(--c-brown);
  border-color: var(--c-yellow-dark);
  box-shadow: 0 4px 0 var(--c-yellow-dark);
}

/* 幽灵按钮 */
.btn-ghost {
  background: transparent;
  color: var(--c-text-light);
  border: 2px dashed var(--c-border);
  box-shadow: none;
}

/* 大按钮 */
.btn-lg { padding: 18px 32px; font-size: 18px; border-radius: var(--r-lg); }
.btn-xl { padding: 22px 40px; font-size: 22px; border-radius: var(--r-xl); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; box-shadow: none; }
.btn-block { display: flex; width: 100%; }

/* 圆形按钮 */
.btn-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  padding: 0;
}

/* === 卡片 === */
.card {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--c-border);
}

.card-flat {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: 0 2px 0 var(--c-border);
  border: 2px solid var(--c-border);
}

/* 主题色卡片（拟物左色条） */
.card-themed {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  border: 2px solid var(--c-border);
  border-left: 8px solid var(--theme-color);
  box-shadow: 0 4px 0 rgba(0,0,0,0.05);
}

/* === 标签 === */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--c-divider);
  color: var(--c-text-light);
}
.tag-green { background: #D7FFB8; color: var(--c-green-dark); }
.tag-yellow { background: #FFEFA8; color: #92740A; }
.tag-red { background: #FFC9C9; color: var(--c-red-dark); }
.tag-blue { background: #B6E7FB; color: #126591; }
.tag-purple { background: #ECC8FF; color: #8241A8; }

/* === 难度星 === */
.diff {
  display: inline-flex;
  gap: 2px;
  color: var(--c-yellow);
  font-size: 12px;
}
.diff-empty { color: var(--c-text-lighter); }

/* === 进度条 === */
.progress {
  position: relative;
  height: 14px;
  background: var(--c-divider);
  border-radius: var(--r-full);
  overflow: hidden;
  border: 2px solid var(--c-border);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(180deg, var(--theme-color) 0%, var(--theme-dark) 100%);
  border-radius: var(--r-full);
  transition: width .4s cubic-bezier(.2,.8,.2,1);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.progress-bar.green { background: linear-gradient(180deg, var(--c-green-light) 0%, var(--c-green) 100%); }
.progress-bar.yellow { background: linear-gradient(180deg, #FFD93D 0%, var(--c-yellow) 100%); }
.progress-bar.red { background: linear-gradient(180deg, #FF7B7B 0%, var(--c-red) 100%); }

/* === 圆形进度环 === */
.ring {
  --size: 120px;
  --thick: 14px;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--theme-color) calc(var(--p, 0) * 1%), var(--c-divider) 0);
  display: flex; align-items: center; justify-content: center;
}
.ring::after {
  content: '';
  position: absolute;
  inset: var(--thick);
  background: var(--c-bg-card);
  border-radius: 50%;
}
.ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* === 任务项（多邻国式） === */
.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--c-bg-card);
  border-radius: var(--r-md);
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-up-sm);
  cursor: pointer;
  transition: transform .15s;
}
.task:hover { transform: translateY(-1px); }
.task:active { transform: translateY(2px); box-shadow: 0 0 0 var(--c-border); }
.task-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.task-icon.concept { background: #D7FFB8; }
.task-icon.calc    { background: #B6E7FB; }
.task-icon.mixed   { background: #ECC8FF; }
.task-icon.review  { background: #FFEFA8; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.task-meta { font-size: 12px; color: var(--c-text-light); margin-top: 2px; }
.task-status {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.task-status.todo { background: var(--c-divider); color: var(--c-text-light); }
.task-status.doing { background: #B6E7FB; color: #126591; }
.task-status.done { background: #D7FFB8; color: var(--c-green-dark); }
.task-status.review { background: #FFEFA8; color: #92740A; }

/* === Toast === */
.toast-wrap {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--c-bg-card);
  color: var(--c-text);
  padding: 12px 20px;
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border: 2px solid var(--c-border);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in .3s cubic-bezier(.2,.8,.2,1.2);
  pointer-events: auto;
}
.toast.success { border-color: var(--c-green); color: var(--c-green-dark); }
.toast.warn    { border-color: var(--c-yellow); color: #92740A; }
.toast.error   { border-color: var(--c-red); color: var(--c-red-dark); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === 模态框 === */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .2s;
  padding: 16px; /* 给移动端留呼吸空间 */
}
.modal {
  background: var(--c-bg-card);
  border-radius: var(--r-xl);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  border: 2px solid var(--c-border);
  animation: pop-in .3s cubic-bezier(.2,.8,.2,1.3);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-title { font-size: 22px; font-weight: 900; margin-bottom: 8px; padding-right: 36px; }
.modal-desc { color: var(--c-text-light); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.modal-content {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  /* 滚动条美化 */
  scrollbar-width: thin;
  scrollbar-color: #DDD transparent;
  margin: 0 -8px;
  padding: 0 8px;
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb { background: #DDD; border-radius: 3px; }
.modal-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--c-divider);
  flex-shrink: 0;
  justify-content: flex-end !important;
}
.modal-actions .btn {
  padding: 10px 16px !important;
  font-size: 14px !important;
  flex: 0 0 auto;
  min-width: 0;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--c-text-light);
  z-index: 2;
}
.modal-close:hover { background: #E0E0E0; }

/* 弹窗在窄屏的进一步压缩 */
@media (max-width: 480px) {
  .modal { padding: 20px; border-radius: var(--r-lg); }
  .modal-title { font-size: 18px; }
  .modal-actions { justify-content: stretch !important; }
  .modal-actions .btn {
    flex: 1 1 auto;
    min-width: 90px;
  }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* === 庆祝彩屑 === */
.confetti-wrap {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
}
.confetti {
  position: absolute; width: 8px; height: 14px;
  top: -20px;
  animation: confetti-fall 2.5s linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* === 拟物打卡条 === */
.streak-bar {
  background: linear-gradient(135deg, #FF8C42 0%, #FF4B4B 100%);
  color: #FFF;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 0 #C53030;
  position: relative;
  overflow: hidden;
}
.streak-bar::before {
  content: '🔥';
  position: absolute;
  right: -10px;
  top: -20px;
  font-size: 100px;
  opacity: 0.15;
  transform: rotate(-15deg);
}
.streak-num { font-size: 42px; font-weight: 900; line-height: 1; font-family: var(--font-en); }
.streak-label { font-size: 13px; opacity: 0.95; }

/* === 拟物小工具栏 === */
.chip-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-bg-card);
  border: 2px solid var(--c-border);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--theme-color); color: var(--theme-color); }
.chip.active {
  background: var(--theme-color);
  color: #FFF;
  border-color: var(--theme-dark);
  box-shadow: 0 3px 0 var(--theme-dark);
}

/* === 头像 === */
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--theme-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  position: relative;
  flex-shrink: 0;
}
.avatar-frame {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--theme-color);
  pointer-events: none;
}
.avatar-frame.legend { border: 3px solid; border-image: linear-gradient(45deg, #FFC800, #FF4B4B, #CE82FF) 1; }
.avatar-frame.gold { border: 3px solid var(--c-yellow); }

/* === XP 进度 === */
.xp-bar {
  background: var(--c-divider);
  border-radius: var(--r-full);
  height: 18px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--c-border);
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFC800 0%, #FF8C42 100%);
  border-radius: var(--r-full);
  transition: width .6s cubic-bezier(.2,.8,.2,1);
  position: relative;
}
.xp-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  border-radius: var(--r-full);
}

/* === 倒计时大数字 === */
.countdown {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  color: var(--theme-color);
  text-shadow: 0 4px 0 var(--theme-dark);
  letter-spacing: -2px;
}

/* === 番茄钟 === */
.pomo-display {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 96px;
  line-height: 1;
  color: var(--c-text);
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
}
.pomo-display.running { color: var(--c-red); }
.pomo-display.done { color: var(--c-green); }

.pomo-circle {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: conic-gradient(var(--c-red) calc(var(--p, 0) * 1%), var(--c-divider) 0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(255,75,75,0.3);
}
.pomo-circle::after {
  content: '';
  position: absolute; inset: 14px;
  background: var(--c-bg-card);
  border-radius: 50%;
}
.pomo-circle-content {
  position: relative; z-index: 1;
  text-align: center;
}

/* === 章节卡片 === */
.chapter-card {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  border: 2px solid var(--c-border);
  overflow: hidden;
  transition: transform .15s;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.05);
}
.chapter-card:hover { transform: translateY(-2px); }
.chapter-header {
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 2px solid var(--c-divider);
}
.chapter-num {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--theme-color);
  color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 20px;
  font-family: var(--font-en);
  box-shadow: 0 3px 0 var(--theme-dark);
  flex-shrink: 0;
}
.chapter-body { padding: 14px 18px; }
.chapter-stats {
  display: flex; gap: 14px; font-size: 12px; color: var(--c-text-light);
  margin-top: 4px;
}

/* === 闪光字符 === */
.shine {
  position: relative;
  overflow: hidden;
}
.shine::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
  animation: shine 3s linear infinite;
}
@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === 弹跳动画 === */
@keyframes bounce-in {
  0% { transform: scale(.3); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  70% { transform: scale(.95); }
  100% { transform: scale(1); }
}
.bounce-in { animation: bounce-in .5s cubic-bezier(.2,.8,.2,1.3); }

/* === wiggle 抖动（错误时） === */
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.wiggle { animation: wiggle .4s ease; }

/* === 比例拖动条 === */
.ratio-slider {
  display: flex;
  flex-direction: column;
  gap: 12px;
  user-select: none;
}
.ratio-rail {
  position: relative;
  height: 12px;
  background: linear-gradient(90deg, #58CC02 0%, #58CC02 50%, #1CB0F6 50%, #1CB0F6 100%);
  border-radius: var(--r-full);
  border: 2px solid var(--c-border);
  margin: 24px 12px 0;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.ratio-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  border-radius: var(--r-full);
  pointer-events: none;
  /* 用宽度表示左半填充，初始 50% */
  width: 50%;
  display: none; /* 实际用轨道自身渐变即可，不需 fill */
}
.ratio-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ratio-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.ratio-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  cursor: grab;
  z-index: 2;
  user-select: none;
}
.ratio-handle:active { cursor: grabbing; }
.ratio-handle-dot {
  width: 100%; height: 100%;
  background: #FFF;
  border: 3px solid var(--c-text);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--c-text), 0 4px 8px rgba(0,0,0,0.15);
  transition: transform .1s;
}
.ratio-handle:active .ratio-handle-dot {
  transform: scale(1.1);
  box-shadow: 0 1px 0 var(--c-text), 0 2px 4px rgba(0,0,0,0.2);
}
.ratio-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.ratio-label {
  text-align: center;
  font-weight: 800;
}
.ratio-emoji { font-size: 28px; line-height: 1; }
.ratio-name { font-size: 13px; color: var(--c-text); margin-top: 2px; }
.ratio-pct {
  font-size: 22px;
  font-family: var(--font-en);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.ratio-label-left .ratio-pct { color: var(--c-green); }
.ratio-label-right .ratio-pct { color: var(--c-blue); }

/* === 每日一句话 === */
.daily-quote {
  background: var(--c-bg-card);
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex; gap: 10px; align-items: flex-start;
  border-left: 5px solid var(--c-yellow);
}
.daily-quote-icon { font-size: 24px; flex-shrink: 0; padding-top: 2px; }
.daily-quote-text { font-size: 13.5px; line-height: 1.7; color: #555; font-weight: 500; }

/* === 推荐计划卡片 === */
.rec-card {
  background: linear-gradient(135deg, #F0FFF4 0%, #E8F5E9 100%);
  border-color: var(--c-green);
}
.rec-breakdown { display: flex; flex-direction: column; gap: 8px; }
.rec-subject {
  padding: 8px 12px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--r-sm);
}
.rec-sub-name { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.rec-sub-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #666; }

/* === 数据纵览 === */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.overview-item {
  text-align: center;
  background: var(--c-divider);
  border-radius: var(--r-md);
  padding: 10px 6px;
}
.overview-val { font-weight: 900; font-size: 20px; color: var(--theme-color); }
.overview-lbl { font-size: 10px; color: #999; margin-top: 2px; font-weight: 700; letter-spacing: 0.5px; }

/* === 日历热力图 === */
.calendar-heatmap { overflow-x: auto; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-dow { font-size: 10px; color: #999; text-align: center; padding: 2px 0; font-weight: 700; }
.cal-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  min-width: 16px;
  min-height: 16px;
  background: #ebedf0;
}
.cal-empty { background: transparent; }
.cal-lvl-0 { background: #ebedf0; }
.cal-lvl-1 { background: #c6e48b; }
.cal-lvl-2 { background: #7bc96f; }
.cal-lvl-3 { background: #239a3b; }
.cal-lvl-4 { background: #196127; }
.cal-today {
  box-shadow: 0 0 0 2px var(--theme-color);
  position: relative;
}
.cal-legend {
  width: 12px; height: 12px;
  border-radius: 2px;
  display: inline-block;
}

/* === 富文本编辑器 === */
.rte-wrap {
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-card);
}
.rte-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--c-divider);
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.rte-btn {
  width: 30px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-text-light);
  font-size: 13px;
  cursor: pointer;
  border: none;
}
.rte-btn:hover { background: #E0E0E0; color: var(--c-text); }
.rte-btn.active { background: var(--theme-color); color: #FFF; }
.rte-sep {
  width: 1px; height: 20px;
  background: var(--c-border);
  margin: 0 2px;
}
.rte-content {
  min-height: 180px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}
.rte-content:empty::before {
  content: attr(data-placeholder);
  color: var(--c-text-lighter);
}
.rte-content h3 { font-size: 18px; margin: 8px 0 4px; }
.rte-content ul, .rte-content ol { padding-left: 20px; margin: 4px 0; }
.rte-content li { margin: 2px 0; }

/* === 错题集 === */
.eb-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.eb-tabs { display: flex; gap: 4px; }
.eb-tab {
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 14px;
  background: var(--c-bg-card);
  border: 2px solid var(--c-border);
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-up-sm);
}
.eb-tab:hover { border-color: var(--theme-color); }
.eb-tab.active {
  background: var(--theme-color);
  color: #FFF;
  border-color: var(--theme-dark);
  box-shadow: 0 3px 0 var(--theme-dark);
}
.eb-filters { display: flex; gap: 8px; margin-left: auto; }
.eb-select {
  padding: 8px 12px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg-card);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
}
.eb-list { display: flex; flex-direction: column; gap: 12px; }
.eb-card {
  background: var(--c-bg-card);
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.eb-card-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.eb-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-full);
  background: var(--c-divider); color: var(--c-text-light);
}
.eb-question { font-size: 14px; font-weight: 600; line-height: 1.6; margin-bottom: 6px; }
.eb-chapter { font-size: 11px; color: #999; margin-bottom: 8px; }
.eb-answer {
  margin-top: 10px;
  padding: 12px;
  background: #F0FFF0;
  border-left: 4px solid var(--c-green);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.6;
}
.eb-answer-label { font-weight: 800; color: var(--c-green-dark); margin-bottom: 4px; }
.eb-explanation {
  margin-top: 8px;
  padding: 8px 10px;
  background: #FDF8E8;
  border-left: 3px solid var(--c-yellow);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.eb-form { display: flex; flex-direction: column; gap: 14px; }
.eb-form-row { display: flex; flex-direction: column; gap: 6px; }
.eb-form-row label { font-weight: 700; font-size: 13px; color: var(--c-text); }
.eb-review-card { padding: 24px; }
.eb-review-header { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.eb-review-question { font-size: 16px; font-weight: 700; line-height: 1.7; }
.eb-review-options { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.eb-review-options > div {
  padding: 10px 14px;
  background: var(--c-divider);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
}

/* === OCR 拖拽区 === */
.eb-ocr-zone { position: relative; }
.eb-ocr-drop-hint {
  padding: 10px 14px;
  border: 2px dashed var(--c-border);
  border-radius: var(--r-md);
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-top: 6px;
  transition: all .15s;
}
.eb-ocr-dragover .eb-ocr-drop-hint,
.eb-ocr-dragover textarea {
  border-color: var(--theme-color) !important;
  background: var(--theme-light) !important;
  color: var(--theme-color) !important;
}

/* === Markdown 渲染（错题/笔记） === */
.eb-md {
  line-height: 1.7;
  font-size: 14px;
  color: var(--c-text);
}
.eb-md h1, .eb-md h2, .eb-md h3 {
  margin: 8px 0 4px;
  font-weight: 900;
}
.eb-md h3 { font-size: 16px; }
.eb-md p { margin: 4px 0; }
.eb-md ul, .eb-md ol { padding-left: 22px; margin: 4px 0; }
.eb-md table {
  border-collapse: collapse;
  margin: 8px 0;
  width: 100%;
  font-size: 13px;
}
.eb-md table th, .eb-md table td {
  border: 1.5px solid var(--c-border);
  padding: 6px 10px;
  text-align: left;
}
.eb-md table th {
  background: var(--c-divider);
  font-weight: 800;
}
.eb-md code {
  background: var(--c-divider);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}
.eb-md blockquote {
  border-left: 3px solid var(--c-border);
  padding-left: 10px;
  color: #777;
  margin: 6px 0;
}

/* 录入区：Markdown 编辑提示 */
.eb-md-hint {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  line-height: 1.5;
}
.eb-md-hint code {
  background: var(--c-divider);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* === 科目切换器 === */
.subject-tabs {
  display: flex; gap: 8px;
}
.subject-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.12);
  color: #FFF;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
}
.subject-tab:hover { background: rgba(255,255,255,0.2); }
.subject-tab.active { background: #FFF; color: var(--theme-color); border-color: rgba(255,255,255,0.4); }

.subject-switcher {
  display: flex; gap: 8px;
  margin-bottom: 16px;
  background: var(--c-bg-card);
  padding: 6px;
  border-radius: var(--r-lg);
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-up-sm);
  width: fit-content;
}
.subject-switch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--c-text-light);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.subject-switch:hover { background: var(--c-divider); color: var(--c-text); }
.subject-switch.active {
  background: var(--switch-color, var(--theme-color));
  color: #FFF;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}

/* === 森林（3D 等距总览） === */
.forest-card {
  background: linear-gradient(180deg, #C5E0F5 0%, #D4ECF8 50%, #FFFFFF 100%);
  overflow: hidden;
}
.forest-empty {
  text-align: center; font-size: 15px; color: #999; padding: 32px 16px;
}
.forest-3d {
  position: relative; height: 200px;
  perspective: 600px;
}
.forest-ground {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(180deg, #A5D6A7 0%, #66BB6A 100%);
  border-radius: var(--r-md);
}
.forest-layer {
  position: absolute; inset: 10px 10px 30px 10px;
  transform-style: preserve-3d;
}
.forest-item {
  position: absolute;
  display: block; cursor: default;
  transition: transform .15s;
  user-select: none;
}
.forest-item:hover {
  transform: rotateX(60deg) rotateZ(45deg) scale(1.3) !important;
  z-index: 10;
}
.forest-dead {
  filter: grayscale(100%) brightness(0.7);
}
.forest-deco { opacity: 0.8; }

.forest-filter {
  padding: 3px 10px; font-size: 11px; border-radius: var(--r-sm);
  background: var(--c-divider); color: #666; border: 1.5px solid var(--c-border);
  font-weight: 700; cursor: pointer; transition: .15s;
}
.forest-filter.active {
  background: var(--theme-color); color: #FFF; border-color: var(--theme-dark);
}

/* 商店 desc 文字 */
.shop-desc {
  font-size: 11px;
  color: var(--c-text-light);
  margin-top: 2px;
  min-height: 14px;
}
.shop-equipped {
  background: rgba(88,204,2,0.15);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 12px;
}
