/* ==========================================================================
   课程学习系统 · 前台样式
   莫兰迪色系 · 精致商务风 · 一套代码适配 H5 与 PC
   ========================================================================== */

:root {
  --c-primary: #8C9E97;
  --c-primary-dark: #6F837B;
  --c-primary-soft: #EBF0EE;
  --c-rose: #B08D8D;
  --c-rose-soft: #F5EDED;
  --c-violet: #9A9AA7;
  --c-sand: #A7998C;
  --c-amber: #BFA37A;
  --c-amber-soft: #F7F1E7;
  --c-success: #6F8F7C;
  --c-danger: #B5766E;

  --bg: #F6F5F2;
  --bg-card: #FFFFFF;
  --bg-soft: #FAF9F7;
  --bg-dark: #2F3433;

  --t1: #33362F;
  --t2: #6B6E66;
  --t3: #9B9E96;
  --t-invert: #FFFFFF;

  --line: #E7E4DE;
  --line-soft: #F0EEE9;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(45, 50, 45, 0.04);
  --shadow: 0 4px 16px rgba(45, 50, 45, 0.06);
  --shadow-lg: 0 12px 36px rgba(45, 50, 45, 0.10);

  --nav-h: 60px;
  --tab-h: 58px;
  --maxw: 1200px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.35; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }

