/* ==========================================================================
   音乐史 · 考研 — 学习平台
   设计令牌严格取自 Ardot 设计稿（Bento Notion / 暖米白纸感）
   ========================================================================== */

:root {
  /* 画布与表面 */
  --bg-canvas: #F7F6F3;      /* rgb(247,246,243) 工作区底色 */
  --bg-surface: #FFFFFF;     /* 侧边栏 / 顶栏 / 卡片 */
  --border: #E7E7EA;         /* rgb(231,231,234) 1px 描边 */

  /* 文字 */
  --text-1: #37352F;         /* rgb(55,53,47) 暖墨黑 */
  --text-2: #6B7280;         /* rgb(107,114,128) 次级文字 */

  /* 强调色 */
  --accent: #9B5DE5;         /* rgb(155,93,229) 主操作 / 活跃导航 */
  --accent-ink: #7C3AED;     /* 标签文字 */
  --accent-tint: #F2ECFC;    /* 紫色浅底 */
  --orange: #F26430;         /* rgb(242,100,48) */
  --orange-tint: #FDECE4;
  --green: #10B981;
  --green-tint: #E8F6EF;
  --amber: #F59E0B;
  --amber-tint: #FFF6E5;
  --hover: #F1EFEA;

  /* 圆角 */
  --r-card: 8px;
  --r-btn: 6px;
  --r-pill: 24px;
  --r-chip: 14px;
  --r-filter: 16px;
  --r-search: 19px;
  --r-bar: 3px;

  /* 阴影 */
  --shadow-card: 0 1px 2px rgba(15, 15, 15, .04);
  --shadow-pop: 0 4px 12px rgba(15, 15, 15, .06);

  /* 字体：全部走系统字体栈，不依赖外部 CDN，国内 0 延迟加载 */
  --font-serif: 'Songti SC', 'STSong', 'Source Han Serif SC', 'Noto Serif SC', 'SimSun', Georgia, serif;
  --font-sans: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Hiragino Sans GB', sans-serif;
  --font-num: 'SF Pro Display', 'Segoe UI', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text-1);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ============================ 侧边栏 ==================================== */
.sidebar {
  flex: 0 0 256px;
  width: 256px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.ws-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-card);
  background: var(--bg-canvas);
}
.ws-logo {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  overflow: hidden;
}
.ws-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ws-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ws-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.ws-sub  { font-size: 11px; font-weight: 400; color: var(--text-2); line-height: 1.4; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.nav-item svg { flex: 0 0 18px; stroke: var(--text-2); transition: stroke .15s ease; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item.active svg { stroke: #fff; }

.nav-gap { height: 14px; flex: 0 0 14px; }
.sidebar-fill { flex: 1 1 auto; }

/* 侧边栏底部账号条：当前昵称 + 快捷退出 */
.side-acct {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-acct-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.side-acct-avatar {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  overflow: hidden;
}
/* 自定义头像（data URL）铺满圆形 */
.side-acct-avatar .av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-img { display: block; }
.side-acct-name {
  font-size: 12.5px; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-acct-out {
  flex: 0 0 auto;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-2); font-size: 11.5px; font-family: inherit;
  padding: 4px 9px; border-radius: var(--r-btn); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.side-acct-out:hover { background: var(--hover); color: var(--text-1); border-color: var(--text-2); }
.side-acct-out:disabled { opacity: .6; cursor: default; }

.streak {
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.streak-head { display: flex; align-items: center; justify-content: space-between; }
.streak-label { font-size: 12px; color: var(--text-2); }
.streak-value { font-size: 13px; font-weight: 600; }
.streak-bar { height: 6px; border-radius: var(--r-bar); background: var(--border); overflow: hidden; }
.streak-bar i { display: block; height: 100%; border-radius: var(--r-bar); background: var(--accent); }
.streak-hint { font-size: 12px; color: var(--text-2); }

/* ============================== 主区 =================================== */
/* 目标视口 Desktop 1920×1080：内容区宽 1600px；
   超宽屏（>1824px）时以 1696px 为上限居中，避免卡片被过度拉伸 */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-canvas);
}

.topbar {
  flex: 0 0 64px;
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.topbar-title { font-family: var(--font-serif); font-weight: 700; font-size: 18px; }
.topbar-spacer { flex: 1; }

.search {
  width: 340px; height: 38px;
  border-radius: var(--r-search);
  background: var(--bg-canvas);
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
}
.search-icon { display: grid; place-items: center; flex: 0 0 16px; }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text-1);
}
.search input::placeholder { color: var(--text-2); }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-card);
  background: var(--bg-canvas);
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--hover); }

.avatar {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 18px;
  background: var(--orange);
  color: #fff;
  font-size: 14px; font-weight: 600;
  display: grid; place-items: center;
}

.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1760px;
  align-self: center;
}

