/* =========================================================================
   课程观看网站 · 全局样式
   配色规范（严格遵守）：
     底色    浅米白  #F8F8F5
     木色    浅豆绿  #A4C8A0  → 板块标签 / 次要按钮 / 边框
     火色    浅珊瑚红 #E88A8A  → 核心按钮 / 重点标题高亮 / 装饰分割线
     正文深灰 #333333   辅助灰 #666666
   禁止大面积红绿背景，红绿仅作点缀。
   ========================================================================= */

:root {
  --bg: #F8F8F5;
  --wood: #A4C8A0;        /* 木色 / 浅豆绿 */
  --wood-soft: #E8F0E6;   /* 木色更浅，用于卡片浅底（非大块红绿） */
  --wood-line: #C9DDC5;
  --fire: #E88A8A;        /* 火色 / 浅珊瑚红 */
  --fire-soft: #F7E3E3;
  --text: #333333;
  --text-sub: #666666;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(120, 120, 110, 0.10);
  --maxw: 1080px;
  --site-font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* 🔴 2026-11-07 补齐：以下 4 个变量此前被引用但从未定义，
   *    导致整条声明失效（实测：板块分隔线宽度 0、数量徽章无背景无边框）。
   *    --line / --bg-soft 给中性分隔线与浅底；--brand / --accent 给品牌强调色。
   *    注意：--fire / --wood / --bg / --text 会被 common.js 的 applyTheme()
   *    在运行时覆盖（后台装修主题），这里定义的是**兜底值**，
   *    真正生效的是后台设置 —— 改配色必须走后台，改这里的值无效。 */
  --line: #DDDCD4;         /* 中性分隔线（不随主题变，保证始终可见） */
  --bg-soft: #F4F3ED;      /* 浅底（徽章等） */
  --brand: #E88A8A;        /* 品牌强调色兜底 */
  --accent: #A4C8A0;       /* 辅助强调色兜底 */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--site-font);
  font-size: 15px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------------- 布局容器 ---------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wood-line);
}
.topbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--wood); display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.brand .accent { color: var(--fire); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--text-sub); font-size: 14px; }
/* 🔴 2026-11-07 修复：.nav-links a（0,0,1,1）特异性高于 .btn-fire（0,0,1,0），
 *    导致顶栏里的「登录/激活」按钮文字被压成辅助灰 —— 实测 color=rgb(143,143,143)，
 *    珊瑚红底 + 灰字，几乎看不清。按钮类要显式夺回颜色控制权。 */
