/* ============ 尊享体面主题：暗金 × 酒红 × 深色底 ============ */
:root {
  --ink: #1C1A17;        --ink-2: #2B2219;
  --gold: #9A7B4F;       --gold-deep: #7A5C33;   --gold-light: #D9B98A;
  --wine: #7B2D3B;       --wine-deep: #5E1F2B;
  --cream: #FDF8EC;      --beige: #E8DCCB;       --muted: #A89C8A;
  --line: #3A342B;       --surface: #24201A;     --surface-2: #2E281F;
  --ok: #7FB069;         --danger: #C25E4C;
  /* 兼容别名：部分组件（标签选择等）历史上引用了这两个变量 */
  --bg2: var(--surface-2);  --rule: var(--line);
  /* 结构色：页面底纹 / 顶栏 / 玻璃面板，浅色主题需整体反转 */
  --page-glow: #33271a;
  --bar-bg: rgba(28, 26, 23, 0.92);
  --bar-bg-2: rgba(28, 26, 23, 0.96);
  --side-bg: rgba(20, 18, 15, 0.85);
  --glass-bg: rgba(28, 26, 23, 0.96);
  --modal-mask: rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  /* 固定深色组件（横幅/个人头部/收益卡/讲师页头/音频台）上的文字：
     这些组件底色恒为深色，文字不能跟着主题反转，否则浅色主题会变成「深底深字」 */
  --on-dark: #FDF8EC;
  --on-dark-2: #E8DCCB;
  --on-dark-3: #D9B98A;
  /* 结构色：浅色主题必须单独覆盖，否则页面下半段会渐变到深色 */
  --shell-end: #201B15;
  --hero-start: #2A1F14;
  --star-track: #928878;
  --accent-ink: #D9B98A;
  /* 「金色文字压在浅底上」专用：浅色主题需加深到 ≥4.5:1，深色主题沿用浅金 */
  --gold-ink: #D9B98A;
  /* 「危险色当文字用」专用：深色主题下 --danger 作文字只有 3.9:1，需提亮 */
  --danger-ink: #DB7660;
  /* 课程专区徽标文字色（免费/青铜/白银/黄金），浅色主题需加深以满足对比度 */
  --zone-free: #7FB069;
  --zone-bronze: #C79A5B;
  --zone-silver: #B9C2CC;
  --zone-gold: #D9B98A;
}

/* ================= 浅色「常规」主题：data-theme="light" ================= */
:root[data-theme="light"] {
  --ink: #F7F3EA;        --ink-2: #FFFFFF;
  --gold: #9A7B4F;       --gold-deep: #7A5C33;   --gold-light: #8A6A3E;
  --wine: #8E3A48;       --wine-deep: #6E2634;
  --cream: #2A2622;      --beige: #4A423A;       --muted: #615749;
  --line: #E3DACA;       --surface: #FFFFFF;     --surface-2: #FBF7EF;
  --ok: #3F7230;         --danger: #B4432F;
  --bg2: var(--surface-2);  --rule: var(--line);
  --page-glow: #EFE7D6;
  --bar-bg: rgba(255, 253, 248, 0.92);
  --bar-bg-2: rgba(255, 253, 248, 0.96);
  --side-bg: rgba(255, 253, 248, 0.9);
  --glass-bg: rgba(255, 253, 248, 0.96);
  --modal-mask: rgba(40, 30, 15, 0.45);
  --shadow: 0 10px 30px rgba(90, 70, 40, 0.14);
  /* 结构色反转：外框收尾 / 英雄区起点必须改成浅色，
     否则 linear-gradient(180deg, --ink, #201B15) 会让整页下半段渐变为深色，深字压深底 */
  --shell-end: #F2ECE0;
  --hero-start: #EFE7D6;
  --star-track: #7E7462;
  --accent-ink: #6B4E29;
  /* 浅色主题下金色文字要压到 4.5:1 以上：#7A5A30 在米色卡底只有 4.3~4.5，改用更深的 #6B4E29 */
  --gold-ink: #6B4E29;
  --danger-ink: #B4432F;
  /* 浅色主题下四档专区文字色加深，保证米色/白底上 ≥4.5:1 */
  --zone-free: #356B28;
  --zone-bronze: #8A6224;
  --zone-silver: #566170;
  --zone-gold: #6B4E29;
}
/* 浅色主题下，深色文字压在金色徽标上需保持深色，避免「金底浅字」失去对比 */
:root[data-theme="light"] .badge-wine { background: rgba(142, 58, 72, 0.14); color: var(--wine-deep); }
:root[data-theme="light"] .badge-gold { background: rgba(154, 123, 79, 0.16); color: var(--gold-deep); }
/* 徽标若压在恒为深色的封面（.v-cover）上，浅色主题也要保持「深金底 + 浅字」，否则深字压深底看不清 */
:root[data-theme="light"] .v-cover .badge-gold { background: var(--gold-deep); color: var(--on-dark); }
/* 浅底绿字需压深，原 --ok #3F7230 在浅绿底上只有 4.4:1 */
:root[data-theme="light"] .badge-ok { color: #3C6C2D; }
:root[data-theme="light"] .nav a:hover,
:root[data-theme="light"] .nav a.active { background: rgba(154, 123, 79, 0.14); color: var(--gold-deep); }
:root[data-theme="light"] .btn-ghost { color: var(--beige); }
:root[data-theme="light"] .btn-ghost:hover { color: var(--gold-deep); }
:root[data-theme="light"] .tb-btn:hover { background: rgba(154, 123, 79, 0.12); color: var(--gold-deep); }
:root[data-theme="light"] .cert,
:root[data-theme="light"] .gift-card,
:root[data-theme="light"] .certificate-card { background: linear-gradient(150deg, #FFFDF7 0%, #F3EBDA 100%); }
:root[data-theme="light"] .certificate-card { box-shadow: 0 10px 34px rgba(120, 95, 55, 0.16); }

/* 品牌标：浅色主题改浅金底 + 深字（原来 #fff 压在深金上只有 4.4:1） */
:root[data-theme="light"] .side-logo,
:root[data-theme="light"] .tb-logo { background: linear-gradient(135deg, #E8CFA6, #C9A86E); color: #2A1F14; }
/* 侧边导航：浅底上把强调色压深，并降低激活态底纹浓度，保证图标/文字对比度 */
:root[data-theme="light"] .side-nav a:hover,
:root[data-theme="light"] .side-ext a:hover { background: rgba(154, 123, 79, 0.10); color: var(--gold-deep); }
:root[data-theme="light"] .side-nav a.active {
  background: rgba(154, 123, 79, 0.12);
  border-color: rgba(154, 123, 79, 0.28);
  color: var(--gold-deep);
}
:root[data-theme="light"] .q-item:active { background: rgba(154, 123, 79, 0.10); }
/* 浅底上偏亮的强调色需加深，保证可读性 */
:root[data-theme="light"] .notice.error { color: var(--danger); }
:root[data-theme="light"] .msg-item .msg-ic.marketing,
:root[data-theme="light"] .empty-state .es-icon.marketing { color: var(--wine-deep); }
:root[data-theme="light"] .app-shell { box-shadow: 0 0 60px rgba(120, 95, 55, 0.12); }
/* 主题切换按钮：深色显示「太阳」（切到浅色），浅色显示「月亮」（切到深色） */
.theme-ic-moon { display: none; }
:root[data-theme="light"] .theme-ic-sun { display: none; }
:root[data-theme="light"] .theme-ic-moon { display: block; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 600px at 85% -10%, var(--page-glow) 0%, var(--ink) 55%);
  color: var(--cream);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}
h1, h2, h3, .serif { font-family: "SimSun", "Songti SC", "Noto Serif SC", serif; letter-spacing: 0.02em; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bar-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-family: "SimSun", serif; font-size: 20px; font-weight: 700; letter-spacing: 0.1em; }
.brand em { color: var(--gold-light); font-style: normal; }
.brand small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.3em; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--beige); font-size: 14px; white-space: nowrap;
}
.nav a:hover, .nav a.active { background: rgba(154, 123, 79, 0.16); color: var(--gold-light); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.lang { background: var(--surface); border: 1px solid var(--line); color: var(--beige); border-radius: 8px; padding: 6px 10px; font-size: 13px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.18s; white-space: nowrap;
}
.btn-gold { background: linear-gradient(135deg, #8E7048, var(--gold-deep)); color: #fff; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-wine { background: linear-gradient(135deg, var(--wine), var(--wine-deep)); color: #fff; }
.btn-wine:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--beige); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: 70px 0 54px; text-align: center;
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(123, 45, 59, 0.25), transparent 60%),
    radial-gradient(700px 320px at 80% 10%, rgba(154, 123, 79, 0.2), transparent 60%);
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; }
.hero h1 .hl { background: linear-gradient(90deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--beige); max-width: 640px; margin: 16px auto 26px; font-size: 16px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 区块 ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; border-left: 4px solid var(--gold); padding-left: 12px; }
.section-head a { font-size: 13px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: transform 0.2s, border-color 0.2s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card .accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--wine)); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ---------- 课程卡片 ---------- */
.course-card h3 { font-size: 17px; margin: 10px 0 6px; }
.course-card .meta { color: var(--muted); font-size: 12px; }
.course-card .price { color: var(--gold-light); font-weight: 700; font-size: 18px; margin-top: 10px; }
.course-card .price small { color: var(--muted); font-weight: 400; font-size: 12px; }
.cover {
  height: 120px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: "SimSun", serif; font-size: 22px; letter-spacing: 0.2em; color: #fff;
}

/* ---------- 会员阶梯 ---------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tier-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); position: relative; }
.tier-card.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.tier-card h3 { font-size: 18px; }
.tier-card .t-price { font-size: 26px; color: var(--gold-light); font-weight: 700; margin: 8px 0; }
.tier-card ul { list-style: none; font-size: 13px; color: var(--beige); }
.tier-card ul li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tier-card .t-rate { position: absolute; top: 14px; right: 14px; font-size: 11px; color: var(--gold); background: rgba(154,123,79,.15); padding: 4px 8px; border-radius: 20px; }

/* ---------- 进度条 ---------- */
.bar { height: 8px; background: var(--ink-2); border-radius: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--wine)); border-radius: 10px; transition: width .4s; }

/* ---------- 学习页 ---------- */
.lesson-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lesson-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.lesson-list li:hover { border-color: var(--gold); }
.lesson-list li.locked { opacity: 0.55; cursor: not-allowed; }
.lesson-list .idx { width: 30px; height: 30px; border-radius: 50%; background: var(--ink-2); color: var(--gold-light); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.lesson-list .lock { margin-left: auto; color: var(--gold-light); font-size: 12px; }
/* .player 样式统一定义在「C8 课时播放器」区块（见文件后段）。
   此处曾有一条 aspect-ratio:16/9 + display:grid 的旧占位样式，会与新播放器规则叠加：
   卡片被强制成 16:9（手机 347px 宽 → 仅 195px 高），配合 overflow:hidden 把音频控件、
   字幕、底部按钮整块裁掉，表现为「音频按钮看不见，像被窗口盖住」。已移除。 */

/* ---------- 分享墙 ---------- */
.wall {
  background: linear-gradient(140deg, rgba(123,45,59,.25), rgba(154,123,79,.15));
  border: 1px dashed var(--gold); border-radius: 12px; padding: 20px; text-align: center;
}
.wall h3 { color: var(--gold-light); margin-bottom: 6px; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }

/* ---------- 提示 / 徽标 ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; }
.badge-gold { background: rgba(154,123,79,.2); color: var(--gold-light); }
.badge-wine { background: rgba(123,45,59,.25); color: #E5A0A8; }
.badge-ok { background: rgba(127,176,105,.18); color: var(--ok); }
.badge-danger { background: rgba(194,94,76,.2); color: var(--danger); }
.badge-muted { background: var(--ink-2); color: var(--muted); }

.notice {
  padding: 12px 16px; border-radius: 10px; font-size: 13px; margin: 10px 0;
  border: 1px solid var(--line); background: var(--surface);
}
.notice.error { border-color: var(--danger); color: #E5A0A8; }
.notice.ok { border-color: var(--ok); color: var(--ok); }

/* ---------- 模态 ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--modal-mask); display: grid; place-items: center; z-index: 100; }
.modal { width: min(400px, 92vw); background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; background: var(--ink); border: 1px solid var(--line); color: var(--cream);
  border-radius: 9px; padding: 11px 12px; font-size: 14px; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--gold); }
/* 复选框不受通用输入框样式影响（后台「受邀制」开关） */
.field input[type="checkbox"] {
  width: auto; padding: 0; border: none; background: none;
  accent-color: var(--gold); height: 16px; flex-shrink: 0;
}
/* 键盘焦点可见性（无障碍） */
.btn:focus-visible, .nav a:focus-visible, a:focus-visible,
.lesson-list li:focus-visible, .field input:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--gold-light); outline-offset: 2px;
}