/* =========================== 通用块 ==================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-title { font-family: var(--font-serif); font-weight: 700; font-size: 18px; }
.section-link {
  background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--accent);
}
.section-link:hover { text-decoration: underline; }

.btn {
  border: 0; cursor: pointer;
  font-size: 14px; font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--r-btn);
  transition: opacity .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--bg-canvas); color: var(--text-1); }
.btn-ghost:hover { background: var(--hover); }

.chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: var(--r-chip);
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 12px; font-weight: 500;
  align-self: flex-start;
}

.dot { width: 8px; height: 8px; border-radius: 4px; flex: 0 0 8px; }

/* ========================= 学习工作台 ================================== */
.greeting-block { display: flex; align-items: center; gap: 14px; }
.greeting-avatar {
  flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--border);
}
.greeting-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.greeting { font-family: var(--font-serif); font-weight: 700; font-size: 30px; line-height: 1.3; }
.greeting-sub { font-size: 13px; color: var(--text-2); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.stat-value { font-family: var(--font-num); font-weight: 600; font-size: 26px; line-height: 1.2; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }

.continue { padding: 28px; display: flex; align-items: center; gap: 32px; }
.continue-body { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.continue-title { font-family: var(--font-serif); font-weight: 700; font-size: 26px; line-height: 1.3; }
.continue-desc { font-size: 13px; color: var(--text-2); }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 6px; border-radius: var(--r-bar); background: var(--border); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: var(--r-bar); background: var(--accent); }
.pct { font-family: var(--font-num); font-weight: 600; font-size: 13px; }
.actions { display: flex; gap: 12px; }

.continue-media {
  flex: 0 0 340px;
  width: 340px; height: 190px;
  border-radius: var(--r-card);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 15% 10%, #FBF3E9 0%, #F3E9F8 45%, #EADFF7 100%);
}
.continue-media::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(55,53,47,.10) 0 1px, transparent 1px 14px);
  opacity: .5;
}
.continue-media .media-note { position: absolute; right: 18px; bottom: 14px; opacity: .28; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.feature { padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .15s ease; }
.feature:hover { border-color: #D9D6D0; }
.feature-icon { width: 36px; height: 36px; border-radius: var(--r-card); display: grid; place-items: center; }
.feature-title { font-size: 15px; font-weight: 600; }
.feature-desc { font-size: 12px; color: var(--text-2); line-height: 1.7; }

.practice { padding: 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: border-color .15s ease; }
.practice:hover { border-color: #D9D6D0; }
.practice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.practice-title { font-size: 14px; font-weight: 600; }
.practice-meta { font-size: 11px; color: var(--text-2); }

/* ========================== 知识框架页 ================================= */
.page-head { display: flex; flex-direction: column; gap: 16px; }
.page-title { font-family: var(--font-serif); font-weight: 700; font-size: 32px; line-height: 1.3; display: flex; align-items: center; gap: 10px; }
.page-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--border); }
.page-sub { font-size: 13px; color: var(--text-2); }

/* 三大模块切换 */
.module-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.module-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.module-tab:hover { background: var(--hover); color: var(--text-1); }
.module-tab.active {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-1);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

/* 题型徽标（M 名词解释 · J 简答 · L 论述） */
.badge {
  flex: 0 0 auto;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-m { background: #F2ECFC; color: #7C3AED; }
.badge-j { background: #FFF6E5; color: #B45309; }
.badge-l { background: #E8F6EF; color: #0E7A5F; }
.badge-heat-hot { background: #FDECEC; color: #D93025; }
.badge-heat-warm { background: #E8F1FB; color: #1A6FC4; }

/* 详情面板：章节与知识点 */
.detail-section { display: flex; flex-direction: column; gap: 6px; }
.detail-section-name {
  font-size: 12px; font-weight: 600; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.detail-section-count { font-size: 10.5px; font-weight: 400; color: var(--text-2); }
.point-list { display: flex; flex-direction: column; gap: 4px; }
.point-row {
  display: flex; align-items: center; gap: 8px;
  font-family: inherit;
  font-size: 12.5px; line-height: 20px; color: var(--text-1);
  padding: 4px 6px;
  margin: 0 -6px;
  background: none; border: 0; cursor: pointer;
  border-radius: var(--r-btn);
  text-align: left;
  transition: background .15s ease;
}
.point-row:hover { background: var(--hover); }
.point-row .point-name { min-width: 0; flex: 1; }
.point-arrow { display: flex; align-items: center; transform: rotate(90deg); opacity: 0; }
.point-row:hover .point-arrow { opacity: 1; }

/* ============================ 思维导图 ================================ */
.mm-card { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.mm-chapters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mm-chapters-label {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding-right: 8px; border-right: 1px solid var(--border); margin-right: 4px;
}
.mm-chip {
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--bg-canvas); color: var(--text-2);
  border: 1px solid var(--border);
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.mm-chip:hover { background: var(--hover); color: var(--text-1); }

.mm-tree { display: flex; flex-direction: column; gap: 24px; }
.mm-root {
  align-self: center;
  padding: 14px 28px;
  border-radius: var(--r-card);
  color: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow-pop);
}
.mm-root-name { font-family: var(--font-serif); font-weight: 700; font-size: 22px; line-height: 1.3; }
.mm-root-meta { font-size: 12px; opacity: .85; }

.mm-branches { display: flex; flex-direction: column; gap: 18px; position: relative; }
.mm-branches::before {
  content: ""; position: absolute; left: 50%; top: -24px; width: 1px; height: 24px;
  background: var(--border);
}
.mm-branch { position: relative; padding-left: 24px; }
.mm-branch::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.mm-branch::after {
  content: ""; position: absolute; left: 8px; top: 24px; width: 16px; height: 1px;
  background: var(--border);
}
.mm-node-section {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-chip);
  font-family: inherit; font-size: 13px; font-weight: 600;
  border: 0; cursor: pointer;
}
.mm-caret { display: flex; transform: rotate(90deg); transition: transform .18s ease; }
.mm-branch:not(.open) .mm-caret { transform: rotate(0deg); }
.mm-node-name { min-width: 0; }
.mm-count { font-size: 11px; font-weight: 400; opacity: .75; }

.mm-children {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 0 4px 24px;
}
.mm-branch:not(.open) .mm-children { display: none; }
.mm-leaf {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r-card);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-family: inherit; font-size: 12.5px; color: var(--text-1);
  cursor: pointer; max-width: 100%;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, background .15s ease;
}
.mm-leaf:hover { border-color: #D9D6D0; background: var(--hover); }
.mm-leaf-name { min-width: 0; }

/* ============================ 知识点弹层 ================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(55, 53, 47, .32);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: min(860px, 100%);
  max-height: min(90vh, 940px);
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 32px;
  animation: popIn .18s ease;
  box-shadow: 0 4px 12px rgba(15, 15, 15, .06), 0 16px 48px rgba(15, 15, 15, .14);
}
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: var(--r-btn);
  background: none; border: 0; cursor: pointer;
  display: grid; place-items: center;
  transform: rotate(45deg);
  transition: background .15s ease;
}
.modal-close:hover { background: var(--hover); }
.modal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-title {
  font-family: var(--font-serif); font-weight: 700; font-size: 27px; line-height: 1.35;
  padding-right: 40px;
}
.modal-meta { font-size: 12px; color: var(--text-2); }
.modal-body {
  flex: 1 1 auto; min-height: 0;   /* 弹窗限高时正文优先占满中段，其余块沉底 */
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; line-height: 24px;
}
.modal-body p { margin: 0; }
/* 正文圈注（<mark> 由 emphasizeText 生成：引号术语 + 《》作品名）——琥珀底圆角色块，模拟笔圈重点 */
.modal-body mark, .flash-body mark {
  background: #FFF3D6; color: #8A5A00; font-weight: 700;
  border-radius: 4px; padding: 0 3px; margin: 0 1px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.modal-empty { color: var(--text-2); }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px;
}
.modal-src { font-size: 11px; color: var(--text-2); }

.tabs { display: flex; gap: 8px; }
.tab {
  background: none; border: 0; cursor: pointer;
  padding: 8px 14px 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color .15s ease;
}
.tab .tab-bar { height: 2px; width: 100%; border-radius: 1px; background: transparent; }
.tab.active { color: var(--accent); font-weight: 600; }
.tab.active .tab-bar { background: var(--accent); }
.tab:hover:not(.active) { color: var(--text-1); }

.fw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

.tl-card { padding: 24px; display: flex; flex-direction: column; gap: 24px; min-height: 436px; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tl-title { font-family: var(--font-serif); font-weight: 700; font-size: 18px; }
.filters { display: flex; gap: 8px; }
.filter {
  padding: 6px 12px; border-radius: var(--r-filter);
  font-size: 12px; font-weight: 500;
  background: var(--bg-canvas); color: var(--text-2);
  border: 0; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.filter.active { background: var(--accent-tint); color: var(--accent-ink); }

.track { display: flex; flex-direction: column; gap: 10px; }
.track-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
/* 节点较多时横向滑动（手机端时间轴不再挤压溢出）；
   宽度足够时 min-width 不生效，桌面端布局不变 */
.track-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.track-line { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: max-content; }
/* 连接线：与节点圆点垂直居中对齐（圆点半径 6px） */
.track-line::before {
  content: ""; position: absolute; left: 5%; right: 5%; top: 6px;
  height: 1px; background: var(--border);
}
.node {
  position: relative; z-index: 1;
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0;
}
.node-dot { width: 12px; height: 12px; border-radius: 6px; background: var(--accent); transition: box-shadow .15s ease; }
.track-cn .node-dot { background: var(--orange); }
.node-text {
  font-size: 12px; font-weight: 500; line-height: 16px;
  color: var(--text-1); text-align: center; white-space: pre-line;
}
.node.active .node-text { font-weight: 600; }
.node.active .node-dot { box-shadow: 0 0 0 3px var(--accent-tint); }
.track-cn .node.active .node-dot { box-shadow: 0 0 0 3px var(--orange-tint); }
.node:hover .node-dot { box-shadow: 0 0 0 3px var(--accent-tint); }

.tl-foot { margin-top: auto; font-size: 12px; color: var(--text-2); }

.detail {
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.detail-title { font-family: var(--font-serif); font-weight: 700; font-size: 25px; line-height: 1.35; }
.detail-meta { font-size: 12px; color: var(--text-2); }
.divider { height: 1px; background: var(--border); }
.detail-desc { font-size: 13px; line-height: 22px; }
.detail-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.detail-list { font-size: 13px; line-height: 22px; }
.detail-actions { margin-top: 4px; }
.detail-actions .btn { width: 100%; }

/* 知识地图 */
.map-card { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.tree-group { border-bottom: 1px solid var(--border); }
.tree-group:last-child { border-bottom: 0; }
.tree-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px; cursor: pointer; background: none; border: 0;
  width: 100%; text-align: left;
}
.tree-caret { transition: transform .18s ease; display: grid; place-items: center; }
.tree-group.open .tree-caret { transform: rotate(90deg); }
.tree-name { font-size: 15px; font-weight: 600; }
.tree-badge { margin-left: auto; font-size: 12px; color: var(--text-2); }
.tree-body { display: none; padding: 0 4px 14px 30px; flex-direction: column; gap: 10px; }
.tree-group.open .tree-body { display: flex; }
.tree-item { display: flex; gap: 10px; font-size: 13px; line-height: 20px; }
.tree-item b { font-weight: 600; min-width: 76px; }
.tree-item span { color: var(--text-2); }

/* ====================== 打卡卡片流（全屏聚焦） ========================== */
.workspace-session { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.session-page { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 18px 32px 26px; gap: 16px; }
.session-bar { display: flex; align-items: center; gap: 16px; }
.session-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.session-progress .progress { flex: 1; }
.session-kind {
  font-size: 12px; font-weight: 500; padding: 5px 12px;
  border-radius: var(--r-pill); background: var(--bg-canvas); color: var(--text-2); white-space: nowrap;
}
.kind-new { background: var(--accent-tint); color: var(--accent-ink); }
.kind-review { background: #E8F1FE; color: #1862B8; }
.kind-relearn { background: #FDECEC; color: #D93025; }
.kind-extra { background: var(--amber-tint); color: #B45309; }

.flash-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.flash-card {
  width: min(860px, 100%);
  height: min(76vh, 760px);
  min-height: 380px;
  cursor: pointer;
  perspective: 1600px;
}
.flash-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .38s cubic-bezier(.4, 0, .2, 1);
  transform-style: preserve-3d;
}
.flash-card.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 34px 44px;
  display: flex; flex-direction: column; gap: 16px;
}
.flash-front { align-items: center; justify-content: center; text-align: center; }
.flash-back { transform: rotateY(180deg); overflow-y: auto; }
.flash-q { font-family: var(--font-serif); font-weight: 700; font-size: 30px; line-height: 1.42; }
.flash-q.small { font-size: 20px; line-height: 1.5; color: var(--text-1); }
.flash-path { font-size: 12px; color: var(--text-2); }
.flash-hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.flash-back-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flash-body { font-size: 14px; line-height: 1.95; color: #4A4842; display: flex; flex-direction: column; gap: 12px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;   /* 卡片定高时正文区内滚，关键词行钉在卡底 */
}
.flash-body p.lead { color: var(--text-1); font-weight: 500; }

.kw-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kw {
  font-size: 12px; padding: 4px 10px; border-radius: var(--r-chip);
  background: var(--accent-tint); color: var(--accent-ink);
}

/* 聆听作品（listen-data.js，讲义点名代表作） */
.listen-sec { margin-top: 14px; }
.listen-sec .detail-label { display: flex; align-items: baseline; gap: 8px; }
.listen-tip { font-weight: 400; font-size: 11px; color: var(--text-2); }
.listen-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.listen-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 4px 10px; border-radius: var(--r-chip);
  background: var(--green-tint, #E7F3EE); color: #0E7A5F;
}
.listen-item .listen-name { color: inherit; text-decoration: none; font-weight: 500; }
.listen-item .listen-name:hover { text-decoration: underline; }
.listen-item .listen-b {
  font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 4px;
  background: rgba(14, 122, 95, .14); color: inherit; text-decoration: none;
  font-family: var(--font-num, inherit);
}
.listen-item .listen-b:hover { text-decoration: underline; }

/* iPod 风格试听挂件：有直达歌曲页的作品（点开卡片时逐个落下的入场动效） */
.listen-row.has-ipod { align-items: flex-start; gap: 10px; }
.ipod-wrap {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
}
.ipod {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  width: 92px; padding: 8px 8px 8px; border-radius: 12px; box-sizing: border-box;
  background: #E24FA5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 -3px 0 rgba(0, 0, 0, .07);
  text-decoration: none;
  animation: ipod-in .5s cubic-bezier(.34, 1.56, .64, 1) both;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ipod:hover {
  transform: translateY(-2px) rotate(-1.5deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 -3px 0 rgba(0, 0, 0, .07), 0 6px 14px rgba(226, 79, 165, .28);
}
.ipod:active { transform: scale(.95); }
.ipod-screen {
  width: 100%; height: 46px; border-radius: 4px; box-sizing: border-box;
  background: #FDF6FB; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 4px 8px; overflow: hidden;
}
.ipod-song {
  font-size: 11px; font-weight: 500; color: #2C2C2A; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipod-artist {
  font-size: 10px; color: #B4538B; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipod-wheel {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .30);
  display: grid; place-items: center;
}
.ipod-btn {
  width: 19px; height: 19px; border-radius: 50%;
  background: #FDF6FB; color: #D6348F;
  display: grid; place-items: center;
  font-size: 8px; line-height: 1; padding-left: 1px;
}
.ipod-b {
  font-size: 10px; line-height: 1; color: var(--text-2); text-decoration: none;
}
.ipod-b:hover { text-decoration: underline; color: var(--text-1, inherit); }
@keyframes ipod-in {
  0% { opacity: 0; transform: translateY(-16px) scale(.85) rotate(-4deg); }
  60% { opacity: 1; transform: translateY(2px) scale(1.03) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ipod { animation: none; }
}

.rate-bar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rate-hint { font-size: 12.5px; color: var(--text-2); }
.rate { display: flex; gap: 12px; width: min(560px, 100%); }
.rate .btn { flex: 1; position: relative; }
.rate-again { background: #FDECEC; color: #D93025; }
.rate-fuzzy { background: var(--amber-tint); color: #B45309; }
.rate-known { background: var(--green-tint); color: #0E7A5F; }
.rate .btn:disabled { opacity: .45; cursor: not-allowed; }
.rate-k {
  position: absolute; top: 4px; right: 8px;
  font-size: 10px; opacity: .5; font-family: var(--font-num);
}
.rate-tip { font-size: 11.5px; color: #A8A5A0; }

/* ============================= 空状态 ================================== */
.empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 80px 0; text-align: center;
}
.empty-icon { width: 56px; height: 56px; border-radius: var(--r-card); background: var(--bg-surface); border: 1px solid var(--border); display: grid; place-items: center; }
.empty-title { font-family: var(--font-serif); font-weight: 700; font-size: 20px; }
.empty-desc { font-size: 13px; color: var(--text-2); max-width: 420px; line-height: 1.8; }

/* ============================ 首次引导 ================================ */
.workspace-onboard { padding: 0; }
.onboard {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; background: var(--bg-canvas);
}
.onboard-card {
  width: min(580px, 100%);
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 34px 40px 36px;
  display: flex; flex-direction: column; gap: 24px;
}
.onboard-brand { display: flex; align-items: center; gap: 12px; }
.onboard-title { font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 1.4; }
.onboard-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.onboard-field { display: flex; flex-direction: column; gap: 10px; }
.onboard-label { font-size: 13px; font-weight: 500; }
.onboard-hint { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.ob-input {
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--bg-canvas); font-size: 14px; font-family: inherit; color: var(--text-1);
  outline: none; transition: border-color .15s ease, background .15s ease;
}
.ob-input:focus { border-color: var(--accent); background: var(--bg-surface); }

.stepper { display: flex; align-items: center; gap: 8px; }
.step-btn {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  background: var(--bg-canvas); font-size: 17px; color: var(--text-1);
  cursor: pointer; transition: background .15s ease;
}
.step-btn:hover { background: var(--hover); }
.step-num {
  width: 66px; height: 38px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--r-btn);
  font-family: var(--font-num); font-size: 16px; font-weight: 600;
  background: var(--bg-surface); color: var(--text-1); outline: none;
}
.step-num:focus { border-color: var(--accent); }
.step-unit { font-size: 12.5px; color: var(--text-2); }

.scope-list { display: flex; flex-direction: column; gap: 8px; }
.scope-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-btn);
  border: 1px solid var(--border); background: var(--bg-surface);
  font-size: 13px; color: var(--text-1); cursor: pointer; text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.scope-opt:hover { background: var(--hover); }
.scope-opt.on { border-color: var(--accent); background: var(--accent-tint); }
.scope-name { flex: 1; font-weight: 500; }
.scope-pts { font-size: 12px; color: var(--text-2); font-family: var(--font-num); }
.scope-tick { width: 16px; text-align: center; color: var(--accent); font-weight: 600; }

.onboard-est {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: var(--r-btn);
  background: var(--bg-canvas); font-size: 12.5px; color: var(--text-2); line-height: 1.6;
}
.onboard-est b { color: var(--accent-ink); font-family: var(--font-num); }
.est-icon { display: flex; flex: 0 0 auto; }

.btn-lg { height: 46px; font-size: 14.5px; width: 100%; }
.btn-danger { background: #FDECEC; color: #D93025; }
.btn-danger:hover { background: #FBDCDC; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ====================== 今日打卡（工作台） ============================= */
/* ---------------------- 考研倒计时面板 ------------------------------- */
.exam-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 232px);
  gap: 22px; align-items: center; padding: 22px 28px; margin-bottom: 20px;
  background: linear-gradient(135deg, #FCFBFE 0%, #FFFFFF 58%);
  border-color: #EBE4F7; position: relative; overflow: hidden;
  flex: none;               /* 站在 .workspace flex 列里，不许被压缩 */
}
/* 左侧一根竖条作为紧迫度指示，颜色随阶段变 */
.exam-panel::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #9B5DE5;
}
.exam-sprint::before { background: #9B5DE5; }
.exam-push::before   { background: #F26430; }
.exam-mock::before,
.exam-taper::before  { background: #DC2626; }
.exam-exam::before   { background: #B91C1C; }
.exam-over::before   { background: #9CA3AF; }
.exam-exam { background: linear-gradient(135deg, #FEF4F4 0%, #FFFFFF 60%); }
.exam-over { background: var(--bg-surface); border-color: var(--border); }

.exam-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.exam-cap { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.exam-num-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.exam-pre {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  color: var(--text-1); letter-spacing: .01em;
}
.exam-num-row .pf-num { flex: 0 0 auto; }
.exam-unit {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text-1);
}
.exam-sub { font-size: 12.5px; color: var(--text-2); }

.exam-side {
  border-left: 1px dashed var(--border); padding-left: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.exam-side-t {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text-1);
}
.exam-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.exam-side-n { font-size: 12px; color: var(--text-2); line-height: 1.6; }

.today-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 168px;
  gap: 24px; align-items: center; padding: 30px 32px;
}
.today-hero-body { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.today-hero-num {
  font-family: var(--font-num); font-size: 46px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
}
.today-hero-num span { font-size: 15px; font-weight: 500; color: var(--text-2); margin-left: 10px; letter-spacing: 0; }
.today-hero-sub { font-size: 13px; color: var(--text-2); }
.today-hero-note { font-size: 12px; color: var(--text-2); opacity: .82; }
.today-ring { display: flex; justify-content: center; align-items: center; }
.today-done-mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-weight: 700; font-size: 26px;
}
.today-done-mark + .today-done-sub { font-size: 13px; color: var(--text-2); }
.today-hero .actions { margin-top: 4px; }

.feature-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.node-pct { font-family: var(--font-num); font-size: 11px; color: var(--text-2); }
.mt-pct { font-family: var(--font-num); font-size: 11.5px; font-weight: 600; }

/* 未来复习量柱状 */
.forecast { display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; padding: 20px 24px 16px; }
.fc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fc-num { font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.fc-bar-wrap { display: flex; align-items: flex-end; height: 88px; }
.fc-bar { display: block; width: 30px; border-radius: 5px 5px 0 0; }
.fc-day { font-size: 11px; color: var(--text-2); }

/* ========================= 打卡完成页 ================================= */
.done-page { display: flex; justify-content: center; padding: 12px 0 60px; }
.done-card {
  width: min(620px, 100%); padding: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.done-mark {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-tint); display: grid; place-items: center;
}
.done-title { font-family: var(--font-serif); font-weight: 700; font-size: 26px; }
.done-sub { font-size: 13px; color: var(--text-2); }
.done-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  width: 100%; margin-top: 12px; padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.done-cell { display: flex; flex-direction: column; gap: 4px; }
.dc-v { font-family: var(--font-num); font-size: 24px; font-weight: 700; }
.dc-l { font-size: 11.5px; color: var(--text-2); }
.done-streak { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 6px; }
.ds-left, .ds-right { background: var(--bg-canvas); border-radius: var(--r-card); padding: 16px; }
.ds-num { font-family: var(--font-num); font-size: 26px; font-weight: 700; }
.ds-lab { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.done-next { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin-top: 6px; }
.done-next b { color: var(--text-1); }
.actions.center { justify-content: center; margin-top: 10px; flex-wrap: wrap; }

/* ========================= 掌握状态标记 =============================== */
.st-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; display: inline-block; }
.st-chip { font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: var(--r-chip); }
.weak-n { font-size: 11.5px; color: #D93025; font-family: var(--font-num); white-space: nowrap; }

/* ========================== 知识网络 ================================== */
.net-grid { grid-template-columns: minmax(0, 1fr) 380px; }
.net-card { padding: 22px 24px; }
.net-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.net-legend { display: flex; gap: 14px; }
.lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); }
.net-svg { display: block; width: 100%; height: auto; }
.net-node rect { transition: fill .15s ease, stroke-width .15s ease; }
.net-node:hover rect { stroke-width: 2; }
.net-node:hover text { font-weight: 600; }
.net-detail { max-height: calc(100vh - 140px); overflow-y: auto; }
.net-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rel-list { display: flex; flex-direction: column; gap: 6px; }
.rel-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-btn);
  border: 1px solid var(--border); background: var(--bg-surface);
  font-size: 12.5px; color: var(--text-1); cursor: pointer; text-align: left;
  transition: background .15s ease;
}
.rel-item:hover { background: var(--hover); }
.rel-name { font-weight: 500; }
.rel-mod { font-size: 11px; color: var(--text-2); }
.rel-w { margin-left: auto; font-size: 11px; color: var(--text-2); font-family: var(--font-num); white-space: nowrap; }

/* ========================== 学习统计 ================================== */
.heat-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.heat-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell { width: 13px; height: 13px; border-radius: 3px; background: #EDEBE7; }
.heat-cell.lv-0 { background: #EDEBE7; }
.heat-cell.lv-1 { background: #DCD3F5; }
.heat-cell.lv-2 { background: #BCA8EC; }
.heat-cell.lv-3 { background: #9B5DE5; }
.heat-cell.lv-4 { background: #6D2FC4; }
.heat-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--text-2); }
.heat-legend { display: inline-flex; align-items: center; gap: 4px; }
.dist-bar { display: flex; height: 14px; border-radius: var(--r-bar); overflow: hidden; background: var(--border); }
.dist-bar i { display: block; height: 100%; }
.dist-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.dist-legend b { color: var(--text-1); font-family: var(--font-num); }

/* ============================ 设置页 ================================== */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.set-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.set-label { font-size: 13.5px; font-weight: 500; }
.set-row { display: flex; gap: 10px; align-items: center; }
.set-row .ob-input { flex: 1; }
.set-hint { font-size: 12px; color: var(--text-2); line-height: 1.7; }
/* 账号板块（设置页）：当前账号 + 退出 */
.acct-row { justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; }
.acct-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 160px; }
.acct-name { font-size: 15px; font-weight: 600; color: var(--text-1); }
.acct-meta { font-size: 11.5px; color: var(--text-2); font-family: var(--font-num); }

/* 账号头像：可点击更换，右下角带一个「改」角标 */
.acct-avatar {
  position: relative; flex: 0 0 56px; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 50%; background: var(--bg-canvas); overflow: hidden;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--border);
  transition: box-shadow .15s ease;
}
.acct-avatar:hover { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent); }
.acct-avatar .av-img { width: 100%; height: 100%; object-fit: cover; }
/* 顶栏头像：有自定义头像时铺满圆 */
.avatar .av-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.acct-avatar-badge {
  position: absolute; right: -1px; bottom: -1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-style: normal;
  font-size: 10px; font-weight: 600; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-surface);
}
.acct-av-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.acct-av-msg { font-size: 12px; line-height: 1.6; }
.acct-av-msg.is-ok { color: #127C56; }
.acct-av-msg.is-err { color: #D93025; }
.kv { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.kv span { color: var(--text-2); }
.kv b { font-family: var(--font-num); font-weight: 600; }

/* ============================= 弹层动作 =============================== */
.modal-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.modal-body p.lead { color: var(--text-1); font-weight: 500; }

/* 正文排版增强：换段首行缩进两格；首段 / 编号条目 / 短标题行 / 提示行顶格；术语自动加粗 */
.modal-body p, .flash-body p { text-indent: 2em; }
.modal-body p.lead, .flash-body p.lead,
.modal-body p.p-item, .flash-body p.p-item,
.modal-body p.modal-empty, .flash-body p.modal-empty { text-indent: 0; }

/* ============================ 响应式 ================================== */
@media (max-width: 1320px) {
  .net-grid { grid-template-columns: minmax(0, 1fr); }
  .net-detail { max-height: none; }
}
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .fw-grid { grid-template-columns: minmax(0, 1fr); }
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .continue-media { display: none; }
  .today-hero { grid-template-columns: minmax(0, 1fr); }
  .today-ring { display: none; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  /* 底部给固定的移动端导航留出高度 */
  .workspace { padding: 20px 20px calc(78px + env(safe-area-inset-bottom, 0px)); }
  .workspace-onboard, .workspace-session { padding: 0; }
  .session-page { padding: 14px 16px 20px; }
  .flash-face { padding: 24px 20px; }
  .flash-card { height: min(78vh, 720px); }
  .flash-q { font-size: 22px; }
  /* 翻卡正文在手机上整体放大一号，不然正文太密太小 */
  .flash-q.small { font-size: 21px; }
  .flash-body { font-size: 16.5px; line-height: 2; gap: 13px; }
  .flash-path, .flash-hint { font-size: 12.5px; }
  .kw { font-size: 13.5px; padding: 5px 11px; }
  .rate-hint { font-size: 14px; }
  .rate-tip { font-size: 12.5px; }
  /* 弹窗里的知识点详情与翻卡正文同源，同步放大 */
  .modal-body { font-size: 16px; }
  .modal-body .chip { font-size: 13px; }
  /* 手机端弹窗整体滚动：正文完整铺开在中段，关键词芯片落到正文下方，
     不再被限高 + 内滚挤成只剩两三行 */
  .modal-overlay { align-items: flex-start; overflow-y: auto; padding: 18px 14px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .modal { max-height: none; }
  .modal-body { overflow: visible; }
  .search { display: none; }
  .stats, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .done-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .done-card { padding: 28px 22px; }
  .onboard-card { padding: 26px 22px; }
  .greeting-block { gap: 12px; }
  .greeting-avatar { flex: 0 0 44px; width: 44px; height: 44px; }
  .greeting { font-size: 24px; }
  /* 知识框架：时间轴卡片在窄屏下改为「标题/筛选上下排 + 时间轴横向滑」 */
  .tl-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .filters { flex-wrap: wrap; }
  .node { flex: 0 0 auto; }
  .track-line { gap: 22px; }
}

/* ========================= 移动端底部导航 =============================
   ≤820px 时侧边栏被隐藏，导航项改由底部 tab bar 承担。
   >820px 完全不显示，桌面端仍用侧边栏。
   ====================================================================== */
.mobile-nav { display: none; }

@media (max-width: 820px) {
  .mobile-nav.on {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mn-item {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 9px 2px 8px;
    border: 0; background: none; cursor: pointer;
    color: var(--text-2);
    font-family: var(--font-sans); font-size: 11px; line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
  }
  .mn-item:active { background: var(--hover); }
  .mn-item.active { color: var(--accent); }
  .mn-item.active .mn-label { font-weight: 600; }
  .mn-icon { position: relative; display: flex; }
  /* 今日未打卡的小红点 */
  .mn-dot {
    position: absolute; top: -2px; right: -4px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 1.5px var(--bg-surface);
  }
  .mn-label {
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

/* ============================ 今日练习（打卡后测验）============================
   题目来自当天打卡的知识点：单选 / 填空 / 判断各一道。
   首轮正确率 ≥ 80% 才算完成今日任务，未达标只重做错题。 */
.workspace-quiz { padding: 20px 32px 40px; }
.quiz-wrap, .quiz-page { max-width: 760px; margin: 0 auto; }
.quiz-top { margin-bottom: 14px; }
.quiz-top-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.quiz-top-label { font-size: 13px; font-weight: 600; }
.quiz-top-note { font-size: 12px; color: var(--text-2); }
.quiz-card { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.quiz-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-tags .chip { font-size: 12px; }
.quiz-type { background: var(--accent-tint); color: var(--accent-ink); }
.quiz-point { background: var(--bg-canvas); color: var(--text-2); }
.quiz-stem { font-size: 17px; line-height: 1.9; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-surface); color: var(--text-1); font-size: 14.5px; line-height: 1.7;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.quiz-option:hover:not([disabled]) { border-color: var(--accent); }
.quiz-option[disabled] { cursor: default; }
.qo-text { flex: 1; }
.quiz-option .qo-idx {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-canvas); color: var(--text-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.quiz-option.right { border-color: var(--green); background: var(--green-tint); }
.quiz-option.right .qo-idx { background: var(--green); color: #fff; }
.quiz-option.wrong { border-color: #F2B8B5; background: #FEF2F2; }
.quiz-option.wrong .qo-idx { background: #D93025; color: #fff; }
.quiz-judge { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-fill { display: flex; flex-direction: column; gap: 12px; }
.quiz-fill input {
  width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 15px; outline: none; background: var(--bg-surface); color: var(--text-1);
}
.quiz-fill input:focus { border-color: var(--accent); }
.quiz-fx { border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.8; }
.quiz-fx.ok { background: var(--green-tint); }
.quiz-fx.no { background: #FEF2F2; }
.quiz-fx-head { font-weight: 600; margin-bottom: 4px; }
.quiz-fx.ok .quiz-fx-head { color: #0E7A5F; }
.quiz-fx.no .quiz-fx-head { color: #B42318; }
.quiz-fx-ans { color: var(--text-1); }
.quiz-fx-exp { color: var(--text-2); margin-top: 4px; }
.quiz-actions { justify-content: flex-end; }
.quiz-empty { padding: 40px 32px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.quiz-empty-title { font-size: 17px; font-weight: 600; }
.quiz-empty-sub { font-size: 13px; color: var(--text-2); }

/* 结果页 */
.quiz-result .done-card { max-width: 620px; margin: 0 auto; }
.quiz-wrong-list { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-wrong-title { flex: 1 1 100%; font-size: 12.5px; color: var(--text-2); margin-bottom: 2px; }
.quiz-wrong-chip {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: #FEF2F2; color: #B42318; cursor: pointer;
}
.quiz-wrong-chip:hover { background: #FDE4E2; }

/* 完成页里的练习提示块 */
.quiz-cta { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--amber-tint); }
.quiz-cta.pass { background: var(--green-tint); }
.quiz-cta-head { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.quiz-cta-body { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.quiz-cta-body b { color: var(--text-1); }

/* ---------------- 接续云端进度：候选记录列表 ---------------- */
.rp-head { display: flex; flex-direction: column; gap: 6px; }
.rp-title { font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1.4; }
.rp-sub { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.rp-list { display: flex; flex-direction: column; gap: 10px; }
.rp-item {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-canvas); font-family: inherit; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.rp-item:hover:not(:disabled) { border-color: var(--accent); background: var(--bg-surface); transform: translateY(-1px); }
.rp-item:disabled { opacity: .6; cursor: default; }
.rp-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
/* 候选记录左侧的小头像：有自定义头像用图，否则用昵称首字 */
.rp-item-top { align-items: center; }
.rp-item-name { flex: 1 1 auto; }
.rp-item-av {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; overflow: hidden;
}
.rp-item-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-item-name { font-size: 15px; font-weight: 600; color: var(--text-1); }
.rp-item-last { font-size: 12px; color: var(--text-2); }
.rp-item-stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.rp-item-stats b { font-family: var(--font-num, inherit); font-size: 14px; color: var(--text-1); }
.rp-item-go { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.rp-note { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.rp-modal { width: min(520px, 92vw); max-height: 84vh; overflow: auto; display: flex; flex-direction: column; gap: 18px; }

/* ---------------- 一次性提示条 ---------------- */
.flash-bar {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 16px; padding: 12px 14px;
  background: var(--green-tint); border: 1px solid #B7E2CE; border-radius: 10px;
}
.flash-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.flash-main b { font-size: 14px; color: #0E7A5F; }
.flash-main span { font-size: 12.5px; color: var(--text-2); }
.flash-close {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--text-2); padding: 2px 4px; line-height: 1;
}
.flash-close:hover { color: var(--text-1); }

@media (max-width: 820px) {
  .workspace-quiz { padding: 16px 16px calc(78px + env(safe-area-inset-bottom, 0px)); }
  .quiz-card { padding: 20px 18px; }
  .quiz-stem { font-size: 16px; }
  .quiz-judge { grid-template-columns: 1fr; }
  /* 账号板块：窄屏下头像+昵称一行，退出按钮单独占满整行 */
  .acct-row { flex-wrap: wrap; }
  .acct-avatar { flex: 0 0 48px; width: 48px; height: 48px; }
  .acct-main { flex: 1 1 auto; }
  .acct-row .btn { width: 100%; flex: 0 0 100%; }
  .acct-av-bar .btn { width: auto; }
  .onboard-card { padding: 26px 20px 28px; }
  .rp-item-stats { flex-wrap: wrap; gap: 6px 12px; }
}

/* ============================ 历年真题库 ============================
   按院校翻卷子 + 高频考点榜。卷子折叠只看标题，展开看题目、涉及考点与来源 */
.exam-page { display: flex; flex-direction: column; gap: 16px; }
.exam-head { padding: 18px 20px 0; }
.exam-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.exam-head-txt { min-width: 0; }
.exam-title { font-size: 17px; font-weight: 650; color: var(--text-1); letter-spacing: -.01em; }
.exam-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.exam-search {
  display: flex; align-items: center; gap: 7px;
  min-width: 260px; flex: 0 1 340px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--bg-app); border: 1px solid var(--border);
}
.exam-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  font-family: var(--font-sans); font-size: 13px; color: var(--text-1);
}
.exam-search input::placeholder { color: var(--text-3); }
.exam-q-clear {
  border: 0; background: none; cursor: pointer; padding: 0 2px;
  font-size: 16px; line-height: 1; color: var(--text-3);
}
.exam-q-clear:hover { color: var(--text-1); }
.exam-tabs { display: flex; gap: 4px; margin-top: 14px; border-top: 1px solid var(--border); }
.exam-tab {
  border: 0; background: none; cursor: pointer; position: relative;
  padding: 11px 12px 12px; margin-bottom: -1px;
  font-family: var(--font-sans); font-size: 13px; color: var(--text-2);
  border-bottom: 2px solid transparent;
}
.exam-tab:hover { color: var(--text-1); }
.exam-tab.active { color: var(--text-1); font-weight: 600; border-bottom-color: var(--accent); }
.exam-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
}
.exam-filter { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.exam-filter select {
  max-width: 220px; padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-1);
  font-family: var(--font-sans); font-size: 12.5px; cursor: pointer;
}
.exam-count { font-size: 12.5px; color: var(--text-3); padding: 0 2px 2px; }
.exam-list { display: flex; flex-direction: column; gap: 8px; }
.exam-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface); overflow: hidden; }
.exam-card.open { box-shadow: 0 2px 10px rgba(15, 15, 15, .05); }
.exam-card-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 0; background: none; cursor: pointer; text-align: left;
  font-family: var(--font-sans);
}
.exam-card-head:hover { background: var(--hover); }
.exam-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.exam-card-t { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.exam-card-s { font-size: 12px; color: var(--text-3); }
.exam-card-hit { flex: 0 0 auto; font-size: 11.5px; color: var(--accent); background: var(--accent-tint, rgba(35,131,226,.1)); padding: 3px 8px; border-radius: 999px; }
.exam-card-caret { flex: 0 0 auto; display: flex; transition: transform .16s ease; }
.exam-card.open .exam-card-caret { transform: rotate(90deg); }
.exam-lv { flex: 0 0 auto; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.lv-full { background: rgba(16,185,129,.12); color: #0E7A5F; }
.lv-part { background: rgba(245,158,11,.14); color: #B45309; }
.lv-hint { background: rgba(35,131,226,.12); color: #1A6FC4; }
.lv-none { background: var(--hover); color: var(--text-3); }
.exam-card-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.exam-f { padding: 9px 0; border-bottom: 1px dashed var(--border); }
.exam-f:last-of-type { border-bottom: 0; }
.exam-f-l { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.exam-f-t { font-size: 13px; line-height: 1.72; color: var(--text-1); word-break: break-word; }
.exam-q { display: block; padding: 2px 0; }
.exam-q-n { display: inline-block; min-width: 20px; margin-right: 4px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.exam-f-t mark, .exam-hot-name mark { background: #FFF3C4; color: inherit; border-radius: 3px; padding: 0 1px; }
.exam-hits { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.exam-hits-l { font-size: 12px; color: var(--text-3); margin-bottom: 7px; }
.exam-hits-row { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-hit {
  border: 1px solid var(--border); background: var(--bg-app); cursor: pointer;
  padding: 4px 9px; border-radius: 999px;
  font-family: var(--font-sans); font-size: 12px; color: var(--text-1);
}
.exam-hit:hover { border-color: var(--accent); color: var(--accent); }
.exam-src, .exam-note { margin-top: 9px; font-size: 12px; line-height: 1.6; color: var(--text-3); word-break: break-all; }
.exam-src a { color: var(--accent); text-decoration: none; }
.exam-src a:hover { text-decoration: underline; }
.exam-none { padding: 30px 20px; text-align: center; }
.exam-none-t { font-size: 14px; font-weight: 600; color: var(--text-1); }
.exam-none-s { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.exam-more { display: flex; justify-content: center; padding: 6px 0 2px; }
.exam-hot-wrap { padding: 16px 18px 18px; }
.exam-hot-note { font-size: 12px; line-height: 1.6; color: var(--text-3); margin-bottom: 12px; }
.exam-hot { border-bottom: 1px solid var(--border); }
.exam-hot:last-child { border-bottom: 0; }
.exam-hot-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-sans); text-align: left;
}
.exam-hot-row:hover { background: var(--hover); }
.exam-hot-rank { flex: 0 0 24px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.exam-hot-name { flex: 0 1 210px; min-width: 0; font-size: 13px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-hot-bar { flex: 1 1 auto; height: 7px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.exam-hot-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7FB1E8, var(--accent)); }
.exam-hot-n { flex: 0 0 auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.exam-hot-body { padding: 2px 2px 12px; }
.exam-hot-acts { margin-bottom: 8px; }
.exam-hot-places { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-place {
  border: 1px solid var(--border); background: var(--bg-app); cursor: pointer;
  padding: 4px 8px; border-radius: 7px;
  font-family: var(--font-sans); font-size: 11.5px; color: var(--text-2);
}
.exam-place:hover { border-color: var(--accent); color: var(--accent); }
.exam-place-more { font-size: 11.5px; color: var(--text-3); padding: 4px 2px; }
.exam-books { padding: 16px 18px; }
.exam-books-t { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 10px; }
.exam-books-list { display: flex; flex-direction: column; gap: 7px; }
.exam-book { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.6; }
.exam-book-s { flex: 0 0 84px; color: var(--text-3); }
.exam-book-n { flex: 1; color: var(--text-1); }

@media (max-width: 820px) {
  .exam-search { flex: 1 1 100%; min-width: 0; }
  .exam-filters { gap: 9px; }
  .exam-filter { flex: 1 1 46%; }
  .exam-filter select { flex: 1; max-width: none; }
  .exam-hot-name { flex: 1 1 auto; max-width: 42%; }
  .exam-hot-bar { display: none; }
  .exam-card-body { padding: 4px 12px 12px; }
  .exam-book { flex-direction: column; gap: 2px; }
}
.exam-snip { display: block; margin-top: 3px; font-size: 12px; line-height: 1.55; color: var(--text-2); word-break: break-word; }
.modal-exam {
  display: flex; align-items: center; gap: 7px; width: 100%;
  margin-top: 10px; padding: 9px 11px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-app);
  font-family: var(--font-sans); font-size: 12.5px; color: var(--text-1); text-align: left;
}
.modal-exam:hover { border-color: var(--accent); }
.modal-exam b { color: var(--accent); }
.modal-exam-go { margin-left: auto; font-size: 12px; color: var(--accent); white-space: nowrap; }

/* ============================ 作业（查看作业） ============================= */
.hw-empty { text-align: center; color: var(--text-2); font-size: 13.5px; padding: 26px 0; }
.hw-task { margin-bottom: 14px; }
.hw-task-t { font-size: 15px; font-weight: 600; color: var(--text-1); }
.hw-task-d { font-size: 12.5px; color: var(--text-2); line-height: 1.65; margin-top: 5px; }
.hw-task-act { margin-top: 12px; }
.hw-due { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); margin-top: 8px; }
.hw-due.over { background: #FDEBEC; color: #B91C1C; }
.hw-up { border-color: var(--accent); }
.hw-fld { display: block; font-size: 12.5px; color: var(--text-2); margin: 12px 0 6px; }
.hw-drop { border: 1.6px dashed var(--border); border-radius: 12px; padding: 22px 14px; text-align: center; color: var(--text-2); font-size: 13px; cursor: pointer; }
.hw-drop.on, .hw-drop:hover { border-color: var(--accent); background: var(--accent-tint); }
.hw-fileinfo { margin-top: 10px; font-size: 13px; color: var(--text-1); background: var(--accent-tint); border-radius: 9px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.hw-fileinfo .hw-x { color: var(--text-2); cursor: pointer; font-weight: 700; flex: 0 0 auto; }
.hw-up textarea { width: 100%; font-family: inherit; font-size: 13.5px; color: var(--text-1); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; resize: vertical; min-height: 60px; }
.hw-bar { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 12px; }
.hw-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.hw-msg { margin-top: 10px; font-size: 13px; border-radius: 9px; padding: 9px 12px; background: #E8F6EF; color: #047857; }
.hw-msg.err { background: #FDEBEC; color: #B91C1C; }
.hw-mine-head { font-size: 15px; font-weight: 600; color: var(--text-1); margin: 20px 0 10px; }
.hw-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border); }
.hw-row:first-child { border-top: none; }
.hw-row-main { flex: 1; min-width: 0; }
.hw-row-t { font-size: 13.5px; font-weight: 600; color: var(--text-1); overflow-wrap: anywhere; }
.hw-row-s { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.hw-badge { flex: 0 0 auto; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }
.hw-badge.wait { background: #FFF6E5; color: #B45309; }
.hw-badge.done { background: #E8F6EF; color: #047857; }
.hw-grade { margin-top: 9px; background: #E8F6EF; border-radius: 9px; padding: 9px 12px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; color: var(--text-1); }
.hw-grade b { color: #047857; margin-right: 8px; }
.hw-prev audio, .hw-prev video { width: 100%; margin-top: 8px; border-radius: 8px; display: block; }
.hw-dl { color: var(--accent-ink); font-size: 12.5px; text-decoration: none; }

/* ==========================================================================
   手绘纸感主题（2026-09-15）— 保留原配色，叠加纸质底 + 手绘边框 + 荧光笔标粗
   ========================================================================== */

:root {
  --border-ink: #D2CCC1;     /* 手绘描边：比 --border 深一档的暖灰 */
  --marker: #FFE8A3;         /* 荧光笔黄（重点标粗底色） */
  --wobble-a: 14px 18px 12px 20px / 18px 13px 19px 12px;   /* 卡片类不规则圆角 */
  --wobble-b: 12px 16px 11px 17px / 16px 11px 17px 12px;   /* 按钮/小件 */
}

/* 纸面：纯白底 + 极淡纸纹（不染色） */
body {
  background-color: #FFFFFF;
  background-image: radial-gradient(rgba(55, 53, 47, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* 侧边栏 / 顶栏融进纸面，让白卡片浮在纸上 */
.sidebar, .main { background: transparent; }
.topbar { background: transparent; }
.sidebar { border-right: 1.5px dashed var(--border-ink); }
.topbar { border-bottom: 1.5px dashed var(--border-ink); }
/* 顶栏里的搜索框/图标按钮改白底，浮在纸面上 */
.search { background: var(--bg-surface); border: 1.5px solid var(--border-ink); }
.icon-btn { background: var(--bg-surface); border: 1.5px solid var(--border-ink); border-radius: var(--wobble-b); }

/* 通用卡片：手绘不规则圆角 + 暖灰描边 + 微错位投影 */
.card {
  border: 1.5px solid var(--border-ink);
  border-radius: var(--wobble-a);
  box-shadow: 2px 3px 0 rgba(55, 53, 47, .07);
}

/* 按钮 / 胶囊标签：轻微不规则圆角 */
.btn { border-radius: var(--wobble-b); }
.chip { border-radius: var(--wobble-b); }
.kw { border-radius: var(--wobble-b); }
.search { border: 1.5px solid var(--border-ink); border-radius: 16px 20px 15px 21px / 20px 15px 21px 16px; }
.streak { border: 1.5px solid var(--border-ink); border-radius: var(--wobble-a); }

/* 翻卡两面：手绘边框 + 微错位投影 */
.flash-face {
  border: 1.5px solid var(--border-ink);
  border-radius: 16px 22px 14px 24px / 22px 14px 24px 16px;
  box-shadow: 2px 4px 0 rgba(55, 53, 47, .06);
}
/* 弹层卡片 */
.modal { border: 1.5px solid var(--border-ink); border-radius: var(--wobble-a); box-shadow: var(--shadow-pop), 3px 4px 0 rgba(55, 53, 47, .06); }

/* 荧光笔重点标注：所有知识点正文的 <b>/<strong> 统一黄底划线式高亮 */
.flash-body b, .flash-body strong,
.modal-body b, .modal-body strong {
  font-weight: 700;
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  padding: 0 1px;
  border-radius: 2px;
}
/* 深色底/彩底容器里的加粗不受影响（作业点评等业务语义加粗保持原样） */
.hw-grade b { background: none; }

/* 首段也缩进两格（用户 2026-09-15 要求：第一段全部开头空两格） */
.modal-body p.lead, .flash-body p.lead { text-indent: 2em; }

/* ===================== 像素脸 mascot（2026-09-15） =====================
   参考 anurag「Pixel Face Portfolio」：全站唯一彩色部件 + 会变表情的点阵脸 */
:root {
  --rose: #E85D9E;        /* 玫粉：机器侧条 */
  --rose-soft: #F0A8CC;   /* 屏幕上的脸（深底上略提亮一档） */
  --rose-tint: #FDEEF6;
}

/* 机器壳：白纸卡片 + 手绘边框 + 微错位投影，右侧一条玫粉（唯一彩色） */
.pf {
  position: relative;
  display: inline-flex;
  padding: 9px 17px 9px 9px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-ink);
  border-radius: 16px 19px 14px 20px / 19px 14px 20px 16px;
  box-shadow: 2px 3px 0 rgba(55, 53, 47, .07);
}
.pf-bar {
  position: absolute; right: 4px; top: 11px; bottom: 11px; width: 6px;
  background: var(--rose);
  border-radius: 3px 4px 3px 4px;
  box-shadow: 1px 1px 0 rgba(55, 53, 47, .08);
}
/* 点阵屏：放大不插值，保留像素颗粒 */
.pf-screen {
  display: block;
  image-rendering: pixelated;
  background: #221F1B;
  border-radius: 9px 12px 8px 13px / 12px 8px 13px 9px;
  box-shadow: 0 0 0 1.5px #2E2A25, inset 0 0 14px rgba(240, 168, 204, .14);
}
.pf-cap {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
}

/* 今日页：打招呼区右侧 */
.greeting-mascot {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-right: 4px;
}
/* 打卡页：浮在卡片右上角，不占布局 */
.flash-wrap { position: relative; }
.pf-float {
  position: absolute;
  right: -4px;
  top: -14px;
  z-index: 3;
}
/* 打卡完成页：居中 */
.done-mascot { display: flex; justify-content: center; margin: 4px 0 2px; }
/* 练习题反馈：右上角一枚小脸（缩小一档，避免压到「下一题」按钮） */
.quiz-fx { position: relative; padding-right: 104px; min-height: 100px; }
.pf-inline { position: absolute; right: 14px; top: 10px; transform: scale(.76); transform-origin: top right; }

@media (max-width: 820px) {
  .greeting-mascot { display: none; }
  .pf-float { right: -6px; top: -18px; transform: scale(.74); transform-origin: top right; }
  .pf-inline { display: none; }
  .quiz-fx { padding-right: 0; }
}

/* 倒计时面板：手机端改成上下堆叠，侧栏虚线换成上边线 */
@media (max-width: 820px) {
  .exam-panel { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px 18px 18px 20px; }
  .exam-pre, .exam-unit { font-size: 16px; }
  .exam-side {
    border-left: 0; border-top: 1px dashed var(--border);
    padding-left: 0; padding-top: 12px;
  }
}

/* ==================== 首页像素化（点阵语言家族） ====================
   与右上角像素脸同一套语言：方块、不插值、白缝分格。只动形态，不动配色。 */
/* 点阵数字：放大不插值 */
.pf-num { display: block; image-rendering: pixelated; max-width: 100%; }

/* 统计卡：大数字换成点阵字，高度与原来 26px 字号对齐 */
.stat-value { display: flex; align-items: center; min-height: 28px; }

/* 今日页主数字：46px 字号位 → scale 6 的点阵数字 */
.today-hero-num { display: flex; align-items: baseline; }
.today-hero-num .pf-num { flex: 0 0 auto; }

/* 今日任务卡：表情与「今日任务」标签同行右对齐（打卡完开心 / 没完成摆烂） */
.hero-top { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.pf-hero { margin-left: auto; flex: 0 0 auto; }
.pf-hero .pf { padding: 7px 13px 7px 7px; }
.pf-hero .pf-bar { top: 8px; bottom: 8px; }

/* 今日进度环：SVG 圆环换点阵块，中心数字也点阵化 */
.today-ring { position: relative; }
.ring-svg { display: block; }
.today-ring-mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}
.ring-num { display: flex; align-items: flex-start; gap: 1px; }
.ring-pct {
  font-family: var(--font-num);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 3px;
  color: var(--text-2);
}
.ring-cap { font-size: 11px; color: var(--text-2); }

/* 进度条：白缝切块，像像素血条 */
.progress { position: relative; }
.progress::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(255, 255, 255, .92) 6px 8px);
}

/* 未来 7 天柱：横向砖缝 */
.fc-bar { position: relative; }
.fc-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 255, 255, .85) 6px 8px);
}

/* ==================== 学生头像（默认昵称首字 + 点击上传） ==================== */
/* 今日页头像：没上传过头像时显示昵称首字，点一下就能换 */
.greeting-avatar {
  position: relative;
  padding: 0; border: 0; overflow: hidden; cursor: pointer;
  display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-ink);
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  line-height: 1;
  transition: box-shadow .15s ease;
}
.greeting-avatar:hover { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent); }
.greeting-avatar .av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.greeting-avatar-badge {
  position: absolute; right: 0; bottom: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-sans);
  font-style: normal; font-size: 9px; font-weight: 600;
  line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-surface);
}
/* 设置页账号头像：同样用首字兜底 */
.acct-avatar { background: var(--accent-tint); font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--accent-ink); line-height: 1; }

/* ---- 学生端老师批注查看器（只读全屏，2026-09-16） ---- */
.hw-anno { position: fixed; inset: 0; z-index: 90; background: rgba(24, 24, 28, .64); display: flex; flex-direction: column; }
.hw-anno-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hw-anno-title { font-weight: 700; font-size: 14px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-anno-nav { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-1); cursor: pointer; font-family: inherit; }
.hw-anno-nav:disabled { opacity: .4; cursor: default; }
.hw-anno-close { border: 0; background: var(--accent); color: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.hw-anno-pg { font-size: 12.5px; color: var(--text-2); }
.hw-anno-body { flex: 1; overflow: auto; padding: 16px; display: flex; justify-content: center; align-items: flex-start; }
.hw-anno-wrap { position: relative; background: #fff; border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 0, 0, .34); line-height: 0; }
.hw-anno-wrap canvas { display: block; }
.hw-anno-cv { position: absolute; left: 0; top: 0; }
.hw-anno-btn {
  margin-top: 8px; border: 1px solid var(--accent); color: var(--accent-ink);
  background: var(--accent-tint); font-size: 13px; padding: 5px 11px;
  border-radius: var(--r-chip); font-weight: 600; cursor: pointer; font-family: inherit;
}
.hw-anno-btn:hover { filter: brightness(.97); }
@media (max-width: 820px) {
  .hw-anno-bar { padding: 8px 10px; gap: 8px; }
  .hw-anno-title { max-width: 100%; flex-basis: 100%; }
  .hw-anno-body { padding: 8px; }
}

/* ==================== 点阵语言 v2（2026-09-17） ====================
   来源：stylekit.top 像素规范适配方案「建议追加」档。
   2026-09-17 晚修订：黑色实边过重 → 全部描边退回浅色 / 无边框，
   回到项目原有的柔和手绘基调；点阵图标、分格结构、徽章系统功能保留。
   三条红线：点阵不出正文 / 不引像素字体 / 不换白纸底。 */

/* ---------- 分格进度条：每格 = 1 个单位，可数（无描边，靠底色分格） ---------- */
.px-bar { display: flex; gap: 3px; }
.px-bar span {
  flex: 1; min-width: 0; height: 14px;
  background: #E7E4DE; border-radius: 3px;
}
.px-bar span.on { background: var(--bar-on, var(--rose)); }
.px-bar.sm { gap: 2px; }
.px-bar.sm span { height: 9px; border-radius: 2px; }
.px-bar-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-num); font-size: 11.5px; color: var(--text-2);
  margin-top: 7px;
}

/* ---------- 成就徽章墙 ----------
   类名用 .ach 而不是 .badge：.badge 已被「题型徽标（M/J/L）」占用，
   复用会让知识点列表里的题型标签被徽章样式覆盖。 */
.badge-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ach {
  text-align: center; padding: 14px 8px 11px;
  border: 1px solid var(--border-ink); border-radius: 16px;
  background: var(--bg-surface);
}
.ach canvas { image-rendering: pixelated; display: block; margin: 0 auto; }
.ach .bd-nm { font-size: 12.5px; font-weight: 700; margin-top: 9px; line-height: 1.35; }
.ach .bd-tg {
  display: inline-block; margin-top: 6px;
  font-family: var(--font-num); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 9px; border-radius: 999px;
}
.bd-tg.g-common { background: #EDEBE6; color: #5F574F; }
.bd-tg.g-rare   { background: #E3F2FD; color: #0F5B93; }
.bd-tg.g-epic   { background: #EFEBFF; color: #4B32C3; }
.bd-tg.g-legend { background: #FDEBF4; color: #B23A75; }
.ach .bd-bar { margin-top: 9px; }
.ach .bd-bar .px-bar-meta { font-size: 10.5px; margin-top: 5px; }
/* 未解锁：降饱和但不隐藏——让学生看见「还差什么」 */
.ach.off { border-color: #E6E2DA; background: #FBFAF8; }
.ach.off .bd-nm { color: var(--text-2); }
.ach.off .bd-tg { color: #9C968B; background: #F1F0EC; }
.ach.off canvas { opacity: .32; }
.ach.off .px-bar span { background: #F0EEE9; }
.ach.off .px-bar span.on { background: #CFCAC1; }
/* 新点亮：玫粉描边 + 浅底（不用硬阴影） */
.ach.on-new { border-color: var(--rose); background: var(--rose-tint); }

.badge-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-ink);
  font-size: 12.5px; color: var(--text-2);
}
.badge-foot b { color: var(--text-1); font-family: var(--font-num); }

@media (max-width: 820px) {
  .badge-wall { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ach { padding: 12px 6px 10px; }
  .ach .bd-nm { font-size: 12px; }
}

/* ---------- 下一枚徽章（打卡完成页） ---------- */
.badge-next {
  display: flex; align-items: center; gap: 14px; text-align: left;
  margin-top: 14px; padding: 13px 15px;
  border: 1px solid var(--border-ink); border-radius: 16px;
  background: #FCFAF7;
}
.badge-next canvas { flex: 0 0 auto; }
.badge-next .bn-main { flex: 1; min-width: 0; }
.badge-next .bn-t { font-size: 13.5px; font-weight: 700; }
.badge-next .bn-h { font-size: 12px; color: var(--text-2); margin: 3px 0 8px; }
.badge-next.all { background: var(--rose-tint); border-color: var(--rose); }

/* ---------- 今日任务卡：分格进度 ---------- */
.today-px { margin-top: 16px; }
.today-px .px-bar-meta { font-size: 11.5px; }

/* 完成页数字换成点阵字后，左对齐别被 flex 拉伸 */
.done-cell .pf-num { align-self: flex-start; }

/* 完成页：自评质量分格条 */
.done-px { width: 100%; margin-top: 14px; }

/* 设置页：全库进度分格条 */
.settings-px { margin-top: 12px; }

/* ==========================================================================
   页面：高频必背（第一梯队）2026-09-22
   数据来自 tier-data.js；卡片沿用纸感主题的描边与不规则圆角
   ========================================================================== */
.tier-page { display: flex; flex-direction: column; gap: 16px; }

.tier-head { padding: 20px 22px; }
.tier-eyebrow {
  display: inline-block; padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--accent-tint); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
}
.tier-h1 {
  margin-top: 12px; max-width: 780px;
  font-size: 19px; font-weight: 700; line-height: 1.45;
  color: var(--text-1); letter-spacing: -.01em;
}
.tier-sub { margin-top: 8px; max-width: 800px; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }

.tier-metrics { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tier-metric { background: var(--bg-canvas); border-radius: 10px; padding: 10px 12px; }
.tier-metric span { display: block; font-size: 11.5px; color: var(--text-2); }
.tier-metric b { display: block; margin-top: 3px; font-family: var(--font-num); font-size: 19px; font-weight: 700; color: var(--text-1); }

.tier-prog { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border-ink); }
.tier-prog-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
.tier-prog-top b { font-family: var(--font-num); font-size: 14px; color: var(--text-1); }
.tier-prog-bar { margin-top: 7px; height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.tier-prog-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .25s ease; }
.tier-prog-hint { margin-top: 7px; font-size: 11.5px; line-height: 1.6; color: var(--text-2); }

.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tier-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--wobble-a);
  box-shadow: 2px 3px 0 rgba(55, 53, 47, .07);
}
.tier-card-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tier-rank {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 6px;
  background: var(--hover); color: var(--text-2);
  font-family: var(--font-num); font-size: 12px; font-weight: 700;
}
.tier-name { min-width: 0; font-size: 15.5px; font-weight: 700; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier-mod { flex: 0 0 auto; margin-left: auto; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 500; }
.tier-mod.is-cn { background: var(--orange-tint); color: #C2410C; }
.tier-mod.is-west { background: #EAF1FB; color: #1D4ED8; }
.tier-ch { font-size: 11.5px; color: var(--text-2); }
.tier-lead {
  font-size: 12.5px; line-height: 1.75; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.tier-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tier-stat { background: var(--bg-canvas); border-radius: 9px; padding: 8px 10px; }
.tier-stat b { display: block; font-family: var(--font-num); font-size: 17px; font-weight: 700; color: var(--text-1); }
.tier-stat span { display: block; margin-top: 1px; font-size: 11px; color: var(--text-2); }

.tier-bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.tier-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #C9B6F2, var(--accent)); }

.tier-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-tag { padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent-ink); font-size: 11px; }
.tier-tag + .tier-tag { background: var(--hover); color: var(--text-2); }

.tier-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-places { display: flex; flex-wrap: wrap; gap: 6px; }

.tier-done {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--wobble-b);
  border: 1.5px dashed var(--border-ink); background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; color: var(--text-2);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tier-done:hover { border-color: var(--accent); color: var(--accent-ink); }
.tier-done.on { border-style: solid; border-color: var(--green); background: var(--green-tint); color: #047857; font-weight: 600; }
.tier-done-box {
  width: 13px; height: 13px; border-radius: 4px;
  border: 1.5px solid var(--border-ink);
  display: grid; place-items: center; font-size: 10px; line-height: 1;
}
.tier-done.on .tier-done-box { border-color: var(--green); background: var(--green); color: #fff; }

.tier-plan { padding: 18px 20px; }
.tier-plan-t { font-size: 15px; font-weight: 700; color: var(--text-1); }
.tier-plan-s { margin-top: 6px; max-width: 780px; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.tier-days { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.tier-day { display: flex; align-items: baseline; gap: 10px; padding: 9px 12px; background: var(--bg-canvas); border-radius: 9px; }
.tier-day-n { flex: 0 0 auto; font-family: var(--font-num); font-size: 11.5px; font-weight: 700; color: var(--accent-ink); }
.tier-day-list { min-width: 0; font-size: 12.5px; color: var(--text-1); }
.tier-plan-acts { margin-top: 16px; }

@media (max-width: 1280px) {
  .tier-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .tier-head, .tier-plan { padding: 16px; }
  .tier-card { padding: 14px; }
  .tier-h1 { font-size: 17px; }
  .tier-name { font-size: 14.5px; }
  .tier-lead { -webkit-line-clamp: 3; }
  .tier-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-days { grid-template-columns: minmax(0, 1fr); }
}

/* ==================== 身份：学生 / 老师（一个网址） ==================== */
/* 顶栏身份按钮 */
.role-btn.on { background: var(--accent-tint); color: var(--accent-ink); }
.role-btn-tx { font-size: 13px; font-weight: 700; line-height: 1; }

/* 顶栏身份下拉 */
.role-pop {
  position: fixed; z-index: 70; min-width: 196px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.role-pop-head { font-size: 12px; color: var(--text-2); padding: 8px 10px 6px; }
.role-pop-head b { color: var(--text-1); }
.role-pop-item {
  text-align: left; border: 0; background: none; font: inherit;
  font-size: 13.5px; color: var(--text-1); padding: 9px 10px;
  border-radius: var(--r-btn); cursor: pointer;
}
.role-pop-item:hover { background: var(--hover); }
.role-pop-item.danger { color: #B91C1C; }

/* 身份选择卡 */
.role-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 16px; font: inherit; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg-surface);
  transition: border-color .15s ease, background .15s ease;
}
.role-opt:hover { border-color: var(--accent); background: var(--accent-tint); }
.role-ic {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-tint); display: grid; place-items: center;
}
.role-tx { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.role-tx b { font-size: 14.5px; }
.role-tx i { font-style: normal; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.role-go { color: var(--text-2); font-size: 16px; }
.role-rem {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 2px 2px 0; padding: 10px 12px; cursor: pointer;
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  border: 1px dashed var(--border); border-radius: var(--r-btn, 12px);
}
.role-rem:hover { border-color: var(--accent); }
.role-rem input { flex: 0 0 15px; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.role-pop-note { display: block; margin-top: 3px; font-size: 11.5px; font-style: normal; font-weight: 400; color: var(--text-2); }
.role-pass-wrap { min-height: auto; padding: 20px 0; background: none; }
.role-err { min-height: 18px; }

/* 老师端：同页内嵌管理页 */
.workspace-embed { padding: 0; gap: 0; max-width: none; overflow: hidden; }
.embed-wrap { flex: 1; min-height: 0; display: flex; }
iframe.embed { flex: 1; width: 100%; border: 0; background: var(--bg-surface); display: block; }