.nav-links a.btn { color: inherit; }
.nav-links a.btn-fire { color: #fff; }
.nav-links a.btn-fire:hover { color: #fff; }
.nav-links a.btn-wood { color: var(--text); }
.nav-links a.btn-ghost { color: var(--text-sub); }
.nav-links a.btn-ghost:hover { color: var(--fire); }
/* 🔴 2026-11-09 晚：顶栏「预约咨询」改绿色（用户原话：「要醒目一点，用个绿色」）
 *    → 顶栏三个按钮三色：登录/激活＝火色（btn-fire）、预约咨询＝绿（btn-leaf）、
 *      退出＝ghost。绿按钮在顶栏需要显式夺回颜色（.nav-links a.btn 特异性更高）。 */
.nav-links a.btn-leaf { color: #fff; }
.nav-links a.btn-leaf:hover { color: #fff; }
.nav-links a:hover:not(.btn) { color: var(--fire); }
/* 🔴 2026-11-09 晚：【交易体系】导航入口已按用户要求**整体删除**。
 *    （原 .nav-system-link 样式一并移除，避免留下死规则。） */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wood-soft); border: 1px solid var(--wood-line);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: .15s; font-weight: 600;
}
.btn-fire { background: var(--fire); color: #fff; }       /* 核心操作：火色 */
.btn-fire:hover { filter: brightness(1.05); }
.btn-wood { background: var(--wood-soft); color: var(--text); border-color: var(--wood-line); } /* 次要：木色 */
.btn-wood:hover { background: var(--wood); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-sub); border-color: var(--wood-line); }
.btn-ghost:hover { color: var(--fire); border-color: var(--fire); }
/* 🔴 2026-11-10 修正：绿色按钮（顶栏「预约咨询」用）
 *    用户原话：「预约咨询不要鲜绿色，跟左上角『学』字绿色统一」
 *    → 底色改为 **logo 同款低饱和绿**（--wood = #A4C8A0，主题 secondary 同值），
 *      文字沿用 logo 的白字，形成「同一个绿」的一致观感。
 *    ⚠️ 低饱和绿 + 白字对比度偏低，属于「弱对比但同色系」，
 *      hover 时压深一档保证可读；不使用之前的鲜绿 #2f8f5b。 */
.btn-leaf { background: var(--wood); color: #fff; border-color: var(--wood); }
.btn-leaf:hover { background: #8FB98B; border-color: #8FB98B; color: #fff; }

/* ---------------- 内页左上角「返回上一层 / 返回首页」双按钮组 ----------------
   🔴 2026-11-09 晚：由 public/js/common.js 的 App.__initBackBtn() 统一注入。
   规则：
   - 固定在左上角，z-index 高于顶栏（topbar = 50），浮在内容之上；
   - 两个按钮**并排**（.page-back-btns 容器），左边「返回上一层」、
     右边「返回首页」，各自独立可点；
   - 配色全部走站点 CSS 变量（--wood-soft / --wood-line / --text），
     跟随后台主题（applyTheme 会覆盖 --wood / --text），深浅底都可读；
   - top 由 JS 按**顶栏实测高度**写入 style.top（顶栏是 sticky、高度随语种/主题变化，
     写死数值迟早对不上）→ 永远落在顶栏下方，不遮挡顶部导航。
   - CSS 里的 top 只作兜底（JS 未执行时的初值）。 */
.page-back-btns {
  position: fixed;
  top: 68px;                        /* 兜底值：JS 会用顶栏实测高度覆盖 */
  left: 16px;
  z-index: 900;                     /* > topbar(50)，浮在内容之上 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--wood-line);
  background: var(--wood-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(120, 120, 110, .12);
  backdrop-filter: blur(6px);
  transition: .15s;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}
.page-back-btn:hover {
  border-color: var(--fire);
  color: var(--fire);
}
/* 🔴 「返回首页」按钮：与「返回上一层」区分 —— 用木色描边 + 火色文字，
 *    视觉上是"另一个动作"，避免两个同样的「返回」让人分不清。 */
.page-back-btn.pbb-home {
  background: var(--white);
  border-color: var(--fire);
  color: var(--fire);
}
.page-back-btn.pbb-home:hover {
  background: var(--fire);
  color: #fff;
}
.page-back-btn .pbb-arrow { font-size: 16px; line-height: 1; font-weight: 700; }
/* 有返回按钮的内页：正文顶部留出按钮高度，避免首屏标题被压住 */
body.has-back-btn .container:first-of-type { padding-top: 8px; }
/* 🔴🔴 2026-11-11：移动端不再写死 top —— 顶栏高度由 JS 实测后写入 style.top，
 *   CSS 里再写一个 56px 会与 JS 打架（JS 写的是内联样式，优先级更高，
 *   但两处数值不一致会导致「刷新瞬间闪一下错位」）。
 *   → 这里只保留 left / gap / 字号，位置一律交给 JS。 */
@media (max-width: 700px) {
  .page-back-btns {
    left: 10px;
    gap: 6px;
  }
  .page-back-btn {
    padding: 5px 12px 5px 9px;
    font-size: 12.5px;
  }
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
/* ================= 课程目录卡片（横版：图左文右） ================= */
/* 单列 + 限宽：封面按原图比例（618×348）完整显示，右侧文字区不再被拉成大片空白 */
.course-grid { display: grid; gap: 18px; grid-template-columns: 1fr; max-width: 860px; }

/* 首页按类目（板块）分组（2026-10-17）
 * 用户已建多个类目课程（财经 / 心理学…），首页要能一眼看出区别。
 * 只有一个类目时不加标题，所以 .cat-group-head 不出现，视觉上与原来完全一致。
 * 🔴 2026-11-07：板块标题改为「色条 + 标题 + 细分隔线 + 数量徽章」的层次结构，
 *    让板块与板块之间有明确的视觉断点（原设计里分隔线因 --line 未定义而完全不可见）。 */
.cat-group { margin-bottom: 36px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-group-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.cat-group-name {
  font-size: 17px; font-weight: 700; color: var(--text);
  letter-spacing: .3px;
}
.cat-group-name::before {
  content: ''; display: inline-block;
  width: 4px; height: 16px; margin-right: 10px;
  background: var(--brand, var(--accent, #c0392b));
  border-radius: 2px; vertical-align: -2px;
}
.cat-group-count {
  font-size: 12px; color: var(--text-sub);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px;
  /* 紧跟板块名（不顶到最右 —— 离标题太远会读不出归属关系） */
  align-self: center;
}

/* 🔴 2026-11-07 课程卡层级强化：
 *    原设计三张卡完全同质（白底 + 同圆角 + 同阴影 + 同字号），
 *    导致主次不分、页面像「一堆相同的小盒子」。
 *    改动：① 悬停抬起 + 边框转暖色，做交互暗示
 *          ② 标题放大加粗、副标题/描述降级，形成字号阶梯
 *          ③ 封面加大并加浅底衬，右上角加「查看详情」箭头提示 */
.course-grid > .course-card {
  margin-top: 0 !important; display: flex; flex-direction: row; gap: 20px;
  align-items: stretch; padding: 16px; box-sizing: border-box; width: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.course-grid > .course-card:hover {
  transform: translateY(-2px);
  border-color: var(--wood-line);
  box-shadow: 0 10px 30px rgba(120, 120, 110, .16);
}
/* 封面：宽 300px，按 618:348 ≈ 16:9 原比例，不压扁、不裁字 */
.course-card-cover {
  flex: 0 0 auto; width: 300px; aspect-ratio: 618 / 348;
  object-fit: contain; object-position: center;
  background: var(--wood-soft); border-radius: 10px;
}
.course-cover-ph {
  flex: 0 0 auto; width: 300px; aspect-ratio: 618 / 348;
  display: flex; align-items: center; justify-content: center;
  background: var(--wood-soft); border-radius: 10px;
  color: var(--text-sub); font-size: 13px;
}
.course-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.course-card-title {
  margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.35;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color .18s ease;
}
.course-grid > .course-card:hover .course-card-title { color: var(--fire); }
.course-card-meta {
  font-size: 12.5px; color: var(--text-sub); margin: 0 0 10px;
  min-height: 17px; display: flex; align-items: center; gap: 6px;
}
.course-card-desc {
  font-size: 13.5px; color: var(--text-sub); margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7;
}
.course-card-foot {
  margin-top: auto; padding-top: 4px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--fire);
}
/* 「查看详情」右侧箭头：悬停时前移 */
.course-card-foot::after {
  content: '→';
  font-size: 14px;
  transition: transform .18s ease;
  display: inline-block;
}
.course-grid > .course-card:hover .course-card-foot::after { transform: translateX(3px); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .course-grid { max-width: none; }
  .course-grid > .course-card { flex-direction: column; }
  .course-card-cover, .course-cover-ph { width: 100%; height: auto; }
}

/* ---------------- 板块标签（木色） ---------------- */
.tag {
  display: inline-block; background: var(--wood-soft); color: #4f6b4a;
  border: 1px solid var(--wood-line); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; font-weight: 600;
}
.tag-fire { background: var(--fire-soft); color: #b95353; border-color: #f0cccc; }

/* ---------------- 装饰分割线（火色点缀） ---------------- */
.divider {
  height: 3px; width: 56px; background: var(--fire); border-radius: 3px; margin: 14px 0;
}
.section-title { font-size: 22px; font-weight: 700; color: var(--text); }
.section-title .hl { color: var(--fire); }   /* 重点标题高亮：火色 */

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.input, .textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--wood-line);
  border-radius: 10px; font-size: 14px; color: var(--text); background: #fff; font-family: inherit;
}
.input:focus, .textarea:focus, select:focus { outline: none; border-color: var(--wood); box-shadow: 0 0 0 3px var(--wood-soft); }
.textarea { min-height: 160px; resize: vertical; line-height: 1.7; }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 999; opacity: 0; transition: .25s; pointer-events: none;
  max-width: 88vw; text-align: center; line-height: 1.5;
}
.toast.show { opacity: 1; }
/* 长提示（保存后「强刷缓存」提醒）：拉宽、放浅底色 + fire 强调色 */
.toast.toast-hint {
  background: #fff7e8; color: #6a3a00; border: 1px solid #f4c98a;
  font-size: 13px; padding: 12px 22px;
}
.tip { font-size: 13px; color: var(--text-sub); }
.tip-fire { color: var(--fire); }
.muted { color: var(--text-sub); }

/* ---------------- 首页 Hero ---------------- */
/* ---------------- 首页 Hero ---------------- */
/* 🔴 2026-11-07 重排：原 Hero 只有标题+副标+一个按钮，首屏信息密度过低、
 *    层级扁平（34px 标题直接压在大片留白上）。改为：
 *    ① 标题放大到 40px 并加字距，品牌名用暖色高亮
 *    ② 主次两个 CTA（主：登录/激活；次：价格与内容）
 *    ③ 新增「首屏三点说明」条，把「能看什么/怎么开始」讲清楚
 *    ④ Hero 上下留白收一点，避免内容挤在顶部 */
.hero { padding: 64px 0 44px; text-align: center; }
.hero h1 {
  font-size: 40px; margin: 0 0 14px; font-weight: 800;
  letter-spacing: .5px; line-height: 1.3;
}
.hero h1 .hl { color: var(--fire); }
.hero p { color: var(--text-sub); max-width: 620px; margin: 0 auto 26px; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-lg { padding: 13px 30px; font-size: 15px; border-radius: 12px; }

/* 首屏三点说明：编号 + 标题 + 一句说明 */
.hero-points {
  list-style: none; margin: 34px auto 0; padding: 0;
  max-width: 880px;
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  text-align: left;
}
.hero-points li {
  background: var(--white);
  border: 1px solid var(--wood-line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 3px;
}
.hero-points .hp-n {
  font-size: 12px; font-weight: 800; color: var(--fire);
  letter-spacing: 1px; margin-bottom: 2px;
}
.hero-points .hp-t { font-size: 15px; font-weight: 700; color: var(--text); }
.hero-points .hp-d { font-size: 12.5px; color: var(--text-sub); line-height: 1.7; }
@media (max-width: 720px) {
  .hero h1 { font-size: 30px; }
  .hero-points { grid-template-columns: 1fr; }
}

/* ---------------- 免责声明 / 隐私政策（常驻） ---------------- */
.disclaimer {
  background: var(--wood-soft); border: 1px solid var(--wood-line);
  border-left: 4px solid var(--wood);
  border-radius: 10px; padding: 14px 18px; font-size: 13px; color: var(--text-sub);
  white-space: pre-wrap; line-height: 1.8;
}
.disclaimer.fire { background: var(--fire-soft); border-color: #f0cccc; border-left-color: var(--fire); }

.privacy-footer {
  border-top: 1px solid var(--wood-line); margin-top: 40px;
  padding: 26px 0 40px; font-size: 13px; color: var(--text-sub);
}
.privacy-footer h4 { color: var(--text); margin: 0 0 8px; }
.privacy-footer .pv-text { white-space: pre-wrap; line-height: 1.8; }

/* ---------------- 页脚法条链接（仅链接，不展示正文与主体名称） ---------------- */
.legal-footer { border-top: 1px solid var(--wood-line); margin-top: 40px; padding: 20px 0 34px; }
.legal-footer .legal-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: center; }
/* v24.22：对外联系邮箱（法条兜底文案「见网站页脚公示」的落点） */
.legal-footer .legal-contact { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--text-sub); }
.legal-footer .legal-contact a { color: var(--text-sub); text-decoration: none; border-bottom: 1px solid transparent; }
.legal-footer .legal-contact a:hover { color: var(--text); border-bottom-color: var(--wood-line); }
.legal-link {
  color: var(--text-sub); font-size: 13px; text-decoration: none;
  padding: 4px 2px; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.legal-link:hover { color: var(--fire); border-bottom-color: var(--fire); }
/* 2026-11-06 Cloudflare 迁移追加：全站页脚固定免责声明（中英随语种切换）
   —— 只追加样式，不改动上方任何既有规则 */
.legal-footer .legal-disclaimer {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--wood-line);
  font-size: 12px; line-height: 1.85;
  color: var(--text-sub); text-align: center;
  opacity: .9;
}

/* ---------------- 语种切换器 ---------------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; }
.lang-btn {
  border: 1px solid var(--wood-line); background: #fff; color: var(--text-sub);
  font-size: 12px; line-height: 1; padding: 5px 9px; cursor: pointer; border-radius: 6px;
  transition: all .15s;
}
.lang-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lang-btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none; }
.lang-btn:hover { color: var(--fire); }
.lang-btn.on { background: var(--fire); border-color: var(--fire); color: #fff; }

/* ---------------- 法条详情页 ---------------- */
.legal-doc { max-width: 780px; margin: 0 auto; }
.legal-doc-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.legal-doc-title { font-size: 22px; font-weight: 800; color: var(--text); margin: 0; }
.legal-doc h2.legal-h2 { font-size: 19px; font-weight: 800; color: var(--text); margin: 28px 0 10px; }
.legal-doc h2.legal-h2:first-child { margin-top: 2px; }
.legal-doc h3.legal-h3 { font-size: 15px; font-weight: 700; color: var(--fire); margin: 22px 0 8px; }
.legal-doc p { line-height: 1.95; font-size: 14px; color: var(--text); margin: 0 0 10px; }
.legal-doc .legal-list { margin: 0 0 12px; padding-left: 24px; }
.legal-doc .legal-list li { line-height: 1.95; font-size: 14px; color: var(--text); margin: 0 0 6px; }
.legal-doc .legal-quote {
  margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--fire);
  background: var(--wood-soft); border-radius: 0 8px 8px 0;
  font-size: 13px; color: var(--text-sub); line-height: 1.8;
}
.legal-doc .legal-ph-tip {
  margin: 20px 0 0; padding: 10px 12px; border: 1px dashed var(--wood-line);
  border-radius: 8px; font-size: 12px; color: var(--text-sub); background: var(--wood-soft);
}
.legal-doc-sub { font-size: 20px; font-weight: 700; color: var(--text); margin: 26px 0 8px; }
.legal-company-box {
  margin-top: 18px; padding: 16px 18px; border-radius: 10px;
  background: var(--wood-soft); border-left: 4px solid var(--wood);
}
.legal-company-box .legal-doc-sub { margin-top: 0; }
.legal-company-box .legal-company-name { font-weight: 700; font-size: 15px; color: var(--text); margin: 0 0 6px; }
.legal-company-box .legal-company-info { white-space: pre-wrap; line-height: 1.8; font-size: 13px; color: var(--text-sub); margin: 0; }

/* ---------------- 登录 / 表单页 ---------------- */
.auth-wrap { max-width: 460px; margin: 60px auto; }
.auth-wrap .card { padding: 30px; }
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.step { flex: 1; text-align: center; font-size: 13px; color: var(--text-sub); padding: 8px; border-radius: 8px; background: var(--wood-soft); }
.step.active { background: var(--fire); color: #fff; }

/* ---------------- 视频 / 内容区 ---------------- */
.player-box {
  background: #141414; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
}
/* 模拟模式视频占位提示 */
.mock-player-tip { text-align: center; color: #cfd8cd; padding: 20px 24px; max-width: 560px; }
.mock-player-tip b { color: #fff; font-size: 16px; }
.mock-player-tip p { font-size: 13px; line-height: 1.8; margin: 8px 0 0; }
.mock-player-icon { font-size: 34px; margin-bottom: 6px; }
/* 🔴 v24.6：播放器加载失败时的中文提示。
   原先播放器初始化失败被 `catch(e){}` 吞掉，页面只留一个全黑框，
   用户完全无从判断是网络、SDK 还是地址问题。以后一律显式告知。 */
.player-err {
  text-align: center; color: #f3c9c9; padding: 24px; max-width: 640px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.player-err b { color: #fff; font-size: 16px; }
.player-err span { font-size: 13px; line-height: 1.7; word-break: break-all; }
.player-err .tip { color: #9aa39a; font-size: 12px; }
  background: #1f1f1f; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center; color: #999;
}
.player-box iframe, .player-box video, .player-box > div { width: 100%; height: 100%; border: 0; }
/* 本地视频：浏览器原生播放器，controls 自带全屏/暂停/快进/进度条/倍速 */
.local-player {
  width: 100%; height: 100%; display: block; background: #000;
  object-fit: contain; outline: none;
}
.local-player:focus { box-shadow: inset 0 0 0 2px var(--fire); }

/* 未开通学员的圈子互动引导（点一下才提示） */
.circle-gate {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--wood-line);
  text-align: center;
}
.circle-gate.shake { animation: gateShake .5s ease; }
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .circle-gate.shake { animation: none; }
}
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--wood-line); border-radius: 12px; }
.article-body { font-size: 15px; line-height: 1.9; color: var(--text); }
.article-body img { max-width: 100%; border-radius: 8px; margin: 12px 0; }

/* ---------------- 评论区 ---------------- */
.comment { border-top: 1px solid var(--wood-line); padding: 14px 0; }
.comment .meta { font-size: 12px; color: var(--text-sub); }
.comment-form textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid var(--wood-line); border-radius: 10px; font-family: inherit; }
.comment-form .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* ---------------- 后台表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--wood-line); text-align: left; }
.table th { color: var(--text-sub); font-weight: 600; background: var(--wood-soft); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-ok { background: var(--wood-soft); color: #4f6b4a; }
.badge-off { background: var(--fire-soft); color: #b95353; }

/* ---------------- 学习进度条（木火配色） ---------------- */
.progress {
  width: 100%; height: 10px; background: var(--wood-soft);
  border: 1px solid var(--wood-line); border-radius: 999px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--wood) 0%, var(--fire) 100%);
  transition: width .35s ease;
}

/* ---------------- 工具类 ---------------- */
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-lg { margin-top: 32px; }
.text-center { text-align: center; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap { gap: 12px; }
.hidden { display: none !important; }

/* ---------------- 课程宣传界面（学员端） ---------------- */
.course-hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--wood-soft); }
.course-hero-img { display: block; width: 100%; max-height: 300px; object-fit: contain; }
/* 竖版超长封面：限高并居中，避免 800x4000 这类长图把页面撑得极长 */
.course-hero:has(.course-hero-img-tall) { padding: 0; }
.course-hero-img-tall { max-height: 420px; width: auto; max-width: 100%; margin: 0 auto; }
.course-hero-default {
  height: 180px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--wood-soft) 0%, var(--fire-soft) 100%);
  color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: 1px;
}
.course-desc { color: var(--text-sub); margin: 10px 0 0; }
/* 未开通课程的卡片提示 */
.course-locked-tip {
  display: inline-block; font-size: 12px; color: var(--fire);
  background: var(--fire-soft); border: 1px solid var(--wood-line);
  border-radius: 999px; padding: 4px 12px; margin-top: 4px;
}
/* 课程页未开通横幅 */
.locked-banner {
  border-left: 4px solid var(--fire);
  background: var(--wood-soft);
  margin-bottom: 18px;
}
.locked-banner-title { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.locked-banner-text { color: var(--text-sub); font-size: 13px; }
/* 未开通时的素材占位 */
.locked-material {
  border: 1px dashed var(--wood-line); background: var(--wood-soft);
  border-radius: var(--radius); padding: 16px 18px; margin: 12px 0;
  text-align: center;
}
.locked-material-title { color: var(--text-sub); font-size: 14px; }
.locked-tag {
  font-size: 12px; color: var(--text-sub);
  border: 1px solid var(--wood-line); border-radius: 999px; padding: 2px 10px;
  white-space: nowrap;
}
/* ================= 课程学习页（三栏 Tab：圈子 / 目录 / 简介） ================= */
.course-stat-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-sub);
  background: var(--wood-soft); border-radius: var(--radius);
  padding: 12px 16px; margin: 14px 0;
}
.course-stat-bar b { color: var(--fire); font-size: 16px; }
.course-foot-bar {
  display: flex; gap: 10px; justify-content: flex-end;
  margin: 12px 0 4px;
}
/* 2026-11-06 Cloudflare 迁移追加：课程详情页底部固定免责声明
   —— 只追加样式，不改动上方任何既有规则 */
.course-disclaimer {
  margin-top: 20px; padding: 12px 14px;
  border: 1px solid var(--wood-line); border-radius: var(--radius);
  background: rgba(0, 0, 0, .015);
  font-size: 12px; line-height: 1.85;
  color: var(--text-sub);
}
.player-box { border-radius: var(--radius); overflow: hidden; background: #1c1c1c; }
.locked-player { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.locked-player-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.locked-player-mask {
  position: relative; z-index: 1; text-align: center; color: #fff;
  background: rgba(0, 0, 0, .55); padding: 26px 22px; border-radius: var(--radius);
  max-width: 92%; backdrop-filter: blur(2px);
}
.locked-player-title { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.locked-player-text { font-size: 14px; opacity: .92; line-height: 1.7; }
.locked-player-mask .btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }

.course-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--wood-line);
  margin-top: 18px; position: sticky; top: 0; background: var(--white); z-index: 5;
}
.course-tab {
  background: none; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--text-sub);
  padding: 12px 22px; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.course-tab.active { color: var(--fire); border-bottom-color: var(--fire); }
.tab-badge { font-size: 13px; }
.course-panel { padding: 16px 0; }
.panel-h { font-size: 16px; margin: 18px 0 10px; color: var(--text); }
.panel-h:first-child { margin-top: 0; }

.catalog-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--fire-soft); border: 1px solid var(--wood-line);
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 12px; font-size: 13px;
}
.catalog-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--wood-line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
}
.catalog-item:hover { border-color: var(--wood); box-shadow: var(--shadow); }
.catalog-item.on { border-color: var(--fire); background: var(--fire-soft); }
.catalog-item.locked { cursor: default; opacity: .9; }
.catalog-item.locked:hover { box-shadow: none; border-color: var(--wood-line); }
.catalog-no { font-size: 20px; font-weight: 800; color: var(--wood); min-width: 34px; }
.catalog-item.on .catalog-no { color: var(--fire); }
.catalog-main { flex: 1; min-width: 0; }
.catalog-title { font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.catalog-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-sub); }
.st-done { color: var(--wood); }
.st-todo { color: var(--fire); }
.st-lock { color: var(--text-sub); }
.catalog-play { font-size: 18px; color: var(--fire); }