/* ---------- 后台 ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side {
  width: 210px; background: var(--ink-2); border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { font-size: 16px; margin-bottom: 18px; display: block; }
.admin-side a {
  display: block; padding: 10px 12px; border-radius: 9px; color: var(--beige); font-size: 14px; margin-bottom: 4px;
}
.admin-side a:hover, .admin-side a.active { background: rgba(154,123,79,.16); color: var(--gold-light); }
.admin-main { flex: 1; padding: 26px; min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat b { display: block; font-size: 22px; color: var(--gold-light); }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- 响应式（手机版优先） ---------- */
@media (max-width: 720px) {
  .topbar .container { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; }
  .hero { padding: 44px 0 30px; }
  .section-head h2 { font-size: 20px; }
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; display: flex; gap: 4px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .admin-side .brand { margin: 0 8px 0 0; white-space: nowrap; }
  .admin-side a { white-space: nowrap; margin-bottom: 0; }
  .admin-main { padding: 16px; }
  table { font-size: 12px; }
  th, td { padding: 8px; }
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- 页面入场动画（尊享感 · 尊重系统减弱动画偏好） ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#view > * { animation: riseIn 0.45s ease both; }
#view > *:nth-child(2) { animation-delay: 0.06s; }
#view > *:nth-child(3) { animation-delay: 0.12s; }
#view > *:nth-child(4) { animation-delay: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ================================================================
   APP 版式（移动端优先 · 尊享暗金 × 酒红）
   底部 5 Tab + 卡片信息流 + 沉浸播放器，桌面端居中 APP 框
   ================================================================ */
.app-shell {
  max-width: 640px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--ink) 0%, var(--shell-end) 100%);
}
@media (min-width: 672px) {
  .app-shell {
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    box-shadow: 0 0 70px rgba(0,0,0,.55);
  }
  body { background: radial-gradient(900px 500px at 12% -8%, var(--page-glow) 0%, var(--ink) 60%); }
}

/* ---------- 顶部栏 ---------- */
.app-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 4px;
  height: 52px; padding: 0 10px;
  background: var(--bar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tb-btn {
  width: 40px; height: 40px; border: none; background: transparent; color: var(--beige);
  font-size: 24px; line-height: 1; border-radius: 10px; cursor: pointer; position: relative;
  display: grid; place-items: center;
}
.tb-btn:hover { background: rgba(154,123,79,.14); color: var(--gold-light); }
.tb-title {
  flex: 1; text-align: center; font-size: 17px; font-family: "SimSun", serif;
  letter-spacing: .12em; color: var(--cream); overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis;
}
.tb-actions { display: flex; gap: 2px; }
/* 语言切换下拉（挂在 .tb-actions 内，绝对定位到按钮下方） */
.lang-menu {
  position: fixed; top: 52px; right: 8px; z-index: 200;
  min-width: 148px; padding: 6px;
  background: var(--glass-bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
}
.lang-menu[hidden] { display: none; }
.lang-item {
  display: block; width: 100%; padding: 9px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--beige); font-size: 14px; text-align: left;
  font-family: inherit; cursor: pointer;
}
.lang-item:hover { background: rgba(154,123,79,.16); color: var(--gold-ink); }
.lang-item.active { color: var(--gold-ink, var(--gold-deep)); font-weight: 600; }
.lang-item.active::after { content: "✓"; float: right; }
/* 语言切换按钮：直接显示当前语言短标签（中/繁/EN/ES），避免用户看不懂地球图标 */
#langBtn {
  width: auto; min-width: 40px; padding: 0 8px; display: inline-flex;
  align-items: center; justify-content: center; gap: 4px;
}
#langBtn .lang-cur { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--gold-ink); }
/* 首次访问的显性提示气泡：金底浅字（#FDF8EC 压 #7A5C33 ≈ 7:1） */
.lang-hint {
  position: absolute; top: 46px; right: 0; white-space: nowrap; z-index: 210;
  padding: 6px 10px; border-radius: 9px; font-size: 12px; font-weight: 600;
  background: var(--gold-deep); color: #FDF8EC;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  animation: langHintPulse 1.6s ease-in-out infinite;
}
.lang-hint::before {
  content: ""; position: absolute; top: -5px; right: 14px; width: 10px; height: 10px;
  background: var(--gold-deep); transform: rotate(45deg);
}
@keyframes langHintPulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .lang-hint { animation: none; } }
.notif-dot {
  position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--ink);
}

/* ---------- 主区 ---------- */
.app-main { flex: 1; padding: 0 14px 110px; min-height: calc(100vh - 52px); }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }
.empty { padding: 64px 0 44px; text-align: center; color: var(--muted); }
.empty .e-ic { font-size: 40px; opacity: .6; display: block; margin-bottom: 10px; }
.empty .btn { margin-top: 18px; }

/* ---------- 底部 5 Tab ---------- */
.app-tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 640px); z-index: 70;
  display: flex; background: var(--bar-bg-2); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; color: var(--muted); font-size: 11px; text-decoration: none;
  transition: .18s; -webkit-tap-highlight-color: transparent;
}
.tab-item .tab-ic { width: 24px; height: 24px; }
.tab-item.active { color: var(--gold-light); }
.tab-item.active .tab-ic { transform: translateY(-1px); filter: drop-shadow(0 0 6px rgba(217,185,138,.45)); }

/* ---------- 横幅轮播 ---------- */
.banner-box { position: relative; margin: 14px 0 4px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.banner-track { display: flex; transition: transform .5s ease; }
.banner-slide {
  min-width: 100%; padding: 26px 22px 32px; aspect-ratio: 16/7;
  background: linear-gradient(135deg, var(--wine-deep), #3A2A18 70%);
  display: flex; flex-direction: column; justify-content: flex-end; position: relative;
}
.banner-slide h2 { font-size: 20px; color: var(--on-dark); text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.banner-slide p { font-size: 12px; color: var(--on-dark-3); margin-top: 4px; }
.banner-slide .b-go {
  position: absolute; right: 18px; bottom: 30px; font-size: 12px; padding: 7px 14px;
  background: rgba(217,185,138,.16); border: 1px solid rgba(217,185,138,.55); border-radius: 20px; color: var(--on-dark-3);
}
.banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(253,248,236,.3); cursor: pointer; transition: .25s; }
.banner-dots .dot.on { background: var(--gold-light); width: 18px; border-radius: 4px; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.q-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 0 10px; text-decoration: none; border-radius: 14px; }
.q-item:active { background: rgba(154,123,79,.1); }
.q-ic {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(154,123,79,.28), rgba(123,45,59,.28));
  border: 1px solid var(--line); color: var(--accent-ink);
}
.q-item span { font-size: 11.5px; color: var(--beige); }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.sec-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(var(--gold-light), var(--gold)); }
.sec-more { font-size: 12px; color: var(--muted); }

