/* 英语炼单词 · 离线版 —— 清新校园笔记本风 */
:root {
  --primary: #3f7d54;
  --primary-deep: #2f6240;
  --green: #3f9e5f;
  --orange: #ee8f2c;
  --red: #d9534f;
  --bg: #f4f6f1;
  --card: #ffffff;
  --ink: #24312a;
  --ink-sub: #6b7a70;
  --line: #e4e9e2;
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body { background: var(--bg); color: var(--ink); }
#app { min-height: 100%; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px;
  background: rgba(244, 246, 241, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: 0.5px; white-space: nowrap; }
.topbar-sub { font-size: 11px; color: var(--ink-sub); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 顶部快捷操作栏：常驻返回主站 */
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.topbar-btn:active { transform: scale(0.94); }
.topbar-btn-icon { font-size: 13px; line-height: 1; font-weight: 700; }

/* ---------- 联网状态指示与主站同步 ---------- */
.net-status {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 11.5px; font-weight: 600; color: var(--ink-soft, #5b6b5e);
  white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.net-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b3bfb4;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.net-dot.on {
  background: #3f9d5f;
  box-shadow: 0 0 0 3px rgba(63, 157, 95, 0.18);
}
#sync-btn {
  position: relative;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink, #24312a);
}
#sync-btn.busy { opacity: 0.6; pointer-events: none; }
#sync-btn.busy .topbar-btn-icon { display: inline-block; animation: sync-spin 0.9s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
.sync-count {
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px;
  background: #e05252; color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
/* 未登录同步引导横幅 */
.sync-banner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
  padding: 8px 14px;
  background: #fff8e6;
  border-bottom: 1px solid #f0e0b2;
  font-size: 12.5px; color: #7a5c1e;
  animation: sync-slide 0.3s ease;
}
.sync-banner[hidden] { display: none; }
.sync-banner b { color: #b3541e; }
.sync-banner-btn {
  height: 26px; padding: 0 12px;
  border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: 11.5px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center;
}
.sync-banner-close {
  width: 26px; height: 26px;
  border: none; background: transparent;
  font-size: 16px; color: #b08a45; cursor: pointer;
  border-radius: 50%;
}
/* 同步轻量提示 Toast */
.sync-toast {
  position: fixed; left: 50%; bottom: 76px;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(36, 49, 42, 0.92);
  color: #fff;
  font-size: 12.5px; line-height: 1.5; text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}
.sync-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sync-toast.ok { background: linear-gradient(135deg, #3f7d54, #2f6240); }
@keyframes sync-slide { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@media (max-width: 480px) {
  .net-status { height: 28px; padding: 0 8px; font-size: 10.5px; }
  .sync-toast { bottom: 64px; }
}

/* ---------- 词库预下载 ---------- */
.dl-entry {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  cursor: pointer; border: 1px solid var(--line, rgba(36, 49, 42, 0.08));
  font: inherit; color: inherit;
}
.dl-entry:active { transform: scale(0.985); }
.dl-entry-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(63, 125, 84, 0.12), rgba(63, 125, 84, 0.05));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 21px;
}
.dl-entry-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-entry-title { font-size: 15px; font-weight: 700; color: var(--ink, #24312a); }
.dl-entry-sub { font-size: 12px; color: var(--ink-soft, #5b6b5e); }
.dl-entry-badge {
  flex-shrink: 0; height: 22px; padding: 0 9px;
  border-radius: 999px;
  background: rgba(63, 157, 95, 0.13); color: #2f7d4c;
  font-size: 11px; font-weight: 700; line-height: 22px; white-space: nowrap;
}
.dl-entry-arrow { flex-shrink: 0; font-size: 18px; color: #9aa89c; font-weight: 700; }

.dl-sheet-card { max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.dl-sheet-overview {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(63, 125, 84, 0.07);
  margin-bottom: 10px;
}
.dl-overview-label { font-size: 11.5px; color: var(--ink-soft, #5b6b5e); margin-bottom: 2px; }
.dl-overview-size { font-size: 19px; font-weight: 800; color: var(--primary-deep, #2f6240); }
.dl-btn-all { height: 40px; padding: 0 16px; font-size: 13px; flex-shrink: 0; }
.dl-btn-all:disabled { opacity: 0.55; }
.dl-tip { font-size: 11.5px; line-height: 1.6; color: var(--ink-soft, #5b6b5e); margin-bottom: 12px; }
.dl-book-list { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.dl-book-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(36, 49, 42, 0.08));
  margin-bottom: 8px;
  background: #fff;
}
.dl-book-cover {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary, #3f7d54), var(--primary-deep, #2f6240));
  color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.dl-book-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-book-name { font-size: 13.5px; font-weight: 700; color: var(--ink, #24312a); }
.dl-book-meta { font-size: 11.5px; color: var(--ink-soft, #5b6b5e); }
.dl-book-state { font-size: 11px; font-weight: 700; }
.dl-book-state.cached { color: #2f7d4c; }
.dl-book-state.uncached { color: #b08a45; }
.dl-book-btn {
  flex-shrink: 0; min-height: 44px; min-width: 84px;
  padding: 0 14px;
  border: none; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dl-book-btn.download {
  background: linear-gradient(135deg, var(--primary, #3f7d54), var(--primary-deep, #2f6240));
  color: #fff;
  box-shadow: 0 2px 8px rgba(63, 125, 84, 0.3);
}
.dl-book-btn.download:disabled { opacity: 0.6; }
.dl-book-btn.remove {
  background: rgba(224, 82, 82, 0.09); color: #c04545;
}
.dl-book-btn.remove:disabled { opacity: 0.55; }
.dl-book-progress {
  height: 4px; border-radius: 999px;
  background: rgba(36, 49, 42, 0.08);
  overflow: hidden; margin-top: 2px;
}
.dl-book-progress-fill {
  height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary, #3f7d54), #6fae83);
  transition: width 0.2s ease;
}
.dl-storage-warn {
  margin-top: 10px; padding: 10px 12px;
  border-radius: 12px;
  background: #fff3f0; color: #b35438;
  font-size: 12px; line-height: 1.6;
}
.dl-storage-warn.hidden { display: none; }
@media (max-width: 480px) {
  .dl-sheet-card { max-height: calc(100vh - 24px); border-radius: 20px 20px 0 0; margin-top: auto; }
  .dl-book-btn { min-width: 76px; }
}
.topbar-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 2px 8px rgba(63, 125, 84, 0.35);
}
/* 窄屏：副标题隐藏，按钮紧凑排版，保证品牌区与操作栏互不遮挡 */
@media (max-width: 480px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-sub { display: none; }
  .topbar-left { align-items: flex-start; }
  .topbar-btn { height: 30px; padding: 0 10px; font-size: 11.5px; gap: 3px; }
  .topbar-btn-icon { font-size: 12px; }
  .topbar-actions { gap: 6px; }
  .brand-name { font-size: 16px; }
}

/* ============ 视图切换 ============ */
.view { display: none; }
.view.active { display: block; }
.content {
  padding: 16px 16px calc(96px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 14px;
}

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(36, 49, 42, 0.05);
}
.card-title { font-size: 16px; font-weight: 800; }
.card-title.center { text-align: center; }
.card-sub { font-size: 12px; color: var(--ink-sub); margin-top: 3px; line-height: 1.5; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* 进度条 */
.progress-track {
  margin-top: 12px; height: 10px; border-radius: 6px;
  background: var(--bg); overflow: hidden;
}
.progress-track.slim { height: 6px; margin-top: 8px; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--orange), #f5a94e);
  border-radius: 6px;
  transition: width 0.4s ease;
}
.progress-pill {
  flex-shrink: 0; min-height: 32px; padding: 0 14px;
  border-radius: 999px; background: var(--bg);
  font-size: 13px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center;
}

/* 数据组 */
.stat-duo {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-around;
  background: var(--bg); border-radius: 12px; padding: 12px 8px;
}
.stat-item { text-align: center; flex: 1; min-width: 0; }
.stat-item.box { background: var(--bg); border-radius: 12px; padding: 12px 4px; }
.stat-num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-num.primary { color: var(--primary); }
.stat-num.green { color: var(--green); }
.stat-num.orange { color: var(--orange); }
.stat-label { font-size: 11px; color: var(--ink-sub); margin-top: 4px; }
.stat-divider { width: 1px; height: 28px; background: var(--line); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* ============ 按钮 ============ */
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
.btn-hero {
  width: 100%; min-height: 54px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--primary-deep));
  color: #fff; font-size: 17px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 12px rgba(63, 158, 95, 0.3);
}
.btn-hero:active { transform: scale(0.97); }
.btn-hero-icon { font-size: 14px; }
.btn-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-orange, .btn-green {
  min-height: 48px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; color: #fff;
}
.btn-orange { background: linear-gradient(135deg, var(--orange), #e07d14); }
.btn-green { background: var(--primary); }
.btn-orange:active, .btn-green:active { transform: scale(0.97); }
.btn-ghost {
  width: 100%; min-height: 48px; margin-top: 10px; border-radius: var(--radius);
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-sub);
}
.btn-danger {
  width: 100%; min-height: 48px; margin-top: 12px; border-radius: var(--radius);
  border: 1px solid #f0c9c8; background: #fdf3f3;
  font-size: 14px; font-weight: 700; color: var(--red);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px;
  font-size: 26px; line-height: 1; color: var(--ink-sub);
  display: flex; align-items: center; justify-content: center;
}

/* 今日目标 */
.badge-done {
  font-size: 11px; font-weight: 700; color: var(--green);
  background: #e9f5ec; border-radius: 999px; padding: 4px 10px;
}
.goal-body { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.goal-ring-wrap { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.goal-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-ring-bg { fill: none; stroke: var(--bg); stroke-width: 9; }
.goal-ring-fg {
  fill: none; stroke: var(--orange); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 264; stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.5s ease;
}
.goal-ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.goal-num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.goal-denom { font-size: 11px; color: var(--ink-sub); margin-top: 3px; }
.goal-side { flex: 1; min-width: 0; }
.goal-line { font-size: 13px; color: var(--ink-sub); margin-bottom: 6px; }
.goal-line b { color: var(--ink); font-size: 15px; }
.goal-tip { font-size: 11px; color: var(--ink-sub); background: var(--bg); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }

/* 词书卡 */
.card-course { display: flex; gap: 14px; }
.course-cover {
  width: 84px; height: 108px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -20px 30px rgba(0,0,0,0.12);
}
.course-cover-text { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 2px; }
.course-info { flex: 1; min-width: 0; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 10px; color: var(--primary); background: #e9f5ec;
  border-radius: 6px; padding: 3px 8px;
}

/* ============ 学习视图 ============ */
.content-study { padding-top: 8px; }
.study-head { display: flex; align-items: center; gap: 8px; }
.study-progress-text { flex: 1; text-align: center; font-size: 14px; font-weight: 700; }
.study-mode {
  font-size: 11px; font-weight: 700; color: var(--orange);
  background: #fdf0e0; border-radius: 999px; padding: 4px 10px;
}
.flip-scene { perspective: 900px; margin-top: 14px; }
.flip-card {
  position: relative; width: 100%; height: 340px;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-card.swipe-left { transform: translateX(-120%) rotate(-8deg); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.flip-card.swipe-right { transform: translateX(120%) rotate(8deg); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.flip-face {
  position: absolute; inset: 0; border-radius: 20px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.flip-front {
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(36, 49, 42, 0.08);
}
.flip-back {
  background: linear-gradient(165deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; transform: rotateY(180deg);
  box-shadow: 0 6px 20px rgba(47, 98, 64, 0.3);
}
.word-text { font-size: 40px; font-weight: 800; letter-spacing: 1px; }
.word-text.small { font-size: 26px; opacity: 0.9; }
.word-phonetic { font-size: 16px; color: var(--ink-sub); margin-top: 10px; }
.flip-hint {
  position: absolute; bottom: 20px; font-size: 11px; color: var(--ink-sub);
  background: var(--bg); border-radius: 999px; padding: 5px 14px;
}
.word-meaning { font-size: 20px; font-weight: 700; margin-top: 14px; }
.word-example { font-size: 14px; margin-top: 16px; line-height: 1.6; opacity: 0.95; }
.word-example-zh { font-size: 12px; margin-top: 6px; opacity: 0.75; }
.swipe-hint { text-align: center; font-size: 11px; color: var(--ink-sub); margin-top: 14px; }
.study-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.btn-unknown, .btn-known {
  min-height: 54px; border-radius: var(--radius); font-size: 16px; font-weight: 800;
}
.btn-unknown { background: #fff; border: 2px solid #f0c9c8; color: var(--red); }
.btn-known { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(63, 158, 95, 0.3); }
.btn-unknown:active, .btn-known:active { transform: scale(0.96); }

/* 结算 */
.result-card { text-align: center; padding: 28px 20px; }
.result-emoji { font-size: 48px; }
.result-tip { font-size: 12px; color: var(--ink-sub); margin: 14px 0 18px; }

/* ============ 错词本 ============ */
.wrong-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wrong-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 12px; padding: 12px;
}
.wrong-word { flex: 1; min-width: 0; }
.wrong-word b { font-size: 15px; display: block; }
.wrong-word span { font-size: 11px; color: var(--ink-sub); }
.wrong-remove {
  flex-shrink: 0; min-width: 44px; min-height: 44px; border-radius: 10px;
  font-size: 12px; font-weight: 700; color: var(--ink-sub);
  border: 1px solid var(--line); background: #fff;
}
.empty { text-align: center; padding: 36px 0; }
.empty-emoji { font-size: 40px; }
.empty-text { font-size: 13px; color: var(--ink-sub); line-height: 1.8; margin-top: 10px; }

/* ============ 我的 ============ */
.target-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 14px; }
.step-btn {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--bg); font-size: 22px; font-weight: 700; color: var(--primary);
}
.step-btn:active { transform: scale(0.94); }
.target-num { display: flex; flex-direction: column; align-items: center; }
.target-num span:first-child { font-size: 32px; font-weight: 800; color: var(--primary); }
.target-unit { font-size: 11px; color: var(--ink-sub); }
.about { text-align: center; font-size: 11px; color: var(--ink-sub); line-height: 1.8; padding: 8px 0 4px; }

/* ============ 底部 Tab ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(36, 49, 42, 0.05);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 48px;
}
.tab-icon { font-size: 20px; filter: grayscale(1); opacity: 0.55; }
.tab-text { font-size: 10px; color: var(--ink-sub); font-weight: 600; }
.tab.active .tab-icon { filter: none; opacity: 1; }
.tab.active .tab-text { color: var(--primary); font-weight: 800; }

/* ============ 庆祝 ============ */
.celebrate {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(36, 49, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
}
.celebrate-card {
  background: #fff; border-radius: 24px; padding: 36px 40px;
  text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  animation: pop 0.35s ease;
}
.celebrate-emoji { font-size: 56px; animation: bounce 0.8s ease infinite alternate; }
.celebrate-title { font-size: 20px; font-weight: 800; margin-top: 10px; }
.celebrate-sub { font-size: 13px; color: var(--ink-sub); margin-top: 6px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-8px); } }

.hidden { display: none !important; }

/* 中考倒计时小组件 */
.zk-countdown {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; cursor: pointer;
  background: linear-gradient(135deg, #fff7ed, #fffdf8);
  border: 1.5px solid rgba(238, 143, 44, 0.35);
}
.zk-count-icon { font-size: 26px; }
.zk-count-mid { flex: 1; min-width: 0; }
.zk-count-title { font-size: 14px; font-weight: 700; color: #5a4632; }
.zk-count-title b { color: var(--orange); }
.zk-count-sub { font-size: 11px; color: #a08b72; margin-top: 2px; }
.zk-count-days { display: flex; align-items: baseline; gap: 2px; color: var(--orange); }
.zk-count-days b { font-size: 30px; font-weight: 800; line-height: 1; }
.zk-count-days span { font-size: 12px; font-weight: 700; }
.zk-count-edit { width: 100%; display: flex; gap: 8px; margin-top: 10px; }
.zk-count-edit input {
  flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px;
  border: 1.5px solid rgba(238, 143, 44, 0.4); border-radius: 10px;
}
.zk-count-edit button {
  padding: 8px 16px; border: none; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, var(--orange), #e07d14); color: #fff;
}
.zk-count-err { width: 100%; font-size: 11px; color: #e05c5c; margin-top: 6px; }

/* ============ 词频分组进度 ============ */
.band-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.band-item { display: flex; align-items: center; gap: 10px; }
.band-badge {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.band-badge.b0 { background: var(--primary); }
.band-badge.b1 { background: var(--orange); }
.band-badge.b2 { background: #8a93a6; }
.band-body { flex: 1; min-width: 0; }
.band-title { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; }
.band-title span:last-child { color: var(--ink-sub); font-weight: 600; }
.band-track { margin-top: 5px; height: 6px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.band-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.4s ease; }
.band-fill.b0 { background: var(--primary); }
.band-fill.b1 { background: var(--orange); }
.band-fill.b2 { background: #8a93a6; }
.band-done { font-size: 10px; color: var(--green); font-weight: 700; }

/* ============ 错词工具栏 ============ */
.wrong-toolbar { margin-top: 14px; text-align: center; }
.btn-save-words {
  width: 100%; min-height: 48px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange), #e07d14);
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(238, 143, 44, 0.28);
}
.btn-save-words:active { transform: scale(0.97); }
.toolbar-tip { font-size: 11px; color: var(--ink-sub); margin-top: 8px; }

/* ============ 打卡海报 ============ */
.poster-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(36, 49, 42, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.poster-wrap { width: 100%; max-width: 320px; text-align: center; }
#poster-canvas {
  width: 100%; height: auto; border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  background: #fff;
}
.poster-actions { margin-top: 14px; }
.btn-ghost.light {
  border-color: rgba(255,255,255,0.5); color: #fff;
}
.poster-tip { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 10px; }

/* ============ 词书切换弹窗 ============ */
.book-sheet-wrap {
  width: 100%; max-width: 330px; background: var(--card);
  border-radius: 18px; padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.sheet-title { font-size: 16px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.book-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 14px; background: var(--card);
}
.book-option:active { transform: scale(0.98); }
.book-option.current { border-color: var(--primary); background: #eef6f0; }
.book-option-cover {
  width: 52px; height: 64px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; font-size: 13px; font-weight: 800;
}
.book-option-body { flex: 1; min-width: 0; }
.book-option-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.book-current-tag {
  font-size: 10px; color: #fff; background: var(--primary);
  border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle;
}
.book-option-meta { font-size: 11px; color: var(--ink-sub); margin-bottom: 6px; }
.book-option-track { height: 6px; }
.book-sheet-wrap .sheet-close {
  width: 100%; margin-top: 4px; color: var(--ink-sub); border-color: var(--line);
}
.course-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-switch {
  flex-shrink: 0; border: 1.5px solid var(--primary); color: var(--primary);
  background: var(--card); border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 700;
}
.mini-switch:active { transform: scale(0.94); }

/* ============ 专项测验 ============ */
.quiz-entry { margin-top: 14px; }
.quiz-btns { display: flex; gap: 10px; margin-top: 12px; }
.quiz-btn {
  flex: 1; min-height: 64px; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 2px solid transparent; background: var(--bg);
}
.quiz-btn b { font-size: 15px; }
.quiz-btn span { font-size: 11px; color: var(--ink-sub); }
.quiz-btn.q0 { border-color: var(--primary); }
.quiz-btn.q0 b { color: var(--primary); }
.quiz-btn.q1 { border-color: var(--orange); }
.quiz-btn.q1 b { color: var(--orange); }
.quiz-btn.q2 { border-color: #8a93a6; }
.quiz-btn.q2 b { color: #8a93a6; }
.quiz-btn:active { transform: scale(0.96); }

.band-item { cursor: pointer; border-radius: 12px; padding: 6px 4px; }
.band-item:active { background: var(--bg); }

.quiz-card {
  background: var(--card, #fff); border-radius: var(--radius-lg, 18px);
  padding: 36px 20px 28px; text-align: center;
  box-shadow: 0 4px 16px rgba(36,49,42,0.06);
}
.quiz-word { font-size: 34px; font-weight: 800; }
.quiz-phonetic { font-size: 14px; color: var(--ink-sub); margin-top: 8px; }
.quiz-q { font-size: 13px; color: var(--ink-sub); margin-top: 18px; }
.quiz-options { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  min-height: 52px; border-radius: var(--radius); padding: 10px 16px;
  background: var(--card, #fff); border: 2px solid var(--bg);
  font-size: 15px; font-weight: 600; text-align: left;
  box-shadow: 0 2px 8px rgba(36,49,42,0.04);
}
.quiz-opt:active { transform: scale(0.98); }
.quiz-opt.right { border-color: var(--green); background: #eaf6ee; color: var(--green); }
.quiz-opt.wrong { border-color: var(--orange); background: #fdf2e4; color: var(--orange); }
.quiz-opt:disabled { opacity: 0.95; }

/* 测验选项对错符号：右侧滑入动画 */
.quiz-opt { position: relative; padding-right: 44px; }
.quiz-mark {
  position: absolute; right: 14px; top: 50%;
  font-size: 20px; font-weight: 800; line-height: 1;
  opacity: 0; transform: translate(22px, -50%);
  animation: quizMarkIn 0.28s ease-out forwards;
}
.quiz-mark.ok { color: var(--green); }
.quiz-mark.no { color: var(--orange); }
@keyframes quizMarkIn {
  to { opacity: 1; transform: translate(0, -50%); }
}

/* 默写判分页 */
.grade-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.grade-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card, #fff); border: 2px solid var(--bg); border-radius: 12px; padding: 8px 12px;
}
.grade-row .g-idx { font-size: 12px; color: var(--ink-sub); width: 24px; flex-shrink: 0; }
.grade-row .g-mean { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grade-row input {
  width: 132px; flex-shrink: 0; padding: 8px 10px; font-size: 14px;
  border: 1.5px solid var(--line, #e0e4dd); border-radius: 10px; background: var(--card, #fff);
}
.grade-row.right { border-color: var(--green); background: #eaf6ee; }
.grade-row.wrong { border-color: var(--orange); background: #fdf2e4; }
.grade-row .g-answer { width: 100%; font-size: 12px; color: var(--orange); font-weight: 700; }
.grade-result { text-align: center; padding: 16px 0 4px; }
.grade-score { font-size: 40px; font-weight: 800; color: var(--green); }
.grade-detail { font-size: 13px; color: var(--ink-sub); margin: 6px 0 12px; }
[data-theme="dark"] .grade-row.right { background: rgba(63, 158, 95, 0.18); }
[data-theme="dark"] .grade-row.wrong { background: rgba(238, 143, 44, 0.18); }
.quiz-back {
  min-width: 44px; min-height: 44px; font-size: 15px; font-weight: 700;
  color: var(--ink-sub);
}
.quiz-level { font-size: 13px; font-weight: 700; color: var(--primary); }
.quiz-count { font-size: 13px; font-weight: 700; color: var(--ink-sub); }
.quiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* 错词复习日期 */
.wrong-next { display: block; font-size: 11px; margin-top: 3px; color: var(--ink-sub); }
.wrong-next.due { color: var(--orange); font-weight: 700; }

/* ============ 测验最佳成绩 & 文本导出 ============ */
.quiz-best {
  display: block; font-style: normal; font-size: 10px; font-weight: 700;
  color: var(--green); margin-top: 2px; min-height: 12px;
}
.quiz-best-line { font-size: 12px; color: var(--ink-sub); margin: 8px 0 12px; font-weight: 600; }
.quiz-best-line.record { color: var(--orange); font-weight: 800; }
.btn-copy-words {
  width: 100%; min-height: 48px; border-radius: var(--radius); margin-top: 10px;
  background: var(--card, #fff); border: 2px solid var(--primary);
  color: var(--primary); font-size: 14px; font-weight: 800;
}
.btn-copy-words:active { transform: scale(0.97); }

/* ============ 默写单范围选择面板 ============ */
.print-panel {
  margin-top: 14px; background: var(--card, #fff); border-radius: var(--radius);
  padding: 14px 14px 10px;
}
.print-panel-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.print-scope {
  width: 100%; min-height: 46px; border-radius: var(--radius);
  border: 2px solid var(--primary); background: var(--card, #fff);
  color: var(--ink); font-size: 14px; font-weight: 700; padding: 0 10px;
  appearance: auto;
}
.grade-scope { margin: 10px 0 6px; }

/* ============ 主题 / 周报按钮 ============ */
.btn-speak {
  margin-top: 14px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--primary); color: var(--primary); background: transparent;
}
.flip-back .btn-speak { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-speak:active { transform: scale(0.95); }
.btn-hero.slim { min-height: 48px; font-size: 14px; margin-top: 12px; width: 100%; }
.btn-theme {
  width: 100%; min-height: 48px; border-radius: var(--radius); margin-top: 12px;
  background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 800;
  border: 1px solid var(--line);
}
.btn-theme:active { transform: scale(0.97); }

/* ============ 深色主题 ============ */
[data-theme="dark"] {
  --bg: #161b18;
  --card: #1f2622;
  --ink: #e8ede9;
  --ink-sub: #9aa89e;
  --line: #2c3530;
}
[data-theme="dark"] .topbar { background: rgba(22, 27, 24, 0.88); }
[data-theme="dark"] .card { box-shadow: none; }
[data-theme="dark"] .flip-front { box-shadow: none; }
[data-theme="dark"] .flip-back { box-shadow: none; }
[data-theme="dark"] .btn-unknown { background: transparent; border-color: #5a3a3a; }
[data-theme="dark"] .wrong-remove { background: transparent; }
[data-theme="dark"] .tabbar { background: #1f2622; box-shadow: none; }
[data-theme="dark"] .celebrate-card { background: var(--card); }
[data-theme="dark"] .quiz-card { box-shadow: none; }
[data-theme="dark"] .quiz-opt { box-shadow: none; border-color: var(--line); }
[data-theme="dark"] .quiz-opt.right { background: rgba(63, 158, 95, 0.18); }
[data-theme="dark"] .quiz-opt.wrong { background: rgba(238, 143, 44, 0.18); }
[data-theme="dark"] .stat-item.box { background: var(--bg); }
[data-theme="dark"] .goal-ring-bg { stroke: var(--line); }

/* ============ 词书切换 / 拼写 / 顽固词专项 ============ */
.btn-switch-book {
  margin-top: 12px; width: 100%; min-height: 44px; border-radius: 12px;
  border: 1.5px dashed var(--primary); color: var(--primary);
  background: transparent; font-size: 13px; font-weight: 700;
}
.btn-switch-book:active { transform: scale(0.97); }
.dict-title { font-size: 13px; font-weight: 800; margin-top: 14px; color: var(--ink); }
.dict-btn {
  flex: 1; min-height: 56px; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 2px solid var(--line); background: var(--bg);
}
.dict-btn b { font-size: 14px; color: var(--ink); }
.dict-btn:active { transform: scale(0.96); }
.dict-speaker {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 6px;
  font-size: 30px; display: block;
  background: linear-gradient(135deg, var(--primary), var(--green));
  box-shadow: 0 4px 14px rgba(63, 158, 95, 0.35);
}
.dict-speaker:active { transform: scale(0.94); }
.dict-input {
  width: 100%; min-height: 52px; border-radius: var(--radius); margin-top: 14px;
  border: 2px solid var(--line); background: var(--card);
  font-size: 18px; font-weight: 700; text-align: center; color: var(--ink);
  outline: none; padding: 0 16px;
}
.dict-input:focus { border-color: var(--primary); }
.dict-feedback {
  margin-top: 12px; padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; text-align: center;
}
.dict-feedback.ok { background: rgba(63, 158, 95, 0.12); color: var(--green); }
.dict-feedback.no { background: rgba(238, 143, 44, 0.12); color: var(--orange); }
#dict-main .btn-hero { margin-top: 12px; }
.focus-zone {
  margin: 12px 0; padding: 12px; border-radius: 12px;
  background: rgba(238, 143, 44, 0.08); border: 1.5px solid rgba(238, 143, 44, 0.35);
}
.focus-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.focus-title { font-size: 13px; font-weight: 800; }
.focus-start {
  flex-shrink: 0; min-height: 36px; padding: 0 12px; border-radius: 10px;
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 800;
}
.focus-sub { font-size: 11px; color: var(--ink-sub); margin-top: 4px; }
.focus-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.focus-chip {
  font-size: 11px; font-weight: 700; color: var(--orange);
  background: var(--card); border: 1px solid rgba(238, 143, 44, 0.4);
  border-radius: 999px; padding: 4px 10px;
}
[data-theme="dark"] .dict-input { background: var(--card); }
[data-theme="dark"] .focus-chip { background: var(--card); }

/* ============ 词根词缀 / 测验中心弹窗 / 首页精简 ============ */
.word-etym {
  margin-top: 12px; font-size: 11px; line-height: 1.6; opacity: 0.85;
  background: rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 6px 12px;
}
.quiz-launch {
  width: 100%; display: flex; align-items: center; gap: 12px;
  text-align: left; cursor: pointer;
}
.quiz-launch-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: rgba(238, 143, 44, 0.12); font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.quiz-launch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.quiz-launch-text b { font-size: 15px; font-weight: 800; color: var(--ink); }
.quiz-launch-text span { font-size: 11px; color: var(--ink-sub); }
.quiz-launch-arrow { font-size: 22px; color: var(--ink-sub); flex-shrink: 0; }
.quiz-launch:active { transform: scale(0.98); }
.sheet-card {
  width: 100%; max-width: 420px;
  background: var(--card); border-radius: 24px; padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-title { font-size: 16px; font-weight: 800; }
.quiz-entry-title { font-size: 12px; font-weight: 700; color: var(--ink-sub); margin-top: 16px; }
.sheet-tip { font-size: 11px; color: var(--ink-sub); margin-top: 16px; text-align: center; }
[data-theme="dark"] .sheet-card { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }

/* ============ 谐音助记 / 徽章 / 错题复习按钮 ============ */
.word-mnemo {
  margin-top: 8px; font-size: 11px; line-height: 1.6; opacity: 0.85;
  background: rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 6px 12px;
}
.wrong-mnemo {
  display: block; font-size: 10px; font-style: normal; line-height: 1.5;
  color: var(--orange); margin-top: 4px;
}
.badge-grid {
  margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px; border-radius: 12px; text-align: center;
  background: var(--bg); border: 1px solid var(--line);
  filter: grayscale(1); opacity: 0.55;
}
.badge-item.got {
  filter: none; opacity: 1;
  background: rgba(63, 158, 95, 0.08); border-color: rgba(63, 158, 95, 0.35);
}
.badge-ico { font-size: 24px; }
.badge-name { font-size: 12px; font-weight: 800; color: var(--ink); }
.badge-desc { font-size: 10px; color: var(--ink-sub); line-height: 1.4; }
.btn-review-miss {
  width: 100%; min-height: 48px; border-radius: var(--radius); margin-top: 10px;
  background: var(--orange); color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(238, 143, 44, 0.3);
}
.btn-review-miss:active { transform: scale(0.96); }

/* ============ 每日一句 ============ */
.quote-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.quote-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(63, 125, 84, 0.1); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.quote-body { flex: 1; min-width: 0; }
.quote-en { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.5; font-style: italic; }
.quote-zh { font-size: 11px; color: var(--ink-sub); margin-top: 3px; line-height: 1.5; }
.quote-speak {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  font-size: 16px; border: 1px solid var(--line); background: var(--bg);
}
.quote-speak:active { transform: scale(0.92); }

/* ============ 下拉选择 / 词根卡 / 组队打卡 ============ */
.sheet-row { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.sheet-label { font-size: 12px; font-weight: 700; color: var(--ink-sub); }
.sheet-select {
  width: 100%; min-height: 48px; border-radius: var(--radius); padding: 0 12px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 600; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-sub) 50%), linear-gradient(135deg, var(--ink-sub) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
  margin-top: 6px;
}
.sheet-best { font-size: 11px; color: var(--ink-sub); margin-top: 12px; line-height: 1.6; }
.sheet-card .btn-hero { margin-top: 14px; }
.root-scene { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.root-card {
  width: 100%; max-width: 340px; background: var(--green-deep); border-radius: 24px;
  padding: 28px 24px; color: #fff; text-align: center;
  box-shadow: 0 10px 28px rgba(63, 125, 84, 0.35);
}
.root-k { font-size: 34px; font-weight: 900; letter-spacing: 1px; }
.root-m { font-size: 16px; font-weight: 700; margin-top: 6px; opacity: 0.9; }
.root-examples { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.root-ex {
  background: rgba(255, 255, 255, 0.14); border-radius: 10px; padding: 8px 12px;
  font-size: 12px; line-height: 1.6; text-align: left;
}
.root-ex b { font-size: 14px; margin-right: 6px; }
.root-nav { display: flex; gap: 10px; padding: 0 0 16px; }
.root-nav .btn-ghost { flex: 1; min-height: 48px; }
.team-head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.team-head b { font-size: 15px; font-weight: 800; color: var(--ink); }
.team-progress-text { font-size: 12px; font-weight: 700; color: var(--orange); }
.team-members { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.team-member {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg); border-radius: 12px; border: 1px solid var(--line);
}
.team-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(63, 158, 95, 0.12); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.team-member-info { flex: 1; min-width: 0; }
.team-member-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.team-member-days { font-size: 10px; color: var(--ink-sub); }
.team-today { font-size: 12px; font-weight: 800; flex-shrink: 0; }
.team-today.done { color: var(--green); }
.team-today.wait { color: var(--ink-sub); }
[data-theme="dark"] .root-card { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }

/* ============ 打卡图表 / 词根测验按钮 ============ */
.week-chart { margin-top: 14px; display: flex; gap: 8px; align-items: flex-end; height: 130px; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
  width: 100%; max-width: 34px; min-height: 4px; border-radius: 8px 8px 4px 4px;
  background: var(--green);
}
.chart-bar.today { background: var(--orange); }
.chart-num { font-size: 10px; font-weight: 800; color: var(--ink); }
.chart-label { font-size: 10px; color: var(--ink-sub); }
.root-quiz-btn {
  flex: 1; min-height: 52px; border-radius: var(--radius); font-size: 14px; font-weight: 800;
  background: var(--green); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.root-quiz-btn em { font-size: 10px; font-style: normal; opacity: 0.85; }
.root-quiz-btn:active { transform: scale(0.97); }

/* ============ 词根卡背景修复 / 例句 / 遗忘提醒 ============ */
.root-card {
  background: linear-gradient(135deg, #3f7d54, #2f6240);
}
.root-ex-s {
  display: block; font-size: 10px; opacity: 0.8; margin-top: 3px; font-style: italic;
}
.root-ex .ex-spk { float: right; font-size: 12px; opacity: 0.85; }
.remind-banner {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px;
  background: linear-gradient(135deg, #fff3e0, #ffe8cc); border: 1px solid rgba(238, 143, 44, 0.4);
  font-size: 13px; font-weight: 700; color: #8a5410;
}
.remind-banner b { color: var(--orange); font-size: 15px; }
.remind-go { color: var(--orange); font-weight: 800; flex-shrink: 0; }
.remind-banner:active { transform: scale(0.98); }
[data-theme="dark"] .remind-banner {
  background: rgba(238, 143, 44, 0.15); border-color: rgba(238, 143, 44, 0.35); color: #f0b56a;
}

/* ============ 复习统计面板 / 句库 / 横幅鼓励语 ============ */
.rs-grid { display: flex; gap: 8px; margin-top: 10px; }
.rs-item {
  flex: 1; min-width: 0; background: var(--bg); border-radius: 10px; padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.rs-item b { font-size: 17px; font-weight: 900; color: var(--ink); }
.rs-item span { font-size: 10px; color: var(--ink-sub); }
.review-stats .progress-track { margin-top: 12px; }
.sentence-row {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.sentence-row:last-child { border-bottom: none; }
.sentence-body { flex: 1; min-width: 0; }
.sentence-en { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.5; font-style: italic; }
.sentence-word { font-size: 11px; color: var(--green); margin-top: 3px; }
.sentence-acts { display: flex; gap: 4px; flex-shrink: 0; }
.sentence-acts button {
  width: 34px; height: 34px; border-radius: 50%; font-size: 14px;
  border: 1px solid var(--line); background: var(--bg);
}
.sentence-acts button:active { transform: scale(0.92); }
.ex-fav { font-size: 13px; margin-left: 4px; cursor: pointer; }
.remind-banner { flex-wrap: wrap; gap: 4px; }
.remind-main { flex: 1; min-width: 0; }
.remind-phrase { width: 100%; font-size: 11px; font-weight: 600; opacity: 0.75; }
.empty-tip { font-size: 12px; color: var(--ink-sub); padding: 10px 0; text-align: center; }
.btn-copy-words:disabled { opacity: 0.45; }

/* 错词列表窗口化渲染「展开更多」按钮 */
.wrong-more { width: 100%; margin-top: 4px; min-height: 48px; }

/* ---------- 拼写答对奖励动画：卡片翻转 + 粒子飞出 ---------- */
#dict-main { position: relative; perspective: 800px; }
#dict-main.dict-flip { animation: dictFlip 0.6s ease; }
@keyframes dictFlip {
  0% { transform: rotateY(0) scale(1); }
  40% { transform: rotateY(180deg) scale(1.04); }
  100% { transform: rotateY(360deg) scale(1); }
}
.dict-particle {
  position: absolute; left: 50%; top: 38%; width: 8px; height: 8px;
  border-radius: 50%; pointer-events: none; z-index: 50;
  background: var(--pc, #3f9e5f);
  animation: particleFly 0.9s cubic-bezier(0.15, 0.6, 0.4, 1) forwards;
}
.dict-particle.star { border-radius: 2px; width: 10px; height: 10px; }
@keyframes particleFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, -120px)) scale(0.4) rotate(var(--rot, 180deg)); opacity: 0; }
}

/* ---------- 连击计数器 + 屏幕浮动光效 ---------- */
.combo-badge {
  display: table; margin: 4px auto 10px; padding: 4px 14px;
  border-radius: 999px; background: linear-gradient(90deg, #ff7a18, #ffb347);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(255, 122, 24, 0.4);
}
.combo-badge.combo-pop { animation: comboPop 0.3s ease; }
@keyframes comboPop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.combo-glow {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 60; opacity: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 190, 80, 0.28), rgba(255, 122, 24, 0.12) 45%, transparent 70%);
}
.combo-glow.combo-glow-run { animation: glowPulse 0.9s ease forwards; }
@keyframes glowPulse {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- 打卡日历热力图 ---------- */
.cal-streak { font-size: 12px; color: var(--ink-sub); font-weight: 700; }
.cal-streak b { color: var(--orange); font-size: 14px; }
.cal-week-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-top: 12px; font-size: 11px; color: var(--ink-sub); text-align: center;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.cal-cell { aspect-ratio: 1; border-radius: 4px; display: block; }
.cal-cell.l0 { background: rgba(128, 128, 128, 0.12); }
.cal-cell.l1 { background: rgba(63, 158, 95, 0.25); }
.cal-cell.l2 { background: rgba(63, 158, 95, 0.45); }
.cal-cell.l3 { background: rgba(63, 158, 95, 0.7); }
.cal-cell.l4 { background: #3f9e5f; }
.cal-cell.cal-today { outline: 2px solid var(--orange); outline-offset: 1px; }
.cal-cell.cal-future { opacity: 0.35; }
.cal-legend {
  display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 8px;
}
.cal-legend .cal-cell { width: 10px; height: 10px; aspect-ratio: auto; }
.cal-legend-label { font-size: 10px; color: var(--ink-sub); margin: 0 2px; }

/* ---------- 结算页成绩卡：统计格 + 对比图表 ---------- */
.result-stats {
  display: flex; gap: 8px; margin: 4px 0 12px;
}
.rs-cell {
  flex: 1; min-width: 0; padding: 10px 4px; border-radius: 12px;
  background: rgba(63, 158, 95, 0.07); text-align: center;
}
.rs-cell b { display: block; font-size: 17px; color: var(--ink); }
.rs-cell span { display: block; font-size: 11px; color: var(--ink-sub); margin-top: 2px; }
.result-compare {
  margin: 0 0 12px; padding: 12px; border-radius: 12px;
  background: rgba(128, 128, 128, 0.06); text-align: left;
}
.cmp-row { display: flex; align-items: center; gap: 8px; }
.cmp-row + .cmp-row { margin-top: 10px; }
.cmp-label { flex-shrink: 0; width: 42px; font-size: 11px; font-weight: 800; color: var(--ink-sub); }
.cmp-bars { flex: 1; min-width: 0; }
.cmp-bar-line { display: flex; align-items: center; gap: 6px; }
.cmp-bar-line + .cmp-bar-line { margin-top: 4px; }
.cmp-bar { display: block; height: 8px; min-width: 2px; border-radius: 4px; transition: width 0.6s ease; }
.cmp-bar.cur { background: var(--green); }
.cmp-bar.prev { background: rgba(128, 128, 128, 0.35); }
.cmp-bar.cur.t { background: #4a7ddb; }
.cmp-bar.prev.t { background: rgba(128, 128, 128, 0.35); }
.cmp-bar-line em { flex-shrink: 0; font-style: normal; font-size: 10px; color: var(--ink-sub); white-space: nowrap; }

/* ---------- 错词本筛选 chips + 已掌握标记 ---------- */
.wrong-filter { display: flex; gap: 8px; margin-top: 10px; }
.wf-chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card);
  font-size: 12px; font-weight: 700; color: var(--ink-sub);
}
.wf-chip.active {
  border-color: var(--green); color: var(--green);
  background: rgba(63, 158, 95, 0.1);
}
.wrong-remove.wrong-master { color: var(--green); border-color: rgba(63, 158, 95, 0.4); }

/* ---------- 打卡日历海报按钮 ---------- */
.btn-cal-poster { margin-top: 12px; }