/* v19：课程标题行 + 完结/更新中标记 */
.course-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.course-flag {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--wood-line); white-space: nowrap;
}
.course-flag.done { color: var(--wood); background: var(--wood-soft); border-color: var(--wood); }
.course-flag.updating { color: var(--fire); background: var(--fire-soft); border-color: var(--fire); }

/* v19：目录行内单节课进度条（按时长） */
.ci-prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; max-width: 320px; }
.ci-prog-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--wood-soft); overflow: hidden; }
.ci-prog-bar i { display: block; height: 100%; border-radius: 999px; background: var(--fire); transition: width .3s; }
.ci-prog-num { font-size: 11px; color: var(--text-sub); min-width: 30px; text-align: right; }

/* 🔴 2026-11-10：目录行内**课件清单**（PDF / 课件直接可见）
 *   起因：用户要求「机构操盘策略看得到视频和 PDF，交易心理课程看得到已上传课件」，
 *   而实测页面上一个文件都看不到 —— 全部藏在一个 📎 图标后的弹层里。
 *   → 在每一行下方平铺列出文件名 + 查看/下载按钮。
 *   视觉：木色浅底 + 虚线分隔，与目录行本身区分开；文件名超长省略号截断。 */
.cat-files {
  margin-top: 8px; padding: 8px 10px;
  border: 1px dashed var(--wood-line); border-radius: 8px;
  background: var(--wood-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.cat-file {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.cat-file .cf-icon { flex: 0 0 auto; font-size: 13px; }
.cat-file .cf-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-file .cf-btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .cat-file { flex-wrap: wrap; }
  .cat-file .cf-name { flex: 1 1 100%; }
}

/* v19：分享弹层 */
.share-panel {
  background: var(--white); border-radius: var(--radius); max-width: 460px; width: 92%;
  margin: 6vh auto 0; padding: 18px; box-shadow: var(--shadow);
  max-height: 88vh; overflow-y: auto;
}
.share-card { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.share-cover {
  width: 84px; height: 60px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--wood-line); flex: 0 0 auto;
}
.share-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.share-info b { font-size: 15px; }
.share-label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.share-link-row { display: flex; gap: 8px; }
.share-link-input {
  flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--wood-line); border-radius: var(--radius);
  background: var(--bg-soft, #faf7f2); color: var(--text);
}
.share-qr { margin-top: 14px; text-align: center; }
.share-qr svg { max-width: 200px; height: auto; border: 1px solid var(--wood-line); border-radius: 8px; }
/* 目录行右侧：共享文件 📎 + 收藏 ☆ 紧挨播放键 ▶ */
.catalog-acts { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.catalog-ico {
  position: relative; background: none; border: 1px solid transparent;
  border-radius: 999px; cursor: pointer; padding: 3px 8px;
  font-size: 17px; line-height: 1; color: var(--text-sub);
  display: inline-flex; align-items: center; gap: 2px;
}
.catalog-ico:hover { background: var(--wood-soft); border-color: var(--wood-line); }
.catalog-ico.has-file { color: var(--wood); }
.catalog-ico.on { color: var(--fire); }
.catalog-ico i {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--text-sub);
}
.catalog-ico.has-file i { color: var(--fire); }

.shared-files { border: 1px solid var(--wood-line); border-radius: var(--radius); overflow: hidden; }
.shared-file {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--wood-line); background: var(--white);
}
.shared-file:last-child { border-bottom: none; }
.sf-icon { font-size: 22px; }
.sf-main { flex: 1; min-width: 0; }
.sf-name { font-size: 14px; font-weight: 700; word-break: break-all; }
.sf-meta { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.circle-rating {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  background: var(--wood-soft); border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.cr-left { text-align: center; min-width: 110px; }
.cr-score { font-size: 38px; font-weight: 800; color: var(--fire); line-height: 1; }
.cr-score small { font-size: 14px; margin-left: 2px; }
.cr-stars { font-size: 17px; color: var(--fire); margin: 4px 0; }
.cr-right { flex: 1; min-width: 200px; }
.cr-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-sub); margin: 4px 0; }
.cr-bar span { min-width: 30px; }
.cr-bar i { height: 8px; background: var(--fire); border-radius: 4px; display: block; }
.cr-bar em { font-style: normal; min-width: 26px; }

.circle-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cf-btn {
  background: none; border: 1px solid var(--wood-line); border-radius: 999px;
  padding: 5px 16px; font-size: 13px; cursor: pointer; color: var(--text-sub);
}
.cf-btn.active { background: var(--fire); color: #fff; border-color: var(--fire); }
.cp-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--wood);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex: 0 0 auto;
}
.cp-rate { color: var(--fire); font-size: 13px; }
.cp-act {
  background: none; border: 1px solid var(--wood-line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--text-sub);
}
.cp-act.on { color: var(--fire); border-color: var(--fire); background: var(--fire-soft); }
.circle-replies { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--wood-line); }
.circle-reply { padding: 8px 0; }