/* ---------- 横向滚动卡片 ---------- */
.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.h-scroll::-webkit-scrollbar { display: none; }
.v-card {
  width: 158px; flex-shrink: 0; scroll-snap-align: start; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.v-card:active { transform: scale(.98); }
.v-cover { aspect-ratio: 4/3; display: grid; place-items: center; font-size: 15px; letter-spacing: .14em; color: #fff; font-family: "SimSun", serif; }
.v-info { padding: 10px 12px 12px; }
.v-title { font-size: 13.5px; line-height: 1.45; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.v-meta { font-size: 11px; color: var(--muted); margin: 5px 0 7px; display: flex; align-items: center; gap: 6px; }
.v-price { font-size: 15px; font-weight: 700; color: var(--gold-light); }
.v-price small { color: var(--muted); font-weight: 400; font-size: 11px; }

/* ---------- 列表卡片行 ---------- */
.flex-col { display: flex; flex-direction: column; }
.l-card {
  display: flex; gap: 12px; padding: 12px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
}
.l-card:active { transform: scale(.985); }
.l-cover { width: 68px; height: 68px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 12px; letter-spacing: .1em; font-family: "SimSun", serif; }
.l-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.l-info h3 { font-size: 15px; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.l-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.l-end { align-self: center; text-align: right; flex-shrink: 0; }

/* ---------- 筛选 chips / 分段 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 15px; border-radius: 20px; font-size: 12.5px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--beige); text-decoration: none;
}
.chip.on { background: linear-gradient(135deg, #8E7048, var(--gold-deep)); border-color: transparent; color: #fff; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg a { flex: 1; text-align: center; padding: 8px 0; font-size: 12.5px; color: var(--beige); border-radius: 9px; text-decoration: none; }
.seg a.on { background: linear-gradient(135deg, #8E7048, var(--gold-deep)); color: #fff; }

/* ---------- 搜索框 ---------- */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin: 12px 0 4px; }
.searchbar input { flex: 1; background: none; border: none; outline: none; color: var(--cream); font-size: 14px; }
.searchbar .s-ic { color: var(--muted); }

/* ---------- 星级 ---------- */
.stars { position: relative; display: inline-block; color: var(--star-track); font-size: 12px; letter-spacing: 1px; line-height: 1; }
.stars i { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; font-style: normal; color: var(--gold-light); }

/* ---------- 我的：菜单单元 ---------- */
.cell-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.group-title { padding: 12px 14px 6px; font-size: 12px; color: var(--muted); }
.cell { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; border-top: 1px solid var(--line); }
.cell:first-child { border-top: none; }
.cell:active { background: rgba(154,123,79,.08); }
.cell-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(154,123,79,.14); color: var(--accent-ink); flex-shrink: 0; }
.cell-main { flex: 1; min-width: 0; }
.cell-main b { display: block; font-size: 14px; font-weight: 600; }
.cell-main small { color: var(--muted); font-size: 11px; }
.cell-arrow { color: var(--muted); font-size: 18px; }
.cell .c-badge { background: var(--wine); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; }

/* ---------- 我的：头部 ---------- */
.profile-head {
  margin: 16px 0; padding: 20px 18px; border-radius: 18px; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #33230F 0%, var(--wine-deep) 70%);
  border: 1px solid rgba(154,123,79,.4);
}
.profile-head .accent { position: absolute; inset: 0; background: radial-gradient(240px 120px at 85% 0%, rgba(217,185,138,.18), transparent 70%); }
.p-row { display: flex; align-items: center; gap: 14px; position: relative; }
.p-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  /* 头像始终压在深色头图/浅色卡片上，底色固定为浅金，不随主题反转，
     否则浅色主题下 --gold-light 变深金，深色首字对比度掉到 3.8:1 */
  background: linear-gradient(135deg, #E8CFA6, #C9A86E);
  color: #241B10; font-size: 24px; font-family: "SimSun", serif; display: grid; place-items: center;
  box-shadow: 0 0 0 2px rgba(217,185,138,.35);
}
.p-info { flex: 1; min-width: 0; }
/* 个人头部底色恒为深色酒红渐变，文字固定用深底专用色 */
.p-info b { display: block; font-size: 18px; font-family: "SimSun", serif; color: var(--on-dark); }
.p-info small { color: var(--on-dark-2); opacity: .8; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; margin-top: 2px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; position: relative; }
/* m-stat 只出现在 .profile-head（恒为深色头图）内，故底色与文字都固定为深色组件配色 */
.m-stat { text-align: center; background: rgba(28,26,23,.5); border: 1px solid rgba(154,123,79,.25); border-radius: 12px; padding: 9px 4px; text-decoration: none; }
.m-stat b { display: block; font-size: 16px; color: var(--on-dark-3); }
.m-stat span { font-size: 11px; color: var(--on-dark-2); opacity: .85; }

/* ---------- 直播 ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 11px; }
.live-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #E34D4D; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.room { display: flex; flex-direction: column; height: calc(100dvh - 52px - 64px - env(safe-area-inset-bottom, 0px)); margin: 0 -14px; }
.room-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chats { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 78%; align-self: flex-start; }
.chat-bubble .c-name { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.chat-bubble .c-body {
  display: inline-block; padding: 9px 13px; border-radius: 14px 14px 14px 4px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; word-break: break-word;
}
.chat-bubble.me { align-self: flex-end; }
.chat-bubble.me .c-name { text-align: right; }
.chat-bubble.me .c-body { border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, rgba(154,123,79,.3), rgba(123,45,59,.3)); border-color: var(--gold); }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--ink); }
.chat-input input { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; color: var(--cream); font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--gold); }

/* C5 直播互动：点赞 / 问答 / 投票 */
.room-tabs { display: flex; border-top: 1px solid var(--line); background: var(--ink-2); }
.room-tabs .tab {
  flex: 1; background: none; border: none; color: var(--muted);
  padding: 10px 0; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent;
}
.room-tabs .tab.on { color: var(--gold-light); border-bottom-color: var(--gold); font-weight: 600; }
.like-btn {
  display: flex; align-items: center; gap: 4px; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px;
  color: var(--muted); font-size: 13px; cursor: pointer; flex: 0 0 auto;
}
.like-btn.on { border-color: var(--gold); color: var(--gold-light); background: rgba(154,123,79,.15); }
.like-btn .like-ic { font-size: 15px; }
#interactPanel { max-height: 30vh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line); }
.qa-form { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.qa-form input { flex: 1; background: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 9px 13px; color: var(--cream); font-size: 13.5px; outline: none; }
.qa-form input:focus { border-color: var(--gold); }
.key-q-card { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.qa-answer { margin-top: 7px; padding: 8px 11px; background: var(--ink); border-left: 3px solid var(--gold); border-radius: 8px; font-size: 13px; color: var(--beige); }
.qa-ans-form { display: flex; gap: 6px; }
.qa-ans-form input { flex: 1; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 7px 11px; color: var(--cream); font-size: 13px; outline: none; }
.poll-opt {
  position: relative; margin-top: 8px; padding: 9px 12px; border-radius: 9px;
  background: var(--ink); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
}
.poll-opt .poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(154,123,79,.18); transition: width .3s; }
.poll-opt[data-voted="true"] { border-color: var(--gold); }
.poll-opt .poll-text { position: relative; z-index: 1; font-size: 13px; color: var(--cream); }
.poll-opt .poll-pct { position: relative; z-index: 1; font-size: 12px; color: var(--gold-light); flex: 0 0 auto; }

/* ---------- 训练营 ---------- */
.dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 8px; }
.day {
  height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 12px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--muted);
}
.day.done { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #fff; border-color: transparent; }
.day.cur { border-color: var(--gold-light); color: var(--gold-light); box-shadow: 0 0 0 1px var(--gold-light); animation: pulse 1.4s infinite; }

/* ---------- 优惠券 ---------- */
.ticket {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 14px 16px; margin-bottom: 12px; border-radius: 14px;
  background: var(--surface); border: 1px dashed rgba(154,123,79,.55); position: relative;
}
.ticket .t-val { font-size: 20px; font-weight: 800; color: var(--gold-light); flex-shrink: 0; }
.ticket .t-main { flex: 1; min-width: 0; }
.ticket .t-main b { font-size: 14px; display: block; }
.ticket .t-main small { color: var(--muted); font-size: 11px; }
.ticket .used { opacity: .5; }

/* ---------- 通知 ---------- */
.notif { display: flex; gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.notif:active { background: rgba(154,123,79,.06); }
.notif-ic { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: rgba(154,123,79,.14); color: var(--gold-light); }
.notif-main { flex: 1; min-width: 0; }
.notif-main b { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.notif-main .u-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.notif-main p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif-main small { font-size: 10.5px; color: var(--muted); opacity: .8; }

/* ---------- 社区 ---------- */
.feed { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.feed-head { display: flex; align-items: center; gap: 10px; }
.f-a { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--wine), var(--gold-deep)); color: #fff; font-size: 13px; font-family: "SimSun", serif; display: grid; place-items: center; flex-shrink: 0; }
.feed-head b { font-size: 13px; display: block; }
.feed-head small { font-size: 10.5px; color: var(--muted); }
.feed-body { margin-top: 8px; }
.feed-body h3 { font-size: 15px; margin-bottom: 4px; }
.feed-body p { font-size: 13px; color: var(--beige); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.feed-actions { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.feed-actions button { background: none; border: none; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.feed-actions button:hover { color: var(--gold-light); }
.feed-actions button.liked { color: var(--wine-light, #E5A0A8); }

/* ---------- 悬浮按钮 ---------- */
.fab {
  position: fixed; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 65;
  right: 16px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #241B10;
  font-size: 26px; border: none; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  display: grid; place-items: center;
}
@media (min-width: 672px) { .fab { right: calc(50% - 320px + 16px); } }

/* ---------- 底部弹层 ---------- */
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 640px); max-height: 88vh; overflow-y: auto; z-index: 110;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .3s ease both;
}
@keyframes sheetUp { from { transform: translate(-50%, 40%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* 弹层关闭按钮（登录/注册等） */
.sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(154, 123, 79, 0.15); border: none;
  color: var(--accent-ink); font-size: 17px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: .2s; z-index: 1;
}
.sheet-close:hover { background: rgba(154, 123, 79, 0.3); }

/* ---------- 头像裁剪（用户端「编辑资料」） ---------- */
/* 头像一律按正方形裁切后再落库，任何展示位都 cover 填充，杜绝非等比拉伸变形 */
.p-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.crop-overlay { position: fixed; inset: 0; z-index: 130; background: rgba(10, 8, 6, .74); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; }
.crop-panel { width: min(360px, 94vw); max-height: 92vh; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); animation: riseIn .28s ease both; }
.crop-panel h3 { text-align: center; margin-bottom: 14px; }
.crop-stage { position: relative; width: 260px; height: 260px; margin: 0 auto; overflow: hidden; border-radius: 14px; background: #000; touch-action: none; cursor: grab; }
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img { position: absolute; left: 50%; top: 50%; will-change: transform; user-select: none; -webkit-user-drag: none; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: 50%; box-shadow: 0 0 0 260px rgba(0, 0, 0, .5); border: 2px solid rgba(217, 185, 138, .9); }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; max-width: 260px; }
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--gold); }
.crop-zoom .cz-ic { color: var(--muted); font-size: 14px; line-height: 1; }
.crop-preview { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.crop-preview .cp-box { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--ink); box-shadow: 0 0 0 2px rgba(217, 185, 138, .35); flex-shrink: 0; }
.crop-preview canvas { width: 100%; height: 100%; display: block; }
.crop-preview .cp-tip { font-size: 12px; color: var(--muted); }
.crop-actions { display: flex; gap: 10px; margin-top: 16px; }
.crop-actions .btn { flex: 1; }
@media (max-width: 380px) {
  .crop-stage { width: 220px; height: 220px; }
  .crop-ring { box-shadow: 0 0 0 220px rgba(0, 0, 0, .5); }
}

/* ---------- 支付渠道 ---------- */
.pay-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; background: var(--surface); }
.pay-opt.on { border-color: var(--gold); background: rgba(154,123,79,.12); }
.pay-opt .p-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; }
.pay-opt.on .p-radio { border-color: var(--gold); }
.pay-opt.on .p-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); }
.pay-opt b { font-size: 14px; display: block; }
.pay-opt small { font-size: 11px; color: var(--muted); }

/* ---------- 证书 ---------- */
.cert {
  margin: 16px 0; padding: 26px 20px; text-align: center; border-radius: 18px; position: relative;
  background: linear-gradient(140deg, #2E281F, #1F1B14);
  border: 1px solid var(--gold);
}
.cert::before { content: ""; position: absolute; inset: 6px; border: 1px dashed rgba(154,123,79,.5); border-radius: 12px; pointer-events: none; }
.cert .c-t { font-size: 26px; color: var(--gold-light); font-family: "SimSun", serif; position: relative; }
.cert p { font-size: 12px; color: var(--muted); position: relative; margin-top: 6px; }

/* ---------- 课程封面渐变 ---------- */
.cover-g { background: linear-gradient(135deg, var(--wine), #3A2A18 75%); }
.cover-g.gold { background: linear-gradient(135deg, var(--gold-deep), var(--wine-deep)); }
.cover-g.bronze { background: linear-gradient(135deg, #6B4A2B, #3A2A18); }
.cover-g.silver { background: linear-gradient(135deg, #5A5E66, #2B2F36); }
.cover-g.goldt { background: linear-gradient(135deg, #8A6A35, #6B4A2B); }

/* ---------- 详情页 Hero ---------- */
.detail-hero { margin: 0 -14px; padding: 30px 18px 22px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
/* 课程详情头：底色恒为 cover-g 深色渐变，文字固定用深底专用色 */
.detail-hero h1 { font-size: 22px; line-height: 1.4; color: var(--on-dark); }
.detail-hero .dh-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--on-dark-2); opacity: .9; }
.detail-hero a { color: var(--on-dark-3); }
.dh-actions { display: flex; gap: 10px; margin-top: 16px; }
/* 课程详情头图恒为深色渐变：内部一切文字必须用深底专用色。
   加 :root[data-theme] 前缀提升优先级，压过 :root[data-theme="light"] 的全局规则 */
:root[data-theme] .detail-hero .btn-ghost { color: var(--on-dark); border-color: rgba(253,248,236,.38); }
:root[data-theme] .detail-hero .btn-ghost:hover { color: #fff; border-color: var(--gold-light); background: rgba(253,248,236,.1); }
:root[data-theme] .detail-hero .zone-badge { background: rgba(253,248,236,.14); border-color: rgba(253,248,236,.42); color: #F2E6CE; }
:root[data-theme] .detail-hero a { color: var(--on-dark-2); }
:root[data-theme] .detail-hero .dh-meta { color: var(--on-dark-2); }
:root[data-theme] .detail-hero .stars { color: rgba(253,248,236,.72); }
:root[data-theme] .detail-hero .stars i { color: var(--on-dark); }

/* ---------- 通用小工具 ---------- */
.txt-gold { color: var(--gold-light); }
.txt-danger { color: var(--danger-ink); }
.w100 { width: 100%; }
.nowrap { white-space: nowrap; }
.clamp2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb12 { margin-bottom: 12px; }

/* ---------- 后台：分组导航（可折叠手风琴） ---------- */
.admin-nav-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.admin-nav-tools .ant-label { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.admin-nav-tools .ant-toggle { background: none; border: none; color: var(--gold); font-size: 11.5px; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.admin-nav-tools .ant-toggle:hover { background: rgba(154,123,79,.14); }
.admin-nav-g { padding: 2px 0; }
.admin-nav-g .g-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10.5px; color: var(--muted); letter-spacing: .16em;
  padding: 8px 12px 5px; cursor: pointer; user-select: none; border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.admin-nav-g .g-label:hover { color: var(--gold-light); background: rgba(154,123,79,.08); }
.admin-nav-g .g-label::after { content: '▾'; font-size: 10px; line-height: 1; opacity: .75; transition: transform .22s ease; }
.admin-nav-g.collapsed .g-label::after { transform: rotate(-90deg); }
.admin-nav-g.collapsed > a { display: none; }
.admin-main .page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-main .page-head h2 { font-size: 20px; border-left: 4px solid var(--gold); padding-left: 12px; }

/* ---------- 后台移动端适配 ---------- */
@media (max-width: 860px) {
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: sticky; top: 0; z-index: 50; display: flex; flex-direction: column; border-right: none; border-bottom: 1px solid var(--line); padding: 8px; }
  .admin-side .brand { margin: 0 8px 4px 0; white-space: nowrap; font-size: 14px; }
  /* 窄屏下分组标签隐藏、链接横向平铺，折叠态一律失效，避免菜单被收起后无法触达 */
  .admin-side .admin-nav-tools { display: none; }
  .admin-side .admin-nav-g { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
  .admin-side .admin-nav-g .g-label { display: none; }
  .admin-side .admin-nav-g.collapsed > a { display: block; }
  .admin-side nav a { margin: 0; white-space: nowrap; padding: 7px 11px; font-size: 12.5px; }
  .admin-main { padding: 14px; }
}
@media (max-width: 640px) {
  .admin-main table { display: block; overflow-x: auto; white-space: nowrap; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   多端自适应（三档断点）
   手机 <768px：底部 5 Tab APP 式（保持现状）
   平板 768–1199px：顶部横排导航 + 全宽多列
   桌面 ≥1200px：左侧竖导航 + 内容区
   ================================================================ */

/* ---------- 顶栏品牌（LOGO + 站点名，桌面/平板显示） ---------- */
.tb-brand { display: none; align-items: center; gap: 8px; }
.tb-logo, .side-logo {
  width: 26px; height: 26px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #241B10;
  font-family: "SimSun", serif;
}
.tb-logo img, .side-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tb-site { font-size: 15px; font-weight: 700; font-family: "SimSun", serif; letter-spacing: .08em; }

/* ---------- 桌面侧边导航（默认隐藏，≥1200px 显示） ---------- */
.app-side { display: none; }

/* 手机端（<768px）：保持 APP 式——隐藏 Hero 大标语，快捷入口仅 4 个 */
.home-hero { display: none; }
.quick-grid { grid-template-columns: repeat(4, 1fr); }
.q-pc { display: none; }
.pc-br { display: none; }

/* ================= 平板（768–1199px）：顶部导航 + 全宽多列 ================= */
@media (min-width: 768px) and (max-width: 1199px) {
  .app-shell { max-width: none; }
  .app-shell > .app-side { display: none; }
  .tb-brand { display: flex; }

  /* 底部 5 Tab 上移为顶部横排导航 */
  .app-tabs {
    position: sticky; top: 52px; bottom: auto; z-index: 59;
    width: 100%; transform: none; left: 0;
    border-top: none; border-bottom: 1px solid var(--line);
    padding-bottom: 0; justify-content: center; gap: 4px;
    background: var(--bar-bg-2);
  }
  .tab-item { flex: 0 0 auto; flex-direction: row; gap: 6px; padding: 10px 18px; font-size: 13px; border-radius: 20px; }
  .tab-item .tab-ic { width: 18px; height: 18px; }

  .app-main { padding: 0 22px 40px; }

  /* 首页：显示 Hero 标语 + 6 宫格快捷入口 */
  .home-hero { display: block; text-align: center; padding: 30px 0 6px; }
  .home-hero h1 { font-size: clamp(26px, 4vw, 38px); font-family: "SimSun", serif; line-height: 1.3; }
  .home-hero h1 .hl { background: linear-gradient(90deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .home-hero p { color: var(--beige); max-width: 640px; margin: 10px auto 0; font-size: 14.5px; }
  .q-pc { display: flex; }

  /* 首页：快捷入口 6 宫格、横滑卡片加宽 */
  .quick-grid { grid-template-columns: repeat(6, 1fr); }
  .h-scroll .v-card { width: 200px; }
  .banner-slide { aspect-ratio: 21/6; }

  /* 课程/内容多列网格 */
  .grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  /* 会员 4 级：横向排布 */
  .tiers { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

  /* 沉浸式直播/播放器高度 */
  .room { height: calc(100dvh - 52px - 56px); margin: 0 -22px; }

  /* 底部弹层放宽 */
  .sheet { width: min(680px, 100%); left: 50%; }
  .fab { right: 22px; bottom: 24px; }
}

/* ================= 桌面（≥1200px）：左侧竖导航 + 内容区 ================= */
@media (min-width: 1200px) {
  body { background:
    radial-gradient(1200px 600px at 90% -10%, var(--page-glow) 0%, var(--ink) 55%),
    radial-gradient(900px 500px at 0% 110%, rgba(123,45,59,.18), transparent 60%); }

  .app-shell {
    max-width: 1440px; min-height: 100vh;
    margin: 0 auto; flex-direction: row;
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    box-shadow: 0 0 90px rgba(0,0,0,.5);
  }

  /* 侧边导航 */
  .app-side {
    display: flex; flex-direction: column; flex-shrink: 0;
    width: 230px; background: var(--side-bg);
    border-right: 1px solid var(--line); min-height: 100vh;
    padding: 22px 14px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  }
  .side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; text-decoration: none; }
  .side-logo { width: 38px; height: 38px; border-radius: 10px; font-size: 19px; }
  .side-name { font-size: 19px; font-weight: 700; font-family: "SimSun", serif; color: var(--cream); letter-spacing: .1em; }
  .side-nav a, .side-ext a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; margin-bottom: 3px; border-radius: 10px;
    color: var(--beige); font-size: 14.5px; text-decoration: none; transition: .18s;
  }
  .side-nav a:hover, .side-ext a:hover { background: rgba(154,123,79,.12); color: var(--gold-light); }
  .side-nav a.active { background: linear-gradient(135deg, rgba(154,123,79,.22), rgba(123,45,59,.16)); color: var(--gold-light); border: 1px solid rgba(154,123,79,.35); }
  .sn-ic { width: 22px; text-align: center; font-size: 16px; color: var(--accent-ink); }
  .side-nav { flex: 1; }
  .side-ext { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
  .side-ext a { font-size: 13.5px; }
  .side-user { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
  .side-user-muted { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
  .side-u-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; margin-bottom: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
  .side-u-card:hover { border-color: var(--gold); }
  .side-u-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 15px;
    background: linear-gradient(135deg, #E8CFA6, #C9A86E); color: #241B10;
  }
  .side-u-meta { flex: 1; min-width: 0; }
  .side-u-meta b { display: block; font-size: 13.5px; color: var(--cream); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .side-u-meta small { font-size: 11px; color: var(--muted); }

  /* 顶部栏：并入内容区右侧；品牌已在左侧竖导航里，顶栏只留页面标题 */
  .app-shell > .app-topbar { display: flex; }
  .tb-brand { display: none; }
  .tb-logo { width: 30px; height: 30px; border-radius: 9px; font-size: 17px; }
  .tb-title { text-align: left; }

  /* 内容列 */
  .app-shell > .app-main {
    flex: 1; min-width: 0; padding: 26px 34px 60px; min-height: 100vh;
  }

  /* 底部 Tab 隐藏，悬浮按钮常规位置 */
  .app-shell > .app-tabs { display: none; }
  .fab { right: 34px; bottom: 34px; }

  /* 首页：桌面布局（Hero 标语 + 大横幅 + 多列网格） */
  .home-hero { display: block; text-align: center; padding: 34px 0 10px; }
  .home-hero h1 { font-size: clamp(30px, 3.4vw, 46px); font-family: "SimSun", serif; line-height: 1.3; }
  .home-hero h1 .hl { background: linear-gradient(90deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .home-hero p { color: var(--beige); max-width: 720px; margin: 12px auto 0; font-size: 15px; }
  .q-pc { display: flex; }
  .pc-br { display: block; }
  .banner-slide { aspect-ratio: 24/6; padding: 40px 36px 42px; }
  .banner-slide h2 { font-size: 26px; }
  .banner-slide p { font-size: 14px; }
  .quick-grid { grid-template-columns: repeat(6, 1fr); margin: 18px 0 6px; }

  .grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
  .grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
  .tiers { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
  .h-scroll .v-card { width: 220px; }
  .h-scroll { padding-bottom: 20px; }

  /* 详情页：主内容 + 右侧信息卡（桌面详情布局） */
  .detail-hero { margin: 0; border-radius: 16px; padding: 34px 28px 26px; }
  .detail-hero h1 { font-size: 26px; }
  .dh-actions { margin-top: 20px; }
  .lesson-list li { padding: 15px 18px; }
  .room { height: calc(100vh - 90px); margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
  .sheet { width: min(680px, 100%); left: 50%; }
  .cert { max-width: 560px; margin-left: auto; margin-right: auto; }
  .sec-head { margin-top: 28px; }

  /* 桌面端：活动卡片 3 列网格 */
  .campaign-grid { grid-template-columns: repeat(3, 1fr); }
  .campaign-grid .campaign-card { width: auto; }
}

/* ================================================================
   C1 阶段扩展样式：营销引擎前台 + 支付页重构 + 消息中心改版
   ================================================================ */

/* ---------- 新人礼包弹窗 ---------- */
.gift-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.gift-card {
  width: min(420px, 90vw);
  background: linear-gradient(160deg, #2E2418 0%, #1C1A17 100%);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(154, 123, 79, 0.15);
  animation: giftPop .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes giftPop {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.gift-card::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px dashed rgba(154, 123, 79, 0.4);
  border-radius: 14px; pointer-events: none;
}
.gift-card .gift-close {
  position: absolute; top: 12px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(154, 123, 79, 0.15); border: none;
  color: var(--gold-ink); font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: .2s;
}
.gift-card .gift-close:hover { background: rgba(154, 123, 79, 0.3); }
.gift-card .gift-icon {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  display: grid; place-items: center; font-size: 36px;
  /* 图标是 emoji（自带颜色），这里显式给深色兜底，避免继承卡片文字色后对比不足 */
  color: #241B10;
  box-shadow: 0 6px 24px rgba(154, 123, 79, 0.4);
}
.gift-card h2 {
  text-align: center; font-size: 22px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.gift-card .gift-sub {
  text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 20px;
}
.gift-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.gift-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(154, 123, 79, 0.08);
  border: 1px solid rgba(154, 123, 79, 0.25);
  border-radius: 12px;
}
.gift-item .gi-ic {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.3), rgba(123, 45, 59, 0.25));
}
.gift-item .gi-main { flex: 1; min-width: 0; }
.gift-item .gi-main b { font-size: 14px; display: block; }
.gift-item .gi-main small { font-size: 11.5px; color: var(--muted); }
.gift-item .gi-val { font-size: 16px; font-weight: 700; color: var(--gold-ink); flex-shrink: 0; }
.gift-claim-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  /* 与 .btn-gold 同一渐变：原 --gold-light 起步的渐变太浅，白字只有 3.2:1 */
  background: linear-gradient(135deg, #8E7048, var(--gold-deep));
  color: #fff; transition: .2s;
  box-shadow: 0 6px 20px rgba(154, 123, 79, 0.35);
}
.gift-claim-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gift-claim-btn:active { transform: translateY(0); }
.gift-claim-btn[disabled] { opacity: .6; cursor: not-allowed; }
.gift-success {
  text-align: center; padding: 20px 0;
}
.gift-success .gs-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ok), #5a8a48);
  display: grid; place-items: center; font-size: 32px; color: #fff;
  animation: successPop .5s ease;
}
@keyframes successPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.gift-success h3 { font-size: 18px; margin-bottom: 6px; }
.gift-success p { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }

/* ---------- 营销活动卡片 ---------- */
.campaign-section { margin-top: 8px; }
.campaign-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 4px 2px 14px; scroll-snap-type: x mandatory;
}
.campaign-scroll::-webkit-scrollbar { display: none; }
.campaign-card {
  width: 220px; flex-shrink: 0; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  transition: transform .25s, border-color .25s; position: relative;
}
.campaign-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.campaign-cover {
  aspect-ratio: 16/9; display: grid; place-items: center;
  font-family: "SimSun", serif; font-size: 16px; letter-spacing: .14em;
  color: #fff; position: relative;
}
.campaign-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5));
}
.campaign-info { padding: 12px 14px 14px; }
.campaign-info h3 {
  font-size: 14px; line-height: 1.4; height: 38px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin-bottom: 8px;
}
.campaign-countdown {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); margin-bottom: 10px;
}
.campaign-countdown .cd-digits {
  display: flex; gap: 3px;
}
.campaign-countdown .cd-num {
  background: var(--wine-deep); color: var(--gold-light);
  padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
  min-width: 22px; text-align: center;
}
.campaign-join-btn {
  display: block; width: 100%; padding: 7px 0;
  text-align: center; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; border-radius: 8px; border: none; cursor: pointer;
  transition: .2s;
}
.campaign-join-btn:hover { filter: brightness(1.08); }
.campaign-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 10px; border-radius: 20px; font-size: 10.5px;
  background: rgba(123, 45, 59, 0.9); color: #fff;
  backdrop-filter: blur(4px);
}

/* 桌面端 3 列网格布局 */
.campaign-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.campaign-grid .campaign-card { width: auto; }

/* ---------- 智能推荐模块 ---------- */
.recommend-section { margin-top: 8px; }
.recommend-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.rec-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  transition: transform .2s, border-color .2s;
}
.rec-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.rec-cover {
  aspect-ratio: 4/3; display: grid; place-items: center;
  font-family: "SimSun", serif; font-size: 18px;
  letter-spacing: .14em; color: #fff;
}
.rec-info { padding: 10px 12px 12px; }
.rec-title {
  font-size: 13.5px; line-height: 1.4; height: 38px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.rec-meta {
  font-size: 11px; color: var(--muted);
  margin: 5px 0 7px; display: flex; align-items: center; gap: 6px;
}
.rec-meta .instructor { color: var(--beige); }
.rec-price { font-size: 15px; font-weight: 700; color: var(--gold-light); }
.rec-price small { color: var(--muted); font-weight: 400; font-size: 11px; }

/* ---------- 支付渠道卡片 ---------- */
.payment-provider-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; transition: all .25s ease;
  position: relative;
}
.payment-provider-card:hover { border-color: rgba(154, 123, 79, 0.5); }
.payment-provider-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.12), rgba(123, 45, 59, 0.08));
  box-shadow: 0 0 0 1px var(--gold), 0 4px 16px rgba(154, 123, 79, 0.15);
}
.payment-provider-card .pp-logo {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.2), rgba(123, 45, 59, 0.15));
  border: 1px solid var(--line);
}
.payment-provider-card.active .pp-logo {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.3), rgba(123, 45, 59, 0.2));
}
.payment-provider-card .pp-info { flex: 1; min-width: 0; }
.payment-provider-card .pp-info b { font-size: 14.5px; display: block; }
.payment-provider-card .pp-info small { font-size: 11.5px; color: var(--muted); }
.payment-provider-card .pp-recommend {
  padding: 3px 8px; border-radius: 20px; font-size: 10.5px;
  background: linear-gradient(135deg, var(--wine), var(--wine-deep));
  color: var(--gold-light); flex-shrink: 0;
}
.payment-provider-card .pp-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; transition: .2s;
}
.payment-provider-card.active .pp-check {
  border-color: var(--gold); background: var(--gold);
}
.payment-provider-card.active .pp-check::after {
  content: ""; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ---------- 数字证书卡片（支付成功） ---------- */
.certificate-card {
  margin: 20px 0; padding: 32px 24px;
  text-align: center; position: relative;
  background: linear-gradient(145deg, #2E2418 0%, #1C1A17 100%);
  border: 2px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 60px rgba(154, 123, 79, 0.05);
}
.certificate-card::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px dashed rgba(154, 123, 79, 0.45);
  border-radius: 12px; pointer-events: none;
}
.certificate-card .cc-seal {
  position: absolute; bottom: 20px; right: 24px;
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--wine);
  display: grid; place-items: center;
  font-family: "SimSun", serif; font-size: 11px;
  color: var(--wine); background: rgba(123, 45, 59, 0.08);
  transform: rotate(-12deg); opacity: 0.85;
  line-height: 1.3; text-align: center;
}
.certificate-card .cc-title {
  font-size: 24px; font-family: "SimSun", serif;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px; position: relative;
}
.certificate-card .cc-subtitle {
  font-size: 12px; color: var(--muted);
  letter-spacing: .2em; margin-bottom: 20px; position: relative;
}
.certificate-card .cc-order {
  font-size: 13px; color: var(--beige);
  margin-bottom: 8px; position: relative;
}
.certificate-card .cc-order b { color: var(--gold-light); }
.certificate-card .cc-verify {
  font-size: 11px; color: var(--muted);
  padding-top: 14px; margin-top: 14px;
  border-top: 1px dashed rgba(154, 123, 79, 0.3);
  position: relative;
}
.certificate-card .cc-verify b { color: var(--gold-light); font-family: monospace; }

/* ---------- 消息 Tab 栏 ---------- */
.msg-tab-bar {
  display: flex; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 3px; margin-bottom: 14px; margin-top: 12px;
  position: sticky; top: 52px; z-index: 40;
  backdrop-filter: blur(10px);
}
.msg-tab-bar .msg-tab {
  flex: 1; text-align: center; padding: 9px 4px;
  font-size: 12.5px; color: var(--beige);
  border-radius: 9px; cursor: pointer;
  transition: .2s; position: relative; white-space: nowrap;
}
.msg-tab-bar .msg-tab.on {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; font-weight: 600;
}
.msg-tab-bar .msg-tab .tab-badge {
  position: absolute; top: 4px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 10px; font-size: 10px;
  background: var(--danger); color: #fff;
  display: grid; place-items: center; line-height: 1;
}

/* ---------- 消息项（升级版） ---------- */
.msg-item {
  display: flex; gap: 12px; padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: background .2s;
}
.msg-item:active { background: rgba(154, 123, 79, 0.06); }
.msg-item::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: transparent; transition: background .2s;
}
.msg-item.unread::before { background: var(--gold-light); }
.msg-item .msg-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
}
.msg-item .msg-ic.learning { background: rgba(127, 176, 105, 0.15); color: var(--ok); }
.msg-item .msg-ic.commission { background: rgba(154, 123, 79, 0.18); color: var(--gold-light); }
.msg-item .msg-ic.system { background: rgba(90, 94, 102, 0.2); color: #9AA0AA; }
.msg-item .msg-ic.marketing { background: rgba(123, 45, 59, 0.2); color: #E5A0A8; }
.msg-item .msg-ic.default { background: rgba(154, 123, 79, 0.14); color: var(--gold-light); }
.msg-item .msg-main { flex: 1; min-width: 0; }
.msg-item .msg-main .msg-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.msg-item .msg-main .msg-head b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg-item .msg-main .msg-head .msg-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.msg-item .msg-main .msg-head .unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); flex-shrink: 0;
}
.msg-item .msg-main p {
  font-size: 12.5px; color: var(--muted);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.5;
}
.msg-item .msg-delete {
  position: absolute; right: -60px; top: 0; bottom: 0;
  width: 60px; display: grid; place-items: center;
  background: var(--danger); color: #fff;
  font-size: 12px; cursor: pointer; transition: right .25s ease;
}
.msg-item:hover .msg-delete { right: 0; }

/* ---------- 横向优惠券卡片 ---------- */
.coupon-card-horizontal {
  display: flex; margin-bottom: 12px;
  background: var(--surface); border-radius: 14px;
  overflow: hidden; border: 1px solid var(--line);
  position: relative;
}
.coupon-card-horizontal .cch-left {
  width: 110px; flex-shrink: 0; padding: 18px 12px;
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.25), rgba(123, 45, 59, 0.2));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.coupon-card-horizontal .cch-left::after {
  content: ""; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink);
}
.coupon-card-horizontal .cch-amount {
  font-size: 26px; font-weight: 800; color: var(--gold-light);
  line-height: 1;
}
.coupon-card-horizontal .cch-amount small { font-size: 13px; font-weight: 500; }
.coupon-card-horizontal .cch-type {
  font-size: 11px; color: var(--beige); margin-top: 4px; opacity: .8;
}
.coupon-card-horizontal .cch-right {
  flex: 1; padding: 14px 16px; display: flex;
  flex-direction: column; justify-content: center; gap: 4px;
}
.coupon-card-horizontal .cch-right h4 { font-size: 14.5px; }
.coupon-card-horizontal .cch-condition { font-size: 11.5px; color: var(--muted); }
.coupon-card-horizontal .cch-expire { font-size: 11px; color: var(--muted); opacity: .8; }
.coupon-card-horizontal .cch-action {
  display: flex; align-items: center; padding-right: 14px;
}
.coupon-card-horizontal .cch-use-btn {
  padding: 7px 14px; border-radius: 20px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; transition: .2s; white-space: nowrap;
}
.coupon-card-horizontal .cch-use-btn:hover { filter: brightness(1.08); }
.coupon-card-horizontal.used .cch-left,
.coupon-card-horizontal.expired .cch-left { opacity: .5; }
.coupon-card-horizontal.used .cch-right,
.coupon-card-horizontal.expired .cch-right { opacity: .6; }

/* ---------- 骨架屏加载动画 ---------- */
.skeleton-loader {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.skeleton-card .sk-line {
  height: 14px; border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--ink-2) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}
.skeleton-card .sk-line.short { width: 60%; }
.skeleton-card .sk-line.medium { width: 80%; }

/* ---------- 暗金渐变大按钮 ---------- */
.btn-primary-gradient {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 28px; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  color: #fff; transition: all .25s ease;
  box-shadow: 0 6px 20px rgba(154, 123, 79, 0.35);
  position: relative; overflow: hidden;
}
.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(154, 123, 79, 0.45);
  filter: brightness(1.06);
}
.btn-primary-gradient:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(154, 123, 79, 0.3);
}
.btn-primary-gradient::before {
  content: ""; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition: left .5s;
}
.btn-primary-gradient:hover::before { left: 100%; }
.btn-primary-gradient[disabled] {
  opacity: .6; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.btn-primary-gradient.loading { pointer-events: none; }
.btn-primary-gradient .btn-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 空状态（升级版） ---------- */
.empty-state {
  padding: 60px 20px 50px; text-align: center;
}
.empty-state .es-icon {
  width: 80px; height: 80px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 36px;
}
.empty-state .es-icon.learning { color: var(--ok); }
.empty-state .es-icon.commission { color: var(--gold-light); }
.empty-state .es-icon.system { color: #9AA0AA; }
.empty-state .es-icon.marketing { color: #E5A0A8; }
.empty-state h3 {
  font-size: 16px; margin-bottom: 6px; color: var(--beige);
}
.empty-state p {
  font-size: 12.5px; color: var(--muted);
  max-width: 240px; margin: 0 auto 18px;
}
.empty-state .es-action {
  display: inline-block; padding: 8px 20px;
  border-radius: 20px; font-size: 13px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; text-decoration: none;
}

/* ---------- 支付页：订单信息区 ---------- */
.checkout-order-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; margin-bottom: 16px;
}
.checkout-order-card .coc-product {
  display: flex; gap: 14px; align-items: center;
  padding-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.checkout-order-card .coc-cover {
  width: 72px; height: 72px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-family: "SimSun", serif;
  font-size: 20px; color: #fff; letter-spacing: .1em;
}
.checkout-order-card .coc-info { flex: 1; min-width: 0; }
.checkout-order-card .coc-info h3 {
  font-size: 15px; line-height: 1.4;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.checkout-order-card .coc-info .coc-original {
  font-size: 12px; color: var(--muted); text-decoration: line-through;
  margin-top: 4px;
}
.checkout-order-card .coc-price {
  font-size: 20px; font-weight: 700; color: var(--gold-light);
  flex-shrink: 0; text-align: right;
}
.coupon-selector {
  margin-top: 14px;
}
.coupon-selector .cs-label {
  font-size: 13px; color: var(--muted); margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.coupon-selector .cs-label b { color: var(--beige); font-weight: 500; }
.coupon-dropdown {
  position: relative;
}
.coupon-dropdown .cd-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: .2s;
}
.coupon-dropdown .cd-trigger:hover { border-color: var(--gold); }
.coupon-dropdown .cd-trigger .cd-icon { font-size: 18px; }
.coupon-dropdown .cd-trigger .cd-text { flex: 1; font-size: 13.5px; }
.coupon-dropdown .cd-trigger .cd-discount {
  color: var(--gold-light); font-weight: 600; font-size: 13px;
}
.coupon-dropdown .cd-trigger .cd-arrow {
  color: var(--muted); font-size: 12px; transition: transform .2s;
}
.coupon-dropdown.open .cd-trigger .cd-arrow { transform: rotate(180deg); }
.coupon-dropdown .cd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; z-index: 30;
  box-shadow: var(--shadow); max-height: 240px; overflow-y: auto;
  display: none;
}
.coupon-dropdown.open .cd-menu { display: block; animation: dropDown .2s ease; }
@keyframes dropDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.coupon-dropdown .cd-item {
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background .15s;
}
.coupon-dropdown .cd-item:hover { background: rgba(154, 123, 79, 0.1); }
.coupon-dropdown .cd-item.selected { background: rgba(154, 123, 79, 0.15); }
.coupon-dropdown .cd-item .cdi-info { flex: 1; min-width: 0; }
.coupon-dropdown .cd-item .cdi-info b { font-size: 13px; display: block; }
.coupon-dropdown .cd-item .cdi-info small { font-size: 11px; color: var(--muted); }
.coupon-dropdown .cd-item .cdi-val {
  font-size: 14px; font-weight: 700; color: var(--gold-light);
  flex-shrink: 0;
}
.price-breakdown {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.price-breakdown .pb-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.price-breakdown .pb-row .pb-label { color: var(--muted); }
.price-breakdown .pb-row .pb-val { color: var(--beige); }
.price-breakdown .pb-row.discount .pb-val { color: var(--ok); }
.price-breakdown .pb-row.total {
  padding-top: 10px; margin-top: 4px;
  border-top: 1px solid var(--line);
  font-size: 15px; font-weight: 700;
}
.price-breakdown .pb-row.total .pb-val {
  font-size: 22px; color: var(--gold-light);
}

/* ---------- 支付安全提示 ---------- */
.pay-security {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  padding: 12px 0 4px; font-size: 11.5px; color: var(--muted);
}
.pay-security .ps-item {
  display: flex; align-items: center; gap: 5px;
}
.pay-security .ps-item .ps-ic { font-size: 14px; }

/* ---------- 支付成功页 ---------- */
.pay-success-view {
  padding: 30px 20px; text-align: center;
}
.pay-success-view .psv-icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ok), #5a8a48);
  display: grid; place-items: center; font-size: 40px; color: #fff;
  box-shadow: 0 8px 30px rgba(127, 176, 105, 0.35);
  animation: successPop .6s ease;
}
.pay-success-view h2 {
  font-size: 22px; margin-bottom: 6px;
}
.pay-success-view .psv-sub {
  font-size: 13px; color: var(--muted); margin-bottom: 24px;
}
.psv-actions {
  display: flex; gap: 10px; margin-top: 20px;
  flex-direction: column;
}
.psv-actions .btn { flex: 1; padding: 14px; font-size: 14px; }

/* ---------- 礼包入口 / 我的礼包 ---------- */
.gift-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(123, 45, 59, 0.2), rgba(154, 123, 79, 0.15));
  border: 1px solid rgba(154, 123, 79, 0.35);
  border-radius: 14px; text-decoration: none;
  position: relative; overflow: hidden;
}
.gift-entry::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(217, 185, 138, 0.15), transparent 70%);
}
.gift-entry .ge-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #241B10;
}
.gift-entry .ge-main { flex: 1; min-width: 0; position: relative; }
.gift-entry .ge-main b { font-size: 15px; display: block; color: var(--gold-ink); }
.gift-entry .ge-main small { font-size: 11.5px; color: var(--muted); }
.gift-entry .ge-badge {
  background: var(--wine); color: #fff;
  padding: 2px 8px; border-radius: 10px; font-size: 11px;
  flex-shrink: 0; position: relative;
}
.gift-entry .ge-arrow { color: var(--gold-ink); font-size: 18px; position: relative; }

