/* ============================================================
   CC 视觉增强层 · Adobe Creative Cloud 风格
   增量样式：不改动 tokens/base/components/pages 任何现有文件
   约定：遵循项目「禁用位移动效（防抖动）」原则，
         hover 只做阴影 / 描边 / 背景变化，不做 translate
   ============================================================ */

/* ---------- 1. 渐变环境光（呼应 CC 的淡紫蓝环境） ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, rgba(56, 189, 248, .14), transparent 60%),
    radial-gradient(760px 520px at 68% 100%, rgba(236, 72, 153, .08), transparent 62%);
  background-repeat: no-repeat; /* 显式尺寸渐变 + repeat 默认会贴瓷砖，固定层一样出缝 */
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(99, 102, 241, .22), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, rgba(56, 189, 248, .16), transparent 60%),
    radial-gradient(760px 520px at 68% 100%, rgba(236, 72, 153, .12), transparent 62%);
  background-repeat: no-repeat; /* 同上 */
}

/* ---------- 2. Adobe 应用卡片网格 ---------- */
.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 18px;
}
.cc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
.cc-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.cc-card:focus-visible { outline: none; box-shadow: var(--ring); }

.cc-card-head { display: flex; align-items: flex-start; gap: 14px; }
.cc-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--shadow-1);
  letter-spacing: .5px;
}
/* 7 色循环（与项目 tile 色板同源） */
.cc-logo.t1 { background: linear-gradient(135deg, #2563eb, #4f8cff); }
.cc-logo.t2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.cc-logo.t3 { background: linear-gradient(135deg, #c77408, #fbbf24); }
.cc-logo.t4 { background: linear-gradient(135deg, #0d9d6c, #34d399); }
.cc-logo.t5 { background: linear-gradient(135deg, #e06f1f, #fb923c); }
.cc-logo.t6 { background: linear-gradient(135deg, #db2777, #f472b6); }
.cc-logo.t7 { background: linear-gradient(135deg, #0284c7, #38bdf8); }

.cc-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
}
.cc-card-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.cc-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

/* ---------- 3. Hero（CC 顶部推广条观感） ---------- */
.cc-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: var(--r-xl);
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-2);
  margin-bottom: 20px;
}
.cc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 240px at 88% -30%, rgba(255, 255, 255, .28), transparent 65%);
  pointer-events: none;
}
.cc-hero-title { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.cc-hero-sub { margin-top: 6px; font-size: 13px; opacity: .92; }
.cc-hero-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.cc-hero .btn {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .34);
  color: #fff;
}
.cc-hero .btn:hover { background: rgba(255, 255, 255, .26); }
.cc-hero .btn-solid {
  background: #fff;
  color: var(--brand-600);
  border-color: #fff;
}
.cc-hero .btn-solid:hover { background: #f2f6ff; }

/* ---------- 4. 分组导航增强（CC 左侧 Categories 观感） ---------- */
.nav { padding-top: 4px; }
.nav-group {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 18px 12px 8px;
}
.nav-item { border-radius: var(--r-md); }
.nav-tile { width: 34px; height: 34px; border-radius: 11px; }

/* ---------- 5. 顶部 tabs（CC 顶部 Apps / Desktop / Mobile） ---------- */
.cc-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.cc-tab {
  position: relative;
  padding: 10px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--t-fast);
}
.cc-tab:hover { color: var(--text-1); }
.cc-tab.on { color: var(--brand-500); }
.cc-tab.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-500);
}

/* ---------- 6. 现有卡片的温和增强（不改结构，仅视觉） ---------- */
.paper-card {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
.paper-card:hover { box-shadow: var(--shadow-2); }
.paper-grid { gap: 18px; }
.card { transition: box-shadow var(--t-med), border-color var(--t-med); }

/* ---------- 7. 科目卡：Adobe 应用卡风格 ----------
   纯 CSS 实现（用 ::before 生成彩色图标块），不改 subjects.js，
   避免与其他会话正在编辑的 JS 文件冲突。 */
#subList {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 18px;
}
#subList .card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 2px 14px;
  align-items: center;
  padding: 18px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
#subList .card:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
#subList .card::before {
  content: "";
  grid-row: 1 / span 3;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2563eb, #4f8cff);
  box-shadow: var(--shadow-1);
}
/* 四色循环，与项目 tile 色板同源 */
#subList .card:nth-child(4n + 2)::before { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
#subList .card:nth-child(4n + 3)::before { background: linear-gradient(135deg, #0d9d6c, #34d399); }
#subList .card:nth-child(4n + 4)::before { background: linear-gradient(135deg, #e06f1f, #fb923c); }
/* 科目卡独立类：纵向排布，不依赖 .card（避开图标卡 ::before 冲突） */
#subList .sub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl, 18px); padding: 18px; box-shadow: var(--shadow-1); cursor: pointer; transition: box-shadow var(--t-med), border-color var(--t-med); }
#subList .sub-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
#subList .sub-card:focus-visible { outline: 2px solid var(--brand-500, #3b82f6); outline-offset: 2px; }
/* ---------- 8. 试卷卡：同一套 Adobe 应用卡语言 ----------
   同样纯 CSS（::before 生成图标块），不改 papers.js。 */
.paper-grid .paper-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px 14px;
  align-items: start;
}
.paper-grid .paper-card::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 4;
  position: static;   /* 覆盖 pages.css 的 position:absolute+3px 顶部线 */
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2563eb, #4f8cff);
  box-shadow: var(--shadow-1);
}
.paper-grid .paper-card > * { grid-column: 2; }
.paper-grid .paper-card:nth-child(4n + 2)::before { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.paper-grid .paper-card:nth-child(4n + 3)::before { background: linear-gradient(135deg, #0d9d6c, #34d399); }
.paper-grid .paper-card:nth-child(4n + 4)::before { background: linear-gradient(135deg, #e06f1f, #fb923c); }
/* ---------- 9. 掌握程度三态标记（exam.js 生成的 .mastery-btn） ----------
   彩色圆点 + 符号的图标按钮，点击在 熟练 / 模糊 / 不会 间循环。
   用符号而非文字，避免 CSS content 无法跟随 i18n 切换语言。 */
.mastery-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.mastery-btn:hover { border-color: var(--line-strong); background: var(--surface-3); }
.mastery-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.mastery-btn i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 18px;
}
.mastery-btn[data-level="PROFICIENT"] i { background: var(--ok-500); }
.mastery-btn[data-level="PROFICIENT"] i::after { content: "\2713"; }  /* ✓ 熟练 */
.mastery-btn[data-level="FUZZY"] i { background: var(--warn-500); }
.mastery-btn[data-level="FUZZY"] i::after { content: "\223F"; }        /* ∿ 模糊 */
.mastery-btn[data-level="UNKNOWN"] i { background: var(--err-500); }
.mastery-btn[data-level="UNKNOWN"] i::after { content: "!"; }          /* ! 不会 */

/* ---------- 11. 顶部双层 tabs（主 tabs + 子 tabs，参考 Adobe CC）---------- */
.cc-tab-main {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
}
.cc-tab-main .cc-tab { padding: 14px 4px; font-size: 14px; font-weight: 650; }
.cc-tab-sub {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.cc-tab-sub .cc-tab { padding: 8px 2px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cc-tab-sub .cc-tab.on { color: var(--brand-500); }

/* ---------- 12. 状态点（Updated 绿 / Update Available 蓝）---------- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.status-dot.updated { background: var(--ok-500); box-shadow: 0 0 0 3px rgba(22, 128, 60, .18); }
.status-dot.available { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }

/* ---------- 13. 分组标题（侧栏 / 列表的 "Categories" 小标题）---------- */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 22px 0 10px;
}
.section-title:first-child { margin-top: 4px; }

/* ---------- 14. 应用卡片行（list 视图：logo + 名称 + 状态 + 主按钮 + ⋯）---------- */
.app-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
.app-row:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.app-row-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: var(--shadow-1);
}
.app-row-logo.t1 { background: linear-gradient(135deg, #2563eb, #4f8cff); }
.app-row-logo.t2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.app-row-logo.t3 { background: linear-gradient(135deg, #0d9d6c, #34d399); }
.app-row-logo.t4 { background: linear-gradient(135deg, #e06f1f, #fb923c); }
.app-row-logo.t5 { background: linear-gradient(135deg, #db2777, #f472b6); }
.app-row-logo.t6 { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.app-row-title { font-size: 15.5px; font-weight: 700; color: var(--text-1); }
.app-row-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.app-row-status { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.app-row-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- 15. 主次按钮变体（Open ghost / Update 实心蓝）---------- */
.btn-update {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  color: #fff;
}
.btn-update:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: #1d4ed8; }

/* ---------- 16. 强化渐变 banner（蓝紫粉，呼应 CC）---------- */
.cc-hero {
  background: linear-gradient(135deg, #6b8aff 0%, #8a5cf6 50%, #d96bff 100%);
}

/* ---------- 17. 空态与骨架 ---------- */
.empty,
.loading-block { border-radius: var(--r-lg); }

.paper-title { font-size: 15.5px; font-weight: 700; line-height: 1.35; }

/* ---------- 18. 题目展开答案（papers 预览弹窗）----------
   遵守项目「禁用位移动效（防抖动）」原则：仅做显隐与颜色变化，无位移动画。 */
.q-answer-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.q-ans-toggle {
  align-self: flex-start;
  gap: 6px;
  color: var(--brand-600);
  border-color: var(--brand-200, var(--line));
}
.q-ans-toggle svg { width: 15px; height: 15px; }
.q-ans-toggle.on { background: var(--surface-3); color: var(--text-2); border-color: var(--line); }
.q-answer[hidden] { display: none; }
/* 正确答案选项高亮（仅颜色变化，无位移动画） */
.ans-key.hit { background: var(--ok-bg, #e8f7ee); border-color: var(--ok-500, #22a06b); color: var(--ok-700, #157347); font-weight: 700; }
/* 即时对错（无评分）：选对绿、选错红 */
.opt.hit { background: var(--ok-bg, #e8f7ee); border-color: var(--ok-500, #22a06b); }
.opt.hit .opt-key { background: var(--ok-500, #22a06b); color: #fff; border-color: transparent; }
.opt.miss { background: var(--err-bg, #fdeeee); border-color: var(--err-500, #d33); }
.opt.miss .opt-key { background: var(--err-500, #d33); color: #fff; border-color: transparent; }
/* 选中态与判分态同框：只留判分色，不要再叠选中的蓝环。
 * 起因：.opt.sel（pages.css）带 box-shadow: 0 0 0 1px var(--brand-500)，而 .opt.hit/.miss
 * 只改 border-color/background、没写 box-shadow —— 两层颜色不同的描边同时画出来，
 * 红边外面再套一圈蓝边，1x 下就是用户反馈的"蓝光还有边缘"（紫红色双层描边）。
 * 判分色本身已经说清"对/错"，蓝色选中描边此时是冗余噪音，直接压掉。 */
.opt.sel.hit, .opt.sel.miss { box-shadow: none; }
/* 非选择题作答区（填空逐空输入 + 简答文本域；对错只过渡颜色） */
.fill-line { font-size: 13.5px; line-height: 2.2; color: var(--text-1); }
.fill-blank { width: 130px; max-width: 44vw; height: 32px; padding: 4px 10px; margin: 0 4px; vertical-align: baseline; }
.short-ans { width: 100%; min-height: 76px; margin-top: 4px; }
.fill-blank.hit, .short-ans.hit { border-color: var(--ok-500, #22a06b); background: var(--ok-bg, #e8f7ee); }
.fill-blank.miss, .short-ans.miss { border-color: var(--err-500, #d33); background: var(--err-bg, #fdeeee); }
/* 做完横幅 */
.done-banner { display: flex; align-items: center; gap: 8px; background: var(--ok-bg, #e8f7ee); border: 1px solid var(--ok-500, #22a06b); color: var(--ok-700, #157347); font-weight: 700; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.done-banner svg { width: 18px; height: 18px; }
.m-row { margin-top: 10px; display: flex; }
.m-row .seg { margin: 0; }
.seg-sm button { min-width: 0; padding: 6px 9px; }
.seg-sm button svg { width: 15px; height: 15px; }
/* 掌握度三态图标固定三色（绿/黄/红），选中再加亮底 */
.m-seg button[data-lv="PROFICIENT"], .m-filter button[data-m="PROFICIENT"] { color: var(--ok-500, #22a06b); }
.m-seg button[data-lv="FUZZY"], .m-filter button[data-m="FUZZY"] { color: var(--warn-500, #b7791f); }
.m-seg button[data-lv="UNKNOWN"], .m-filter button[data-m="UNKNOWN"] { color: var(--err-500, #d64545); }
.m-seg button.on, .m-filter button.on { background: var(--surface-3); }
.m-seg button[data-lv="PROFICIENT"].on { background: var(--ok-bg, rgba(34,160,107,.12)); }
.m-seg button[data-lv="FUZZY"].on { background: var(--warn-bg, rgba(183,121,31,.12)); }
.m-seg button[data-lv="UNKNOWN"].on { background: var(--err-bg, rgba(214,69,69,.12)); }
/* 侧栏筛选：允许换行，防窄栏溢出 */
.m-filter { display: flex; flex-wrap: wrap; width: 100%; }
.m-filter button { flex: 1 1 0; min-width: 0; }
/* 章节头：题组分隔（颜色区分，无位移动画） */
.sec-head { margin: 18px 0 10px; font-size: 14px; font-weight: 800; color: var(--brand-700, #1d4ed8); border-left: 4px solid var(--brand-500, #3b82f6); padding-left: 10px; }
/* 跳转目标闪标：仅颜色描边变化 */
/* 定位闪光：outline 会自动沿目标元素自身的 border-radius 走。
 * 这里**绝不能**再写 border-radius —— 曾经写死 12px，而 .q-card 圆角是 --r-lg(18px)，
 * 且 cc-ui.css 晚于 pages.css 加载，单类选择器后写覆盖 → 闪光期间卡片圆角从 18px 跳到
 * 12px，肉眼可见"边缘错位"。删掉后轮廓与卡片边缘严丝合缝。 */
.flash-target { outline: 2px solid var(--brand-500, #3b82f6); outline-offset: 2px; }
/* 题卡/预览卡跳转锚点：避开顶部 sticky 栏，防落到上一题 */
.q-card, .q-editor { scroll-margin-top: var(--jump-top, 110px); }
/* 左侧章节目录（练习/预览共用） */
.exam-toc { position: sticky; top: calc(var(--header-h, 64px) + 10px); align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 14px); box-shadow: var(--shadow-1); padding: 14px; max-height: calc(100vh - var(--header-h, 64px) - 40px); overflow-y: auto; }
.exam-layout.has-toc { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1150px; }
.exam-layout.has-toc .exam-wrap { max-width: 880px; }
.pv-layout { display: grid; gap: 16px; align-items: start; max-width: 1140px; margin: 0 auto; }
.pv-layout.has-toc { grid-template-columns: 220px minmax(0, 1fr); }
.pv-main { min-width: 0; }
/* 扫描件图片翻页 */
.img-pager { margin-top: 10px; }
.img-pager img[data-bookimg] { display: block; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-height: 120px; }
.book-text img[data-bimg] { display: block; max-width: 100%; margin: 10px auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
@media (max-width: 1100px) {
  .exam-layout.has-toc, .pv-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .exam-toc, .exam-side { position: static; max-height: 220px; }
}
.book-text { margin-top: 10px; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.book-text p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.75; color: var(--text-1); }
.book-text p:last-child { margin-bottom: 0; }
.book-text p.hl { background: var(--brand-50, #eef4ff); border-left: 3px solid var(--brand-500, #3b82f6); padding: 6px 10px; border-radius: 0 8px 8px 0; }
/* 书籍目录：可滚动标题索引 */
.toc-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 118px; overflow: auto; }
.toc-list button { border: 1px solid var(--line); background: var(--surface-3); border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.toc-list button:hover { color: var(--brand-600); border-color: var(--brand-200, var(--line)); }
/* 分类目录（子集目录）：原文件夹分组的折叠容器 */
.cat-group { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); margin-bottom: 12px; overflow: hidden; }
.cat-group > summary { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; list-style: none; user-select: none; }
.cat-group > summary::-webkit-details-marker { display: none; }
.cat-group > summary::before { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(-45deg); transition: transform var(--t-fast); margin-right: 2px; flex: 0 0 auto; }
.cat-group[open] > summary::before { transform: rotate(45deg); }
.cat-name { font-size: 14.5px; font-weight: 750; color: var(--text-1); flex: 1 1 auto; min-width: 0; }
.cat-group > summary .muted { font-size: 12px; }
.cat-body { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
/* 背诵卡：知识点标题 + 点击展开答案 */
.kp-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.kp-card > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; user-select: none; }
.kp-card > summary::-webkit-details-marker { display: none; }
.kp-q { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--text-1); line-height: 1.5; }
.kp-toggle { flex: 0 0 auto; font-size: 12px; font-weight: 650; color: var(--brand-600, #2563eb); background: var(--brand-50, #eef4ff); border: 1px solid var(--brand-200, var(--line)); border-radius: 999px; padding: 4px 12px; cursor: pointer; white-space: nowrap; }
.kp-toggle:hover { background: var(--brand-100, #dbeafe); }
.kp-ans { padding: 12px 16px; font-size: 13.5px; line-height: 1.8; color: var(--text-1); background: var(--surface-2, #f7f9fc); border-top: 1px solid var(--line); white-space: pre-wrap; }
/* 题/答视觉分层（2026-09-13 用户反馈"看不出哪是题、哪是内容答案"）：
 * 题=品牌色「问」徽章；答=绿色左条 + 「答」徽章 + 浅底，一眼可分 */
.kp-card > summary .kp-q::before {
  content: '问'; flex: 0 0 auto; display: inline-block;
  font-size: 10.5px; font-weight: 800; line-height: 1; letter-spacing: .02em;
  color: var(--brand-600, #2563eb); background: var(--brand-50, rgba(59, 130, 246, .12));
  border: 1px solid var(--brand-200, #c6dbff); border-radius: 6px;
  padding: 3px 5px; margin-right: 8px;
}
.kp-card .kp-ans { border-left: 3px solid var(--ok-500, #22c55e); }
.kp-card .kp-ans::before {
  content: '答'; display: inline-block;
  font-size: 10.5px; font-weight: 800; line-height: 1; letter-spacing: .02em;
  color: var(--ok-500, #22c55e); background: var(--ok-bg, rgba(34, 197, 94, .12));
  border: 1px solid var(--ok-line, var(--ok-500, #22c55e)); border-radius: 6px;
  padding: 3px 5px; margin: 0 6px 6px 0;
}
/* 阅读条上的背诵/答题模式 seg：图标 + 文字（2026-09-13 用户拍板"也是图标"） */
.seg[data-readmode] button { display: inline-flex; align-items: center; gap: 5px; }
.seg[data-readmode] button svg { width: 13px; height: 13px; }
/* 文件夹管理：标题栏操作 + 新建表单 + 书行"移动到"下拉 */
.cat-group > summary .cat-actions { margin-left: auto; display: flex; gap: 4px; }
.cat-new-form { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.cat-new-form .input-sm { flex: 1 1 160px; min-width: 0; }
.book-cat-select { font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-1); max-width: 200px; }
/* 预览题号跳转栅格 */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.pv-grid button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 0; font-size: 12.5px; font-weight: 650; color: var(--text-2); cursor: pointer; }
.pv-grid button:hover { border-color: var(--brand-400); color: var(--brand-600); }
/* 番茄钟圆环与周统计 */
.focus-ring { position: relative; display: inline-block; }
.focus-ring .fr-bg { stroke: var(--surface-3); }
.focus-ring .fr-val { stroke: var(--brand-500, #3b82f6); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.focus-clock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.focus-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.fbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fbar i { display: block; width: 100%; max-width: 34px; border-radius: 6px; background: var(--brand-200, #bfdbfe); }
.fbar span { font-size: 11px; color: var(--text-3); }
/* 专注：占比图例 + 多计时行 */
.share-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 10px; }
.share-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.share-item i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.share-item b { font-variant-numeric: tabular-nums; }
.fdot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; flex: 0 0 10px; }
.ftimer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; flex-wrap: wrap; }
.ftimer-name { font-size: 13.5px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 90px; }
.ftimer-clock { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ftimer-state { font-size: 11px; font-weight: 700; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.ftimer-state.on { color: var(--ok-500); border-color: var(--ok-line); background: var(--ok-bg); }
.ftimer-btns { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

/* ---------- 19. 品牌字「QB」艺术字（粗体 + 渐变描边 + 紧凑字距）---------- */
.qb-wordmark {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.045em;
  line-height: 1;
  background: linear-gradient(135deg, #1e293b 0%, #4f46e5 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .qb-wordmark {
  background: linear-gradient(135deg, #f1f5f9 0%, #a5b4fc 55%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* 侧栏收起时仅留 logo mark，wordmark 自动隐藏由 sidebar 折叠逻辑控制（保留 class 即可） */
.sidebar.collapsed .qb-wordmark { display: none; }

/* ---------- 20. 用户首字渐变头像（顶栏 + 侧栏共用）---------- */
.avatar-init {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  user-select: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 4px 10px -4px rgba(99, 102, 241, .45);
}
.side-user .avatar-init { font-size: 14px; }