/* 更多操作面板 */
.more-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
}
.file-panel {
  background: var(--white); width: 100%; max-width: 520px;
  border-radius: 16px 16px 0 0; padding: 18px 20px 24px;
  max-height: 86vh; overflow-y: auto;
}
.more-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.more-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-sub); }
/* 券码激活弹层：字段比资料列表多，需要更高一点、留出底部安全区 */
.redeem-panel { max-width: 440px; padding-bottom: 30px; }
.redeem-panel .field { margin-bottom: 12px; }
.redeem-panel .field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 5px; }
#redeemMask { align-items: center; }
.more-arrow { color: var(--text-sub); font-size: 18px; }
.panel-h-sub { font-size: 13px; color: var(--text-sub); font-weight: normal; }

/* PDF 在线预览 */
.file-viewer {
  background: var(--white); width: 100%; height: 100%;
  display: flex; flex-direction: column;
}
.file-viewer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--wood-line); flex: 0 0 auto;
}
.file-viewer-frame { flex: 1 1 auto; width: 100%; border: none; background: #f4f4f4; }
#fileMask { align-items: center; }
@media (max-width: 640px) {
  .course-tab { padding: 10px 14px; font-size: 15px; }
  .catalog-no { font-size: 17px; min-width: 26px; }
}

.lesson-card.locked { opacity: .85; }
.lesson-card.locked:hover { box-shadow: var(--shadow); }
.promo-box {
  background: var(--white); border: 1px solid var(--wood-line); border-radius: var(--radius);
  padding: 18px 20px; margin: 16px 0; box-shadow: var(--shadow);
}
.promo-box img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.promo-box h1, .promo-box h2, .promo-box h3 { color: var(--fire); margin: 12px 0 8px; }
.promo-box p { margin: 8px 0; }
.promo-box ul, .promo-box ol { padding-left: 22px; }
.promo-edit:empty:before { content: "在此编辑课程的宣传介绍、课程亮点、适合人群等（支持加粗、插入图片）"; color: #aaa; }
.disclaimer-box {
  background: var(--wood-soft); border: 1px solid var(--wood-line);
  border-left: 4px solid var(--fire); border-radius: 10px; padding: 14px 16px; margin: 16px 0;
}
.disclaimer-title { font-weight: 700; color: var(--fire); margin-bottom: 6px; }
.disclaimer-text { font-size: 13px; color: var(--text-sub); white-space: pre-wrap; line-height: 1.6; }

/* ---------------- 课程卡片（板块页 / 后台列表） ---------------- */
.course-card-link { transition: transform .2s ease, box-shadow .2s ease; }
.course-card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.course-cover-sm, .course-cover {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: var(--wood-soft); display: flex; align-items: center; justify-content: center;
}
.course-cover-sm img, .course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover-ph { color: var(--text-sub); font-size: 13px; }
.chapter-group { border-top: 1px dashed var(--wood-line); padding-top: 6px; }
.chapter-name {
  font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.chapter-name::before { content: ""; width: 4px; height: 16px; background: var(--wood); border-radius: 3px; display: inline-block; }

/* 后台课程列表卡片 */
.course-card {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 16px; align-items: center;
  background: var(--white); border: 1px solid var(--wood-line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.course-card .course-info h3 { margin: 0 0 4px; font-size: 16px; }
.course-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-preview { margin-top: 8px; }
.cover-preview img { max-width: 160px; max-height: 100px; border-radius: 8px; border: 1px solid var(--wood-line); object-fit: cover; }
@media (max-width: 640px) {
  .course-card { grid-template-columns: 1fr; }
}

/* ---------------- 后台布局 ---------------- */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; max-width: var(--maxw); margin: 24px auto; padding: 0 20px; }
@media (max-width: 760px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.admin-nav a { padding: 10px 14px; border-radius: 10px; color: var(--text-sub); font-size: 14px; border: 1px solid transparent; }
.admin-nav a:hover { background: var(--wood-soft); color: var(--text); }
.admin-nav a.on { background: var(--fire); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--wood-soft); border: 1px solid var(--wood-line); border-radius: 12px; padding: 16px; text-align: center; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--fire); }
.stat .lbl { font-size: 13px; color: var(--text-sub); }
.admin-main { min-width: 0; }

/* ==================== 后台外壳（左固定侧栏 + 顶栏） ==================== */
.ashell { display: flex; min-height: 100vh; }
.aside {
  width: 220px; flex: 0 0 220px;
  background: var(--wood-soft);
  border-right: 1px solid var(--wood-line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.aside-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px; font-weight: 800; font-size: 16px; color: var(--text);
  border-bottom: 1px solid var(--wood-line);
}
.aside-brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--wood);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
}
.aside-brand .accent { color: var(--fire); }
.aside-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-item { border-radius: 10px; }
.nav-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: none; background: transparent; cursor: pointer;
  color: var(--text); font-size: 14.5px; font-weight: 700; text-align: left;
  border-radius: 10px; transition: .15s; font-family: inherit;
}
.nav-head:hover { background: #fff; }
.nav-item.on > .nav-head { color: var(--fire); }
.nav-head .nav-ico { font-size: 15px; width: 20px; text-align: center; flex: none; }
.nav-head .nav-name { flex: 1; min-width: 0; }
.nav-head .nav-arrow { color: #9aa89a; font-size: 15px; flex: none; transition: transform .18s; }
.nav-item.on > .nav-head .nav-arrow { transform: rotate(90deg); color: var(--fire); }
.nav-sub { display: none; flex-direction: column; gap: 2px; padding: 2px 0 8px; }
.nav-item.on .nav-sub { display: flex; }
.nav-sub a {
  display: block; padding: 8px 12px 8px 42px; border-radius: 8px;
  color: var(--text-sub); font-size: 13px; text-decoration: none; transition: .15s;
}
.nav-sub a:hover { background: #fff; color: var(--text); }
.nav-sub a.on { background: var(--fire); color: #fff; font-weight: 600; }
.amain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.atopbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; background: rgba(248,248,245,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--wood-line);
}
.atitle { font-size: 17px; font-weight: 700; color: var(--text); }
.aactions { display: flex; align-items: center; gap: 12px; }
.bell {
  position: relative; border: none; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px 6px; border-radius: 8px;
}
.bell:hover { background: var(--wood-soft); }
.bell-dot {
  position: absolute; top: 2px; right: 1px; width: 9px; height: 9px;
  background: var(--fire); border: 2px solid #fff; border-radius: 50%;
}
.badge-queue {
  background: var(--fire); color: #fff; border-radius: 999px;
  padding: 0 6px; font-size: 11px; font-weight: 700; margin-left: 2px;
}
.acontent { padding: 22px 26px 40px; max-width: 1200px; width: 100%; }

@media (max-width: 820px) {
  .ashell { flex-direction: column; }
  .aside { width: 100%; flex: none; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--wood-line); }
  .aside-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-item { flex: 1 1 46%; }
  .nav-item.on { flex-basis: 100%; }
  .nav-sub a { padding-left: 34px; }
  .acontent { padding: 16px; }
}

/* ==================== 仪表盘 hero 统计 ==================== */
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stat-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.stat-hero { border-left: 4px solid var(--fire); }
.stat-hero .num { font-size: 30px; }

/* ==================== 概况页（千聊风格） ==================== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { background: #fff; border: 1px solid var(--wood-line); border-radius: 14px; padding: 20px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.dash-head h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.dash-unit { font-size: 12px; color: var(--text-sub); }
.dash-tip { font-size: 12px; color: var(--text-sub); }
.dash-tabs, .dash-subtabs { display: inline-flex; border: 1px solid var(--wood-line); border-radius: 8px; overflow: hidden; }
.dash-tabs .tab, .dash-subtabs .tab { border: none; background: #fff; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text-sub); }
.dash-tabs .tab + .tab, .dash-subtabs .tab + .tab { border-left: 1px solid var(--wood-line); }
.dash-tabs .tab.active, .dash-subtabs .tab.active { background: var(--fire); color: #fff; font-weight: 600; }
.dash-subtabs { margin-bottom: 18px; }
.dash-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-metric { display: flex; flex-direction: column; gap: 6px; }
.dm-label { font-size: 13px; color: var(--text-sub); }
.dm-num { font-size: 28px; font-weight: 800; color: var(--text); }
.dm-trend { font-size: 12px; color: #8a9a8a; }
.account-body { display: flex; flex-direction: column; gap: 14px; }
.account-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.account-item { display: flex; flex-direction: column; gap: 6px; }
.ai-label { font-size: 13px; color: var(--text-sub); }
.ai-num { font-size: 22px; font-weight: 700; color: var(--text); }
.account-detail { font-size: 12px; color: var(--text-sub); background: var(--wood-soft); padding: 8px 10px; border-radius: 8px; }
.todo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .todo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .todo-grid { grid-template-columns: 1fr; } }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--wood-line); text-decoration: none; transition: .15s; background: var(--wood-soft); }
.todo-item:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.todo-ico { font-size: 22px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; border: 1px solid var(--wood-line); }
.todo-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.todo-name { font-size: 13px; color: var(--text-sub); }
.todo-num { font-size: 22px; font-weight: 800; color: var(--text); }
.todo-go { font-size: 12px; color: var(--fire); font-weight: 600; white-space: nowrap; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--wood-line); }
.mini-table th { color: var(--text-sub); font-weight: 600; background: var(--wood-soft); }
.mini-table .channel-name { text-align: left; font-weight: 600; color: var(--text); }
.trend-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .trend-summary { grid-template-columns: repeat(2, 1fr); } }
.trend-item { display: flex; flex-direction: column; gap: 4px; }
.ti-label { font-size: 13px; color: var(--text-sub); }
.ti-num { font-size: 22px; font-weight: 700; color: var(--text); }
.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 140px; padding: 10px 0 0; border-bottom: 1px solid var(--wood-line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-stack { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100px; }
.bar { width: 10px; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.uv { background: var(--fire); }
.bar.fan { background: #a8c6a8; }
.bar-date { font-size: 11px; color: var(--text-sub); }
.bar-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--text-sub); }
.bar-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.bar-legend .dot.uv { background: var(--fire); }
.bar-legend .dot.fan { background: #a8c6a8; }

/* ==================== 课程三级层级：课程 > 课 > 节（上层字号更大） ==================== */
/* 第一层 课程名 = .section-title（22px，见上文） */
/* 第二层 课名 */
.chapter-group { margin-top: 20px; }
.chapter-name {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 0 0 10px; padding-left: 10px;
  border-left: 4px solid var(--wood); line-height: 1.35;
}
/* 第三层 节名（课时卡片标题，必须小于课名） */
.lesson-card { padding: 14px 16px; }
.lesson-card h3 { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.4; }
/* 章名（课与节之间的可选分组） */
.part-name {
  font-size: 15.5px; font-weight: 600; color: var(--text-sub);
  margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid var(--wood-line);
}
/* 后台封面预览 */
.cover-preview img {
  max-width: 320px; width: 100%; height: auto; max-height: 180px;
  object-fit: contain; border-radius: 10px; border: 1px solid var(--wood-line);
  background: var(--bg);
}

/* ==================== 课程编辑：课 / 节 ==================== */
.req { color: var(--fire); font-weight: 700; }
.chapter-item {
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.chapter-head { display: flex; align-items: center; gap: 10px; }
.drag-handle { cursor: grab; color: var(--text-sub); font-size: 16px; user-select: none; }
.chapter-lessons { margin: 10px 0 8px 26px; display: flex; flex-direction: column; gap: 6px; }
.lesson-mini {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border: 1px solid var(--wood-line); border-radius: 8px; padding: 7px 10px; font-size: 13.5px;
}

/* ==================== 富文本编辑器 ==================== */
.rt-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px;
  background: var(--wood-soft); border: 1px solid var(--wood-line); border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.rt-toolbar button {
  border: 1px solid var(--wood-line); background: #fff; color: var(--text);
  border-radius: 7px; padding: 5px 9px; font-size: 13px; cursor: pointer; min-width: 34px;
}
.rt-toolbar button:hover { background: var(--wood); color: #fff; }
.rt-editor {
  min-height: 150px; max-height: 420px; overflow-y: auto;
  border: 1px solid var(--wood-line); border-radius: 0 0 10px 10px;
  padding: 12px 14px; font-size: 14px; line-height: 1.7; background: #fff;
}
.rt-editor:focus { outline: none; border-color: var(--wood); box-shadow: 0 0 0 3px var(--wood-soft); }
.rt-editor img { max-width: 100%; border-radius: 8px; }

/* ==================== 封面裁剪弹层 ==================== */
.crop-modal {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(40,40,40,.55); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.crop-box {
  background: #fff; border-radius: 14px; padding: 18px; width: min(680px, 96vw);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.crop-title { font-weight: 700; margin-bottom: 12px; }
.crop-stage {
  position: relative; width: 100%; height: 340px; overflow: hidden;
  background: #111; border-radius: 8px; user-select: none;
}
.crop-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crop-sel {
  position: absolute; border: 2px dashed #fff; cursor: move;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.4); box-sizing: border-box;
}
.crop-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ==================== 上传队列面板 ==================== */
.upload-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 950;
  width: 360px; max-width: calc(100vw - 36px);
  background: #fff; border: 1px solid var(--wood-line);
  border-radius: 12px; box-shadow: 0 14px 40px rgba(80,80,70,.25); overflow: hidden;
}
.up-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--wood); color: #fff; font-weight: 600; font-size: 14px;
}
.up-head button { background: rgba(255,255,255,.2); border: none; color: #fff; border-radius: 6px; cursor: pointer; width: 26px; height: 24px; font-size: 14px; }
.up-head button:hover { background: rgba(255,255,255,.35); }
/* 「清空失败项」是文字按钮，需要压掉 .up-head button 的固定 26px 宽度 */
.up-head .up-clear-all {
  width: auto; height: 22px; padding: 0 9px; font-size: 12px;
  font-family: inherit; margin-right: 4px; white-space: nowrap;
}
.up-head .up-clear-all.hidden { display: none; }
.up-body { max-height: 46vh; overflow-y: auto; padding: 10px 12px; }
.up-empty { color: var(--text-sub); font-size: 13px; text-align: center; padding: 20px 0; }
.up-task { padding: 10px 0; border-bottom: 1px solid var(--wood-line); }
.up-task:last-child { border-bottom: none; }
.up-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.up-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-st { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--wood-soft); color: #4f6b4a; }
.up-st.queued { background: #eee; color: #777; }
.up-st.uploading { background: var(--wood-soft); color: #4f6b4a; }
.up-st.transcode { background: #e7eefb; color: #3b6cc4; }
.up-st.ready { background: #e6f4ea; color: #2e7d4f; }
.up-st.failed, .up-st.needfile { background: var(--fire-soft); color: #b95353; }
.up-st.paused, .up-st.canceled { background: #eee; color: #888; }
.up-meta { font-size: 11.5px; color: var(--text-sub); margin: 4px 0 6px; }
/* 课时编辑面板内的上传进度卡（与右下角队列面板同一套观感，只是就地显示） */
.up-inline {
  background: #fff; border: 1px solid var(--wood-line); border-radius: 10px;
  padding: 10px 12px; margin-top: 8px;
}
.up-err { color: #b95353; }
.up-ok { color: #2e7d4f; font-weight: 600; }
.up-err { color: #b95353; }

/* ==================== 千聊风格：筛选栏 / 状态 Tab / 汇总行 / 批量条 / 分页 / 工具卡 ==================== */
/* 筛选栏：白卡 + 「标签 控件」横排组 + 右侧操作按钮 */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.filter-bar .qf { display: flex; align-items: center; gap: 8px; }
.filter-bar .qf > label { font-size: 13px; color: var(--text-sub); white-space: nowrap; flex: none; }
.filter-bar .qf .input { width: auto; min-width: 150px; }
.filter-bar .qf-grow { flex: 1 1 220px; min-width: 0; }
.filter-bar .qf-grow .input { width: 100%; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* 状态 Tab（全部 / 已发布 / 草稿…） */
.tab-row { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--wood-line); margin-bottom: 16px; }
.tab-btn {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  padding: 9px 16px; font-size: 14px; color: var(--text-sub); border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--fire); }
.tab-btn.on { color: var(--fire); font-weight: 700; border-bottom-color: var(--fire); }

/* 列表汇总行：「共有学员 X 人，当前查询条件下 X 人」 */
.list-summary { font-size: 13px; color: var(--text-sub); margin: 14px 2px 10px; }
.list-summary b { color: var(--text); }

/* 批量操作条（导出等） */
.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.batch-bar .picked { font-size: 12.5px; color: var(--text-sub); }

/* 表格增强：横向滚动容器 / 复选框列 / 可排序表头 / 操作文字链 */
.table-wrap { overflow-x: auto; }
.table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sortable:hover { color: var(--fire); }
.table th.sortable::after { content: "↕"; margin-left: 5px; color: #b7c2b7; font-size: 11px; }
.table th.sortable.asc::after { content: "↑"; color: var(--fire); }
.table th.sortable.desc::after { content: "↓"; color: var(--fire); }
.col-check { width: 38px; text-align: center !important; }
.col-check input { width: 15px; height: 15px; accent-color: var(--fire); cursor: pointer; vertical-align: middle; }
.lnk-op { color: var(--wood); font-size: 12.5px; text-decoration: none; margin-right: 12px; white-space: nowrap; cursor: pointer; border: none; background: none; padding: 0; font-family: inherit; }
.lnk-op:hover { color: var(--fire); text-decoration: underline; }
.lnk-op.danger { color: #b95353; }

/* 分页条 */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-sub); }
.pager .pager-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--wood-line);
  background: #fff; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text); font-family: inherit;
}
.pager .pager-btn:hover:not(:disabled) { border-color: var(--fire); color: var(--fire); }
.pager .pager-btn.on { background: var(--fire); border-color: var(--fire); color: #fff; font-weight: 700; }
.pager .pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager select { width: auto; padding: 5px 8px; font-size: 12.5px; }

/* 营销中心工具卡网格 */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--white); border: 1px solid var(--wood-line); border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(80,80,70,.16); border-color: var(--wood); }
.tool-card .tc-ico {
  width: 42px; height: 42px; border-radius: 10px; background: var(--wood-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none;
}
.tool-card .tc-ico.fire { background: var(--fire-soft); }
.tool-card .tc-name { font-size: 15px; font-weight: 700; color: var(--text); }
.tool-card .tc-desc { font-size: 12.5px; color: var(--text-sub); line-height: 1.65; }
.tool-card .tc-go { font-size: 12.5px; color: var(--fire); font-weight: 600; margin-top: auto; }
.tool-group-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.tool-group-title:first-child { margin-top: 0; }
.tool-group-title .hl { color: var(--fire); }
.tool-group-desc { font-size: 12.5px; color: var(--text-sub); line-height: 1.7; margin: -6px 0 14px; }
.tool-group-desc b { color: var(--text); }
.up-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ==================== 站内消息中心 ==================== */
.notif {
  background: #fff; border: 1px solid var(--wood-line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.notif.unread { border-left: 4px solid var(--fire); }
.notif-type {
  display: inline-block; font-size: 11px; font-weight: 700; color: #4f6b4a;
  background: var(--wood-soft); border-radius: 999px; padding: 1px 9px; margin-right: 8px;
}

/* ==================== 新建单课（千聊风格单页编辑） ==================== */
.ce-crumb { margin: 0 0 12px; font-size: 13px; color: var(--text-sub); }
.ce-crumb a { color: var(--fire); text-decoration: none; }
.ce-crumb a:hover { text-decoration: underline; }
.ce-module { border-top: 3px solid var(--fire); }
.ce-cover { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.ce-cover-preview {
  width: 320px; flex: none; aspect-ratio: 16 / 9;
  background: var(--wood-soft); border: 1px dashed var(--wood-line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ce-cover-preview img { width: 100%; height: 100%; object-fit: contain; }
.ce-cover-side { flex: 1; min-width: 220px; }
.ce-types { display: flex; flex-wrap: wrap; gap: 8px; }
.ce-types label {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--wood-line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; transition: .15s;
}
.ce-types label:hover { border-color: var(--fire); }
.ce-types input { accent-color: var(--fire); }
.ce-types label:has(input:checked) { border-color: var(--fire); background: #fdf3ee; color: var(--fire); font-weight: 600; }

/* 课程完结标记行（v19） */
.ce-finish-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px;
  background: #faf7f2; border: 1px dashed var(--wood-line); border-radius: 10px;
}

/* 推广文案块（v19） */
.promo-block {
  border: 1px solid var(--wood-line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px; background: #fffdf9;
}
.promo-text { width: 100%; resize: vertical; line-height: 1.7; font-size: 13px; background: #fff; }

.ce-chapter {
  background: #fff; border: 1px solid var(--wood-line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
/* 拖拽排序反馈：源块半透明，目标块显示上/下插入线 */
.ce-chapter.ce-drag-src { opacity: .45; border-style: dashed; }
.ce-chapter.ce-drag-over-top { box-shadow: 0 -3px 0 0 var(--fire); }
.ce-chapter.ce-drag-over-bot { box-shadow: 0 3px 0 0 var(--fire); }
/* 手柄按下时提示可拖 */
.ce-chapter .drag-handle { cursor: grab; }
.ce-chapter .drag-handle:active { cursor: grabbing; }
.ce-chapter-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ce-chapter-title { flex: 1; min-width: 180px; max-width: 420px; font-weight: 600; }
.ce-chapter-mat { margin: 8px 0 0; font-size: 12.5px; color: var(--text-sub); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ce-chapter-docs:empty { display: none; }
.ce-chapter-docs { margin: 8px 0 0; }
.ce-part {
  margin: 10px 0 8px 22px; padding: 8px 10px;
  background: var(--wood-soft); border-radius: 10px; border: 1px dashed var(--wood-line);
}
.ce-part-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ce-part-name { font-weight: 600; font-size: 13.5px; color: var(--text-sub); }

.ce-lesson { margin: 6px 0 6px 22px; border: 1px solid var(--wood-line); border-radius: 10px; background: #fff; overflow: hidden; }
.ce-part .ce-lesson { margin-left: 14px; }

/* ---- 单课时合并模式（2026-10-17）----
 * 用户反馈「课」和同名课时两层内容重复、页面被拉长。合并后：
 *   课名称输入框 = 唯一标题入口；下面只留一行「点此编辑视频/PDF/图文」。 */
.ce-chapter-merged { border-left: 3px solid var(--fire); }
.ce-lesson-sole { margin: 4px 0 2px 22px; border-style: dashed; background: var(--wood-soft); }
.ce-lesson-sole .ce-lesson-head { padding: 7px 12px; }
.ce-lesson-title-inline { flex: 1; min-width: 0; color: var(--text-sub); font-size: 13px; }
.ce-lp-hint {
  margin-bottom: 12px; padding: 8px 12px; border-radius: 8px;
  background: var(--wood-soft); border: 1px dashed var(--wood-line);
  font-size: 13px; color: var(--text-sub);
}

/* 拖拽手柄：加宽点击区域，让用户一眼看出这里能拖 */
.ce-chapter .drag-handle {
  flex: none; width: 26px; height: 30px; line-height: 30px; text-align: center;
  border-radius: 6px; border: 1px dashed var(--wood-line); background: #fff;
  font-size: 15px; user-select: none; -webkit-user-drag: element;
}
.ce-chapter .drag-handle:hover { background: var(--wood-soft); border-color: var(--fire); }
.ce-drag-src { opacity: .45; }
.ce-drag-over-top { box-shadow: 0 -3px 0 0 var(--fire) inset; }
.ce-drag-over-bot { box-shadow: 0 3px 0 0 var(--fire) inset; }

/* 文档行排序（2026-10-18）：课时级与课级共用同一套视觉。
 * 独立于 .ce-chapter 的手柄样式：小一号的行，图标区域也小一点。 */
.ce-doc-row .drag-handle {
  flex: none; width: 20px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 5px; border: 1px dashed var(--wood-line); background: #fff;
  font-size: 13px; user-select: none; -webkit-user-drag: element;
}
.ce-doc-row .drag-handle:hover { background: var(--wood-soft); border-color: var(--fire); }
.ce-doc-row .drag-handle:active { cursor: grabbing; }
.ce-doc-row.ce-drag-src { opacity: .45; background: var(--bg-soft); }

.ce-lesson.open { border-color: var(--fire); box-shadow: 0 0 0 3px rgba(198,84,58,.08); }
.ce-lesson-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  font-size: 13.5px; transition: background .15s;
}
.ce-lesson-head:hover { background: var(--bg); }
.ce-lesson-play { color: var(--fire); font-size: 11px; flex: none; }
.ce-lesson-title { flex: 1; min-width: 0; font-weight: 600; }
.ce-lesson-icons { flex: none; font-size: 12px; color: var(--text-sub); }
.ce-lesson-toggle { flex: none; font-size: 12px; color: var(--fire); font-weight: 600; }
.ce-lesson-panel { border-top: 1px solid var(--wood-line); padding: 14px; background: var(--bg); }
.ce-lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 760px) { .ce-lp-grid { grid-template-columns: 1fr; } }
.ce-lp-block { margin-bottom: 14px; }
.ce-lp-label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ce-upload-zone {
  border: 1px dashed var(--wood-line); border-radius: 10px; padding: 14px;
  background: #fff; transition: .15s;
}
.ce-upload-zone:hover { border-color: var(--fire); background: #fdf3ee; }

.ce-bottombar {
  position: sticky; bottom: 0; z-index: 30; margin-top: 20px;
  background: rgba(248,248,245,.94); backdrop-filter: blur(8px);
  border-top: 1px solid var(--wood-line);
}
.ce-bottombar-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* ===================== 直播课程模块 ===================== */
.live-status-bar { margin: 6px 0 14px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.st-live { color: #e64040; font-weight: 700; }
.badge-live { background: #fdecec; color: #e64040; border: 1px solid #f3bcbc; }
.tag-live { background: #eaf2ff; color: #2f6fd0; border: 1px solid #c5dcfb; }
.live-countdown-box { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.live-countdown-box .mock-player-icon { font-size: 40px; }
/* 编辑器开关行 */
.switch-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.switch-row input { margin-top: 4px; width: 16px; height: 16px; flex: none; }

/* ===================== 数据中心（2026-10-17） ===================== */
.dc-wrap { display: flex; gap: 18px; align-items: flex-start; }

/* 左侧二级栏目（参照截图的竖排菜单） */
.dc-side {
  flex: none; width: 168px; background: var(--white);
  border: 1px solid var(--wood-line); border-radius: 12px; padding: 8px 0;
}
.dc-side a {
  display: block; padding: 11px 18px; font-size: 14px; color: var(--text-sub);
  border-left: 3px solid transparent; transition: all .15s;
}
.dc-side a:hover { color: var(--fire); background: var(--wood-soft); }
.dc-side a.on {
  color: var(--fire); font-weight: 700; background: var(--wood-soft);
  border-left-color: var(--fire);
}
.dc-main { flex: 1; min-width: 0; }

/* 卡片 */
.dc-card {
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 14px; padding: 20px; margin-bottom: 16px;
}
.dc-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.dc-card-head h4 { margin: 0; font-size: 16px; font-weight: 700; }
.dc-sub { font-size: 12.5px; color: var(--text-sub); font-weight: 400; }

/* 时间段切换（7天/15天/30天/昨日） */
.dc-period { display: inline-flex; border: 1px solid var(--wood-line); border-radius: 8px; overflow: hidden; }
.dc-period button {
  border: none; background: var(--white); padding: 6px 14px; font-size: 13px;
  color: var(--text-sub); cursor: pointer; border-right: 1px solid var(--wood-line);
}
.dc-period button:last-child { border-right: none; }
.dc-period button.on { background: var(--wood-soft); color: var(--fire); font-weight: 700; }
.dc-period button:hover:not(.on) { background: var(--wood-soft); }

/* 汇总数字条（截图顶部那排 7 个数字） */
.dc-summary {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--wood-soft); border-radius: 12px; padding: 16px 0;
}
.dc-summary-item { text-align: center; border-right: 1px solid var(--wood-line); }
.dc-summary-item:last-child { border-right: none; }
.dc-summary-item .lbl { font-size: 13px; color: var(--text-sub); }
.dc-summary-item .num { font-size: 24px; font-weight: 800; color: var(--fire); line-height: 1.3; }

/* 课程类型分布块 */
.dc-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dc-type-group .gt { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.dc-type-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--wood-line);
}
.dc-type-cell { padding: 12px 6px; text-align: center; border-right: 1px solid var(--wood-line); }
.dc-type-cell:last-child { border-right: none; }
.dc-type-cell .lbl { font-size: 13px; color: var(--text-sub); }
.dc-type-cell .num { font-size: 20px; font-weight: 700; }

/* 环形图 */
.dc-donut-wrap { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.dc-donut { position: relative; width: 168px; height: 168px; flex: none; }
.dc-donut svg { transform: rotate(-90deg); display: block; }
.dc-donut .hole {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; pointer-events: none;
}
.dc-donut .hole .hl { font-size: 12.5px; color: var(--text-sub); }
.dc-donut .hole .hn { font-size: 22px; font-weight: 800; }
.dc-legend { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.dc-legend-row { display: flex; align-items: center; gap: 7px; }
.dc-legend-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dc-legend-row .pct { color: var(--text-sub); font-size: 12px; }

/* 占比表格 + 进度条（截图右侧那种「区间 / 订单数 / 占比」） */
.dc-ratio-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-ratio-table th, .dc-ratio-table td { padding: 9px 8px; border-bottom: 1px solid var(--wood-line); text-align: left; }
.dc-ratio-table th { background: var(--wood-soft); color: var(--text-sub); font-weight: 600; }
.dc-ratio-table td.num, .dc-ratio-table th.num { text-align: right; }
.dc-bar { height: 6px; background: var(--wood-soft); border-radius: 4px; overflow: hidden; min-width: 60px; }
.dc-bar > i { display: block; height: 100%; background: var(--wood); border-radius: 4px; }
.dc-bar.fire > i { background: var(--fire); }

/* 折线/柱状趋势图 */
.dc-line-wrap { position: relative; height: 220px; margin-top: 6px; }
.dc-line-wrap svg { width: 100%; height: 100%; overflow: visible; }
.dc-axis-y { position: absolute; left: 0; top: 0; bottom: 22px; width: 44px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11.5px; color: var(--text-sub); }
.dc-axis-x { position: absolute; left: 48px; right: 0; bottom: 0; height: 20px; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-sub); }
.dc-grid-line { stroke: var(--wood-line); stroke-width: 1; }
.dc-line-path { fill: none; stroke: var(--wood); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dc-line-path.fire { stroke: var(--fire); }
.dc-area-path { fill: var(--wood-soft); opacity: .55; }

/* 空态 / 不可用提示 */
.dc-empty { text-align: center; padding: 26px 10px; color: var(--text-sub); font-size: 13px; }
.dc-empty .ico { font-size: 30px; display: block; margin-bottom: 8px; opacity: .55; }
.dc-na {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--text-sub); background: var(--wood-soft);
  border: 1px solid var(--wood-line); border-radius: 20px; padding: 2px 9px;
}
.dc-na-ctr { text-align: right; color: var(--text-sub); font-size: 12px; white-space: nowrap; }
.dc-na-ctr a { color: var(--fire); }
.dc-note {
  margin-top: 12px; padding: 10px 12px; background: var(--wood-soft);
  border-left: 3px solid var(--wood); border-radius: 0 8px 8px 0;
  font-size: 12.5px; color: var(--text-sub); line-height: 1.7;
}
.dc-note b { color: var(--text); }

/* 两栏布局 */
.dc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 私域流量池表格 */
.dc-pool-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dc-pool-table th, .dc-pool-table td { padding: 12px 10px; border-bottom: 1px solid var(--wood-line); text-align: left; }
.dc-pool-table th { background: var(--wood-soft); color: var(--text-sub); font-weight: 600; white-space: nowrap; }
.dc-pool-table td.n { text-align: center; font-weight: 700; }

/* 分销类型小卡 */
.dc-mini-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dc-mini {
  border: 1px solid var(--wood-line); border-radius: 12px; padding: 14px;
  background: var(--white);
}
.dc-mini .lbl { font-size: 12.5px; color: var(--text-sub); margin-bottom: 6px; min-height: 34px; }
.dc-mini .num { font-size: 22px; font-weight: 800; color: var(--fire); }
.dc-mini .num small { font-size: 12px; color: var(--text-sub); font-weight: 400; margin-left: 3px; }
.dc-mini .sub { font-size: 12px; color: var(--text-sub); margin-top: 5px; }
.dc-mini .sub a { color: var(--fire); }

/* 筛选条 */
.dc-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.dc-filter .qf { display: flex; flex-direction: column; gap: 4px; }
.dc-filter .qf label { font-size: 12.5px; color: var(--text-sub); }
.dc-filter .qf.grow { flex: 1; min-width: 150px; }

@media (max-width: 900px) {
  .dc-grid-2, .dc-types { grid-template-columns: 1fr; }
  .dc-summary { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .dc-mini-cards { grid-template-columns: repeat(2, 1fr); }
  .dc-side { width: 100%; }
  .dc-wrap { flex-direction: column; }
}
.dc-note code {
  display: inline-block; background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 5px; padding: 0 5px; font-size: 12px; font-family: Consolas, Monaco, monospace;
  color: var(--fire);
}

/* ===================== 店铺装修（2026-10-17） ===================== */
.shop-layout { display: grid; grid-template-columns: 268px 1fr; gap: 18px; align-items: start; }

/* 左侧面板 */
.shop-side {
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 14px; padding: 16px; position: sticky; top: 0;
  max-height: calc(100vh - 130px); overflow-y: auto;
}
.shop-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--wood-line);
}
.shop-sec-title .caret { color: var(--text-sub); font-size: 12px; }

/* 可添加模块图标网格 */
.shop-add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shop-add {
  border: 1px solid var(--wood-line); border-radius: 10px; background: var(--white);
  padding: 12px 4px; text-align: center; cursor: pointer; transition: all .15s;
}
.shop-add:hover { border-color: var(--fire); background: var(--fire-soft); transform: translateY(-1px); }
.shop-add .ico { font-size: 22px; display: block; line-height: 1.4; }
.shop-add .nm { font-size: 12.5px; margin-top: 3px; }

/* 开关行 */
.shop-switch {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 2px; font-size: 13.5px; border-bottom: 1px dashed var(--wood-line);
}
.shop-switch:last-child { border-bottom: none; }
/* iOS 风格开关 */
.sw { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw .track {
  position: absolute; inset: 0; background: #cfd8cf; border-radius: 24px; transition: .2s;
}
.sw .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.sw input:checked + .track { background: #3fa06a; }
.sw input:checked + .track .knob { transform: translateX(18px); }

/* 右侧：手机预览 */
.shop-phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shop-phone {
  width: 340px; height: 640px; background: #fff; border: 9px solid #2b2f33;
  border-radius: 32px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
}
.shop-phone-bar {
  height: 26px; background: #2b2f33; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.shop-phone-head {
  height: 40px; border-bottom: 1px solid var(--wood-line); display: flex;
  align-items: center; justify-content: center; font-size: 13.5px; font-weight: 700; flex: none;
}
.shop-phone-body { flex: 1; overflow-y: auto; background: var(--bg); padding: 10px; }
.shop-phone-foot {
  border-top: 1px solid var(--wood-line); padding: 10px; font-size: 11.5px;
  color: var(--text-sub); text-align: center; background: #fff; flex: none;
}

/* 预览里的模块块 */
.shop-blk {
  background: #fff; border: 1px solid var(--wood-line); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden; position: relative; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.shop-blk:hover { border-color: var(--fire); }
.shop-blk.dragging { opacity: .45; border-style: dashed; }
.shop-blk.over-top { box-shadow: 0 -3px 0 0 var(--fire); }
.shop-blk.over-bot { box-shadow: 0 3px 0 0 var(--fire); }
.shop-blk.hidden-blk { opacity: .5; background: repeating-linear-gradient(45deg, #fff, #fff 8px, var(--wood-soft) 8px, var(--wood-soft) 16px); }
.shop-blk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 9px; background: var(--wood-soft); font-size: 11.5px; color: var(--text-sub);
  border-bottom: 1px solid var(--wood-line);
}
.shop-blk-bar .t { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.shop-blk-bar .ops { display: flex; gap: 4px; }
.shop-blk-bar .ops button {
  border: 1px solid var(--wood-line); background: #fff; border-radius: 6px;
  width: 22px; height: 22px; line-height: 1; cursor: pointer; font-size: 12px; padding: 0;
}
.shop-blk-bar .ops button:hover { border-color: var(--fire); color: var(--fire); }
.shop-blk-body { padding: 11px; font-size: 12.5px; }
.shop-blk-empty { color: var(--text-sub); font-size: 12px; text-align: center; padding: 12px 0; }

/* 预览内各种模块的迷你样式 */
.sp-hero { background: linear-gradient(135deg, var(--fire-soft), var(--wood-soft)); padding: 18px 12px; text-align: center; }
.sp-hero .h { font-size: 15px; font-weight: 800; color: var(--fire); }
.sp-hero .s { font-size: 11.5px; color: var(--text-sub); margin-top: 4px; }
.sp-banner-img { height: 88px; border-radius: 8px; background: var(--wood-soft); display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 11.5px; }
.sp-banner-img.has { background: #fff; border: 1px dashed var(--wood-line); }
.sp-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sp-course { border: 1px solid var(--wood-line); border-radius: 7px; overflow: hidden; }
.sp-course .cv { height: 46px; background: var(--wood-soft); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-sub); }
.sp-course .ti { font-size: 11px; padding: 4px 5px; line-height: 1.35; }
.sp-knowledge { background: var(--wood-soft); border-radius: 8px; padding: 10px; font-size: 12px; }
.sp-live { display: flex; align-items: center; gap: 8px; }
.sp-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #e64040; flex: none; }
.sp-assign { display: flex; align-items: center; gap: 7px; }
/* 预览里的导航栏 / 功能区 */
.sp-nav-demo { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-nav-demo span {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--wood-soft); border: 1px solid var(--wood-line);
}
.sp-func-demo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sp-func-demo span {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 9.5px; color: var(--text-sub); text-align: center;
}
.sp-func-demo b { font-size: 17px; }

/* 导航栏 / 功能区 的入口项编辑行 */
.item-editor { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: flex; gap: 7px; align-items: center; }
.chk-list {
  max-height: 240px; overflow-y: auto; border: 1px solid var(--wood-line);
  border-radius: 10px; padding: 9px 12px; background: #fff;
}
.chk-list label { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 13px; }

/* 模块配置弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.hidden { display: none; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 520px;
  max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--wood-line); font-size: 15px; font-weight: 700; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--wood-line); display: flex; justify-content: flex-end; gap: 9px; }

/* 配置表单 */
.fld { margin-bottom: 15px; }
.fld label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 5px; }
.fld .hint { font-size: 11.5px; color: var(--text-sub); margin-top: 4px; }

/* ===================== 店铺装修 · 学员前台（2026-10-17） =====================
   前台装修区块。与上面的 .shop-blk（后台预览）刻意区分，
   前台用 .sf- 前缀，避免两套样式互相干扰。 */

/* 通用外壳：每个装修模块外面包一层 */
.sf-blk { margin: 0 0 26px; }
.sf-blk:last-child { margin-bottom: 0; }

/* 模块标题（后台填了标题才显示） */
.sf-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 12px;
}
.sf-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--wood-line), transparent);
}

/* ① 图片 / Banner 模块 */
.sf-banner {
  display: block; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--wood-line); background: var(--wood-soft);
}
.sf-banner img { width: 100%; display: block; }
.sf-banner-empty {
  padding: 34px 16px; text-align: center; color: var(--text-sub);
  font-size: 13px; background: var(--wood-soft); border-radius: 14px;
}

/* ② 店铺头图（内置） */
.sf-hero {
  background: linear-gradient(135deg, var(--fire-soft), var(--wood-soft));
  border: 1px solid var(--wood-line); border-radius: 18px;
  padding: 38px 24px; text-align: center;
}
.sf-hero .h { font-size: 26px; font-weight: 800; color: var(--fire); line-height: 1.35; }
.sf-hero .s { font-size: 14px; color: var(--text-sub); margin-top: 9px; line-height: 1.7; }
.sf-hero .act { margin-top: 20px; }
.sf-hero .act .divider { margin: 20px auto 14px; }
.sf-hero .tip { font-size: 12.5px; }

/* ③ 短知识 / 作业 / 通用文字块 */
.sf-note {
  border-radius: 14px; padding: 16px 18px; font-size: 14px; line-height: 1.75;
  border: 1px solid var(--wood-line); background: var(--wood-soft); color: var(--text);
}
.sf-note.assignment { background: var(--fire-soft); border-color: transparent; }
.sf-note .nk {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--fire); margin-bottom: 7px;
}

/* ④ 直播模块 */
.sf-live-card {
  display: block; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--wood-line); background: var(--white); color: inherit;
}
.sf-live-card:hover { border-color: var(--fire); }
.sf-live-cover { position: relative; background: var(--wood-soft); }
.sf-live-cover img { width: 100%; display: block; }
.sf-live-cover .ph {
  height: 150px; display: flex; align-items: center; justify-content: center;
  color: var(--text-sub); font-size: 13px;
}
.sf-live-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.68); color: #fff; font-size: 11.5px;
  padding: 4px 10px; border-radius: 20px; font-weight: 700;
}
.sf-live-badge.on { background: #e64040; }
.sf-live-body { padding: 14px 16px; }
.sf-live-body h3 { font-size: 15.5px; margin-bottom: 6px; }
.sf-live-meta { font-size: 12.5px; color: var(--text-sub); }
.sf-live-desc { font-size: 13px; color: var(--text-sub); margin-top: 8px; line-height: 1.6; }
.sf-live-foot { margin-top: 11px; display: flex; align-items: center; gap: 10px; }

/* ⑤ 课程集合 / 单课模块
   卡片复用前端原生 .course-card 横版样式（封面 618:348 原比例、图左文右），
   这里只负责容器网格——窄屏下自动降为单列，与首页课程列表观感一致。 */
.sf-courses {
  display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 820px;
}
.sf-courses > .course-card { margin-top: 0 !important; }

/* 内置「全部课程」区块 */
.sf-all-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sf-all-head .sf-title { margin-bottom: 0; flex: 1; }

/* 导航栏模块 */
.sf-nav {
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 14px; padding: 11px 14px;
}
.sf-nav-item {
  font-size: 13.5px; color: var(--text); text-decoration: none;
  padding: 6px 14px; border-radius: 20px; background: var(--wood-soft);
}
.sf-nav-item:hover { background: var(--fire); color: #fff; }

/* 功能区（金刚区）模块 */
.sf-func { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 640px) { .sf-func { grid-template-columns: repeat(3, 1fr); } }
.sf-func-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 14px; padding: 16px 8px; text-decoration: none; color: var(--text);
}
.sf-func-item:hover { border-color: var(--fire); }
.sf-func-item .ic { font-size: 24px; line-height: 1; }
.sf-func-item .tx { font-size: 12.5px; color: var(--text-sub); text-align: center; }

/* 领券中心模块 */
.sf-coupon {
  background: linear-gradient(135deg, var(--fire-soft), var(--wood-soft));
  border-radius: 16px; padding: 22px 24px; display: flex;
  align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.sf-coupon .tx { font-size: 13.5px; line-height: 1.75; color: var(--text); flex: 1; min-width: 260px; margin: 0; }
.sf-coupon .btn { flex: none; }

/* 训练营模块 */
.sf-camp {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--wood-line);
  border-radius: 16px; padding: 22px 24px;
}
a.sf-camp:hover { border-color: var(--fire); }
.sf-camp h4 { font-size: 17px; margin-bottom: 8px; color: var(--fire); }
.sf-camp p { font-size: 13.5px; color: var(--text-sub); line-height: 1.75; margin: 0; }

/* 空态 */
.sf-empty { padding: 22px; text-align: center; color: var(--text-sub); font-size: 13px; }
.chk-list { max-height: 190px; overflow-y: auto; border: 1px solid var(--wood-line); border-radius: 8px; padding: 8px; }
.chk-list label { display: flex; align-items: center; gap: 7px; padding: 5px 4px; font-size: 13px; color: var(--text); cursor: pointer; }
.chk-list label:hover { background: var(--wood-soft); }
.chk-list input { width: 15px; height: 15px; }

@media (max-width: 1000px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-side { position: static; max-height: none; }
}

/* ---------- 孤儿课时提示框（挂错章节、历史删除遗留） ---------- */
.ce-orphan-box {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px dashed var(--fire);
  border-radius: 10px;
  background: rgba(178, 106, 47, .06);
}
.ce-orphan-head {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 8px;
}
.ce-orphan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 0;
  border-top: 1px solid var(--wood-line);
  font-size: 13px;
}

/* ============================ v20 新增：孤儿清理页 ============================ */
.btn-danger { background: var(--fire); color: #fff; border-color: var(--fire); }
.btn-danger:hover { filter: brightness(1.05); }
.badge-gray { background: #eef0ee; color: #6b6b6b; }
.badge-warn { background: #fdf3e0; color: #b07a1f; border: 1px solid #f0d9a8; }
.cleanup-wrap { max-width: 1080px; margin: 0 auto; padding: 18px 20px 60px; }
.cleanup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cleanup-head h2 { margin: 0 0 4px; }
.cleanup-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cleanup-summary { background: var(--wood-soft); border: 1px solid var(--wood-line); border-radius: 8px; padding: 10px 14px; margin: 14px 0; font-size: 14px; }
.cleanup-card { background: #fff; border: 1px solid var(--wood-line); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.cleanup-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cleanup-card-head h3 { margin: 0; font-size: 15px; }
.cleanup-card .tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cleanup-card .tbl th, .cleanup-card .tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--wood-line); }
.cleanup-card .tbl th { color: var(--text-sub); font-weight: 600; }
.cleanup-card .empty { padding: 10px 0; }

/* ---------------- v24 第一期：播放器漂移跑马水印（双层水印的前端层） ----------------
 * 与云端 VOD 烧录的「静态左上角淡水印」叠加：
 *   烧录水印负责"截图也带着"，跑马水印负责"位置不固定、DOM 里删不掉"。
 * pointer-events:none —— 不挡播放、不挡全屏按钮、不挡控制条。
 * 低透明度 + 轻微模糊，让它干扰阅读但不干扰观看体验。 */
.wm-marquee {
  position: absolute;
  left: 0; top: 0;
  z-index: 20;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  white-space: nowrap;
  transform: translate(16px, 16px);
  will-change: transform;
  animation: wm-breathe 6s ease-in-out infinite;
}
@keyframes wm-breathe {
  0%, 100% { opacity: .78; }
  50%      { opacity: .42; }
}
/* 全屏时字体要跟着放大，否则大屏上根本看不见 */
.player-box:fullscreen .wm-marquee,
.player-box:-webkit-full-screen .wm-marquee { font-size: 20px; }

/* =========================================================================
   2026-11-07 前台 UI 改造 · 留白节奏与内容宽度统一
   ---------------------------------------------------------------------
   只追加，不改动上方任何既有规则（保持向后兼容）。
   改造目标（实测依据）：
     · 1440×2400 视口下，首页内容只占顶部约 1050px，下方 1350px 全空；
       登录页内容仅约 250px，下方 2100px 全空 —— 页面底部大面积空白。
     · 原因：内容区宽度 1080px 居中后左右留白各 180px，但**上下**没有
       节奏控制，内容少时页脚被顶到视口中部，形成"半页空白"。
   处理：
     ① 内容区宽度收窄到 1000px，长行更好读，同时左右留白更均衡；
     ② 各块之间的垂直间距用 --sp-* 变量统一（原来靠各处手写 margin，
        间距从 16px 到 32px 不一，节奏不统一）；
     ③ 页脚与正文之间留出固定呼吸区，页面底部不再突兀。
   ========================================================================= */
:root {
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 20px;
  --sp-lg: 32px;
  --sp-xl: 48px;
  --content-w: 1000px;
}

/* 内容容器：收窄 + 统一左右内边距 */
.container { max-width: var(--content-w); padding: 0 24px; }

/* 页面主体上下留白（原来没有统一值，靠各页自己写） */
main.container { padding-top: var(--sp-lg); padding-bottom: var(--sp-xl); }

/* 区块之间的间距节奏统一 */
.section-title { margin-bottom: 2px; }
.mt { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
/* 🔴 2026-11-07 修正回归：本段原写成 `margin: var(--sp-md) auto 0`，
 *    把 .divider（56px 短横线）从「左对齐」改成了「居中」——
 *    首页「全部课程」标题下就出现一段孤零零居中的红线。
 *    这里改回左对齐，只保留上下间距。 */
.divider { margin: 14px 0; }

/* 卡片之间的间距（原来 16px，偏挤） */
.card + .card { margin-top: var(--sp-md); }

/* 通用段落与标题的呼吸感 */
.legal-doc p { margin-bottom: 12px; }
.legal-doc h2.legal-h2 { margin-top: var(--sp-lg); }

/* 页脚：与正文保持固定间距，页面底部不留突兀空白 */
.legal-footer { margin-top: var(--sp-xl); padding: 24px 0 40px; }

/* 登录/表单页：内容少，给足上下留白，避免卡片孤零零悬在顶部 */
.auth-wrap { margin: var(--sp-xl) auto; }

/* 空状态提示：居中 + 适度留白，不要贴左上角 */
.course-empty, .empty-state { padding: var(--sp-md) 0; text-align: center; }

/* 响应式：小屏收紧 */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  main.container { padding-top: var(--sp-md); padding-bottom: var(--sp-lg); }
  .hero { padding: var(--sp-lg) 0 var(--sp-md); }
}

/* ================= 图片灯箱（点击放大） =================
 * 🔴 2026-11-10：用户反馈「图片显示了，但是很小，无法放大」。
 *   配套 JS 在 js/common.js 的 App.lightbox()。
 *   桌面：滚轮缩放 + 拖拽平移 + 双击 1:1
 *   移动：双指捏合 + 单指拖拽 + 双击切换
 */
.app-lb {
  position: fixed; inset: 0; z-index: 9999;
  display: none; /* 用 opacity 过渡，避免 display 切换导致动画丢失 */
  opacity: 0; transition: opacity .18s ease;
}
.app-lb.open { display: block; opacity: 1; }
.app-lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 18, 18, .92);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.app-lb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* 关键：允许手势缩放/平移，不让浏览器自己滚动 */
  touch-action: none;
  cursor: grab;
}
.app-lb-stage.dragging { cursor: grabbing; }
.app-lb-img {
  max-width: 92vw; max-height: 88vh;
  /* ⚠️ 关键：transform-origin 必须是 center，
   *    否则 translate+scale 的组合会让缩放锚点漂移（手上一套代码的经典坑）。 */
  transform-origin: center center;
  will-change: transform;
  /* 长图在"适应屏幕"时可能远小于视口 → 允许它保持原比例，不拉伸 */
  object-fit: contain;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
}
.app-lb-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.app-lb-close:hover { background: rgba(255, 255, 255, .24); }
.app-lb-hint {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2;
  text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .72);
  pointer-events: none;
}
/* 灯箱打开时锁背景滚动（手机上尤其重要，否则背景会跟着一起滚） */
body.lb-open { overflow: hidden; }
@media (max-width: 720px) {
  .app-lb-img { max-width: 96vw; max-height: 84vh; }
  .app-lb-close { top: 10px; right: 10px; width: 34px; height: 34px; font-size: 15px; }
}

/* ================= 可放大的图片（正文/封面通用） =================
 * cursor: zoom-in 让用户知道"点一下能放大"。 */
.zoomable { cursor: zoom-in; }