/* 我的礼包列表 */
.my-gift-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.my-gift-card.claimable { border-color: var(--gold); }
.my-gift-card .mgc-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.my-gift-card .mgc-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.25), rgba(123, 45, 59, 0.2));
}
.my-gift-card .mgc-info { flex: 1; min-width: 0; }
.my-gift-card .mgc-info h4 { font-size: 14.5px; }
.my-gift-card .mgc-info small { font-size: 11.5px; color: var(--muted); }
.my-gift-card .mgc-status {
  padding: 3px 10px; border-radius: 20px; font-size: 11px;
  flex-shrink: 0;
}
.my-gift-card .mgc-status.claimable {
  background: rgba(154, 123, 79, 0.18); color: var(--gold-ink);
}
.my-gift-card .mgc-status.claimed {
  background: rgba(127, 176, 105, 0.15); color: var(--ok);
}
.my-gift-card .mgc-status.expired {
  background: var(--ink-2); color: var(--muted);
}
.my-gift-card .mgc-items {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.my-gift-card .mgc-items .mgc-tag {
  padding: 4px 10px; border-radius: 20px; font-size: 11px;
  background: rgba(154, 123, 79, 0.1); color: var(--beige);
  border: 1px solid rgba(154, 123, 79, 0.25);
}
.my-gift-card .mgc-progress {
  height: 6px; background: var(--ink-2); border-radius: 3px;
  overflow: hidden; margin-bottom: 10px;
}
.my-gift-card .mgc-progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--wine));
  border-radius: 3px; transition: width .4s;
}
.my-gift-card .mgc-action { display: flex; gap: 8px; }
.my-gift-card .mgc-action button {
  flex: 1; padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--beige); transition: .2s;
}
.my-gift-card .mgc-action button.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent; color: #fff;
}
.my-gift-card .mgc-action button:hover { filter: brightness(1.08); }
.my-gift-card .mgc-action button[disabled] { opacity: .5; cursor: not-allowed; }