/* ---------- 布局 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.page { padding-top: calc(var(--nav-h) + 20px); padding-bottom: calc(var(--tab-h) + 28px); min-height: 100vh; }
.page--plain { padding-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--t2); }
.hint { color: var(--t3); font-size: 13px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.hide { display: none !important; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: var(--nav-h);
  background: rgba(246, 245, 242, 0.86);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 500; letter-spacing: .2px; flex-shrink: 0; }
.brand__mark {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-primary), #A8B5AE);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 500;
}
.nav__links { display: flex; gap: 4px; flex: 1; }
/* 站点 Logo 图片（有配置时替代首字母方块） */
.brand__logo { height: 30px; width: auto; max-width: 150px; object-fit: contain; border-radius: 8px; flex-shrink: 0; display: block; }
.footer .brand__logo { height: 26px; }
/* ICP 备案号：跳转工信部备案管理系统 */
.footer .beian { color: var(--t2); border-bottom: 1px solid transparent; transition: .18s; }
.footer .beian:hover { color: var(--c-primary-dark); border-bottom-color: var(--c-primary-dark); }
/* 页脚二维码：关注公众号 / 客服微信 */
.foot-main { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; }
.foot-qr { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-qr__item { text-align: center; background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px 11px; transition: .2s; }
.foot-qr__item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.foot-qr__item img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; display: block; margin: 0 auto; }
.foot-qr__label { font-size: 12.5px; color: var(--t2); margin-top: 9px; font-weight: 500; letter-spacing: .3px; }
.foot-qr__id { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
@media (max-width: 700px) {
  .foot-qr { width: 100%; justify-content: center; gap: 16px; }
  .foot-qr__item { padding: 11px 16px 11px; }
  .foot-qr__item img { width: 110px; height: 110px; }
}.nav__link { padding: 7px 13px; border-radius: 99px; color: var(--t2); font-size: 14px; transition: .18s; }
.nav__link:hover { color: var(--t1); background: rgba(255,255,255,.7); }
.nav__link.is-active { color: var(--c-primary-dark); background: var(--c-primary-soft); font-weight: 500; }
.nav__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- 底部 Tab（移动端） ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  height: var(--tab-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  display: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--t3); font-size: 11px; transition: .18s;
}
.tabbar__item svg { width: 22px; height: 22px; }
.tabbar__item.is-active { color: var(--c-primary-dark); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: .18s; border: 1px solid transparent;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--ghost { background: var(--bg-card); color: var(--t1); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.btn--soft { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.btn--danger { background: var(--c-danger); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: 12px; }
.btn--sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.btn--xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- 卡片 ---------- */
.card { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
.card--pad { padding: 18px; }
.card--hover { transition: .2s; }
.card--hover:hover { border-color: #DAD6CE; box-shadow: var(--shadow); transform: translateY(-2px); }

/* ---------- 课程卡片 ---------- */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.course-card { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); transition: .2s; }
.course-card:hover { border-color: #DAD6CE; box-shadow: var(--shadow); transform: translateY(-3px); }
.course-card__cover {
  position: relative; aspect-ratio: 16 / 10;
  display: grid; place-items: center; overflow: hidden;
  font-size: 34px; font-weight: 500; letter-spacing: 2px;
}
.course-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card__badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.course-card__body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.course-card__title { font-size: 15px; font-weight: 500; line-height: 1.5; height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card__sub { font-size: 12.5px; color: var(--t3); height: 1.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-card__meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--t3); }
.course-card__foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.price { color: #B5766E; font-weight: 500; }
.price--lg { font-size: 22px; }
.price--lg small { font-size: 13px; font-weight: 400; }
.price--old { color: var(--t3); text-decoration: line-through; font-size: 12.5px; font-weight: 400; margin-left: 6px; }
.price--free { color: var(--c-success); }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 12px; background: rgba(255,255,255,.92); color: var(--t2); backdrop-filter: blur(4px); font-weight: 400; }
.badge--primary { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.badge--rose { background: var(--c-rose-soft); color: #8E6B6B; }
.badge--amber { background: var(--c-amber-soft); color: #8A6D3F; }
.badge--gray { background: #F1F0EC; color: var(--t2); }
.badge--danger { background: #F7EBEA; color: #9B5F58; }
.badge--success { background: #EAF2ED; color: #5A7D68; }
.badge--solid { background: var(--c-primary); color: #fff; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 15px; }
.field__label { display: block; font-size: 13.5px; color: var(--t2); margin-bottom: 7px; }
.field__label .req { color: var(--c-danger); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: .18s;
}
.textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(140,158,151,.12); }
.input::placeholder, .textarea::placeholder { color: #B8BBB3; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%239B9E96' fill='none' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 32px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--c-primary); }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider { position: absolute; inset: 0; background: #D8D6D0; border-radius: 99px; transition: .22s; }
.switch__slider::before { content: ''; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .22s; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.switch input:checked + .switch__slider { background: var(--c-primary); }
.switch input:checked + .switch__slider::before { transform: translateX(19px); }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 15px; font-size: 14px; color: var(--t2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: .18s; }
.tab.is-active { color: var(--c-primary-dark); border-color: var(--c-primary); font-weight: 500; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 99px; background: var(--bg-card); border: 1px solid var(--line); font-size: 13.5px; color: var(--t2); transition: .18s; }
.chip:hover { border-color: var(--c-primary); }
.chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- 通用块 ---------- */
.section { margin-bottom: 34px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section__title { font-size: 19px; font-weight: 500; }
.section__sub { font-size: 13px; color: var(--t3); margin-top: 3px; }
.section__more { font-size: 13.5px; color: var(--t3); }
.section__more:hover { color: var(--c-primary-dark); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 16px; }
.stat__num { font-size: 22px; font-weight: 500; line-height: 1.3; }
.stat__label { font-size: 12.5px; color: var(--t3); }

/* 空状态 */
.empty { text-align: center; padding: 56px 20px; color: var(--t3); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--line-soft); display: grid; place-items: center; }
.empty__text { font-size: 14px; }

/* 加载 */
.skeleton { background: linear-gradient(90deg, #EFEDE9 25%, #F6F5F2 37%, #EFEDE9 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 提示 */
.toast-box { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(47, 52, 51, .93); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow-lg); animation: tin .22s ease; max-width: 84vw; text-align: center;
}
.toast--error { background: rgba(150, 88, 80, .95); }
.toast--success { background: rgba(90, 125, 104, .95); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(40, 44, 42, .42); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; animation: tin .18s ease; }
.modal { background: var(--bg-card); border-radius: var(--r-xl); width: 100%; max-width: 440px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal__head { padding: 20px 22px 0; display: flex; align-items: center; justify-content: space-between; }
.modal__title { font-size: 17px; font-weight: 500; }
.modal__close { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--t3); }
.modal__close:hover { background: var(--bg-soft); color: var(--t1); }
.modal__body { padding: 18px 22px; }
.modal__foot { padding: 0 22px 22px; display: flex; gap: 10px; }
.modal__foot .btn { flex: 1; }

/* ---------- 进度条 ---------- */
.bar { height: 5px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar__in { height: 100%; background: var(--c-primary); border-radius: 99px; transition: width .3s; }

/* ---------- 列表项 ---------- */
.list-item { display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: var(--bg-card); border-bottom: 1px solid var(--line-soft); transition: .16s; }
.list-item:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.list-item:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); border-bottom: none; }
.list-item:only-child { border-radius: var(--r-lg); }
.list-item:hover { background: var(--bg-soft); }
.list-box { border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }

/* 头像 */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 500; overflow: hidden; background: var(--c-primary); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.avatar--xl { width: 88px; height: 88px; font-size: 30px; }
/* 微信风格形象照：大尺寸圆角方形（约18%圆角），非圆形 */
.avatar--wx { width: 96px; height: 96px; border-radius: 18px; font-size: 32px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
/* 标准 1 寸证件照风格：5:7 竖版（2.5cm × 3.5cm） */
.avatar--id { width: 132px; height: auto; aspect-ratio: 5 / 7; border-radius: 12px; font-size: 34px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* 下拉 */
.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: var(--shadow-lg); min-width: 168px; padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; z-index: 90; }
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: none; }
.dropdown__item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--t1); }
.dropdown__item:hover { background: var(--bg-soft); }
.dropdown__divider { height: 1px; background: var(--line-soft); margin: 5px 0; }

/* ---------- 详情页 ---------- */
.hero { background: var(--bg-card); border-bottom: 1px solid var(--line-soft); padding: 26px 0 30px; }
.hero__grid { display: grid; grid-template-columns: 1fr 320px; gap: 34px; }
.hero__cover { aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; font-size: 52px; letter-spacing: 3px; font-weight: 500; margin-bottom: 20px; }
.hero__cover img { width: 100%; height: 100%; object-fit: cover; }

.buybox { position: sticky; top: calc(var(--nav-h) + 18px); background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; }
.buybox--floating { position: static; }

/* ---------- 播放页 ---------- */
.player-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.player-stage { background: #23262A; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/9; display: grid; place-items: center; color: #fff; }
.player-stage video { width: 100%; height: 100%; display: block; background: #000; }
.outline { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; max-height: calc(100vh - var(--nav-h) - 60px); display: flex; flex-direction: column; }
.outline__head { padding: 15px 17px; border-bottom: 1px solid var(--line-soft); font-size: 15px; font-weight: 500; }
.outline__body { overflow-y: auto; flex: 1; }
.outline__ch { padding: 12px 17px 5px; font-size: 13px; color: var(--t3); }
.outline__item { display: flex; align-items: center; gap: 10px; padding: 10px 17px; font-size: 14px; cursor: pointer; transition: .16s; }
.outline__item:hover { background: var(--bg-soft); }
.outline__item.is-active { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 500; }
.outline__item.is-locked { color: var(--t3); cursor: not-allowed; }
.outline__idx { width: 20px; flex-shrink: 0; font-size: 12px; color: var(--t3); text-align: center; }

/* ---------- 会员卡 ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.plan { position: relative; background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-xl); padding: 26px 22px; display: flex; flex-direction: column; transition: .2s; }
.plan:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.plan.is-recommend { border-color: var(--c-primary); border-width: 1.5px; }
.plan__ribbon { position: absolute; top: -1px; right: 20px; background: var(--c-primary); color: #fff; font-size: 11.5px; padding: 3px 10px; border-radius: 0 0 8px 8px; }
.plan__badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; color: #fff; margin-bottom: 12px; }
.plan__price { font-size: 32px; font-weight: 500; line-height: 1.2; }
.plan__price small { font-size: 15px; font-weight: 400; }
.plan__benefits { list-style: none; padding: 0; margin: 18px 0 22px; display: flex; flex-direction: column; gap: 9px; }
.plan__benefits li { font-size: 13.5px; color: var(--t2); display: flex; gap: 8px; align-items: flex-start; }
.plan__benefits li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--c-primary); margin-top: 8px; flex-shrink: 0; }

/* ---------- 贡献值 ---------- */
.points-hero { background: linear-gradient(135deg, #8C9E97, #A8B5AE); border-radius: var(--r-xl); padding: 28px; color: #fff; }
.points-hero__num { font-size: 40px; font-weight: 500; line-height: 1.1; }
.logo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.logo-item { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 16px; text-align: center; }

/* 流水 */
.flow { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); background: var(--bg-card); }
.flow:last-child { border-bottom: none; }
.flow__amt { font-weight: 500; font-variant-numeric: tabular-nums; }
.flow__amt--in { color: #5A7D68; }
.flow__amt--out { color: #9B5F58; }

/* ---------- 登录 ---------- */
.auth { max-width: 400px; margin: 0 auto; padding: 40px 20px; }
.auth__logo { text-align: center; margin-bottom: 30px; }
.auth__logo .brand__mark { width: 48px; height: 48px; border-radius: 15px; font-size: 22px; margin: 0 auto 14px; }
.auth__box { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-xl); padding: 26px 24px; }

/* ---------- 订单 ---------- */
.order-card { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 12px; }
.order-card__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; font-size: 13px; color: var(--t3); }

/* 二维码 */
.qr-box { display: grid; place-items: center; padding: 18px; background: var(--bg-soft); border-radius: var(--r-md); margin: 14px 0; }
.qr-box canvas, .qr-box img { border-radius: 8px; background: #fff; padding: 8px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 34px 0 40px; margin-top: 40px; color: var(--t3); font-size: 13px; }
.footer a:hover { color: var(--c-primary-dark); }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager button { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px; background: var(--bg-card); border: 1px solid var(--line); font-size: 13.5px; color: var(--t2); }
.pager button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pager button[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 富文本 ---------- */
.rich { font-size: 15px; color: #4A4D46; line-height: 1.85; }
.rich h3 { font-size: 16.5px; margin: 22px 0 10px; color: var(--t1); }
.rich p { margin: 0 0 13px; }
.rich img { border-radius: var(--r-md); margin: 12px 0; }
.rich ol, .rich ul { padding-left: 22px; margin-bottom: 14px; }
.rich li { margin-bottom: 6px; }
.rich blockquote { margin: 14px 0; padding: 12px 16px; background: var(--c-primary-soft); border-left: 3px solid var(--c-primary); border-radius: 0 8px 8px 0; }

/* ---------- 渐变占位（无封面时） ---------- */
.g0 { background: linear-gradient(135deg, #A8B5AE, #C3CCC6); color: #fff; }
.g1 { background: linear-gradient(135deg, #B9A0A0, #D0BDBC); color: #fff; }
.g2 { background: linear-gradient(135deg, #A5A5B2, #C2C2CC); color: #fff; }
.g3 { background: linear-gradient(135deg, #B3A99C, #CDC6BC); color: #fff; }
.g4 { background: linear-gradient(135deg, #97A6A0, #BCC7C2); color: #fff; }
.g5 { background: linear-gradient(135deg, #A99EA6, #C8C1C6); color: #fff; }

/* ==========================================================================
   响应式
   ========================================================================== */

/* PC */
@media (min-width: 861px) {
  .page { padding-bottom: 40px; }
}

/* 平板 */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .buybox { position: static; }
  .player-layout { grid-template-columns: 1fr; }
  .outline { max-height: none; }
}

/* 移动端 */
@media (max-width: 860px) {
  body { font-size: 14.5px; }
  .tabbar { display: flex; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .wrap { padding: 0 14px; }
  h1 { font-size: 21px; }
  h2 { font-size: 18px; }
  .section { margin-bottom: 26px; }
  .section__title { font-size: 17px; }
  .courses { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .course-card__cover { font-size: 26px; }
  .course-card__body { padding: 11px 12px 13px; gap: 6px; }
  .course-card__title { font-size: 14px; }
  .course-card__meta { font-size: 11.5px; gap: 9px; }
  .price--lg { font-size: 19px; }
  .hero { padding: 16px 0 22px; }
  .hero__cover { font-size: 40px; margin-bottom: 16px; }
  .plans { grid-template-columns: 1fr; }
  .modal { max-width: 100%; border-radius: var(--r-lg); }
  .page { padding-top: calc(var(--nav-h) + 14px); }
  .btn { height: 38px; padding: 0 16px; }
  .btn--lg { height: 46px; }
  .stat__num { font-size: 19px; }
  .points-hero { padding: 22px; }
  .points-hero__num { font-size: 34px; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .courses { grid-template-columns: 1fr 1fr; gap: 10px; }
  .course-card__title { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