/* ================================================================
   C2 阶段扩展样式：讲师入驻平台 UI
   ================================================================ */

/* ---------- 讲师入驻 Banner ---------- */
.instructor-banner {
  margin: 0 -14px;
  padding: 50px 20px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(500px 200px at 30% 0%, rgba(154, 123, 79, 0.3), transparent 60%),
    radial-gradient(500px 240px at 70% 100%, rgba(123, 45, 59, 0.25), transparent 60%),
    linear-gradient(180deg, var(--hero-start) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--line);
}
.instructor-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--wine));
}
.instructor-banner h1 {
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.3;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.instructor-banner p {
  color: var(--beige);
  font-size: 14px;
  opacity: 0.9;
}
.instructor-banner .banner-cta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.instructor-banner .banner-cta .btn {
  padding: 13px 32px;
  font-size: 15px;
}

/* ---------- 优势卡片 ---------- */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.advantage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: transform .2s, border-color .2s;
}
.advantage-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.advantage-card .adv-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.advantage-card h3 {
  font-size: 16px;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.advantage-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- 申请步骤指示器 ---------- */
.apply-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 24px;
  position: relative;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 100px;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  background: var(--ink-2);
  color: var(--muted);
  border: 2px solid var(--line);
  transition: all .3s;
}
.step-item.active .step-num {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(217, 185, 138, 0.4);
}
.step-item.done .step-num {
  background: rgba(127, 176, 105, 0.2);
  color: var(--ok);
  border-color: var(--ok);
}
.step-label {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.step-item.active .step-label {
  color: var(--gold-light);
  font-weight: 600;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 -10px;
  margin-bottom: 26px;
  max-width: 60px;
}
.step-line.done {
  background: var(--ok);
}

/* ---------- 申请表单 ---------- */
.apply-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.apply-form-card h3 {
  font-size: 17px;
  margin-bottom: 16px;
  color: var(--gold-light);
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.form-actions .btn {
  flex: 1;
}
.field-error {
  color: var(--danger);
  font-size: 11.5px;
  margin-top: 4px;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}
.field textarea:focus {
  border-color: var(--gold);
}

/* ---------- 多选项 ---------- */
.multi-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.multi-select .chip {
  cursor: pointer;
  user-select: none;
}
.multi-select .chip.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
  color: #fff;
}

/* ---------- 上传区域 ---------- */
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--ink);
}
.upload-zone:hover {
  border-color: var(--gold);
  background: rgba(154, 123, 79, 0.06);
}
.upload-zone .up-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.upload-zone p {
  font-size: 13px;
  color: var(--beige);
}
.upload-zone small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

/* ---------- 申请状态卡片 ---------- */
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.status-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--wine));
}
.status-card .sc-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}
.status-card h3 {
  text-align: center;
  font-size: 18px;
  margin-bottom: 4px;
}
.status-card .sc-status {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.status-card .sc-status .badge {
  margin-left: 6px;
}
.status-progress {
  margin: 14px 0;
}
.status-progress .bar {
  margin-bottom: 8px;
}
.status-stages {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
}
.status-stages .stage-done {
  color: var(--ok);
}
.status-stages .stage-current {
  color: var(--gold-light);
  font-weight: 600;
}
.sc-eta {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ---------- 审核状态标签 ---------- */
.review-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.review-status-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.review-status-tag.pending {
  background: rgba(154, 123, 79, 0.15);
  color: var(--gold-light);
}
.review-status-tag.pending::before {
  background: var(--gold-light);
}
.review-status-tag.reviewing {
  background: rgba(93, 138, 196, 0.15);
  color: #7DA8D4;
}
.review-status-tag.reviewing::before {
  background: #7DA8D4;
  animation: pulse 1.4s infinite;
}
.review-status-tag.approved {
  background: rgba(127, 176, 105, 0.15);
  color: var(--ok);
}
.review-status-tag.approved::before {
  background: var(--ok);
}
.review-status-tag.rejected {
  background: rgba(194, 94, 76, 0.15);
  color: var(--danger);
}
.review-status-tag.rejected::before {
  background: var(--danger);
}
.review-status-tag.draft {
  background: var(--ink-2);
  color: var(--muted);
}
.review-status-tag.draft::before {
  background: var(--muted);
}

/* ---------- 讲师卡片（列表网格） ---------- */
.instructor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  transition: transform .2s, border-color .2s;
  position: relative;
}
.instructor-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.instructor-card .ic-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  font-size: 28px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(217, 185, 138, 0.25);
}
.instructor-card .ic-name {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}
.instructor-card .ic-bio {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.instructor-card .ic-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.instructor-card .ic-stat {
  text-align: center;
}
.instructor-card .ic-stat b {
  display: block;
  font-size: 15px;
  color: var(--gold-light);
}
.instructor-card .ic-stat span {
  font-size: 10.5px;
  color: var(--muted);
}
.instructor-card .ic-action {
  width: 100%;
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--gold-light);
  background: rgba(154, 123, 79, 0.15);
  padding: 2px 7px;
  border-radius: 10px;
}

/* ---------- 讲师详情页头部 ---------- */
.instructor-header {
  margin: 0 -14px;
  padding: 30px 20px 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(400px 180px at 80% 0%, rgba(154, 123, 79, 0.25), transparent 60%),
    linear-gradient(180deg, var(--hero-start) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--line);
}
.instructor-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--wine));
}
.instructor-header .ih-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}
.instructor-header .ih-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  font-size: 30px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(217, 185, 138, 0.3);
}
.instructor-header .ih-info {
  flex: 1;
  min-width: 0;
}
.instructor-header .ih-name {
  font-size: 22px;
  font-family: "SimSun", serif;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.instructor-header .ih-tagline {
  font-size: 13px;
  color: var(--beige);
  opacity: 0.9;
  margin-bottom: 10px;
}
.instructor-header .ih-stats {
  display: flex;
  gap: 18px;
}
.instructor-header .ih-stat b {
  display: block;
  font-size: 17px;
  color: var(--gold-light);
}
.instructor-header .ih-stat span {
  font-size: 11px;
  color: var(--muted);
}
.instructor-header .ih-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.instructor-header .ih-actions .btn {
  flex: 1;
}

/* ---------- Tab 切换（讲师详情） ---------- */
.instructor-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  margin: 16px 0;
}
.instructor-tabs a {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 13px;
  color: var(--beige);
  border-radius: 9px;
  text-decoration: none;
  transition: all .2s;
}
.instructor-tabs a.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
}

/* ---------- 讲师详情介绍区 ---------- */
.instructor-about {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.instructor-about h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--gold-light);
}
.instructor-about p {
  font-size: 13.5px;
  color: var(--beige);
  line-height: 1.7;
}
.instructor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.instructor-tags .tag {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  background: rgba(154, 123, 79, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(154, 123, 79, 0.3);
}
.social-links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--beige);
  font-size: 16px;
  text-decoration: none;
  transition: all .2s;
}
.social-links a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ---------- 评价列表 ---------- */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.review-item .ri-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review-item .ri-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine), var(--gold-deep));
  color: #fff;
  font-size: 14px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.review-item .ri-info {
  flex: 1;
  min-width: 0;
}
.review-item .ri-name {
  font-size: 13.5px;
  font-weight: 600;
}
.review-item .ri-meta {
  font-size: 11px;
  color: var(--muted);
}
.review-item .ri-content {
  font-size: 13px;
  color: var(--beige);
  line-height: 1.6;
}

/* ================================================================
   讲师后台布局
   ================================================================ */

.instructor-layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- 讲师后台侧边栏（PC端） ---------- */
.instructor-sidebar {
  width: 220px;
  background: var(--ink-2);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.instructor-sidebar .brand {
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
  color: var(--cream);
}
.instructor-sidebar .sidebar-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  padding-left: 2px;
}
.instructor-sidebar .side-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
}
.instructor-sidebar .sp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  font-size: 16px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.instructor-sidebar .sp-info {
  flex: 1;
  min-width: 0;
}
.instructor-sidebar .sp-info b {
  display: block;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.instructor-sidebar .sp-info small {
  font-size: 11px;
  color: var(--muted);
}
.instructor-sidebar .nav-group-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.18em;
  padding: 12px 12px 6px;
}
.instructor-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--beige);
  font-size: 14px;
  margin-bottom: 3px;
  text-decoration: none;
  transition: all .18s;
}
.instructor-sidebar a:hover {
  background: rgba(154, 123, 79, 0.12);
  color: var(--gold-light);
}
.instructor-sidebar a.active {
  background: linear-gradient(135deg, rgba(154, 123, 79, 0.22), rgba(123, 45, 59, 0.16));
  color: var(--gold-light);
  border: 1px solid rgba(154, 123, 79, 0.35);
}
.instructor-sidebar a .nav-ic {
  width: 20px;
  text-align: center;
  font-size: 16px;
}
.instructor-sidebar .side-bottom {
  position: absolute;
  bottom: 18px;
  left: 12px;
  right: 12px;
}

/* ---------- 讲师后台主区 ---------- */
.instructor-main {
  flex: 1;
  padding: 24px;
  min-width: 0;
}
.instructor-main .page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.instructor-main .page-head h2 {
  font-size: 22px;
  font-family: "SimSun", serif;
  border-left: 4px solid var(--gold);
  padding-left: 12px;
}

/* ---------- 讲师数据卡片 ---------- */
.instructor-stat-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.instructor-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}
.instructor-stat-card.highlight {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(154, 123, 79, 0.15);
}
.instructor-stat-card.highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}
.instructor-stat-card .sc-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.instructor-stat-card .sc-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
}
.instructor-stat-card.highlight .sc-value {
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.instructor-stat-card .sc-change {
  font-size: 11.5px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.instructor-stat-card .sc-change.up {
  color: var(--ok);
}
.instructor-stat-card .sc-change.down {
  color: var(--danger);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ---------- 收益汇总卡片 ---------- */
.earnings-summary-card {
  background: linear-gradient(140deg, #2A1F14 0%, var(--wine-deep) 100%);
  border: 1px solid rgba(154, 123, 79, 0.4);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.earnings-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 120px at 90% 0%, rgba(217, 185, 138, 0.15), transparent 60%);
  pointer-events: none;
}
.earnings-summary-card .esc-title {
  font-size: 13px;
  color: var(--on-dark-2);
  opacity: 0.85;
  margin-bottom: 6px;
  position: relative;
}
.earnings-summary-card .esc-amount {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
  position: relative;
}
.earnings-summary-card .esc-sub {
  font-size: 12px;
  color: var(--on-dark-2);
  opacity: 0.8;
  margin-top: 6px;
  position: relative;
}
.earnings-summary-card .esc-action {
  margin-top: 16px;
  position: relative;
}

/* ---------- 提现按钮 ---------- */
.payout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  border: none;
  box-shadow: 0 4px 16px rgba(217, 185, 138, 0.3);
}
.payout-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 185, 138, 0.4);
}
.payout-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- 简易柱状图 ---------- */
.mini-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}
.mini-chart h4 {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--gold-light);
}
.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  padding: 0 10px;
  gap: 8px;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border-radius: 6px 6px 0 0;
  transition: height .6s ease;
  position: relative;
  min-height: 4px;
}
.chart-bar:hover {
  filter: brightness(1.15);
}
.chart-bar .bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--gold-light);
  font-weight: 600;
  white-space: nowrap;
}
.chart-label {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 课程网格（讲师后台） ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.course-grid-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.course-grid-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.course-grid-card .cgc-cover {
  height: 130px;
  display: grid;
  place-items: center;
  font-family: "SimSun", serif;
  font-size: 20px;
  letter-spacing: 0.15em;
  color: #fff;
  position: relative;
}
.course-grid-card .cgc-status {
  position: absolute;
  top: 10px;
  right: 10px;
}
.course-grid-card .cgc-body {
  padding: 14px;
}
.course-grid-card .cgc-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.course-grid-card .cgc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.course-grid-card .cgc-meta b {
  color: var(--gold-light);
  font-weight: 600;
}
.course-grid-card .cgc-actions {
  display: flex;
  gap: 6px;
}
.course-grid-card .cgc-actions .btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
}

/* ---------- 订单/收益明细列表 ---------- */
.order-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.order-list-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-list-header h4 {
  font-size: 15px;
  color: var(--gold-light);
}
.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.order-item:last-child {
  border-bottom: none;
}
.order-item:hover {
  background: rgba(154, 123, 79, 0.05);
}
.order-item .oi-course {
  flex: 1;
  min-width: 0;
}
.order-item .oi-course b {
  display: block;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.order-item .oi-course small {
  font-size: 11.5px;
  color: var(--muted);
}
.order-item .oi-amount {
  text-align: right;
  flex-shrink: 0;
}
.order-item .oi-amount b {
  display: block;
  font-size: 15px;
  color: var(--gold-light);
}
.order-item .oi-amount small {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 学员列表 ---------- */
.student-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.student-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}
.student-item:last-child {
  border-bottom: none;
}
.student-item:hover {
  background: rgba(154, 123, 79, 0.05);
}
.student-item .si-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine), var(--gold-deep));
  color: #fff;
  font-size: 16px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.student-item .si-info {
  flex: 1;
  min-width: 0;
}
.student-item .si-name {
  font-size: 14px;
  font-weight: 600;
}
.student-item .si-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.student-item .si-progress {
  flex-shrink: 0;
  text-align: right;
  width: 90px;
}
.student-item .si-progress .bar {
  margin-top: 4px;
  height: 5px;
}

/* ---------- 设置表单组 ---------- */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.settings-section h3 {
  font-size: 16px;
  color: var(--gold-light);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.settings-avatar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.settings-avatar .sa-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #241B10;
  font-size: 26px;
  font-family: "SimSun", serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.settings-avatar .sa-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-avatar .sa-actions small {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 标签输入 ---------- */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 44px;
}
.tag-input-wrap .tag-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: rgba(154, 123, 79, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(154, 123, 79, 0.3);
}
.tag-input-wrap .tag-item .tag-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
}
.tag-input-wrap .tag-item .tag-remove:hover {
  color: var(--danger);
}
.tag-input-wrap input {
  flex: 1;
  min-width: 80px;
  background: none;
  border: none;
  outline: none;
  color: var(--cream);
  font-size: 13px;
  padding: 2px 4px;
}

/* ---------- 讲师后台移动端底部 Tab ---------- */
.instructor-tab-bar {
  display: none;
}

/* ---------- 热销课程列表 ---------- */
.top-courses {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.top-courses h4 {
  font-size: 15px;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.top-course-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.top-course-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.top-course-item:first-child {
  padding-top: 0;
}
.top-course-item .tc-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--ink-2);
  color: var(--muted);
  flex-shrink: 0;
}
.top-course-item:nth-child(1) .tc-rank {
  background: linear-gradient(135deg, #FFD700, #DAA520);
  color: #241B10;
}
.top-course-item:nth-child(2) .tc-rank {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #241B10;
}
.top-course-item:nth-child(3) .tc-rank {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: #fff;
}
.top-course-item .tc-info {
  flex: 1;
  min-width: 0;
}
.top-course-item .tc-info b {
  display: block;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.top-course-item .tc-info small {
  font-size: 11px;
  color: var(--muted);
}
.top-course-item .tc-revenue {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
  flex-shrink: 0;
}

/* ---------- 提现方式选择 ---------- */
.payout-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.payout-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
}
.payout-method:hover {
  border-color: var(--gold);
}
.payout-method.selected {
  border-color: var(--gold);
  background: rgba(154, 123, 79, 0.08);
}
.payout-method .pm-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--ink-2);
  flex-shrink: 0;
}
.payout-method .pm-info {
  flex: 1;
}
.payout-method .pm-info b {
  display: block;
  font-size: 14px;
}
.payout-method .pm-info small {
  font-size: 11.5px;
  color: var(--muted);
}
.payout-method .pm-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.payout-method.selected .pm-radio {
  border-color: var(--gold);
}
.payout-method.selected .pm-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-light);
}

/* ---------- 提现记录 ---------- */
.payout-record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.payout-record:last-child {
  border-bottom: none;
}
.payout-record .pr-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-light);
  min-width: 90px;
}
.payout-record .pr-info {
  flex: 1;
  min-width: 0;
}
.payout-record .pr-info b {
  display: block;
  font-size: 13px;
}
.payout-record .pr-info small {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 搜索栏（后台） ---------- */
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-toolbar .search-input {
  flex: 1;
  min-width: 200px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
.admin-toolbar .search-input:focus {
  border-color: var(--gold);
}
.admin-toolbar select {
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
.admin-toolbar select:focus {
  border-color: var(--gold);
}

/* ---------- 审核操作区 ---------- */
.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.review-actions .btn {
  flex: 1;
}
.review-comment {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
  margin-top: 10px;
}
.review-comment:focus {
  border-color: var(--gold);
}

/* ---------- 空状态增强 ---------- */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}
.empty-state .es-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.empty-state h4 {
  font-size: 16px;
  color: var(--beige);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- 讲师后台响应式 ---------- */
@media (max-width: 860px) {
  .instructor-layout {
    flex-direction: column;
  }
  .instructor-sidebar {
    display: none;
  }
  .instructor-main {
    padding: 16px;
    padding-bottom: 80px;
  }
  .instructor-main .page-head h2 {
    font-size: 18px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .instructor-stat-card .sc-value {
    font-size: 22px;
  }

  /* 讲师后台移动端底部 Tab */
  .instructor-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .instructor-tab-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 0 8px;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    transition: color .18s;
  }
  .instructor-tab-bar a .tab-ic {
    font-size: 20px;
  }
  .instructor-tab-bar a.active {
    color: var(--gold-light);
  }
  .instructor-tab-bar a.active .tab-ic {
    filter: drop-shadow(0 0 6px rgba(217, 185, 138, 0.45));
  }

  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
  }
  .chart-container {
    height: 140px;
  }
  .earnings-summary-card .esc-amount {
    font-size: 28px;
  }
}

@media (min-width: 861px) and (max-width: 1199px) {
  .instructor-sidebar {
    width: 190px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (min-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== C2 讲师：入驻申请步骤 / 标签选择 / 优势卡片 ===== */
.apply-step .step-dots {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 8px;
}
.apply-step .step-dots span {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid var(--rule);
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: all .25s ease;
}
.apply-step .step-dots span.on {
  background: linear-gradient(135deg, var(--gold), #c9a86a);
  border-color: transparent; color: #1C1A17;
}
.apply-step .step-labels {
  display: flex; gap: 8px; justify-content: space-between; padding: 0 8px;
}
.apply-step .step-labels span {
  flex: 1; text-align: center; font-size: 12px; color: var(--muted);
  transition: color .25s ease;
}
.apply-step .step-labels span.on { color: var(--gold); font-weight: 600; }

.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pick-item {
  padding: 7px 14px; border-radius: 20px;
  background: var(--bg2); border: 1px solid var(--rule);
  color: var(--beige); font-size: 13px; cursor: pointer;
  transition: all .2s ease; user-select: none;
}
.tag-pick-item:hover { border-color: var(--gold); }
.tag-pick-item.on {
  background: linear-gradient(135deg, var(--gold), #c9a86a);
  border-color: transparent; color: #1C1A17; font-weight: 600;
}

.perf-card { text-align: center; padding: 20px 14px; }
.perf-card .perf-ic { font-size: 32px; margin-bottom: 8px; }
.perf-card b { display: block; font-size: 15px; margin-bottom: 6px; }
.perf-card small { color: var(--muted); font-size: 12.5px; line-height: 1.7; display: block; }

.id-upload input[type="checkbox"] { accent-color: var(--gold); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 12px; border-radius: 16px; font-size: 12px;
  background: var(--bg2); border: 1px solid var(--rule); color: var(--muted);
}
.tag-gold { border-color: rgba(154, 123, 79, .45); color: var(--gold); }

.progress { overflow: hidden; }

.instructor-join-card {
  background: linear-gradient(135deg, rgba(154, 123, 79, .16), rgba(123, 45, 59, .10));
  border: 1px solid rgba(154, 123, 79, .35);
  transition: border-color .2s ease;
}
.instructor-join-card:hover { border-color: var(--gold); }
/* 卡片内文字继承 a{color:--gold-light}，浅色主题下压在浅金底上只有 3.7:1 */
.instructor-join-card b { color: var(--gold-ink); }

.dash-grid-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 860px) {
  .dash-grid-2 { grid-template-columns: 1fr; }
}

/* ---------- C7 学习路径 ---------- */
.path-hero {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(154,123,79,.16), rgba(123,45,59,.16));
  border: 1px solid rgba(154,123,79,.35);
  color: var(--gold-ink);
}
.path-track { display: flex; align-items: stretch; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.path-step {
  flex: 1 1 90px; min-width: 88px; max-width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px; border-radius: 10px; text-align: center;
  background: var(--ink); border: 1px solid var(--line); position: relative;
}
.path-step .ps-ic {
  width: 26px; height: 26px; border-radius: 50%; font-size: 12px;
  display: grid; place-items: center; font-weight: 700;
  background: var(--ink-2); color: var(--muted);
}
.path-step .ps-t { font-size: 11.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.path-step .ps-tag {
  position: absolute; top: 6px; right: 6px; font-size: 9px; color: var(--accent-ink);
  background: rgba(154,123,79,.2); padding: 1px 5px; border-radius: 8px;
}
.path-step.viber { border-color: var(--gold); }
.path-step.viber .ps-ic { background: var(--gold); color: #fff; }
.path-step.on { border-color: var(--wine); box-shadow: 0 0 0 1px var(--wine) inset; }
.path-step.on .ps-ic { background: var(--wine); color: #fff; }
.path-step.on .ps-t { color: var(--cream); font-weight: 600; }

/* ================= C8 课时播放器（视频 / 音频 / 图文） ================= */
.player { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pl-hint { padding: 46px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.pl-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pl-stage { background: #000; }
.pl-media { width: 100%; display: block; max-height: 62vh; background: #000; }
.pl-media-audio { width: 100%; margin-top: 14px; }
.pl-audio-wrap {
  padding: 28px 16px; text-align: center; color: var(--on-dark);
  background: linear-gradient(135deg, rgba(123, 45, 59, .24), rgba(43, 34, 25, .92));
}
.pl-audio-cover {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; color: var(--on-dark-3);
  background: radial-gradient(circle at 35% 30%, #3A2F22, #201B15);
  border: 1px solid rgba(154, 123, 79, .5);
}
.pl-title { margin: 12px 0 0; font-size: 17px; }
.pl-article { padding: 16px; background: var(--surface); }
.pl-cover { width: 100%; border-radius: 10px; margin-bottom: 12px; display: block; }
.pl-body { margin-top: 10px; color: var(--beige); font-size: 14.5px; line-height: 1.9; }
.pl-body p { margin-bottom: 10px; }
.pl-transcript { margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--ink-2); }
.pl-transcript summary { cursor: pointer; color: var(--gold-light); font-size: 13px; }
.pl-transcript .pl-body { margin-top: 8px; font-size: 13.5px; }
.pl-atts { margin: 0 12px 12px; }
.pl-atts > b { font-size: 13px; color: var(--gold-light); }
.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ================= C8 养生文化板块 ================= */
.wellness-hero {
  position: relative; padding: 24px 20px; border-radius: var(--radius); margin-bottom: 14px;
  /* 末尾的 #2A1F14 是底色：渐变本身是半透明的，浅色主题下会透出浅色页面底，
     导致固定浅色的标题/副标题压在浅底上「看不清」；加不透明底色后两种主题都稳定 */
  background: linear-gradient(135deg, rgba(123, 45, 59, .42), rgba(43, 34, 25, .92) 62%),
              radial-gradient(600px 240px at 88% -30%, rgba(154, 123, 79, .5), transparent 70%),
              #2A1F14;
  border: 1px solid rgba(154, 123, 79, .35);
}
/* 养生英雄区底色为近不透明深色（rgba(43,34,25,.92)），文字固定用深底专用色 */
.wellness-hero h1 { font-size: 23px; margin-bottom: 6px; color: var(--on-dark); }
.wellness-hero p { color: var(--on-dark-2); font-size: 13.5px; line-height: 1.8; }
.wh-tag {
  display: inline-block; margin-top: 10px; font-size: 11.5px; padding: 3px 10px; border-radius: 12px;
  color: var(--on-dark-2); background: rgba(154, 123, 79, .18); border: 1px solid rgba(154, 123, 79, .4);
}
.wellness-note {
  background: linear-gradient(135deg, rgba(154, 123, 79, .10), rgba(123, 45, 59, .08));
  border: 1px solid rgba(154, 123, 79, .32); border-radius: var(--radius); padding: 13px 15px;
}
.wellness-note .wn-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.wellness-note .wn-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 10px; background: var(--gold-deep); color: #fff; }
.wellness-note .wn-grade { font-size: 11.5px; color: var(--accent-ink); }
.wellness-note .wn-text { color: var(--beige); font-size: 13.5px; line-height: 1.85; }
.wellness-note .wn-list { margin-top: 8px; padding-left: 18px; color: var(--beige); font-size: 13px; line-height: 1.9; }
.wellness-note .wn-list li { margin-bottom: 2px; }
.wellness-note .wn-list b { color: var(--gold-ink); }

/* ================= C8 通用上传控件（后台） ================= */
.up-field { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.up-field input[type="text"] { flex: 1; min-width: 170px; }
.up-btn { white-space: nowrap; }
.up-preview { margin-top: 8px; }
.up-preview img { max-width: 100%; max-height: 150px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.up-preview audio, .up-preview video { width: 100%; margin-top: 6px; border-radius: 8px; }
.up-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.up-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px; flex-wrap: wrap; }

/* 订单买家单元格：可点击跳转会员 360 */
.order-buyer-cell { min-width: 180px; }
.order-buyer { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.order-buyer b { color: var(--gold-light); font-size: 13px; }
.order-buyer:hover b { color: var(--gold); text-decoration: underline; }
.order-buyer .badge { align-self: flex-start; margin-top: 2px; }

/* ================= C8 用户 360 详情（后台） ================= */
.ud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ud-dim { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ud-dim h4 { font-size: 13px; color: var(--gold-light); margin-bottom: 8px; }

/* ================= 商城（东方臻选 · 文化好物） ================= */
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--wine); color: #fff; font-size: 10.5px; font-weight: 700;
  line-height: 1; margin-left: 6px; vertical-align: middle;
}

/* 英雄区底色恒为深色，文字用深底专用色（浅色主题不反转） */
.shop-hero {
  position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden;
  padding: 26px 20px; background: linear-gradient(135deg, #2A1F14 0%, #3A2418 48%, #4A2A22 100%);
  border: 1px solid rgba(154, 123, 79, .35);
}
.shop-hero .sh-kicker { font-size: 11px; letter-spacing: .28em; color: var(--on-dark-3); margin-bottom: 8px; }
.shop-hero h1 { font-size: 24px; color: var(--on-dark); margin-bottom: 6px; }
.shop-hero p { color: var(--on-dark-2); font-size: 13.5px; }
.shop-hero .sh-note { margin-top: 8px; font-size: 12.5px; color: var(--on-dark-3); }
/* 右侧有绝对定位的购物车按钮，正文避让，避免窄屏标题被压住 */
.shop-hero .sh-inner { position: relative; z-index: 1; padding-right: 104px; }
@media (max-width: 520px) {
  .shop-hero { padding-top: 58px; }
  .shop-hero .sh-inner { padding-right: 0; }
}
.shop-cart-btn {
  position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center;
  background: rgba(28, 26, 23, .55); border: 1px solid rgba(154, 123, 79, .5);
  color: var(--on-dark); border-radius: 22px; padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.shop-cart-btn:hover { border-color: var(--gold); }

.shop-ship-bar {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap;
}
.shop-ship-bar.ok { border-color: rgba(127, 176, 105, .5); }
.shop-ship-bar.warn { border-color: rgba(194, 94, 76, .45); }
.shop-ship-bar .ssb-ic { font-size: 18px; flex: 0 0 auto; }
.shop-ship-bar .ssb-main { flex: 1; min-width: 0; }
.shop-ship-bar .ssb-main b { display: block; font-size: 13.5px; color: var(--cream); }
.shop-ship-bar .ssb-main small { color: var(--muted); font-size: 12px; }
.shop-ship-bar select {
  background: var(--ink-2); border: 1px solid var(--line); color: var(--cream);
  border-radius: 8px; padding: 7px 9px; font-size: 12.5px; max-width: 180px;
}
/* 窄屏：国家下拉独占一行，避免说明文字被挤成竖条 */
@media (max-width: 560px) {
  .shop-ship-bar .ssb-main { flex: 1 1 60%; }
  .shop-ship-bar select { flex: 1 1 100%; max-width: none; }
}

.shop-search { display: flex; gap: 8px; margin-top: 12px; }
.shop-search input {
  flex: 1; min-width: 0; background: var(--ink-2); border: 1px solid var(--line);
  color: var(--cream); border-radius: 10px; padding: 10px 13px; font-size: 13.5px; outline: none;
}
.shop-search input:focus { border-color: var(--gold); }
.shop-search button {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep)); color: #241a08;
  border: none; border-radius: 10px; padding: 0 18px; font-weight: 700; font-size: 13.5px; cursor: pointer;
}

.shop-cat-seg { margin-top: 12px; overflow-x: auto; }
/* 分类较多时按内容宽度横排并横向滚动，避免 .seg 的 flex:1 把标签挤到重叠 */
.shop-cat-seg a { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; }

.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 768px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .shop-grid { grid-template-columns: repeat(4, 1fr); } }

.shop-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; color: inherit; transition: transform .18s, border-color .18s;
}
.shop-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.shop-card .sc-cover {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(135deg, var(--ink-2), var(--surface-2));
  display: flex; align-items: center; justify-content: center;
}
.shop-card .sc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card .sc-cover span { font-family: "SimSun", "Songti SC", serif; font-size: 26px; color: var(--gold-light); opacity: .75; }
.shop-card .sc-flag {
  position: absolute; top: 8px; left: 8px; background: rgba(94, 31, 43, .9); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
}
.shop-card .sc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.shop-card .sc-body b {
  font-size: 13.5px; color: var(--cream); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card .sc-body small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-card .sc-foot { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.shop-card .sc-price { color: var(--gold-ink); font-weight: 700; font-size: 15px; }
.shop-card .sc-compare { color: var(--muted); font-size: 11.5px; }

/* 商品详情 */
.shop-detail { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 12px; }
@media (min-width: 900px) { .shop-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.shop-gallery .sg-main {
  aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--ink-2), var(--surface-2));
  display: flex; align-items: center; justify-content: center;
}
.shop-gallery .sg-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-gallery .sg-main span { font-family: "SimSun", "Songti SC", serif; font-size: 44px; color: var(--gold-light); opacity: .7; }
.sg-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.sg-thumb {
  flex: 0 0 auto; width: 60px; height: 60px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: none; padding: 0; cursor: pointer;
}
.sg-thumb.on { border-color: var(--gold); }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 商品视频：主区用 contain 防裁切，缩略图叠加播放标识 */
.shop-gallery .sg-main.is-video { aspect-ratio: 16 / 9; }
.shop-gallery .sg-main video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.sg-thumb { position: relative; }
.sg-thumb .sg-thumb-ph { display: block; width: 100%; height: 100%; background: #000; }
.sg-thumb .sg-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; line-height: 1; background: rgba(0, 0, 0, .3); pointer-events: none;
}

.sd-info h1 { font-size: 21px; margin: 8px 0 4px; color: var(--cream); }
.sd-sub { color: var(--muted); font-size: 13px; }
.sd-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sd-price b { font-size: 24px; color: var(--gold-ink); }
.sd-price s { color: var(--muted); font-size: 13px; }
.sd-tag { font-size: 11.5px; padding: 2px 9px; border-radius: 10px; background: rgba(154, 123, 79, .18); color: var(--accent-ink); }
.sd-block { margin-top: 16px; }
.sd-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.sd-variants { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-variant {
  background: var(--surface); border: 1px solid var(--line); color: var(--beige);
  border-radius: 9px; padding: 7px 12px; font-size: 12.5px; cursor: pointer;
}
.sd-variant.on { border-color: var(--gold); color: var(--gold-ink); background: rgba(154, 123, 79, .12); }
.sd-qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 9px; overflow: hidden; background: var(--surface);
}
.sd-qty button { width: 36px; height: 34px; background: none; border: none; color: var(--cream); font-size: 16px; cursor: pointer; }
.sd-qty input {
  width: 52px; height: 34px; text-align: center; background: none; border: none;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  color: var(--cream); font-size: 14px; outline: none;
}
.sd-qty-sm button { width: 30px; height: 28px; font-size: 14px; }
.sd-qty-sm input { width: 40px; height: 28px; font-size: 12.5px; }
.shop-ship-note {
  margin-top: 14px; padding: 11px 13px; border-radius: 11px; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.shop-ship-note.ok { border-color: rgba(127, 176, 105, .5); }
.shop-ship-note.warn { border-color: rgba(194, 94, 76, .45); }
.shop-ship-note .ssn-text { flex: 1; min-width: 150px; font-size: 12.5px; color: var(--beige); }
.shop-ship-note select {
  background: var(--ink-2); border: 1px solid var(--line); color: var(--cream);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; max-width: 160px;
}
.sd-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sd-desc { color: var(--beige); font-size: 13.5px; line-height: 1.9; white-space: pre-wrap; }
.sd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sd-tags span { font-size: 11.5px; color: var(--muted); }

/* 购物车抽屉 */
.shop-cart-sheet { max-height: 82vh; overflow-y: auto; }
.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cl-cover {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 9px; overflow: hidden;
  background: linear-gradient(135deg, var(--ink-2), var(--surface-2));
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.cl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-cover span { font-family: "SimSun", "Songti SC", serif; font-size: 16px; color: var(--gold-light); opacity: .8; }
.cl-main { flex: 1; min-width: 0; }
.cl-main b { display: block; font-size: 13px; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-main small { color: var(--muted); font-size: 11.5px; }
.cl-price { color: var(--gold-ink); font-size: 13px; font-weight: 600; margin-top: 2px; }
.cl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cl-remove { background: none; border: none; color: var(--danger-ink); font-size: 11.5px; cursor: pointer; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px; font-size: 14px; color: var(--beige); }
.cart-total b { color: var(--gold-ink); font-size: 19px; }

/* 结算与商品订单行 */
.co-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.co-line-main { flex: 1; min-width: 0; }
.co-line-main b { display: block; font-size: 13px; color: var(--cream); }
.co-line-main small { color: var(--muted); font-size: 11.5px; }
.co-line-amt { color: var(--gold-ink); font-size: 13.5px; font-weight: 600; }
.co-sub { display: flex; justify-content: space-between; padding-top: 10px; font-size: 13.5px; color: var(--beige); }
.co-sub b { color: var(--gold-ink); }

/* 按需采购履约进度条 */
.soc-steps { display: flex; align-items: flex-start; margin: 12px 0 4px; }
.soc-step { flex: 1; text-align: center; position: relative; }
.soc-step .soc-dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin: 0 auto 5px; position: relative; z-index: 1; }
.soc-step.on .soc-dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(154, 123, 79, .2); }
.soc-step small { font-size: 10.5px; color: var(--muted); }
.soc-step.on small { color: var(--gold-ink); }
.soc-step:not(:last-child)::after {
  content: ''; position: absolute; top: 5px; left: 50%; width: 100%; height: 1px; background: var(--line);
}
.soc-step.on:not(:last-child)::after { background: var(--gold); }
.ud-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.ud-kv > span:first-child { color: var(--muted); }
.ud-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.ud-tab {
  padding: 6px 14px; border-radius: 16px; font-size: 12.5px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.ud-tab.on { background: var(--gold-deep); color: #fff; border-color: var(--gold); }
.tree-node { padding-left: 16px; border-left: 1px dashed var(--line); margin-left: 8px; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; flex-wrap: wrap; }
@media (max-width: 860px) { .ud-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ud-grid { grid-template-columns: 1fr; } }

/* ================= C8 素材库（后台） ================= */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { height: 96px; background: var(--ink); display: grid; place-items: center; font-size: 26px; color: var(--gold-light); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-info { padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.media-info b { display: block; color: var(--cream); font-size: 12.5px; margin-bottom: 3px; word-break: break-all; }

/* ================= P0 法务文本 / 积分中心 ================= */
.legal-meta { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }
.legal-text { color: var(--beige); font-size: 14px; line-height: 1.95; word-break: break-word; }
.legal-body { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.agree-row {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 4px;
  font-size: 12.5px; line-height: 1.7; color: var(--muted); cursor: pointer;
}
.agree-row input[type="checkbox"] { margin-top: 2px; accent-color: var(--gold); flex: none; }
.agree-row a { color: var(--gold-light); text-decoration: underline; }
.txt-muted { color: var(--muted); }

/* ================= P2 PWA：安装引导条 ================= */
.a2hs-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 24px), 616px); z-index: 80;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
  animation: a2hs-in .28s ease;
}
@keyframes a2hs-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.a2hs-ic {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--accent-ink); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Songti SC", serif; font-size: 17px;
}
.a2hs-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a2hs-txt b { color: var(--cream); font-size: 13px; font-weight: 600; }
.a2hs-txt small { color: var(--muted); font-size: 11px; }
.a2hs-go {
  flex: none; border: none; border-radius: 9px; cursor: pointer;
  background: var(--gold-deep); color: var(--on-dark);
  font-size: 12.5px; font-weight: 600; padding: 8px 16px;
}
.a2hs-go:active { opacity: .85; }
.a2hs-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: none; color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.a2hs-no:hover { color: var(--cream); }
@media (min-width: 1200px) { .a2hs-bar { bottom: 24px; } }

/* ================= 课程专区体系（免费 / 青铜 / 白银 / 黄金） ================= */
/* 专区徽标：文字色走 --zone-* 变量，明暗主题各自保证对比度 */
.zone-badge {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  line-height: 17px; border: 1px solid transparent; white-space: nowrap;
}
.zone-badge.free   { background: rgba(127,176,105,.15); border-color: rgba(127,176,105,.42); color: var(--zone-free); }
.zone-badge.bronze { background: rgba(199,154,91,.16);  border-color: rgba(199,154,91,.45);  color: var(--zone-bronze); }
.zone-badge.silver { background: rgba(160,170,182,.18); border-color: rgba(160,170,182,.5);  color: var(--zone-silver); }
.zone-badge.gold   { background: rgba(154,123,79,.2);   border-color: rgba(154,123,79,.55);  color: var(--zone-gold); }
.zone-badge .zb-lock { font-size: 9px; }

/* 课程列表的专区 Tab：横向可滑，锁定的专区显示锁标与升级提示 */
.zone-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.zone-tabs::-webkit-scrollbar { display: none; }
.zone-tab {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-width: 92px; padding: 9px 13px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--beige);
  text-decoration: none; transition: border-color .18s, transform .18s;
}
.zone-tab:active { transform: scale(.98); }
.zone-tab .zt-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.zone-tab .zt-count { font-size: 11px; color: var(--muted); }
.zone-tab.on { border-color: var(--gold); background: rgba(154,123,79,.14); }
.zone-tab.on .zt-name { color: var(--gold-ink); }
.zone-tab.locked .zt-name { color: var(--muted); }
.zone-tab .zt-lock { font-size: 10px; }
.zone-tab.z-gold.on { border-color: var(--zone-gold); }
.zone-tab.z-bronze.on { border-color: var(--zone-bronze); }
.zone-tab.z-silver.on { border-color: var(--zone-silver); }
.zone-tab.z-free.on { border-color: var(--zone-free); }

/* 专区导语横幅（进入某专区后展示解锁状态与开通引导） */
.zone-banner {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 12px;
  padding: 12px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line);
}
.zone-banner .zb-ic { font-size: 24px; flex: none; }
.zone-banner .zb-txt { flex: 1; min-width: 0; }
.zone-banner .zb-txt b { display: block; font-size: 14px; color: var(--cream); }
.zone-banner .zb-txt small { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.zone-banner.z-free   { border-color: rgba(127,176,105,.4); }
.zone-banner.z-bronze { border-color: rgba(199,154,91,.42); }
.zone-banner.z-silver { border-color: rgba(160,170,182,.45); }
.zone-banner.z-gold   { border-color: rgba(154,123,79,.5); }
.zone-banner .btn { flex: none; }

/* 卡片右上角的锁定标记 */
.l-cover .zone-badge, .v-cover .zone-badge { position: absolute; top: 7px; left: 7px; z-index: 2; }
.l-cover, .v-cover { position: relative; }
/* 专区徽标压在恒为深色的课程封面上：明暗主题统一改用浅色文字 + 半透明深底，
   否则浅色主题下加深过的 --zone-* 会变成「深字压深底」看不清 */
.l-cover .zone-badge, .v-cover .zone-badge { background: rgba(20, 16, 12, .55); }
.l-cover .zone-badge.free,   .v-cover .zone-badge.free   { color: #AEDB94; border-color: rgba(174, 219, 148, .6); }
.l-cover .zone-badge.bronze, .v-cover .zone-badge.bronze { color: #ECC98C; border-color: rgba(236, 201, 140, .6); }
.l-cover .zone-badge.silver, .v-cover .zone-badge.silver { color: #DDE4EB; border-color: rgba(221, 228, 235, .6); }
.l-cover .zone-badge.gold,   .v-cover .zone-badge.gold   { color: #F4DEAF; border-color: rgba(244, 222, 175, .62); }

/* 详情页锁定态引导条 */
.lock-cta {
  margin-top: 12px; padding: 13px 15px; border-radius: 12px;
  background: rgba(154,123,79,.12); border: 1px solid rgba(154,123,79,.42);
}
.lock-cta b { display: block; font-size: 14px; color: var(--gold-ink); margin-bottom: 4px; }
.lock-cta p { font-size: 12.5px; color: var(--beige); margin: 0 0 10px; line-height: 1.6; }
.lock-cta .lc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lock-cta .lc-actions .btn { flex: 1 1 auto; min-width: 132px; }

/* 会员中心：已解锁专区清单 */
.zone-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.zone-cell {
  padding: 10px 12px; border-radius: 11px; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
}
.zone-cell .zc-ic { font-size: 15px; }
.zone-cell b { font-size: 12.5px; font-weight: 600; color: var(--cream); }
.zone-cell small { display: block; font-size: 10.5px; color: var(--muted); }
.zone-cell.off { opacity: .62; }
.zone-cell.off b { color: var(--muted); }
@media (min-width: 768px) { .zone-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

